From b52ae04f7e39f56bb40eeb090e570cca14fcfcbc Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Mon, 9 Dec 2024 16:21:09 -0600 Subject: [PATCH] Prefer optional over convertible parameters (#3368) --- crates/libs/bindgen/src/type_name.rs | 1 + crates/libs/bindgen/src/types/cpp_method.rs | 20 +- crates/libs/bindgen/src/types/cpp_struct.rs | 2 +- crates/libs/bindgen/src/types/mod.rs | 8 - .../Wdk/Devices/HumanInterfaceDevice/mod.rs | 7 +- .../windows/src/Windows/Wdk/Foundation/mod.rs | 14 +- .../src/Windows/Wdk/Graphics/Direct3D/mod.rs | 21 +- .../Windows/Wdk/NetworkManagement/Ndis/mod.rs | 30 +- .../WindowsFilteringPlatform/mod.rs | 1043 ++---- .../Wdk/Storage/FileSystem/Minifilters/mod.rs | 1242 +++---- .../src/Windows/Wdk/Storage/FileSystem/mod.rs | 1819 ++++------ .../windows/src/Windows/Wdk/System/IO/mod.rs | 19 +- .../src/Windows/Wdk/System/Memory/mod.rs | 30 +- .../Windows/Wdk/System/OfflineRegistry/mod.rs | 132 +- .../src/Windows/Wdk/System/Registry/mod.rs | 316 +- .../Windows/Wdk/System/SystemServices/mod.rs | 2098 ++++------- .../src/Windows/Wdk/System/Threading/mod.rs | 114 +- .../Win32/AI/MachineLearning/DirectML/mod.rs | 14 +- .../src/Windows/Win32/Data/HtmlHelp/mod.rs | 10 +- .../Win32/Data/RightsManagement/mod.rs | 129 +- .../src/Windows/Win32/Data/Xml/MsXml/mod.rs | 132 +- .../src/Windows/Win32/Data/Xml/XmlLite/mod.rs | 26 +- .../src/Windows/Win32/Devices/AllJoyn/mod.rs | 3088 +++++------------ .../Win32/Devices/BiometricFramework/mod.rs | 60 +- .../Windows/Win32/Devices/Bluetooth/mod.rs | 224 +- .../Win32/Devices/Communication/mod.rs | 136 +- .../Windows/Win32/Devices/DeviceAccess/mod.rs | 2 +- .../DeviceAndDriverInstallation/mod.rs | 1703 ++++----- .../Windows/Win32/Devices/DeviceQuery/mod.rs | 19 +- .../src/Windows/Win32/Devices/Display/mod.rs | 329 +- .../Win32/Devices/Enumeration/Pnp/mod.rs | 45 +- .../src/Windows/Win32/Devices/Fax/mod.rs | 591 +--- .../Windows/Win32/Devices/Geolocation/mod.rs | 5 +- .../Win32/Devices/HumanInterfaceDevice/mod.rs | 504 +-- .../Win32/Devices/ImageAcquisition/mod.rs | 85 +- .../Win32/Devices/PortableDevices/mod.rs | 2 +- .../src/Windows/Win32/Devices/Sensors/mod.rs | 11 +- .../Win32/Devices/SerialCommunication/mod.rs | 40 +- .../src/Windows/Win32/Devices/Tapi/mod.rs | 347 +- .../src/Windows/Win32/Devices/Usb/mod.rs | 188 +- .../Win32/Devices/WebServicesOnDevices/mod.rs | 115 +- .../src/Windows/Win32/Foundation/mod.rs | 64 +- .../windows/src/Windows/Win32/Gaming/mod.rs | 57 +- .../src/Windows/Win32/Globalization/mod.rs | 478 ++- .../Graphics/CompositionSwapchain/mod.rs | 7 +- .../src/Windows/Win32/Graphics/DXCore/mod.rs | 6 +- .../Windows/Win32/Graphics/Direct2D/mod.rs | 185 +- .../Win32/Graphics/Direct3D/Dxc/mod.rs | 14 +- .../Win32/Graphics/Direct3D/Fxc/mod.rs | 18 +- .../Windows/Win32/Graphics/Direct3D10/mod.rs | 135 +- .../Windows/Win32/Graphics/Direct3D11/mod.rs | 330 +- .../Win32/Graphics/Direct3D11on12/mod.rs | 6 +- .../Windows/Win32/Graphics/Direct3D12/mod.rs | 168 +- .../Windows/Win32/Graphics/Direct3D9/mod.rs | 49 +- .../Win32/Graphics/DirectComposition/mod.rs | 56 +- .../Windows/Win32/Graphics/DirectDraw/mod.rs | 160 +- .../Win32/Graphics/DirectManipulation/mod.rs | 41 +- .../Windows/Win32/Graphics/DirectWrite/mod.rs | 166 +- .../src/Windows/Win32/Graphics/Dwm/mod.rs | 122 +- .../src/Windows/Win32/Graphics/Dxgi/mod.rs | 112 +- .../src/Windows/Win32/Graphics/Gdi/mod.rs | 2252 ++++-------- .../src/Windows/Win32/Graphics/GdiPlus/mod.rs | 156 +- .../src/Windows/Win32/Graphics/Imaging/mod.rs | 45 +- .../src/Windows/Win32/Graphics/OpenGL/mod.rs | 148 +- .../Graphics/Printing/PrintTicket/mod.rs | 37 +- .../Windows/Win32/Graphics/Printing/mod.rs | 507 +-- .../MobileDeviceManagementRegistration/mod.rs | 15 +- .../src/Windows/Win32/Media/Audio/Apo/mod.rs | 14 +- .../Win32/Media/Audio/DirectMusic/mod.rs | 20 +- .../Win32/Media/Audio/DirectSound/mod.rs | 59 +- .../Windows/Win32/Media/Audio/XAudio2/mod.rs | 22 +- .../src/Windows/Win32/Media/Audio/mod.rs | 862 ++--- .../Windows/Win32/Media/DeviceManager/mod.rs | 42 +- .../Windows/Win32/Media/DirectShow/Tv/mod.rs | 566 +-- .../src/Windows/Win32/Media/DirectShow/mod.rs | 370 +- .../Windows/Win32/Media/DxMediaObjects/mod.rs | 10 +- .../Win32/Media/KernelStreaming/mod.rs | 106 +- .../Win32/Media/LibrarySharingServices/mod.rs | 53 +- .../Win32/Media/MediaFoundation/mod.rs | 350 +- .../Windows/Win32/Media/MediaPlayer/mod.rs | 331 +- .../src/Windows/Win32/Media/Multimedia/mod.rs | 430 +-- .../Win32/Media/PictureAcquisition/mod.rs | 65 +- .../src/Windows/Win32/Media/Speech/mod.rs | 395 +-- .../windows/src/Windows/Win32/Media/mod.rs | 14 +- .../Win32/NetworkManagement/Dhcp/mod.rs | 6 +- .../Win32/NetworkManagement/Dns/mod.rs | 83 +- .../Win32/NetworkManagement/IpHelper/mod.rs | 212 +- .../NetworkManagement/MobileBroadband/mod.rs | 5 +- .../NetworkManagement/NetManagement/mod.rs | 258 +- .../Win32/NetworkManagement/NetShell/mod.rs | 26 +- .../NetworkDiagnosticsFramework/mod.rs | 14 +- .../NetworkPolicyServer/mod.rs | 7 +- .../Win32/NetworkManagement/P2P/mod.rs | 177 +- .../Win32/NetworkManagement/QoS/mod.rs | 181 +- .../Win32/NetworkManagement/Rras/mod.rs | 735 ++-- .../Win32/NetworkManagement/Snmp/mod.rs | 16 +- .../Win32/NetworkManagement/WNet/mod.rs | 143 +- .../Win32/NetworkManagement/WebDav/mod.rs | 33 +- .../Win32/NetworkManagement/WiFi/mod.rs | 353 +- .../WindowsConnectionManager/mod.rs | 17 +- .../WindowsFilteringPlatform/mod.rs | 1310 ++----- .../NetworkManagement/WindowsFirewall/mod.rs | 246 +- .../WindowsNetworkVirtualization/mod.rs | 7 +- .../Win32/Networking/ActiveDirectory/mod.rs | 645 ++-- .../Win32/Networking/Clustering/mod.rs | 2180 ++++-------- .../Win32/Networking/HttpServer/mod.rs | 223 +- .../src/Windows/Win32/Networking/Ldap/mod.rs | 87 +- .../Networking/NetworkListManager/mod.rs | 11 +- .../Windows/Win32/Networking/WebSocket/mod.rs | 68 +- .../Windows/Win32/Networking/WinHttp/mod.rs | 42 +- .../Windows/Win32/Networking/WinInet/mod.rs | 623 ++-- .../Windows/Win32/Networking/WinSock/mod.rs | 615 ++-- .../Networking/WindowsWebServices/mod.rs | 390 ++- .../Windows/Win32/Security/AppLocker/mod.rs | 42 +- .../Authentication/Identity/Provider/mod.rs | 58 +- .../Security/Authentication/Identity/mod.rs | 486 +-- .../Win32/Security/Authorization/UI/mod.rs | 65 +- .../Win32/Security/Authorization/mod.rs | 458 +-- .../Windows/Win32/Security/Credentials/mod.rs | 135 +- .../Security/Cryptography/Catalog/mod.rs | 119 +- .../Security/Cryptography/Certificates/mod.rs | 321 +- .../Win32/Security/Cryptography/Sip/mod.rs | 12 +- .../Win32/Security/Cryptography/UI/mod.rs | 27 +- .../Win32/Security/Cryptography/mod.rs | 1523 +++----- .../Win32/Security/DiagnosticDataQuery/mod.rs | 223 +- .../Win32/Security/DirectoryServices/mod.rs | 21 +- .../Win32/Security/EnterpriseData/mod.rs | 93 +- .../ExtensibleAuthenticationProtocol/mod.rs | 115 +- .../Windows/Win32/Security/Isolation/mod.rs | 13 +- .../Windows/Win32/Security/WinTrust/mod.rs | 35 +- .../windows/src/Windows/Win32/Security/mod.rs | 705 ++-- .../src/Windows/Win32/Storage/Cabinets/mod.rs | 6 +- .../Windows/Win32/Storage/CloudFilters/mod.rs | 184 +- .../Windows/Win32/Storage/Compression/mod.rs | 74 +- .../Storage/DistributedFileSystem/mod.rs | 27 +- .../Windows/Win32/Storage/FileHistory/mod.rs | 38 +- .../Storage/FileServerResourceManager/mod.rs | 98 +- .../Windows/Win32/Storage/FileSystem/mod.rs | 1274 +++---- .../src/Windows/Win32/Storage/Imapi/mod.rs | 189 +- .../Storage/InstallableFileSystems/mod.rs | 115 +- .../Windows/Win32/Storage/IscsiDisc/mod.rs | 40 +- .../src/Windows/Win32/Storage/Jet/mod.rs | 1470 +++----- .../Windows/Win32/Storage/OfflineFiles/mod.rs | 43 +- .../Win32/Storage/Packaging/Appx/mod.rs | 244 +- .../Win32/Storage/ProjectedFileSystem/mod.rs | 76 +- .../src/Windows/Win32/Storage/Vhd/mod.rs | 186 +- .../Windows/Win32/Storage/Xps/Printing/mod.rs | 12 +- .../src/Windows/Win32/Storage/Xps/mod.rs | 79 +- .../Windows/Win32/System/AddressBook/mod.rs | 112 +- .../Windows/Win32/System/Antimalware/mod.rs | 46 +- .../mod.rs | 1103 +++--- .../Win32/System/ApplicationVerifier/mod.rs | 7 +- .../Win32/System/AssessmentTool/mod.rs | 10 +- .../Windows/Win32/System/ClrHosting/mod.rs | 137 +- .../Windows/Win32/System/Com/CallObj/mod.rs | 2 +- .../Windows/Win32/System/Com/Marshal/mod.rs | 12 +- .../Win32/System/Com/StructuredStorage/mod.rs | 85 +- .../src/Windows/Win32/System/Com/UI/mod.rs | 8 +- .../Windows/Win32/System/Com/Urlmon/mod.rs | 73 +- .../src/Windows/Win32/System/Com/mod.rs | 166 +- .../Win32/System/ComponentServices/mod.rs | 39 +- .../src/Windows/Win32/System/Console/mod.rs | 349 +- .../Win32/System/CorrelationVector/mod.rs | 2 +- .../Windows/Win32/System/DataExchange/mod.rs | 277 +- .../Win32/System/DeploymentServices/mod.rs | 468 +-- .../Win32/System/DesktopSharing/mod.rs | 51 +- .../Win32/System/DeveloperLicensing/mod.rs | 14 +- .../Diagnostics/Debug/ActiveScript/mod.rs | 7 +- .../Diagnostics/Debug/Extensions/mod.rs | 1816 +++++----- .../Win32/System/Diagnostics/Debug/mod.rs | 1303 +++---- .../Win32/System/Diagnostics/Etw/mod.rs | 160 +- .../Diagnostics/ProcessSnapshotting/mod.rs | 69 +- .../Win32/System/Diagnostics/ToolHelp/mod.rs | 84 +- .../DistributedTransactionCoordinator/mod.rs | 6 +- .../Windows/Win32/System/Environment/mod.rs | 42 +- .../Win32/System/ErrorReporting/mod.rs | 107 +- .../src/Windows/Win32/System/EventLog/mod.rs | 303 +- .../Windows/Win32/System/GroupPolicy/mod.rs | 131 +- .../Win32/System/HostComputeNetwork/mod.rs | 67 +- .../Win32/System/HostComputeSystem/mod.rs | 288 +- .../Windows/Win32/System/Hypervisor/mod.rs | 490 +-- .../src/Windows/Win32/System/IO/mod.rs | 72 +- .../src/Windows/Win32/System/Iis/mod.rs | 2 +- .../Windows/Win32/System/JobObjects/mod.rs | 59 +- .../src/Windows/Win32/System/Js/mod.rs | 26 +- .../Windows/Win32/System/LibraryLoader/mod.rs | 190 +- .../src/Windows/Win32/System/Mailslots/mod.rs | 18 +- .../src/Windows/Win32/System/Memory/mod.rs | 432 +-- .../Win32/System/MessageQueuing/mod.rs | 64 +- .../src/Windows/Win32/System/Mmc/mod.rs | 101 +- .../src/Windows/Win32/System/Ole/mod.rs | 437 +-- .../Win32/System/ParentalControls/mod.rs | 21 +- .../HardwareCounterProfiling/mod.rs | 28 +- .../Windows/Win32/System/Performance/mod.rs | 894 ++--- .../src/Windows/Win32/System/Pipes/mod.rs | 131 +- .../src/Windows/Win32/System/Power/mod.rs | 374 +- .../Windows/Win32/System/ProcessStatus/mod.rs | 262 +- .../System/RealTimeCommunications/mod.rs | 102 +- .../src/Windows/Win32/System/Recovery/mod.rs | 16 +- .../src/Windows/Win32/System/Registry/mod.rs | 516 ++- .../Windows/Win32/System/RemoteDesktop/mod.rs | 386 +-- .../Win32/System/RemoteManagement/mod.rs | 148 +- .../Win32/System/RestartManager/mod.rs | 18 +- .../src/Windows/Win32/System/Rpc/mod.rs | 240 +- .../src/Windows/Win32/System/Search/mod.rs | 575 ++- .../Win32/System/SecurityCenter/mod.rs | 7 +- .../src/Windows/Win32/System/Services/mod.rs | 340 +- .../Win32/System/SetupAndMigration/mod.rs | 2 +- .../src/Windows/Win32/System/Shutdown/mod.rs | 19 +- .../src/Windows/Win32/System/SideShow/mod.rs | 9 +- .../Win32/System/StationsAndDesktops/mod.rs | 145 +- .../Win32/System/SubsystemForLinux/mod.rs | 7 +- .../Win32/System/SystemInformation/mod.rs | 27 +- .../Windows/Win32/System/TaskScheduler/mod.rs | 175 +- .../src/Windows/Win32/System/Threading/mod.rs | 1124 ++---- .../src/Windows/Win32/System/Time/mod.rs | 14 +- .../Win32/System/TpmBaseServices/mod.rs | 10 +- .../Windows/Win32/System/UpdateAgent/mod.rs | 126 +- .../src/Windows/Win32/System/Variant/mod.rs | 7 +- .../Win32/System/WinRT/Composition/mod.rs | 25 +- .../Win32/System/WinRT/CoreInputView/mod.rs | 5 +- .../Windows/Win32/System/WinRT/Display/mod.rs | 7 +- .../System/WinRT/Graphics/Capture/mod.rs | 10 +- .../System/WinRT/Graphics/Imaging/mod.rs | 2 +- .../Win32/System/WinRT/Isolation/mod.rs | 7 +- .../Windows/Win32/System/WinRT/Media/mod.rs | 2 +- .../Win32/System/WinRT/Metadata/mod.rs | 32 +- .../src/Windows/Win32/System/WinRT/Pdf/mod.rs | 4 +- .../Win32/System/WinRT/Printing/mod.rs | 20 +- .../src/Windows/Win32/System/WinRT/mod.rs | 137 +- .../Win32/System/WindowsProgramming/mod.rs | 487 +-- .../Windows/Win32/System/WindowsSync/mod.rs | 28 +- .../src/Windows/Win32/System/Wmi/mod.rs | 240 +- .../src/Windows/Win32/UI/Accessibility/mod.rs | 709 ++-- .../src/Windows/Win32/UI/Animation/mod.rs | 66 +- .../src/Windows/Win32/UI/ColorSystem/mod.rs | 203 +- .../Windows/Win32/UI/Controls/Dialogs/mod.rs | 17 +- .../Windows/Win32/UI/Controls/RichEdit/mod.rs | 108 +- .../src/Windows/Win32/UI/Controls/mod.rs | 1253 ++----- .../windows/src/Windows/Win32/UI/HiDpi/mod.rs | 148 +- .../src/Windows/Win32/UI/Input/Ime/mod.rs | 1560 +++------ .../Win32/UI/Input/KeyboardAndMouse/mod.rs | 110 +- .../src/Windows/Win32/UI/Input/Pointer/mod.rs | 55 +- .../src/Windows/Win32/UI/Input/Radial/mod.rs | 15 +- .../src/Windows/Win32/UI/Input/Touch/mod.rs | 70 +- .../Win32/UI/Input/XboxController/mod.rs | 8 +- .../windows/src/Windows/Win32/UI/Input/mod.rs | 27 +- .../Win32/UI/InteractionContext/mod.rs | 203 +- .../LegacyWindowsEnvironmentFeatures/mod.rs | 23 +- .../src/Windows/Win32/UI/Magnification/mod.rs | 70 +- .../src/Windows/Win32/UI/Ribbon/mod.rs | 23 +- .../Win32/UI/Shell/PropertiesSystem/mod.rs | 47 +- .../windows/src/Windows/Win32/UI/Shell/mod.rs | 2327 +++++-------- .../src/Windows/Win32/UI/TabletPC/mod.rs | 522 +-- .../src/Windows/Win32/UI/TextServices/mod.rs | 274 +- .../Win32/UI/WindowsAndMessaging/mod.rs | 1863 +++------- .../windows/src/Windows/Win32/UI/Wpf/mod.rs | 17 +- .../Windows/Win32/Web/InternetExplorer/mod.rs | 161 +- crates/samples/windows/com_uri/src/main.rs | 2 +- .../samples/windows/create_window/src/main.rs | 4 +- .../samples/windows/credentials/src/main.rs | 2 +- crates/samples/windows/dcomp/src/main.rs | 8 +- crates/samples/windows/direct2d/src/main.rs | 4 +- crates/samples/windows/direct3d12/src/main.rs | 2 +- crates/samples/windows/privileges/src/main.rs | 4 +- .../bindgen/src/fn_associated_enum_win.rs | 2 +- .../bindgen/src/struct_with_cpp_interface.rs | 4 +- crates/tests/bindgen/src/window_long_get_a.rs | 14 +- crates/tests/bindgen/src/window_long_get_w.rs | 14 +- crates/tests/bindgen/src/window_long_set_a.rs | 18 +- crates/tests/bindgen/src/window_long_set_w.rs | 18 +- crates/tests/misc/bcrypt/tests/win.rs | 6 +- crates/tests/misc/const_params/tests/win.rs | 2 +- .../tests/misc/extensions/tests/ntstatus.rs | 2 +- crates/tests/misc/handles/tests/win.rs | 2 +- crates/tests/misc/interface/tests/com.rs | 2 +- crates/tests/misc/lib/tests/win.rs | 2 +- .../tests/misc/registry/tests/bad_string.rs | 2 +- crates/tests/misc/registry/tests/interop.rs | 4 +- crates/tests/misc/reserved/tests/win.rs | 19 +- crates/tests/misc/win32/tests/win32.rs | 21 +- .../tests/misc/win32_arrays/tests/xmllite.rs | 4 +- crates/tests/misc/window_long/tests/win.rs | 8 +- 283 files changed, 23047 insertions(+), 44049 deletions(-) diff --git a/crates/libs/bindgen/src/type_name.rs b/crates/libs/bindgen/src/type_name.rs index e0830e52cf..01d598afeb 100644 --- a/crates/libs/bindgen/src/type_name.rs +++ b/crates/libs/bindgen/src/type_name.rs @@ -43,6 +43,7 @@ impl TypeName { pub const HRESULT: Self = Self("Windows.Win32.Foundation", "HRESULT"); pub const CHAR: Self = Self("Windows.Win32.Foundation", "CHAR"); pub const BOOL: Self = Self("Windows.Win32.Foundation", "BOOL"); + pub const BOOLEAN: Self = Self("Windows.Win32.Foundation", "BOOLEAN"); pub const NTSTATUS: Self = Self("Windows.Win32.Foundation", "NTSTATUS"); pub const WIN32_ERROR: Self = Self("Windows.Win32.Foundation", "WIN32_ERROR"); pub const RPC_STATUS: Self = Self("Windows.Win32.System.Rpc", "RPC_STATUS"); diff --git a/crates/libs/bindgen/src/types/cpp_method.rs b/crates/libs/bindgen/src/types/cpp_method.rs index b948be9232..4bd78a3ce1 100644 --- a/crates/libs/bindgen/src/types/cpp_method.rs +++ b/crates/libs/bindgen/src/types/cpp_method.rs @@ -29,7 +29,7 @@ pub enum ParamHint { ArrayRelativeByteLen(usize), ArrayRelativePtr(usize), IntoParam, - OptionalPointer, + Optional, ValueType, Blittable, } @@ -159,13 +159,13 @@ impl CppMethod { *hint = ParamHint::IntoParam; } else { let flags = signature.params[position].1.flags(); - if signature.params[position].0.is_pointer() + if signature.params[position].0.is_copyable() && (flags.contains(ParamAttributes::Optional) || signature.params[position] .1 .has_attribute("ReservedAttribute")) { - *hint = ParamHint::OptionalPointer; + *hint = ParamHint::Optional; } else if signature.params[position].0.is_primitive() && (!signature.params[position].0.is_pointer() || signature.params[position].0.deref().is_copyable()) @@ -622,7 +622,7 @@ impl CppMethod { let kind: TokenStream = format!("P{position}").into(); tokens.combine("e! { #name: #kind, }); } - ParamHint::OptionalPointer => { + ParamHint::Optional => { let kind = ty.write_default(writer); tokens.combine("e! { #name: Option<#kind>, }); } @@ -688,12 +688,8 @@ impl CppMethod { ParamHint::IntoParam => { quote! { #name.param().abi(), } } - ParamHint::OptionalPointer => { - if flags.contains(ParamAttributes::Out) { - quote! { core::mem::transmute(#name.unwrap_or(core::ptr::null_mut())), } - } else { - quote! { core::mem::transmute(#name.unwrap_or(core::ptr::null())), } - } + ParamHint::Optional => { + quote! { core::mem::transmute(#name.unwrap_or(core::mem::zeroed())), } } ParamHint::ValueType => { quote! { core::mem::transmute(#name), } @@ -784,9 +780,7 @@ fn write_invoke_arg(ty: &Type, param: Param, _hint: ParamHint) -> TokenStream { } fn is_convertible(ty: &Type, param: Param, hint: ParamHint) -> bool { - !param.flags().contains(ParamAttributes::Out) - && !hint.is_array() - && (ty.is_convertible() || ty.is_handle()) + !param.flags().contains(ParamAttributes::Out) && !hint.is_array() && ty.is_convertible() } fn is_retval(signature: &Signature, param_hints: &[ParamHint]) -> bool { diff --git a/crates/libs/bindgen/src/types/cpp_struct.rs b/crates/libs/bindgen/src/types/cpp_struct.rs index ebbb5d5b15..cab1694856 100644 --- a/crates/libs/bindgen/src/types/cpp_struct.rs +++ b/crates/libs/bindgen/src/types/cpp_struct.rs @@ -260,7 +260,7 @@ impl CppStruct { } pub fn is_convertible(&self) -> bool { - self.is_handle() + matches!(self.def.type_name(), TypeName::BOOL | TypeName::BOOLEAN) } pub fn is_copyable(&self) -> bool { diff --git a/crates/libs/bindgen/src/types/mod.rs b/crates/libs/bindgen/src/types/mod.rs index 2eec9dba02..433a6476e6 100644 --- a/crates/libs/bindgen/src/types/mod.rs +++ b/crates/libs/bindgen/src/types/mod.rs @@ -795,14 +795,6 @@ impl Type { } } - pub fn is_handle(&self) -> bool { - if let Self::CppStruct(ty) = self { - ty.is_handle() - } else { - false - } - } - pub fn is_void(&self) -> bool { match self { Type::PtrConst(ty, _) | Type::PtrMut(ty, _) => ty.is_void(), diff --git a/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs b/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs index e2b0998738..de62dd3e5b 100644 --- a/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn VhfAsyncOperationComplete(vhfoperationhandle: *const core::ffi::c_void, completionstatus: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn VhfAsyncOperationComplete(vhfoperationhandle: *const core::ffi::c_void, completionstatus: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("vhfum.dll" "system" fn VhfAsyncOperationComplete(vhfoperationhandle : *const core::ffi::c_void, completionstatus : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - VhfAsyncOperationComplete(core::mem::transmute(vhfoperationhandle), completionstatus.param().abi()) + VhfAsyncOperationComplete(core::mem::transmute(vhfoperationhandle), core::mem::transmute(completionstatus)) } #[inline] pub unsafe fn VhfCreate(vhfconfig: *const VHF_CONFIG, vhfhandle: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { diff --git a/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs b/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs index fcebef4ba8..c85ecabdb3 100644 --- a/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs @@ -1,18 +1,12 @@ #[inline] -pub unsafe fn NtClose(handle: P0) -> super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtClose(handle: super::super::Win32::Foundation::HANDLE) -> super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtClose(handle : super::super::Win32::Foundation:: HANDLE) -> super::super::Win32::Foundation:: NTSTATUS); - NtClose(handle.param().abi()) + NtClose(core::mem::transmute(handle)) } #[inline] -pub unsafe fn NtQueryObject(handle: P0, objectinformationclass: OBJECT_INFORMATION_CLASS, objectinformation: Option<*mut core::ffi::c_void>, objectinformationlength: u32, returnlength: Option<*mut u32>) -> super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryObject(handle: Option, objectinformationclass: OBJECT_INFORMATION_CLASS, objectinformation: Option<*mut core::ffi::c_void>, objectinformationlength: u32, returnlength: Option<*mut u32>) -> super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(objectinformationclass), core::mem::transmute(objectinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objectinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + NtQueryObject(core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectinformationclass), core::mem::transmute(objectinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[repr(C)] #[cfg(all(feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] diff --git a/crates/libs/windows/src/Windows/Wdk/Graphics/Direct3D/mod.rs b/crates/libs/windows/src/Windows/Wdk/Graphics/Direct3D/mod.rs index b5656896c0..32e3c98811 100644 --- a/crates/libs/windows/src/Windows/Wdk/Graphics/Direct3D/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Graphics/Direct3D/mod.rs @@ -332,12 +332,9 @@ pub unsafe fn D3DKMTGetProcessDeviceRemovalSupport(param0: *mut D3DKMT_GETPROCES D3DKMTGetProcessDeviceRemovalSupport(core::mem::transmute(param0)) } #[inline] -pub unsafe fn D3DKMTGetProcessSchedulingPriorityClass(param0: P0, param1: *mut D3DKMT_SCHEDULINGPRIORITYCLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn D3DKMTGetProcessSchedulingPriorityClass(param0: super::super::super::Win32::Foundation::HANDLE, param1: *mut D3DKMT_SCHEDULINGPRIORITYCLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTGetProcessSchedulingPriorityClass(param0 : super::super::super::Win32::Foundation:: HANDLE, param1 : *mut D3DKMT_SCHEDULINGPRIORITYCLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - D3DKMTGetProcessSchedulingPriorityClass(param0.param().abi(), core::mem::transmute(param1)) + D3DKMTGetProcessSchedulingPriorityClass(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] pub unsafe fn D3DKMTGetResourcePresentPrivateDriverData(param0: *mut D3DDDI_GETRESOURCEPRESENTPRIVATEDRIVERDATA) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -643,12 +640,9 @@ pub unsafe fn D3DKMTReleaseKeyedMutex2(param0: *mut D3DKMT_RELEASEKEYEDMUTEX2) - D3DKMTReleaseKeyedMutex2(core::mem::transmute(param0)) } #[inline] -pub unsafe fn D3DKMTReleaseProcessVidPnSourceOwners(param0: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn D3DKMTReleaseProcessVidPnSourceOwners(param0: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTReleaseProcessVidPnSourceOwners(param0 : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - D3DKMTReleaseProcessVidPnSourceOwners(param0.param().abi()) + D3DKMTReleaseProcessVidPnSourceOwners(core::mem::transmute(param0)) } #[inline] pub unsafe fn D3DKMTRender(param0: *mut D3DKMT_RENDER) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -706,12 +700,9 @@ pub unsafe fn D3DKMTSetMonitorColorSpaceTransform(param0: *const D3DKMT_SET_COLO D3DKMTSetMonitorColorSpaceTransform(core::mem::transmute(param0)) } #[inline] -pub unsafe fn D3DKMTSetProcessSchedulingPriorityClass(param0: P0, param1: D3DKMT_SCHEDULINGPRIORITYCLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn D3DKMTSetProcessSchedulingPriorityClass(param0: super::super::super::Win32::Foundation::HANDLE, param1: D3DKMT_SCHEDULINGPRIORITYCLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("gdi32.dll" "system" fn D3DKMTSetProcessSchedulingPriorityClass(param0 : super::super::super::Win32::Foundation:: HANDLE, param1 : D3DKMT_SCHEDULINGPRIORITYCLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - D3DKMTSetProcessSchedulingPriorityClass(param0.param().abi(), core::mem::transmute(param1)) + D3DKMTSetProcessSchedulingPriorityClass(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] pub unsafe fn D3DKMTSetQueuedLimit(param0: *const D3DKMT_SETQUEUEDLIMIT) -> super::super::super::Win32::Foundation::NTSTATUS { 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 aaac0c8b10..14bd852797 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(core::mem::transmute(ndisvchandle), core::mem::transmute(ndispartyhandle.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + NdisClCloseCall(core::mem::transmute(ndisvchandle), core::mem::transmute(ndispartyhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } #[inline] pub unsafe fn NdisClDeregisterSap(ndissaphandle: *const core::ffi::c_void) -> i32 { @@ -40,9 +40,9 @@ pub unsafe fn NdisClDeregisterSap(ndissaphandle: *const core::ffi::c_void) -> i3 NdisClDeregisterSap(core::mem::transmute(ndissaphandle)) } #[inline] -pub unsafe fn NdisClDropParty(ndispartyhandle: *const core::ffi::c_void, buffer: Option<*const core::ffi::c_void>, size: u32) -> i32 { +pub unsafe fn NdisClDropParty(ndispartyhandle: *const core::ffi::c_void, buffer: Option<*const core::ffi::c_void>, size: Option) -> 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(core::mem::transmute(ndispartyhandle), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + NdisClDropParty(core::mem::transmute(ndispartyhandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(size.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(ndisvchandle), core::mem::transmute(callparameters), core::mem::transmute(protocolpartycontext.unwrap_or(core::ptr::null())), core::mem::transmute(ndispartyhandle.unwrap_or(core::ptr::null_mut()))) + NdisClMakeCall(core::mem::transmute(ndisvchandle), core::mem::transmute(callparameters), core::mem::transmute(protocolpartycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ndispartyhandle.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(status), core::mem::transmute(ndispartyhandle), core::mem::transmute(callmgrpartycontext.unwrap_or(core::ptr::null())), core::mem::transmute(callparameters)) + NdisCmAddPartyComplete(core::mem::transmute(status), core::mem::transmute(ndispartyhandle), core::mem::transmute(callmgrpartycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(status), core::mem::transmute(ndisvchandle), core::mem::transmute(ndispartyhandle.unwrap_or(core::ptr::null()))) + NdisCmCloseCallComplete(core::mem::transmute(status), core::mem::transmute(ndisvchandle), core::mem::transmute(ndispartyhandle.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(closestatus), core::mem::transmute(ndisvchandle), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + NdisCmDispatchIncomingCloseCall(core::mem::transmute(closestatus), core::mem::transmute(ndisvchandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dropstatus), core::mem::transmute(ndispartyhandle), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + NdisCmDispatchIncomingDropParty(core::mem::transmute(dropstatus), core::mem::transmute(ndispartyhandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(status), core::mem::transmute(ndisvchandle), core::mem::transmute(ndispartyhandle.unwrap_or(core::ptr::null())), core::mem::transmute(callmgrpartycontext.unwrap_or(core::ptr::null())), core::mem::transmute(callparameters)) + NdisCmMakeCallComplete(core::mem::transmute(status), core::mem::transmute(ndisvchandle), core::mem::transmute(ndispartyhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(callmgrpartycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(ndisvchandle), core::mem::transmute(baseinstancename), core::mem::transmute(vcinstancename.unwrap_or(core::ptr::null_mut()))) + NdisCoAssignInstanceName(core::mem::transmute(ndisvchandle), core::mem::transmute(baseinstancename), core::mem::transmute(vcinstancename.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(ndisbindinghandle), core::mem::transmute(ndisafhandle.unwrap_or(core::ptr::null())), core::mem::transmute(protocolvccontext), core::mem::transmute(ndisvchandle)) + NdisCoCreateVc(core::mem::transmute(ndisbindinghandle), core::mem::transmute(ndisafhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(protocolvccontext), core::mem::transmute(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(core::mem::transmute(driverhandle), core::mem::transmute(driverinstance), core::mem::transmute(devicecontext.unwrap_or(core::ptr::null()))) + NdisIMInitializeDeviceInstanceEx(core::mem::transmute(driverhandle), core::mem::transmute(driverinstance), core::mem::transmute(devicecontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(timer), core::mem::transmute(timerfunction), core::mem::transmute(functioncontext.unwrap_or(core::ptr::null()))) + NdisInitializeTimer(core::mem::transmute(timer), core::mem::transmute(timerfunction), core::mem::transmute(functioncontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NdisMAllocateSharedMemory(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: P2, 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(core::mem::transmute(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()))) + NdisMGetDeviceProperty(core::mem::transmute(miniportadapterhandle), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(functionaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(nextdeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(allocatedresources.unwrap_or(core::mem::zeroed())), core::mem::transmute(allocatedresourcestranslated.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(loghandle), core::mem::transmute(eventcode), core::mem::transmute(uniqueeventvalue), core::mem::transmute(numstrings), core::mem::transmute(stringslist.unwrap_or(core::ptr::null())), core::mem::transmute(datasize), core::mem::transmute(data.unwrap_or(core::ptr::null()))) + NdisWriteEventLogEntry(core::mem::transmute(loghandle), core::mem::transmute(eventcode), core::mem::transmute(uniqueeventvalue), core::mem::transmute(numstrings), core::mem::transmute(stringslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(datasize), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } 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 81caa38dd8..71fe5e8c67 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(core::mem::transmute(deviceobject), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(changehandle)) + FwpmBfeStateSubscribeChanges0(core::mem::transmute(deviceobject), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } #[inline] pub unsafe fn FwpmBfeStateUnsubscribeChanges0(changehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -17,147 +17,95 @@ pub unsafe fn FwpmBfeStateUnsubscribeChanges0(changehandle: super::super::super: } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmCalloutAdd0(enginehandle: P0, callout: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CALLOUT0, sd: P2, id: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmCalloutAdd0(enginehandle: super::super::super::Win32::Foundation::HANDLE, callout: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CALLOUT0, sd: Option, id: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(callout), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmCalloutAdd0(core::mem::transmute(enginehandle), core::mem::transmute(callout), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmCalloutCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmCalloutCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmCalloutDeleteById0(enginehandle: P0, id: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutDeleteById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + FwpmCalloutDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn FwpmCalloutDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutDeleteByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmCalloutDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmCalloutDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmCalloutDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmCalloutEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CALLOUT0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmCalloutEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CALLOUT0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_CALLOUT0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmCalloutEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmCalloutGetById0(enginehandle: P0, id: u32, callout: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CALLOUT0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutGetById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u32, callout: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CALLOUT0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutGetById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u32, callout : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_CALLOUT0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(callout)) + FwpmCalloutGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(callout)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmCalloutGetByKey0(enginehandle: P0, key: *const windows_core::GUID, callout: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CALLOUT0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutGetByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, callout: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CALLOUT0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutGetByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, callout : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_CALLOUT0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(callout)) + FwpmCalloutGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(callout)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmCalloutGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutGetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmCalloutGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmCalloutSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutSetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmCalloutSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmConnectionCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmConnectionCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: P0, enumhandle: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmConnectionDestroyEnumHandle0(enginehandle.param().abi(), enumhandle.param().abi()) + FwpmConnectionDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmConnectionEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CONNECTION0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmConnectionEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CONNECTION0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_CONNECTION0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmConnectionEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmConnectionEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmConnectionGetById0(enginehandle: P0, id: u64, connection: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CONNECTION0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionGetById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, connection: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_CONNECTION0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionGetById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, connection : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_CONNECTION0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmConnectionGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(connection)) + FwpmConnectionGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(connection)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmConnectionGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionGetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionGetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, 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); - FwpmConnectionGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmConnectionGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmConnectionSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionSetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + FwpmConnectionSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FwpmEngineClose0(enginehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -166,21 +114,15 @@ pub unsafe fn FwpmEngineClose0(enginehandle: super::super::super::Win32::Foundat } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmEngineGetOption0(enginehandle: P0, option: super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_ENGINE_OPTION, value: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWP_VALUE0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmEngineGetOption0(enginehandle: super::super::super::Win32::Foundation::HANDLE, option: super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_ENGINE_OPTION, value: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWP_VALUE0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineGetOption0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, option : super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_ENGINE_OPTION, value : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWP_VALUE0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmEngineGetOption0(enginehandle.param().abi(), core::mem::transmute(option), core::mem::transmute(value)) + FwpmEngineGetOption0(core::mem::transmute(enginehandle), core::mem::transmute(option), core::mem::transmute(value)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmEngineGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmEngineGetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineGetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, 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); - FwpmEngineGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmEngineGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security", feature = "Win32_System_Rpc"))] #[inline] @@ -189,114 +131,76 @@ 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(), core::mem::transmute(authnservice), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), core::mem::transmute(session.unwrap_or(core::ptr::null())), core::mem::transmute(enginehandle)) + FwpmEngineOpen0(servername.param().abi(), core::mem::transmute(authnservice), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(session.unwrap_or(core::mem::zeroed())), core::mem::transmute(enginehandle)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmEngineSetOption0(enginehandle: P0, option: super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_ENGINE_OPTION, newvalue: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWP_VALUE0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmEngineSetOption0(enginehandle: super::super::super::Win32::Foundation::HANDLE, option: super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_ENGINE_OPTION, newvalue: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWP_VALUE0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineSetOption0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, option : super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_ENGINE_OPTION, newvalue : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWP_VALUE0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmEngineSetOption0(enginehandle.param().abi(), core::mem::transmute(option), core::mem::transmute(newvalue)) + FwpmEngineSetOption0(core::mem::transmute(enginehandle), core::mem::transmute(option), core::mem::transmute(newvalue)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmEngineSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmEngineSetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + FwpmEngineSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmFilterAdd0(enginehandle: P0, filter: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER0, sd: P2, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmFilterAdd0(enginehandle: super::super::super::Win32::Foundation::HANDLE, filter: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER0, sd: Option, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(filter), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmFilterAdd0(core::mem::transmute(enginehandle), core::mem::transmute(filter), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmFilterCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmFilterCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmFilterDeleteById0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterDeleteById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + FwpmFilterDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn FwpmFilterDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterDeleteByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmFilterDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmFilterDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmFilterDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmFilterEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmFilterEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmFilterEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmFilterGetById0(enginehandle: P0, id: u64, filter: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterGetById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, filter: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterGetById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, filter : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(filter)) + FwpmFilterGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(filter)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmFilterGetByKey0(enginehandle: P0, key: *const windows_core::GUID, filter: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterGetByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, filter: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterGetByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, filter : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(filter)) + FwpmFilterGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(filter)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterGetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmFilterGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterSetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmFilterSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FwpmFreeMemory0(p: *mut *mut core::ffi::c_void) { @@ -305,1031 +209,660 @@ pub unsafe fn FwpmFreeMemory0(p: *mut *mut core::ffi::c_void) { } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmIPsecTunnelAdd0(enginehandle: P0, flags: u32, mainmodepolicy: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0>, tunnelpolicy: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0, filterconditions: &[super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER_CONDITION0], sd: P6) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelAdd0(enginehandle: super::super::super::Win32::Foundation::HANDLE, flags: u32, mainmodepolicy: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0>, tunnelpolicy: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0, filterconditions: &[super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER_CONDITION0], sd: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), sd.param().abi()) + FwpmIPsecTunnelAdd0(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmIPsecTunnelAdd1(enginehandle: P0, flags: u32, mainmodepolicy: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1>, tunnelpolicy: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1, filterconditions: &[super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: P7) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelAdd1(enginehandle: super::super::super::Win32::Foundation::HANDLE, flags: u32, mainmodepolicy: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1>, tunnelpolicy: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1, filterconditions: &[super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd1(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmIPsecTunnelAdd2(enginehandle: P0, flags: u32, mainmodepolicy: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2>, tunnelpolicy: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2, filterconditions: &[super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: P7) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelAdd2(enginehandle: super::super::super::Win32::Foundation::HANDLE, flags: u32, mainmodepolicy: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2>, tunnelpolicy: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2, filterconditions: &[super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd2(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmIPsecTunnelAdd3(enginehandle: P0, flags: u32, mainmodepolicy: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3>, tunnelpolicy: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3, filterconditions: &[super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: P7) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelAdd3(enginehandle: super::super::super::Win32::Foundation::HANDLE, flags: u32, mainmodepolicy: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3>, tunnelpolicy: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3, filterconditions: &[super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd3(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelDeleteByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmIPsecTunnelDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmIPsecTunnelDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmLayerCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmLayerCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmLayerDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmLayerDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmLayerDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmLayerEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_LAYER0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmLayerEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_LAYER0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_LAYER0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmLayerEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmLayerEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmLayerGetById0(enginehandle: P0, id: u16, layer: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_LAYER0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerGetById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u16, layer: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_LAYER0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerGetById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u16, layer : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_LAYER0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmLayerGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(layer)) + FwpmLayerGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(layer)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmLayerGetByKey0(enginehandle: P0, key: *const windows_core::GUID, layer: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_LAYER0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerGetByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, layer: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_LAYER0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerGetByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, layer : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_LAYER0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmLayerGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(layer)) + FwpmLayerGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(layer)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmLayerGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerGetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmLayerGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmLayerSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerSetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmLayerSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmNetEventCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmNetEventCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmNetEventDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmNetEventDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmNetEventEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_NET_EVENT0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmNetEventEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum1(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_NET_EVENT1, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmNetEventEnum2(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT2, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum2(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT2, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum2(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_NET_EVENT2, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventEnum2(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum2(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmNetEventEnum3(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT3, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum3(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT3, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum3(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_NET_EVENT3, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventEnum3(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum3(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmNetEventEnum4(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT4, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum4(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT4, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum4(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_NET_EVENT4, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventEnum4(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum4(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmNetEventEnum5(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT5, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum5(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_NET_EVENT5, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum5(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_NET_EVENT5, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventEnum5(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum5(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventsGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventsGetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventsGetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, 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); - FwpmNetEventsGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmNetEventsGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventsSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventsSetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + FwpmNetEventsSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderAdd0(enginehandle: P0, provider: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER0, sd: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderAdd0(enginehandle: super::super::super::Win32::Foundation::HANDLE, provider: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER0, sd: Option) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderAdd0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, provider : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER0, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderAdd0(enginehandle.param().abi(), core::mem::transmute(provider), sd.param().abi()) + FwpmProviderAdd0(core::mem::transmute(enginehandle), core::mem::transmute(provider), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextAdd0(enginehandle: P0, providercontext: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0, sd: P2, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextAdd0(enginehandle: super::super::super::Win32::Foundation::HANDLE, providercontext: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0, sd: Option, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(providercontext), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmProviderContextAdd0(core::mem::transmute(enginehandle), core::mem::transmute(providercontext), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextAdd1(enginehandle: P0, providercontext: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1, sd: P2, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextAdd1(enginehandle: super::super::super::Win32::Foundation::HANDLE, providercontext: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1, sd: Option, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(providercontext), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmProviderContextAdd1(core::mem::transmute(enginehandle), core::mem::transmute(providercontext), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextAdd2(enginehandle: P0, providercontext: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2, sd: P2, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextAdd2(enginehandle: super::super::super::Win32::Foundation::HANDLE, providercontext: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2, sd: Option, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(providercontext), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmProviderContextAdd2(core::mem::transmute(enginehandle), core::mem::transmute(providercontext), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextAdd3(enginehandle: P0, providercontext: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3, sd: P2, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextAdd3(enginehandle: super::super::super::Win32::Foundation::HANDLE, providercontext: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3, sd: Option, id: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(providercontext), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmProviderContextAdd3(core::mem::transmute(enginehandle), core::mem::transmute(providercontext), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmProviderContextCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmProviderContextCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmProviderContextDeleteById0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextDeleteById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + FwpmProviderContextDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn FwpmProviderContextDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextDeleteByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmProviderContextDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmProviderContextDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmProviderContextDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderContextEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextEnum1(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextEnum1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT1, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderContextEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextEnum2(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextEnum2(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextEnum2(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT2, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextEnum2(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderContextEnum2(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextEnum3(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextEnum3(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextEnum3(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT3, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextEnum3(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderContextEnum3(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextGetById0(enginehandle: P0, id: u64, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, providercontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(providercontext)) + FwpmProviderContextGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(providercontext)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextGetById1(enginehandle: P0, id: u64, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetById1(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetById1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, providercontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT1) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetById1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(providercontext)) + FwpmProviderContextGetById1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(providercontext)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextGetById2(enginehandle: P0, id: u64, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetById2(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetById2(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, providercontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT2) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetById2(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(providercontext)) + FwpmProviderContextGetById2(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(providercontext)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextGetById3(enginehandle: P0, id: u64, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetById3(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetById3(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, providercontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT3) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetById3(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(providercontext)) + FwpmProviderContextGetById3(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(providercontext)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextGetByKey0(enginehandle: P0, key: *const windows_core::GUID, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, providercontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(providercontext)) + FwpmProviderContextGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(providercontext)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextGetByKey1(enginehandle: P0, key: *const windows_core::GUID, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetByKey1(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT1) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetByKey1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, providercontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT1) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetByKey1(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(providercontext)) + FwpmProviderContextGetByKey1(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(providercontext)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextGetByKey2(enginehandle: P0, key: *const windows_core::GUID, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetByKey2(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT2) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetByKey2(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, providercontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT2) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetByKey2(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(providercontext)) + FwpmProviderContextGetByKey2(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(providercontext)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmProviderContextGetByKey3(enginehandle: P0, key: *const windows_core::GUID, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetByKey3(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, providercontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER_CONTEXT3) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetByKey3(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, providercontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT3) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetByKey3(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(providercontext)) + FwpmProviderContextGetByKey3(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmProviderContextGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextSetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmProviderContextSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmProviderCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmProviderCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderDeleteByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmProviderDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmProviderDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmProviderDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmProviderEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmProviderGetByKey0(enginehandle: P0, key: *const windows_core::GUID, provider: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderGetByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, provider: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_PROVIDER0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderGetByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, provider : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(provider)) + FwpmProviderGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(provider)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderGetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmProviderGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderSetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmProviderSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmSessionCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSessionCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmSessionCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmSessionDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSessionDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSessionDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSessionDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmSessionDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmSessionEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_SESSION0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmSessionEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_SESSION0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSessionEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_SESSION0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSessionEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmSessionEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn FwpmSubLayerAdd0(enginehandle: P0, sublayer: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_SUBLAYER0, sd: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerAdd0(enginehandle: super::super::super::Win32::Foundation::HANDLE, sublayer: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_SUBLAYER0, sd: Option) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerAdd0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, sublayer : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_SUBLAYER0, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSubLayerAdd0(enginehandle.param().abi(), core::mem::transmute(sublayer), sd.param().abi()) + FwpmSubLayerAdd0(core::mem::transmute(enginehandle), core::mem::transmute(sublayer), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmSubLayerCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmSubLayerCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerDeleteByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSubLayerDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmSubLayerDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmSubLayerDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSubLayerDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmSubLayerDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmSubLayerEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_SUBLAYER0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_SUBLAYER0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_SUBLAYER0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSubLayerEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmSubLayerEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn FwpmSubLayerGetByKey0(enginehandle: P0, key: *const windows_core::GUID, sublayer: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_SUBLAYER0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerGetByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: *const windows_core::GUID, sublayer: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::FWPM_SUBLAYER0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerGetByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, sublayer : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_SUBLAYER0) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSubLayerGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(sublayer)) + FwpmSubLayerGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(sublayer)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmSubLayerGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerGetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmSubLayerGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmSubLayerSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerSetSecurityInfoByKey0(enginehandle: super::super::super::Win32::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmSubLayerSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FwpmTransactionAbort0(enginehandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmTransactionAbort0(enginehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmTransactionAbort0(enginehandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmTransactionAbort0(enginehandle.param().abi()) + FwpmTransactionAbort0(core::mem::transmute(enginehandle)) } #[inline] -pub unsafe fn FwpmTransactionBegin0(enginehandle: P0, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmTransactionBegin0(enginehandle: super::super::super::Win32::Foundation::HANDLE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmTransactionBegin0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmTransactionBegin0(enginehandle.param().abi(), core::mem::transmute(flags)) + FwpmTransactionBegin0(core::mem::transmute(enginehandle), core::mem::transmute(flags)) } #[inline] -pub unsafe fn FwpmTransactionCommit0(enginehandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmTransactionCommit0(enginehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmTransactionCommit0(enginehandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmTransactionCommit0(enginehandle.param().abi()) + FwpmTransactionCommit0(core::mem::transmute(enginehandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmvSwitchEventsGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmvSwitchEventsGetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmvSwitchEventsGetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, 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); - FwpmvSwitchEventsGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmvSwitchEventsGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmvSwitchEventsSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmvSwitchEventsSetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + FwpmvSwitchEventsSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecDospGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospGetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospGetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, 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); - IPsecDospGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + IPsecDospGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecDospGetStatistics0(enginehandle: P0, idpstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_DOSP_STATISTICS0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospGetStatistics0(enginehandle: super::super::super::Win32::Foundation::HANDLE, idpstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_DOSP_STATISTICS0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospGetStatistics0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, idpstatistics : *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_DOSP_STATISTICS0) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecDospGetStatistics0(enginehandle.param().abi(), core::mem::transmute(idpstatistics)) + IPsecDospGetStatistics0(core::mem::transmute(enginehandle), core::mem::transmute(idpstatistics)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecDospSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospSetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + IPsecDospSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecDospStateCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospStateCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + IPsecDospStateCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn IPsecDospStateDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospStateDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospStateDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecDospStateDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + IPsecDospStateDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecDospStateEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_DOSP_STATE0, numentries: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecDospStateEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_DOSP_STATE0, numentries: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospStateEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_DOSP_STATE0, numentries : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecDospStateEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentries)) + IPsecDospStateEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecGetStatistics0(enginehandle: P0, ipsecstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_STATISTICS0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecGetStatistics0(enginehandle: super::super::super::Win32::Foundation::HANDLE, ipsecstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_STATISTICS0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecGetStatistics0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, ipsecstatistics : *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_STATISTICS0) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecGetStatistics0(enginehandle.param().abi(), core::mem::transmute(ipsecstatistics)) + IPsecGetStatistics0(core::mem::transmute(enginehandle), core::mem::transmute(ipsecstatistics)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecGetStatistics1(enginehandle: P0, ipsecstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_STATISTICS1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecGetStatistics1(enginehandle: super::super::super::Win32::Foundation::HANDLE, ipsecstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_STATISTICS1) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecGetStatistics1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, ipsecstatistics : *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_STATISTICS1) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecGetStatistics1(enginehandle.param().abi(), core::mem::transmute(ipsecstatistics)) + IPsecGetStatistics1(core::mem::transmute(enginehandle), core::mem::transmute(ipsecstatistics)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextAddInbound0(enginehandle: P0, id: u64, inboundbundle: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_BUNDLE0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextAddInbound0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, inboundbundle: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_BUNDLE0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextAddInbound0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, inboundbundle : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_BUNDLE0) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextAddInbound0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(inboundbundle)) + IPsecSaContextAddInbound0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(inboundbundle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextAddInbound1(enginehandle: P0, id: u64, inboundbundle: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_BUNDLE1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextAddInbound1(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, inboundbundle: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_BUNDLE1) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextAddInbound1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, inboundbundle : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_BUNDLE1) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextAddInbound1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(inboundbundle)) + IPsecSaContextAddInbound1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(inboundbundle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextAddOutbound0(enginehandle: P0, id: u64, outboundbundle: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_BUNDLE0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextAddOutbound0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, outboundbundle: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_BUNDLE0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextAddOutbound0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, outboundbundle : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_BUNDLE0) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextAddOutbound0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(outboundbundle)) + IPsecSaContextAddOutbound0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(outboundbundle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextAddOutbound1(enginehandle: P0, id: u64, outboundbundle: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_BUNDLE1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextAddOutbound1(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, outboundbundle: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_BUNDLE1) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextAddOutbound1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, outboundbundle : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_BUNDLE1) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextAddOutbound1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(outboundbundle)) + IPsecSaContextAddOutbound1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(outboundbundle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextCreate0(enginehandle: P0, outboundtraffic: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_TRAFFIC0, inboundfilterid: Option<*mut u64>, id: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextCreate0(enginehandle: super::super::super::Win32::Foundation::HANDLE, outboundtraffic: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_TRAFFIC0, inboundfilterid: Option<*mut u64>, id: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(outboundtraffic), core::mem::transmute(inboundfilterid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(id)) + IPsecSaContextCreate0(core::mem::transmute(enginehandle), core::mem::transmute(outboundtraffic), core::mem::transmute(inboundfilterid.unwrap_or(core::mem::zeroed())), core::mem::transmute(id)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextCreate1(enginehandle: P0, outboundtraffic: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_TRAFFIC1, virtualiftunnelinfo: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_VIRTUAL_IF_TUNNEL_INFO0>, inboundfilterid: Option<*mut u64>, id: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextCreate1(enginehandle: super::super::super::Win32::Foundation::HANDLE, outboundtraffic: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_TRAFFIC1, virtualiftunnelinfo: Option<*const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_VIRTUAL_IF_TUNNEL_INFO0>, inboundfilterid: Option<*mut u64>, id: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(outboundtraffic), core::mem::transmute(virtualiftunnelinfo.unwrap_or(core::ptr::null())), core::mem::transmute(inboundfilterid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(id)) + IPsecSaContextCreate1(core::mem::transmute(enginehandle), core::mem::transmute(outboundtraffic), core::mem::transmute(virtualiftunnelinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(inboundfilterid.unwrap_or(core::mem::zeroed())), core::mem::transmute(id)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IPsecSaContextCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + IPsecSaContextCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn IPsecSaContextDeleteById0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextDeleteById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + IPsecSaContextDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn IPsecSaContextDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + IPsecSaContextDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IPsecSaContextEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecSaContextEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_CONTEXT0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IPsecSaContextEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IPsecSaContextEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecSaContextEnum1(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextEnum1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_CONTEXT1, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IPsecSaContextEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn IPsecSaContextExpire0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextExpire0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextExpire0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextExpire0(enginehandle.param().abi(), core::mem::transmute(id)) + IPsecSaContextExpire0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IPsecSaContextGetById0(enginehandle: P0, id: u64, sacontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextGetById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, sacontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextGetById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, sacontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_CONTEXT0) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(sacontext)) + IPsecSaContextGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(sacontext)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IPsecSaContextGetById1(enginehandle: P0, id: u64, sacontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextGetById1(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, sacontext: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT1) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextGetById1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, sacontext : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_CONTEXT1) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextGetById1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(sacontext)) + IPsecSaContextGetById1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(sacontext)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextGetSpi0(enginehandle: P0, id: u64, getspi: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_GETSPI0, inboundspi: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextGetSpi0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, getspi: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_GETSPI0, inboundspi: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextGetSpi0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, getspi : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_GETSPI0, inboundspi : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextGetSpi0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) + IPsecSaContextGetSpi0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextGetSpi1(enginehandle: P0, id: u64, getspi: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_GETSPI1, inboundspi: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextGetSpi1(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, getspi: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_GETSPI1, inboundspi: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextGetSpi1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, getspi : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_GETSPI1, inboundspi : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextGetSpi1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) + IPsecSaContextGetSpi1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaContextSetSpi0(enginehandle: P0, id: u64, getspi: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_GETSPI1, inboundspi: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextSetSpi0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, getspi: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_GETSPI1, inboundspi: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextSetSpi0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, getspi : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_GETSPI1, inboundspi : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextSetSpi0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) + IPsecSaContextSetSpi0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IPsecSaContextUpdate0(enginehandle: P0, flags: u64, newvalues: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextUpdate0(enginehandle: super::super::super::Win32::Foundation::HANDLE, flags: u64, newvalues: *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_CONTEXT1) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextUpdate0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u64, newvalues : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_CONTEXT1) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextUpdate0(enginehandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(newvalues)) + IPsecSaContextUpdate0(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(newvalues)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IPsecSaCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + IPsecSaCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaDbGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaDbGetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaDbGetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, 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); - IPsecSaDbGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + IPsecSaDbGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaDbSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaDbSetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + IPsecSaDbSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IPsecSaDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + IPsecSaDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IPsecSaEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_DETAILS0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecSaEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_DETAILS0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_DETAILS0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IPsecSaEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IPsecSaEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_DETAILS1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecSaEnum1(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IPSEC_SA_DETAILS1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaEnum1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_DETAILS1, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IPsecSaEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IkeextGetStatistics0(enginehandle: P0, ikeextstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_STATISTICS0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextGetStatistics0(enginehandle: super::super::super::Win32::Foundation::HANDLE, ikeextstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_STATISTICS0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextGetStatistics0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, ikeextstatistics : *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_STATISTICS0) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextGetStatistics0(enginehandle.param().abi(), core::mem::transmute(ikeextstatistics)) + IkeextGetStatistics0(core::mem::transmute(enginehandle), core::mem::transmute(ikeextstatistics)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IkeextGetStatistics1(enginehandle: P0, ikeextstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_STATISTICS1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextGetStatistics1(enginehandle: super::super::super::Win32::Foundation::HANDLE, ikeextstatistics: *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_STATISTICS1) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextGetStatistics1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, ikeextstatistics : *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_STATISTICS1) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextGetStatistics1(enginehandle.param().abi(), core::mem::transmute(ikeextstatistics)) + IkeextGetStatistics1(core::mem::transmute(enginehandle), core::mem::transmute(ikeextstatistics)) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] -pub unsafe fn IkeextSaCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaCreateEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumtemplate: Option<*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 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + IkeextSaCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IkeextSaDbGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaDbGetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaDbGetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, 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); - IkeextSaDbGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + IkeextSaDbGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IkeextSaDbSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaDbSetSecurityInfo0(enginehandle: super::super::super::Win32::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::super::Win32::Security::SID>, sidgroup: Option<*const super::super::super::Win32::Security::SID>, dacl: Option<*const super::super::super::Win32::Security::ACL>, sacl: Option<*const super::super::super::Win32::Security::ACL>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + IkeextSaDbSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IkeextSaDeleteById0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaDeleteById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaDeleteById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + IkeextSaDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn IkeextSaDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaDestroyEnumHandle0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaDestroyEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + IkeextSaDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IkeextSaEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IkeextSaEnum0(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS0, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaEnum0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_SA_DETAILS0, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IkeextSaEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IkeextSaEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IkeextSaEnum1(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS1, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaEnum1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_SA_DETAILS1, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IkeextSaEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IkeextSaEnum2(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS2, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IkeextSaEnum2(enginehandle: super::super::super::Win32::Foundation::HANDLE, enumhandle: super::super::super::Win32::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS2, numentriesreturned: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaEnum2(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumhandle : super::super::super::Win32::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_SA_DETAILS2, numentriesreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaEnum2(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IkeextSaEnum2(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IkeextSaGetById0(enginehandle: P0, id: u64, sa: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaGetById0(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, sa: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS0) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaGetById0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, sa : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_SA_DETAILS0) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(sa)) + IkeextSaGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(sa)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IkeextSaGetById1(enginehandle: P0, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaGetById1(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS1) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(id), core::mem::transmute(salookupcontext.unwrap_or(core::ptr::null())), core::mem::transmute(sa)) + IkeextSaGetById1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(salookupcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(sa)) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] -pub unsafe fn IkeextSaGetById2(enginehandle: P0, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaGetById2(enginehandle: super::super::super::Win32::Foundation::HANDLE, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform::IKEEXT_SA_DETAILS2) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(id), core::mem::transmute(salookupcontext.unwrap_or(core::ptr::null())), core::mem::transmute(sa)) + IkeextSaGetById2(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(salookupcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 d0800a4e6a..65ca4057fc 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 @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn FltAcknowledgeEcp(filter: P0, ecpcontext: *const core::ffi::c_void) -where - P0: windows_core::Param, -{ +pub unsafe fn FltAcknowledgeEcp(filter: PFLT_FILTER, ecpcontext: *const core::ffi::c_void) { windows_targets::link!("fltmgr.sys" "system" fn FltAcknowledgeEcp(filter : PFLT_FILTER, ecpcontext : *const core::ffi::c_void)); - FltAcknowledgeEcp(filter.param().abi(), core::mem::transmute(ecpcontext)) + FltAcknowledgeEcp(core::mem::transmute(filter), core::mem::transmute(ecpcontext)) } #[inline] pub unsafe fn FltAcquirePushLockExclusive(pushlock: *mut usize) { @@ -40,48 +37,32 @@ pub unsafe fn FltAcquireResourceShared(resource: *mut super::super::super::Found } #[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 FltAddOpenReparseEntry(filter: P0, data: *const FLT_CALLBACK_DATA, openreparseentry: *const super::OPEN_REPARSE_LIST_ENTRY) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltAddOpenReparseEntry(filter: PFLT_FILTER, data: *const FLT_CALLBACK_DATA, openreparseentry: *const super::OPEN_REPARSE_LIST_ENTRY) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltAddOpenReparseEntry(filter : PFLT_FILTER, data : *const FLT_CALLBACK_DATA, openreparseentry : *const super:: OPEN_REPARSE_LIST_ENTRY) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAddOpenReparseEntry(filter.param().abi(), core::mem::transmute(data), core::mem::transmute(openreparseentry)) + FltAddOpenReparseEntry(core::mem::transmute(filter), core::mem::transmute(data), core::mem::transmute(openreparseentry)) } #[inline] -pub unsafe fn FltAdjustDeviceStackSizeForIoRedirection(sourceinstance: P0, targetinstance: P1, sourcedevicestacksizemodified: Option<*mut super::super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltAdjustDeviceStackSizeForIoRedirection(sourceinstance: PFLT_INSTANCE, targetinstance: PFLT_INSTANCE, sourcedevicestacksizemodified: Option<*mut super::super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut()))) + FltAdjustDeviceStackSizeForIoRedirection(core::mem::transmute(sourceinstance), core::mem::transmute(targetinstance), core::mem::transmute(sourcedevicestacksizemodified.unwrap_or(core::mem::zeroed()))) } #[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 FltAllocateCallbackData(instance: P0, fileobject: Option<*const super::super::super::Foundation::FILE_OBJECT>, retnewcallbackdata: *mut *mut FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltAllocateCallbackData(instance: PFLT_INSTANCE, fileobject: Option<*const super::super::super::Foundation::FILE_OBJECT>, retnewcallbackdata: *mut *mut FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(retnewcallbackdata)) + FltAllocateCallbackData(core::mem::transmute(instance), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] -pub unsafe fn FltAllocateCallbackDataEx(instance: P0, fileobject: Option<*const super::super::super::Foundation::FILE_OBJECT>, flags: u32, retnewcallbackdata: *mut *mut FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltAllocateCallbackDataEx(instance: PFLT_INSTANCE, fileobject: Option<*const super::super::super::Foundation::FILE_OBJECT>, flags: u32, retnewcallbackdata: *mut *mut FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(retnewcallbackdata)) + FltAllocateCallbackDataEx(core::mem::transmute(instance), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(retnewcallbackdata)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltAllocateContext(filter: P0, contexttype: u16, contextsize: usize, pooltype: super::super::super::Foundation::POOL_TYPE, returnedcontext: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltAllocateContext(filter: PFLT_FILTER, contexttype: u16, contextsize: usize, pooltype: super::super::super::Foundation::POOL_TYPE, returnedcontext: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltAllocateContext(filter : PFLT_FILTER, contexttype : u16, contextsize : usize, pooltype : super::super::super::Foundation:: POOL_TYPE, returnedcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAllocateContext(filter.param().abi(), core::mem::transmute(contexttype), core::mem::transmute(contextsize), core::mem::transmute(pooltype), core::mem::transmute(returnedcontext)) + FltAllocateContext(core::mem::transmute(filter), core::mem::transmute(contexttype), core::mem::transmute(contextsize), core::mem::transmute(pooltype), core::mem::transmute(returnedcontext)) } #[inline] pub unsafe fn FltAllocateDeferredIoWorkItem() -> PFLT_DEFERRED_IO_WORKITEM { @@ -89,35 +70,26 @@ pub unsafe fn FltAllocateDeferredIoWorkItem() -> PFLT_DEFERRED_IO_WORKITEM { FltAllocateDeferredIoWorkItem() } #[inline] -pub unsafe fn FltAllocateExtraCreateParameter(filter: P0, ecptype: *const windows_core::GUID, sizeofcontext: u32, flags: u32, cleanupcallback: super::PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, pooltag: u32, ecpcontext: *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltAllocateExtraCreateParameter(filter: PFLT_FILTER, ecptype: *const windows_core::GUID, sizeofcontext: u32, flags: u32, cleanupcallback: Option, pooltag: u32, ecpcontext: *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltAllocateExtraCreateParameter(filter : PFLT_FILTER, ecptype : *const windows_core::GUID, sizeofcontext : u32, flags : u32, cleanupcallback : super:: PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, pooltag : u32, ecpcontext : *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAllocateExtraCreateParameter(filter.param().abi(), core::mem::transmute(ecptype), core::mem::transmute(sizeofcontext), core::mem::transmute(flags), core::mem::transmute(cleanupcallback), core::mem::transmute(pooltag), core::mem::transmute(ecpcontext)) + FltAllocateExtraCreateParameter(core::mem::transmute(filter), core::mem::transmute(ecptype), core::mem::transmute(sizeofcontext), core::mem::transmute(flags), core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pooltag), core::mem::transmute(ecpcontext)) } #[inline] -pub unsafe fn FltAllocateExtraCreateParameterFromLookasideList(filter: P0, ecptype: *const windows_core::GUID, sizeofcontext: u32, flags: u32, cleanupcallback: super::PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, lookasidelist: *mut core::ffi::c_void, ecpcontext: *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltAllocateExtraCreateParameterFromLookasideList(filter: PFLT_FILTER, ecptype: *const windows_core::GUID, sizeofcontext: u32, flags: u32, cleanupcallback: Option, lookasidelist: *mut core::ffi::c_void, ecpcontext: *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltAllocateExtraCreateParameterFromLookasideList(filter : PFLT_FILTER, ecptype : *const windows_core::GUID, sizeofcontext : u32, flags : u32, cleanupcallback : super:: PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, lookasidelist : *mut core::ffi::c_void, ecpcontext : *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAllocateExtraCreateParameterFromLookasideList(filter.param().abi(), core::mem::transmute(ecptype), core::mem::transmute(sizeofcontext), core::mem::transmute(flags), core::mem::transmute(cleanupcallback), core::mem::transmute(lookasidelist), core::mem::transmute(ecpcontext)) + FltAllocateExtraCreateParameterFromLookasideList(core::mem::transmute(filter), core::mem::transmute(ecptype), core::mem::transmute(sizeofcontext), core::mem::transmute(flags), core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(lookasidelist), core::mem::transmute(ecpcontext)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltAllocateExtraCreateParameterList(filter: P0, flags: u32, ecplist: *mut *mut super::super::super::Foundation::ECP_LIST) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltAllocateExtraCreateParameterList(filter: PFLT_FILTER, flags: u32, ecplist: *mut *mut super::super::super::Foundation::ECP_LIST) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltAllocateExtraCreateParameterList(filter : PFLT_FILTER, flags : u32, ecplist : *mut *mut super::super::super::Foundation:: ECP_LIST) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAllocateExtraCreateParameterList(filter.param().abi(), core::mem::transmute(flags), core::mem::transmute(ecplist)) + FltAllocateExtraCreateParameterList(core::mem::transmute(filter), core::mem::transmute(flags), core::mem::transmute(ecplist)) } #[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 FltAllocateFileLock(completelockcallbackdataroutine: PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE, unlockroutine: super::PUNLOCK_ROUTINE) -> *mut super::FILE_LOCK { +pub unsafe fn FltAllocateFileLock(completelockcallbackdataroutine: Option, unlockroutine: Option) -> *mut super::FILE_LOCK { windows_targets::link!("fltmgr.sys" "system" fn FltAllocateFileLock(completelockcallbackdataroutine : PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE, unlockroutine : super:: PUNLOCK_ROUTINE) -> *mut super:: FILE_LOCK); - FltAllocateFileLock(core::mem::transmute(completelockcallbackdataroutine), core::mem::transmute(unlockroutine)) + FltAllocateFileLock(core::mem::transmute(completelockcallbackdataroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(unlockroutine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FltAllocateGenericWorkItem() -> PFLT_GENERIC_WORKITEM { @@ -126,39 +98,25 @@ pub unsafe fn FltAllocateGenericWorkItem() -> PFLT_GENERIC_WORKITEM { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltAllocatePoolAlignedWithTag(instance: P0, pooltype: super::super::super::Foundation::POOL_TYPE, numberofbytes: usize, tag: u32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn FltAllocatePoolAlignedWithTag(instance: PFLT_INSTANCE, pooltype: super::super::super::Foundation::POOL_TYPE, numberofbytes: usize, tag: u32) -> *mut core::ffi::c_void { windows_targets::link!("fltmgr.sys" "system" fn FltAllocatePoolAlignedWithTag(instance : PFLT_INSTANCE, pooltype : super::super::super::Foundation:: POOL_TYPE, numberofbytes : usize, tag : u32) -> *mut core::ffi::c_void); - FltAllocatePoolAlignedWithTag(instance.param().abi(), core::mem::transmute(pooltype), core::mem::transmute(numberofbytes), core::mem::transmute(tag)) + FltAllocatePoolAlignedWithTag(core::mem::transmute(instance), core::mem::transmute(pooltype), core::mem::transmute(numberofbytes), core::mem::transmute(tag)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltApplyPriorityInfoThread(inputpriorityinfo: *const super::IO_PRIORITY_INFO, outputpriorityinfo: Option<*mut super::IO_PRIORITY_INFO>, thread: P2) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn FltApplyPriorityInfoThread(inputpriorityinfo: *const super::IO_PRIORITY_INFO, outputpriorityinfo: Option<*mut super::IO_PRIORITY_INFO>, thread: super::super::super::Foundation::PETHREAD) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(inputpriorityinfo), core::mem::transmute(outputpriorityinfo.unwrap_or(core::ptr::null_mut())), thread.param().abi()) + FltApplyPriorityInfoThread(core::mem::transmute(inputpriorityinfo), core::mem::transmute(outputpriorityinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(thread)) } #[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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltAttachVolume(filter: PFLT_FILTER, volume: PFLT_VOLUME, instancename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, retinstance: Option<*mut PFLT_INSTANCE>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(retinstance.unwrap_or(core::ptr::null_mut()))) + FltAttachVolume(core::mem::transmute(filter), core::mem::transmute(volume), core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(retinstance.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltAttachVolumeAtAltitude(filter: PFLT_FILTER, volume: PFLT_VOLUME, 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 { 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(), core::mem::transmute(altitude), core::mem::transmute(instancename.unwrap_or(core::ptr::null())), core::mem::transmute(retinstance.unwrap_or(core::ptr::null_mut()))) + FltAttachVolumeAtAltitude(core::mem::transmute(filter), core::mem::transmute(volume), core::mem::transmute(altitude), core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(retinstance.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -168,12 +126,9 @@ pub unsafe fn FltBuildDefaultSecurityDescriptor(securitydescriptor: *mut super:: } #[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 FltCancelFileOpen(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT) -where - P0: windows_core::Param, -{ +pub unsafe fn FltCancelFileOpen(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT) { windows_targets::link!("fltmgr.sys" "system" fn FltCancelFileOpen(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT)); - FltCancelFileOpen(instance.param().abi(), core::mem::transmute(fileobject)) + FltCancelFileOpen(core::mem::transmute(instance), core::mem::transmute(fileobject)) } #[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] @@ -185,13 +140,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()), core::mem::transmute(waittype), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(waitblockarray.unwrap_or(core::ptr::null())), core::mem::transmute(callbackdata)) + FltCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), core::mem::transmute(waittype), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitblockarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(object), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(callbackdata.unwrap_or(core::ptr::null()))) + FltCancellableWaitForSingleObject(core::mem::transmute(object), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackdata.unwrap_or(core::mem::zeroed()))) } #[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] @@ -207,18 +162,15 @@ pub unsafe fn FltCbdqEnable(cbdq: *mut FLT_CALLBACK_DATA_QUEUE) { } #[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 FltCbdqInitialize(instance: P0, cbdq: *mut FLT_CALLBACK_DATA_QUEUE, cbdqinsertio: PFLT_CALLBACK_DATA_QUEUE_INSERT_IO, cbdqremoveio: PFLT_CALLBACK_DATA_QUEUE_REMOVE_IO, cbdqpeeknextio: PFLT_CALLBACK_DATA_QUEUE_PEEK_NEXT_IO, cbdqacquire: PFLT_CALLBACK_DATA_QUEUE_ACQUIRE, cbdqrelease: PFLT_CALLBACK_DATA_QUEUE_RELEASE, cbdqcompletecanceledio: PFLT_CALLBACK_DATA_QUEUE_COMPLETE_CANCELED_IO) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltCbdqInitialize(instance: PFLT_INSTANCE, cbdq: *mut FLT_CALLBACK_DATA_QUEUE, cbdqinsertio: PFLT_CALLBACK_DATA_QUEUE_INSERT_IO, cbdqremoveio: PFLT_CALLBACK_DATA_QUEUE_REMOVE_IO, cbdqpeeknextio: PFLT_CALLBACK_DATA_QUEUE_PEEK_NEXT_IO, cbdqacquire: PFLT_CALLBACK_DATA_QUEUE_ACQUIRE, cbdqrelease: PFLT_CALLBACK_DATA_QUEUE_RELEASE, cbdqcompletecanceledio: PFLT_CALLBACK_DATA_QUEUE_COMPLETE_CANCELED_IO) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCbdqInitialize(instance : PFLT_INSTANCE, cbdq : *mut FLT_CALLBACK_DATA_QUEUE, cbdqinsertio : PFLT_CALLBACK_DATA_QUEUE_INSERT_IO, cbdqremoveio : PFLT_CALLBACK_DATA_QUEUE_REMOVE_IO, cbdqpeeknextio : PFLT_CALLBACK_DATA_QUEUE_PEEK_NEXT_IO, cbdqacquire : PFLT_CALLBACK_DATA_QUEUE_ACQUIRE, cbdqrelease : PFLT_CALLBACK_DATA_QUEUE_RELEASE, cbdqcompletecanceledio : PFLT_CALLBACK_DATA_QUEUE_COMPLETE_CANCELED_IO) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCbdqInitialize(instance.param().abi(), core::mem::transmute(cbdq), core::mem::transmute(cbdqinsertio), core::mem::transmute(cbdqremoveio), core::mem::transmute(cbdqpeeknextio), core::mem::transmute(cbdqacquire), core::mem::transmute(cbdqrelease), core::mem::transmute(cbdqcompletecanceledio)) + FltCbdqInitialize(core::mem::transmute(instance), core::mem::transmute(cbdq), core::mem::transmute(cbdqinsertio), core::mem::transmute(cbdqremoveio), core::mem::transmute(cbdqpeeknextio), core::mem::transmute(cbdqacquire), core::mem::transmute(cbdqrelease), core::mem::transmute(cbdqcompletecanceledio)) } #[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 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(core::mem::transmute(cbdq), core::mem::transmute(cbd), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(insertcontext.unwrap_or(core::ptr::null()))) + FltCbdqInsertIo(core::mem::transmute(cbdq), core::mem::transmute(cbd), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(insertcontext.unwrap_or(core::mem::zeroed()))) } #[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 +182,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(core::mem::transmute(cbdq), core::mem::transmute(peekcontext.unwrap_or(core::ptr::null()))) + FltCbdqRemoveNextIo(core::mem::transmute(cbdq), core::mem::transmute(peekcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FltCheckAndGrowNameControl(namectrl: *mut FLT_NAME_CONTROL, newsize: u16) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -251,15 +203,15 @@ pub unsafe fn FltCheckLockForWriteAccess(filelock: *const super::FILE_LOCK, call } #[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 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 { +pub unsafe fn FltCheckOplock(oplock: *const *const core::ffi::c_void, callbackdata: *const FLT_CALLBACK_DATA, context: Option<*const core::ffi::c_void>, waitcompletionroutine: Option, prepostcallbackdataroutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(waitcompletionroutine), core::mem::transmute(prepostcallbackdataroutine)) + FltCheckOplock(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitcompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, prepostcallbackdataroutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(waitcompletionroutine), core::mem::transmute(prepostcallbackdataroutine)) + FltCheckOplockEx(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitcompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()))) } #[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] @@ -274,65 +226,41 @@ pub unsafe fn FltClearCancelCompletion(callbackdata: *const FLT_CALLBACK_DATA) - FltClearCancelCompletion(core::mem::transmute(callbackdata)) } #[inline] -pub unsafe fn FltClose(filehandle: P0) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltClose(filehandle: super::super::super::super::Win32::Foundation::HANDLE) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltClose(filehandle : super::super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltClose(filehandle.param().abi()) + FltClose(core::mem::transmute(filehandle)) } #[inline] -pub unsafe fn FltCloseClientPort(filter: P0, clientport: *mut PFLT_PORT) -where - P0: windows_core::Param, -{ +pub unsafe fn FltCloseClientPort(filter: PFLT_FILTER, clientport: *mut PFLT_PORT) { windows_targets::link!("fltmgr.sys" "system" fn FltCloseClientPort(filter : PFLT_FILTER, clientport : *mut PFLT_PORT)); - FltCloseClientPort(filter.param().abi(), core::mem::transmute(clientport)) + FltCloseClientPort(core::mem::transmute(filter), core::mem::transmute(clientport)) } #[inline] -pub unsafe fn FltCloseCommunicationPort(serverport: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FltCloseCommunicationPort(serverport: PFLT_PORT) { windows_targets::link!("fltmgr.sys" "system" fn FltCloseCommunicationPort(serverport : PFLT_PORT)); - FltCloseCommunicationPort(serverport.param().abi()) + FltCloseCommunicationPort(core::mem::transmute(serverport)) } #[inline] -pub unsafe fn FltCloseSectionForDataScan(sectioncontext: P0) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltCloseSectionForDataScan(sectioncontext: PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCloseSectionForDataScan(sectioncontext : PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCloseSectionForDataScan(sectioncontext.param().abi()) + FltCloseSectionForDataScan(core::mem::transmute(sectioncontext)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltCommitComplete(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: P2) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltCommitComplete(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: Option) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCommitComplete(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, transactioncontext : PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCommitComplete(instance.param().abi(), core::mem::transmute(transaction), transactioncontext.param().abi()) + FltCommitComplete(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltCommitFinalizeComplete(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: P2) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltCommitFinalizeComplete(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: Option) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCommitFinalizeComplete(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, transactioncontext : PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCommitFinalizeComplete(instance.param().abi(), core::mem::transmute(transaction), transactioncontext.param().abi()) + FltCommitFinalizeComplete(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FltCompareInstanceAltitudes(instance1: P0, instance2: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltCompareInstanceAltitudes(instance1: PFLT_INSTANCE, instance2: PFLT_INSTANCE) -> i32 { windows_targets::link!("fltmgr.sys" "system" fn FltCompareInstanceAltitudes(instance1 : PFLT_INSTANCE, instance2 : PFLT_INSTANCE) -> i32); - FltCompareInstanceAltitudes(instance1.param().abi(), instance2.param().abi()) + FltCompareInstanceAltitudes(core::mem::transmute(instance1), core::mem::transmute(instance2)) } #[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,127 +272,114 @@ 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(core::mem::transmute(callbackdata), core::mem::transmute(callbackstatus), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + FltCompletePendedPreOperation(core::mem::transmute(callbackdata), core::mem::transmute(callbackstatus), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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 FltCopyOpenReparseList(filter: P0, data: *const FLT_CALLBACK_DATA, ecplist: *mut super::super::super::Foundation::ECP_LIST) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltCopyOpenReparseList(filter: PFLT_FILTER, data: *const FLT_CALLBACK_DATA, ecplist: *mut super::super::super::Foundation::ECP_LIST) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCopyOpenReparseList(filter : PFLT_FILTER, data : *const FLT_CALLBACK_DATA, ecplist : *mut super::super::super::Foundation:: ECP_LIST) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCopyOpenReparseList(filter.param().abi(), core::mem::transmute(data), core::mem::transmute(ecplist)) + FltCopyOpenReparseList(core::mem::transmute(filter), core::mem::transmute(data), core::mem::transmute(ecplist)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn FltCreateCommunicationPort(filter: P0, serverport: *mut PFLT_PORT, objectattributes: *const super::super::super::Foundation::OBJECT_ATTRIBUTES, serverportcookie: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FltCreateCommunicationPort(filter: PFLT_FILTER, serverport: *mut PFLT_PORT, objectattributes: *const super::super::super::Foundation::OBJECT_ATTRIBUTES, serverportcookie: Option<*const core::ffi::c_void>, connectnotifycallback: PFLT_CONNECT_NOTIFY, disconnectnotifycallback: PFLT_DISCONNECT_NOTIFY, messagenotifycallback: Option, maxconnections: i32) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(serverport), core::mem::transmute(objectattributes), core::mem::transmute(serverportcookie.unwrap_or(core::ptr::null())), core::mem::transmute(connectnotifycallback), core::mem::transmute(disconnectnotifycallback), core::mem::transmute(messagenotifycallback), core::mem::transmute(maxconnections)) + FltCreateCommunicationPort(core::mem::transmute(filter), core::mem::transmute(serverport), core::mem::transmute(objectattributes), core::mem::transmute(serverportcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(connectnotifycallback), core::mem::transmute(disconnectnotifycallback), core::mem::transmute(messagenotifycallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(maxconnections)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn FltCreateFile(filter: P0, instance: P1, 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: Option<*const i64>, fileattributes: u32, shareaccess: u32, createdisposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, flags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltCreateFile(filter: PFLT_FILTER, instance: Option, 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: Option<*const i64>, fileattributes: u32, shareaccess: u32, createdisposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, flags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), + core::mem::transmute(filter), + core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(filehandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), - core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), + core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(createdisposition), core::mem::transmute(createoptions), - core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), + core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealength), core::mem::transmute(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] -pub unsafe fn FltCreateFileEx(filter: P0, instance: P1, filehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, fileobject: Option<*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: Option<*const i64>, fileattributes: u32, shareaccess: u32, createdisposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, flags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltCreateFileEx(filter: PFLT_FILTER, instance: Option, filehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, fileobject: Option<*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: Option<*const i64>, fileattributes: u32, shareaccess: u32, createdisposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, flags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), + core::mem::transmute(filter), + core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(filehandle), - core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), - core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), + core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(createdisposition), core::mem::transmute(createoptions), - core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), + core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealength), core::mem::transmute(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] -pub unsafe fn FltCreateFileEx2(filter: P0, instance: P1, filehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, fileobject: Option<*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: Option<*const i64>, fileattributes: u32, shareaccess: u32, createdisposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, flags: u32, drivercontext: Option<*const super::super::super::System::SystemServices::IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltCreateFileEx2(filter: PFLT_FILTER, instance: Option, filehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, fileobject: Option<*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: Option<*const i64>, fileattributes: u32, shareaccess: u32, createdisposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, flags: u32, drivercontext: Option<*const super::super::super::System::SystemServices::IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), + core::mem::transmute(filter), + core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(filehandle), - core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), - core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), + core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(createdisposition), core::mem::transmute(createoptions), - core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), + core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealength), core::mem::transmute(flags), - core::mem::transmute(drivercontext.unwrap_or(core::ptr::null())), + core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed())), ) } #[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 FltCreateMailslotFile(filter: P0, instance: P1, filehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, fileobject: Option<*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: Option<*const super::super::super::System::SystemServices::IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltCreateMailslotFile(filter: PFLT_FILTER, instance: Option, filehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, fileobject: Option<*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: Option<*const super::super::super::System::SystemServices::IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(filehandle), core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(createoptions), core::mem::transmute(mailslotquota), core::mem::transmute(maximummessagesize), core::mem::transmute(readtimeout), core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) + FltCreateMailslotFile( + core::mem::transmute(filter), + core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), + core::mem::transmute(filehandle), + core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), + core::mem::transmute(desiredaccess), + core::mem::transmute(objectattributes), + core::mem::transmute(iostatusblock), + core::mem::transmute(createoptions), + core::mem::transmute(mailslotquota), + core::mem::transmute(maximummessagesize), + core::mem::transmute(readtimeout), + core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed())), + ) } #[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 FltCreateNamedPipeFile(filter: P0, instance: P1, filehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, fileobject: Option<*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: Option<*const i64>, drivercontext: Option<*const super::super::super::System::SystemServices::IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltCreateNamedPipeFile(filter: PFLT_FILTER, instance: Option, filehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, fileobject: Option<*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: Option<*const i64>, drivercontext: Option<*const super::super::super::System::SystemServices::IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), + core::mem::transmute(filter), + core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(filehandle), - core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), @@ -477,40 +392,33 @@ where core::mem::transmute(maximuminstances), core::mem::transmute(inboundquota), core::mem::transmute(outboundquota), - core::mem::transmute(defaulttimeout.unwrap_or(core::ptr::null())), - core::mem::transmute(drivercontext.unwrap_or(core::ptr::null())), + core::mem::transmute(defaulttimeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed())), ) } #[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 FltCreateSectionForDataScan(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, sectioncontext: P2, desiredaccess: u32, objectattributes: Option<*const super::super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*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: Option<*mut i64>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltCreateSectionForDataScan(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, sectioncontext: PFLT_CONTEXT, desiredaccess: u32, objectattributes: Option<*const super::super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*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: Option<*mut i64>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), + core::mem::transmute(instance), core::mem::transmute(fileobject), - sectioncontext.param().abi(), + core::mem::transmute(sectioncontext), core::mem::transmute(desiredaccess), - core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), - core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), + core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), core::mem::transmute(flags), core::mem::transmute(sectionhandle), core::mem::transmute(sectionobject), - core::mem::transmute(sectionfilesize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(sectionfilesize.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn FltCreateSystemVolumeInformationFolder(instance: P0) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltCreateSystemVolumeInformationFolder(instance: PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCreateSystemVolumeInformationFolder(instance : PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCreateSystemVolumeInformationFolder(instance.param().abi()) + FltCreateSystemVolumeInformationFolder(core::mem::transmute(instance)) } #[inline] pub unsafe fn FltCurrentBatchOplock(oplock: *const *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation::BOOLEAN { @@ -531,40 +439,28 @@ 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(core::mem::transmute(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()))) + FltDecodeParameters(core::mem::transmute(callbackdata), core::mem::transmute(mdladdresspointer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FltDeleteContext(context: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FltDeleteContext(context: PFLT_CONTEXT) { windows_targets::link!("fltmgr.sys" "system" fn FltDeleteContext(context : PFLT_CONTEXT)); - FltDeleteContext(context.param().abi()) + FltDeleteContext(core::mem::transmute(context)) } #[inline] -pub unsafe fn FltDeleteExtraCreateParameterLookasideList(filter: P0, lookaside: *mut core::ffi::c_void, flags: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn FltDeleteExtraCreateParameterLookasideList(filter: Option, lookaside: *mut core::ffi::c_void, flags: u32) { windows_targets::link!("fltmgr.sys" "system" fn FltDeleteExtraCreateParameterLookasideList(filter : PFLT_FILTER, lookaside : *mut core::ffi::c_void, flags : u32)); - FltDeleteExtraCreateParameterLookasideList(filter.param().abi(), core::mem::transmute(lookaside), core::mem::transmute(flags)) + FltDeleteExtraCreateParameterLookasideList(core::mem::transmute(filter.unwrap_or(core::mem::zeroed())), core::mem::transmute(lookaside), core::mem::transmute(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] -pub unsafe fn FltDeleteFileContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltDeleteFileContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltDeleteFileContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FltDeleteInstanceContext(instance: P0, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltDeleteInstanceContext(instance: PFLT_INSTANCE, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut()))) + FltDeleteInstanceContext(core::mem::transmute(instance), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FltDeletePushLock(pushlock: *const usize) { @@ -573,79 +469,55 @@ pub unsafe fn FltDeletePushLock(pushlock: *const usize) { } #[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 FltDeleteStreamContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltDeleteStreamContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltDeleteStreamContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[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 FltDeleteStreamHandleContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltDeleteStreamHandleContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltDeleteStreamHandleContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltDeleteTransactionContext(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltDeleteTransactionContext(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(transaction), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltDeleteTransactionContext(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FltDeleteVolumeContext(filter: P0, volume: P1, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltDeleteVolumeContext(filter: PFLT_FILTER, volume: PFLT_VOLUME, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut()))) + FltDeleteVolumeContext(core::mem::transmute(filter), core::mem::transmute(volume), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltDetachVolume(filter: PFLT_FILTER, volume: PFLT_VOLUME, instancename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + FltDetachVolume(core::mem::transmute(filter), core::mem::transmute(volume), core::mem::transmute(instancename.unwrap_or(core::mem::zeroed()))) } #[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 FltDeviceIoControlFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, iocontrolcode: u32, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltDeviceIoControlFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, iocontrolcode: u32, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(iocontrolcode), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) + FltDeviceIoControlFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(iocontrolcode), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(data), core::mem::transmute(fltobjects), core::mem::transmute(completioncontext.unwrap_or(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(safepostcallback), core::mem::transmute(retpostoperationstatus)) + FltDoCompletionProcessingWhenSafe(core::mem::transmute(data), core::mem::transmute(fltobjects), core::mem::transmute(completioncontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(safepostcallback), core::mem::transmute(retpostoperationstatus)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltEnlistInTransaction(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: P2, notificationmask: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltEnlistInTransaction(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: PFLT_CONTEXT, notificationmask: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltEnlistInTransaction(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, transactioncontext : PFLT_CONTEXT, notificationmask : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnlistInTransaction(instance.param().abi(), core::mem::transmute(transaction), transactioncontext.param().abi(), core::mem::transmute(notificationmask)) + FltEnlistInTransaction(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(transactioncontext), core::mem::transmute(notificationmask)) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[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(core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltEnumerateFilterInformation(core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) } #[inline] pub unsafe fn FltEnumerateFilters(filterlist: Option<&mut [PFLT_FILTER]>, numberfiltersreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -656,120 +528,83 @@ 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(core::mem::transmute(deviceobject), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltEnumerateInstanceInformationByDeviceObject(core::mem::transmute(deviceobject), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] -pub unsafe fn FltEnumerateInstanceInformationByFilter(filter: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FltEnumerateInstanceInformationByFilter(filter: PFLT_FILTER, 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 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(), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltEnumerateInstanceInformationByFilter(core::mem::transmute(filter), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] -pub unsafe fn FltEnumerateInstanceInformationByVolume(volume: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FltEnumerateInstanceInformationByVolume(volume: PFLT_VOLUME, 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 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(), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltEnumerateInstanceInformationByVolume(core::mem::transmute(volume), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(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(core::mem::transmute(volumename), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltEnumerateInstanceInformationByVolumeName(core::mem::transmute(volumename), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltEnumerateInstances(volume: Option, filter: Option, instancelist: Option<&mut [PFLT_INSTANCE]>, numberinstancesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateInstances(volume : PFLT_VOLUME, filter : PFLT_FILTER, instancelist : *mut PFLT_INSTANCE, instancelistsize : u32, numberinstancesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateInstances(volume.param().abi(), filter.param().abi(), core::mem::transmute(instancelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), instancelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(numberinstancesreturned)) + FltEnumerateInstances(core::mem::transmute(volume.unwrap_or(core::mem::zeroed())), core::mem::transmute(filter.unwrap_or(core::mem::zeroed())), core::mem::transmute(instancelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), instancelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(numberinstancesreturned)) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] -pub unsafe fn FltEnumerateVolumeInformation(filter: P0, index: u32, informationclass: super::super::super::super::Win32::Storage::InstallableFileSystems::FILTER_VOLUME_INFORMATION_CLASS, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bytesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltEnumerateVolumeInformation(filter: PFLT_FILTER, index: u32, informationclass: super::super::super::super::Win32::Storage::InstallableFileSystems::FILTER_VOLUME_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 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(), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltEnumerateVolumeInformation(core::mem::transmute(filter), core::mem::transmute(index), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) } #[inline] -pub unsafe fn FltEnumerateVolumes(filter: P0, volumelist: Option<&mut [PFLT_VOLUME]>, numbervolumesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltEnumerateVolumes(filter: PFLT_FILTER, volumelist: Option<&mut [PFLT_VOLUME]>, numbervolumesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateVolumes(filter : PFLT_FILTER, volumelist : *mut PFLT_VOLUME, volumelistsize : u32, numbervolumesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateVolumes(filter.param().abi(), core::mem::transmute(volumelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), volumelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(numbervolumesreturned)) + FltEnumerateVolumes(core::mem::transmute(filter), core::mem::transmute(volumelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), volumelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(numbervolumesreturned)) } #[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 FltFastIoMdlRead(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, lockkey: u32, mdlchain: *mut *mut super::super::super::Foundation::MDL, iostatus: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FltFastIoMdlRead(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, lockkey: u32, mdlchain: *mut *mut super::super::super::Foundation::MDL, iostatus: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltFastIoMdlRead(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, lockkey : u32, mdlchain : *mut *mut super::super::super::Foundation:: MDL, iostatus : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltFastIoMdlRead(initiatinginstance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(lockkey), core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) + FltFastIoMdlRead(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(lockkey), core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) } #[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 FltFastIoMdlReadComplete(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, mdlchain: *const super::super::super::Foundation::MDL) -> super::super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FltFastIoMdlReadComplete(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, mdlchain: *const super::super::super::Foundation::MDL) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltFastIoMdlReadComplete(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, mdlchain : *const super::super::super::Foundation:: MDL) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltFastIoMdlReadComplete(initiatinginstance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(mdlchain)) + FltFastIoMdlReadComplete(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(mdlchain)) } #[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 FltFastIoMdlWriteComplete(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, mdlchain: *const super::super::super::Foundation::MDL) -> super::super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FltFastIoMdlWriteComplete(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, mdlchain: *const super::super::super::Foundation::MDL) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltFastIoMdlWriteComplete(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, mdlchain : *const super::super::super::Foundation:: MDL) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltFastIoMdlWriteComplete(initiatinginstance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(mdlchain)) + FltFastIoMdlWriteComplete(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(mdlchain)) } #[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 FltFastIoPrepareMdlWrite(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, lockkey: u32, mdlchain: *mut *mut super::super::super::Foundation::MDL, iostatus: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FltFastIoPrepareMdlWrite(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, lockkey: u32, mdlchain: *mut *mut super::super::super::Foundation::MDL, iostatus: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltFastIoPrepareMdlWrite(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, lockkey : u32, mdlchain : *mut *mut super::super::super::Foundation:: MDL, iostatus : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltFastIoPrepareMdlWrite(initiatinginstance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(lockkey), core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) + FltFastIoPrepareMdlWrite(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(lockkey), core::mem::transmute(mdlchain), core::mem::transmute(iostatus)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltFindExtraCreateParameter(filter: P0, ecplist: *const super::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::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltFindExtraCreateParameter(filter: PFLT_FILTER, ecplist: *const super::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::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(ecplist), core::mem::transmute(ecptype), core::mem::transmute(ecpcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ecpcontextsize.unwrap_or(core::ptr::null_mut()))) + FltFindExtraCreateParameter(core::mem::transmute(filter), core::mem::transmute(ecplist), core::mem::transmute(ecptype), core::mem::transmute(ecpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ecpcontextsize.unwrap_or(core::mem::zeroed()))) } #[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 FltFlushBuffers(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltFlushBuffers(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltFlushBuffers(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltFlushBuffers(instance.param().abi(), core::mem::transmute(fileobject)) + FltFlushBuffers(core::mem::transmute(instance), core::mem::transmute(fileobject)) } #[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 FltFlushBuffers2(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, flushtype: u32, callbackdata: Option<*const FLT_CALLBACK_DATA>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltFlushBuffers2(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, flushtype: u32, callbackdata: Option<*const FLT_CALLBACK_DATA>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(flushtype), core::mem::transmute(callbackdata.unwrap_or(core::ptr::null()))) + FltFlushBuffers2(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(flushtype), core::mem::transmute(callbackdata.unwrap_or(core::mem::zeroed()))) } #[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] @@ -778,29 +613,20 @@ pub unsafe fn FltFreeCallbackData(callbackdata: *const FLT_CALLBACK_DATA) { FltFreeCallbackData(core::mem::transmute(callbackdata)) } #[inline] -pub unsafe fn FltFreeDeferredIoWorkItem(fltworkitem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FltFreeDeferredIoWorkItem(fltworkitem: PFLT_DEFERRED_IO_WORKITEM) { windows_targets::link!("fltmgr.sys" "system" fn FltFreeDeferredIoWorkItem(fltworkitem : PFLT_DEFERRED_IO_WORKITEM)); - FltFreeDeferredIoWorkItem(fltworkitem.param().abi()) + FltFreeDeferredIoWorkItem(core::mem::transmute(fltworkitem)) } #[inline] -pub unsafe fn FltFreeExtraCreateParameter(filter: P0, ecpcontext: *const core::ffi::c_void) -where - P0: windows_core::Param, -{ +pub unsafe fn FltFreeExtraCreateParameter(filter: PFLT_FILTER, ecpcontext: *const core::ffi::c_void) { windows_targets::link!("fltmgr.sys" "system" fn FltFreeExtraCreateParameter(filter : PFLT_FILTER, ecpcontext : *const core::ffi::c_void)); - FltFreeExtraCreateParameter(filter.param().abi(), core::mem::transmute(ecpcontext)) + FltFreeExtraCreateParameter(core::mem::transmute(filter), core::mem::transmute(ecpcontext)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltFreeExtraCreateParameterList(filter: P0, ecplist: *const super::super::super::Foundation::ECP_LIST) -where - P0: windows_core::Param, -{ +pub unsafe fn FltFreeExtraCreateParameterList(filter: PFLT_FILTER, ecplist: *const super::super::super::Foundation::ECP_LIST) { windows_targets::link!("fltmgr.sys" "system" fn FltFreeExtraCreateParameterList(filter : PFLT_FILTER, ecplist : *const super::super::super::Foundation:: ECP_LIST)); - FltFreeExtraCreateParameterList(filter.param().abi(), core::mem::transmute(ecplist)) + FltFreeExtraCreateParameterList(core::mem::transmute(filter), core::mem::transmute(ecplist)) } #[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] @@ -809,47 +635,32 @@ pub unsafe fn FltFreeFileLock(filelock: *const super::FILE_LOCK) { FltFreeFileLock(core::mem::transmute(filelock)) } #[inline] -pub unsafe fn FltFreeGenericWorkItem(fltworkitem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FltFreeGenericWorkItem(fltworkitem: PFLT_GENERIC_WORKITEM) { windows_targets::link!("fltmgr.sys" "system" fn FltFreeGenericWorkItem(fltworkitem : PFLT_GENERIC_WORKITEM)); - FltFreeGenericWorkItem(fltworkitem.param().abi()) + FltFreeGenericWorkItem(core::mem::transmute(fltworkitem)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltFreeOpenReparseList(filter: P0, ecplist: *const super::super::super::Foundation::ECP_LIST) -where - P0: windows_core::Param, -{ +pub unsafe fn FltFreeOpenReparseList(filter: PFLT_FILTER, ecplist: *const super::super::super::Foundation::ECP_LIST) { windows_targets::link!("fltmgr.sys" "system" fn FltFreeOpenReparseList(filter : PFLT_FILTER, ecplist : *const super::super::super::Foundation:: ECP_LIST)); - FltFreeOpenReparseList(filter.param().abi(), core::mem::transmute(ecplist)) + FltFreeOpenReparseList(core::mem::transmute(filter), core::mem::transmute(ecplist)) } #[inline] -pub unsafe fn FltFreePoolAlignedWithTag(instance: P0, buffer: *const core::ffi::c_void, tag: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn FltFreePoolAlignedWithTag(instance: PFLT_INSTANCE, buffer: *const core::ffi::c_void, tag: u32) { windows_targets::link!("fltmgr.sys" "system" fn FltFreePoolAlignedWithTag(instance : PFLT_INSTANCE, buffer : *const core::ffi::c_void, tag : u32)); - FltFreePoolAlignedWithTag(instance.param().abi(), core::mem::transmute(buffer), core::mem::transmute(tag)) + FltFreePoolAlignedWithTag(core::mem::transmute(instance), core::mem::transmute(buffer), core::mem::transmute(tag)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FltFreeSecurityDescriptor(securitydescriptor: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FltFreeSecurityDescriptor(securitydescriptor: super::super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) { windows_targets::link!("fltmgr.sys" "system" fn FltFreeSecurityDescriptor(securitydescriptor : super::super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR)); - FltFreeSecurityDescriptor(securitydescriptor.param().abi()) + FltFreeSecurityDescriptor(core::mem::transmute(securitydescriptor)) } #[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 FltFsControlFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fscontrolcode: u32, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltFsControlFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fscontrolcode: u32, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(fscontrolcode), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) + FltFsControlFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(fscontrolcode), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[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] @@ -858,12 +669,9 @@ pub unsafe fn FltGetActivityIdCallbackData(callbackdata: *const FLT_CALLBACK_DAT FltGetActivityIdCallbackData(core::mem::transmute(callbackdata), core::mem::transmute(guid)) } #[inline] -pub unsafe fn FltGetBottomInstance(volume: P0, instance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetBottomInstance(volume: PFLT_VOLUME, instance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetBottomInstance(volume : PFLT_VOLUME, instance : *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetBottomInstance(volume.param().abi(), core::mem::transmute(instance)) + FltGetBottomInstance(core::mem::transmute(volume), core::mem::transmute(instance)) } #[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] @@ -879,50 +687,36 @@ pub unsafe fn FltGetContextsEx(fltobjects: *const FLT_RELATED_OBJECTS, desiredco } #[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 FltGetDestinationFileNameInformation(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, rootdirectory: P2, filename: P3, filenamelength: u32, nameoptions: u32, retfilenameinformation: *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn FltGetDestinationFileNameInformation(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, rootdirectory: Option, filename: P3, filenamelength: u32, nameoptions: u32, retfilenameinformation: *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetDestinationFileNameInformation(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, rootdirectory : super::super::super::super::Win32::Foundation:: HANDLE, filename : windows_core::PCWSTR, filenamelength : u32, nameoptions : u32, retfilenameinformation : *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetDestinationFileNameInformation(instance.param().abi(), core::mem::transmute(fileobject), rootdirectory.param().abi(), filename.param().abi(), core::mem::transmute(filenamelength), core::mem::transmute(nameoptions), core::mem::transmute(retfilenameinformation)) + FltGetDestinationFileNameInformation(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(rootdirectory.unwrap_or(core::mem::zeroed())), filename.param().abi(), core::mem::transmute(filenamelength), core::mem::transmute(nameoptions), core::mem::transmute(retfilenameinformation)) } #[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 FltGetDeviceObject(volume: P0, deviceobject: *mut *mut super::super::super::Foundation::DEVICE_OBJECT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetDeviceObject(volume: PFLT_VOLUME, deviceobject: *mut *mut super::super::super::Foundation::DEVICE_OBJECT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetDeviceObject(volume : PFLT_VOLUME, deviceobject : *mut *mut super::super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetDeviceObject(volume.param().abi(), core::mem::transmute(deviceobject)) + FltGetDeviceObject(core::mem::transmute(volume), core::mem::transmute(deviceobject)) } #[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 FltGetDiskDeviceObject(volume: P0, diskdeviceobject: *mut *mut super::super::super::Foundation::DEVICE_OBJECT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetDiskDeviceObject(volume: PFLT_VOLUME, diskdeviceobject: *mut *mut super::super::super::Foundation::DEVICE_OBJECT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetDiskDeviceObject(volume : PFLT_VOLUME, diskdeviceobject : *mut *mut super::super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetDiskDeviceObject(volume.param().abi(), core::mem::transmute(diskdeviceobject)) + FltGetDiskDeviceObject(core::mem::transmute(volume), core::mem::transmute(diskdeviceobject)) } #[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 FltGetEcpListFromCallbackData(filter: P0, callbackdata: *const FLT_CALLBACK_DATA, ecplist: *mut *mut super::super::super::Foundation::ECP_LIST) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetEcpListFromCallbackData(filter: PFLT_FILTER, callbackdata: *const FLT_CALLBACK_DATA, ecplist: *mut *mut super::super::super::Foundation::ECP_LIST) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetEcpListFromCallbackData(filter : PFLT_FILTER, callbackdata : *const FLT_CALLBACK_DATA, ecplist : *mut *mut super::super::super::Foundation:: ECP_LIST) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetEcpListFromCallbackData(filter.param().abi(), core::mem::transmute(callbackdata), core::mem::transmute(ecplist)) + FltGetEcpListFromCallbackData(core::mem::transmute(filter), core::mem::transmute(callbackdata), core::mem::transmute(ecplist)) } #[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 FltGetFileContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetFileContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetFileContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, context : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetFileContext(instance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(context)) + FltGetFileContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(context)) } #[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] @@ -932,12 +726,9 @@ pub unsafe fn FltGetFileNameInformation(callbackdata: *const FLT_CALLBACK_DATA, } #[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 FltGetFileNameInformationUnsafe(fileobject: *const super::super::super::Foundation::FILE_OBJECT, instance: P1, nameoptions: u32, filenameinformation: *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn FltGetFileNameInformationUnsafe(fileobject: *const super::super::super::Foundation::FILE_OBJECT, instance: Option, nameoptions: u32, filenameinformation: *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetFileNameInformationUnsafe(fileobject : *const super::super::super::Foundation:: FILE_OBJECT, instance : PFLT_INSTANCE, nameoptions : u32, filenameinformation : *mut *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetFileNameInformationUnsafe(core::mem::transmute(fileobject), instance.param().abi(), core::mem::transmute(nameoptions), core::mem::transmute(filenameinformation)) + FltGetFileNameInformationUnsafe(core::mem::transmute(fileobject), core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(nameoptions), core::mem::transmute(filenameinformation)) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] @@ -946,12 +737,9 @@ pub unsafe fn FltGetFileSystemType(fltobject: *const core::ffi::c_void, filesyst FltGetFileSystemType(core::mem::transmute(fltobject), core::mem::transmute(filesystemtype)) } #[inline] -pub unsafe fn FltGetFilterFromInstance(instance: P0, retfilter: *mut PFLT_FILTER) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetFilterFromInstance(instance: PFLT_INSTANCE, retfilter: *mut PFLT_FILTER) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetFilterFromInstance(instance : PFLT_INSTANCE, retfilter : *mut PFLT_FILTER) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetFilterFromInstance(instance.param().abi(), core::mem::transmute(retfilter)) + FltGetFilterFromInstance(core::mem::transmute(instance), core::mem::transmute(retfilter)) } #[inline] pub unsafe fn FltGetFilterFromName(filtername: *const super::super::super::super::Win32::Foundation::UNICODE_STRING, retfilter: *mut PFLT_FILTER) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -960,12 +748,9 @@ pub unsafe fn FltGetFilterFromName(filtername: *const super::super::super::super } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] -pub unsafe fn FltGetFilterInformation(filter: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetFilterInformation(filter: PFLT_FILTER, 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 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(), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltGetFilterInformation(core::mem::transmute(filter), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(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] @@ -974,21 +759,15 @@ pub unsafe fn FltGetFsZeroingOffset(data: *const FLT_CALLBACK_DATA, zeroingoffse FltGetFsZeroingOffset(core::mem::transmute(data), core::mem::transmute(zeroingoffset)) } #[inline] -pub unsafe fn FltGetInstanceContext(instance: P0, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetInstanceContext(instance: PFLT_INSTANCE, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetInstanceContext(instance : PFLT_INSTANCE, context : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetInstanceContext(instance.param().abi(), core::mem::transmute(context)) + FltGetInstanceContext(core::mem::transmute(instance), core::mem::transmute(context)) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] -pub unsafe fn FltGetInstanceInformation(instance: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetInstanceInformation(instance: PFLT_INSTANCE, 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 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(), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltGetInstanceInformation(core::mem::transmute(instance), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(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] @@ -1016,12 +795,9 @@ pub unsafe fn FltGetIoPriorityHintFromFileObject(fileobject: *const super::super } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltGetIoPriorityHintFromThread(thread: P0) -> super::super::super::Foundation::IO_PRIORITY_HINT -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetIoPriorityHintFromThread(thread: super::super::super::Foundation::PETHREAD) -> super::super::super::Foundation::IO_PRIORITY_HINT { windows_targets::link!("fltmgr.sys" "system" fn FltGetIoPriorityHintFromThread(thread : super::super::super::Foundation:: PETHREAD) -> super::super::super::Foundation:: IO_PRIORITY_HINT); - FltGetIoPriorityHintFromThread(thread.param().abi()) + FltGetIoPriorityHintFromThread(core::mem::transmute(thread)) } #[inline] pub unsafe fn FltGetIrpName(irpmajorcode: u8) -> windows_core::PSTR { @@ -1029,12 +805,9 @@ pub unsafe fn FltGetIrpName(irpmajorcode: u8) -> windows_core::PSTR { FltGetIrpName(core::mem::transmute(irpmajorcode)) } #[inline] -pub unsafe fn FltGetLowerInstance(currentinstance: P0, lowerinstance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetLowerInstance(currentinstance: PFLT_INSTANCE, lowerinstance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetLowerInstance(currentinstance : PFLT_INSTANCE, lowerinstance : *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetLowerInstance(currentinstance.param().abi(), core::mem::transmute(lowerinstance)) + FltGetLowerInstance(core::mem::transmute(currentinstance), core::mem::transmute(lowerinstance)) } #[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] @@ -1044,12 +817,9 @@ pub unsafe fn FltGetNewSystemBufferAddress(callbackdata: *const FLT_CALLBACK_DAT } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltGetNextExtraCreateParameter(filter: P0, ecplist: *const super::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::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetNextExtraCreateParameter(filter: PFLT_FILTER, ecplist: *const super::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::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + FltGetNextExtraCreateParameter(core::mem::transmute(filter), core::mem::transmute(ecplist), core::mem::transmute(currentecpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(nextecptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(nextecpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(nextecpcontextsize.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1085,30 +855,21 @@ where } #[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 FltGetSectionContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetSectionContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetSectionContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, context : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetSectionContext(instance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(context)) + FltGetSectionContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(context)) } #[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 FltGetStreamContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetStreamContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetStreamContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, context : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetStreamContext(instance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(context)) + FltGetStreamContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(context)) } #[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 FltGetStreamHandleContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetStreamHandleContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetStreamHandleContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, context : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetStreamHandleContext(instance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(context)) + FltGetStreamHandleContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(context)) } #[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] @@ -1117,21 +878,15 @@ pub unsafe fn FltGetSwappedBufferMdlAddress(callbackdata: *const FLT_CALLBACK_DA FltGetSwappedBufferMdlAddress(core::mem::transmute(callbackdata)) } #[inline] -pub unsafe fn FltGetTopInstance(volume: P0, instance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetTopInstance(volume: PFLT_VOLUME, instance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetTopInstance(volume : PFLT_VOLUME, instance : *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetTopInstance(volume.param().abi(), core::mem::transmute(instance)) + FltGetTopInstance(core::mem::transmute(volume), core::mem::transmute(instance)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltGetTransactionContext(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetTransactionContext(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetTransactionContext(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, context : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetTransactionContext(instance.param().abi(), core::mem::transmute(transaction), core::mem::transmute(context)) + FltGetTransactionContext(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(context)) } #[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] @@ -1140,105 +895,67 @@ pub unsafe fn FltGetTunneledName(callbackdata: *const FLT_CALLBACK_DATA, filenam FltGetTunneledName(core::mem::transmute(callbackdata), core::mem::transmute(filenameinformation), core::mem::transmute(rettunneledfilenameinformation)) } #[inline] -pub unsafe fn FltGetUpperInstance(currentinstance: P0, upperinstance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetUpperInstance(currentinstance: PFLT_INSTANCE, upperinstance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetUpperInstance(currentinstance : PFLT_INSTANCE, upperinstance : *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetUpperInstance(currentinstance.param().abi(), core::mem::transmute(upperinstance)) + FltGetUpperInstance(core::mem::transmute(currentinstance), core::mem::transmute(upperinstance)) } #[inline] -pub unsafe fn FltGetVolumeContext(filter: P0, volume: P1, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltGetVolumeContext(filter: PFLT_FILTER, volume: PFLT_VOLUME, context: *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeContext(filter : PFLT_FILTER, volume : PFLT_VOLUME, context : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeContext(filter.param().abi(), volume.param().abi(), core::mem::transmute(context)) + FltGetVolumeContext(core::mem::transmute(filter), core::mem::transmute(volume), core::mem::transmute(context)) } #[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 FltGetVolumeFromDeviceObject(filter: P0, deviceobject: *const super::super::super::Foundation::DEVICE_OBJECT, retvolume: *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetVolumeFromDeviceObject(filter: PFLT_FILTER, deviceobject: *const super::super::super::Foundation::DEVICE_OBJECT, retvolume: *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeFromDeviceObject(filter : PFLT_FILTER, deviceobject : *const super::super::super::Foundation:: DEVICE_OBJECT, retvolume : *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeFromDeviceObject(filter.param().abi(), core::mem::transmute(deviceobject), core::mem::transmute(retvolume)) + FltGetVolumeFromDeviceObject(core::mem::transmute(filter), core::mem::transmute(deviceobject), core::mem::transmute(retvolume)) } #[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 FltGetVolumeFromFileObject(filter: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, retvolume: *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetVolumeFromFileObject(filter: PFLT_FILTER, fileobject: *const super::super::super::Foundation::FILE_OBJECT, retvolume: *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeFromFileObject(filter : PFLT_FILTER, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, retvolume : *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeFromFileObject(filter.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(retvolume)) + FltGetVolumeFromFileObject(core::mem::transmute(filter), core::mem::transmute(fileobject), core::mem::transmute(retvolume)) } #[inline] -pub unsafe fn FltGetVolumeFromInstance(instance: P0, retvolume: *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetVolumeFromInstance(instance: PFLT_INSTANCE, retvolume: *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeFromInstance(instance : PFLT_INSTANCE, retvolume : *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeFromInstance(instance.param().abi(), core::mem::transmute(retvolume)) + FltGetVolumeFromInstance(core::mem::transmute(instance), core::mem::transmute(retvolume)) } #[inline] -pub unsafe fn FltGetVolumeFromName(filter: P0, volumename: *const super::super::super::super::Win32::Foundation::UNICODE_STRING, retvolume: *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetVolumeFromName(filter: PFLT_FILTER, volumename: *const super::super::super::super::Win32::Foundation::UNICODE_STRING, retvolume: *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeFromName(filter : PFLT_FILTER, volumename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, retvolume : *mut PFLT_VOLUME) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeFromName(filter.param().abi(), core::mem::transmute(volumename), core::mem::transmute(retvolume)) + FltGetVolumeFromName(core::mem::transmute(filter), core::mem::transmute(volumename), core::mem::transmute(retvolume)) } #[inline] -pub unsafe fn FltGetVolumeGuidName(volume: P0, volumeguidname: Option<*mut super::super::super::super::Win32::Foundation::UNICODE_STRING>, buffersizeneeded: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetVolumeGuidName(volume: PFLT_VOLUME, volumeguidname: Option<*mut super::super::super::super::Win32::Foundation::UNICODE_STRING>, buffersizeneeded: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut())), core::mem::transmute(buffersizeneeded.unwrap_or(core::ptr::null_mut()))) + FltGetVolumeGuidName(core::mem::transmute(volume), core::mem::transmute(volumeguidname.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersizeneeded.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] -pub unsafe fn FltGetVolumeInformation(volume: P0, informationclass: super::super::super::super::Win32::Storage::InstallableFileSystems::FILTER_VOLUME_INFORMATION_CLASS, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bytesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetVolumeInformation(volume: PFLT_VOLUME, informationclass: super::super::super::super::Win32::Storage::InstallableFileSystems::FILTER_VOLUME_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 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(), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bytesreturned)) + FltGetVolumeInformation(core::mem::transmute(volume), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltGetVolumeInstanceFromName(filter: Option, volume: PFLT_VOLUME, instancename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, retinstance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(retinstance)) + FltGetVolumeInstanceFromName(core::mem::transmute(filter.unwrap_or(core::mem::zeroed())), core::mem::transmute(volume), core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetVolumeName(volume: PFLT_VOLUME, volumename: Option<*mut super::super::super::super::Win32::Foundation::UNICODE_STRING>, buffersizeneeded: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut())), core::mem::transmute(buffersizeneeded.unwrap_or(core::ptr::null_mut()))) + FltGetVolumeName(core::mem::transmute(volume), core::mem::transmute(volumename.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersizeneeded.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn FltGetVolumeProperties(volume: PFLT_VOLUME, volumeproperties: Option<*mut FLT_VOLUME_PROPERTIES>, volumepropertieslength: u32, lengthreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut())), core::mem::transmute(volumepropertieslength), core::mem::transmute(lengthreturned)) + FltGetVolumeProperties(core::mem::transmute(volume), core::mem::transmute(volumeproperties.unwrap_or(core::mem::zeroed())), core::mem::transmute(volumepropertieslength), core::mem::transmute(lengthreturned)) } #[inline] -pub unsafe fn FltInitExtraCreateParameterLookasideList(filter: P0, lookaside: *mut core::ffi::c_void, flags: u32, size: usize, tag: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn FltInitExtraCreateParameterLookasideList(filter: PFLT_FILTER, lookaside: *mut core::ffi::c_void, flags: u32, size: usize, tag: u32) { windows_targets::link!("fltmgr.sys" "system" fn FltInitExtraCreateParameterLookasideList(filter : PFLT_FILTER, lookaside : *mut core::ffi::c_void, flags : u32, size : usize, tag : u32)); - FltInitExtraCreateParameterLookasideList(filter.param().abi(), core::mem::transmute(lookaside), core::mem::transmute(flags), core::mem::transmute(size), core::mem::transmute(tag)) + FltInitExtraCreateParameterLookasideList(core::mem::transmute(filter), core::mem::transmute(lookaside), core::mem::transmute(flags), core::mem::transmute(size), core::mem::transmute(tag)) } #[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] @@ -1260,18 +977,15 @@ pub unsafe fn FltInitializePushLock() -> usize { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltInsertExtraCreateParameter(filter: P0, ecplist: *mut super::super::super::Foundation::ECP_LIST, ecpcontext: *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltInsertExtraCreateParameter(filter: PFLT_FILTER, ecplist: *mut super::super::super::Foundation::ECP_LIST, ecpcontext: *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltInsertExtraCreateParameter(filter : PFLT_FILTER, ecplist : *mut super::super::super::Foundation:: ECP_LIST, ecpcontext : *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltInsertExtraCreateParameter(filter.param().abi(), core::mem::transmute(ecplist), core::mem::transmute(ecpcontext)) + FltInsertExtraCreateParameter(core::mem::transmute(filter), core::mem::transmute(ecplist), core::mem::transmute(ecpcontext)) } #[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 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(core::ptr::null()))) + FltIs32bitProcess(core::mem::transmute(callbackdata.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1281,28 +995,19 @@ pub unsafe fn FltIsCallbackDataDirty(data: *const FLT_CALLBACK_DATA) -> super::s } #[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 FltIsDirectory(fileobject: *const super::super::super::Foundation::FILE_OBJECT, instance: P1, isdirectory: *mut super::super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn FltIsDirectory(fileobject: *const super::super::super::Foundation::FILE_OBJECT, instance: PFLT_INSTANCE, isdirectory: *mut super::super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltIsDirectory(fileobject : *const super::super::super::Foundation:: FILE_OBJECT, instance : PFLT_INSTANCE, isdirectory : *mut super::super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltIsDirectory(core::mem::transmute(fileobject), instance.param().abi(), core::mem::transmute(isdirectory)) + FltIsDirectory(core::mem::transmute(fileobject), core::mem::transmute(instance), core::mem::transmute(isdirectory)) } #[inline] -pub unsafe fn FltIsEcpAcknowledged(filter: P0, ecpcontext: *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FltIsEcpAcknowledged(filter: PFLT_FILTER, ecpcontext: *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltIsEcpAcknowledged(filter : PFLT_FILTER, ecpcontext : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltIsEcpAcknowledged(filter.param().abi(), core::mem::transmute(ecpcontext)) + FltIsEcpAcknowledged(core::mem::transmute(filter), core::mem::transmute(ecpcontext)) } #[inline] -pub unsafe fn FltIsEcpFromUserMode(filter: P0, ecpcontext: *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FltIsEcpFromUserMode(filter: PFLT_FILTER, ecpcontext: *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltIsEcpFromUserMode(filter : PFLT_FILTER, ecpcontext : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltIsEcpFromUserMode(filter.param().abi(), core::mem::transmute(ecpcontext)) + FltIsEcpFromUserMode(core::mem::transmute(filter), core::mem::transmute(ecpcontext)) } #[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] @@ -1317,22 +1022,15 @@ pub unsafe fn FltIsIoCanceled(callbackdata: *const FLT_CALLBACK_DATA) -> super:: FltIsIoCanceled(core::mem::transmute(callbackdata)) } #[inline] -pub unsafe fn FltIsIoRedirectionAllowed(sourceinstance: P0, targetinstance: P1, redirectionallowed: *mut super::super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltIsIoRedirectionAllowed(sourceinstance: PFLT_INSTANCE, targetinstance: PFLT_INSTANCE, redirectionallowed: *mut super::super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltIsIoRedirectionAllowed(sourceinstance : PFLT_INSTANCE, targetinstance : PFLT_INSTANCE, redirectionallowed : *mut super::super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltIsIoRedirectionAllowed(sourceinstance.param().abi(), targetinstance.param().abi(), core::mem::transmute(redirectionallowed)) + FltIsIoRedirectionAllowed(core::mem::transmute(sourceinstance), core::mem::transmute(targetinstance), core::mem::transmute(redirectionallowed)) } #[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 FltIsIoRedirectionAllowedForOperation(data: *const FLT_CALLBACK_DATA, targetinstance: P1, redirectionallowedthisio: *mut super::super::super::super::Win32::Foundation::BOOLEAN, redirectionallowedallio: Option<*mut super::super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn FltIsIoRedirectionAllowedForOperation(data: *const FLT_CALLBACK_DATA, targetinstance: PFLT_INSTANCE, redirectionallowedthisio: *mut super::super::super::super::Win32::Foundation::BOOLEAN, redirectionallowedallio: Option<*mut super::super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(data), targetinstance.param().abi(), core::mem::transmute(redirectionallowedthisio), core::mem::transmute(redirectionallowedallio.unwrap_or(core::ptr::null_mut()))) + FltIsIoRedirectionAllowedForOperation(core::mem::transmute(data), core::mem::transmute(targetinstance), core::mem::transmute(redirectionallowedthisio), core::mem::transmute(redirectionallowedallio.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1363,14 +1061,25 @@ pub unsafe fn FltLockUserBuffer(callbackdata: *const FLT_CALLBACK_DATA) -> super } #[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 FltNotifyFilterChangeDirectory(notifysync: P0, 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: P4, ignorebuffer: P5, completionfilter: u32, notifycallbackdata: *const FLT_CALLBACK_DATA, traversecallback: super::PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext: Option<*const super::super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: super::PFILTER_REPORT_CHANGE) +pub unsafe 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: P4, ignorebuffer: P5, completionfilter: u32, notifycallbackdata: *const FLT_CALLBACK_DATA, traversecallback: Option, subjectcontext: Option<*const super::super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: Option) where - P0: windows_core::Param, P4: windows_core::Param, P5: 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(), core::mem::transmute(notifylist), core::mem::transmute(fscontext), core::mem::transmute(fulldirectoryname), watchtree.param().abi(), ignorebuffer.param().abi(), core::mem::transmute(completionfilter), core::mem::transmute(notifycallbackdata), core::mem::transmute(traversecallback), core::mem::transmute(subjectcontext.unwrap_or(core::ptr::null())), core::mem::transmute(filtercallback)) + FltNotifyFilterChangeDirectory( + core::mem::transmute(notifysync), + core::mem::transmute(notifylist), + core::mem::transmute(fscontext), + core::mem::transmute(fulldirectoryname), + watchtree.param().abi(), + ignorebuffer.param().abi(), + core::mem::transmute(completionfilter), + core::mem::transmute(notifycallbackdata), + core::mem::transmute(traversecallback.unwrap_or(core::mem::zeroed())), + core::mem::transmute(subjectcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(filtercallback.unwrap_or(core::mem::zeroed())), + ) } #[inline] pub unsafe fn FltObjectDereference(fltobject: *mut core::ffi::c_void) { @@ -1384,30 +1093,27 @@ pub unsafe fn FltObjectReference(fltobject: *mut core::ffi::c_void) -> super::su } #[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 FltOpenVolume(instance: P0, volumehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, volumefileobject: Option<*mut *mut super::super::super::Foundation::FILE_OBJECT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltOpenVolume(instance: PFLT_INSTANCE, volumehandle: *mut super::super::super::super::Win32::Foundation::HANDLE, volumefileobject: Option<*mut *mut super::super::super::Foundation::FILE_OBJECT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(volumehandle), core::mem::transmute(volumefileobject.unwrap_or(core::ptr::null_mut()))) + FltOpenVolume(core::mem::transmute(instance), core::mem::transmute(volumehandle), core::mem::transmute(volumefileobject.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, prepostcallbackdataroutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(waitcompletionroutine), core::mem::transmute(prepostcallbackdataroutine)) + FltOplockBreakH(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitcompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()))) } #[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 { +pub unsafe fn FltOplockBreakToNone(oplock: *const *const core::ffi::c_void, callbackdata: *const FLT_CALLBACK_DATA, context: Option<*const core::ffi::c_void>, waitcompletionroutine: Option, prepostcallbackdataroutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(waitcompletionroutine), core::mem::transmute(prepostcallbackdataroutine)) + FltOplockBreakToNone(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitcompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, prepostcallbackdataroutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(waitcompletionroutine), core::mem::transmute(prepostcallbackdataroutine)) + FltOplockBreakToNoneEx(core::mem::transmute(oplock), core::mem::transmute(callbackdata), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitcompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(prepostcallbackdataroutine.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1436,12 +1142,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(core::ptr::null())), core::mem::transmute(fo2.unwrap_or(core::ptr::null()))) + FltOplockKeysEqual(core::mem::transmute(fo1.unwrap_or(core::mem::zeroed())), core::mem::transmute(fo2.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(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()))) + FltParseFileName(core::mem::transmute(filename), core::mem::transmute(extension.unwrap_or(core::mem::zeroed())), core::mem::transmute(stream.unwrap_or(core::mem::zeroed())), core::mem::transmute(finalcomponent.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FltParseFileNameInformation(filenameinformation: *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -1462,37 +1168,26 @@ pub unsafe fn FltPerformSynchronousIo(callbackdata: *mut FLT_CALLBACK_DATA) { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltPrePrepareComplete(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: P2) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltPrePrepareComplete(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: Option) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltPrePrepareComplete(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, transactioncontext : PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltPrePrepareComplete(instance.param().abi(), core::mem::transmute(transaction), transactioncontext.param().abi()) + FltPrePrepareComplete(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltPrepareComplete(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: P2) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltPrepareComplete(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: Option) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltPrepareComplete(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, transactioncontext : PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltPrepareComplete(instance.param().abi(), core::mem::transmute(transaction), transactioncontext.param().abi()) + FltPrepareComplete(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FltPrepareToReuseEcp(filter: P0, ecpcontext: *const core::ffi::c_void) -where - P0: windows_core::Param, -{ +pub unsafe fn FltPrepareToReuseEcp(filter: PFLT_FILTER, ecpcontext: *const core::ffi::c_void) { windows_targets::link!("fltmgr.sys" "system" fn FltPrepareToReuseEcp(filter : PFLT_FILTER, ecpcontext : *const core::ffi::c_void)); - FltPrepareToReuseEcp(filter.param().abi(), core::mem::transmute(ecpcontext)) + FltPrepareToReuseEcp(core::mem::transmute(filter), core::mem::transmute(ecpcontext)) } #[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 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(core::mem::transmute(filelock), core::mem::transmute(callbackdata), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + FltProcessFileLock(core::mem::transmute(filelock), core::mem::transmute(callbackdata), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1508,156 +1203,116 @@ pub unsafe fn FltPropagateIrpExtension(sourcedata: *const FLT_CALLBACK_DATA, tar } #[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 FltPurgeFileNameInformationCache(instance: P0, fileobject: Option<*const super::super::super::Foundation::FILE_OBJECT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltPurgeFileNameInformationCache(instance: PFLT_INSTANCE, fileobject: Option<*const super::super::super::Foundation::FILE_OBJECT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + FltPurgeFileNameInformationCache(core::mem::transmute(instance), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed()))) } #[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 FltQueryDirectoryFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: super::FILE_INFORMATION_CLASS, returnsingleentry: P5, filename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P7, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS +pub unsafe 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: P5, filename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P7, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P5: windows_core::Param, P7: 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(), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(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()))) + FltQueryDirectoryFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[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 FltQueryDirectoryFileEx(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: super::FILE_INFORMATION_CLASS, queryflags: u32, filename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(queryflags), core::mem::transmute(filename.unwrap_or(core::ptr::null())), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) + FltQueryDirectoryFileEx(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(queryflags), core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[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 FltQueryEaFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, returnedeadata: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn FltQueryEaFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, returnedeadata: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P4: windows_core::Param, P8: 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(), core::mem::transmute(fileobject), core::mem::transmute(returnedeadata), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::ptr::null())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) + FltQueryEaFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(returnedeadata), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn FltQueryInformationByName(filter: P0, instance: P1, 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: Option<*const super::super::super::System::SystemServices::IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FltQueryInformationByName(filter: PFLT_FILTER, instance: Option, 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: Option<*const super::super::super::System::SystemServices::IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) + FltQueryInformationByName(core::mem::transmute(filter), core::mem::transmute(instance.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed()))) } #[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 FltQueryInformationFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: super::FILE_INFORMATION_CLASS, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) + FltQueryInformationFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[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 FltQueryQuotaInformationFile(instance: P0, 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: P5, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option<*const u32>, restartscan: P9, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS +pub unsafe 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: P5, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option<*const u32>, restartscan: P9, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P5: windows_core::Param, P9: 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(), core::mem::transmute(fileobject), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::ptr::null())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) + FltQueryQuotaInformationFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[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 FltQuerySecurityObject(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, securityinformation: u32, securitydescriptor: super::super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, length: u32, lengthneeded: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltQuerySecurityObject(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, securityinformation: u32, securitydescriptor: Option, length: u32, lengthneeded: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor), core::mem::transmute(length), core::mem::transmute(lengthneeded.unwrap_or(core::ptr::null_mut()))) + FltQuerySecurityObject(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(lengthneeded.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn FltQueryVolumeInformation(instance: P0, iosb: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: super::FS_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltQueryVolumeInformation(instance: PFLT_INSTANCE, iosb: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: super::FS_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltQueryVolumeInformation(instance : PFLT_INSTANCE, iosb : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fsinformation : *mut core::ffi::c_void, length : u32, fsinformationclass : super:: FS_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryVolumeInformation(instance.param().abi(), core::mem::transmute(iosb), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) + FltQueryVolumeInformation(core::mem::transmute(instance), core::mem::transmute(iosb), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) } #[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 FltQueryVolumeInformationFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: super::FS_INFORMATION_CLASS, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) + FltQueryVolumeInformationFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[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 FltQueueDeferredIoWorkItem(fltworkitem: P0, data: *const FLT_CALLBACK_DATA, workerroutine: PFLT_DEFERRED_IO_WORKITEM_ROUTINE, queuetype: super::super::super::System::SystemServices::WORK_QUEUE_TYPE, context: *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltQueueDeferredIoWorkItem(fltworkitem: PFLT_DEFERRED_IO_WORKITEM, data: *const FLT_CALLBACK_DATA, workerroutine: PFLT_DEFERRED_IO_WORKITEM_ROUTINE, queuetype: super::super::super::System::SystemServices::WORK_QUEUE_TYPE, context: *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltQueueDeferredIoWorkItem(fltworkitem : PFLT_DEFERRED_IO_WORKITEM, data : *const FLT_CALLBACK_DATA, workerroutine : PFLT_DEFERRED_IO_WORKITEM_ROUTINE, queuetype : super::super::super::System::SystemServices:: WORK_QUEUE_TYPE, context : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueueDeferredIoWorkItem(fltworkitem.param().abi(), core::mem::transmute(data), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context)) + FltQueueDeferredIoWorkItem(core::mem::transmute(fltworkitem), core::mem::transmute(data), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context)) } #[cfg(feature = "Wdk_System_SystemServices")] #[inline] -pub unsafe fn FltQueueGenericWorkItem(fltworkitem: P0, fltobject: *const core::ffi::c_void, workerroutine: PFLT_GENERIC_WORKITEM_ROUTINE, queuetype: super::super::super::System::SystemServices::WORK_QUEUE_TYPE, context: Option<*const core::ffi::c_void>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const core::ffi::c_void>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fltobject), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + FltQueueGenericWorkItem(core::mem::transmute(fltworkitem), core::mem::transmute(fltobject), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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 FltReadFile(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, byteoffset: Option<*const i64>, length: u32, buffer: *mut core::ffi::c_void, flags: u32, bytesread: Option<*mut u32>, callbackroutine: PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltReadFile(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, byteoffset: Option<*const i64>, length: u32, buffer: *mut core::ffi::c_void, flags: u32, bytesread: Option<*mut u32>, callbackroutine: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(length), core::mem::transmute(buffer), core::mem::transmute(flags), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(callbackroutine), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + FltReadFile(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(buffer), core::mem::transmute(flags), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[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 FltReadFileEx(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, byteoffset: Option<*const i64>, length: u32, buffer: Option<*mut core::ffi::c_void>, flags: u32, bytesread: Option<*mut u32>, callbackroutine: PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>, key: Option<*const u32>, mdl: Option<*const super::super::super::Foundation::MDL>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltReadFileEx(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, byteoffset: Option<*const i64>, length: u32, buffer: Option<*mut core::ffi::c_void>, flags: u32, bytesread: Option<*mut u32>, callbackroutine: Option, callbackcontext: Option<*const core::ffi::c_void>, key: Option<*const u32>, mdl: Option<*const super::super::super::Foundation::MDL>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), + core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), - core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), + core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), - core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(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())), + core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed())), + core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(key.unwrap_or(core::mem::zeroed())), + core::mem::transmute(mdl.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn FltReferenceContext(context: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FltReferenceContext(context: PFLT_CONTEXT) { windows_targets::link!("fltmgr.sys" "system" fn FltReferenceContext(context : PFLT_CONTEXT)); - FltReferenceContext(context.param().abi()) + FltReferenceContext(core::mem::transmute(context)) } #[inline] pub unsafe fn FltReferenceFileNameInformation(filenameinformation: *const FLT_FILE_NAME_INFORMATION) { @@ -1671,29 +1326,20 @@ pub unsafe fn FltRegisterFilter(driver: *const super::super::super::Foundation:: FltRegisterFilter(core::mem::transmute(driver), core::mem::transmute(registration), core::mem::transmute(retfilter)) } #[inline] -pub unsafe fn FltRegisterForDataScan(instance: P0) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltRegisterForDataScan(instance: PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltRegisterForDataScan(instance : PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltRegisterForDataScan(instance.param().abi()) + FltRegisterForDataScan(core::mem::transmute(instance)) } #[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 FltReissueSynchronousIo(initiatinginstance: P0, callbackdata: *const FLT_CALLBACK_DATA) -where - P0: windows_core::Param, -{ +pub unsafe fn FltReissueSynchronousIo(initiatinginstance: PFLT_INSTANCE, callbackdata: *const FLT_CALLBACK_DATA) { windows_targets::link!("fltmgr.sys" "system" fn FltReissueSynchronousIo(initiatinginstance : PFLT_INSTANCE, callbackdata : *const FLT_CALLBACK_DATA)); - FltReissueSynchronousIo(initiatinginstance.param().abi(), core::mem::transmute(callbackdata)) + FltReissueSynchronousIo(core::mem::transmute(initiatinginstance), core::mem::transmute(callbackdata)) } #[inline] -pub unsafe fn FltReleaseContext(context: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FltReleaseContext(context: PFLT_CONTEXT) { windows_targets::link!("fltmgr.sys" "system" fn FltReleaseContext(context : PFLT_CONTEXT)); - FltReleaseContext(context.param().abi()) + FltReleaseContext(core::mem::transmute(context)) } #[inline] pub unsafe fn FltReleaseContexts(contexts: *const FLT_RELATED_CONTEXTS) { @@ -1728,36 +1374,27 @@ pub unsafe fn FltReleaseResource(resource: *mut super::super::super::Foundation: } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltRemoveExtraCreateParameter(filter: P0, ecplist: *mut super::super::super::Foundation::ECP_LIST, ecptype: *const windows_core::GUID, ecpcontext: *mut *mut core::ffi::c_void, ecpcontextsize: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(ecplist), core::mem::transmute(ecptype), core::mem::transmute(ecpcontext), core::mem::transmute(ecpcontextsize.unwrap_or(core::ptr::null_mut()))) + FltRemoveExtraCreateParameter(core::mem::transmute(filter), core::mem::transmute(ecplist), core::mem::transmute(ecptype), core::mem::transmute(ecpcontext), core::mem::transmute(ecpcontextsize.unwrap_or(core::mem::zeroed()))) } #[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 FltRemoveOpenReparseEntry(filter: P0, data: *const FLT_CALLBACK_DATA, openreparseentry: *const super::OPEN_REPARSE_LIST_ENTRY) -where - P0: windows_core::Param, -{ +pub unsafe fn FltRemoveOpenReparseEntry(filter: PFLT_FILTER, data: *const FLT_CALLBACK_DATA, openreparseentry: *const super::OPEN_REPARSE_LIST_ENTRY) { windows_targets::link!("fltmgr.sys" "system" fn FltRemoveOpenReparseEntry(filter : PFLT_FILTER, data : *const FLT_CALLBACK_DATA, openreparseentry : *const super:: OPEN_REPARSE_LIST_ENTRY)); - FltRemoveOpenReparseEntry(filter.param().abi(), core::mem::transmute(data), core::mem::transmute(openreparseentry)) + FltRemoveOpenReparseEntry(core::mem::transmute(filter), core::mem::transmute(data), core::mem::transmute(openreparseentry)) } #[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 FltRequestFileInfoOnCreateCompletion(filter: P0, data: *const FLT_CALLBACK_DATA, infoclassflags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltRequestFileInfoOnCreateCompletion(filter: PFLT_FILTER, data: *const FLT_CALLBACK_DATA, infoclassflags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltRequestFileInfoOnCreateCompletion(filter : PFLT_FILTER, data : *const FLT_CALLBACK_DATA, infoclassflags : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltRequestFileInfoOnCreateCompletion(filter.param().abi(), core::mem::transmute(data), core::mem::transmute(infoclassflags)) + FltRequestFileInfoOnCreateCompletion(core::mem::transmute(filter), core::mem::transmute(data), core::mem::transmute(infoclassflags)) } #[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 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(core::mem::transmute(data), core::mem::transmute(callbackroutine), core::mem::transmute(requestercontext.unwrap_or(core::ptr::null()))) + FltRequestOperationStatusCallback(core::mem::transmute(data), core::mem::transmute(callbackroutine), core::mem::transmute(requestercontext.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1767,30 +1404,21 @@ pub unsafe fn FltRetainSwappedBufferMdlAddress(callbackdata: *const FLT_CALLBACK } #[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 FltRetrieveFileInfoOnCreateCompletion(filter: P0, data: *const FLT_CALLBACK_DATA, infoclass: u32, size: *mut u32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn FltRetrieveFileInfoOnCreateCompletion(filter: PFLT_FILTER, data: *const FLT_CALLBACK_DATA, infoclass: u32, size: *mut u32) -> *mut core::ffi::c_void { windows_targets::link!("fltmgr.sys" "system" fn FltRetrieveFileInfoOnCreateCompletion(filter : PFLT_FILTER, data : *const FLT_CALLBACK_DATA, infoclass : u32, size : *mut u32) -> *mut core::ffi::c_void); - FltRetrieveFileInfoOnCreateCompletion(filter.param().abi(), core::mem::transmute(data), core::mem::transmute(infoclass), core::mem::transmute(size)) + FltRetrieveFileInfoOnCreateCompletion(core::mem::transmute(filter), core::mem::transmute(data), core::mem::transmute(infoclass), core::mem::transmute(size)) } #[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 FltRetrieveFileInfoOnCreateCompletionEx(filter: P0, data: *const FLT_CALLBACK_DATA, infoclass: u32, retinfosize: *mut u32, retinfobuffer: *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltRetrieveFileInfoOnCreateCompletionEx(filter: PFLT_FILTER, data: *const FLT_CALLBACK_DATA, infoclass: u32, retinfosize: *mut u32, retinfobuffer: *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltRetrieveFileInfoOnCreateCompletionEx(filter : PFLT_FILTER, data : *const FLT_CALLBACK_DATA, infoclass : u32, retinfosize : *mut u32, retinfobuffer : *mut *mut core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltRetrieveFileInfoOnCreateCompletionEx(filter.param().abi(), core::mem::transmute(data), core::mem::transmute(infoclass), core::mem::transmute(retinfosize), core::mem::transmute(retinfobuffer)) + FltRetrieveFileInfoOnCreateCompletionEx(core::mem::transmute(filter), core::mem::transmute(data), core::mem::transmute(infoclass), core::mem::transmute(retinfosize), core::mem::transmute(retinfobuffer)) } #[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 FltRetrieveIoPriorityInfo(data: Option<*const FLT_CALLBACK_DATA>, fileobject: Option<*const super::super::super::Foundation::FILE_OBJECT>, thread: P2, priorityinfo: *mut super::IO_PRIORITY_INFO) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn FltRetrieveIoPriorityInfo(data: Option<*const FLT_CALLBACK_DATA>, fileobject: Option<*const super::super::super::Foundation::FILE_OBJECT>, thread: Option, priorityinfo: *mut super::IO_PRIORITY_INFO) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), thread.param().abi(), core::mem::transmute(priorityinfo)) + FltRetrieveIoPriorityInfo(core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(thread.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] @@ -1800,37 +1428,26 @@ pub unsafe fn FltReuseCallbackData(callbackdata: *mut FLT_CALLBACK_DATA) { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltRollbackComplete(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: P2) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltRollbackComplete(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: Option) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltRollbackComplete(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, transactioncontext : PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltRollbackComplete(instance.param().abi(), core::mem::transmute(transaction), transactioncontext.param().abi()) + FltRollbackComplete(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltRollbackEnlistment(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: P2) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltRollbackEnlistment(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, transactioncontext: Option) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltRollbackEnlistment(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, transactioncontext : PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltRollbackEnlistment(instance.param().abi(), core::mem::transmute(transaction), transactioncontext.param().abi()) + FltRollbackEnlistment(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(transactioncontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FltSendMessage(filter: P0, clientport: *const PFLT_PORT, senderbuffer: *const core::ffi::c_void, senderbufferlength: u32, replybuffer: Option<*mut core::ffi::c_void>, replylength: Option<*mut u32>, timeout: Option<*const i64>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltSendMessage(filter: PFLT_FILTER, clientport: *const PFLT_PORT, senderbuffer: *const core::ffi::c_void, senderbufferlength: u32, replybuffer: Option<*mut core::ffi::c_void>, replylength: Option<*mut u32>, timeout: Option<*const i64>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(clientport), core::mem::transmute(senderbuffer), core::mem::transmute(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()))) + FltSendMessage(core::mem::transmute(filter), core::mem::transmute(clientport), core::mem::transmute(senderbuffer), core::mem::transmute(senderbufferlength), core::mem::transmute(replybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(replylength.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(callbackdata), core::mem::transmute(guid.unwrap_or(core::ptr::null()))) + FltSetActivityIdCallbackData(core::mem::transmute(callbackdata), core::mem::transmute(guid.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1846,31 +1463,21 @@ pub unsafe fn FltSetCancelCompletion(callbackdata: *const FLT_CALLBACK_DATA, can } #[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 FltSetEaFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, eabuffer: *const core::ffi::c_void, length: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltSetEaFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, eabuffer: *const core::ffi::c_void, length: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltSetEaFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, eabuffer : *const core::ffi::c_void, length : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetEaFile(instance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(eabuffer), core::mem::transmute(length)) + FltSetEaFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(eabuffer), core::mem::transmute(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] -pub unsafe fn FltSetEcpListIntoCallbackData(filter: P0, callbackdata: *const FLT_CALLBACK_DATA, ecplist: *const super::super::super::Foundation::ECP_LIST) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltSetEcpListIntoCallbackData(filter: PFLT_FILTER, callbackdata: *const FLT_CALLBACK_DATA, ecplist: *const super::super::super::Foundation::ECP_LIST) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltSetEcpListIntoCallbackData(filter : PFLT_FILTER, callbackdata : *const FLT_CALLBACK_DATA, ecplist : *const super::super::super::Foundation:: ECP_LIST) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetEcpListIntoCallbackData(filter.param().abi(), core::mem::transmute(callbackdata), core::mem::transmute(ecplist)) + FltSetEcpListIntoCallbackData(core::mem::transmute(filter), core::mem::transmute(callbackdata), core::mem::transmute(ecplist)) } #[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 FltSetFileContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, operation: FLT_SET_CONTEXT_OPERATION, newcontext: P3, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FltSetFileContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, operation: FLT_SET_CONTEXT_OPERATION, newcontext: PFLT_CONTEXT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(operation), newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltSetFileContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(operation), core::mem::transmute(newcontext), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1886,21 +1493,14 @@ pub unsafe fn FltSetFsZeroingOffsetRequired(data: *const FLT_CALLBACK_DATA) -> s } #[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 FltSetInformationFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileinformation: *const core::ffi::c_void, length: u32, fileinformationclass: super::FILE_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltSetInformationFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileinformation: *const core::ffi::c_void, length: u32, fileinformationclass: super::FILE_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltSetInformationFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fileinformation : *const core::ffi::c_void, length : u32, fileinformationclass : super:: FILE_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetInformationFile(instance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) + FltSetInformationFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) } #[inline] -pub unsafe fn FltSetInstanceContext(instance: P0, operation: FLT_SET_CONTEXT_OPERATION, newcontext: P2, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltSetInstanceContext(instance: PFLT_INSTANCE, operation: FLT_SET_CONTEXT_OPERATION, newcontext: PFLT_CONTEXT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(operation), newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltSetInstanceContext(core::mem::transmute(instance), core::mem::transmute(operation), core::mem::transmute(newcontext), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1916,87 +1516,55 @@ pub unsafe fn FltSetIoPriorityHintIntoFileObject(fileobject: *const super::super } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltSetIoPriorityHintIntoThread(thread: P0, priorityhint: super::super::super::Foundation::IO_PRIORITY_HINT) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltSetIoPriorityHintIntoThread(thread: super::super::super::Foundation::PETHREAD, priorityhint: super::super::super::Foundation::IO_PRIORITY_HINT) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltSetIoPriorityHintIntoThread(thread : super::super::super::Foundation:: PETHREAD, priorityhint : super::super::super::Foundation:: IO_PRIORITY_HINT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetIoPriorityHintIntoThread(thread.param().abi(), core::mem::transmute(priorityhint)) + FltSetIoPriorityHintIntoThread(core::mem::transmute(thread), core::mem::transmute(priorityhint)) } #[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 FltSetQuotaInformationFile(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltSetQuotaInformationFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltSetQuotaInformationFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, buffer : *const core::ffi::c_void, length : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetQuotaInformationFile(instance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(buffer), core::mem::transmute(length)) + FltSetQuotaInformationFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(buffer), core::mem::transmute(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] -pub unsafe fn FltSetSecurityObject(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, securityinformation: u32, securitydescriptor: P3) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FltSetSecurityObject(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, securityinformation: u32, securitydescriptor: super::super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltSetSecurityObject(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, securityinformation : u32, securitydescriptor : super::super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetSecurityObject(instance.param().abi(), core::mem::transmute(fileobject), core::mem::transmute(securityinformation), securitydescriptor.param().abi()) + FltSetSecurityObject(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor)) } #[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 FltSetStreamContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, operation: FLT_SET_CONTEXT_OPERATION, newcontext: P3, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FltSetStreamContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, operation: FLT_SET_CONTEXT_OPERATION, newcontext: PFLT_CONTEXT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(operation), newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltSetStreamContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(operation), core::mem::transmute(newcontext), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[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 FltSetStreamHandleContext(instance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, operation: FLT_SET_CONTEXT_OPERATION, newcontext: P3, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FltSetStreamHandleContext(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, operation: FLT_SET_CONTEXT_OPERATION, newcontext: PFLT_CONTEXT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(operation), newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltSetStreamHandleContext(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(operation), core::mem::transmute(newcontext), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FltSetTransactionContext(instance: P0, transaction: *const super::super::super::Foundation::KTRANSACTION, operation: FLT_SET_CONTEXT_OPERATION, newcontext: P3, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FltSetTransactionContext(instance: PFLT_INSTANCE, transaction: *const super::super::super::Foundation::KTRANSACTION, operation: FLT_SET_CONTEXT_OPERATION, newcontext: PFLT_CONTEXT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(transaction), core::mem::transmute(operation), newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltSetTransactionContext(core::mem::transmute(instance), core::mem::transmute(transaction), core::mem::transmute(operation), core::mem::transmute(newcontext), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FltSetVolumeContext(volume: P0, operation: FLT_SET_CONTEXT_OPERATION, newcontext: P2, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FltSetVolumeContext(volume: PFLT_VOLUME, operation: FLT_SET_CONTEXT_OPERATION, newcontext: PFLT_CONTEXT, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(operation), newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + FltSetVolumeContext(core::mem::transmute(volume), core::mem::transmute(operation), core::mem::transmute(newcontext), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn FltSetVolumeInformation(instance: P0, iosb: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: super::FS_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltSetVolumeInformation(instance: PFLT_INSTANCE, iosb: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: super::FS_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltSetVolumeInformation(instance : PFLT_INSTANCE, iosb : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fsinformation : *mut core::ffi::c_void, length : u32, fsinformationclass : super:: FS_INFORMATION_CLASS) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetVolumeInformation(instance.param().abi(), core::mem::transmute(iosb), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) + FltSetVolumeInformation(core::mem::transmute(instance), core::mem::transmute(iosb), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) } #[inline] -pub unsafe fn FltStartFiltering(filter: P0) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltStartFiltering(filter: PFLT_FILTER) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltStartFiltering(filter : PFLT_FILTER) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltStartFiltering(filter.param().abi()) + FltStartFiltering(core::mem::transmute(filter)) } #[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] @@ -2006,12 +1574,9 @@ pub unsafe fn FltSupportsFileContexts(fileobject: *const super::super::super::Fo } #[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 FltSupportsFileContextsEx(fileobject: *const super::super::super::Foundation::FILE_OBJECT, instance: P1) -> super::super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn FltSupportsFileContextsEx(fileobject: *const super::super::super::Foundation::FILE_OBJECT, instance: Option) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltSupportsFileContextsEx(fileobject : *const super::super::super::Foundation:: FILE_OBJECT, instance : PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltSupportsFileContextsEx(core::mem::transmute(fileobject), instance.param().abi()) + FltSupportsFileContextsEx(core::mem::transmute(fileobject), core::mem::transmute(instance.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2027,21 +1592,15 @@ pub unsafe fn FltSupportsStreamHandleContexts(fileobject: *const super::super::s } #[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 FltTagFile(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, filetag: u32, guid: Option<*const windows_core::GUID>, databuffer: *const core::ffi::c_void, databufferlength: u16) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltTagFile(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, filetag: u32, guid: Option<*const windows_core::GUID>, databuffer: *const core::ffi::c_void, databufferlength: u16) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(filetag), core::mem::transmute(guid.unwrap_or(core::ptr::null())), core::mem::transmute(databuffer), core::mem::transmute(databufferlength)) + FltTagFile(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(filetag), core::mem::transmute(guid.unwrap_or(core::mem::zeroed())), core::mem::transmute(databuffer), core::mem::transmute(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] -pub unsafe fn FltTagFileEx(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, filetag: u32, guid: Option<*const windows_core::GUID>, databuffer: *const core::ffi::c_void, databufferlength: u16, existingfiletag: u32, existingguid: Option<*const windows_core::GUID>, flags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltTagFileEx(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, filetag: u32, guid: Option<*const windows_core::GUID>, databuffer: *const core::ffi::c_void, databufferlength: u16, existingfiletag: u32, existingguid: Option<*const windows_core::GUID>, flags: u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(filetag), core::mem::transmute(guid.unwrap_or(core::ptr::null())), core::mem::transmute(databuffer), core::mem::transmute(databufferlength), core::mem::transmute(existingfiletag), core::mem::transmute(existingguid.unwrap_or(core::ptr::null())), core::mem::transmute(flags)) + FltTagFileEx(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(filetag), core::mem::transmute(guid.unwrap_or(core::mem::zeroed())), core::mem::transmute(databuffer), core::mem::transmute(databufferlength), core::mem::transmute(existingfiletag), core::mem::transmute(existingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] @@ -2060,59 +1619,44 @@ pub unsafe fn FltUnloadFilter(filtername: *const super::super::super::super::Win FltUnloadFilter(core::mem::transmute(filtername)) } #[inline] -pub unsafe fn FltUnregisterFilter(filter: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FltUnregisterFilter(filter: PFLT_FILTER) { windows_targets::link!("fltmgr.sys" "system" fn FltUnregisterFilter(filter : PFLT_FILTER)); - FltUnregisterFilter(filter.param().abi()) + FltUnregisterFilter(core::mem::transmute(filter)) } #[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 FltUntagFile(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, filetag: u32, guid: Option<*const windows_core::GUID>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltUntagFile(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, filetag: u32, guid: Option<*const windows_core::GUID>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(filetag), core::mem::transmute(guid.unwrap_or(core::ptr::null()))) + FltUntagFile(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(filetag), core::mem::transmute(guid.unwrap_or(core::mem::zeroed()))) } #[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 FltVetoBypassIo(callbackdata: *const FLT_CALLBACK_DATA, fltobjects: *const FLT_RELATED_OBJECTS, operationstatus: P2, failurereason: *const super::super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn FltVetoBypassIo(callbackdata: *const FLT_CALLBACK_DATA, fltobjects: *const FLT_RELATED_OBJECTS, operationstatus: super::super::super::super::Win32::Foundation::NTSTATUS, failurereason: *const super::super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltVetoBypassIo(callbackdata : *const FLT_CALLBACK_DATA, fltobjects : *const FLT_RELATED_OBJECTS, operationstatus : super::super::super::super::Win32::Foundation:: NTSTATUS, failurereason : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltVetoBypassIo(core::mem::transmute(callbackdata), core::mem::transmute(fltobjects), operationstatus.param().abi(), core::mem::transmute(failurereason)) + FltVetoBypassIo(core::mem::transmute(callbackdata), core::mem::transmute(fltobjects), core::mem::transmute(operationstatus), core::mem::transmute(failurereason)) } #[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 FltWriteFile(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, byteoffset: Option<*const i64>, length: u32, buffer: *const core::ffi::c_void, flags: u32, byteswritten: Option<*mut u32>, callbackroutine: PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltWriteFile(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, byteoffset: Option<*const i64>, length: u32, buffer: *const core::ffi::c_void, flags: u32, byteswritten: Option<*mut u32>, callbackroutine: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(fileobject), core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(length), core::mem::transmute(buffer), core::mem::transmute(flags), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(callbackroutine), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + FltWriteFile(core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(buffer), core::mem::transmute(flags), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[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 FltWriteFileEx(initiatinginstance: P0, fileobject: *const super::super::super::Foundation::FILE_OBJECT, byteoffset: Option<*const i64>, length: u32, buffer: Option<*const core::ffi::c_void>, flags: u32, byteswritten: Option<*mut u32>, callbackroutine: PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>, key: Option<*const u32>, mdl: Option<*const super::super::super::Foundation::MDL>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn FltWriteFileEx(initiatinginstance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, byteoffset: Option<*const i64>, length: u32, buffer: Option<*const core::ffi::c_void>, flags: u32, byteswritten: Option<*mut u32>, callbackroutine: Option, callbackcontext: Option<*const core::ffi::c_void>, key: Option<*const u32>, mdl: Option<*const super::super::super::Foundation::MDL>) -> super::super::super::super::Win32::Foundation::NTSTATUS { 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(), + core::mem::transmute(initiatinginstance), core::mem::transmute(fileobject), - core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), + core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), - core::mem::transmute(buffer.unwrap_or(core::ptr::null())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), - core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(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())), + core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed())), + core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(key.unwrap_or(core::mem::zeroed())), + core::mem::transmute(mdl.unwrap_or(core::mem::zeroed())), ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] 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 40ab0f4d48..a0aa7300a1 100644 --- a/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs @@ -7,13 +7,12 @@ pub unsafe fn ApplyControlToken(phcontext: *const SecHandle, pinput: *const SecB } #[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 CcAsyncCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: P6, asyncreadcontext: *const CC_ASYNC_READ_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn CcAsyncCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: super::super::Foundation::PETHREAD, asyncreadcontext: *const CC_ASYNC_READ_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN where P3: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn CcAsyncCopyRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, ioissuerthread : super::super::Foundation:: PETHREAD, asyncreadcontext : *const CC_ASYNC_READ_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcAsyncCopyRead(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(iostatus), ioissuerthread.param().abi(), core::mem::transmute(asyncreadcontext)) + CcAsyncCopyRead(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(ioissuerthread), core::mem::transmute(asyncreadcontext)) } #[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] @@ -22,13 +21,13 @@ where P2: 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(core::ptr::null())), core::mem::transmute(bytestowrite), wait.param().abi(), core::mem::transmute(retrying)) + CcCanIWrite(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(bytestowrite), wait.param().abi(), core::mem::transmute(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) { +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: Option) { 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(core::mem::transmute(sectionobjectpointer), core::mem::transmute(fileoffset.unwrap_or(core::ptr::null())), core::mem::transmute(length), core::mem::transmute(iostatus), core::mem::transmute(flags)) + CcCoherencyFlushAndPurgeCache(core::mem::transmute(sectionobjectpointer), core::mem::transmute(fileoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(iostatus), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[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] @@ -41,13 +40,12 @@ where } #[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 CcCopyReadEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: P6) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn CcCopyReadEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN where P3: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyReadEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, ioissuerthread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCopyReadEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(iostatus), ioissuerthread.param().abi()) + CcCopyReadEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(ioissuerthread)) } #[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] @@ -60,19 +58,18 @@ where } #[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 CcCopyWriteEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *const core::ffi::c_void, ioissuerthread: P5) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn CcCopyWriteEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *const core::ffi::c_void, ioissuerthread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN where P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyWriteEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *const core::ffi::c_void, ioissuerthread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCopyWriteEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), ioissuerthread.param().abi()) + CcCopyWriteEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(ioissuerthread)) } #[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 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(core::mem::transmute(fileobject), core::mem::transmute(fileoffset.unwrap_or(core::ptr::null())), core::mem::transmute(length)) + CcCopyWriteWontFlush(core::mem::transmute(fileobject), core::mem::transmute(fileoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +101,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(core::mem::transmute(sectionobjectpointer), core::mem::transmute(fileoffset.unwrap_or(core::ptr::null())), core::mem::transmute(length), core::mem::transmute(iostatus.unwrap_or(core::ptr::null_mut()))) + CcFlushCache(core::mem::transmute(sectionobjectpointer), core::mem::transmute(fileoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(iostatus.unwrap_or(core::mem::zeroed()))) } #[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] @@ -158,12 +155,9 @@ where CcInitializeCacheMapEx(core::mem::transmute(fileobject), core::mem::transmute(filesizes), pinaccess.param().abi(), core::mem::transmute(callbacks), core::mem::transmute(lazywritecontext), core::mem::transmute(flags)) } #[inline] -pub unsafe fn CcIsCacheManagerCallbackNeeded(status: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn CcIsCacheManagerCallbackNeeded(status: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcIsCacheManagerCallbackNeeded(status : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcIsCacheManagerCallbackNeeded(status.param().abi()) + CcIsCacheManagerCallbackNeeded(core::mem::transmute(status)) } #[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 +169,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(core::mem::transmute(vpb), core::mem::transmute(numberofdirtypages.unwrap_or(core::ptr::null()))) + CcIsThereDirtyDataEx(core::mem::transmute(vpb), core::mem::transmute(numberofdirtypages.unwrap_or(core::mem::zeroed()))) } #[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 +232,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(core::mem::transmute(sectionobjectpointer), core::mem::transmute(fileoffset.unwrap_or(core::ptr::null())), core::mem::transmute(length), core::mem::transmute(flags)) + CcPurgeCacheSection(core::mem::transmute(sectionobjectpointer), core::mem::transmute(fileoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(flags)) } #[inline] pub unsafe fn CcRemapBcb(bcb: *const core::ffi::c_void) -> *mut core::ffi::c_void { @@ -258,12 +252,9 @@ pub unsafe fn CcScheduleReadAhead(fileobject: *const super::super::Foundation::F } #[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 CcScheduleReadAheadEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, ioissuerthread: P3) -where - P3: windows_core::Param, -{ +pub unsafe fn CcScheduleReadAheadEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, ioissuerthread: super::super::Foundation::PETHREAD) { windows_targets::link!("ntoskrnl.exe" "system" fn CcScheduleReadAheadEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, ioissuerthread : super::super::Foundation:: PETHREAD)); - CcScheduleReadAheadEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), ioissuerthread.param().abi()) + CcScheduleReadAheadEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(ioissuerthread)) } #[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] @@ -295,7 +286,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(core::mem::transmute(bcbvoid), core::mem::transmute(lsn.unwrap_or(core::ptr::null()))) + CcSetDirtyPinnedData(core::mem::transmute(bcbvoid), core::mem::transmute(lsn.unwrap_or(core::mem::zeroed()))) } #[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 +325,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(core::mem::transmute(fileobject), core::mem::transmute(truncatesize.unwrap_or(core::ptr::null())), core::mem::transmute(uninitializeevent.unwrap_or(core::ptr::null()))) + CcUninitializeCacheMap(core::mem::transmute(fileobject), core::mem::transmute(truncatesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(uninitializeevent.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CcUnpinData(bcb: *const core::ffi::c_void) { @@ -447,14 +438,14 @@ pub unsafe fn FsRtlAllocateAePushLock(pooltype: super::super::Foundation::POOL_T FsRtlAllocateAePushLock(core::mem::transmute(pooltype), core::mem::transmute(tag)) } #[inline] -pub unsafe fn FsRtlAllocateExtraCreateParameter(ecptype: *const windows_core::GUID, sizeofcontext: u32, flags: u32, cleanupcallback: PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, pooltag: u32, ecpcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn FsRtlAllocateExtraCreateParameter(ecptype: *const windows_core::GUID, sizeofcontext: u32, flags: u32, cleanupcallback: Option, pooltag: u32, ecpcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAllocateExtraCreateParameter(ecptype : *const windows_core::GUID, sizeofcontext : u32, flags : u32, cleanupcallback : PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, pooltag : u32, ecpcontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlAllocateExtraCreateParameter(core::mem::transmute(ecptype), core::mem::transmute(sizeofcontext), core::mem::transmute(flags), core::mem::transmute(cleanupcallback), core::mem::transmute(pooltag), core::mem::transmute(ecpcontext)) + FsRtlAllocateExtraCreateParameter(core::mem::transmute(ecptype), core::mem::transmute(sizeofcontext), core::mem::transmute(flags), core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pooltag), core::mem::transmute(ecpcontext)) } #[inline] -pub unsafe fn FsRtlAllocateExtraCreateParameterFromLookasideList(ecptype: *const windows_core::GUID, sizeofcontext: u32, flags: u32, cleanupcallback: PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, lookasidelist: *mut core::ffi::c_void, ecpcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn FsRtlAllocateExtraCreateParameterFromLookasideList(ecptype: *const windows_core::GUID, sizeofcontext: u32, flags: u32, cleanupcallback: Option, lookasidelist: *mut core::ffi::c_void, ecpcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAllocateExtraCreateParameterFromLookasideList(ecptype : *const windows_core::GUID, sizeofcontext : u32, flags : u32, cleanupcallback : PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, lookasidelist : *mut core::ffi::c_void, ecpcontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlAllocateExtraCreateParameterFromLookasideList(core::mem::transmute(ecptype), core::mem::transmute(sizeofcontext), core::mem::transmute(flags), core::mem::transmute(cleanupcallback), core::mem::transmute(lookasidelist), core::mem::transmute(ecpcontext)) + FsRtlAllocateExtraCreateParameterFromLookasideList(core::mem::transmute(ecptype), core::mem::transmute(sizeofcontext), core::mem::transmute(flags), core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(lookasidelist), core::mem::transmute(ecpcontext)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -464,9 +455,9 @@ pub unsafe fn FsRtlAllocateExtraCreateParameterList(flags: u32, ecplist: *mut *m } #[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 FsRtlAllocateFileLock(completelockirproutine: PCOMPLETE_LOCK_IRP_ROUTINE, unlockroutine: PUNLOCK_ROUTINE) -> *mut FILE_LOCK { +pub unsafe fn FsRtlAllocateFileLock(completelockirproutine: Option, unlockroutine: Option) -> *mut FILE_LOCK { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAllocateFileLock(completelockirproutine : PCOMPLETE_LOCK_IRP_ROUTINE, unlockroutine : PUNLOCK_ROUTINE) -> *mut FILE_LOCK); - FsRtlAllocateFileLock(core::mem::transmute(completelockirproutine), core::mem::transmute(unlockroutine)) + FsRtlAllocateFileLock(core::mem::transmute(completelockirproutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(unlockroutine.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -480,7 +471,7 @@ where P2: 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(core::mem::transmute(constantnamea), core::mem::transmute(constantnameb), ignorecase.param().abi(), core::mem::transmute(upcasetable.unwrap_or(core::ptr::null()))) + FsRtlAreNamesEqual(core::mem::transmute(constantnamea), core::mem::transmute(constantnameb), ignorecase.param().abi(), core::mem::transmute(upcasetable.unwrap_or(core::mem::zeroed()))) } #[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 +500,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()), core::mem::transmute(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()))) + FsRtlCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), core::mem::transmute(waittype), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitblockarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(object), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(irp.unwrap_or(core::ptr::null()))) + FsRtlCancellableWaitForSingleObject(core::mem::transmute(object), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(newfileobject), core::mem::transmute(changebackingtype), core::mem::transmute(flags)) + FsRtlChangeBackingFileObject(core::mem::transmute(currentfileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(newfileobject), core::mem::transmute(changebackingtype), core::mem::transmute(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] @@ -543,27 +534,38 @@ pub unsafe fn FsRtlCheckLockForWriteAccess(filelock: *const FILE_LOCK, irp: *con } #[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 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 { +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: Option, postirproutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine), core::mem::transmute(postirproutine)) + FsRtlCheckOplock(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(postirproutine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, postirproutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine), core::mem::transmute(postirproutine)) + FsRtlCheckOplockEx(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(postirproutine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, postirproutine: Option, timeout: u64, notifycontext: Option<*const core::ffi::c_void>, notifyroutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(flagsex2), core::mem::transmute(completionroutinecontext.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine), core::mem::transmute(postirproutine), core::mem::transmute(timeout), core::mem::transmute(notifycontext.unwrap_or(core::ptr::null())), core::mem::transmute(notifyroutine)) + FsRtlCheckOplockEx2( + core::mem::transmute(oplock), + core::mem::transmute(irp), + core::mem::transmute(flags), + core::mem::transmute(flagsex2), + core::mem::transmute(completionroutinecontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(postirproutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(timeout), + core::mem::transmute(notifycontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(notifyroutine.unwrap_or(core::mem::zeroed())), + ) } #[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 { +pub unsafe fn FsRtlCheckUpperOplock(oplock: *const *const core::ffi::c_void, newloweroplockstate: u32, completionroutinecontext: Option<*const core::ffi::c_void>, completionroutine: Option, prependroutine: Option, 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(core::mem::transmute(oplock), core::mem::transmute(newloweroplockstate), core::mem::transmute(completionroutinecontext.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine), core::mem::transmute(prependroutine), core::mem::transmute(flags)) + FsRtlCheckUpperOplock(core::mem::transmute(oplock), core::mem::transmute(newloweroplockstate), core::mem::transmute(completionroutinecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(prependroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +589,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(core::mem::transmute(sectionhandle), core::mem::transmute(sectionobject), core::mem::transmute(sectionfilesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(fileobject), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), core::mem::transmute(flags)) + FsRtlCreateSectionForDataScan(core::mem::transmute(sectionhandle), core::mem::transmute(sectionobject), core::mem::transmute(sectionfilesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileobject), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), core::mem::transmute(flags)) } #[inline] pub unsafe fn FsRtlCurrentBatchOplock(oplock: *const *const core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -622,21 +624,15 @@ pub unsafe fn FsRtlDeleteTunnelCache(cache: *mut TUNNEL) { FsRtlDeleteTunnelCache(core::mem::transmute(cache)) } #[inline] -pub unsafe fn FsRtlDeregisterUncProvider(handle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn FsRtlDeregisterUncProvider(handle: super::super::super::Win32::Foundation::HANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlDeregisterUncProvider(handle : super::super::super::Win32::Foundation:: HANDLE)); - FsRtlDeregisterUncProvider(handle.param().abi()) + FsRtlDeregisterUncProvider(core::mem::transmute(handle)) } #[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 FsRtlDismountComplete(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, dismountstatus: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn FsRtlDismountComplete(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, dismountstatus: super::super::super::Win32::Foundation::NTSTATUS) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlDismountComplete(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, dismountstatus : super::super::super::Win32::Foundation:: NTSTATUS)); - FsRtlDismountComplete(core::mem::transmute(deviceobject), dismountstatus.param().abi()) + FsRtlDismountComplete(core::mem::transmute(deviceobject), core::mem::transmute(dismountstatus)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -674,37 +670,30 @@ pub unsafe fn FsRtlFastCheckLockForWrite(filelock: *const FILE_LOCK, startingbyt } #[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 FsRtlFastUnlockAll(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, processid: P2, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn FsRtlFastUnlockAll(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, processid: super::super::Foundation::PEPROCESS, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(filelock), core::mem::transmute(fileobject), processid.param().abi(), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + FsRtlFastUnlockAll(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(processid), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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 FsRtlFastUnlockAllByKey(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, processid: P2, key: u32, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn FsRtlFastUnlockAllByKey(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, processid: super::super::Foundation::PEPROCESS, key: u32, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(filelock), core::mem::transmute(fileobject), processid.param().abi(), core::mem::transmute(key), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + FsRtlFastUnlockAllByKey(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(processid), core::mem::transmute(key), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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 FsRtlFastUnlockSingle(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: *const i64, processid: P4, key: u32, context: Option<*const core::ffi::c_void>, alreadysynchronized: P7) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe 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: Option<*const core::ffi::c_void>, alreadysynchronized: P7) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, P7: 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(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), processid.param().abi(), core::mem::transmute(key), core::mem::transmute(context.unwrap_or(core::ptr::null())), alreadysynchronized.param().abi()) + FsRtlFastUnlockSingle(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(processid), core::mem::transmute(key), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(ecplist), core::mem::transmute(ecptype), core::mem::transmute(ecpcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ecpcontextsize.unwrap_or(core::ptr::null_mut()))) + FsRtlFindExtraCreateParameter(core::mem::transmute(ecplist), core::mem::transmute(ecptype), core::mem::transmute(ecpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ecpcontextsize.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -767,7 +756,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(core::mem::transmute(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()))) + FsRtlGetNextExtraCreateParameter(core::mem::transmute(ecplist), core::mem::transmute(currentecpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(nextecptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(nextecpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(nextecpcontextsize.unwrap_or(core::mem::zeroed()))) } #[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 +795,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(core::mem::transmute(deviceobject), core::mem::transmute(nestinglevel), core::mem::transmute(nestingflags.unwrap_or(core::ptr::null_mut()))) + FsRtlGetVirtualDiskNestingLevel(core::mem::transmute(deviceobject), core::mem::transmute(nestinglevel), core::mem::transmute(nestingflags.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FsRtlIncrementCcFastMdlReadWait() { @@ -852,9 +841,9 @@ pub unsafe fn FsRtlInitializeBaseMcbEx(mcb: *mut BASE_MCB, pooltype: super::supe } #[cfg(feature = "Wdk_Foundation")] #[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>) { +pub unsafe fn FsRtlInitializeExtraCreateParameter(ecp: *mut super::super::Foundation::ECP_HEADER, ecpflags: u32, cleanupcallback: Option, 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(core::mem::transmute(ecp), core::mem::transmute(ecpflags), core::mem::transmute(cleanupcallback), core::mem::transmute(totalsize), core::mem::transmute(ecptype), core::mem::transmute(listallocatedfrom.unwrap_or(core::ptr::null()))) + FsRtlInitializeExtraCreateParameter(core::mem::transmute(ecp), core::mem::transmute(ecpflags), core::mem::transmute(cleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(totalsize), core::mem::transmute(ecptype), core::mem::transmute(listallocatedfrom.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -864,9 +853,9 @@ pub unsafe fn FsRtlInitializeExtraCreateParameterList(ecplist: *mut super::super } #[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 FsRtlInitializeFileLock(filelock: *mut FILE_LOCK, completelockirproutine: PCOMPLETE_LOCK_IRP_ROUTINE, unlockroutine: PUNLOCK_ROUTINE) { +pub unsafe fn FsRtlInitializeFileLock(filelock: *mut FILE_LOCK, completelockirproutine: Option, unlockroutine: Option) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeFileLock(filelock : *mut FILE_LOCK, completelockirproutine : PCOMPLETE_LOCK_IRP_ROUTINE, unlockroutine : PUNLOCK_ROUTINE)); - FsRtlInitializeFileLock(core::mem::transmute(filelock), core::mem::transmute(completelockirproutine), core::mem::transmute(unlockroutine)) + FsRtlInitializeFileLock(core::mem::transmute(filelock), core::mem::transmute(completelockirproutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(unlockroutine.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -917,12 +906,9 @@ pub unsafe fn FsRtlInsertPerStreamContext(perstreamcontext: *const FSRTL_ADVANCE } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn FsRtlIs32BitProcess(process: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FsRtlIs32BitProcess(process: super::super::Foundation::PEPROCESS) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlIs32BitProcess(process : super::super::Foundation:: PEPROCESS) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlIs32BitProcess(process.param().abi()) + FsRtlIs32BitProcess(core::mem::transmute(process)) } #[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] @@ -1002,12 +988,9 @@ pub unsafe fn FsRtlIsNonEmptyDirectoryReparsePointAllowed(reparsetag: u32) -> su FsRtlIsNonEmptyDirectoryReparsePointAllowed(core::mem::transmute(reparsetag)) } #[inline] -pub unsafe fn FsRtlIsNtstatusExpected(exception: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FsRtlIsNtstatusExpected(exception: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlIsNtstatusExpected(exception : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlIsNtstatusExpected(exception.param().abi()) + FsRtlIsNtstatusExpected(core::mem::transmute(exception)) } #[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] @@ -1025,7 +1008,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(core::mem::transmute(deviceobject), core::mem::transmute(ioctl), core::mem::transmute(flags), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(outputbufferlength), core::mem::transmute(iosbinformation.unwrap_or(core::ptr::null_mut()))) + FsRtlIssueDeviceIoControl(core::mem::transmute(deviceobject), core::mem::transmute(ioctl), core::mem::transmute(flags), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength), core::mem::transmute(iosbinformation.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1035,23 +1018,20 @@ pub unsafe fn FsRtlKernelFsControlFile(fileobject: *const super::super::Foundati } #[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 FsRtlLogCcFlushError(filename: *const super::super::super::Win32::Foundation::UNICODE_STRING, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, flusherror: P3, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn FsRtlLogCcFlushError(filename: *const super::super::super::Win32::Foundation::UNICODE_STRING, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, flusherror: super::super::super::Win32::Foundation::NTSTATUS, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLogCcFlushError(filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, sectionobjectpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, flusherror : super::super::super::Win32::Foundation:: NTSTATUS, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlLogCcFlushError(core::mem::transmute(filename), core::mem::transmute(deviceobject), core::mem::transmute(sectionobjectpointer), flusherror.param().abi(), core::mem::transmute(flags)) + FsRtlLogCcFlushError(core::mem::transmute(filename), core::mem::transmute(deviceobject), core::mem::transmute(sectionobjectpointer), core::mem::transmute(flusherror), core::mem::transmute(flags)) } #[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(core::mem::transmute(mcb), core::mem::transmute(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()))) + FsRtlLookupBaseMcbEntry(core::mem::transmute(mcb), core::mem::transmute(vbn), core::mem::transmute(lbn.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectorcountfromlbn.unwrap_or(core::mem::zeroed())), core::mem::transmute(startinglbn.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectorcountfromstartinglbn.unwrap_or(core::mem::zeroed())), core::mem::transmute(index.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(mcb), core::mem::transmute(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()))) + FsRtlLookupLargeMcbEntry(core::mem::transmute(mcb), core::mem::transmute(vbn), core::mem::transmute(lbn.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectorcountfromlbn.unwrap_or(core::mem::zeroed())), core::mem::transmute(startinglbn.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectorcountfromstartinglbn.unwrap_or(core::mem::zeroed())), core::mem::transmute(index.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FsRtlLookupLastBaseMcbEntry(mcb: *const BASE_MCB, vbn: *mut i64, lbn: *mut i64) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -1085,37 +1065,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(core::mem::transmute(mcb), core::mem::transmute(vbn), core::mem::transmute(lbn), core::mem::transmute(sectorcount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(index)) + FsRtlLookupMcbEntry(core::mem::transmute(mcb), core::mem::transmute(vbn), core::mem::transmute(lbn), core::mem::transmute(sectorcount.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(perfilecontextpointer), core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) + FsRtlLookupPerFileContext(core::mem::transmute(perfilecontextpointer), core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(fileobject), core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) + FsRtlLookupPerFileObjectContext(core::mem::transmute(fileobject), core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(streamcontext), core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) + FsRtlLookupPerStreamContextInternal(core::mem::transmute(streamcontext), core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(fileobject), core::mem::transmute(mdlchain), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) + FsRtlMdlReadCompleteDev(core::mem::transmute(fileobject), core::mem::transmute(mdlchain), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(lockkey), core::mem::transmute(mdlchain), core::mem::transmute(iostatus), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) + FsRtlMdlReadDev(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(lockkey), core::mem::transmute(mdlchain), core::mem::transmute(iostatus), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } #[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 +1107,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(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(mdlchain), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) + FsRtlMdlWriteCompleteDev(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(mdlchain), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FsRtlMupGetProviderIdFromName(pprovidername: *const super::super::super::Win32::Foundation::UNICODE_STRING, pproviderid: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1141,71 +1121,76 @@ pub unsafe fn FsRtlMupGetProviderInfoFromFileObject(pfileobject: *const super::s FsRtlMupGetProviderInfoFromFileObject(core::mem::transmute(pfileobject), core::mem::transmute(level), core::mem::transmute(pbuffer), core::mem::transmute(pbuffersize)) } #[inline] -pub unsafe fn FsRtlNormalizeNtstatus(exception: P0, genericexception: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FsRtlNormalizeNtstatus(exception: super::super::super::Win32::Foundation::NTSTATUS, genericexception: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNormalizeNtstatus(exception : super::super::super::Win32::Foundation:: NTSTATUS, genericexception : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlNormalizeNtstatus(exception.param().abi(), genericexception.param().abi()) + FsRtlNormalizeNtstatus(core::mem::transmute(exception), core::mem::transmute(genericexception)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn FsRtlNotifyCleanup(notifysync: P0, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY, fscontext: *const core::ffi::c_void) -where - P0: windows_core::Param, -{ +pub unsafe fn FsRtlNotifyCleanup(notifysync: super::super::Foundation::PNOTIFY_SYNC, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY, fscontext: *const core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyCleanup(notifysync : super::super::Foundation:: PNOTIFY_SYNC, notifylist : *const super::super::super::Win32::System::Kernel:: LIST_ENTRY, fscontext : *const core::ffi::c_void)); - FsRtlNotifyCleanup(notifysync.param().abi(), core::mem::transmute(notifylist), core::mem::transmute(fscontext)) + FsRtlNotifyCleanup(core::mem::transmute(notifysync), core::mem::transmute(notifylist), core::mem::transmute(fscontext)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn FsRtlNotifyCleanupAll(notifysync: P0, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY) -where - P0: windows_core::Param, -{ +pub unsafe fn FsRtlNotifyCleanupAll(notifysync: super::super::Foundation::PNOTIFY_SYNC, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyCleanupAll(notifysync : super::super::Foundation:: PNOTIFY_SYNC, notifylist : *const super::super::super::Win32::System::Kernel:: LIST_ENTRY)); - FsRtlNotifyCleanupAll(notifysync.param().abi(), core::mem::transmute(notifylist)) + FsRtlNotifyCleanupAll(core::mem::transmute(notifysync), core::mem::transmute(notifylist)) } #[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 FsRtlNotifyFilterChangeDirectory(notifysync: P0, 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: P4, ignorebuffer: P5, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: PFILTER_REPORT_CHANGE) +pub unsafe 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: P4, ignorebuffer: P5, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: Option, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: Option) where - P0: windows_core::Param, P4: windows_core::Param, P5: 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(), core::mem::transmute(notifylist), core::mem::transmute(fscontext), core::mem::transmute(fulldirectoryname), watchtree.param().abi(), ignorebuffer.param().abi(), core::mem::transmute(completionfilter), core::mem::transmute(notifyirp.unwrap_or(core::ptr::null())), core::mem::transmute(traversecallback), core::mem::transmute(subjectcontext.unwrap_or(core::ptr::null())), core::mem::transmute(filtercallback)) + FsRtlNotifyFilterChangeDirectory( + core::mem::transmute(notifysync), + core::mem::transmute(notifylist), + core::mem::transmute(fscontext), + core::mem::transmute(fulldirectoryname), + watchtree.param().abi(), + ignorebuffer.param().abi(), + core::mem::transmute(completionfilter), + core::mem::transmute(notifyirp.unwrap_or(core::mem::zeroed())), + core::mem::transmute(traversecallback.unwrap_or(core::mem::zeroed())), + core::mem::transmute(subjectcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(filtercallback.unwrap_or(core::mem::zeroed())), + ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn FsRtlNotifyFilterReportChange(notifysync: P0, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY, fulltargetname: *const super::super::super::Win32::System::Kernel::STRING, targetnameoffset: u16, streamname: Option<*const super::super::super::Win32::System::Kernel::STRING>, normalizedparentname: Option<*const super::super::super::Win32::System::Kernel::STRING>, filtermatch: u32, action: u32, targetcontext: Option<*const core::ffi::c_void>, filtercontext: Option<*const core::ffi::c_void>) -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::super::Win32::System::Kernel::STRING>, normalizedparentname: Option<*const super::super::super::Win32::System::Kernel::STRING>, filtermatch: u32, action: u32, targetcontext: Option<*const core::ffi::c_void>, filtercontext: Option<*const core::ffi::c_void>) { 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(), core::mem::transmute(notifylist), core::mem::transmute(fulltargetname), core::mem::transmute(targetnameoffset), core::mem::transmute(streamname.unwrap_or(core::ptr::null())), core::mem::transmute(normalizedparentname.unwrap_or(core::ptr::null())), core::mem::transmute(filtermatch), core::mem::transmute(action), core::mem::transmute(targetcontext.unwrap_or(core::ptr::null())), core::mem::transmute(filtercontext.unwrap_or(core::ptr::null()))) + FsRtlNotifyFilterReportChange( + core::mem::transmute(notifysync), + core::mem::transmute(notifylist), + core::mem::transmute(fulltargetname), + core::mem::transmute(targetnameoffset), + core::mem::transmute(streamname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(normalizedparentname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(filtermatch), + core::mem::transmute(action), + core::mem::transmute(targetcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(filtercontext.unwrap_or(core::mem::zeroed())), + ) } #[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 FsRtlNotifyFullChangeDirectory(notifysync: P0, 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: P4, ignorebuffer: P5, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) +pub unsafe 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: P4, ignorebuffer: P5, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: Option, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) where - P0: windows_core::Param, P4: windows_core::Param, P5: 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(), core::mem::transmute(notifylist), core::mem::transmute(fscontext), core::mem::transmute(fulldirectoryname), watchtree.param().abi(), ignorebuffer.param().abi(), core::mem::transmute(completionfilter), core::mem::transmute(notifyirp.unwrap_or(core::ptr::null())), core::mem::transmute(traversecallback), core::mem::transmute(subjectcontext.unwrap_or(core::ptr::null()))) + FsRtlNotifyFullChangeDirectory(core::mem::transmute(notifysync), core::mem::transmute(notifylist), core::mem::transmute(fscontext), core::mem::transmute(fulldirectoryname), watchtree.param().abi(), ignorebuffer.param().abi(), core::mem::transmute(completionfilter), core::mem::transmute(notifyirp.unwrap_or(core::mem::zeroed())), core::mem::transmute(traversecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(subjectcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn FsRtlNotifyFullReportChange(notifysync: P0, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY, fulltargetname: *const super::super::super::Win32::System::Kernel::STRING, targetnameoffset: u16, streamname: Option<*const super::super::super::Win32::System::Kernel::STRING>, normalizedparentname: Option<*const super::super::super::Win32::System::Kernel::STRING>, filtermatch: u32, action: u32, targetcontext: Option<*const core::ffi::c_void>) -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::super::Win32::System::Kernel::STRING>, normalizedparentname: Option<*const super::super::super::Win32::System::Kernel::STRING>, filtermatch: u32, action: u32, targetcontext: Option<*const core::ffi::c_void>) { 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(), core::mem::transmute(notifylist), core::mem::transmute(fulltargetname), core::mem::transmute(targetnameoffset), core::mem::transmute(streamname.unwrap_or(core::ptr::null())), core::mem::transmute(normalizedparentname.unwrap_or(core::ptr::null())), core::mem::transmute(filtermatch), core::mem::transmute(action), core::mem::transmute(targetcontext.unwrap_or(core::ptr::null()))) + FsRtlNotifyFullReportChange(core::mem::transmute(notifysync), core::mem::transmute(notifylist), core::mem::transmute(fulltargetname), core::mem::transmute(targetnameoffset), core::mem::transmute(streamname.unwrap_or(core::mem::zeroed())), core::mem::transmute(normalizedparentname.unwrap_or(core::mem::zeroed())), core::mem::transmute(filtermatch), core::mem::transmute(action), core::mem::transmute(targetcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1252,27 +1237,27 @@ pub unsafe fn FsRtlNumberOfRunsInMcb(mcb: *const MCB) -> u32 { } #[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 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 { +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: Option, postirproutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine), core::mem::transmute(postirproutine)) + FsRtlOplockBreakH(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(postirproutine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, postirproutine: Option, 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(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine), core::mem::transmute(postirproutine), core::mem::transmute(grantedaccess.unwrap_or(core::ptr::null())), core::mem::transmute(shareaccess.unwrap_or(core::ptr::null()))) + FsRtlOplockBreakH2(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(postirproutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(grantedaccess.unwrap_or(core::mem::zeroed())), core::mem::transmute(shareaccess.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, postirproutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(irpsp.unwrap_or(core::ptr::null())), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine), core::mem::transmute(postirproutine)) + FsRtlOplockBreakToNone(core::mem::transmute(oplock), core::mem::transmute(irpsp.unwrap_or(core::mem::zeroed())), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(postirproutine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, postirproutine: Option) -> 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(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine), core::mem::transmute(postirproutine)) + FsRtlOplockBreakToNoneEx(core::mem::transmute(oplock), core::mem::transmute(irp), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(postirproutine.unwrap_or(core::mem::zeroed()))) } #[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 +1292,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(core::ptr::null())), core::mem::transmute(fo2.unwrap_or(core::ptr::null()))) + FsRtlOplockKeysEqual(core::mem::transmute(fo1.unwrap_or(core::mem::zeroed())), core::mem::transmute(fo2.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1340,21 +1325,20 @@ pub unsafe fn FsRtlPrepareToReuseEcp(ecpcontext: *const core::ffi::c_void) { } #[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 FsRtlPrivateLock(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: *const i64, processid: P4, key: u32, failimmediately: P6, exclusivelock: P7, iosb: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, irp: Option<*const super::super::Foundation::IRP>, context: Option<*const core::ffi::c_void>, alreadysynchronized: P11) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe 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: P6, exclusivelock: P7, iosb: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, irp: Option<*const super::super::Foundation::IRP>, context: Option<*const core::ffi::c_void>, alreadysynchronized: P11) -> super::super::super::Win32::Foundation::BOOLEAN where - P4: windows_core::Param, P6: windows_core::Param, P7: windows_core::Param, P11: 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(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), processid.param().abi(), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi(), core::mem::transmute(iosb), core::mem::transmute(irp.unwrap_or(core::ptr::null())), core::mem::transmute(context.unwrap_or(core::ptr::null())), alreadysynchronized.param().abi()) + FsRtlPrivateLock(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(processid), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi(), core::mem::transmute(iosb), core::mem::transmute(irp.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(filelock), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + FsRtlProcessFileLock(core::mem::transmute(filelock), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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 +1360,7 @@ where P7: 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(core::mem::transmute(fileobject), core::mem::transmute(returnedeadata), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::ptr::null())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) + FsRtlQueryKernelEaFile(core::mem::transmute(fileobject), core::mem::transmute(returnedeadata), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FsRtlQueryMaximumVirtualDiskNestingLevel() -> u32 { @@ -1429,7 +1413,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(core::mem::transmute(ecplist), core::mem::transmute(ecptype), core::mem::transmute(ecpcontext), core::mem::transmute(ecpcontextsize.unwrap_or(core::ptr::null_mut()))) + FsRtlRemoveExtraCreateParameter(core::mem::transmute(ecplist), core::mem::transmute(ecptype), core::mem::transmute(ecpcontext), core::mem::transmute(ecpcontextsize.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1447,19 +1431,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(core::mem::transmute(perfilecontextpointer), core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) + FsRtlRemovePerFileContext(core::mem::transmute(perfilecontextpointer), core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(fileobject), core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) + FsRtlRemovePerFileObjectContext(core::mem::transmute(fileobject), core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(streamcontext), core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) + FsRtlRemovePerStreamContext(core::mem::transmute(streamcontext), core::mem::transmute(ownerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(instanceid.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FsRtlResetBaseMcb() -> BASE_MCB { @@ -1588,7 +1572,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(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(userinformation)) + GetSecurityUserInfo(core::mem::transmute(logonid.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(userinformation)) } #[inline] pub unsafe fn IoAcquireVpbSpinLock() -> u8 { @@ -1599,12 +1583,9 @@ pub unsafe fn IoAcquireVpbSpinLock() -> u8 { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoApplyPriorityInfoThread(inputpriorityinfo: *const IO_PRIORITY_INFO, outputpriorityinfo: Option<*mut IO_PRIORITY_INFO>, thread: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn IoApplyPriorityInfoThread(inputpriorityinfo: *const IO_PRIORITY_INFO, outputpriorityinfo: Option<*mut IO_PRIORITY_INFO>, thread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(inputpriorityinfo), core::mem::transmute(outputpriorityinfo.unwrap_or(core::ptr::null_mut())), thread.param().abi()) + IoApplyPriorityInfoThread(core::mem::transmute(inputpriorityinfo), core::mem::transmute(outputpriorityinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(thread)) } #[inline] pub unsafe fn IoCheckDesiredAccess(desiredaccess: *mut u32, grantedaccess: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1619,7 +1600,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(core::mem::transmute(grantedaccess), core::mem::transmute(majorfunction), core::mem::transmute(minorfunction), core::mem::transmute(iocontrolcode), core::mem::transmute(arg1.unwrap_or(core::ptr::null())), core::mem::transmute(arg2.unwrap_or(core::ptr::null()))) + IoCheckFunctionAccess(core::mem::transmute(grantedaccess), core::mem::transmute(majorfunction), core::mem::transmute(minorfunction), core::mem::transmute(iocontrolcode), core::mem::transmute(arg1.unwrap_or(core::mem::zeroed())), core::mem::transmute(arg2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn IoCheckQuerySetFileInformation(fileinformationclass: FILE_INFORMATION_CLASS, length: u32, setoperation: P2) -> super::super::super::Win32::Foundation::NTSTATUS @@ -1653,37 +1634,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(core::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) + IoCreateStreamFileObject(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(filehandle.unwrap_or(core::ptr::null_mut()))) + IoCreateStreamFileObjectEx(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(createoptions), core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(streamfileobject), core::mem::transmute(filehandle.unwrap_or(core::ptr::null_mut()))) + IoCreateStreamFileObjectEx2(core::mem::transmute(createoptions), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(streamfileobject), core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) + IoCreateStreamFileObjectLite(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(driverobject), core::mem::transmute(deviceobjectlist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(deviceobjectlistsize), core::mem::transmute(actualnumberdeviceobjects)) + IoEnumerateDeviceObjectList(core::mem::transmute(driverobject), core::mem::transmute(deviceobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceobjectlistsize), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(driverobjectlistsize), core::mem::transmute(actualnumberdriverobjects)) + IoEnumerateRegisteredFiltersList(core::mem::transmute(driverobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverobjectlistsize), core::mem::transmute(actualnumberdriverobjects)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] @@ -1711,12 +1692,9 @@ pub unsafe fn IoGetDeviceAttachmentBaseRef(deviceobject: *const super::super::Fo } #[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 IoGetDeviceToVerify(thread: P0) -> *mut super::super::Foundation::DEVICE_OBJECT -where - P0: windows_core::Param, -{ +pub unsafe fn IoGetDeviceToVerify(thread: super::super::Foundation::PETHREAD) -> *mut super::super::Foundation::DEVICE_OBJECT { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDeviceToVerify(thread : super::super::Foundation:: PETHREAD) -> *mut super::super::Foundation:: DEVICE_OBJECT); - IoGetDeviceToVerify(thread.param().abi()) + IoGetDeviceToVerify(core::mem::transmute(thread)) } #[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] @@ -1780,12 +1758,9 @@ pub unsafe fn IoIsOperationSynchronous(irp: *const super::super::Foundation::IRP } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoIsSystemThread(thread: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn IoIsSystemThread(thread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn IoIsSystemThread(thread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: BOOLEAN); - IoIsSystemThread(thread.param().abi()) + IoIsSystemThread(core::mem::transmute(thread)) } #[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] @@ -1866,21 +1841,15 @@ pub unsafe fn IoRequestDeviceRemovalForReset(physicaldeviceobject: *const super: } #[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 IoRetrievePriorityInfo(irp: Option<*const super::super::Foundation::IRP>, fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, thread: P2, priorityinfo: *mut IO_PRIORITY_INFO) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn IoRetrievePriorityInfo(irp: Option<*const super::super::Foundation::IRP>, fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, thread: Option, priorityinfo: *mut IO_PRIORITY_INFO) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), thread.param().abi(), core::mem::transmute(priorityinfo)) + IoRetrievePriorityInfo(core::mem::transmute(irp.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(thread.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] -pub unsafe fn IoSetDeviceToVerify(thread: P0, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>) -where - P0: windows_core::Param, -{ +pub unsafe fn IoSetDeviceToVerify(thread: super::super::Foundation::PETHREAD, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>) { 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(core::ptr::null()))) + IoSetDeviceToVerify(core::mem::transmute(thread), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1902,12 +1871,9 @@ pub unsafe fn IoSynchronousPageWrite(fileobject: *const super::super::Foundation } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoThreadToProcess(thread: P0) -> super::super::Foundation::PEPROCESS -where - P0: windows_core::Param, -{ +pub unsafe fn IoThreadToProcess(thread: super::super::Foundation::PETHREAD) -> super::super::Foundation::PEPROCESS { windows_targets::link!("ntoskrnl.exe" "system" fn IoThreadToProcess(thread : super::super::Foundation:: PETHREAD) -> super::super::Foundation:: PEPROCESS); - IoThreadToProcess(thread.param().abi()) + IoThreadToProcess(core::mem::transmute(thread)) } #[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] @@ -1943,12 +1909,9 @@ pub unsafe fn KeAcquireSpinLockRaiseToSynch(spinlock: *mut usize) -> u8 { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeAttachProcess(process: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn KeAttachProcess(process: super::super::Foundation::PRKPROCESS) { windows_targets::link!("ntoskrnl.exe" "system" fn KeAttachProcess(process : super::super::Foundation:: PRKPROCESS)); - KeAttachProcess(process.param().abi()) + KeAttachProcess(core::mem::transmute(process)) } #[inline] pub unsafe fn KeDetachProcess() { @@ -2014,7 +1977,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(core::mem::transmute(queue), core::mem::transmute(waitmode), core::mem::transmute(timeout.unwrap_or(core::ptr::null()))) + KeRemoveQueue(core::mem::transmute(queue), core::mem::transmute(waitmode), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2023,7 +1986,7 @@ where P2: 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(core::mem::transmute(queue), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) + KeRemoveQueueEx(core::mem::transmute(queue), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2033,12 +1996,9 @@ pub unsafe fn KeRundownQueue(queue: *mut super::super::Foundation::KQUEUE) -> *m } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeSetIdealProcessorThread(thread: P0, processor: u8) -> u8 -where - P0: windows_core::Param, -{ +pub unsafe fn KeSetIdealProcessorThread(thread: super::super::Foundation::PKTHREAD, processor: u8) -> u8 { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetIdealProcessorThread(thread : super::super::Foundation:: PKTHREAD, processor : u8) -> u8); - KeSetIdealProcessorThread(thread.param().abi(), core::mem::transmute(processor)) + KeSetIdealProcessorThread(core::mem::transmute(thread), core::mem::transmute(processor)) } #[inline] pub unsafe fn KeSetKernelStackSwapEnable(enable: P0) -> super::super::super::Win32::Foundation::BOOLEAN @@ -2050,12 +2010,9 @@ where } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeStackAttachProcess(process: P0, apcstate: *mut KAPC_STATE) -where - P0: windows_core::Param, -{ +pub unsafe fn KeStackAttachProcess(process: super::super::Foundation::PRKPROCESS, apcstate: *mut KAPC_STATE) { windows_targets::link!("ntoskrnl.exe" "system" fn KeStackAttachProcess(process : super::super::Foundation:: PRKPROCESS, apcstate : *mut KAPC_STATE)); - KeStackAttachProcess(process.param().abi(), core::mem::transmute(apcstate)) + KeStackAttachProcess(core::mem::transmute(process), core::mem::transmute(apcstate)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2083,7 +2040,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(core::mem::transmute(sectionpointer), core::mem::transmute(newfilesize.unwrap_or(core::ptr::null()))) + MmCanFileBeTruncated(core::mem::transmute(sectionpointer), core::mem::transmute(newfilesize.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2147,23 +2104,22 @@ pub unsafe fn MmSetAddressRangeModified(address: *const core::ffi::c_void, lengt } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAccessCheckAndAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: P4, desiredaccess: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtAccessCheckAndAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*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: P7, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, P7: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), securitydescriptor.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) + NtAccessCheckAndAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAccessCheckByTypeAndAuditAlarm( +pub unsafe fn NtAccessCheckByTypeAndAuditAlarm( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, - securitydescriptor: P4, - principalselfsid: P5, + securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, + principalselfsid: Option, desiredaccess: u32, audittype: super::super::super::Win32::Security::AUDIT_EVENT_TYPE, flags: u32, @@ -2175,18 +2131,16 @@ pub unsafe fn NtAccessCheckByTypeAndAuditAlarm( generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, ) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, - P5: windows_core::Param, P12: 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( core::mem::transmute(subsystemname), - core::mem::transmute(handleid.unwrap_or(core::ptr::null())), + core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), @@ -2201,13 +2155,13 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarm( +pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarm( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, - securitydescriptor: P4, - principalselfsid: P5, + securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, + principalselfsid: Option, desiredaccess: u32, audittype: super::super::super::Win32::Security::AUDIT_EVENT_TYPE, flags: u32, @@ -2220,22 +2174,20 @@ pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarm( generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, ) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, - P5: windows_core::Param, P12: 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( core::mem::transmute(subsystemname), - core::mem::transmute(handleid.unwrap_or(core::ptr::null())), + core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), - core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null())), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), objectcreation.param().abi(), @@ -2246,14 +2198,14 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle( +pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, - clienttoken: P2, + 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: P5, - principalselfsid: P6, + securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, + principalselfsid: Option, desiredaccess: u32, audittype: super::super::super::Win32::Security::AUDIT_EVENT_TYPE, flags: u32, @@ -2266,24 +2218,21 @@ pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle super::super::super::Win32::Foundation::NTSTATUS where - P2: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, P13: 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( core::mem::transmute(subsystemname), - core::mem::transmute(handleid.unwrap_or(core::ptr::null())), - clienttoken.param().abi(), + core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(clienttoken), core::mem::transmute(objecttypename), core::mem::transmute(objectname), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), - core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null())), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), objectcreation.param().abi(), @@ -2294,49 +2243,38 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAdjustGroupsToken(tokenhandle: P0, resettodefault: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_GROUPS>, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtAdjustGroupsToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, resettodefault: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_GROUPS>, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength)) + NtAdjustGroupsToken(core::mem::transmute(tokenhandle), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAdjustPrivilegesToken(tokenhandle: P0, disableallprivileges: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtAdjustPrivilegesToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, disableallprivileges: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + NtAdjustPrivilegesToken(core::mem::transmute(tokenhandle), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtAllocateVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, zerobits: usize, regionsize: *mut usize, allocationtype: u32, protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAllocateVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, zerobits : usize, regionsize : *mut usize, allocationtype : u32, protect : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAllocateVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(zerobits), core::mem::transmute(regionsize), core::mem::transmute(allocationtype), core::mem::transmute(protect)) + NtAllocateVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(zerobits), core::mem::transmute(regionsize), core::mem::transmute(allocationtype), core::mem::transmute(protect)) } #[cfg(feature = "Win32_System_Memory")] #[inline] -pub unsafe fn NtAllocateVirtualMemoryEx(processhandle: P0, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, allocationtype: u32, pageprotection: u32, extendedparameters: Option<&mut [super::super::super::Win32::System::Memory::MEM_EXTENDED_PARAMETER]>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtAllocateVirtualMemoryEx(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, allocationtype: u32, pageprotection: u32, extendedparameters: Option<&mut [super::super::super::Win32::System::Memory::MEM_EXTENDED_PARAMETER]>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAllocateVirtualMemoryEx(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, regionsize : *mut usize, allocationtype : u32, pageprotection : u32, extendedparameters : *mut super::super::super::Win32::System::Memory:: MEM_EXTENDED_PARAMETER, extendedparametercount : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAllocateVirtualMemoryEx(processhandle.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(allocationtype), core::mem::transmute(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())) + NtAllocateVirtualMemoryEx(core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(allocationtype), core::mem::transmute(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())) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtCancelIoFileEx(filehandle: P0, iorequesttocancel: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtCancelIoFileEx(filehandle: super::super::super::Win32::Foundation::HANDLE, iorequesttocancel: Option<*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 { 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(core::ptr::null())), core::mem::transmute(iostatusblock)) + NtCancelIoFileEx(core::mem::transmute(filehandle), core::mem::transmute(iorequesttocancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } #[inline] pub unsafe fn NtCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: P2) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2344,7 +2282,7 @@ where P2: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), generateonclose.param().abi()) + NtCloseObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2359,38 +2297,32 @@ where P4: 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(core::mem::transmute(eventhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(eventtype), initialstate.param().abi()) + NtCreateEvent(core::mem::transmute(eventhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventtype), initialstate.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", 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(core::mem::transmute(filehandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(createdisposition), core::mem::transmute(createoptions), core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ealength)) + NtCreateFile(core::mem::transmute(filehandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(createdisposition), core::mem::transmute(createoptions), core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealength)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtCreateSection(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, filehandle: P6) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn NtCreateSection(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, filehandle: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(sectionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), filehandle.param().abi()) + NtCreateSection(core::mem::transmute(sectionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_Memory"))] #[inline] -pub unsafe fn NtCreateSectionEx(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, filehandle: P6, extendedparameters: Option<&mut [super::super::super::Win32::System::Memory::MEM_EXTENDED_PARAMETER]>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn NtCreateSectionEx(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, filehandle: Option, extendedparameters: Option<&mut [super::super::super::Win32::System::Memory::MEM_EXTENDED_PARAMETER]>) -> super::super::super::Win32::Foundation::NTSTATUS { 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( core::mem::transmute(sectionhandle), core::mem::transmute(desiredaccess), - core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), - core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), + core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), - filehandle.param().abi(), + core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed())), 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()), ) @@ -2407,113 +2339,92 @@ where P2: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), generateonclose.param().abi()) + NtDeleteObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), 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 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn NtDuplicateObject(sourceprocesshandle: super::super::super::Win32::Foundation::HANDLE, sourcehandle: super::super::super::Win32::Foundation::HANDLE, targetprocesshandle: Option, targethandle: Option<*mut super::super::super::Win32::Foundation::HANDLE>, desiredaccess: u32, handleattributes: u32, options: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut())), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(options)) + NtDuplicateObject(core::mem::transmute(sourceprocesshandle), core::mem::transmute(sourcehandle), core::mem::transmute(targetprocesshandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(targethandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(options)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtDuplicateToken(existingtokenhandle: P0, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: P3, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtDuplicateToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: P3, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P3: 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(), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), effectiveonly.param().abi(), core::mem::transmute(tokentype), core::mem::transmute(newtokenhandle)) + NtDuplicateToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), effectiveonly.param().abi(), core::mem::transmute(tokentype), core::mem::transmute(newtokenhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtFilterToken(existingtokenhandle: P0, 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>, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtFilterToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, 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>, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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())), core::mem::transmute(newtokenhandle)) + NtFilterToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(flags), core::mem::transmute(sidstodisable.unwrap_or(core::mem::zeroed())), core::mem::transmute(privilegestodelete.unwrap_or(core::mem::zeroed())), core::mem::transmute(restrictedsids.unwrap_or(core::mem::zeroed())), core::mem::transmute(newtokenhandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtFlushBuffersFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtFlushBuffersFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtFlushBuffersFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtFlushBuffersFile(filehandle.param().abi(), core::mem::transmute(iostatusblock)) + NtFlushBuffersFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtFlushBuffersFileEx(filehandle: P0, flags: u32, parameters: *const core::ffi::c_void, parameterssize: u32, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtFlushBuffersFileEx(filehandle: super::super::super::Win32::Foundation::HANDLE, flags: u32, parameters: *const core::ffi::c_void, parameterssize: u32, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtFlushBuffersFileEx(filehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32, parameters : *const core::ffi::c_void, parameterssize : u32, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtFlushBuffersFileEx(filehandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(parameterssize), core::mem::transmute(iostatusblock)) + NtFlushBuffersFileEx(core::mem::transmute(filehandle), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(parameterssize), core::mem::transmute(iostatusblock)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtFlushVirtualMemory(processhandle: P0, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtFlushVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtFlushVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, regionsize : *mut usize, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtFlushVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(iostatus)) + NtFlushVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(iostatus)) } #[inline] -pub unsafe fn NtFreeVirtualMemory(processhandle: P0, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, freetype: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtFreeVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, freetype: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtFreeVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, regionsize : *mut usize, freetype : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtFreeVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(freetype)) + NtFreeVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(freetype)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtFsControlFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fscontrolcode: u32, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtFsControlFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fscontrolcode: u32, 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 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(fscontrolcode), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength)) + NtFsControlFile( + core::mem::transmute(filehandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(iostatusblock), + core::mem::transmute(fscontrolcode), + core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(inputbufferlength), + core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(outputbufferlength), + ) } #[inline] -pub unsafe fn NtImpersonateAnonymousToken(threadhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtImpersonateAnonymousToken(threadhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtImpersonateAnonymousToken(threadhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtImpersonateAnonymousToken(threadhandle.param().abi()) + NtImpersonateAnonymousToken(core::mem::transmute(threadhandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtLockFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: P8, exclusivelock: P9) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtLockFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: P8, exclusivelock: P9) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P8: windows_core::Param, P9: 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi()) + NtLockFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi()) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtNotifyChangeKey(keyhandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P6, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P9) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtNotifyChangeKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P6, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P9) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P6: windows_core::Param, P9: 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), asynchronous.param().abi()) + NtNotifyChangeKey(core::mem::transmute(keyhandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), asynchronous.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2529,31 +2440,36 @@ pub unsafe fn NtOpenFile(filehandle: *mut super::super::super::Win32::Foundation } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtOpenObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: P4, clienttoken: P5, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtOpenObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: Option, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, - P5: windows_core::Param, P9: windows_core::Param, P10: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), securitydescriptor.param().abi(), clienttoken.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), core::mem::transmute(generateonclose)) + NtOpenObjectAuditAlarm( + core::mem::transmute(subsystemname), + core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(objecttypename), + core::mem::transmute(objectname), + core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), + core::mem::transmute(clienttoken), + core::mem::transmute(desiredaccess), + core::mem::transmute(grantedaccess), + core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), + objectcreation.param().abi(), + accessgranted.param().abi(), + core::mem::transmute(generateonclose), + ) } #[inline] -pub unsafe fn NtOpenProcessToken(processhandle: P0, desiredaccess: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtOpenProcessToken(processhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenProcessToken(processhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenProcessToken(processhandle.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(tokenhandle)) + NtOpenProcessToken(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn NtOpenProcessTokenEx(processhandle: P0, desiredaccess: u32, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtOpenProcessTokenEx(processhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenProcessTokenEx(processhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, handleattributes : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenProcessTokenEx(processhandle.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) + NtOpenProcessTokenEx(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2562,94 +2478,91 @@ pub unsafe fn NtOpenSymbolicLinkObject(linkhandle: *mut super::super::super::Win NtOpenSymbolicLinkObject(core::mem::transmute(linkhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn NtOpenThreadToken(threadhandle: P0, desiredaccess: u32, openasself: P2, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtOpenThreadToken(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: P2, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtOpenThreadToken(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : super::super::super::Win32::Foundation:: BOOLEAN, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenThreadToken(threadhandle.param().abi(), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)) + NtOpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn NtOpenThreadTokenEx(threadhandle: P0, desiredaccess: u32, openasself: P2, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtOpenThreadTokenEx(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: P2, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtOpenThreadTokenEx(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : super::super::super::Win32::Foundation:: BOOLEAN, handleattributes : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenThreadTokenEx(threadhandle.param().abi(), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) + NtOpenThreadTokenEx(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtPrivilegeCheck(clienttoken: P0, requiredprivileges: *mut super::super::super::Win32::Security::PRIVILEGE_SET, result: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtPrivilegeCheck(clienttoken: super::super::super::Win32::Foundation::HANDLE, requiredprivileges: *mut super::super::super::Win32::Security::PRIVILEGE_SET, result: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtPrivilegeCheck(clienttoken : super::super::super::Win32::Foundation:: HANDLE, requiredprivileges : *mut super::super::super::Win32::Security:: PRIVILEGE_SET, result : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrivilegeCheck(clienttoken.param().abi(), core::mem::transmute(requiredprivileges), core::mem::transmute(result)) + NtPrivilegeCheck(core::mem::transmute(clienttoken), core::mem::transmute(requiredprivileges), core::mem::transmute(result)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtPrivilegeObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: P2, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P5) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtPrivilegeObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P5) -> super::super::super::Win32::Foundation::NTSTATUS where - P2: windows_core::Param, P5: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), clienttoken.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) + NtPrivilegeObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtPrivilegedServiceAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, clienttoken: P2, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P4) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtPrivilegedServiceAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, clienttoken: super::super::super::Win32::Foundation::HANDLE, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P4) -> super::super::super::Win32::Foundation::NTSTATUS where - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtPrivilegedServiceAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, servicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, clienttoken : super::super::super::Win32::Foundation:: HANDLE, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrivilegedServiceAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(servicename), clienttoken.param().abi(), core::mem::transmute(privileges), accessgranted.param().abi()) + NtPrivilegedServiceAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(servicename), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.param().abi()) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtQueryDirectoryFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: P8, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P10) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtQueryDirectoryFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: P8, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P10) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P8: windows_core::Param, P10: 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(core::ptr::null())), restartscan.param().abi()) + NtQueryDirectoryFile( + core::mem::transmute(filehandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(iostatusblock), + core::mem::transmute(fileinformation), + core::mem::transmute(length), + core::mem::transmute(fileinformationclass), + returnsingleentry.param().abi(), + core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), + restartscan.param().abi(), + ) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtQueryDirectoryFileEx(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtQueryDirectoryFileEx(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(queryflags), core::mem::transmute(filename.unwrap_or(core::ptr::null()))) + NtQueryDirectoryFileEx(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(queryflags), core::mem::transmute(filename.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtQueryDirectoryObject(directoryhandle: P0, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: P3, restartscan: P4, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtQueryDirectoryObject(directoryhandle: super::super::super::Win32::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: P3, restartscan: P4, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null_mut())), core::mem::transmute(length), returnsingleentry.param().abi(), restartscan.param().abi(), core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + NtQueryDirectoryObject(core::mem::transmute(directoryhandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), returnsingleentry.param().abi(), restartscan.param().abi(), core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtQueryEaFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe 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: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P4: windows_core::Param, P8: 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(), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::ptr::null())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::ptr::null())), restartscan.param().abi()) + NtQueryEaFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2665,181 +2578,122 @@ pub unsafe fn NtQueryInformationByName(objectattributes: *const super::super::Fo } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtQueryInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) + NtQueryInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtQueryInformationToken(tokenhandle: P0, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: Option<*mut core::ffi::c_void>, tokeninformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryInformationToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: Option<*mut core::ffi::c_void>, tokeninformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(tokeninformationlength), core::mem::transmute(returnlength)) + NtQueryInformationToken(core::mem::transmute(tokenhandle), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(tokeninformationlength), core::mem::transmute(returnlength)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn NtQueryQuotaInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: P7, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe 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: P4, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P4: windows_core::Param, - P7: windows_core::Param, P8: 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(), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::ptr::null())), core::mem::transmute(sidlistlength), startsid.param().abi(), restartscan.param().abi()) + NtQueryQuotaInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtQuerySecurityObject(handle: P0, securityinformation: u32, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, length: u32, lengthneeded: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQuerySecurityObject(handle: super::super::super::Win32::Foundation::HANDLE, securityinformation: u32, securitydescriptor: Option, length: u32, lengthneeded: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQuerySecurityObject(handle : super::super::super::Win32::Foundation:: HANDLE, securityinformation : u32, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, length : u32, lengthneeded : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQuerySecurityObject(handle.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor), core::mem::transmute(length), core::mem::transmute(lengthneeded)) + NtQuerySecurityObject(core::mem::transmute(handle), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(lengthneeded)) } #[inline] -pub unsafe fn NtQuerySymbolicLinkObject(linkhandle: P0, linktarget: *mut super::super::super::Win32::Foundation::UNICODE_STRING, returnedlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQuerySymbolicLinkObject(linkhandle: super::super::super::Win32::Foundation::HANDLE, linktarget: *mut super::super::super::Win32::Foundation::UNICODE_STRING, returnedlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(linktarget), core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))) + NtQuerySymbolicLinkObject(core::mem::transmute(linkhandle), core::mem::transmute(linktarget), core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, 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 { 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(core::ptr::null())), core::mem::transmute(memoryinformationclass), core::mem::transmute(memoryinformation), core::mem::transmute(memoryinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + NtQueryVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(memoryinformationclass), core::mem::transmute(memoryinformation), core::mem::transmute(memoryinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtQueryVolumeInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryVolumeInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryVolumeInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fsinformation : *mut core::ffi::c_void, length : u32, fsinformationclass : FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryVolumeInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) + NtQueryVolumeInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtReadFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: Option<*const i64>, key: Option<*const u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtReadFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: Option<*const i64>, key: Option<*const u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null()))) + NtReadFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtSetEaFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetEaFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetEaFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *const core::ffi::c_void, length : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetEaFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length)) + NtSetEaFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length)) } #[inline] -pub unsafe fn NtSetEvent(eventhandle: P0, previousstate: Option<*mut i32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetEvent(eventhandle: super::super::super::Win32::Foundation::HANDLE, previousstate: Option<*mut i32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut()))) + NtSetEvent(core::mem::transmute(eventhandle), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtSetInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *const core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *const core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *const core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) + NtSetInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtSetInformationToken(tokenhandle: P0, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: *const core::ffi::c_void, tokeninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: *const core::ffi::c_void, tokeninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, tokeninformationclass : super::super::super::Win32::Security:: TOKEN_INFORMATION_CLASS, tokeninformation : *const core::ffi::c_void, tokeninformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationToken(tokenhandle.param().abi(), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation), core::mem::transmute(tokeninformationlength)) + NtSetInformationToken(core::mem::transmute(tokenhandle), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation), core::mem::transmute(tokeninformationlength)) } #[inline] -pub unsafe fn NtSetInformationVirtualMemory(processhandle: P0, vminformationclass: VIRTUAL_MEMORY_INFORMATION_CLASS, virtualaddresses: &[MEMORY_RANGE_ENTRY], vminformation: *const core::ffi::c_void, vminformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, vminformationclass: VIRTUAL_MEMORY_INFORMATION_CLASS, virtualaddresses: &[MEMORY_RANGE_ENTRY], vminformation: *const core::ffi::c_void, vminformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, vminformationclass : VIRTUAL_MEMORY_INFORMATION_CLASS, numberofentries : usize, virtualaddresses : *const MEMORY_RANGE_ENTRY, vminformation : *const core::ffi::c_void, vminformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationVirtualMemory(processhandle.param().abi(), core::mem::transmute(vminformationclass), virtualaddresses.len().try_into().unwrap(), core::mem::transmute(virtualaddresses.as_ptr()), core::mem::transmute(vminformation), core::mem::transmute(vminformationlength)) + NtSetInformationVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(vminformationclass), virtualaddresses.len().try_into().unwrap(), core::mem::transmute(virtualaddresses.as_ptr()), core::mem::transmute(vminformation), core::mem::transmute(vminformationlength)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtSetQuotaInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetQuotaInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetQuotaInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *const core::ffi::c_void, length : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetQuotaInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length)) + NtSetQuotaInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtSetSecurityObject(handle: P0, securityinformation: u32, securitydescriptor: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn NtSetSecurityObject(handle: super::super::super::Win32::Foundation::HANDLE, securityinformation: u32, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetSecurityObject(handle : super::super::super::Win32::Foundation:: HANDLE, securityinformation : u32, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetSecurityObject(handle.param().abi(), core::mem::transmute(securityinformation), securitydescriptor.param().abi()) + NtSetSecurityObject(core::mem::transmute(handle), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtSetVolumeInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *const core::ffi::c_void, length: u32, fsinformationclass: FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetVolumeInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *const core::ffi::c_void, length: u32, fsinformationclass: FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetVolumeInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fsinformation : *const core::ffi::c_void, length : u32, fsinformationclass : FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetVolumeInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) + NtSetVolumeInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtUnlockFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, byteoffset: *const i64, length: *const i64, key: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtUnlockFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, byteoffset: *const i64, length: *const i64, key: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtUnlockFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, byteoffset : *const i64, length : *const i64, key : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtUnlockFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key)) + NtUnlockFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtWriteFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: Option<*const i64>, key: Option<*const u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtWriteFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: Option<*const i64>, key: Option<*const u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null()))) + NtWriteFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))) } #[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 { +pub unsafe fn ObInsertObject(object: *const core::ffi::c_void, passedaccessstate: Option<*mut super::super::Foundation::ACCESS_STATE>, desiredaccess: Option, 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(core::mem::transmute(object), core::mem::transmute(passedaccessstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(desiredaccess), core::mem::transmute(objectpointerbias), core::mem::transmute(newobject.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut()))) + ObInsertObject(core::mem::transmute(object), core::mem::transmute(passedaccessstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectpointerbias), core::mem::transmute(newobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ObIsKernelHandle(handle: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn ObIsKernelHandle(handle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn ObIsKernelHandle(handle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: BOOLEAN); - ObIsKernelHandle(handle.param().abi()) + ObIsKernelHandle(core::mem::transmute(handle)) } #[inline] pub unsafe fn ObMakeTemporaryObject(object: *const core::ffi::c_void) { @@ -2848,35 +2702,26 @@ pub unsafe fn ObMakeTemporaryObject(object: *const core::ffi::c_void) { } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn ObOpenObjectByPointer(object: *const core::ffi::c_void, handleattributes: u32, passedaccessstate: Option<*const super::super::Foundation::ACCESS_STATE>, desiredaccess: u32, objecttype: P4, accessmode: i8, handle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ObOpenObjectByPointer(object: *const core::ffi::c_void, handleattributes: u32, passedaccessstate: Option<*const super::super::Foundation::ACCESS_STATE>, desiredaccess: u32, objecttype: Option, accessmode: i8, handle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(object), core::mem::transmute(handleattributes), core::mem::transmute(passedaccessstate.unwrap_or(core::ptr::null())), core::mem::transmute(desiredaccess), objecttype.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(handle)) + ObOpenObjectByPointer(core::mem::transmute(object), core::mem::transmute(handleattributes), core::mem::transmute(passedaccessstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(accessmode), core::mem::transmute(handle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn ObOpenObjectByPointerWithTag(object: *const core::ffi::c_void, handleattributes: u32, passedaccessstate: Option<*const super::super::Foundation::ACCESS_STATE>, desiredaccess: u32, objecttype: P4, accessmode: i8, tag: u32, handle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ObOpenObjectByPointerWithTag(object: *const core::ffi::c_void, handleattributes: u32, passedaccessstate: Option<*const super::super::Foundation::ACCESS_STATE>, desiredaccess: u32, objecttype: Option, accessmode: i8, tag: u32, handle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(object), core::mem::transmute(handleattributes), core::mem::transmute(passedaccessstate.unwrap_or(core::ptr::null())), core::mem::transmute(desiredaccess), objecttype.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(tag), core::mem::transmute(handle)) + ObOpenObjectByPointerWithTag(core::mem::transmute(object), core::mem::transmute(handleattributes), core::mem::transmute(passedaccessstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(accessmode), core::mem::transmute(tag), core::mem::transmute(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(core::mem::transmute(object), core::mem::transmute(objectnameinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(returnlength)) + ObQueryNameString(core::mem::transmute(object), core::mem::transmute(objectnameinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(returnlength)) } #[inline] -pub unsafe fn ObQueryObjectAuditingByHandle(handle: P0, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ObQueryObjectAuditingByHandle(handle: super::super::super::Win32::Foundation::HANDLE, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObQueryObjectAuditingByHandle(handle : super::super::super::Win32::Foundation:: HANDLE, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObQueryObjectAuditingByHandle(handle.param().abi(), core::mem::transmute(generateonclose)) + ObQueryObjectAuditingByHandle(core::mem::transmute(handle), core::mem::transmute(generateonclose)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2912,31 +2757,21 @@ pub unsafe fn PoQueueShutdownWorkItem(workitem: *mut super::super::Foundation::W } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsAssignImpersonationToken(thread: P0, token: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PsAssignImpersonationToken(thread: super::super::Foundation::PETHREAD, token: Option) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsAssignImpersonationToken(thread : super::super::Foundation:: PETHREAD, token : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsAssignImpersonationToken(thread.param().abi(), token.param().abi()) + PsAssignImpersonationToken(core::mem::transmute(thread), core::mem::transmute(token.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsChargePoolQuota(process: P0, pooltype: super::super::Foundation::POOL_TYPE, amount: usize) -where - P0: windows_core::Param, -{ +pub unsafe fn PsChargePoolQuota(process: super::super::Foundation::PEPROCESS, pooltype: super::super::Foundation::POOL_TYPE, amount: usize) { windows_targets::link!("ntoskrnl.exe" "system" fn PsChargePoolQuota(process : super::super::Foundation:: PEPROCESS, pooltype : super::super::Foundation:: POOL_TYPE, amount : usize)); - PsChargePoolQuota(process.param().abi(), core::mem::transmute(pooltype), core::mem::transmute(amount)) + PsChargePoolQuota(core::mem::transmute(process), core::mem::transmute(pooltype), core::mem::transmute(amount)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsChargeProcessPoolQuota(process: P0, pooltype: super::super::Foundation::POOL_TYPE, amount: usize) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsChargeProcessPoolQuota(process: super::super::Foundation::PEPROCESS, pooltype: super::super::Foundation::POOL_TYPE, amount: usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsChargeProcessPoolQuota(process : super::super::Foundation:: PEPROCESS, pooltype : super::super::Foundation:: POOL_TYPE, amount : usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsChargeProcessPoolQuota(process.param().abi(), core::mem::transmute(pooltype), core::mem::transmute(amount)) + PsChargeProcessPoolQuota(core::mem::transmute(process), core::mem::transmute(pooltype), core::mem::transmute(amount)) } #[inline] pub unsafe fn PsDereferenceImpersonationToken(impersonationtoken: *const core::ffi::c_void) { @@ -2950,12 +2785,9 @@ pub unsafe fn PsDereferencePrimaryToken(primarytoken: *const core::ffi::c_void) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn PsDisableImpersonation(thread: P0, impersonationstate: *mut super::super::super::Win32::Security::SE_IMPERSONATION_STATE) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn PsDisableImpersonation(thread: super::super::Foundation::PETHREAD, impersonationstate: *mut super::super::super::Win32::Security::SE_IMPERSONATION_STATE) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn PsDisableImpersonation(thread : super::super::Foundation:: PETHREAD, impersonationstate : *mut super::super::super::Win32::Security:: SE_IMPERSONATION_STATE) -> super::super::super::Win32::Foundation:: BOOLEAN); - PsDisableImpersonation(thread.param().abi(), core::mem::transmute(impersonationstate)) + PsDisableImpersonation(core::mem::transmute(thread), core::mem::transmute(impersonationstate)) } #[inline] pub unsafe fn PsGetProcessExitTime() -> i64 { @@ -2964,23 +2796,19 @@ pub unsafe fn PsGetProcessExitTime() -> i64 { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetThreadProcess(thread: P0) -> super::super::Foundation::PEPROCESS -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetThreadProcess(thread: super::super::Foundation::PETHREAD) -> super::super::Foundation::PEPROCESS { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetThreadProcess(thread : super::super::Foundation:: PETHREAD) -> super::super::Foundation:: PEPROCESS); - PsGetThreadProcess(thread.param().abi()) + PsGetThreadProcess(core::mem::transmute(thread)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn PsImpersonateClient(thread: P0, token: Option<*const core::ffi::c_void>, copyonopen: P2, effectiveonly: P3, impersonationlevel: super::super::super::Win32::Security::SECURITY_IMPERSONATION_LEVEL) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn PsImpersonateClient(thread: super::super::Foundation::PETHREAD, token: Option<*const core::ffi::c_void>, copyonopen: P2, effectiveonly: P3, impersonationlevel: super::super::super::Win32::Security::SECURITY_IMPERSONATION_LEVEL) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P2: windows_core::Param, P3: 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(core::ptr::null())), copyonopen.param().abi(), effectiveonly.param().abi(), core::mem::transmute(impersonationlevel)) + PsImpersonateClient(core::mem::transmute(thread), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), copyonopen.param().abi(), effectiveonly.param().abi(), core::mem::transmute(impersonationlevel)) } #[inline] pub unsafe fn PsIsDiskCountersEnabled() -> super::super::super::Win32::Foundation::BOOLEAN { @@ -2989,75 +2817,51 @@ pub unsafe fn PsIsDiskCountersEnabled() -> super::super::super::Win32::Foundatio } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsIsSystemThread(thread: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn PsIsSystemThread(thread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn PsIsSystemThread(thread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: BOOLEAN); - PsIsSystemThread(thread.param().abi()) + PsIsSystemThread(core::mem::transmute(thread)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsIsThreadTerminating(thread: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn PsIsThreadTerminating(thread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn PsIsThreadTerminating(thread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: BOOLEAN); - PsIsThreadTerminating(thread.param().abi()) + PsIsThreadTerminating(core::mem::transmute(thread)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsLookupProcessByProcessId(processid: P0, process: *mut super::super::Foundation::PEPROCESS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsLookupProcessByProcessId(processid: super::super::super::Win32::Foundation::HANDLE, process: *mut super::super::Foundation::PEPROCESS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsLookupProcessByProcessId(processid : super::super::super::Win32::Foundation:: HANDLE, process : *mut super::super::Foundation:: PEPROCESS) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsLookupProcessByProcessId(processid.param().abi(), core::mem::transmute(process)) + PsLookupProcessByProcessId(core::mem::transmute(processid), core::mem::transmute(process)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsLookupThreadByThreadId(threadid: P0, thread: *mut super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsLookupThreadByThreadId(threadid: super::super::super::Win32::Foundation::HANDLE, thread: *mut super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsLookupThreadByThreadId(threadid : super::super::super::Win32::Foundation:: HANDLE, thread : *mut super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsLookupThreadByThreadId(threadid.param().abi(), core::mem::transmute(thread)) + PsLookupThreadByThreadId(core::mem::transmute(threadid), core::mem::transmute(thread)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn PsReferenceImpersonationToken(thread: P0, copyonopen: *mut super::super::super::Win32::Foundation::BOOLEAN, effectiveonly: *mut super::super::super::Win32::Foundation::BOOLEAN, impersonationlevel: *mut super::super::super::Win32::Security::SECURITY_IMPERSONATION_LEVEL) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn PsReferenceImpersonationToken(thread: super::super::Foundation::PETHREAD, copyonopen: *mut super::super::super::Win32::Foundation::BOOLEAN, effectiveonly: *mut super::super::super::Win32::Foundation::BOOLEAN, impersonationlevel: *mut super::super::super::Win32::Security::SECURITY_IMPERSONATION_LEVEL) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn PsReferenceImpersonationToken(thread : super::super::Foundation:: PETHREAD, copyonopen : *mut super::super::super::Win32::Foundation:: BOOLEAN, effectiveonly : *mut super::super::super::Win32::Foundation:: BOOLEAN, impersonationlevel : *mut super::super::super::Win32::Security:: SECURITY_IMPERSONATION_LEVEL) -> *mut core::ffi::c_void); - PsReferenceImpersonationToken(thread.param().abi(), core::mem::transmute(copyonopen), core::mem::transmute(effectiveonly), core::mem::transmute(impersonationlevel)) + PsReferenceImpersonationToken(core::mem::transmute(thread), core::mem::transmute(copyonopen), core::mem::transmute(effectiveonly), core::mem::transmute(impersonationlevel)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsReferencePrimaryToken(process: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn PsReferencePrimaryToken(process: super::super::Foundation::PEPROCESS) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn PsReferencePrimaryToken(process : super::super::Foundation:: PEPROCESS) -> *mut core::ffi::c_void); - PsReferencePrimaryToken(process.param().abi()) + PsReferencePrimaryToken(core::mem::transmute(process)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn PsRestoreImpersonation(thread: P0, impersonationstate: *const super::super::super::Win32::Security::SE_IMPERSONATION_STATE) -where - P0: windows_core::Param, -{ +pub unsafe fn PsRestoreImpersonation(thread: super::super::Foundation::PETHREAD, impersonationstate: *const super::super::super::Win32::Security::SE_IMPERSONATION_STATE) { windows_targets::link!("ntoskrnl.exe" "system" fn PsRestoreImpersonation(thread : super::super::Foundation:: PETHREAD, impersonationstate : *const super::super::super::Win32::Security:: SE_IMPERSONATION_STATE)); - PsRestoreImpersonation(thread.param().abi(), core::mem::transmute(impersonationstate)) + PsRestoreImpersonation(core::mem::transmute(thread), core::mem::transmute(impersonationstate)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsReturnPoolQuota(process: P0, pooltype: super::super::Foundation::POOL_TYPE, amount: usize) -where - P0: windows_core::Param, -{ +pub unsafe fn PsReturnPoolQuota(process: super::super::Foundation::PEPROCESS, pooltype: super::super::Foundation::POOL_TYPE, amount: usize) { windows_targets::link!("ntoskrnl.exe" "system" fn PsReturnPoolQuota(process : super::super::Foundation:: PEPROCESS, pooltype : super::super::Foundation:: POOL_TYPE, amount : usize)); - PsReturnPoolQuota(process.param().abi(), core::mem::transmute(pooltype), core::mem::transmute(amount)) + PsReturnPoolQuota(core::mem::transmute(process), core::mem::transmute(pooltype), core::mem::transmute(amount)) } #[inline] pub unsafe fn PsRevertToSelf() { @@ -3066,12 +2870,9 @@ pub unsafe fn PsRevertToSelf() { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsUpdateDiskCounters(process: P0, bytesread: u64, byteswritten: u64, readoperationcount: u32, writeoperationcount: u32, flushoperationcount: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn PsUpdateDiskCounters(process: super::super::Foundation::PEPROCESS, bytesread: u64, byteswritten: u64, readoperationcount: u32, writeoperationcount: u32, flushoperationcount: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PsUpdateDiskCounters(process : super::super::Foundation:: PEPROCESS, bytesread : u64, byteswritten : u64, readoperationcount : u32, writeoperationcount : u32, flushoperationcount : u32)); - PsUpdateDiskCounters(process.param().abi(), core::mem::transmute(bytesread), core::mem::transmute(byteswritten), core::mem::transmute(readoperationcount), core::mem::transmute(writeoperationcount), core::mem::transmute(flushoperationcount)) + PsUpdateDiskCounters(core::mem::transmute(process), core::mem::transmute(bytesread), core::mem::transmute(byteswritten), core::mem::transmute(readoperationcount), core::mem::transmute(writeoperationcount), core::mem::transmute(flushoperationcount)) } #[inline] pub unsafe fn QuerySecurityContextToken(phcontext: *const SecHandle, token: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -3080,30 +2881,21 @@ pub unsafe fn QuerySecurityContextToken(phcontext: *const SecHandle, token: *mut } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlAbsoluteToSelfRelativeSD(absolutesecuritydescriptor: P0, selfrelativesecuritydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, bufferlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn RtlAbsoluteToSelfRelativeSD(absolutesecuritydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, selfrelativesecuritydescriptor: Option, bufferlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAbsoluteToSelfRelativeSD(absolutesecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, selfrelativesecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, bufferlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlAbsoluteToSelfRelativeSD(absolutesecuritydescriptor.param().abi(), core::mem::transmute(selfrelativesecuritydescriptor), core::mem::transmute(bufferlength)) + RtlAbsoluteToSelfRelativeSD(core::mem::transmute(absolutesecuritydescriptor), core::mem::transmute(selfrelativesecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlAddAccessAllowedAce(acl: *mut super::super::super::Win32::Security::ACL, acerevision: u32, accessmask: u32, sid: P3) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn RtlAddAccessAllowedAce(acl: *mut super::super::super::Win32::Security::ACL, acerevision: u32, accessmask: u32, sid: super::super::super::Win32::Security::PSID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAddAccessAllowedAce(acl : *mut super::super::super::Win32::Security:: ACL, acerevision : u32, accessmask : u32, sid : super::super::super::Win32::Security:: PSID) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlAddAccessAllowedAce(core::mem::transmute(acl), core::mem::transmute(acerevision), core::mem::transmute(accessmask), sid.param().abi()) + RtlAddAccessAllowedAce(core::mem::transmute(acl), core::mem::transmute(acerevision), core::mem::transmute(accessmask), core::mem::transmute(sid)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlAddAccessAllowedAceEx(acl: *mut super::super::super::Win32::Security::ACL, acerevision: u32, aceflags: u32, accessmask: u32, sid: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn RtlAddAccessAllowedAceEx(acl: *mut super::super::super::Win32::Security::ACL, acerevision: u32, aceflags: u32, accessmask: u32, sid: super::super::super::Win32::Security::PSID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAddAccessAllowedAceEx(acl : *mut super::super::super::Win32::Security:: ACL, acerevision : u32, aceflags : u32, accessmask : u32, sid : super::super::super::Win32::Security:: PSID) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlAddAccessAllowedAceEx(core::mem::transmute(acl), core::mem::transmute(acerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), sid.param().abi()) + RtlAddAccessAllowedAceEx(core::mem::transmute(acl), core::mem::transmute(acerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(sid)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3124,9 +2916,9 @@ pub unsafe fn RtlAllocateAndInitializeSidEx(identifierauthority: *const super::s RtlAllocateAndInitializeSidEx(core::mem::transmute(identifierauthority), subauthorities.len().try_into().unwrap(), core::mem::transmute(subauthorities.as_ptr()), core::mem::transmute(sid)) } #[inline] -pub unsafe fn RtlAllocateHeap(heaphandle: *const core::ffi::c_void, flags: u32, size: usize) -> *mut core::ffi::c_void { +pub unsafe fn RtlAllocateHeap(heaphandle: *const core::ffi::c_void, flags: Option, size: usize) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlAllocateHeap(heaphandle : *const core::ffi::c_void, flags : u32, size : usize) -> *mut core::ffi::c_void); - RtlAllocateHeap(core::mem::transmute(heaphandle), core::mem::transmute(flags), core::mem::transmute(size)) + RtlAllocateHeap(core::mem::transmute(heaphandle), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3161,12 +2953,9 @@ pub unsafe fn RtlCopyLuid(destinationluid: *mut super::super::super::Win32::Foun } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlCopySid(destinationsidlength: u32, destinationsid: super::super::super::Win32::Security::PSID, sourcesid: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlCopySid(destinationsidlength: u32, destinationsid: super::super::super::Win32::Security::PSID, sourcesid: super::super::super::Win32::Security::PSID) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlCopySid(destinationsidlength : u32, destinationsid : super::super::super::Win32::Security:: PSID, sourcesid : super::super::super::Win32::Security:: PSID) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlCopySid(core::mem::transmute(destinationsidlength), core::mem::transmute(destinationsid), sourcesid.param().abi()) + RtlCopySid(core::mem::transmute(destinationsidlength), core::mem::transmute(destinationsid), core::mem::transmute(sourcesid)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3175,15 +2964,15 @@ pub unsafe fn RtlCreateAcl(acl: *mut super::super::super::Win32::Security::ACL, RtlCreateAcl(core::mem::transmute(acl), core::mem::transmute(acllength), core::mem::transmute(aclrevision)) } #[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 { +pub unsafe fn RtlCreateHeap(flags: u32, heapbase: Option<*const core::ffi::c_void>, reservesize: Option, commitsize: Option, 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(core::mem::transmute(flags), core::mem::transmute(heapbase.unwrap_or(core::ptr::null())), core::mem::transmute(reservesize), core::mem::transmute(commitsize), core::mem::transmute(lock.unwrap_or(core::ptr::null())), core::mem::transmute(parameters.unwrap_or(core::ptr::null()))) + RtlCreateHeap(core::mem::transmute(flags), core::mem::transmute(heapbase.unwrap_or(core::mem::zeroed())), core::mem::transmute(reservesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(commitsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(lock.unwrap_or(core::mem::zeroed())), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlCreateServiceSid(servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicesid: super::super::super::Win32::Security::PSID, servicesidlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn RtlCreateServiceSid(servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicesid: Option, servicesidlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlCreateServiceSid(servicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, servicesid : super::super::super::Win32::Security:: PSID, servicesidlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlCreateServiceSid(core::mem::transmute(servicename), core::mem::transmute(servicesid), core::mem::transmute(servicesidlength)) + RtlCreateServiceSid(core::mem::transmute(servicename), core::mem::transmute(servicesid.unwrap_or(core::mem::zeroed())), core::mem::transmute(servicesidlength)) } #[inline] pub unsafe fn RtlCreateSystemVolumeInformationFolder(volumerootpath: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3207,7 +2996,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(core::mem::transmute(customcp), core::mem::transmute(unicodestring), core::mem::transmute(maxbytesinunicodestring), core::mem::transmute(bytesinunicodestring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap()) + RtlCustomCPToUnicodeN(core::mem::transmute(customcp), core::mem::transmute(unicodestring), core::mem::transmute(maxbytesinunicodestring), core::mem::transmute(bytesinunicodestring.unwrap_or(core::mem::zeroed())), 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 { @@ -3217,12 +3006,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(core::mem::transmute(compressionformat), core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), core::mem::transmute(finaluncompressedsize), core::mem::transmute(workspace.unwrap_or(core::ptr::null()))) + RtlDecompressBufferEx(core::mem::transmute(compressionformat), core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), core::mem::transmute(finaluncompressedsize), core::mem::transmute(workspace.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(compressionformat), core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), core::mem::transmute(uncompressedchunksize), core::mem::transmute(finaluncompressedsize), core::mem::transmute(workspace.unwrap_or(core::ptr::null()))) + RtlDecompressBufferEx2(core::mem::transmute(compressionformat), core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), core::mem::transmute(uncompressedchunksize), core::mem::transmute(finaluncompressedsize), core::mem::transmute(workspace.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RtlDecompressChunks(uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], compressedtail: &[u8], compresseddatainfo: *const COMPRESSED_DATA_INFO) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3261,7 +3050,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlDosPathNameToNtPathName_U_WithStatus(dosfilename : windows_core::PCWSTR, ntfilename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, filepart : *mut windows_core::PWSTR, reserved : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlDosPathNameToNtPathName_U_WithStatus(dosfilename.param().abi(), core::mem::transmute(ntfilename), core::mem::transmute(filepart.unwrap_or(core::ptr::null_mut())), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) + RtlDosPathNameToNtPathName_U_WithStatus(dosfilename.param().abi(), core::mem::transmute(ntfilename), core::mem::transmute(filepart.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RtlDowncaseUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3278,23 +3067,15 @@ pub unsafe fn RtlDuplicateUnicodeString(flags: u32, stringin: *const super::supe } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlEqualPrefixSid(sid1: P0, sid2: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RtlEqualPrefixSid(sid1: super::super::super::Win32::Security::PSID, sid2: super::super::super::Win32::Security::PSID) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlEqualPrefixSid(sid1 : super::super::super::Win32::Security:: PSID, sid2 : super::super::super::Win32::Security:: PSID) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlEqualPrefixSid(sid1.param().abi(), sid2.param().abi()) + RtlEqualPrefixSid(core::mem::transmute(sid1), core::mem::transmute(sid2)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlEqualSid(sid1: P0, sid2: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RtlEqualSid(sid1: super::super::super::Win32::Security::PSID, sid2: super::super::super::Win32::Security::PSID) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlEqualSid(sid1 : super::super::super::Win32::Security:: PSID, sid2 : super::super::super::Win32::Security:: PSID) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlEqualSid(sid1.param().abi(), sid2.param().abi()) + RtlEqualSid(core::mem::transmute(sid1), core::mem::transmute(sid2)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3303,18 +3084,15 @@ pub unsafe fn RtlFindUnicodePrefix(prefixtable: *const UNICODE_PREFIX_TABLE, ful RtlFindUnicodePrefix(core::mem::transmute(prefixtable), core::mem::transmute(fullname), core::mem::transmute(caseinsensitiveindex)) } #[inline] -pub unsafe fn RtlFreeHeap(heaphandle: *const core::ffi::c_void, flags: u32, baseaddress: Option<*const core::ffi::c_void>) -> u32 { +pub unsafe fn RtlFreeHeap(heaphandle: *const core::ffi::c_void, flags: Option, 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(core::mem::transmute(heaphandle), core::mem::transmute(flags), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null()))) + RtlFreeHeap(core::mem::transmute(heaphandle), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlFreeSid(sid: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn RtlFreeSid(sid: super::super::super::Win32::Security::PSID) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlFreeSid(sid : super::super::super::Win32::Security:: PSID) -> *mut core::ffi::c_void); - RtlFreeSid(sid.param().abi()) + RtlFreeSid(core::mem::transmute(sid)) } #[inline] pub unsafe fn RtlGenerate8dot3Name(name: *const super::super::super::Win32::Foundation::UNICODE_STRING, allowextendedcharacters: P1, context: *mut GENERATE_NAME_CONTEXT, name8dot3: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3337,48 +3115,33 @@ pub unsafe fn RtlGetCompressionWorkSpaceSize(compressionformatandengine: u16, co } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlGetDaclSecurityDescriptor(securitydescriptor: P0, daclpresent: *mut super::super::super::Win32::Foundation::BOOLEAN, dacl: *mut *mut super::super::super::Win32::Security::ACL, dacldefaulted: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn RtlGetDaclSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, daclpresent: *mut super::super::super::Win32::Foundation::BOOLEAN, dacl: *mut *mut super::super::super::Win32::Security::ACL, dacldefaulted: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetDaclSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, daclpresent : *mut super::super::super::Win32::Foundation:: BOOLEAN, dacl : *mut *mut super::super::super::Win32::Security:: ACL, dacldefaulted : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlGetDaclSecurityDescriptor(securitydescriptor.param().abi(), core::mem::transmute(daclpresent), core::mem::transmute(dacl), core::mem::transmute(dacldefaulted)) + RtlGetDaclSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(daclpresent), core::mem::transmute(dacl), core::mem::transmute(dacldefaulted)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlGetGroupSecurityDescriptor(securitydescriptor: P0, group: *mut super::super::super::Win32::Security::PSID, groupdefaulted: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn RtlGetGroupSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, group: *mut super::super::super::Win32::Security::PSID, groupdefaulted: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetGroupSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, group : *mut super::super::super::Win32::Security:: PSID, groupdefaulted : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlGetGroupSecurityDescriptor(securitydescriptor.param().abi(), core::mem::transmute(group), core::mem::transmute(groupdefaulted)) + RtlGetGroupSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(group), core::mem::transmute(groupdefaulted)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlGetOwnerSecurityDescriptor(securitydescriptor: P0, owner: *mut super::super::super::Win32::Security::PSID, ownerdefaulted: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn RtlGetOwnerSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, owner: *mut super::super::super::Win32::Security::PSID, ownerdefaulted: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetOwnerSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, owner : *mut super::super::super::Win32::Security:: PSID, ownerdefaulted : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlGetOwnerSecurityDescriptor(securitydescriptor.param().abi(), core::mem::transmute(owner), core::mem::transmute(ownerdefaulted)) + RtlGetOwnerSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(owner), core::mem::transmute(ownerdefaulted)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlGetSaclSecurityDescriptor(securitydescriptor: P0, saclpresent: *mut super::super::super::Win32::Foundation::BOOLEAN, sacl: *mut *mut super::super::super::Win32::Security::ACL, sacldefaulted: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn RtlGetSaclSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, saclpresent: *mut super::super::super::Win32::Foundation::BOOLEAN, sacl: *mut *mut super::super::super::Win32::Security::ACL, sacldefaulted: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGetSaclSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, saclpresent : *mut super::super::super::Win32::Foundation:: BOOLEAN, sacl : *mut *mut super::super::super::Win32::Security:: ACL, sacldefaulted : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlGetSaclSecurityDescriptor(securitydescriptor.param().abi(), core::mem::transmute(saclpresent), core::mem::transmute(sacl), core::mem::transmute(sacldefaulted)) + RtlGetSaclSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(saclpresent), core::mem::transmute(sacl), core::mem::transmute(sacldefaulted)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlIdentifierAuthoritySid(sid: P0) -> *mut super::super::super::Win32::Security::SID_IDENTIFIER_AUTHORITY -where - P0: windows_core::Param, -{ +pub unsafe fn RtlIdentifierAuthoritySid(sid: super::super::super::Win32::Security::PSID) -> *mut super::super::super::Win32::Security::SID_IDENTIFIER_AUTHORITY { windows_targets::link!("ntdll.dll" "system" fn RtlIdentifierAuthoritySid(sid : super::super::super::Win32::Security:: PSID) -> *mut super::super::super::Win32::Security:: SID_IDENTIFIER_AUTHORITY); - RtlIdentifierAuthoritySid(sid.param().abi()) + RtlIdentifierAuthoritySid(core::mem::transmute(sid)) } #[inline] pub unsafe fn RtlIdnToAscii(flags: u32, sourcestring: P1, sourcestringlength: i32, destinationstring: windows_core::PWSTR, destinationstringlength: *mut i32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3475,12 +3238,9 @@ pub unsafe fn RtlIsPartialPlaceholder(fileattributes: u32, reparsetag: u32) -> s RtlIsPartialPlaceholder(core::mem::transmute(fileattributes), core::mem::transmute(reparsetag)) } #[inline] -pub unsafe fn RtlIsPartialPlaceholderFileHandle(filehandle: P0, ispartialplaceholder: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn RtlIsPartialPlaceholderFileHandle(filehandle: super::super::super::Win32::Foundation::HANDLE, ispartialplaceholder: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlIsPartialPlaceholderFileHandle(filehandle : super::super::super::Win32::Foundation:: HANDLE, ispartialplaceholder : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlIsPartialPlaceholderFileHandle(filehandle.param().abi(), core::mem::transmute(ispartialplaceholder)) + RtlIsPartialPlaceholderFileHandle(core::mem::transmute(filehandle), core::mem::transmute(ispartialplaceholder)) } #[inline] pub unsafe fn RtlIsPartialPlaceholderFileInfo(infobuffer: *const core::ffi::c_void, infoclass: FILE_INFORMATION_CLASS, ispartialplaceholder: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3491,7 +3251,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(core::ptr::null())), core::mem::transmute(previousmode)) + RtlIsSandboxedToken(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousmode)) } #[inline] pub unsafe fn RtlIsValidOemCharacter(char: windows_core::PWSTR) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3505,17 +3265,14 @@ pub unsafe fn RtlLengthRequiredSid(subauthoritycount: u32) -> u32 { } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlLengthSid(sid: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RtlLengthSid(sid: super::super::super::Win32::Security::PSID) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlLengthSid(sid : super::super::super::Win32::Security:: PSID) -> u32); - RtlLengthSid(sid.param().abi()) + RtlLengthSid(core::mem::transmute(sid)) } #[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), core::mem::transmute(maxbytesinunicodestring), core::mem::transmute(bytesinunicodestring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) + RtlMultiByteToUnicodeN(core::mem::transmute(unicodestring), core::mem::transmute(maxbytesinunicodestring), core::mem::transmute(bytesinunicodestring.unwrap_or(core::mem::zeroed())), 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 { @@ -3540,12 +3297,9 @@ where RtlNormalizeString(core::mem::transmute(normform), sourcestring.param().abi(), core::mem::transmute(sourcestringlength), core::mem::transmute(destinationstring), core::mem::transmute(destinationstringlength)) } #[inline] -pub unsafe fn RtlNtStatusToDosErrorNoTeb(status: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RtlNtStatusToDosErrorNoTeb(status: super::super::super::Win32::Foundation::NTSTATUS) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlNtStatusToDosErrorNoTeb(status : super::super::super::Win32::Foundation:: NTSTATUS) -> u32); - RtlNtStatusToDosErrorNoTeb(status.param().abi()) + RtlNtStatusToDosErrorNoTeb(core::mem::transmute(status)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3568,7 +3322,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), core::mem::transmute(maxbytesinunicodestring), core::mem::transmute(bytesinunicodestring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap()) + RtlOemToUnicodeN(core::mem::transmute(unicodestring), core::mem::transmute(maxbytesinunicodestring), core::mem::transmute(bytesinunicodestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3580,14 +3334,14 @@ where RtlPrefixString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) } #[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 { +pub unsafe fn RtlQueryPackageIdentity(tokenobject: *const core::ffi::c_void, packagefullname: windows_core::PWSTR, packagesize: *mut usize, appid: Option, 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(core::mem::transmute(tokenobject), core::mem::transmute(packagefullname), core::mem::transmute(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()))) + RtlQueryPackageIdentity(core::mem::transmute(tokenobject), core::mem::transmute(packagefullname), core::mem::transmute(packagesize), core::mem::transmute(appid.unwrap_or(core::mem::zeroed())), core::mem::transmute(appidsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(packaged.unwrap_or(core::mem::zeroed()))) } #[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 { +pub unsafe fn RtlQueryPackageIdentityEx(tokenobject: *const core::ffi::c_void, packagefullname: windows_core::PWSTR, packagesize: *mut usize, appid: Option, 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(core::mem::transmute(tokenobject), core::mem::transmute(packagefullname), core::mem::transmute(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()))) + RtlQueryPackageIdentityEx(core::mem::transmute(tokenobject), core::mem::transmute(packagefullname), core::mem::transmute(packagesize), core::mem::transmute(appid.unwrap_or(core::mem::zeroed())), core::mem::transmute(appidsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(dynamicid.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RtlQueryProcessPlaceholderCompatibilityMode() -> i8 { @@ -3617,13 +3371,9 @@ pub unsafe fn RtlRemoveUnicodePrefix(prefixtable: *const UNICODE_PREFIX_TABLE, p } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlReplaceSidInSd(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, oldsid: P1, newsid: P2, numchanges: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn RtlReplaceSidInSd(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, oldsid: super::super::super::Win32::Security::PSID, newsid: super::super::super::Win32::Security::PSID, numchanges: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlReplaceSidInSd(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, oldsid : super::super::super::Win32::Security:: PSID, newsid : super::super::super::Win32::Security:: PSID, numchanges : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlReplaceSidInSd(core::mem::transmute(securitydescriptor), oldsid.param().abi(), newsid.param().abi(), core::mem::transmute(numchanges)) + RtlReplaceSidInSd(core::mem::transmute(securitydescriptor), core::mem::transmute(oldsid), core::mem::transmute(newsid), core::mem::transmute(numchanges)) } #[inline] pub unsafe fn RtlReserveChunk(compressionformat: u16, compressedbuffer: *mut *mut u8, endofcompressedbufferplus1: *const u8, chunkbuffer: *mut *mut u8, chunksize: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3646,32 +3396,39 @@ pub unsafe fn RtlSecondsSince1980ToTime(elapsedseconds: u32) -> i64 { } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlSelfRelativeToAbsoluteSD(selfrelativesecuritydescriptor: P0, absolutesecuritydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, absolutesecuritydescriptorsize: *mut u32, dacl: Option<*mut super::super::super::Win32::Security::ACL>, daclsize: *mut u32, sacl: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn RtlSelfRelativeToAbsoluteSD(selfrelativesecuritydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, absolutesecuritydescriptor: Option, absolutesecuritydescriptorsize: *mut u32, dacl: Option<*mut super::super::super::Win32::Security::ACL>, daclsize: *mut u32, sacl: Option<*mut super::super::super::Win32::Security::ACL>, saclsize: *mut u32, owner: Option, ownersize: *mut u32, primarygroup: Option, primarygroupsize: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(absolutesecuritydescriptor), core::mem::transmute(absolutesecuritydescriptorsize), core::mem::transmute(dacl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(daclsize), core::mem::transmute(sacl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(saclsize), core::mem::transmute(owner), core::mem::transmute(ownersize), core::mem::transmute(primarygroup), core::mem::transmute(primarygroupsize)) + RtlSelfRelativeToAbsoluteSD( + core::mem::transmute(selfrelativesecuritydescriptor), + core::mem::transmute(absolutesecuritydescriptor.unwrap_or(core::mem::zeroed())), + core::mem::transmute(absolutesecuritydescriptorsize), + core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(daclsize), + core::mem::transmute(sacl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(saclsize), + core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ownersize), + core::mem::transmute(primarygroup.unwrap_or(core::mem::zeroed())), + core::mem::transmute(primarygroupsize), + ) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlSetGroupSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, group: P1, groupdefaulted: P2) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn RtlSetGroupSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, group: Option, groupdefaulted: P2) -> super::super::super::Win32::Foundation::NTSTATUS where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlSetGroupSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, group : super::super::super::Win32::Security:: PSID, groupdefaulted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlSetGroupSecurityDescriptor(core::mem::transmute(securitydescriptor), group.param().abi(), groupdefaulted.param().abi()) + RtlSetGroupSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(group.unwrap_or(core::mem::zeroed())), groupdefaulted.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlSetOwnerSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, owner: P1, ownerdefaulted: P2) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn RtlSetOwnerSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, owner: Option, ownerdefaulted: P2) -> super::super::super::Win32::Foundation::NTSTATUS where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlSetOwnerSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, owner : super::super::super::Win32::Security:: PSID, ownerdefaulted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlSetOwnerSecurityDescriptor(core::mem::transmute(securitydescriptor), owner.param().abi(), ownerdefaulted.param().abi()) + RtlSetOwnerSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), ownerdefaulted.param().abi()) } #[inline] pub unsafe fn RtlSetProcessPlaceholderCompatibilityMode(mode: i8) -> i8 { @@ -3685,21 +3442,15 @@ pub unsafe fn RtlSetThreadPlaceholderCompatibilityMode(mode: i8) -> i8 { } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlSubAuthorityCountSid(sid: P0) -> *mut u8 -where - P0: windows_core::Param, -{ +pub unsafe fn RtlSubAuthorityCountSid(sid: super::super::super::Win32::Security::PSID) -> *mut u8 { windows_targets::link!("ntdll.dll" "system" fn RtlSubAuthorityCountSid(sid : super::super::super::Win32::Security:: PSID) -> *mut u8); - RtlSubAuthorityCountSid(sid.param().abi()) + RtlSubAuthorityCountSid(core::mem::transmute(sid)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlSubAuthoritySid(sid: P0, subauthority: u32) -> *mut u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RtlSubAuthoritySid(sid: super::super::super::Win32::Security::PSID, subauthority: u32) -> *mut u32 { windows_targets::link!("ntdll.dll" "system" fn RtlSubAuthoritySid(sid : super::super::super::Win32::Security:: PSID, subauthority : u32) -> *mut u32); - RtlSubAuthoritySid(sid.param().abi(), core::mem::transmute(subauthority)) + RtlSubAuthoritySid(core::mem::transmute(sid), core::mem::transmute(subauthority)) } #[inline] pub unsafe fn RtlTimeToSecondsSince1980(time: *const i64, elapsedseconds: *mut u32) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3721,17 +3472,17 @@ where P4: 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(core::mem::transmute(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(), core::mem::transmute(bytesinunicodestring)) + RtlUnicodeToCustomCPN(core::mem::transmute(customcp), core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), core::mem::transmute(bytesincustomcpstring.unwrap_or(core::mem::zeroed())), unicodestring.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(unicodestring), core::mem::transmute(bytesinunicodestring)) + RtlUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(unicodestring), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(unicodestring), core::mem::transmute(bytesinunicodestring)) + RtlUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), core::mem::transmute(bytesinoemstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(unicodestring), core::mem::transmute(bytesinunicodestring)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3757,31 +3508,28 @@ where P4: 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(core::mem::transmute(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(), core::mem::transmute(bytesinunicodestring)) + RtlUpcaseUnicodeToCustomCPN(core::mem::transmute(customcp), core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), core::mem::transmute(bytesincustomcpstring.unwrap_or(core::mem::zeroed())), unicodestring.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(unicodestring), core::mem::transmute(bytesinunicodestring)) + RtlUpcaseUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(unicodestring), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(unicodestring), core::mem::transmute(bytesinunicodestring)) + RtlUpcaseUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), core::mem::transmute(bytesinoemstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(unicodestring), core::mem::transmute(bytesinunicodestring)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlValidSid(sid: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn RtlValidSid(sid: super::super::super::Win32::Security::PSID) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlValidSid(sid : super::super::super::Win32::Security:: PSID) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlValidSid(sid.param().abi()) + RtlValidSid(core::mem::transmute(sid)) } #[inline] -pub unsafe fn RtlValidateUnicodeString(flags: u32, string: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn RtlValidateUnicodeString(flags: Option, string: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlValidateUnicodeString(flags : u32, string : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlValidateUnicodeString(core::mem::transmute(flags), core::mem::transmute(string)) + RtlValidateUnicodeString(core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(string)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3796,49 +3544,33 @@ pub unsafe fn RtlxUnicodeStringToOemSize(unicodestring: *const super::super::sup } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeAccessCheckFromState(securitydescriptor: P0, primarytokeninformation: *const super::super::super::Win32::Security::TOKEN_ACCESS_INFORMATION, clienttokeninformation: Option<*const super::super::super::Win32::Security::TOKEN_ACCESS_INFORMATION>, desiredaccess: u32, previouslygrantedaccess: u32, privileges: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn SeAccessCheckFromState(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, primarytokeninformation: *const super::super::super::Win32::Security::TOKEN_ACCESS_INFORMATION, clienttokeninformation: Option<*const super::super::super::Win32::Security::TOKEN_ACCESS_INFORMATION>, desiredaccess: u32, previouslygrantedaccess: u32, privileges: Option<*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 { 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(), core::mem::transmute(primarytokeninformation), core::mem::transmute(clienttokeninformation.unwrap_or(core::ptr::null())), core::mem::transmute(desiredaccess), core::mem::transmute(previouslygrantedaccess), core::mem::transmute(privileges.unwrap_or(core::ptr::null_mut())), core::mem::transmute(genericmapping), core::mem::transmute(accessmode), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) + SeAccessCheckFromState(core::mem::transmute(securitydescriptor), core::mem::transmute(primarytokeninformation), core::mem::transmute(clienttokeninformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(previouslygrantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping), core::mem::transmute(accessmode), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeAccessCheckFromStateEx(securitydescriptor: P0, primarytoken: *const core::ffi::c_void, clienttoken: Option<*const core::ffi::c_void>, desiredaccess: u32, previouslygrantedaccess: u32, privileges: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn SeAccessCheckFromStateEx(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, primarytoken: *const core::ffi::c_void, clienttoken: Option<*const core::ffi::c_void>, desiredaccess: u32, previouslygrantedaccess: u32, privileges: Option<*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 { 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(), core::mem::transmute(primarytoken), core::mem::transmute(clienttoken.unwrap_or(core::ptr::null())), core::mem::transmute(desiredaccess), core::mem::transmute(previouslygrantedaccess), core::mem::transmute(privileges.unwrap_or(core::ptr::null_mut())), core::mem::transmute(genericmapping), core::mem::transmute(accessmode), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) + SeAccessCheckFromStateEx(core::mem::transmute(securitydescriptor), core::mem::transmute(primarytoken), core::mem::transmute(clienttoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(previouslygrantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping), core::mem::transmute(accessmode), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAdjustAccessStateForAccessConstraints(objecttype: *const core::ffi::c_void, securitydescriptor: P1, accessstate: *mut super::super::Foundation::ACCESS_STATE) -where - P1: windows_core::Param, -{ +pub unsafe fn SeAdjustAccessStateForAccessConstraints(objecttype: *const core::ffi::c_void, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *mut super::super::Foundation::ACCESS_STATE) { windows_targets::link!("ntoskrnl.exe" "system" fn SeAdjustAccessStateForAccessConstraints(objecttype : *const core::ffi::c_void, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *mut super::super::Foundation:: ACCESS_STATE)); - SeAdjustAccessStateForAccessConstraints(core::mem::transmute(objecttype), securitydescriptor.param().abi(), core::mem::transmute(accessstate)) + SeAdjustAccessStateForAccessConstraints(core::mem::transmute(objecttype), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAdjustAccessStateForTrustLabel(objecttype: *const core::ffi::c_void, securitydescriptor: P1, accessstate: *mut super::super::Foundation::ACCESS_STATE) -where - P1: windows_core::Param, -{ +pub unsafe fn SeAdjustAccessStateForTrustLabel(objecttype: *const core::ffi::c_void, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *mut super::super::Foundation::ACCESS_STATE) { windows_targets::link!("ntoskrnl.exe" "system" fn SeAdjustAccessStateForTrustLabel(objecttype : *const core::ffi::c_void, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *mut super::super::Foundation:: ACCESS_STATE)); - SeAdjustAccessStateForTrustLabel(core::mem::transmute(objecttype), securitydescriptor.param().abi(), core::mem::transmute(accessstate)) + SeAdjustAccessStateForTrustLabel(core::mem::transmute(objecttype), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAdjustObjectSecurity(objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, originaldescriptor: P1, proposeddescriptor: P2, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, adjusteddescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, applyadjusteddescriptor: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SeAdjustObjectSecurity(objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, originaldescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, proposeddescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, adjusteddescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, applyadjusteddescriptor: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeAdjustObjectSecurity(objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, originaldescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, proposeddescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, adjusteddescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, applyadjusteddescriptor : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeAdjustObjectSecurity(core::mem::transmute(objectname), originaldescriptor.param().abi(), proposeddescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext), core::mem::transmute(adjusteddescriptor), core::mem::transmute(applyadjusteddescriptor)) + SeAdjustObjectSecurity(core::mem::transmute(objectname), core::mem::transmute(originaldescriptor), core::mem::transmute(proposeddescriptor), core::mem::transmute(subjectsecuritycontext), core::mem::transmute(adjusteddescriptor), core::mem::transmute(applyadjusteddescriptor)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] @@ -3868,7 +3600,7 @@ where P2: 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(core::mem::transmute(filename), core::mem::transmute(linkname), bsuccess.param().abi(), core::mem::transmute(transactionid.unwrap_or(core::ptr::null()))) + SeAuditHardLinkCreationWithTransaction(core::mem::transmute(filename), core::mem::transmute(linkname), bsuccess.param().abi(), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SeAuditTransactionStateChange(transactionid: *const windows_core::GUID, resourcemanagerid: *const windows_core::GUID, newtransactionstate: u32) { @@ -3877,115 +3609,94 @@ pub unsafe fn SeAuditTransactionStateChange(transactionid: *const windows_core:: } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingAnyFileEventsWithContext(securitydescriptor: P0, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditingAnyFileEventsWithContext(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN { 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(core::ptr::null()))) + SeAuditingAnyFileEventsWithContext(core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingAnyFileEventsWithContextEx(securitydescriptor: P0, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, stagingenabled: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditingAnyFileEventsWithContextEx(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, stagingenabled: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::BOOLEAN { 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(core::ptr::null())), core::mem::transmute(stagingenabled.unwrap_or(core::ptr::null_mut()))) + SeAuditingAnyFileEventsWithContextEx(core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(stagingenabled.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeAuditingFileEvents(accessgranted: P0, securitydescriptor: P1) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeAuditingFileEvents(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileEvents(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingFileEvents(accessgranted.param().abi(), securitydescriptor.param().abi()) + SeAuditingFileEvents(accessgranted.param().abi(), core::mem::transmute(securitydescriptor)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingFileEventsWithContext(accessgranted: P0, securitydescriptor: P1, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeAuditingFileEventsWithContext(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN where P0: windows_core::Param, - 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(core::ptr::null()))) + SeAuditingFileEventsWithContext(accessgranted.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingFileEventsWithContextEx(accessgranted: P0, securitydescriptor: P1, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, stagingenabled: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeAuditingFileEventsWithContextEx(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, stagingenabled: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::BOOLEAN where P0: windows_core::Param, - 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(core::ptr::null())), core::mem::transmute(stagingenabled.unwrap_or(core::ptr::null_mut()))) + SeAuditingFileEventsWithContextEx(accessgranted.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(stagingenabled.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingFileOrGlobalEvents(accessgranted: P0, securitydescriptor: P1, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeAuditingFileOrGlobalEvents(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileOrGlobalEvents(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); - SeAuditingFileOrGlobalEvents(accessgranted.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext)) + SeAuditingFileOrGlobalEvents(accessgranted.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeAuditingHardLinkEvents(accessgranted: P0, securitydescriptor: P1) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeAuditingHardLinkEvents(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingHardLinkEvents(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingHardLinkEvents(accessgranted.param().abi(), securitydescriptor.param().abi()) + SeAuditingHardLinkEvents(accessgranted.param().abi(), core::mem::transmute(securitydescriptor)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingHardLinkEventsWithContext(accessgranted: P0, securitydescriptor: P1, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeAuditingHardLinkEventsWithContext(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN where P0: windows_core::Param, - 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(core::ptr::null()))) + SeAuditingHardLinkEventsWithContext(accessgranted.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeCaptureSubjectContextEx(thread: P0, process: P1) -> super::super::Foundation::SECURITY_SUBJECT_CONTEXT -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SeCaptureSubjectContextEx(thread: Option, process: super::super::Foundation::PEPROCESS) -> super::super::Foundation::SECURITY_SUBJECT_CONTEXT { windows_targets::link!("ntoskrnl.exe" "system" fn SeCaptureSubjectContextEx(thread : super::super::Foundation:: PETHREAD, process : super::super::Foundation:: PEPROCESS, subjectcontext : *mut super::super::Foundation:: SECURITY_SUBJECT_CONTEXT)); let mut result__ = core::mem::zeroed(); - SeCaptureSubjectContextEx(thread.param().abi(), process.param().abi(), &mut result__); + SeCaptureSubjectContextEx(core::mem::transmute(thread.unwrap_or(core::mem::zeroed())), core::mem::transmute(process), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeCheckForCriticalAceRemoval(currentdescriptor: P0, newdescriptor: P1, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SeCheckForCriticalAceRemoval(currentdescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, newdescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeCheckForCriticalAceRemoval(currentdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, newdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, aceremoved : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeCheckForCriticalAceRemoval(currentdescriptor.param().abi(), newdescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext), &mut result__); + SeCheckForCriticalAceRemoval(core::mem::transmute(currentdescriptor), core::mem::transmute(newdescriptor), core::mem::transmute(subjectsecuritycontext), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeCreateClientSecurity(clientthread: P0, clientsecurityqos: *const super::super::super::Win32::Security::SECURITY_QUALITY_OF_SERVICE, remotesession: P2, clientcontext: *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn SeCreateClientSecurity(clientthread: super::super::Foundation::PETHREAD, clientsecurityqos: *const super::super::super::Win32::Security::SECURITY_QUALITY_OF_SERVICE, remotesession: P2, clientcontext: *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeCreateClientSecurity(clientthread : super::super::Foundation:: PETHREAD, clientsecurityqos : *const super::super::super::Win32::Security:: SECURITY_QUALITY_OF_SERVICE, remotesession : super::super::super::Win32::Foundation:: BOOLEAN, clientcontext : *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeCreateClientSecurity(clientthread.param().abi(), core::mem::transmute(clientsecurityqos), remotesession.param().abi(), core::mem::transmute(clientcontext)) + SeCreateClientSecurity(core::mem::transmute(clientthread), core::mem::transmute(clientsecurityqos), remotesession.param().abi(), core::mem::transmute(clientcontext)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4003,20 +3714,14 @@ pub unsafe fn SeDeleteClientSecurity(clientcontext: *mut SECURITY_CLIENT_CONTEXT SeDeleteClientSecurity(core::mem::transmute(clientcontext)) } #[inline] -pub unsafe fn SeDeleteObjectAuditAlarm(object: *const core::ffi::c_void, handle: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn SeDeleteObjectAuditAlarm(object: *const core::ffi::c_void, handle: super::super::super::Win32::Foundation::HANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn SeDeleteObjectAuditAlarm(object : *const core::ffi::c_void, handle : super::super::super::Win32::Foundation:: HANDLE)); - SeDeleteObjectAuditAlarm(core::mem::transmute(object), handle.param().abi()) + SeDeleteObjectAuditAlarm(core::mem::transmute(object), core::mem::transmute(handle)) } #[inline] -pub unsafe fn SeDeleteObjectAuditAlarmWithTransaction(object: *const core::ffi::c_void, handle: P1, transactionid: Option<*const windows_core::GUID>) -where - P1: windows_core::Param, -{ +pub unsafe fn SeDeleteObjectAuditAlarmWithTransaction(object: *const core::ffi::c_void, handle: super::super::super::Win32::Foundation::HANDLE, transactionid: Option<*const windows_core::GUID>) { 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(core::mem::transmute(object), handle.param().abi(), core::mem::transmute(transactionid.unwrap_or(core::ptr::null()))) + SeDeleteObjectAuditAlarmWithTransaction(core::mem::transmute(object), core::mem::transmute(handle), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4031,7 +3736,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(core::mem::transmute(existingtoken), core::mem::transmute(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())), core::mem::transmute(filteredtoken)) + SeFilterToken(core::mem::transmute(existingtoken), core::mem::transmute(flags), core::mem::transmute(sidstodisable.unwrap_or(core::mem::zeroed())), core::mem::transmute(privilegestodelete.unwrap_or(core::mem::zeroed())), core::mem::transmute(restrictedsids.unwrap_or(core::mem::zeroed())), core::mem::transmute(filteredtoken)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4041,30 +3746,21 @@ pub unsafe fn SeFreePrivileges(privileges: *const super::super::super::Win32::Se } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeImpersonateClient(clientcontext: *const SECURITY_CLIENT_CONTEXT, serverthread: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn SeImpersonateClient(clientcontext: *const SECURITY_CLIENT_CONTEXT, serverthread: Option) { windows_targets::link!("ntoskrnl.exe" "system" fn SeImpersonateClient(clientcontext : *const SECURITY_CLIENT_CONTEXT, serverthread : super::super::Foundation:: PETHREAD)); - SeImpersonateClient(core::mem::transmute(clientcontext), serverthread.param().abi()) + SeImpersonateClient(core::mem::transmute(clientcontext), core::mem::transmute(serverthread.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeImpersonateClientEx(clientcontext: *const SECURITY_CLIENT_CONTEXT, serverthread: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn SeImpersonateClientEx(clientcontext: *const SECURITY_CLIENT_CONTEXT, serverthread: Option) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeImpersonateClientEx(clientcontext : *const SECURITY_CLIENT_CONTEXT, serverthread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeImpersonateClientEx(core::mem::transmute(clientcontext), serverthread.param().abi()) + SeImpersonateClientEx(core::mem::transmute(clientcontext), core::mem::transmute(serverthread.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn SeLocateProcessImageName(process: P0, pimagefilename: *mut *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn SeLocateProcessImageName(process: super::super::Foundation::PEPROCESS, pimagefilename: *mut *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeLocateProcessImageName(process : super::super::Foundation:: PEPROCESS, pimagefilename : *mut *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeLocateProcessImageName(process.param().abi(), core::mem::transmute(pimagefilename)) + SeLocateProcessImageName(core::mem::transmute(process), core::mem::transmute(pimagefilename)) } #[inline] pub unsafe fn SeMarkLogonSessionForTerminationNotification(logonid: *const super::super::super::Win32::Foundation::LUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4073,63 +3769,56 @@ pub unsafe fn SeMarkLogonSessionForTerminationNotification(logonid: *const super } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn SeMarkLogonSessionForTerminationNotificationEx(logonid: *const super::super::super::Win32::Foundation::LUID, pserversilo: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn SeMarkLogonSessionForTerminationNotificationEx(logonid: *const super::super::super::Win32::Foundation::LUID, pserversilo: super::super::Foundation::PESILO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeMarkLogonSessionForTerminationNotificationEx(logonid : *const super::super::super::Win32::Foundation:: LUID, pserversilo : super::super::Foundation:: PESILO) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeMarkLogonSessionForTerminationNotificationEx(core::mem::transmute(logonid), pserversilo.param().abi()) + SeMarkLogonSessionForTerminationNotificationEx(core::mem::transmute(logonid), core::mem::transmute(pserversilo)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeOpenObjectAuditAlarm(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: P3, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeOpenObjectAuditAlarm(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN where - P3: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { 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(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(core::ptr::null())), securitydescriptor.param().abi(), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), &mut result__); + SeOpenObjectAuditAlarm(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeOpenObjectAuditAlarmWithTransaction(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: P3, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8, transactionid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeOpenObjectAuditAlarmWithTransaction(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8, transactionid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::BOOLEAN where - P3: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { 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(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(core::ptr::null())), securitydescriptor.param().abi(), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(transactionid.unwrap_or(core::ptr::null())), &mut result__); + SeOpenObjectAuditAlarmWithTransaction(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed())), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeOpenObjectForDeleteAuditAlarm(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: P3, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeOpenObjectForDeleteAuditAlarm(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN where - P3: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { 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(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(core::ptr::null())), securitydescriptor.param().abi(), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), &mut result__); + SeOpenObjectForDeleteAuditAlarm(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: P3, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8, transactionid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8, transactionid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::BOOLEAN where - P3: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { 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(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(core::ptr::null())), securitydescriptor.param().abi(), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(transactionid.unwrap_or(core::ptr::null())), &mut result__); + SeOpenObjectForDeleteAuditAlarmWithTransaction(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed())), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] @@ -4183,12 +3872,9 @@ pub unsafe fn SeRegisterLogonSessionTerminatedRoutineEx(callbackroutine: PSE_LOG } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] -pub unsafe fn SeReportSecurityEventWithSubCategory(flags: u32, sourcename: *const super::super::super::Win32::Foundation::UNICODE_STRING, usersid: P2, auditparameters: *const super::super::super::Win32::Security::Authentication::Identity::SE_ADT_PARAMETER_ARRAY, auditsubcategoryid: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn SeReportSecurityEventWithSubCategory(flags: u32, sourcename: *const super::super::super::Win32::Foundation::UNICODE_STRING, usersid: Option, auditparameters: *const super::super::super::Win32::Security::Authentication::Identity::SE_ADT_PARAMETER_ARRAY, auditsubcategoryid: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeReportSecurityEventWithSubCategory(flags : u32, sourcename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, usersid : super::super::super::Win32::Security:: PSID, auditparameters : *const super::super::super::Win32::Security::Authentication::Identity:: SE_ADT_PARAMETER_ARRAY, auditsubcategoryid : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeReportSecurityEventWithSubCategory(core::mem::transmute(flags), core::mem::transmute(sourcename), usersid.param().abi(), core::mem::transmute(auditparameters), core::mem::transmute(auditsubcategoryid)) + SeReportSecurityEventWithSubCategory(core::mem::transmute(flags), core::mem::transmute(sourcename), core::mem::transmute(usersid.unwrap_or(core::mem::zeroed())), core::mem::transmute(auditparameters), core::mem::transmute(auditsubcategoryid)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] @@ -4198,36 +3884,27 @@ pub unsafe fn SeSetAccessStateGenericMapping(accessstate: *mut super::super::Fou } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeSetSecurityDescriptorInfo(object: Option<*const core::ffi::c_void>, securityinformation: *const u32, modificationdescriptor: P2, 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 -where - P2: windows_core::Param, -{ +pub unsafe fn SeSetSecurityDescriptorInfo(object: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinformation), modificationdescriptor.param().abi(), core::mem::transmute(objectssecuritydescriptor), core::mem::transmute(pooltype), core::mem::transmute(genericmapping)) + SeSetSecurityDescriptorInfo(core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinformation), core::mem::transmute(modificationdescriptor), core::mem::transmute(objectssecuritydescriptor), core::mem::transmute(pooltype), core::mem::transmute(genericmapping)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeSetSecurityDescriptorInfoEx(object: Option<*const core::ffi::c_void>, securityinformation: *const u32, modificationdescriptor: P2, 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 -where - P2: windows_core::Param, -{ +pub unsafe fn SeSetSecurityDescriptorInfoEx(object: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinformation), modificationdescriptor.param().abi(), core::mem::transmute(objectssecuritydescriptor), core::mem::transmute(autoinheritflags), core::mem::transmute(pooltype), core::mem::transmute(genericmapping)) + SeSetSecurityDescriptorInfoEx(core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinformation), core::mem::transmute(modificationdescriptor), core::mem::transmute(objectssecuritydescriptor), core::mem::transmute(autoinheritflags), core::mem::transmute(pooltype), core::mem::transmute(genericmapping)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeShouldCheckForAccessRightsFromParent(objecttype: *const core::ffi::c_void, childdescriptor: P1, accessstate: *const super::super::Foundation::ACCESS_STATE) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn SeShouldCheckForAccessRightsFromParent(objecttype: *const core::ffi::c_void, childdescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeShouldCheckForAccessRightsFromParent(objecttype : *const core::ffi::c_void, childdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeShouldCheckForAccessRightsFromParent(core::mem::transmute(objecttype), childdescriptor.param().abi(), core::mem::transmute(accessstate)) + SeShouldCheckForAccessRightsFromParent(core::mem::transmute(objecttype), core::mem::transmute(childdescriptor), core::mem::transmute(accessstate)) } #[cfg(feature = "Win32_Security")] #[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(core::ptr::null())), core::mem::transmute(token.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(requiredlength)) + SeTokenFromAccessInformation(core::mem::transmute(accessinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(requiredlength)) } #[inline] pub unsafe fn SeTokenIsAdmin(token: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -4264,22 +3941,19 @@ 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(core::mem::transmute(name), core::mem::transmute(sidsize), core::mem::transmute(sid), core::mem::transmute(nameuse), core::mem::transmute(domainsize), core::mem::transmute(referenceddomain.unwrap_or(core::ptr::null_mut()))) + SecLookupAccountName(core::mem::transmute(name), core::mem::transmute(sidsize), core::mem::transmute(sid), core::mem::transmute(nameuse), core::mem::transmute(domainsize), core::mem::transmute(referenceddomain.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SecLookupAccountSid(sid: P0, namesize: *mut u32, namebuffer: *mut super::super::super::Win32::Foundation::UNICODE_STRING, domainsize: *mut u32, domainbuffer: Option<*mut super::super::super::Win32::Foundation::UNICODE_STRING>, nameuse: *mut super::super::super::Win32::Security::SID_NAME_USE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut super::super::super::Win32::Foundation::UNICODE_STRING>, nameuse: *mut super::super::super::Win32::Security::SID_NAME_USE) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(namesize), core::mem::transmute(namebuffer), core::mem::transmute(domainsize), core::mem::transmute(domainbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nameuse)) + SecLookupAccountSid(core::mem::transmute(sid), core::mem::transmute(namesize), core::mem::transmute(namebuffer), core::mem::transmute(domainsize), core::mem::transmute(domainbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(sidtype), core::mem::transmute(sid), core::mem::transmute(sidbuffersize), core::mem::transmute(sidsize.unwrap_or(core::ptr::null_mut()))) + SecLookupWellKnownSid(core::mem::transmute(sidtype), core::mem::transmute(sid), core::mem::transmute(sidbuffersize), core::mem::transmute(sidsize.unwrap_or(core::mem::zeroed()))) } #[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: P7) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4317,43 +3991,55 @@ pub unsafe fn SspiAcceptSecurityContextAsync(asynccontext: *mut super::super::Fo 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( core::mem::transmute(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())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(fcontextreq), core::mem::transmute(targetdatarep), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) .ok() } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security_Authentication_Identity"))] #[inline] -pub unsafe fn SspiAcquireCredentialsHandleAsyncA(asynccontext: *mut super::super::Foundation::SspiAsyncContext, pszprincipal: P1, pszpackage: P2, 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<()> +pub unsafe fn SspiAcquireCredentialsHandleAsyncA(asynccontext: *mut super::super::Foundation::SspiAsyncContext, pszprincipal: P1, pszpackage: P2, fcredentialuse: u32, pvlogonid: Option<*const core::ffi::c_void>, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: Option, pvgetkeyargument: Option<*const core::ffi::c_void>, phcredential: *const SecHandle, ptsexpiry: Option<*const i64>) -> windows_core::Result<()> where P1: windows_core::Param, P2: 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(core::mem::transmute(asynccontext), pszprincipal.param().abi(), pszpackage.param().abi(), core::mem::transmute(fcredentialuse), core::mem::transmute(pvlogonid.unwrap_or(core::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), core::mem::transmute(pgetkeyfn), core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), core::mem::transmute(phcredential), core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null()))).ok() + SspiAcquireCredentialsHandleAsyncA( + core::mem::transmute(asynccontext), + pszprincipal.param().abi(), + pszpackage.param().abi(), + core::mem::transmute(fcredentialuse), + core::mem::transmute(pvlogonid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthdata.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pgetkeyfn.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pvgetkeyargument.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcredential), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), + ) + .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<()> { +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: Option, 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( core::mem::transmute(asynccontext), - core::mem::transmute(pszprincipal.unwrap_or(core::ptr::null())), + core::mem::transmute(pszprincipal.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpackage), core::mem::transmute(fcredentialuse), - core::mem::transmute(pvlogonid.unwrap_or(core::ptr::null())), - core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), - core::mem::transmute(pgetkeyfn), - core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), + core::mem::transmute(pvlogonid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthdata.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pgetkeyfn.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pvgetkeyargument.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcredential), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -4373,7 +4059,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(core::ptr::null()))) + SspiFreeAsyncContext(core::mem::transmute(handle.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4396,18 +4082,18 @@ where 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( core::mem::transmute(asynccontext), - core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), psztargetname.param().abi(), core::mem::transmute(fcontextreq), core::mem::transmute(reserved1), core::mem::transmute(targetdatarep), - core::mem::transmute(pinput.unwrap_or(core::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -4417,18 +4103,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( core::mem::transmute(asynccontext), - 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())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psztargetname.unwrap_or(core::mem::zeroed())), core::mem::transmute(fcontextreq), core::mem::transmute(reserved1), core::mem::transmute(targetdatarep), - core::mem::transmute(pinput.unwrap_or(core::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -4442,7 +4128,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(core::mem::transmute(context), core::mem::transmute(callback), core::mem::transmute(callbackdata.unwrap_or(core::ptr::null()))).ok() + SspiSetAsyncNotifyCallback(core::mem::transmute(context), core::mem::transmute(callback), core::mem::transmute(callbackdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn VerifySignature(phcontext: *const SecHandle, pmessage: *const SecBufferDesc, messageseqno: u32) -> windows_core::Result { @@ -4452,23 +4138,22 @@ pub unsafe fn VerifySignature(phcontext: *const SecHandle, pmessage: *const SecB } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAccessCheckAndAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: P4, desiredaccess: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwAccessCheckAndAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*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: P7, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, P7: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), securitydescriptor.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) + ZwAccessCheckAndAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAccessCheckByTypeAndAuditAlarm( +pub unsafe fn ZwAccessCheckByTypeAndAuditAlarm( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, - securitydescriptor: P4, - principalselfsid: P5, + securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, + principalselfsid: Option, desiredaccess: u32, audittype: super::super::super::Win32::Security::AUDIT_EVENT_TYPE, flags: u32, @@ -4480,18 +4165,16 @@ pub unsafe fn ZwAccessCheckByTypeAndAuditAlarm( generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, ) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, - P5: windows_core::Param, P12: 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( core::mem::transmute(subsystemname), - core::mem::transmute(handleid.unwrap_or(core::ptr::null())), + core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), @@ -4506,13 +4189,13 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarm( +pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarm( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, - securitydescriptor: P4, - principalselfsid: P5, + securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, + principalselfsid: Option, desiredaccess: u32, audittype: super::super::super::Win32::Security::AUDIT_EVENT_TYPE, flags: u32, @@ -4525,22 +4208,20 @@ pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarm( generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, ) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, - P5: windows_core::Param, P12: 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( core::mem::transmute(subsystemname), - core::mem::transmute(handleid.unwrap_or(core::ptr::null())), + core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), - core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null())), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), objectcreation.param().abi(), @@ -4551,14 +4232,14 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle( +pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, - clienttoken: P2, + 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: P5, - principalselfsid: P6, + securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, + principalselfsid: Option, desiredaccess: u32, audittype: super::super::super::Win32::Security::AUDIT_EVENT_TYPE, flags: u32, @@ -4571,24 +4252,21 @@ pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle super::super::super::Win32::Foundation::NTSTATUS where - P2: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, P13: 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( core::mem::transmute(subsystemname), - core::mem::transmute(handleid.unwrap_or(core::ptr::null())), - clienttoken.param().abi(), + core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(clienttoken), core::mem::transmute(objecttypename), core::mem::transmute(objectname), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), - core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null())), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), objectcreation.param().abi(), @@ -4599,49 +4277,38 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAdjustGroupsToken(tokenhandle: P0, resettodefault: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_GROUPS>, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwAdjustGroupsToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, resettodefault: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_GROUPS>, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength)) + ZwAdjustGroupsToken(core::mem::transmute(tokenhandle), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAdjustPrivilegesToken(tokenhandle: P0, disableallprivileges: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwAdjustPrivilegesToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, disableallprivileges: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ZwAdjustPrivilegesToken(core::mem::transmute(tokenhandle), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn ZwAllocateVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, zerobits: usize, regionsize: *mut usize, allocationtype: u32, protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAllocateVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, zerobits : usize, regionsize : *mut usize, allocationtype : u32, protect : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAllocateVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(zerobits), core::mem::transmute(regionsize), core::mem::transmute(allocationtype), core::mem::transmute(protect)) + ZwAllocateVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(zerobits), core::mem::transmute(regionsize), core::mem::transmute(allocationtype), core::mem::transmute(protect)) } #[cfg(feature = "Win32_System_Memory")] #[inline] -pub unsafe fn ZwAllocateVirtualMemoryEx(processhandle: P0, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, allocationtype: u32, pageprotection: u32, extendedparameters: Option<&mut [super::super::super::Win32::System::Memory::MEM_EXTENDED_PARAMETER]>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwAllocateVirtualMemoryEx(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, allocationtype: u32, pageprotection: u32, extendedparameters: Option<&mut [super::super::super::Win32::System::Memory::MEM_EXTENDED_PARAMETER]>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAllocateVirtualMemoryEx(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, regionsize : *mut usize, allocationtype : u32, pageprotection : u32, extendedparameters : *mut super::super::super::Win32::System::Memory:: MEM_EXTENDED_PARAMETER, extendedparametercount : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAllocateVirtualMemoryEx(processhandle.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(allocationtype), core::mem::transmute(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())) + ZwAllocateVirtualMemoryEx(core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(allocationtype), core::mem::transmute(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())) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwCancelIoFileEx(filehandle: P0, iorequesttocancel: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn ZwCancelIoFileEx(filehandle: super::super::super::Win32::Foundation::HANDLE, iorequesttocancel: Option<*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 { 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(core::ptr::null())), core::mem::transmute(iostatusblock)) + ZwCancelIoFileEx(core::mem::transmute(filehandle), core::mem::transmute(iorequesttocancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } #[inline] pub unsafe fn ZwCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: P2) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4649,7 +4316,7 @@ where P2: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), generateonclose.param().abi()) + ZwCloseObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4664,23 +4331,20 @@ where P4: 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(core::mem::transmute(eventhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(eventtype), initialstate.param().abi()) + ZwCreateEvent(core::mem::transmute(eventhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventtype), initialstate.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_Memory"))] #[inline] -pub unsafe fn ZwCreateSectionEx(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, filehandle: P6, extendedparameters: Option<&mut [super::super::super::Win32::System::Memory::MEM_EXTENDED_PARAMETER]>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn ZwCreateSectionEx(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, filehandle: Option, extendedparameters: Option<&mut [super::super::super::Win32::System::Memory::MEM_EXTENDED_PARAMETER]>) -> super::super::super::Win32::Foundation::NTSTATUS { 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( core::mem::transmute(sectionhandle), core::mem::transmute(desiredaccess), - core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), - core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), + core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), - filehandle.param().abi(), + core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed())), 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()), ) @@ -4697,113 +4361,92 @@ where P2: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), generateonclose.param().abi()) + ZwDeleteObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), 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 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ZwDuplicateObject(sourceprocesshandle: super::super::super::Win32::Foundation::HANDLE, sourcehandle: super::super::super::Win32::Foundation::HANDLE, targetprocesshandle: Option, targethandle: Option<*mut super::super::super::Win32::Foundation::HANDLE>, desiredaccess: u32, handleattributes: u32, options: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut())), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(options)) + ZwDuplicateObject(core::mem::transmute(sourceprocesshandle), core::mem::transmute(sourcehandle), core::mem::transmute(targetprocesshandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(targethandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(options)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwDuplicateToken(existingtokenhandle: P0, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: P3, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwDuplicateToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: P3, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P3: 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(), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), effectiveonly.param().abi(), core::mem::transmute(tokentype), core::mem::transmute(newtokenhandle)) + ZwDuplicateToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), effectiveonly.param().abi(), core::mem::transmute(tokentype), core::mem::transmute(newtokenhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwFilterToken(existingtokenhandle: P0, 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>, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwFilterToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, 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>, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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())), core::mem::transmute(newtokenhandle)) + ZwFilterToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(flags), core::mem::transmute(sidstodisable.unwrap_or(core::mem::zeroed())), core::mem::transmute(privilegestodelete.unwrap_or(core::mem::zeroed())), core::mem::transmute(restrictedsids.unwrap_or(core::mem::zeroed())), core::mem::transmute(newtokenhandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwFlushBuffersFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwFlushBuffersFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwFlushBuffersFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwFlushBuffersFile(filehandle.param().abi(), core::mem::transmute(iostatusblock)) + ZwFlushBuffersFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwFlushBuffersFileEx(filehandle: P0, flags: u32, parameters: *const core::ffi::c_void, parameterssize: u32, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwFlushBuffersFileEx(filehandle: super::super::super::Win32::Foundation::HANDLE, flags: u32, parameters: *const core::ffi::c_void, parameterssize: u32, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwFlushBuffersFileEx(filehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32, parameters : *const core::ffi::c_void, parameterssize : u32, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwFlushBuffersFileEx(filehandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(parameterssize), core::mem::transmute(iostatusblock)) + ZwFlushBuffersFileEx(core::mem::transmute(filehandle), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(parameterssize), core::mem::transmute(iostatusblock)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwFlushVirtualMemory(processhandle: P0, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwFlushVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwFlushVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, regionsize : *mut usize, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwFlushVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(iostatus)) + ZwFlushVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(iostatus)) } #[inline] -pub unsafe fn ZwFreeVirtualMemory(processhandle: P0, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, freetype: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwFreeVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, regionsize: *mut usize, freetype: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwFreeVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, regionsize : *mut usize, freetype : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwFreeVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(freetype)) + ZwFreeVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(regionsize), core::mem::transmute(freetype)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwFsControlFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fscontrolcode: u32, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwFsControlFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fscontrolcode: u32, 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 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(fscontrolcode), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength)) + ZwFsControlFile( + core::mem::transmute(filehandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(iostatusblock), + core::mem::transmute(fscontrolcode), + core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(inputbufferlength), + core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(outputbufferlength), + ) } #[inline] -pub unsafe fn ZwImpersonateAnonymousToken(threadhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwImpersonateAnonymousToken(threadhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwImpersonateAnonymousToken(threadhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwImpersonateAnonymousToken(threadhandle.param().abi()) + ZwImpersonateAnonymousToken(core::mem::transmute(threadhandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwLockFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: P8, exclusivelock: P9) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwLockFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: P8, exclusivelock: P9) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P8: windows_core::Param, P9: 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi()) + ZwLockFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi()) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwNotifyChangeKey(keyhandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P6, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P9) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwNotifyChangeKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P6, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P9) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P6: windows_core::Param, P9: 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), asynchronous.param().abi()) + ZwNotifyChangeKey(core::mem::transmute(keyhandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), asynchronous.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4813,121 +4456,123 @@ pub unsafe fn ZwOpenDirectoryObject(directoryhandle: *mut super::super::super::W } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwOpenObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: P4, clienttoken: P5, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwOpenObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: Option, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS where - P4: windows_core::Param, - P5: windows_core::Param, P9: windows_core::Param, P10: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), securitydescriptor.param().abi(), clienttoken.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), core::mem::transmute(generateonclose)) + ZwOpenObjectAuditAlarm( + core::mem::transmute(subsystemname), + core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(objecttypename), + core::mem::transmute(objectname), + core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), + core::mem::transmute(clienttoken), + core::mem::transmute(desiredaccess), + core::mem::transmute(grantedaccess), + core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), + objectcreation.param().abi(), + accessgranted.param().abi(), + core::mem::transmute(generateonclose), + ) } #[inline] -pub unsafe fn ZwOpenProcessToken(processhandle: P0, desiredaccess: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwOpenProcessToken(processhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenProcessToken(processhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenProcessToken(processhandle.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(tokenhandle)) + ZwOpenProcessToken(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn ZwOpenProcessTokenEx(processhandle: P0, desiredaccess: u32, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwOpenProcessTokenEx(processhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenProcessTokenEx(processhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, handleattributes : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenProcessTokenEx(processhandle.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) + ZwOpenProcessTokenEx(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn ZwOpenThreadToken(threadhandle: P0, desiredaccess: u32, openasself: P2, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwOpenThreadToken(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: P2, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwOpenThreadToken(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : super::super::super::Win32::Foundation:: BOOLEAN, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenThreadToken(threadhandle.param().abi(), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)) + ZwOpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn ZwOpenThreadTokenEx(threadhandle: P0, desiredaccess: u32, openasself: P2, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwOpenThreadTokenEx(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: P2, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwOpenThreadTokenEx(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : super::super::super::Win32::Foundation:: BOOLEAN, handleattributes : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenThreadTokenEx(threadhandle.param().abi(), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) + ZwOpenThreadTokenEx(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwPrivilegeCheck(clienttoken: P0, requiredprivileges: *mut super::super::super::Win32::Security::PRIVILEGE_SET, result: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwPrivilegeCheck(clienttoken: super::super::super::Win32::Foundation::HANDLE, requiredprivileges: *mut super::super::super::Win32::Security::PRIVILEGE_SET, result: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwPrivilegeCheck(clienttoken : super::super::super::Win32::Foundation:: HANDLE, requiredprivileges : *mut super::super::super::Win32::Security:: PRIVILEGE_SET, result : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrivilegeCheck(clienttoken.param().abi(), core::mem::transmute(requiredprivileges), core::mem::transmute(result)) + ZwPrivilegeCheck(core::mem::transmute(clienttoken), core::mem::transmute(requiredprivileges), core::mem::transmute(result)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwPrivilegeObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: P2, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P5) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwPrivilegeObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P5) -> super::super::super::Win32::Foundation::NTSTATUS where - P2: windows_core::Param, P5: 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(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), clienttoken.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) + ZwPrivilegeObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwPrivilegedServiceAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, clienttoken: P2, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P4) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwPrivilegedServiceAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, clienttoken: super::super::super::Win32::Foundation::HANDLE, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P4) -> super::super::super::Win32::Foundation::NTSTATUS where - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwPrivilegedServiceAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, servicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, clienttoken : super::super::super::Win32::Foundation:: HANDLE, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrivilegedServiceAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(servicename), clienttoken.param().abi(), core::mem::transmute(privileges), accessgranted.param().abi()) + ZwPrivilegedServiceAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(servicename), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.param().abi()) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwQueryDirectoryFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: P8, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P10) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwQueryDirectoryFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: P8, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P10) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P8: windows_core::Param, P10: 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(core::ptr::null())), restartscan.param().abi()) + ZwQueryDirectoryFile( + core::mem::transmute(filehandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(iostatusblock), + core::mem::transmute(fileinformation), + core::mem::transmute(length), + core::mem::transmute(fileinformationclass), + returnsingleentry.param().abi(), + core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), + restartscan.param().abi(), + ) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwQueryDirectoryFileEx(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwQueryDirectoryFileEx(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(queryflags), core::mem::transmute(filename.unwrap_or(core::ptr::null()))) + ZwQueryDirectoryFileEx(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(queryflags), core::mem::transmute(filename.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwQueryDirectoryObject(directoryhandle: P0, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: P3, restartscan: P4, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwQueryDirectoryObject(directoryhandle: super::super::super::Win32::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: P3, restartscan: P4, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null_mut())), core::mem::transmute(length), returnsingleentry.param().abi(), restartscan.param().abi(), core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ZwQueryDirectoryObject(core::mem::transmute(directoryhandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), returnsingleentry.param().abi(), restartscan.param().abi(), core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwQueryEaFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe 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: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P4: windows_core::Param, P8: 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(), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::ptr::null())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::ptr::null())), restartscan.param().abi()) + ZwQueryEaFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4937,130 +4582,88 @@ pub unsafe fn ZwQueryFullAttributesFile(objectattributes: *const super::super::F } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwQueryInformationToken(tokenhandle: P0, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: Option<*mut core::ffi::c_void>, tokeninformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryInformationToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: Option<*mut core::ffi::c_void>, tokeninformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(tokeninformationlength), core::mem::transmute(returnlength)) + ZwQueryInformationToken(core::mem::transmute(tokenhandle), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(tokeninformationlength), core::mem::transmute(returnlength)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ZwQueryObject(handle: P0, objectinformationclass: super::super::Foundation::OBJECT_INFORMATION_CLASS, objectinformation: Option<*mut core::ffi::c_void>, objectinformationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryObject(handle: Option, objectinformationclass: super::super::Foundation::OBJECT_INFORMATION_CLASS, objectinformation: Option<*mut core::ffi::c_void>, objectinformationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(objectinformationclass), core::mem::transmute(objectinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objectinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ZwQueryObject(core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectinformationclass), core::mem::transmute(objectinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ZwQueryQuotaInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: P7, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe 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: P4, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P4: windows_core::Param, - P7: windows_core::Param, P8: 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(), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::ptr::null())), core::mem::transmute(sidlistlength), startsid.param().abi(), restartscan.param().abi()) + ZwQueryQuotaInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwQuerySecurityObject(handle: P0, securityinformation: u32, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, length: u32, lengthneeded: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQuerySecurityObject(handle: super::super::super::Win32::Foundation::HANDLE, securityinformation: u32, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, length: u32, lengthneeded: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQuerySecurityObject(handle : super::super::super::Win32::Foundation:: HANDLE, securityinformation : u32, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, length : u32, lengthneeded : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQuerySecurityObject(handle.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor), core::mem::transmute(length), core::mem::transmute(lengthneeded)) + ZwQuerySecurityObject(core::mem::transmute(handle), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor), core::mem::transmute(length), core::mem::transmute(lengthneeded)) } #[inline] -pub unsafe fn ZwQueryVirtualMemory(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 -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, 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 { 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(core::ptr::null())), core::mem::transmute(memoryinformationclass), core::mem::transmute(memoryinformation), core::mem::transmute(memoryinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ZwQueryVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(memoryinformationclass), core::mem::transmute(memoryinformation), core::mem::transmute(memoryinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwQueryVolumeInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryVolumeInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *mut core::ffi::c_void, length: u32, fsinformationclass: FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryVolumeInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fsinformation : *mut core::ffi::c_void, length : u32, fsinformationclass : FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryVolumeInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) + ZwQueryVolumeInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwSetEaFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetEaFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetEaFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *const core::ffi::c_void, length : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetEaFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length)) + ZwSetEaFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length)) } #[inline] -pub unsafe fn ZwSetEvent(eventhandle: P0, previousstate: Option<*mut i32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetEvent(eventhandle: super::super::super::Win32::Foundation::HANDLE, previousstate: Option<*mut i32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut()))) + ZwSetEvent(core::mem::transmute(eventhandle), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwSetInformationToken(tokenhandle: P0, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: *const core::ffi::c_void, tokeninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, tokeninformationclass: super::super::super::Win32::Security::TOKEN_INFORMATION_CLASS, tokeninformation: *const core::ffi::c_void, tokeninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, tokeninformationclass : super::super::super::Win32::Security:: TOKEN_INFORMATION_CLASS, tokeninformation : *const core::ffi::c_void, tokeninformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationToken(tokenhandle.param().abi(), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation), core::mem::transmute(tokeninformationlength)) + ZwSetInformationToken(core::mem::transmute(tokenhandle), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation), core::mem::transmute(tokeninformationlength)) } #[inline] -pub unsafe fn ZwSetInformationVirtualMemory(processhandle: P0, vminformationclass: VIRTUAL_MEMORY_INFORMATION_CLASS, virtualaddresses: &[MEMORY_RANGE_ENTRY], vminformation: *const core::ffi::c_void, vminformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, vminformationclass: VIRTUAL_MEMORY_INFORMATION_CLASS, virtualaddresses: &[MEMORY_RANGE_ENTRY], vminformation: *const core::ffi::c_void, vminformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, vminformationclass : VIRTUAL_MEMORY_INFORMATION_CLASS, numberofentries : usize, virtualaddresses : *const MEMORY_RANGE_ENTRY, vminformation : *const core::ffi::c_void, vminformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationVirtualMemory(processhandle.param().abi(), core::mem::transmute(vminformationclass), virtualaddresses.len().try_into().unwrap(), core::mem::transmute(virtualaddresses.as_ptr()), core::mem::transmute(vminformation), core::mem::transmute(vminformationlength)) + ZwSetInformationVirtualMemory(core::mem::transmute(processhandle), core::mem::transmute(vminformationclass), virtualaddresses.len().try_into().unwrap(), core::mem::transmute(virtualaddresses.as_ptr()), core::mem::transmute(vminformation), core::mem::transmute(vminformationlength)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwSetQuotaInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetQuotaInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *const core::ffi::c_void, length: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetQuotaInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *const core::ffi::c_void, length : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetQuotaInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length)) + ZwSetQuotaInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwSetSecurityObject(handle: P0, securityinformation: u32, securitydescriptor: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ZwSetSecurityObject(handle: super::super::super::Win32::Foundation::HANDLE, securityinformation: u32, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetSecurityObject(handle : super::super::super::Win32::Foundation:: HANDLE, securityinformation : u32, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetSecurityObject(handle.param().abi(), core::mem::transmute(securityinformation), securitydescriptor.param().abi()) + ZwSetSecurityObject(core::mem::transmute(handle), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwSetVolumeInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *const core::ffi::c_void, length: u32, fsinformationclass: FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetVolumeInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fsinformation: *const core::ffi::c_void, length: u32, fsinformationclass: FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetVolumeInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fsinformation : *const core::ffi::c_void, length : u32, fsinformationclass : FS_INFORMATION_CLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetVolumeInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) + ZwSetVolumeInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(fsinformation), core::mem::transmute(length), core::mem::transmute(fsinformationclass)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwUnlockFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, byteoffset: *const i64, length: *const i64, key: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwUnlockFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, byteoffset: *const i64, length: *const i64, key: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwUnlockFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, byteoffset : *const i64, length : *const i64, key : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwUnlockFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key)) + ZwUnlockFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key)) } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 b993cde6d5..f36523b58c 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/IO/mod.rs @@ -1,10 +1,17 @@ #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtDeviceIoControlFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, iocontrolcode: u32, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtDeviceIoControlFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, iocontrolcode: u32, 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 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(iocontrolcode), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength)) + NtDeviceIoControlFile( + core::mem::transmute(filehandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(iostatusblock), + core::mem::transmute(iocontrolcode), + core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(inputbufferlength), + core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(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 88933fa2d2..1a30c1e317 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Memory/mod.rs @@ -1,11 +1,7 @@ #[inline] -pub unsafe fn NtMapViewOfSection(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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe 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: Option<*mut i64>, viewsize: *mut usize, inheritdisposition: SECTION_INHERIT, allocationtype: u32, win32protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(baseaddress), core::mem::transmute(zerobits), core::mem::transmute(commitsize), core::mem::transmute(sectionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(viewsize), core::mem::transmute(inheritdisposition), core::mem::transmute(allocationtype), core::mem::transmute(win32protect)) + NtMapViewOfSection(core::mem::transmute(sectionhandle), core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(zerobits), core::mem::transmute(commitsize), core::mem::transmute(sectionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(viewsize), core::mem::transmute(inheritdisposition), core::mem::transmute(allocationtype), core::mem::transmute(win32protect)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -14,21 +10,14 @@ pub unsafe fn NtOpenSection(sectionhandle: *mut super::super::super::Win32::Foun NtOpenSection(core::mem::transmute(sectionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn NtUnmapViewOfSection(processhandle: P0, baseaddress: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtUnmapViewOfSection(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtUnmapViewOfSection(core::mem::transmute(processhandle), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe 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: Option<*mut i64>, viewsize: *mut usize, inheritdisposition: SECTION_INHERIT, allocationtype: u32, win32protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(baseaddress), core::mem::transmute(zerobits), core::mem::transmute(commitsize), core::mem::transmute(sectionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(viewsize), core::mem::transmute(inheritdisposition), core::mem::transmute(allocationtype), core::mem::transmute(win32protect)) + ZwMapViewOfSection(core::mem::transmute(sectionhandle), core::mem::transmute(processhandle), core::mem::transmute(baseaddress), core::mem::transmute(zerobits), core::mem::transmute(commitsize), core::mem::transmute(sectionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(viewsize), core::mem::transmute(inheritdisposition), core::mem::transmute(allocationtype), core::mem::transmute(win32protect)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -37,12 +26,9 @@ pub unsafe fn ZwOpenSection(sectionhandle: *mut super::super::super::Win32::Foun ZwOpenSection(core::mem::transmute(sectionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn ZwUnmapViewOfSection(processhandle: P0, baseaddress: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwUnmapViewOfSection(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwUnmapViewOfSection(core::mem::transmute(processhandle), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed()))) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 f74d60d9e6..c7069461d8 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs @@ -1,18 +1,12 @@ #[inline] -pub unsafe fn ORCloseHive(handle: P0) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ORCloseHive(handle: ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORCloseHive(handle : ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORCloseHive(handle.param().abi()) + ORCloseHive(core::mem::transmute(handle)) } #[inline] -pub unsafe fn ORCloseKey(keyhandle: P0) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ORCloseKey(keyhandle: ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORCloseKey(keyhandle : ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORCloseKey(keyhandle.param().abi()) + ORCloseKey(core::mem::transmute(keyhandle)) } #[inline] pub unsafe fn ORCreateHive(horkey: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { @@ -21,68 +15,54 @@ pub unsafe fn ORCreateHive(horkey: *mut ORHKEY) -> super::super::super::Win32::F } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ORCreateKey(keyhandle: P0, lpsubkey: P1, lpclass: P2, dwoptions: u32, psecuritydescriptor: P4, phkresult: *mut ORHKEY, pdwdisposition: Option<*mut u32>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORCreateKey(keyhandle: ORHKEY, lpsubkey: P1, lpclass: P2, dwoptions: Option, psecuritydescriptor: Option, phkresult: *mut ORHKEY, pdwdisposition: Option<*mut u32>) -> super::super::super::Win32::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P4: 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(), core::mem::transmute(dwoptions), psecuritydescriptor.param().abi(), core::mem::transmute(phkresult), core::mem::transmute(pdwdisposition.unwrap_or(core::ptr::null_mut()))) + ORCreateKey(core::mem::transmute(keyhandle), lpsubkey.param().abi(), lpclass.param().abi(), core::mem::transmute(dwoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(pdwdisposition.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ORDeleteKey(handle: P0, lpsubkey: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORDeleteKey(handle: ORHKEY, lpsubkey: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("offreg.dll" "system" fn ORDeleteKey(handle : ORHKEY, lpsubkey : windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORDeleteKey(handle.param().abi(), lpsubkey.param().abi()) + ORDeleteKey(core::mem::transmute(handle), lpsubkey.param().abi()) } #[inline] -pub unsafe fn ORDeleteValue(handle: P0, lpvaluename: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORDeleteValue(handle: ORHKEY, lpvaluename: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("offreg.dll" "system" fn ORDeleteValue(handle : ORHKEY, lpvaluename : windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORDeleteValue(handle.param().abi(), lpvaluename.param().abi()) + ORDeleteValue(core::mem::transmute(handle), lpvaluename.param().abi()) } #[inline] -pub unsafe fn OREnumKey(handle: P0, dwindex: u32, lpname: windows_core::PWSTR, lpcname: *mut u32, lpclass: windows_core::PWSTR, lpcclass: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::super::Win32::Foundation::FILETIME>) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn OREnumKey(handle: ORHKEY, dwindex: u32, lpname: windows_core::PWSTR, lpcname: *mut u32, lpclass: Option, lpcclass: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::super::Win32::Foundation::FILETIME>) -> super::super::super::Win32::Foundation::WIN32_ERROR { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpname), core::mem::transmute(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()))) + OREnumKey(core::mem::transmute(handle), core::mem::transmute(dwindex), core::mem::transmute(lpname), core::mem::transmute(lpcname), core::mem::transmute(lpclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpftlastwritetime.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn OREnumValue(handle: ORHKEY, 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 { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpvaluename), core::mem::transmute(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()))) + OREnumValue(core::mem::transmute(handle), core::mem::transmute(dwindex), core::mem::transmute(lpvaluename), core::mem::transmute(lpcvaluename), core::mem::transmute(lptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ORGetKeySecurity(handle: P0, securityinformation: u32, psecuritydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ORGetKeySecurity(handle: ORHKEY, securityinformation: u32, psecuritydescriptor: Option, lpcbsecuritydescriptor: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORGetKeySecurity(handle : ORHKEY, securityinformation : u32, psecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORGetKeySecurity(handle.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(lpcbsecuritydescriptor)) + ORGetKeySecurity(core::mem::transmute(handle), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbsecuritydescriptor)) } #[inline] -pub unsafe fn ORGetValue(handle: P0, lpsubkey: P1, lpvalue: P2, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORGetValue(handle: ORHKEY, lpsubkey: P1, lpvalue: P2, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::super::Win32::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) + ORGetValue(core::mem::transmute(handle), lpsubkey.param().abi(), lpvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ORGetVersion(pdwmajorversion: *mut u32, pdwminorversion: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR { @@ -90,12 +70,9 @@ pub unsafe fn ORGetVersion(pdwmajorversion: *mut u32, pdwminorversion: *mut u32) ORGetVersion(core::mem::transmute(pdwmajorversion), core::mem::transmute(pdwminorversion)) } #[inline] -pub unsafe fn ORGetVirtualFlags(handle: P0, pdwflags: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ORGetVirtualFlags(handle: ORHKEY, pdwflags: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORGetVirtualFlags(handle : ORHKEY, pdwflags : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORGetVirtualFlags(handle.param().abi(), core::mem::transmute(pdwflags)) + ORGetVirtualFlags(core::mem::transmute(handle), core::mem::transmute(pdwflags)) } #[inline] pub unsafe fn ORMergeHives(hivehandles: &[ORHKEY], phkresult: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { @@ -111,86 +88,69 @@ where OROpenHive(filepath.param().abi(), core::mem::transmute(horkey)) } #[inline] -pub unsafe fn OROpenHiveByHandle(filehandle: P0, horkey: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn OROpenHiveByHandle(filehandle: super::super::super::Win32::Foundation::HANDLE, horkey: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn OROpenHiveByHandle(filehandle : super::super::super::Win32::Foundation:: HANDLE, horkey : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - OROpenHiveByHandle(filehandle.param().abi(), core::mem::transmute(horkey)) + OROpenHiveByHandle(core::mem::transmute(filehandle), core::mem::transmute(horkey)) } #[inline] -pub unsafe fn OROpenKey(handle: P0, lpsubkey: P1, phkresult: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn OROpenKey(handle: ORHKEY, lpsubkey: P1, phkresult: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("offreg.dll" "system" fn OROpenKey(handle : ORHKEY, lpsubkey : windows_core::PCWSTR, phkresult : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - OROpenKey(handle.param().abi(), lpsubkey.param().abi(), core::mem::transmute(phkresult)) + OROpenKey(core::mem::transmute(handle), lpsubkey.param().abi(), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn ORQueryInfoKey(handle: P0, lpclass: windows_core::PWSTR, lpcclass: Option<*mut u32>, lpcsubkeys: Option<*mut u32>, lpcmaxsubkeylen: Option<*mut u32>, lpcmaxclasslen: Option<*mut u32>, lpcvalues: Option<*mut u32>, lpcmaxvaluenamelen: Option<*mut u32>, lpcmaxvaluelen: Option<*mut u32>, lpcbsecuritydescriptor: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::super::Win32::Foundation::FILETIME>) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ORQueryInfoKey(handle: ORHKEY, lpclass: Option, lpcclass: Option<*mut u32>, lpcsubkeys: Option<*mut u32>, lpcmaxsubkeylen: Option<*mut u32>, lpcmaxclasslen: Option<*mut u32>, lpcvalues: Option<*mut u32>, lpcmaxvaluenamelen: Option<*mut u32>, lpcmaxvaluelen: Option<*mut u32>, lpcbsecuritydescriptor: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::super::Win32::Foundation::FILETIME>) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORQueryInfoKey(handle : ORHKEY, lpclass : windows_core::PWSTR, lpcclass : *mut u32, lpcsubkeys : *mut u32, lpcmaxsubkeylen : *mut u32, lpcmaxclasslen : *mut u32, lpcvalues : *mut u32, lpcmaxvaluenamelen : *mut u32, lpcmaxvaluelen : *mut u32, lpcbsecuritydescriptor : *mut u32, lpftlastwritetime : *mut super::super::super::Win32::Foundation:: FILETIME) -> super::super::super::Win32::Foundation:: WIN32_ERROR); ORQueryInfoKey( - handle.param().abi(), - core::mem::transmute(lpclass), - 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())), + core::mem::transmute(handle), + core::mem::transmute(lpclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcsubkeys.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcmaxsubkeylen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcmaxclasslen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcvalues.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcmaxvaluenamelen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcmaxvaluelen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpftlastwritetime.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn ORRenameKey(handle: P0, lpnewname: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORRenameKey(handle: ORHKEY, lpnewname: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("offreg.dll" "system" fn ORRenameKey(handle : ORHKEY, lpnewname : windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORRenameKey(handle.param().abi(), lpnewname.param().abi()) + ORRenameKey(core::mem::transmute(handle), lpnewname.param().abi()) } #[inline] -pub unsafe fn ORSaveHive(horkey: P0, hivepath: P1, osmajorversion: u32, osminorversion: u32) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORSaveHive(horkey: ORHKEY, hivepath: P1, osmajorversion: u32, osminorversion: u32) -> super::super::super::Win32::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("offreg.dll" "system" fn ORSaveHive(horkey : ORHKEY, hivepath : windows_core::PCWSTR, osmajorversion : u32, osminorversion : u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSaveHive(horkey.param().abi(), hivepath.param().abi(), core::mem::transmute(osmajorversion), core::mem::transmute(osminorversion)) + ORSaveHive(core::mem::transmute(horkey), hivepath.param().abi(), core::mem::transmute(osmajorversion), core::mem::transmute(osminorversion)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ORSetKeySecurity(handle: P0, securityinformation: u32, psecuritydescriptor: P2) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ORSetKeySecurity(handle: ORHKEY, securityinformation: u32, psecuritydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORSetKeySecurity(handle : ORHKEY, securityinformation : u32, psecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSetKeySecurity(handle.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()) + ORSetKeySecurity(core::mem::transmute(handle), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)) } #[inline] -pub unsafe fn ORSetValue(handle: P0, lpvaluename: P1, dwtype: u32, lpdata: Option<&[u8]>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORSetValue(handle: ORHKEY, lpvaluename: P1, dwtype: u32, lpdata: Option<&[u8]>) -> super::super::super::Win32::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("offreg.dll" "system" fn ORSetValue(handle : ORHKEY, lpvaluename : windows_core::PCWSTR, dwtype : u32, lpdata : *const u8, cbdata : u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSetValue(handle.param().abi(), lpvaluename.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + ORSetValue(core::mem::transmute(handle), lpvaluename.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn ORSetVirtualFlags(handle: P0, dwflags: u32) -> super::super::super::Win32::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ORSetVirtualFlags(handle: ORHKEY, dwflags: u32) -> super::super::super::Win32::Foundation::WIN32_ERROR { windows_targets::link!("offreg.dll" "system" fn ORSetVirtualFlags(handle : ORHKEY, dwflags : u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSetVirtualFlags(handle.param().abi(), core::mem::transmute(dwflags)) + ORSetVirtualFlags(core::mem::transmute(handle), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn ORShutdown() -> super::super::super::Win32::Foundation::WIN32_ERROR { 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 8fe3a31182..8ecadaaf3e 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs @@ -1,93 +1,70 @@ #[inline] -pub unsafe fn NtCommitRegistryTransaction(transactionhandle: P0, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtCommitRegistryTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCommitRegistryTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCommitRegistryTransaction(transactionhandle.param().abi(), core::mem::transmute(flags)) + NtCommitRegistryTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(flags)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +pub unsafe fn NtCreateKey(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, titleindex: Option, 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(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(titleindex), core::mem::transmute(class.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), core::mem::transmute(disposition.unwrap_or(core::ptr::null_mut()))) + NtCreateKey(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(class.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions), core::mem::transmute(disposition.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtCreateKeyTransacted(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, transactionhandle: P6, disposition: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn NtCreateKeyTransacted(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, titleindex: Option, class: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, createoptions: u32, transactionhandle: super::super::super::Win32::Foundation::HANDLE, disposition: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(titleindex), core::mem::transmute(class.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), transactionhandle.param().abi(), core::mem::transmute(disposition.unwrap_or(core::ptr::null_mut()))) + NtCreateKeyTransacted(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(class.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions), core::mem::transmute(transactionhandle), core::mem::transmute(disposition.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +pub unsafe fn NtCreateRegistryTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: Option) -> 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(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions)) + NtCreateRegistryTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtDeleteKey(keyhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtDeleteKey(keyhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtDeleteKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtDeleteKey(keyhandle.param().abi()) + NtDeleteKey(core::mem::transmute(keyhandle)) } #[inline] -pub unsafe fn NtDeleteValueKey(keyhandle: P0, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtDeleteValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtDeleteValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valuename : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtDeleteValueKey(keyhandle.param().abi(), core::mem::transmute(valuename)) + NtDeleteValueKey(core::mem::transmute(keyhandle), core::mem::transmute(valuename)) } #[inline] -pub unsafe fn NtEnumerateKey(keyhandle: P0, index: u32, keyinformationclass: KEY_INFORMATION_CLASS, keyinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtEnumerateKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, index: u32, keyinformationclass: KEY_INFORMATION_CLASS, keyinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(index), core::mem::transmute(keyinformationclass), core::mem::transmute(keyinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(resultlength)) + NtEnumerateKey(core::mem::transmute(keyhandle), core::mem::transmute(index), core::mem::transmute(keyinformationclass), core::mem::transmute(keyinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtEnumerateValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, 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 { 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(), core::mem::transmute(index), core::mem::transmute(keyvalueinformationclass), core::mem::transmute(keyvalueinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(resultlength)) + NtEnumerateValueKey(core::mem::transmute(keyhandle), core::mem::transmute(index), core::mem::transmute(keyvalueinformationclass), core::mem::transmute(keyvalueinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(resultlength)) } #[inline] -pub unsafe fn NtFlushKey(keyhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtFlushKey(keyhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtFlushKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtFlushKey(keyhandle.param().abi()) + NtFlushKey(core::mem::transmute(keyhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn NtNotifyChangeMultipleKeys(masterkeyhandle: P0, subordinateobjects: Option<&[super::super::Foundation::OBJECT_ATTRIBUTES]>, event: P3, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P8, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P11) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtNotifyChangeMultipleKeys(masterkeyhandle: super::super::super::Win32::Foundation::HANDLE, subordinateobjects: Option<&[super::super::Foundation::OBJECT_ATTRIBUTES]>, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P8, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P11) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P3: windows_core::Param, P8: windows_core::Param, P11: 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(), + core::mem::transmute(masterkeyhandle), 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(), - core::mem::transmute(apcroutine), - core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.param().abi(), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), asynchronous.param().abi(), ) @@ -106,21 +83,15 @@ pub unsafe fn NtOpenKeyEx(keyhandle: *mut super::super::super::Win32::Foundation } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtOpenKeyTransacted(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, transactionhandle: P3) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn NtOpenKeyTransacted(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, transactionhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenKeyTransacted(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, transactionhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenKeyTransacted(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), transactionhandle.param().abi()) + NtOpenKeyTransacted(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(transactionhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtOpenKeyTransactedEx(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, openoptions: u32, transactionhandle: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn NtOpenKeyTransactedEx(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, openoptions: u32, transactionhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenKeyTransactedEx(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, openoptions : u32, transactionhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenKeyTransactedEx(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(openoptions), transactionhandle.param().abi()) + NtOpenKeyTransactedEx(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(openoptions), core::mem::transmute(transactionhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -129,178 +100,122 @@ pub unsafe fn NtOpenRegistryTransaction(transactionhandle: *mut super::super::su NtOpenRegistryTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn NtQueryKey(keyhandle: P0, keyinformationclass: KEY_INFORMATION_CLASS, keyinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, keyinformationclass: KEY_INFORMATION_CLASS, keyinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(keyinformationclass), core::mem::transmute(keyinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(resultlength)) + NtQueryKey(core::mem::transmute(keyhandle), core::mem::transmute(keyinformationclass), core::mem::transmute(keyinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryMultipleValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, valueentries: &mut [KEY_VALUE_ENTRY], valuebuffer: *mut core::ffi::c_void, bufferlength: *mut u32, requiredbufferlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(valuebuffer), core::mem::transmute(bufferlength), core::mem::transmute(requiredbufferlength.unwrap_or(core::ptr::null_mut()))) + NtQueryMultipleValueKey(core::mem::transmute(keyhandle), core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), core::mem::transmute(valuebuffer), core::mem::transmute(bufferlength), core::mem::transmute(requiredbufferlength.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, 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 { 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(), core::mem::transmute(valuename), core::mem::transmute(keyvalueinformationclass), core::mem::transmute(keyvalueinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(resultlength)) + NtQueryValueKey(core::mem::transmute(keyhandle), core::mem::transmute(valuename), core::mem::transmute(keyvalueinformationclass), core::mem::transmute(keyvalueinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(resultlength)) } #[inline] -pub unsafe fn NtRenameKey(keyhandle: P0, newname: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRenameKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, newname: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtRenameKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, newname : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRenameKey(keyhandle.param().abi(), core::mem::transmute(newname)) + NtRenameKey(core::mem::transmute(keyhandle), core::mem::transmute(newname)) } #[inline] -pub unsafe fn NtRestoreKey(keyhandle: P0, filehandle: P1, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtRestoreKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, filehandle: Option, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtRestoreKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, filehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRestoreKey(keyhandle.param().abi(), filehandle.param().abi(), core::mem::transmute(flags)) + NtRestoreKey(core::mem::transmute(keyhandle), core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn NtRollbackRegistryTransaction(transactionhandle: P0, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRollbackRegistryTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtRollbackRegistryTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRollbackRegistryTransaction(transactionhandle.param().abi(), core::mem::transmute(flags)) + NtRollbackRegistryTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(flags)) } #[inline] -pub unsafe fn NtSaveKey(keyhandle: P0, filehandle: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtSaveKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, filehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSaveKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, filehandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSaveKey(keyhandle.param().abi(), filehandle.param().abi()) + NtSaveKey(core::mem::transmute(keyhandle), core::mem::transmute(filehandle)) } #[inline] -pub unsafe fn NtSaveKeyEx(keyhandle: P0, filehandle: P1, format: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtSaveKeyEx(keyhandle: super::super::super::Win32::Foundation::HANDLE, filehandle: super::super::super::Win32::Foundation::HANDLE, format: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSaveKeyEx(keyhandle : super::super::super::Win32::Foundation:: HANDLE, filehandle : super::super::super::Win32::Foundation:: HANDLE, format : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSaveKeyEx(keyhandle.param().abi(), filehandle.param().abi(), core::mem::transmute(format)) + NtSaveKeyEx(core::mem::transmute(keyhandle), core::mem::transmute(filehandle), core::mem::transmute(format)) } #[inline] -pub unsafe fn NtSetInformationKey(keyhandle: P0, keysetinformationclass: KEY_SET_INFORMATION_CLASS, keysetinformation: *const core::ffi::c_void, keysetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, keysetinformationclass: KEY_SET_INFORMATION_CLASS, keysetinformation: *const core::ffi::c_void, keysetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, keysetinformationclass : KEY_SET_INFORMATION_CLASS, keysetinformation : *const core::ffi::c_void, keysetinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationKey(keyhandle.param().abi(), core::mem::transmute(keysetinformationclass), core::mem::transmute(keysetinformation), core::mem::transmute(keysetinformationlength)) + NtSetInformationKey(core::mem::transmute(keyhandle), core::mem::transmute(keysetinformationclass), core::mem::transmute(keysetinformation), core::mem::transmute(keysetinformationlength)) } #[inline] -pub unsafe fn NtSetValueKey(keyhandle: P0, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, titleindex: u32, r#type: u32, data: Option<*const core::ffi::c_void>, datasize: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, titleindex: Option, r#type: u32, data: Option<*const core::ffi::c_void>, datasize: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(valuename), core::mem::transmute(titleindex), core::mem::transmute(r#type), core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(datasize)) + NtSetValueKey(core::mem::transmute(keyhandle), core::mem::transmute(valuename), core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(datasize)) } #[inline] -pub unsafe fn ZwCommitRegistryTransaction(transactionhandle: P0, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwCommitRegistryTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCommitRegistryTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCommitRegistryTransaction(transactionhandle.param().abi(), core::mem::transmute(flags)) + ZwCommitRegistryTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(flags)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +pub unsafe fn ZwCreateKey(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, titleindex: Option, 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(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(titleindex), core::mem::transmute(class.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), core::mem::transmute(disposition.unwrap_or(core::ptr::null_mut()))) + ZwCreateKey(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(class.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions), core::mem::transmute(disposition.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwCreateKeyTransacted(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, transactionhandle: P6, disposition: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn ZwCreateKeyTransacted(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, titleindex: Option, class: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, createoptions: u32, transactionhandle: super::super::super::Win32::Foundation::HANDLE, disposition: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(titleindex), core::mem::transmute(class.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), transactionhandle.param().abi(), core::mem::transmute(disposition.unwrap_or(core::ptr::null_mut()))) + ZwCreateKeyTransacted(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(class.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions), core::mem::transmute(transactionhandle), core::mem::transmute(disposition.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +pub unsafe fn ZwCreateRegistryTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: Option) -> 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(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions)) + ZwCreateRegistryTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwDeleteKey(keyhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwDeleteKey(keyhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwDeleteKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwDeleteKey(keyhandle.param().abi()) + ZwDeleteKey(core::mem::transmute(keyhandle)) } #[inline] -pub unsafe fn ZwDeleteValueKey(keyhandle: P0, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwDeleteValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwDeleteValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valuename : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwDeleteValueKey(keyhandle.param().abi(), core::mem::transmute(valuename)) + ZwDeleteValueKey(core::mem::transmute(keyhandle), core::mem::transmute(valuename)) } #[inline] -pub unsafe fn ZwEnumerateKey(keyhandle: P0, index: u32, keyinformationclass: KEY_INFORMATION_CLASS, keyinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwEnumerateKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, index: u32, keyinformationclass: KEY_INFORMATION_CLASS, keyinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(index), core::mem::transmute(keyinformationclass), core::mem::transmute(keyinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(resultlength)) + ZwEnumerateKey(core::mem::transmute(keyhandle), core::mem::transmute(index), core::mem::transmute(keyinformationclass), core::mem::transmute(keyinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn ZwEnumerateValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, 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 { 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(), core::mem::transmute(index), core::mem::transmute(keyvalueinformationclass), core::mem::transmute(keyvalueinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(resultlength)) + ZwEnumerateValueKey(core::mem::transmute(keyhandle), core::mem::transmute(index), core::mem::transmute(keyvalueinformationclass), core::mem::transmute(keyvalueinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(resultlength)) } #[inline] -pub unsafe fn ZwFlushKey(keyhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwFlushKey(keyhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwFlushKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwFlushKey(keyhandle.param().abi()) + ZwFlushKey(core::mem::transmute(keyhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ZwNotifyChangeMultipleKeys(masterkeyhandle: P0, subordinateobjects: Option<&[super::super::Foundation::OBJECT_ATTRIBUTES]>, event: P3, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P8, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P11) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwNotifyChangeMultipleKeys(masterkeyhandle: super::super::super::Win32::Foundation::HANDLE, subordinateobjects: Option<&[super::super::Foundation::OBJECT_ATTRIBUTES]>, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P8, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P11) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, - P3: windows_core::Param, P8: windows_core::Param, P11: 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(), + core::mem::transmute(masterkeyhandle), 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(), - core::mem::transmute(apcroutine), - core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.param().abi(), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), asynchronous.param().abi(), ) @@ -319,21 +234,15 @@ pub unsafe fn ZwOpenKeyEx(keyhandle: *mut super::super::super::Win32::Foundation } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwOpenKeyTransacted(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, transactionhandle: P3) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn ZwOpenKeyTransacted(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, transactionhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenKeyTransacted(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, transactionhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenKeyTransacted(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), transactionhandle.param().abi()) + ZwOpenKeyTransacted(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(transactionhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwOpenKeyTransactedEx(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, openoptions: u32, transactionhandle: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ZwOpenKeyTransactedEx(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, openoptions: u32, transactionhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenKeyTransactedEx(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, openoptions : u32, transactionhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenKeyTransactedEx(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(openoptions), transactionhandle.param().abi()) + ZwOpenKeyTransactedEx(core::mem::transmute(keyhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(openoptions), core::mem::transmute(transactionhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -342,87 +251,54 @@ pub unsafe fn ZwOpenRegistryTransaction(transactionhandle: *mut super::super::su ZwOpenRegistryTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn ZwQueryKey(keyhandle: P0, keyinformationclass: KEY_INFORMATION_CLASS, keyinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, keyinformationclass: KEY_INFORMATION_CLASS, keyinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(keyinformationclass), core::mem::transmute(keyinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(resultlength)) + ZwQueryKey(core::mem::transmute(keyhandle), core::mem::transmute(keyinformationclass), core::mem::transmute(keyinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryMultipleValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, valueentries: &mut [KEY_VALUE_ENTRY], valuebuffer: *mut core::ffi::c_void, bufferlength: *mut u32, requiredbufferlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(valuebuffer), core::mem::transmute(bufferlength), core::mem::transmute(requiredbufferlength.unwrap_or(core::ptr::null_mut()))) + ZwQueryMultipleValueKey(core::mem::transmute(keyhandle), core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), core::mem::transmute(valuebuffer), core::mem::transmute(bufferlength), core::mem::transmute(requiredbufferlength.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, 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 { 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(), core::mem::transmute(valuename), core::mem::transmute(keyvalueinformationclass), core::mem::transmute(keyvalueinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(resultlength)) + ZwQueryValueKey(core::mem::transmute(keyhandle), core::mem::transmute(valuename), core::mem::transmute(keyvalueinformationclass), core::mem::transmute(keyvalueinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(resultlength)) } #[inline] -pub unsafe fn ZwRenameKey(keyhandle: P0, newname: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRenameKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, newname: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwRenameKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, newname : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRenameKey(keyhandle.param().abi(), core::mem::transmute(newname)) + ZwRenameKey(core::mem::transmute(keyhandle), core::mem::transmute(newname)) } #[inline] -pub unsafe fn ZwRestoreKey(keyhandle: P0, filehandle: P1, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwRestoreKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, filehandle: Option, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwRestoreKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, filehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRestoreKey(keyhandle.param().abi(), filehandle.param().abi(), core::mem::transmute(flags)) + ZwRestoreKey(core::mem::transmute(keyhandle), core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn ZwRollbackRegistryTransaction(transactionhandle: P0, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRollbackRegistryTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwRollbackRegistryTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRollbackRegistryTransaction(transactionhandle.param().abi(), core::mem::transmute(flags)) + ZwRollbackRegistryTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(flags)) } #[inline] -pub unsafe fn ZwSaveKey(keyhandle: P0, filehandle: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwSaveKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, filehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSaveKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, filehandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSaveKey(keyhandle.param().abi(), filehandle.param().abi()) + ZwSaveKey(core::mem::transmute(keyhandle), core::mem::transmute(filehandle)) } #[inline] -pub unsafe fn ZwSaveKeyEx(keyhandle: P0, filehandle: P1, format: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwSaveKeyEx(keyhandle: super::super::super::Win32::Foundation::HANDLE, filehandle: super::super::super::Win32::Foundation::HANDLE, format: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSaveKeyEx(keyhandle : super::super::super::Win32::Foundation:: HANDLE, filehandle : super::super::super::Win32::Foundation:: HANDLE, format : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSaveKeyEx(keyhandle.param().abi(), filehandle.param().abi(), core::mem::transmute(format)) + ZwSaveKeyEx(core::mem::transmute(keyhandle), core::mem::transmute(filehandle), core::mem::transmute(format)) } #[inline] -pub unsafe fn ZwSetInformationKey(keyhandle: P0, keysetinformationclass: KEY_SET_INFORMATION_CLASS, keysetinformation: *const core::ffi::c_void, keysetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, keysetinformationclass: KEY_SET_INFORMATION_CLASS, keysetinformation: *const core::ffi::c_void, keysetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, keysetinformationclass : KEY_SET_INFORMATION_CLASS, keysetinformation : *const core::ffi::c_void, keysetinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationKey(keyhandle.param().abi(), core::mem::transmute(keysetinformationclass), core::mem::transmute(keysetinformation), core::mem::transmute(keysetinformationlength)) + ZwSetInformationKey(core::mem::transmute(keyhandle), core::mem::transmute(keysetinformationclass), core::mem::transmute(keysetinformation), core::mem::transmute(keysetinformationlength)) } #[inline] -pub unsafe fn ZwSetValueKey(keyhandle: P0, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, titleindex: u32, r#type: u32, data: Option<*const core::ffi::c_void>, datasize: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetValueKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, titleindex: Option, r#type: u32, data: Option<*const core::ffi::c_void>, datasize: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(valuename), core::mem::transmute(titleindex), core::mem::transmute(r#type), core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(datasize)) + ZwSetValueKey(core::mem::transmute(keyhandle), core::mem::transmute(valuename), core::mem::transmute(titleindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(datasize)) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 6ed1bb3293..55036b681f 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(core::mem::transmute(plfolog), rguszcontainerpath.len().try_into().unwrap(), core::mem::transmute(pcbcontainer.unwrap_or(core::ptr::null())), core::mem::transmute(rguszcontainerpath.as_ptr())) + ClfsAddLogContainerSet(core::mem::transmute(plfolog), rguszcontainerpath.len().try_into().unwrap(), core::mem::transmute(pcbcontainer.unwrap_or(core::mem::zeroed())), core::mem::transmute(rguszcontainerpath.as_ptr())) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -40,24 +40,21 @@ pub unsafe fn ClfsCloseLogFileObject(plfolog: *const super::super::Foundation::F } #[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 ClfsCreateLogFile(pplfolog: *mut *mut super::super::Foundation::FILE_OBJECT, puszlogfilename: *const super::super::super::Win32::Foundation::UNICODE_STRING, fdesiredaccess: u32, dwsharemode: u32, psdlogfile: P4, fcreatedisposition: u32, fcreateoptions: u32, fflagsandattributes: u32, flogoptionflag: u32, pvcontext: Option<*const core::ffi::c_void>, cbcontext: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ClfsCreateLogFile(pplfolog: *mut *mut super::super::Foundation::FILE_OBJECT, puszlogfilename: *const super::super::super::Win32::Foundation::UNICODE_STRING, fdesiredaccess: u32, dwsharemode: u32, psdlogfile: Option, fcreatedisposition: u32, fcreateoptions: u32, fflagsandattributes: u32, flogoptionflag: u32, pvcontext: Option<*const core::ffi::c_void>, cbcontext: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(pplfolog), core::mem::transmute(puszlogfilename), core::mem::transmute(fdesiredaccess), core::mem::transmute(dwsharemode), psdlogfile.param().abi(), core::mem::transmute(fcreatedisposition), core::mem::transmute(fcreateoptions), core::mem::transmute(fflagsandattributes), core::mem::transmute(flogoptionflag), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), core::mem::transmute(cbcontext)) + ClfsCreateLogFile(core::mem::transmute(pplfolog), core::mem::transmute(puszlogfilename), core::mem::transmute(fdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(psdlogfile.unwrap_or(core::mem::zeroed())), core::mem::transmute(fcreatedisposition), core::mem::transmute(fcreateoptions), core::mem::transmute(fflagsandattributes), core::mem::transmute(flogoptionflag), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] -pub unsafe fn ClfsCreateMarshallingArea(plfolog: *const super::super::Foundation::FILE_OBJECT, epooltype: super::super::Foundation::POOL_TYPE, pfnallocbuffer: PALLOCATE_FUNCTION, pfnfreebuffer: super::super::Foundation::PFREE_FUNCTION, cbmarshallingbuffer: u32, cmaxwritebuffers: u32, cmaxreadbuffers: u32, ppvmarshalcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn ClfsCreateMarshallingArea(plfolog: *const super::super::Foundation::FILE_OBJECT, epooltype: super::super::Foundation::POOL_TYPE, pfnallocbuffer: Option, pfnfreebuffer: Option, cbmarshallingbuffer: u32, cmaxwritebuffers: u32, cmaxreadbuffers: u32, ppvmarshalcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsCreateMarshallingArea(plfolog : *const super::super::Foundation:: FILE_OBJECT, epooltype : super::super::Foundation:: POOL_TYPE, pfnallocbuffer : PALLOCATE_FUNCTION, pfnfreebuffer : super::super::Foundation:: PFREE_FUNCTION, cbmarshallingbuffer : u32, cmaxwritebuffers : u32, cmaxreadbuffers : u32, ppvmarshalcontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsCreateMarshallingArea(core::mem::transmute(plfolog), core::mem::transmute(epooltype), core::mem::transmute(pfnallocbuffer), core::mem::transmute(pfnfreebuffer), core::mem::transmute(cbmarshallingbuffer), core::mem::transmute(cmaxwritebuffers), core::mem::transmute(cmaxreadbuffers), core::mem::transmute(ppvmarshalcontext)) + ClfsCreateMarshallingArea(core::mem::transmute(plfolog), core::mem::transmute(epooltype), core::mem::transmute(pfnallocbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnfreebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmarshallingbuffer), core::mem::transmute(cmaxwritebuffers), core::mem::transmute(cmaxreadbuffers), core::mem::transmute(ppvmarshalcontext)) } #[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 ClfsCreateMarshallingAreaEx(plfolog: *const super::super::Foundation::FILE_OBJECT, epooltype: super::super::Foundation::POOL_TYPE, pfnallocbuffer: PALLOCATE_FUNCTION, pfnfreebuffer: super::super::Foundation::PFREE_FUNCTION, cbmarshallingbuffer: u32, cmaxwritebuffers: u32, cmaxreadbuffers: u32, calignmentsize: u32, fflags: u64, ppvmarshalcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn ClfsCreateMarshallingAreaEx(plfolog: *const super::super::Foundation::FILE_OBJECT, epooltype: super::super::Foundation::POOL_TYPE, pfnallocbuffer: Option, pfnfreebuffer: Option, cbmarshallingbuffer: u32, cmaxwritebuffers: u32, cmaxreadbuffers: u32, calignmentsize: u32, fflags: u64, ppvmarshalcontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsCreateMarshallingAreaEx(plfolog : *const super::super::Foundation:: FILE_OBJECT, epooltype : super::super::Foundation:: POOL_TYPE, pfnallocbuffer : PALLOCATE_FUNCTION, pfnfreebuffer : super::super::Foundation:: PFREE_FUNCTION, cbmarshallingbuffer : u32, cmaxwritebuffers : u32, cmaxreadbuffers : u32, calignmentsize : u32, fflags : u64, ppvmarshalcontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsCreateMarshallingAreaEx(core::mem::transmute(plfolog), core::mem::transmute(epooltype), core::mem::transmute(pfnallocbuffer), core::mem::transmute(pfnfreebuffer), core::mem::transmute(cbmarshallingbuffer), core::mem::transmute(cmaxwritebuffers), core::mem::transmute(cmaxreadbuffers), core::mem::transmute(calignmentsize), core::mem::transmute(fflags), core::mem::transmute(ppvmarshalcontext)) + ClfsCreateMarshallingAreaEx(core::mem::transmute(plfolog), core::mem::transmute(epooltype), core::mem::transmute(pfnallocbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnfreebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmarshallingbuffer), core::mem::transmute(cmaxwritebuffers), core::mem::transmute(cmaxreadbuffers), core::mem::transmute(calignmentsize), core::mem::transmute(fflags), core::mem::transmute(ppvmarshalcontext)) } #[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] @@ -74,7 +71,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(core::mem::transmute(puszlogfilename), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(flogoptionflag), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), core::mem::transmute(cbcontext)) + ClfsDeleteLogFile(core::mem::transmute(puszlogfilename), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(flogoptionflag), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbcontext)) } #[inline] pub unsafe fn ClfsDeleteMarshallingArea(pvmarshalcontext: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -101,7 +98,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(core::mem::transmute(pvmarshalcontext), core::mem::transmute(plsnflush), core::mem::transmute(plsnlastflushed.unwrap_or(core::ptr::null_mut()))) + ClfsFlushToLsn(core::mem::transmute(pvmarshalcontext), core::mem::transmute(plsnflush), core::mem::transmute(plsnlastflushed.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ClfsFreeReservedLog(pvmarshalcontext: *const core::ffi::c_void, pcbadjustment: &[i64]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -112,13 +109,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(core::mem::transmute(plfolog), core::mem::transmute(cidlogicalcontainer), core::mem::transmute(puszcontainername), core::mem::transmute(pcactuallencontainername.unwrap_or(core::ptr::null_mut()))) + ClfsGetContainerName(core::mem::transmute(plfolog), core::mem::transmute(cidlogicalcontainer), core::mem::transmute(puszcontainername), core::mem::transmute(pcactuallencontainername.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(plfolog), core::mem::transmute(pvstatsbuffer), core::mem::transmute(cbstatsbuffer), core::mem::transmute(estatsclass), core::mem::transmute(pcbstatswritten.unwrap_or(core::ptr::null_mut()))) + ClfsGetIoStatistics(core::mem::transmute(plfolog), core::mem::transmute(pvstatsbuffer), core::mem::transmute(cbstatsbuffer), core::mem::transmute(estatsclass), core::mem::transmute(pcbstatswritten.unwrap_or(core::mem::zeroed()))) } #[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] @@ -233,29 +230,26 @@ pub unsafe fn ClfsMgmtRemovePolicy(logfile: *const super::super::Foundation::FIL } #[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 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 { +pub unsafe fn ClfsMgmtSetLogFileSize(logfile: *const super::super::Foundation::FILE_OBJECT, newsizeincontainers: *const u64, resultingsizeincontainers: Option<*mut u64>, completionroutine: Option, 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(core::mem::transmute(logfile), core::mem::transmute(newsizeincontainers), core::mem::transmute(resultingsizeincontainers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(completionroutine), core::mem::transmute(completionroutinedata.unwrap_or(core::ptr::null()))) + ClfsMgmtSetLogFileSize(core::mem::transmute(logfile), core::mem::transmute(newsizeincontainers), core::mem::transmute(resultingsizeincontainers.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutinedata.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, 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(core::mem::transmute(logfile), core::mem::transmute(clientcookie.unwrap_or(core::ptr::null())), core::mem::transmute(newsizeincontainers), core::mem::transmute(resultingsizeincontainers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(completionroutine), core::mem::transmute(completionroutinedata.unwrap_or(core::ptr::null()))) + ClfsMgmtSetLogFileSizeAsClient(core::mem::transmute(logfile), core::mem::transmute(clientcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsizeincontainers), core::mem::transmute(resultingsizeincontainers.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutinedata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ClfsMgmtTailAdvanceFailure(client: *const core::ffi::c_void, reason: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn ClfsMgmtTailAdvanceFailure(client: *const core::ffi::c_void, reason: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsMgmtTailAdvanceFailure(client : *const core::ffi::c_void, reason : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsMgmtTailAdvanceFailure(core::mem::transmute(client), reason.param().abi()) + ClfsMgmtTailAdvanceFailure(core::mem::transmute(client), core::mem::transmute(reason)) } #[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 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 { +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: Option, 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(core::mem::transmute(plfolog), core::mem::transmute(einformationclass), core::mem::transmute(pinfoinputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinfoinputbuffer), core::mem::transmute(pinfobuffer), core::mem::transmute(pcbinfobuffer)) + ClfsQueryLogFileInformation(core::mem::transmute(plfolog), core::mem::transmute(einformationclass), core::mem::transmute(pinfoinputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinfoinputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinfobuffer), core::mem::transmute(pcbinfobuffer)) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -267,7 +261,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(core::mem::transmute(pvreadcontext), core::mem::transmute(ppvbuffer), core::mem::transmute(pcbbuffer), core::mem::transmute(perecordtype), core::mem::transmute(plsnuser.unwrap_or(core::ptr::null())), core::mem::transmute(plsnundonext), core::mem::transmute(plsnprevious), core::mem::transmute(plsnrecord)) + ClfsReadNextLogRecord(core::mem::transmute(pvreadcontext), core::mem::transmute(ppvbuffer), core::mem::transmute(pcbbuffer), core::mem::transmute(perecordtype), core::mem::transmute(plsnuser.unwrap_or(core::mem::zeroed())), core::mem::transmute(plsnundonext), core::mem::transmute(plsnprevious), core::mem::transmute(plsnrecord)) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -307,12 +301,12 @@ pub unsafe fn ClfsReserveAndAppendLog(pvmarshalcontext: *const core::ffi::c_void core::mem::transmute(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(core::ptr::null())), - core::mem::transmute(plsnprevious.unwrap_or(core::ptr::null())), + core::mem::transmute(plsnundonext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plsnprevious.unwrap_or(core::mem::zeroed())), 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())), core::mem::transmute(fflags), - core::mem::transmute(plsn.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(plsn.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_Storage_FileSystem")] @@ -324,12 +318,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()), core::mem::transmute(cbentryalignment), - core::mem::transmute(plsnundonext.unwrap_or(core::ptr::null())), - core::mem::transmute(plsnprevious.unwrap_or(core::ptr::null())), + core::mem::transmute(plsnundonext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plsnprevious.unwrap_or(core::mem::zeroed())), 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())), core::mem::transmute(fflags), - core::mem::transmute(plsn.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(plsn.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_Storage_FileSystem")] @@ -365,17 +359,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(core::mem::transmute(pvmarshalcontext), core::mem::transmute(pvrestartbuffer), core::mem::transmute(cbrestartbuffer), core::mem::transmute(plsnbase.unwrap_or(core::ptr::null())), core::mem::transmute(fflags), core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plsnnext.unwrap_or(core::ptr::null_mut()))) + ClfsWriteRestartArea(core::mem::transmute(pvmarshalcontext), core::mem::transmute(pvrestartbuffer), core::mem::transmute(cbrestartbuffer), core::mem::transmute(plsnbase.unwrap_or(core::mem::zeroed())), core::mem::transmute(fflags), core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(plsnnext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(cookie), core::mem::transmute(object), core::mem::transmute(objectid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objectname.unwrap_or(core::ptr::null_mut()))) + CmCallbackGetKeyObjectID(core::mem::transmute(cookie), core::mem::transmute(object), core::mem::transmute(objectid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectname.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(cookie), core::mem::transmute(object), core::mem::transmute(objectid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objectname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags)) + CmCallbackGetKeyObjectIDEx(core::mem::transmute(cookie), core::mem::transmute(object), core::mem::transmute(objectid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] pub unsafe fn CmCallbackReleaseKeyObjectIDEx(objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING) { @@ -390,22 +384,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(core::ptr::null_mut())), core::mem::transmute(minor.unwrap_or(core::ptr::null_mut()))) + CmGetCallbackVersion(core::mem::transmute(major.unwrap_or(core::mem::zeroed())), core::mem::transmute(minor.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(function), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(cookie)) + CmRegisterCallback(core::mem::transmute(function), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(function), core::mem::transmute(altitude), core::mem::transmute(driver), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(cookie), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) + CmRegisterCallbackEx(core::mem::transmute(function), core::mem::transmute(altitude), core::mem::transmute(driver), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(cookie), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(object), core::mem::transmute(cookie), core::mem::transmute(newcontext), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) + CmSetCallbackObjectContext(core::mem::transmute(object), core::mem::transmute(cookie), core::mem::transmute(newcontext), core::mem::transmute(oldcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CmUnRegisterCallback(cookie: i64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -478,82 +472,60 @@ pub unsafe fn EtwActivityIdControl(controlcode: u32, activityid: *mut windows_co } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] -pub unsafe fn EtwEventEnabled(reghandle: P0, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn EtwEventEnabled(reghandle: super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn EtwEventEnabled(reghandle : super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE, eventdescriptor : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DESCRIPTOR) -> super::super::super::Win32::Foundation:: BOOLEAN); - EtwEventEnabled(reghandle.param().abi(), core::mem::transmute(eventdescriptor)) + EtwEventEnabled(core::mem::transmute(reghandle), core::mem::transmute(eventdescriptor)) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] -pub unsafe fn EtwProviderEnabled(reghandle: P0, level: u8, keyword: u64) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn EtwProviderEnabled(reghandle: super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE, level: u8, keyword: u64) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn EtwProviderEnabled(reghandle : super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE, level : u8, keyword : u64) -> super::super::super::Win32::Foundation:: BOOLEAN); - EtwProviderEnabled(reghandle.param().abi(), core::mem::transmute(level), core::mem::transmute(keyword)) + EtwProviderEnabled(core::mem::transmute(reghandle), core::mem::transmute(level), core::mem::transmute(keyword)) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] -pub unsafe fn EtwRegister(providerid: *const windows_core::GUID, enablecallback: PETWENABLECALLBACK, callbackcontext: Option<*const core::ffi::c_void>, reghandle: *mut super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn EtwRegister(providerid: *const windows_core::GUID, enablecallback: Option, callbackcontext: Option<*const core::ffi::c_void>, reghandle: *mut super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE) -> 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 super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwRegister(core::mem::transmute(providerid), core::mem::transmute(enablecallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(reghandle)) + EtwRegister(core::mem::transmute(providerid), core::mem::transmute(enablecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(reghandle)) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] -pub unsafe fn EtwSetInformation(reghandle: P0, informationclass: super::super::super::Win32::System::Diagnostics::Etw::EVENT_INFO_CLASS, eventinformation: Option<*const core::ffi::c_void>, informationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn EtwSetInformation(reghandle: super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE, informationclass: super::super::super::Win32::System::Diagnostics::Etw::EVENT_INFO_CLASS, eventinformation: Option<*const core::ffi::c_void>, informationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(informationclass), core::mem::transmute(eventinformation.unwrap_or(core::ptr::null())), core::mem::transmute(informationlength)) + EtwSetInformation(core::mem::transmute(reghandle), core::mem::transmute(informationclass), core::mem::transmute(eventinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(informationlength)) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] -pub unsafe fn EtwUnregister(reghandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn EtwUnregister(reghandle: super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn EtwUnregister(reghandle : super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwUnregister(reghandle.param().abi()) + EtwUnregister(core::mem::transmute(reghandle)) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] -pub unsafe fn EtwWrite(reghandle: P0, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR, activityid: Option<*const windows_core::GUID>, userdata: Option<&[super::super::super::Win32::System::Diagnostics::Etw::EVENT_DATA_DESCRIPTOR]>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn EtwWrite(reghandle: super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR, activityid: Option<*const windows_core::GUID>, userdata: Option<&[super::super::super::Win32::System::Diagnostics::Etw::EVENT_DATA_DESCRIPTOR]>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + EtwWrite(core::mem::transmute(reghandle), core::mem::transmute(eventdescriptor), core::mem::transmute(activityid.unwrap_or(core::mem::zeroed())), 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] -pub unsafe fn EtwWriteEx(reghandle: P0, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR, filter: u64, flags: u32, activityid: Option<*const windows_core::GUID>, relatedactivityid: Option<*const windows_core::GUID>, userdata: Option<&[super::super::super::Win32::System::Diagnostics::Etw::EVENT_DATA_DESCRIPTOR]>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const windows_core::GUID>, relatedactivityid: Option<*const windows_core::GUID>, userdata: Option<&[super::super::super::Win32::System::Diagnostics::Etw::EVENT_DATA_DESCRIPTOR]>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(eventdescriptor), core::mem::transmute(filter), core::mem::transmute(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()))) + EtwWriteEx(core::mem::transmute(reghandle), core::mem::transmute(eventdescriptor), core::mem::transmute(filter), core::mem::transmute(flags), core::mem::transmute(activityid.unwrap_or(core::mem::zeroed())), core::mem::transmute(relatedactivityid.unwrap_or(core::mem::zeroed())), 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] -pub unsafe fn EtwWriteString(reghandle: P0, level: u8, keyword: u64, activityid: Option<*const windows_core::GUID>, string: P4) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn EtwWriteString(reghandle: super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE, level: u8, keyword: u64, activityid: Option<*const windows_core::GUID>, string: P4) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P4: 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(), core::mem::transmute(level), core::mem::transmute(keyword), core::mem::transmute(activityid.unwrap_or(core::ptr::null())), string.param().abi()) + EtwWriteString(core::mem::transmute(reghandle), core::mem::transmute(level), core::mem::transmute(keyword), core::mem::transmute(activityid.unwrap_or(core::mem::zeroed())), string.param().abi()) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] -pub unsafe fn EtwWriteTransfer(reghandle: P0, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR, activityid: Option<*const windows_core::GUID>, relatedactivityid: Option<*const windows_core::GUID>, userdata: Option<&[super::super::super::Win32::System::Diagnostics::Etw::EVENT_DATA_DESCRIPTOR]>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn EtwWriteTransfer(reghandle: super::super::super::Win32::System::Diagnostics::Etw::REGHANDLE, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR, activityid: Option<*const windows_core::GUID>, relatedactivityid: Option<*const windows_core::GUID>, userdata: Option<&[super::super::super::Win32::System::Diagnostics::Etw::EVENT_DATA_DESCRIPTOR]>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(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()))) + EtwWriteTransfer(core::mem::transmute(reghandle), core::mem::transmute(eventdescriptor), core::mem::transmute(activityid.unwrap_or(core::mem::zeroed())), core::mem::transmute(relatedactivityid.unwrap_or(core::mem::zeroed())), 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] @@ -602,21 +574,15 @@ pub unsafe fn ExAcquireRundownProtection(runref: *mut EX_RUNDOWN_REF) -> super:: } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExAcquireRundownProtectionCacheAware(runrefcacheaware: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn ExAcquireRundownProtectionCacheAware(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireRundownProtectionCacheAware(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExAcquireRundownProtectionCacheAware(runrefcacheaware.param().abi()) + ExAcquireRundownProtectionCacheAware(core::mem::transmute(runrefcacheaware)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExAcquireRundownProtectionCacheAwareEx(runrefcacheaware: P0, count: u32) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn ExAcquireRundownProtectionCacheAwareEx(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE, count: u32) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireRundownProtectionCacheAwareEx(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE, count : u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExAcquireRundownProtectionCacheAwareEx(runrefcacheaware.param().abi(), core::mem::transmute(count)) + ExAcquireRundownProtectionCacheAwareEx(core::mem::transmute(runrefcacheaware), core::mem::transmute(count)) } #[inline] pub unsafe fn ExAcquireRundownProtectionEx(runref: *mut EX_RUNDOWN_REF, count: u32) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -709,27 +675,21 @@ pub unsafe fn ExAllocatePoolWithTagPriority(pooltype: super::super::Foundation:: } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExAllocateTimer(callback: PEXT_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>, attributes: u32) -> super::super::Foundation::PEX_TIMER { +pub unsafe fn ExAllocateTimer(callback: Option, 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(core::mem::transmute(callback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(attributes)) + ExAllocateTimer(core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(attributes)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExCancelTimer(timer: P0, parameters: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn ExCancelTimer(timer: super::super::Foundation::PEX_TIMER, parameters: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::BOOLEAN { 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(core::ptr::null()))) + ExCancelTimer(core::mem::transmute(timer), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExCleanupRundownProtectionCacheAware(runrefcacheaware: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ExCleanupRundownProtectionCacheAware(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExCleanupRundownProtectionCacheAware(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE)); - ExCleanupRundownProtectionCacheAware(runrefcacheaware.param().abi()) + ExCleanupRundownProtectionCacheAware(core::mem::transmute(runrefcacheaware)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -750,7 +710,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(core::mem::transmute(flags), core::mem::transmute(tag), core::mem::transmute(params.unwrap_or(core::ptr::null())), core::mem::transmute(poolhandle)) + ExCreatePool(core::mem::transmute(flags), core::mem::transmute(tag), core::mem::transmute(params.unwrap_or(core::mem::zeroed())), core::mem::transmute(poolhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -760,22 +720,18 @@ pub unsafe fn ExDeleteResourceLite(resource: *mut super::super::Foundation::ERES } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExDeleteTimer(timer: P0, cancel: P1, wait: P2, parameters: Option<*const EXT_DELETE_PARAMETERS>) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn ExDeleteTimer(timer: super::super::Foundation::PEX_TIMER, cancel: P1, wait: P2, parameters: Option<*const EXT_DELETE_PARAMETERS>) -> super::super::super::Win32::Foundation::BOOLEAN where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null()))) + ExDeleteTimer(core::mem::transmute(timer), cancel.param().abi(), wait.param().abi(), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ExDestroyPool(poolhandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ExDestroyPool(poolhandle: super::super::super::Win32::Foundation::HANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExDestroyPool(poolhandle : super::super::super::Win32::Foundation:: HANDLE)); - ExDestroyPool(poolhandle.param().abi()) + ExDestroyPool(core::mem::transmute(poolhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -798,7 +754,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(core::mem::transmute(firmwaretableprovidersignature), core::mem::transmute(firmwaretablebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ExEnumerateSystemFirmwareTables(core::mem::transmute(firmwaretableprovidersignature), core::mem::transmute(firmwaretablebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -808,12 +764,9 @@ pub unsafe fn ExExtendZone(zone: *mut ZONE_HEADER, segment: *mut core::ffi::c_vo } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExFreeCacheAwareRundownProtection(runrefcacheaware: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ExFreeCacheAwareRundownProtection(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExFreeCacheAwareRundownProtection(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE)); - ExFreeCacheAwareRundownProtection(runrefcacheaware.param().abi()) + ExFreeCacheAwareRundownProtection(core::mem::transmute(runrefcacheaware)) } #[inline] pub unsafe fn ExFreePool(p: *mut core::ffi::c_void) { @@ -839,7 +792,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(core::mem::transmute(variablename), core::mem::transmute(vendorguid), core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), core::mem::transmute(valuelength), core::mem::transmute(attributes.unwrap_or(core::ptr::null_mut()))) + ExGetFirmwareEnvironmentVariable(core::mem::transmute(variablename), core::mem::transmute(vendorguid), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuelength), core::mem::transmute(attributes.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -861,7 +814,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(core::mem::transmute(firmwaretableprovidersignature), core::mem::transmute(firmwaretableid), core::mem::transmute(firmwaretablebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ExGetSystemFirmwareTable(core::mem::transmute(firmwaretableprovidersignature), core::mem::transmute(firmwaretableid), core::mem::transmute(firmwaretablebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ExInitializePushLock() -> usize { @@ -885,21 +838,15 @@ pub unsafe fn ExInitializeRundownProtection() -> EX_RUNDOWN_REF { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExInitializeRundownProtectionCacheAware(runrefcacheaware: P0, runrefsize: usize) -where - P0: windows_core::Param, -{ +pub unsafe fn ExInitializeRundownProtectionCacheAware(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE, runrefsize: usize) { windows_targets::link!("ntoskrnl.exe" "system" fn ExInitializeRundownProtectionCacheAware(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE, runrefsize : usize)); - ExInitializeRundownProtectionCacheAware(runrefcacheaware.param().abi(), core::mem::transmute(runrefsize)) + ExInitializeRundownProtectionCacheAware(core::mem::transmute(runrefcacheaware), core::mem::transmute(runrefsize)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExInitializeRundownProtectionCacheAwareEx(runrefcacheaware: P0, flags: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn ExInitializeRundownProtectionCacheAwareEx(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExInitializeRundownProtectionCacheAwareEx(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE, flags : u32)); - ExInitializeRundownProtectionCacheAwareEx(runrefcacheaware.param().abi(), core::mem::transmute(flags)) + ExInitializeRundownProtectionCacheAwareEx(core::mem::transmute(runrefcacheaware), core::mem::transmute(flags)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -955,7 +902,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(core::mem::transmute(callbackobject), core::mem::transmute(argument1.unwrap_or(core::ptr::null())), core::mem::transmute(argument2.unwrap_or(core::ptr::null()))) + ExNotifyCallback(core::mem::transmute(callbackobject), core::mem::transmute(argument1.unwrap_or(core::mem::zeroed())), core::mem::transmute(argument2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ExQueryTimerResolution(maximumtime: *mut u32, minimumtime: *mut u32, currenttime: *mut u32) { @@ -979,12 +926,9 @@ pub unsafe fn ExRaiseDatatypeMisalignment() { ExRaiseDatatypeMisalignment() } #[inline] -pub unsafe fn ExRaiseStatus(status: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ExRaiseStatus(status: super::super::super::Win32::Foundation::NTSTATUS) { windows_targets::link!("ntoskrnl.exe" "system" fn ExRaiseStatus(status : super::super::super::Win32::Foundation:: NTSTATUS)); - ExRaiseStatus(status.param().abi()) + ExRaiseStatus(core::mem::transmute(status)) } #[inline] pub unsafe fn ExReInitializeRundownProtection(runref: *mut EX_RUNDOWN_REF) { @@ -993,21 +937,15 @@ pub unsafe fn ExReInitializeRundownProtection(runref: *mut EX_RUNDOWN_REF) { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExReInitializeRundownProtectionCacheAware(runrefcacheaware: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ExReInitializeRundownProtectionCacheAware(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReInitializeRundownProtectionCacheAware(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE)); - ExReInitializeRundownProtectionCacheAware(runrefcacheaware.param().abi()) + ExReInitializeRundownProtectionCacheAware(core::mem::transmute(runrefcacheaware)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExRegisterCallback(callbackobject: P0, callbackfunction: PCALLBACK_FUNCTION, callbackcontext: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn ExRegisterCallback(callbackobject: super::super::Foundation::PCALLBACK_OBJECT, callbackfunction: PCALLBACK_FUNCTION, callbackcontext: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { 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(), core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + ExRegisterCallback(core::mem::transmute(callbackobject), core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1062,21 +1000,15 @@ pub unsafe fn ExReleaseRundownProtection(runref: *mut EX_RUNDOWN_REF) { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExReleaseRundownProtectionCacheAware(runrefcacheaware: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ExReleaseRundownProtectionCacheAware(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseRundownProtectionCacheAware(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE)); - ExReleaseRundownProtectionCacheAware(runrefcacheaware.param().abi()) + ExReleaseRundownProtectionCacheAware(core::mem::transmute(runrefcacheaware)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExReleaseRundownProtectionCacheAwareEx(runref: P0, count: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn ExReleaseRundownProtectionCacheAwareEx(runref: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE, count: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn ExReleaseRundownProtectionCacheAwareEx(runref : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE, count : u32)); - ExReleaseRundownProtectionCacheAwareEx(runref.param().abi(), core::mem::transmute(count)) + ExReleaseRundownProtectionCacheAwareEx(core::mem::transmute(runref), core::mem::transmute(count)) } #[inline] pub unsafe fn ExReleaseRundownProtectionEx(runref: *mut EX_RUNDOWN_REF, count: u32) { @@ -1112,33 +1044,24 @@ pub unsafe fn ExRundownCompleted() -> EX_RUNDOWN_REF { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExRundownCompletedCacheAware(runrefcacheaware: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ExRundownCompletedCacheAware(runrefcacheaware: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExRundownCompletedCacheAware(runrefcacheaware : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE)); - ExRundownCompletedCacheAware(runrefcacheaware.param().abi()) + ExRundownCompletedCacheAware(core::mem::transmute(runrefcacheaware)) } #[inline] -pub unsafe fn ExSecurePoolUpdate(securepoolhandle: P0, tag: u32, allocation: *const core::ffi::c_void, cookie: usize, offset: usize, size: usize, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ExSecurePoolUpdate(securepoolhandle: super::super::super::Win32::Foundation::HANDLE, tag: u32, allocation: *const core::ffi::c_void, cookie: usize, offset: usize, size: usize, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExSecurePoolUpdate(securepoolhandle : super::super::super::Win32::Foundation:: HANDLE, tag : u32, allocation : *const core::ffi::c_void, cookie : usize, offset : usize, size : usize, buffer : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ExSecurePoolUpdate(securepoolhandle.param().abi(), core::mem::transmute(tag), core::mem::transmute(allocation), core::mem::transmute(cookie), core::mem::transmute(offset), core::mem::transmute(size), core::mem::transmute(buffer)) + ExSecurePoolUpdate(core::mem::transmute(securepoolhandle), core::mem::transmute(tag), core::mem::transmute(allocation), core::mem::transmute(cookie), core::mem::transmute(offset), core::mem::transmute(size), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn ExSecurePoolValidate(securepoolhandle: P0, tag: u32, allocation: *const core::ffi::c_void, cookie: usize) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ExSecurePoolValidate(securepoolhandle: super::super::super::Win32::Foundation::HANDLE, tag: u32, allocation: *const core::ffi::c_void, cookie: usize) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn ExSecurePoolValidate(securepoolhandle : super::super::super::Win32::Foundation:: HANDLE, tag : u32, allocation : *const core::ffi::c_void, cookie : usize) -> u32); - ExSecurePoolValidate(securepoolhandle.param().abi(), core::mem::transmute(tag), core::mem::transmute(allocation), core::mem::transmute(cookie)) + ExSecurePoolValidate(core::mem::transmute(securepoolhandle), core::mem::transmute(tag), core::mem::transmute(allocation), core::mem::transmute(cookie)) } #[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(core::mem::transmute(variablename), core::mem::transmute(vendorguid), core::mem::transmute(value.unwrap_or(core::ptr::null())), core::mem::transmute(valuelength), core::mem::transmute(attributes)) + ExSetFirmwareEnvironmentVariable(core::mem::transmute(variablename), core::mem::transmute(vendorguid), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuelength), core::mem::transmute(attributes)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1154,12 +1077,9 @@ pub unsafe fn ExSetResourceOwnerPointerEx(resource: *mut super::super::Foundatio } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExSetTimer(timer: P0, duetime: i64, period: i64, parameters: Option<*const _EXT_SET_PARAMETERS_V0>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn ExSetTimer(timer: super::super::Foundation::PEX_TIMER, duetime: i64, period: i64, parameters: Option<*const _EXT_SET_PARAMETERS_V0>) -> super::super::super::Win32::Foundation::BOOLEAN { 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(), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(parameters.unwrap_or(core::ptr::null()))) + ExSetTimer(core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ExSetTimerResolution(desiredtime: u32, setresolution: P1) -> u32 @@ -1225,20 +1145,14 @@ pub unsafe fn ExWaitForRundownProtectionRelease(runref: *mut EX_RUNDOWN_REF) { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExWaitForRundownProtectionReleaseCacheAware(runref: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ExWaitForRundownProtectionReleaseCacheAware(runref: super::super::Foundation::PEX_RUNDOWN_REF_CACHE_AWARE) { windows_targets::link!("ntoskrnl.exe" "system" fn ExWaitForRundownProtectionReleaseCacheAware(runref : super::super::Foundation:: PEX_RUNDOWN_REF_CACHE_AWARE)); - ExWaitForRundownProtectionReleaseCacheAware(runref.param().abi()) + ExWaitForRundownProtectionReleaseCacheAware(core::mem::transmute(runref)) } #[inline] -pub unsafe fn FsRtlIsTotalDeviceFailure(status: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn FsRtlIsTotalDeviceFailure(status: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlIsTotalDeviceFailure(status : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlIsTotalDeviceFailure(status.param().abi()) + FsRtlIsTotalDeviceFailure(core::mem::transmute(status)) } #[inline] pub unsafe fn HalAcquireDisplayOwnership(resetdisplayparameters: PHAL_RESET_DISPLAY_PARAMETERS) { @@ -1270,7 +1184,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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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] @@ -1312,12 +1226,9 @@ where HalFreeCommonBuffer(core::mem::transmute(adapterobject), core::mem::transmute(length), core::mem::transmute(logicaladdress), core::mem::transmute(virtualaddress), cacheenabled.param().abi()) } #[inline] -pub unsafe fn HalFreeHardwareCounters(countersethandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn HalFreeHardwareCounters(countersethandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("hal.dll" "system" fn HalFreeHardwareCounters(countersethandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - HalFreeHardwareCounters(countersethandle.param().abi()) + HalFreeHardwareCounters(core::mem::transmute(countersethandle)) } #[cfg(feature = "Win32_Storage_IscsiDisc")] #[inline] @@ -1387,13 +1298,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(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(buffer), core::mem::transmute(size)) + IoAcquireKsrPersistentMemory(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer), core::mem::transmute(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(core::mem::transmute(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())), core::mem::transmute(buffer), core::mem::transmute(size)) + IoAcquireKsrPersistentMemoryEx(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(physicaldeviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(datatag.unwrap_or(core::mem::zeroed())), core::mem::transmute(dataversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer), core::mem::transmute(size)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1402,7 +1313,7 @@ where P2: 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(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::ptr::null())), file.param().abi(), core::mem::transmute(line), core::mem::transmute(remlocksize)) + IoAcquireRemoveLockEx(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::mem::zeroed())), file.param().abi(), core::mem::transmute(line), core::mem::transmute(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] @@ -1414,7 +1325,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(core::mem::transmute(controllerobject), core::mem::transmute(deviceobject), core::mem::transmute(executionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoAllocateController(core::mem::transmute(controllerobject), core::mem::transmute(deviceobject), core::mem::transmute(executionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1453,7 +1364,7 @@ where P3: 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(core::ptr::null())), core::mem::transmute(length), secondarybuffer.param().abi(), chargequota.param().abi(), core::mem::transmute(irp.unwrap_or(core::ptr::null_mut()))) + IoAllocateMdl(core::mem::transmute(virtualaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), secondarybuffer.param().abi(), chargequota.param().abi(), core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1471,7 +1382,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(core::mem::transmute(registrypath), core::mem::transmute(driverclassname.unwrap_or(core::ptr::null())), core::mem::transmute(driverobject), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(requestedresources.unwrap_or(core::ptr::null())), core::mem::transmute(allocatedresources)) + IoAssignResources(core::mem::transmute(registrypath), core::mem::transmute(driverclassname.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverobject), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(requestedresources.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] @@ -1499,9 +1410,9 @@ pub unsafe fn IoAttachDeviceToDeviceStackSafe(sourcedevice: *const super::super: } #[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 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 { +pub unsafe fn IoBuildAsynchronousFsdRequest(majorfunction: u32, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, buffer: Option<*mut core::ffi::c_void>, length: Option, 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(core::mem::transmute(majorfunction), core::mem::transmute(deviceobject), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length), core::mem::transmute(startingoffset.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock.unwrap_or(core::ptr::null()))) + IoBuildAsynchronousFsdRequest(core::mem::transmute(majorfunction), core::mem::transmute(deviceobject), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length.unwrap_or(core::mem::zeroed())), core::mem::transmute(startingoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1510,7 +1421,7 @@ where P6: 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(core::mem::transmute(iocontrolcode), core::mem::transmute(deviceobject), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength), internaldeviceiocontrol.param().abi(), core::mem::transmute(event.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock)) + IoBuildDeviceIoControlRequest(core::mem::transmute(iocontrolcode), core::mem::transmute(deviceobject), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength), internaldeviceiocontrol.param().abi(), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1522,7 +1433,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(core::mem::transmute(majorfunction), core::mem::transmute(deviceobject), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(startingoffset.unwrap_or(core::ptr::null())), core::mem::transmute(event), core::mem::transmute(iostatusblock)) + IoBuildSynchronousFsdRequest(core::mem::transmute(majorfunction), core::mem::transmute(deviceobject), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(startingoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(event), core::mem::transmute(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] @@ -1540,7 +1451,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(core::mem::transmute(desiredaccess), core::mem::transmute(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())), core::mem::transmute(ioshareaccessflags)) + IoCheckLinkShareAccess(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(shareaccess.unwrap_or(core::mem::zeroed())), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] @@ -1558,7 +1469,7 @@ where P4: 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(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), update.param().abi(), core::mem::transmute(writepermission.unwrap_or(core::ptr::null()))) + IoCheckShareAccessEx(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), update.param().abi(), core::mem::transmute(writepermission.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1585,7 +1496,7 @@ where P10: 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(core::mem::transmute(interruptobject), core::mem::transmute(serviceroutine), core::mem::transmute(servicecontext.unwrap_or(core::ptr::null())), core::mem::transmute(spinlock.unwrap_or(core::ptr::null())), core::mem::transmute(vector), core::mem::transmute(irql), core::mem::transmute(synchronizeirql), core::mem::transmute(interruptmode), sharevector.param().abi(), core::mem::transmute(processorenablemask), floatingsave.param().abi()) + IoConnectInterrupt(core::mem::transmute(interruptobject), core::mem::transmute(serviceroutine), core::mem::transmute(servicecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(spinlock.unwrap_or(core::mem::zeroed())), core::mem::transmute(vector), core::mem::transmute(irql), core::mem::transmute(synchronizeirql), core::mem::transmute(interruptmode), sharevector.param().abi(), core::mem::transmute(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] @@ -1606,13 +1517,13 @@ where P5: 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(core::mem::transmute(driverobject), core::mem::transmute(deviceextensionsize), core::mem::transmute(devicename.unwrap_or(core::ptr::null())), core::mem::transmute(devicetype), core::mem::transmute(devicecharacteristics), exclusive.param().abi(), core::mem::transmute(deviceobject)) + IoCreateDevice(core::mem::transmute(driverobject), core::mem::transmute(deviceextensionsize), core::mem::transmute(devicename.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicetype), core::mem::transmute(devicecharacteristics), exclusive.param().abi(), core::mem::transmute(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(core::mem::transmute(deviceobject), core::mem::transmute(disk.unwrap_or(core::ptr::null()))) + IoCreateDisk(core::mem::transmute(deviceobject), core::mem::transmute(disk.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] @@ -1623,15 +1534,15 @@ pub unsafe fn IoCreateFile(filehandle: *mut super::super::super::Win32::Foundati core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), - core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), + core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(disposition), core::mem::transmute(createoptions), - core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), + core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealength), core::mem::transmute(createfiletype), - core::mem::transmute(internalparameters.unwrap_or(core::ptr::null())), + core::mem::transmute(internalparameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(options), ) } @@ -1644,17 +1555,17 @@ pub unsafe fn IoCreateFileEx(filehandle: *mut super::super::super::Win32::Founda core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), - core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), + core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(disposition), core::mem::transmute(createoptions), - core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), + core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealength), core::mem::transmute(createfiletype), - core::mem::transmute(internalparameters.unwrap_or(core::ptr::null())), + core::mem::transmute(internalparameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(options), - core::mem::transmute(drivercontext.unwrap_or(core::ptr::null())), + core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed())), ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] @@ -1666,17 +1577,17 @@ pub unsafe fn IoCreateFileSpecifyDeviceObjectHint(filehandle: *mut super::super: core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), - core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), + core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(disposition), core::mem::transmute(createoptions), - core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), + core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealength), core::mem::transmute(createfiletype), - core::mem::transmute(internalparameters.unwrap_or(core::ptr::null())), + core::mem::transmute(internalparameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(options), - core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), + core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] @@ -1698,12 +1609,9 @@ pub unsafe fn IoCreateSynchronizationEvent(eventname: *const super::super::super } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_WindowsProgramming"))] #[inline] -pub unsafe fn IoCreateSystemThread(ioobject: *mut core::ffi::c_void, threadhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, processhandle: P4, clientid: Option<*mut super::super::super::Win32::System::WindowsProgramming::CLIENT_ID>, startroutine: PKSTART_ROUTINE, startcontext: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn IoCreateSystemThread(ioobject: *mut core::ffi::c_void, threadhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, processhandle: Option, clientid: Option<*mut super::super::super::Win32::System::WindowsProgramming::CLIENT_ID>, startroutine: PKSTART_ROUTINE, startcontext: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(ioobject), core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), processhandle.param().abi(), core::mem::transmute(clientid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startroutine), core::mem::transmute(startcontext.unwrap_or(core::ptr::null()))) + IoCreateSystemThread(core::mem::transmute(ioobject), core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(processhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientid.unwrap_or(core::mem::zeroed())), core::mem::transmute(startroutine), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -1726,13 +1634,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(core::mem::transmute(csq), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) + IoCsqInsertIrp(core::mem::transmute(csq), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(csq), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), core::mem::transmute(insertcontext.unwrap_or(core::ptr::null()))) + IoCsqInsertIrpEx(core::mem::transmute(csq), core::mem::transmute(irp), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(insertcontext.unwrap_or(core::mem::zeroed()))) } #[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] @@ -1744,16 +1652,13 @@ 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(core::mem::transmute(csq), core::mem::transmute(peekcontext.unwrap_or(core::ptr::null()))) + IoCsqRemoveNextIrp(core::mem::transmute(csq), core::mem::transmute(peekcontext.unwrap_or(core::mem::zeroed()))) } #[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 IoDecrementKeepAliveCount(fileobject: *mut super::super::Foundation::FILE_OBJECT, process: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn IoDecrementKeepAliveCount(fileobject: *mut super::super::Foundation::FILE_OBJECT, process: super::super::Foundation::PEPROCESS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoDecrementKeepAliveCount(fileobject : *mut super::super::Foundation:: FILE_OBJECT, process : super::super::Foundation:: PEPROCESS) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoDecrementKeepAliveCount(core::mem::transmute(fileobject), process.param().abi()) + IoDecrementKeepAliveCount(core::mem::transmute(fileobject), core::mem::transmute(process)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1780,12 +1685,9 @@ pub unsafe fn IoDetachDevice(targetdevice: *mut super::super::Foundation::DEVICE } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoDisconnectInterrupt(interruptobject: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn IoDisconnectInterrupt(interruptobject: super::super::Foundation::PKINTERRUPT) { windows_targets::link!("ntoskrnl.exe" "system" fn IoDisconnectInterrupt(interruptobject : super::super::Foundation:: PKINTERRUPT)); - IoDisconnectInterrupt(interruptobject.param().abi()) + IoDisconnectInterrupt(core::mem::transmute(interruptobject)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1797,7 +1699,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(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(core::ptr::null())), core::mem::transmute(callback), core::mem::transmute(callbackcontext)) + IoEnumerateKsrPersistentMemoryEx(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(physicaldeviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(callbackcontext)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Storage_IscsiDisc"))] #[inline] @@ -1862,12 +1764,9 @@ pub unsafe fn IoFreeSfioStreamIdentifier(fileobject: *const super::super::Founda } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoFreeWorkItem(ioworkitem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn IoFreeWorkItem(ioworkitem: super::super::Foundation::PIO_WORKITEM) { windows_targets::link!("ntoskrnl.exe" "system" fn IoFreeWorkItem(ioworkitem : super::super::Foundation:: PIO_WORKITEM)); - IoFreeWorkItem(ioworkitem.param().abi()) + IoFreeWorkItem(core::mem::transmute(ioworkitem)) } #[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] @@ -1882,12 +1781,9 @@ pub unsafe fn IoGetActivityIdThread() -> *mut windows_core::GUID { } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn IoGetAffinityInterrupt(interruptobject: P0, groupaffinity: *mut super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn IoGetAffinityInterrupt(interruptobject: super::super::Foundation::PKINTERRUPT, groupaffinity: *mut super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetAffinityInterrupt(interruptobject : super::super::Foundation:: PKINTERRUPT, groupaffinity : *mut super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoGetAffinityInterrupt(interruptobject.param().abi(), core::mem::transmute(groupaffinity)) + IoGetAffinityInterrupt(core::mem::transmute(interruptobject), core::mem::transmute(groupaffinity)) } #[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] @@ -1913,7 +1809,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(core::mem::transmute(informationclass), core::mem::transmute(containerobject.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength)) + IoGetContainerInformation(core::mem::transmute(informationclass), core::mem::transmute(containerobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1934,15 +1830,15 @@ pub unsafe fn IoGetDeviceInterfaceAlias(symboliclinkname: *const super::super::s } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn IoGetDeviceInterfacePropertyData(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, propertykey: *const super::super::super::Win32::Foundation::DEVPROPKEY, lcid: u32, flags: u32, size: u32, data: *mut core::ffi::c_void, requiredsize: *mut u32, r#type: *mut super::super::super::Win32::Devices::Properties::DEVPROPTYPE) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn IoGetDeviceInterfacePropertyData(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, propertykey: *const super::super::super::Win32::Foundation::DEVPROPKEY, lcid: u32, flags: Option, size: u32, data: *mut core::ffi::c_void, requiredsize: *mut u32, r#type: *mut super::super::super::Win32::Devices::Properties::DEVPROPTYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDeviceInterfacePropertyData(symboliclinkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, propertykey : *const super::super::super::Win32::Foundation:: DEVPROPKEY, lcid : u32, flags : u32, size : u32, data : *mut core::ffi::c_void, requiredsize : *mut u32, r#type : *mut super::super::super::Win32::Devices::Properties:: DEVPROPTYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoGetDeviceInterfacePropertyData(core::mem::transmute(symboliclinkname), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags), core::mem::transmute(size), core::mem::transmute(data), core::mem::transmute(requiredsize), core::mem::transmute(r#type)) + IoGetDeviceInterfacePropertyData(core::mem::transmute(symboliclinkname), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), core::mem::transmute(data), core::mem::transmute(requiredsize), core::mem::transmute(r#type)) } #[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 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(core::mem::transmute(interfaceclassguid), core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(symboliclinklist)) + IoGetDeviceInterfaces(core::mem::transmute(interfaceclassguid), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(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] @@ -1960,19 +1856,19 @@ 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(core::mem::transmute(deviceobject), core::mem::transmute(deviceproperty), core::mem::transmute(bufferlength), core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(resultlength)) + IoGetDeviceProperty(core::mem::transmute(deviceobject), core::mem::transmute(deviceproperty), core::mem::transmute(bufferlength), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] -pub unsafe fn IoGetDevicePropertyData(pdo: *const super::super::Foundation::DEVICE_OBJECT, propertykey: *const super::super::super::Win32::Foundation::DEVPROPKEY, lcid: u32, flags: u32, size: u32, data: *mut core::ffi::c_void, requiredsize: *mut u32, r#type: *mut super::super::super::Win32::Devices::Properties::DEVPROPTYPE) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn IoGetDevicePropertyData(pdo: *const super::super::Foundation::DEVICE_OBJECT, propertykey: *const super::super::super::Win32::Foundation::DEVPROPKEY, lcid: u32, flags: Option, size: u32, data: *mut core::ffi::c_void, requiredsize: *mut u32, r#type: *mut super::super::super::Win32::Devices::Properties::DEVPROPTYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDevicePropertyData(pdo : *const super::super::Foundation:: DEVICE_OBJECT, propertykey : *const super::super::super::Win32::Foundation:: DEVPROPKEY, lcid : u32, flags : u32, size : u32, data : *mut core::ffi::c_void, requiredsize : *mut u32, r#type : *mut super::super::super::Win32::Devices::Properties:: DEVPROPTYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoGetDevicePropertyData(core::mem::transmute(pdo), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags), core::mem::transmute(size), core::mem::transmute(data), core::mem::transmute(requiredsize), core::mem::transmute(r#type)) + IoGetDevicePropertyData(core::mem::transmute(pdo), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), core::mem::transmute(data), core::mem::transmute(requiredsize), core::mem::transmute(r#type)) } #[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 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(core::ptr::null())), core::mem::transmute(devicedescription), core::mem::transmute(numberofmapregisters)) + IoGetDmaAdapter(core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicedescription), core::mem::transmute(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] @@ -2086,12 +1982,9 @@ pub unsafe fn IoGetTransactionParameterBlock(fileobject: *const super::super::Fo } #[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 IoIncrementKeepAliveCount(fileobject: *mut super::super::Foundation::FILE_OBJECT, process: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn IoIncrementKeepAliveCount(fileobject: *mut super::super::Foundation::FILE_OBJECT, process: super::super::Foundation::PEPROCESS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoIncrementKeepAliveCount(fileobject : *mut super::super::Foundation:: FILE_OBJECT, process : super::super::Foundation:: PEPROCESS) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoIncrementKeepAliveCount(core::mem::transmute(fileobject), process.param().abi()) + IoIncrementKeepAliveCount(core::mem::transmute(fileobject), core::mem::transmute(process)) } #[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] @@ -2103,7 +1996,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(core::mem::transmute(irp), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(packetsize), core::mem::transmute(stacksize)) + IoInitializeIrpEx(core::mem::transmute(irp), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(packetsize), core::mem::transmute(stacksize)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2115,16 +2008,13 @@ 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(core::mem::transmute(deviceobject), core::mem::transmute(timerroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoInitializeTimer(core::mem::transmute(deviceobject), core::mem::transmute(timerroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoInitializeWorkItem(ioobject: *const core::ffi::c_void, ioworkitem: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn IoInitializeWorkItem(ioobject: *const core::ffi::c_void, ioworkitem: super::super::Foundation::PIO_WORKITEM) { windows_targets::link!("ntoskrnl.exe" "system" fn IoInitializeWorkItem(ioobject : *const core::ffi::c_void, ioworkitem : super::super::Foundation:: PIO_WORKITEM)); - IoInitializeWorkItem(core::mem::transmute(ioobject), ioworkitem.param().abi()) + IoInitializeWorkItem(core::mem::transmute(ioobject), core::mem::transmute(ioworkitem)) } #[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] @@ -2142,7 +2032,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(core::ptr::null()))) + IoIs32bitProcess(core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2163,12 +2053,9 @@ pub unsafe fn IoIsInitiator32bitProcess(irp: *const super::super::Foundation::IR IoIsInitiator32bitProcess(core::mem::transmute(irp)) } #[inline] -pub unsafe fn IoIsValidIrpStatus(status: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IoIsValidIrpStatus(status: super::super::super::Win32::Foundation::NTSTATUS) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn IoIsValidIrpStatus(status : super::super::super::Win32::Foundation:: NTSTATUS) -> u32); - IoIsValidIrpStatus(status.param().abi()) + IoIsValidIrpStatus(core::mem::transmute(status)) } #[inline] pub unsafe fn IoIsWdmVersionAvailable(majorversion: u8, minorversion: u8) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -2223,14 +2110,14 @@ pub unsafe fn IoPropagateActivityIdToThread(irp: *const super::super::Foundation 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(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())), + core::mem::transmute(bustype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(busnumber.unwrap_or(core::mem::zeroed())), + core::mem::transmute(controllertype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(controllernumber.unwrap_or(core::mem::zeroed())), + core::mem::transmute(peripheraltype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(peripheralnumber.unwrap_or(core::mem::zeroed())), core::mem::transmute(calloutroutine), - core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] @@ -2243,53 +2130,43 @@ 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(core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(options), core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) + IoQueryInformationByName(core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(options), core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(buffersize)) + IoQueryKsrPersistentMemorySize(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(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())), core::mem::transmute(buffersize)) + IoQueryKsrPersistentMemorySizeEx(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(physicaldeviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(datatag.unwrap_or(core::mem::zeroed())), core::mem::transmute(dataversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoQueueWorkItem(ioworkitem: P0, workerroutine: PIO_WORKITEM_ROUTINE, queuetype: WORK_QUEUE_TYPE, context: Option<*const core::ffi::c_void>) -where - P0: windows_core::Param, -{ +pub unsafe fn IoQueueWorkItem(ioworkitem: super::super::Foundation::PIO_WORKITEM, workerroutine: PIO_WORKITEM_ROUTINE, queuetype: WORK_QUEUE_TYPE, context: Option<*const core::ffi::c_void>) { 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(), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoQueueWorkItem(core::mem::transmute(ioworkitem), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoQueueWorkItemEx(ioworkitem: P0, workerroutine: PIO_WORKITEM_ROUTINE_EX, queuetype: WORK_QUEUE_TYPE, context: Option<*const core::ffi::c_void>) -where - P0: windows_core::Param, -{ +pub unsafe fn IoQueueWorkItemEx(ioworkitem: super::super::Foundation::PIO_WORKITEM, workerroutine: PIO_WORKITEM_ROUTINE_EX, queuetype: WORK_QUEUE_TYPE, context: Option<*const core::ffi::c_void>) { 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(), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoQueueWorkItemEx(core::mem::transmute(ioworkitem), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(irp), core::mem::transmute(vpb.unwrap_or(core::ptr::null())), core::mem::transmute(realdeviceobject)) + IoRaiseHardError(core::mem::transmute(irp), core::mem::transmute(vpb.unwrap_or(core::mem::zeroed())), core::mem::transmute(realdeviceobject)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoRaiseInformationalHardError(errorstatus: P0, string: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, thread: P2) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn IoRaiseInformationalHardError(errorstatus: super::super::super::Win32::Foundation::NTSTATUS, string: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, thread: Option) -> super::super::super::Win32::Foundation::BOOLEAN { 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(core::ptr::null())), thread.param().abi()) + IoRaiseInformationalHardError(core::mem::transmute(errorstatus), core::mem::transmute(string.unwrap_or(core::mem::zeroed())), core::mem::transmute(thread.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2320,30 +2197,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(core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + IoRegisterBootDriverCallback(core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(driverobject), core::mem::transmute(driverreinitializationroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoRegisterBootDriverReinitialization(core::mem::transmute(driverobject), core::mem::transmute(driverreinitializationroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(notificationclass), core::mem::transmute(callbackfunction), core::mem::transmute(notificationinformation.unwrap_or(core::ptr::null())), core::mem::transmute(notificationinformationlength), core::mem::transmute(callbackregistration)) + IoRegisterContainerNotification(core::mem::transmute(notificationclass), core::mem::transmute(callbackfunction), core::mem::transmute(notificationinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(notificationinformationlength), core::mem::transmute(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(core::mem::transmute(physicaldeviceobject), core::mem::transmute(interfaceclassguid), core::mem::transmute(referencestring.unwrap_or(core::ptr::null())), core::mem::transmute(symboliclinkname)) + IoRegisterDeviceInterface(core::mem::transmute(physicaldeviceobject), core::mem::transmute(interfaceclassguid), core::mem::transmute(referencestring.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(driverobject), core::mem::transmute(driverreinitializationroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoRegisterDriverReinitialization(core::mem::transmute(driverobject), core::mem::transmute(driverreinitializationroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2355,7 +2232,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(core::mem::transmute(eventcategory), core::mem::transmute(eventcategoryflags), core::mem::transmute(eventcategorydata.unwrap_or(core::ptr::null())), core::mem::transmute(driverobject), core::mem::transmute(callbackroutine), core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), core::mem::transmute(notificationentry)) + IoRegisterPlugPlayNotification(core::mem::transmute(eventcategory), core::mem::transmute(eventcategoryflags), core::mem::transmute(eventcategorydata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverobject), core::mem::transmute(callbackroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] @@ -2372,25 +2249,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(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::ptr::null())), core::mem::transmute(remlocksize)) + IoReleaseRemoveLockAndWaitEx(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::ptr::null())), core::mem::transmute(remlocksize)) + IoReleaseRemoveLockEx(core::mem::transmute(removelock), core::mem::transmute(tag.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut()))) + IoRemoveLinkShareAccess(core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ioshareaccessflags)) + IoRemoveLinkShareAccessEx(core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] @@ -2411,7 +2288,7 @@ where P6: 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(core::mem::transmute(driverobject), core::mem::transmute(legacybustype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(resourcelist.unwrap_or(core::ptr::null())), core::mem::transmute(resourcerequirements.unwrap_or(core::ptr::null())), resourceassigned.param().abi(), core::mem::transmute(deviceobject)) + IoReportDetectedDevice(core::mem::transmute(driverobject), core::mem::transmute(legacybustype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(resourcelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(resourcerequirements.unwrap_or(core::mem::zeroed())), resourceassigned.param().abi(), core::mem::transmute(deviceobject)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2427,18 +2304,28 @@ pub unsafe fn IoReportInterruptInactive(parameters: *const IO_REPORT_INTERRUPT_A } #[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 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 { +pub unsafe fn IoReportResourceForDetection(driverobject: *const super::super::Foundation::DRIVER_OBJECT, driverlist: Option<*const CM_RESOURCE_LIST>, driverlistsize: Option, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, devicelist: Option<*const CM_RESOURCE_LIST>, devicelistsize: Option, 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(core::mem::transmute(driverobject), core::mem::transmute(driverlist.unwrap_or(core::ptr::null())), core::mem::transmute(driverlistsize), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(devicelist.unwrap_or(core::ptr::null())), core::mem::transmute(devicelistsize), core::mem::transmute(conflictdetected)) + IoReportResourceForDetection(core::mem::transmute(driverobject), core::mem::transmute(driverlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverlistsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicelistsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] -pub unsafe fn IoReportResourceUsage(driverclassname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, 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, overrideconflict: P7, conflictdetected: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn IoReportResourceUsage(driverclassname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, driverobject: *const super::super::Foundation::DRIVER_OBJECT, driverlist: Option<*const CM_RESOURCE_LIST>, driverlistsize: Option, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, devicelist: Option<*const CM_RESOURCE_LIST>, devicelistsize: Option, overrideconflict: P7, conflictdetected: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS where P7: 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(core::ptr::null())), core::mem::transmute(driverobject), core::mem::transmute(driverlist.unwrap_or(core::ptr::null())), core::mem::transmute(driverlistsize), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(devicelist.unwrap_or(core::ptr::null())), core::mem::transmute(devicelistsize), overrideconflict.param().abi(), core::mem::transmute(conflictdetected)) + IoReportResourceUsage( + core::mem::transmute(driverclassname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(driverobject), + core::mem::transmute(driverlist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(driverlistsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), + core::mem::transmute(devicelist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(devicelistsize.unwrap_or(core::mem::zeroed())), + overrideconflict.param().abi(), + core::mem::transmute(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] @@ -2454,9 +2341,9 @@ pub unsafe fn IoReportTargetDeviceChange(physicaldeviceobject: *const super::sup } #[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 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 { +pub unsafe fn IoReportTargetDeviceChangeAsynchronous(physicaldeviceobject: *const super::super::Foundation::DEVICE_OBJECT, notificationstructure: *const core::ffi::c_void, callback: Option, 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(core::mem::transmute(physicaldeviceobject), core::mem::transmute(notificationstructure), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoReportTargetDeviceChangeAsynchronous(core::mem::transmute(physicaldeviceobject), core::mem::transmute(notificationstructure), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2466,36 +2353,33 @@ pub unsafe fn IoRequestDeviceEject(physicaldeviceobject: *const super::super::Fo } #[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 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 { +pub unsafe fn IoRequestDeviceEjectEx(physicaldeviceobject: *const super::super::Foundation::DEVICE_OBJECT, callback: Option, 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(core::mem::transmute(physicaldeviceobject), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(driverobject.unwrap_or(core::ptr::null()))) + IoRequestDeviceEjectEx(core::mem::transmute(physicaldeviceobject), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverobject.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(size), core::mem::transmute(flags), core::mem::transmute(datahandle)) + IoReserveKsrPersistentMemory(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), core::mem::transmute(flags), core::mem::transmute(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(core::mem::transmute(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), core::mem::transmute(size), core::mem::transmute(flags), core::mem::transmute(datahandle)) + IoReserveKsrPersistentMemoryEx(core::mem::transmute(driverobject), core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(physicaldeviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(datatag.unwrap_or(core::mem::zeroed())), core::mem::transmute(dataversion), core::mem::transmute(size), core::mem::transmute(flags), core::mem::transmute(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 IoReuseIrp(irp: *mut super::super::Foundation::IRP, iostatus: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn IoReuseIrp(irp: *mut super::super::Foundation::IRP, iostatus: super::super::super::Win32::Foundation::NTSTATUS) { windows_targets::link!("ntoskrnl.exe" "system" fn IoReuseIrp(irp : *mut super::super::Foundation:: IRP, iostatus : super::super::super::Win32::Foundation:: NTSTATUS)); - IoReuseIrp(core::mem::transmute(irp), iostatus.param().abi()) + IoReuseIrp(core::mem::transmute(irp), core::mem::transmute(iostatus)) } #[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 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(core::mem::transmute(irp), core::mem::transmute(guid.unwrap_or(core::ptr::null()))) + IoSetActivityIdIrp(core::mem::transmute(irp), core::mem::transmute(guid.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn IoSetActivityIdThread(activityid: *const windows_core::GUID) -> *mut windows_core::GUID { @@ -2511,12 +2395,12 @@ where P6: 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(core::mem::transmute(deviceobject), core::mem::transmute(irp), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null())), invokeonsuccess.param().abi(), invokeonerror.param().abi(), invokeoncancel.param().abi()) + IoSetCompletionRoutineEx(core::mem::transmute(deviceobject), core::mem::transmute(irp), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), invokeonsuccess.param().abi(), invokeonerror.param().abi(), invokeoncancel.param().abi()) } #[inline] pub unsafe fn IoSetDeviceInterfacePropertyData(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, propertykey: *const super::super::super::Win32::Foundation::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::Foundation:: DEVPROPKEY, lcid : u32, flags : u32, r#type : u32, size : u32, data : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetDeviceInterfacePropertyData(core::mem::transmute(symboliclinkname), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(data.unwrap_or(core::ptr::null()))) + IoSetDeviceInterfacePropertyData(core::mem::transmute(symboliclinkname), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn IoSetDeviceInterfaceState(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, enable: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2530,7 +2414,7 @@ where #[inline] pub unsafe fn IoSetDevicePropertyData(pdo: *const super::super::Foundation::DEVICE_OBJECT, propertykey: *const super::super::super::Win32::Foundation::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::Foundation:: DEVPROPKEY, lcid : u32, flags : u32, r#type : u32, size : u32, data : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetDevicePropertyData(core::mem::transmute(pdo), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(data.unwrap_or(core::ptr::null()))) + IoSetDevicePropertyData(core::mem::transmute(pdo), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2587,16 +2471,13 @@ 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(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ioshareaccessflags)) + IoSetLinkShareAccess(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] -pub unsafe fn IoSetMasterIrpStatus(masterirp: *mut super::super::Foundation::IRP, status: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn IoSetMasterIrpStatus(masterirp: *mut super::super::Foundation::IRP, status: super::super::super::Win32::Foundation::NTSTATUS) { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetMasterIrpStatus(masterirp : *mut super::super::Foundation:: IRP, status : super::super::super::Win32::Foundation:: NTSTATUS)); - IoSetMasterIrpStatus(core::mem::transmute(masterirp), status.param().abi()) + IoSetMasterIrpStatus(core::mem::transmute(masterirp), core::mem::transmute(status)) } #[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] @@ -2620,7 +2501,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(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(writepermission.unwrap_or(core::ptr::null()))) + IoSetShareAccessEx(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(writepermission.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2649,13 +2530,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(core::ptr::null()))) + IoSetTopLevelIrp(core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(stacksize)) + IoSizeOfIrpEx(core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(stacksize)) } #[inline] pub unsafe fn IoSizeofWorkItem() -> u32 { @@ -2682,9 +2563,9 @@ where } #[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 IoStartPacket(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, irp: *const super::super::Foundation::IRP, key: Option<*const u32>, cancelfunction: super::super::Foundation::DRIVER_CANCEL) { +pub unsafe fn IoStartPacket(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, irp: *const super::super::Foundation::IRP, key: Option<*const u32>, cancelfunction: Option) { 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(core::mem::transmute(deviceobject), core::mem::transmute(irp), core::mem::transmute(key.unwrap_or(core::ptr::null())), core::mem::transmute(cancelfunction)) + IoStartPacket(core::mem::transmute(deviceobject), core::mem::transmute(irp), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(cancelfunction.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2716,21 +2597,15 @@ pub unsafe fn IoTranslateBusAddress(interfacetype: INTERFACE_TYPE, busnumber: u3 } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoTryQueueWorkItem(ioworkitem: P0, workerroutine: PIO_WORKITEM_ROUTINE_EX, queuetype: WORK_QUEUE_TYPE, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn IoTryQueueWorkItem(ioworkitem: super::super::Foundation::PIO_WORKITEM, workerroutine: PIO_WORKITEM_ROUTINE_EX, queuetype: WORK_QUEUE_TYPE, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::BOOLEAN { 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(), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoTryQueueWorkItem(core::mem::transmute(ioworkitem), core::mem::transmute(workerroutine), core::mem::transmute(queuetype), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoUninitializeWorkItem(ioworkitem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn IoUninitializeWorkItem(ioworkitem: super::super::Foundation::PIO_WORKITEM) { windows_targets::link!("ntoskrnl.exe" "system" fn IoUninitializeWorkItem(ioworkitem : super::super::Foundation:: PIO_WORKITEM)); - IoUninitializeWorkItem(ioworkitem.param().abi()) + IoUninitializeWorkItem(core::mem::transmute(ioworkitem)) } #[inline] pub unsafe fn IoUnregisterBootDriverCallback(callbackhandle: *const core::ffi::c_void) { @@ -2762,13 +2637,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(core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut()))) + IoUpdateLinkShareAccess(core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ioshareaccessflags)) + IoUpdateLinkShareAccessEx(core::mem::transmute(fileobject), core::mem::transmute(shareaccess), core::mem::transmute(linkshareaccess.unwrap_or(core::mem::zeroed())), core::mem::transmute(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] @@ -2830,15 +2705,12 @@ 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(core::mem::transmute(datablockobject), core::mem::transmute(instancename), core::mem::transmute(methodid), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffersize), core::mem::transmute(inoutbuffer.unwrap_or(core::ptr::null_mut()))) + IoWMIExecuteMethod(core::mem::transmute(datablockobject), core::mem::transmute(instancename), core::mem::transmute(methodid), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffersize), core::mem::transmute(inoutbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IoWMIHandleToInstanceName(datablockobject: *const core::ffi::c_void, filehandle: P1, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn IoWMIHandleToInstanceName(datablockobject: *const core::ffi::c_void, filehandle: super::super::super::Win32::Foundation::HANDLE, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIHandleToInstanceName(datablockobject : *const core::ffi::c_void, filehandle : super::super::super::Win32::Foundation:: HANDLE, instancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMIHandleToInstanceName(core::mem::transmute(datablockobject), filehandle.param().abi(), core::mem::transmute(instancename)) + IoWMIHandleToInstanceName(core::mem::transmute(datablockobject), core::mem::transmute(filehandle), core::mem::transmute(instancename)) } #[inline] pub unsafe fn IoWMIOpenBlock(guid: *const windows_core::GUID, desiredaccess: u32, datablockobject: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2848,22 +2720,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(core::mem::transmute(datablockobject), core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut()))) + IoWMIQueryAllData(core::mem::transmute(datablockobject), core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut()))) + IoWMIQueryAllDataMultiple(core::mem::transmute(datablockobjectlist.as_ptr()), datablockobjectlist.len().try_into().unwrap(), core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(datablockobject), core::mem::transmute(instancename), core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut()))) + IoWMIQuerySingleInstance(core::mem::transmute(datablockobject), core::mem::transmute(instancename), core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(datablockobjectlist), core::mem::transmute(instancenames), core::mem::transmute(objectcount), core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut()))) + IoWMIQuerySingleInstanceMultiple(core::mem::transmute(datablockobjectlist), core::mem::transmute(instancenames), core::mem::transmute(objectcount), core::mem::transmute(inoutbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed()))) } #[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] @@ -2874,7 +2746,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(core::mem::transmute(object), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + IoWMISetNotificationCallback(core::mem::transmute(object), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -2893,7 +2765,7 @@ where P2: 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(core::ptr::null())), core::mem::transmute(symboliclinkname.unwrap_or(core::ptr::null())), combinenames.param().abi(), core::mem::transmute(suggestedinstancename)) + IoWMISuggestInstanceName(core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(symboliclinkname.unwrap_or(core::mem::zeroed())), combinenames.param().abi(), core::mem::transmute(suggestedinstancename)) } #[inline] pub unsafe fn IoWMIWriteEvent(wnodeeventitem: *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2988,12 +2860,9 @@ pub unsafe fn KeAcquireInStackQueuedSpinLockForDpc(spinlock: *mut usize, lockhan } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeAcquireInterruptSpinLock(interrupt: P0) -> u8 -where - P0: windows_core::Param, -{ +pub unsafe fn KeAcquireInterruptSpinLock(interrupt: super::super::Foundation::PKINTERRUPT) -> u8 { windows_targets::link!("ntoskrnl.exe" "system" fn KeAcquireInterruptSpinLock(interrupt : super::super::Foundation:: PKINTERRUPT) -> u8); - KeAcquireInterruptSpinLock(interrupt.param().abi()) + KeAcquireInterruptSpinLock(core::mem::transmute(interrupt)) } #[inline] pub unsafe fn KeAcquireSpinLockForDpc(spinlock: *mut usize) -> u8 { @@ -3043,12 +2912,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(core::mem::transmute(auxiliarycountervalue), core::mem::transmute(performancecountervalue), core::mem::transmute(conversionerror.unwrap_or(core::ptr::null_mut()))) + KeConvertAuxiliaryCounterToPerformanceCounter(core::mem::transmute(auxiliarycountervalue), core::mem::transmute(performancecountervalue), core::mem::transmute(conversionerror.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(performancecountervalue), core::mem::transmute(auxiliarycountervalue), core::mem::transmute(conversionerror.unwrap_or(core::ptr::null_mut()))) + KeConvertPerformanceCounterToAuxiliaryCounter(core::mem::transmute(performancecountervalue), core::mem::transmute(auxiliarycountervalue), core::mem::transmute(conversionerror.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KeDelayExecutionThread(waitmode: i8, alertable: P1, interval: *const i64) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3098,7 +2967,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(core::mem::transmute(callout), core::mem::transmute(parameter.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + KeExpandKernelStackAndCallout(core::mem::transmute(callout), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } #[inline] pub unsafe fn KeExpandKernelStackAndCalloutEx(callout: PEXPAND_STACK_CALLOUT, parameter: Option<*const core::ffi::c_void>, size: usize, wait: P3, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3106,7 +2975,7 @@ where P3: 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(core::mem::transmute(callout), core::mem::transmute(parameter.unwrap_or(core::ptr::null())), core::mem::transmute(size), wait.param().abi(), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + KeExpandKernelStackAndCalloutEx(core::mem::transmute(callout), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), wait.param().abi(), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3142,7 +3011,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(core::ptr::null_mut()))) + KeGetCurrentProcessorNumberEx(core::mem::transmute(procnumber.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3164,7 +3033,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(core::mem::transmute(dumptype), core::mem::transmute(flags), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bufferneeded.unwrap_or(core::ptr::null_mut()))) + KeInitializeCrashDumpHeader(core::mem::transmute(dumptype), core::mem::transmute(flags), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bufferneeded.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3176,7 +3045,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(core::mem::transmute(dpc), core::mem::transmute(deferredroutine), core::mem::transmute(deferredcontext.unwrap_or(core::ptr::null()))) + KeInitializeDpc(core::mem::transmute(dpc), core::mem::transmute(deferredroutine), core::mem::transmute(deferredcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3216,7 +3085,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(core::mem::transmute(dpc), core::mem::transmute(deferredroutine), core::mem::transmute(deferredcontext.unwrap_or(core::ptr::null()))) + KeInitializeThreadedDpc(core::mem::transmute(dpc), core::mem::transmute(deferredroutine), core::mem::transmute(deferredcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3252,7 +3121,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(core::mem::transmute(dpc), core::mem::transmute(systemargument1.unwrap_or(core::ptr::null())), core::mem::transmute(systemargument2.unwrap_or(core::ptr::null()))) + KeInsertQueueDpc(core::mem::transmute(dpc), core::mem::transmute(systemargument1.unwrap_or(core::mem::zeroed())), core::mem::transmute(systemargument2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KeInvalidateAllCaches() -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3301,7 +3170,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(core::ptr::null_mut()))) + KeQueryActiveProcessorCount(core::mem::transmute(activeprocessors.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KeQueryActiveProcessorCountEx(groupnumber: u16) -> u32 { @@ -3316,7 +3185,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(core::ptr::null_mut()))) + KeQueryAuxiliaryCounterFrequency(core::mem::transmute(auxiliarycounterfrequency.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KeQueryDpcWatchdogInformation(watchdoginformation: *mut KDPC_WATCHDOG_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3347,7 +3216,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(core::ptr::null())), core::mem::transmute(relationshiptype), core::mem::transmute(information.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length)) + KeQueryLogicalProcessorRelationship(core::mem::transmute(processornumber.unwrap_or(core::mem::zeroed())), core::mem::transmute(relationshiptype), core::mem::transmute(information.unwrap_or(core::mem::zeroed())), core::mem::transmute(length)) } #[inline] pub unsafe fn KeQueryMaximumGroupCount() -> u16 { @@ -3368,7 +3237,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(core::mem::transmute(nodenumber), core::mem::transmute(affinity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) + KeQueryNodeActiveAffinity(core::mem::transmute(nodenumber), core::mem::transmute(affinity.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -3389,25 +3258,19 @@ 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(core::ptr::null_mut()))) + KeQueryPerformanceCounter(core::mem::transmute(performancefrequency.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeQueryPriorityThread(thread: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn KeQueryPriorityThread(thread: super::super::Foundation::PKTHREAD) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryPriorityThread(thread : super::super::Foundation:: PKTHREAD) -> i32); - KeQueryPriorityThread(thread.param().abi()) + KeQueryPriorityThread(core::mem::transmute(thread)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeQueryRuntimeThread(thread: P0, usertime: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn KeQueryRuntimeThread(thread: super::super::Foundation::PKTHREAD, usertime: *mut u32) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryRuntimeThread(thread : super::super::Foundation:: PKTHREAD, usertime : *mut u32) -> u32); - KeQueryRuntimeThread(thread.param().abi(), core::mem::transmute(usertime)) + KeQueryRuntimeThread(core::mem::transmute(thread), core::mem::transmute(usertime)) } #[inline] pub unsafe fn KeQuerySystemTimePrecise() -> i64 { @@ -3423,12 +3286,9 @@ pub unsafe fn KeQueryTimeIncrement() -> u32 { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeQueryTotalCycleTimeThread(thread: P0, cycletimestamp: *mut u64) -> u64 -where - P0: windows_core::Param, -{ +pub unsafe fn KeQueryTotalCycleTimeThread(thread: super::super::Foundation::PKTHREAD, cycletimestamp: *mut u64) -> u64 { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryTotalCycleTimeThread(thread : super::super::Foundation:: PKTHREAD, cycletimestamp : *mut u64) -> u64); - KeQueryTotalCycleTimeThread(thread.param().abi(), core::mem::transmute(cycletimestamp)) + KeQueryTotalCycleTimeThread(core::mem::transmute(thread), core::mem::transmute(cycletimestamp)) } #[inline] pub unsafe fn KeQueryUnbiasedInterruptTime() -> u64 { @@ -3473,7 +3333,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(core::mem::transmute(callbackrecord), core::mem::transmute(callbackroutine), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(length), core::mem::transmute(component)) + KeRegisterBugCheckCallback(core::mem::transmute(callbackrecord), core::mem::transmute(callbackroutine), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(component)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3484,12 +3344,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(core::mem::transmute(callbackroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + KeRegisterNmiCallback(core::mem::transmute(callbackroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(flags)) + KeRegisterProcessorChangeCallback(core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3520,12 +3380,9 @@ pub unsafe fn KeReleaseInStackQueuedSpinLockFromDpcLevel(lockhandle: *const KLOC } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeReleaseInterruptSpinLock(interrupt: P0, oldirql: u8) -where - P0: windows_core::Param, -{ +pub unsafe fn KeReleaseInterruptSpinLock(interrupt: super::super::Foundation::PKINTERRUPT, oldirql: u8) { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseInterruptSpinLock(interrupt : super::super::Foundation:: PKINTERRUPT, oldirql : u8)); - KeReleaseInterruptSpinLock(interrupt.param().abi(), core::mem::transmute(oldirql)) + KeReleaseInterruptSpinLock(core::mem::transmute(interrupt), core::mem::transmute(oldirql)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3625,18 +3482,15 @@ pub unsafe fn KeSaveExtendedProcessorState(mask: u64, xstatesave: *mut XSTATE_SA } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeSetBasePriorityThread(thread: P0, increment: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn KeSetBasePriorityThread(thread: super::super::Foundation::PKTHREAD, increment: i32) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetBasePriorityThread(thread : super::super::Foundation:: PKTHREAD, increment : i32) -> i32); - KeSetBasePriorityThread(thread.param().abi(), core::mem::transmute(increment)) + KeSetBasePriorityThread(core::mem::transmute(thread), core::mem::transmute(increment)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[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(core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(tolerabledelay), core::mem::transmute(dpc.unwrap_or(core::ptr::null()))) + KeSetCoalescableTimer(core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(tolerabledelay), core::mem::transmute(dpc.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3660,12 +3514,9 @@ pub unsafe fn KeSetImportanceDpc(dpc: *mut super::super::Foundation::KDPC, impor } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeSetPriorityThread(thread: P0, priority: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn KeSetPriorityThread(thread: super::super::Foundation::PKTHREAD, priority: i32) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetPriorityThread(thread : super::super::Foundation:: PKTHREAD, priority : i32) -> i32); - KeSetPriorityThread(thread.param().abi(), core::mem::transmute(priority)) + KeSetPriorityThread(core::mem::transmute(thread), core::mem::transmute(priority)) } #[inline] pub unsafe fn KeSetSystemAffinityThread(affinity: usize) { @@ -3681,7 +3532,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(core::mem::transmute(affinity), core::mem::transmute(previousaffinity.unwrap_or(core::ptr::null_mut()))) + KeSetSystemGroupAffinityThread(core::mem::transmute(affinity), core::mem::transmute(previousaffinity.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3699,13 +3550,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(core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(dpc.unwrap_or(core::ptr::null()))) + KeSetTimer(core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(dpc.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(dpc.unwrap_or(core::ptr::null()))) + KeSetTimerEx(core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(dpc.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KeShouldYieldProcessor() -> u32 { @@ -3719,12 +3570,9 @@ pub unsafe fn KeStallExecutionProcessor(microseconds: u32) { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeSynchronizeExecution(interrupt: P0, synchronizeroutine: PKSYNCHRONIZE_ROUTINE, synchronizecontext: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn KeSynchronizeExecution(interrupt: super::super::Foundation::PKINTERRUPT, synchronizeroutine: PKSYNCHRONIZE_ROUTINE, synchronizecontext: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::BOOLEAN { 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(), core::mem::transmute(synchronizeroutine), core::mem::transmute(synchronizecontext.unwrap_or(core::ptr::null()))) + KeSynchronizeExecution(core::mem::transmute(interrupt), core::mem::transmute(synchronizeroutine), core::mem::transmute(synchronizecontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KeTestSpinLock(spinlock: *const usize) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3749,7 +3597,7 @@ where P5: 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()), core::mem::transmute(waittype), core::mem::transmute(waitreason), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(waitblockarray.unwrap_or(core::ptr::null_mut()))) + KeWaitForMultipleObjects(object.len().try_into().unwrap(), core::mem::transmute(object.as_ptr()), core::mem::transmute(waittype), core::mem::transmute(waitreason), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitblockarray.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KeWaitForSingleObject(object: *const core::ffi::c_void, waitreason: KWAIT_REASON, waitmode: i8, alertable: P3, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3757,7 +3605,7 @@ where P3: 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(core::mem::transmute(object), core::mem::transmute(waitreason), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::ptr::null()))) + KeWaitForSingleObject(core::mem::transmute(object), core::mem::transmute(waitreason), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KfRaiseIrql(newirql: u8) -> u8 { @@ -3793,22 +3641,22 @@ 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(core::mem::transmute(numberofbytes), core::mem::transmute(lowestacceptableaddress), core::mem::transmute(highestacceptableaddress), core::mem::transmute(boundaryaddressmultiple), core::mem::transmute(preferrednode), core::mem::transmute(protect), core::mem::transmute(partitionobject.unwrap_or(core::ptr::null())), core::mem::transmute(tag), core::mem::transmute(flags), core::mem::transmute(baseaddress)) + MmAllocateContiguousMemoryEx(core::mem::transmute(numberofbytes), core::mem::transmute(lowestacceptableaddress), core::mem::transmute(highestacceptableaddress), core::mem::transmute(boundaryaddressmultiple), core::mem::transmute(preferrednode), core::mem::transmute(protect), core::mem::transmute(partitionobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(tag), core::mem::transmute(flags), core::mem::transmute(baseaddress)) } #[inline] -pub unsafe fn MmAllocateContiguousMemorySpecifyCache(numberofbytes: usize, lowestacceptableaddress: i64, highestacceptableaddress: i64, boundaryaddressmultiple: i64, cachetype: MEMORY_CACHING_TYPE) -> *mut core::ffi::c_void { +pub unsafe fn MmAllocateContiguousMemorySpecifyCache(numberofbytes: usize, lowestacceptableaddress: i64, highestacceptableaddress: i64, boundaryaddressmultiple: Option, cachetype: MEMORY_CACHING_TYPE) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn MmAllocateContiguousMemorySpecifyCache(numberofbytes : usize, lowestacceptableaddress : i64, highestacceptableaddress : i64, boundaryaddressmultiple : i64, cachetype : MEMORY_CACHING_TYPE) -> *mut core::ffi::c_void); - MmAllocateContiguousMemorySpecifyCache(core::mem::transmute(numberofbytes), core::mem::transmute(lowestacceptableaddress), core::mem::transmute(highestacceptableaddress), core::mem::transmute(boundaryaddressmultiple), core::mem::transmute(cachetype)) + MmAllocateContiguousMemorySpecifyCache(core::mem::transmute(numberofbytes), core::mem::transmute(lowestacceptableaddress), core::mem::transmute(highestacceptableaddress), core::mem::transmute(boundaryaddressmultiple.unwrap_or(core::mem::zeroed())), core::mem::transmute(cachetype)) } #[inline] -pub unsafe fn MmAllocateContiguousMemorySpecifyCacheNode(numberofbytes: usize, lowestacceptableaddress: i64, highestacceptableaddress: i64, boundaryaddressmultiple: i64, cachetype: MEMORY_CACHING_TYPE, preferrednode: u32) -> *mut core::ffi::c_void { +pub unsafe fn MmAllocateContiguousMemorySpecifyCacheNode(numberofbytes: usize, lowestacceptableaddress: i64, highestacceptableaddress: i64, boundaryaddressmultiple: Option, cachetype: MEMORY_CACHING_TYPE, preferrednode: u32) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn MmAllocateContiguousMemorySpecifyCacheNode(numberofbytes : usize, lowestacceptableaddress : i64, highestacceptableaddress : i64, boundaryaddressmultiple : i64, cachetype : MEMORY_CACHING_TYPE, preferrednode : u32) -> *mut core::ffi::c_void); - MmAllocateContiguousMemorySpecifyCacheNode(core::mem::transmute(numberofbytes), core::mem::transmute(lowestacceptableaddress), core::mem::transmute(highestacceptableaddress), core::mem::transmute(boundaryaddressmultiple), core::mem::transmute(cachetype), core::mem::transmute(preferrednode)) + MmAllocateContiguousMemorySpecifyCacheNode(core::mem::transmute(numberofbytes), core::mem::transmute(lowestacceptableaddress), core::mem::transmute(highestacceptableaddress), core::mem::transmute(boundaryaddressmultiple.unwrap_or(core::mem::zeroed())), core::mem::transmute(cachetype), core::mem::transmute(preferrednode)) } #[inline] -pub unsafe fn MmAllocateContiguousNodeMemory(numberofbytes: usize, lowestacceptableaddress: i64, highestacceptableaddress: i64, boundaryaddressmultiple: i64, protect: u32, preferrednode: u32) -> *mut core::ffi::c_void { +pub unsafe fn MmAllocateContiguousNodeMemory(numberofbytes: usize, lowestacceptableaddress: i64, highestacceptableaddress: i64, boundaryaddressmultiple: Option, protect: u32, preferrednode: u32) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn MmAllocateContiguousNodeMemory(numberofbytes : usize, lowestacceptableaddress : i64, highestacceptableaddress : i64, boundaryaddressmultiple : i64, protect : u32, preferrednode : u32) -> *mut core::ffi::c_void); - MmAllocateContiguousNodeMemory(core::mem::transmute(numberofbytes), core::mem::transmute(lowestacceptableaddress), core::mem::transmute(highestacceptableaddress), core::mem::transmute(boundaryaddressmultiple), core::mem::transmute(protect), core::mem::transmute(preferrednode)) + MmAllocateContiguousNodeMemory(core::mem::transmute(numberofbytes), core::mem::transmute(lowestacceptableaddress), core::mem::transmute(highestacceptableaddress), core::mem::transmute(boundaryaddressmultiple.unwrap_or(core::mem::zeroed())), core::mem::transmute(protect), core::mem::transmute(preferrednode)) } #[inline] pub unsafe fn MmAllocateMappingAddress(numberofbytes: usize, pooltag: u32) -> *mut core::ffi::c_void { @@ -3853,7 +3701,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(core::mem::transmute(lowaddress), core::mem::transmute(highaddress), core::mem::transmute(skipbytes), core::mem::transmute(totalbytes), core::mem::transmute(cachetype), core::mem::transmute(idealnode), core::mem::transmute(flags), core::mem::transmute(partitionobject.unwrap_or(core::ptr::null()))) + MmAllocatePartitionNodePagesForMdlEx(core::mem::transmute(lowaddress), core::mem::transmute(highaddress), core::mem::transmute(skipbytes), core::mem::transmute(totalbytes), core::mem::transmute(cachetype), core::mem::transmute(idealnode), core::mem::transmute(flags), core::mem::transmute(partitionobject.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3876,7 +3724,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(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null())), core::mem::transmute(length)) + MmCreateMdl(core::mem::transmute(memorydescriptorlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(length)) } #[inline] pub unsafe fn MmCreateMirror() -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3938,12 +3786,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(core::ptr::null()))) + MmGetPhysicalMemoryRangesEx(core::mem::transmute(partitionobject.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(flags)) + MmGetPhysicalMemoryRangesEx2(core::mem::transmute(partitionobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] pub unsafe fn MmGetSystemRoutineAddress(systemroutinename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> *mut core::ffi::c_void { @@ -4027,7 +3875,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(core::mem::transmute(memorydescriptorlist), core::mem::transmute(accessmode), core::mem::transmute(cachetype), core::mem::transmute(requestedaddress.unwrap_or(core::ptr::null())), core::mem::transmute(bugcheckonfailure), core::mem::transmute(priority)) + MmMapLockedPagesSpecifyCache(core::mem::transmute(memorydescriptorlist), core::mem::transmute(accessmode), core::mem::transmute(cachetype), core::mem::transmute(requestedaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(bugcheckonfailure), core::mem::transmute(priority)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4039,7 +3887,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(core::mem::transmute(memorydescriptorlist), core::mem::transmute(protection), core::mem::transmute(driverroutine), core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) + MmMapMdl(core::mem::transmute(memorydescriptorlist), core::mem::transmute(protection), core::mem::transmute(driverroutine), core::mem::transmute(drivercontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4096,12 +3944,9 @@ pub unsafe fn MmProbeAndLockPages(memorydescriptorlist: *mut super::super::Found } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn MmProbeAndLockProcessPages(memorydescriptorlist: *mut super::super::Foundation::MDL, process: P1, accessmode: i8, operation: LOCK_OPERATION) -where - P1: windows_core::Param, -{ +pub unsafe fn MmProbeAndLockProcessPages(memorydescriptorlist: *mut super::super::Foundation::MDL, process: super::super::Foundation::PEPROCESS, accessmode: i8, operation: LOCK_OPERATION) { windows_targets::link!("ntoskrnl.exe" "system" fn MmProbeAndLockProcessPages(memorydescriptorlist : *mut super::super::Foundation:: MDL, process : super::super::Foundation:: PEPROCESS, accessmode : i8, operation : LOCK_OPERATION)); - MmProbeAndLockProcessPages(core::mem::transmute(memorydescriptorlist), process.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(operation)) + MmProbeAndLockProcessPages(core::mem::transmute(memorydescriptorlist), core::mem::transmute(process), core::mem::transmute(accessmode), core::mem::transmute(operation)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Storage_FileSystem"))] #[inline] @@ -4139,7 +3984,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(core::mem::transmute(virtualaddress), core::mem::transmute(numberofbytes), core::mem::transmute(newmdl.unwrap_or(core::ptr::null())), core::mem::transmute(direction), core::mem::transmute(copyfunction), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + MmRotatePhysicalView(core::mem::transmute(virtualaddress), core::mem::transmute(numberofbytes), core::mem::transmute(newmdl.unwrap_or(core::mem::zeroed())), core::mem::transmute(direction), core::mem::transmute(copyfunction), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MmSecureVirtualMemory(address: *const core::ffi::c_void, size: usize, probemode: u32) -> super::super::super::Win32::Foundation::HANDLE { @@ -4159,7 +4004,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(core::ptr::null())), core::mem::transmute(length)) + MmSizeOfMdl(core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(length)) } #[inline] pub unsafe fn MmUnlockPagableImageSection(imagesectionhandle: *const core::ffi::c_void) { @@ -4205,12 +4050,9 @@ pub unsafe fn MmUnmapViewInSystemSpace(mappedbase: *const core::ffi::c_void) -> MmUnmapViewInSystemSpace(core::mem::transmute(mappedbase)) } #[inline] -pub unsafe fn MmUnsecureVirtualMemory(securehandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn MmUnsecureVirtualMemory(securehandle: super::super::super::Win32::Foundation::HANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn MmUnsecureVirtualMemory(securehandle : super::super::super::Win32::Foundation:: HANDLE)); - MmUnsecureVirtualMemory(securehandle.param().abi()) + MmUnsecureVirtualMemory(core::mem::transmute(securehandle)) } #[inline] pub unsafe fn NtAllocateLocallyUniqueId(luid: *mut super::super::super::Win32::Foundation::LUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4218,63 +4060,57 @@ pub unsafe fn NtAllocateLocallyUniqueId(luid: *mut super::super::super::Win32::F NtAllocateLocallyUniqueId(core::mem::transmute(luid)) } #[inline] -pub unsafe fn NtCommitComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtCommitComplete(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtCommitComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtCommitEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtCommitEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtCommitEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtCommitTransaction(transactionhandle: P0, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtCommitTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCommitTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCommitTransaction(transactionhandle.param().abi(), wait.param().abi()) + NtCommitTransaction(core::mem::transmute(transactionhandle), wait.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtCreateEnlistment(enlistmenthandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, resourcemanagerhandle: P2, transactionhandle: P3, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: u32, notificationmask: u32, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: Option, notificationmask: u32, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(enlistmenthandle), core::mem::transmute(desiredaccess), resourcemanagerhandle.param().abi(), transactionhandle.param().abi(), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), core::mem::transmute(notificationmask), core::mem::transmute(enlistmentkey.unwrap_or(core::ptr::null()))) + NtCreateEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(desiredaccess), core::mem::transmute(resourcemanagerhandle), core::mem::transmute(transactionhandle), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(notificationmask), core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtCreateResourceManager(resourcemanagerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, tmhandle: P2, rmguid: *const windows_core::GUID, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: u32, description: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: Option, description: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(desiredaccess), tmhandle.param().abi(), core::mem::transmute(rmguid), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), core::mem::transmute(description.unwrap_or(core::ptr::null()))) + NtCreateResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(tmhandle), core::mem::transmute(rmguid), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(description.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtCreateTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, uow: Option<*const windows_core::GUID>, tmhandle: P4, createoptions: u32, isolationlevel: u32, isolationflags: u32, timeout: Option<*const i64>, description: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn NtCreateTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, uow: Option<*const windows_core::GUID>, tmhandle: Option, createoptions: Option, isolationlevel: Option, isolationflags: Option, timeout: Option<*const i64>, description: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(uow.unwrap_or(core::ptr::null())), tmhandle.param().abi(), core::mem::transmute(createoptions), core::mem::transmute(isolationlevel), core::mem::transmute(isolationflags), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(description.unwrap_or(core::ptr::null()))) + NtCreateTransaction( + core::mem::transmute(transactionhandle), + core::mem::transmute(desiredaccess), + core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(uow.unwrap_or(core::mem::zeroed())), + core::mem::transmute(tmhandle.unwrap_or(core::mem::zeroed())), + core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), + core::mem::transmute(isolationlevel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(isolationflags.unwrap_or(core::mem::zeroed())), + core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(description.unwrap_or(core::mem::zeroed())), + ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +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: Option, commitstrength: Option) -> 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(core::mem::transmute(tmhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(logfilename.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), core::mem::transmute(commitstrength)) + NtCreateTransactionManager(core::mem::transmute(tmhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(logfilename.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(commitstrength.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NtDisplayString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4283,21 +4119,15 @@ pub unsafe fn NtDisplayString(string: *const super::super::super::Win32::Foundat } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtEnumerateTransactionObject(rootobjecthandle: P0, querytype: super::super::super::Win32::System::SystemServices::KTMOBJECT_TYPE, objectcursor: *mut super::super::super::Win32::System::SystemServices::KTMOBJECT_CURSOR, objectcursorlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtEnumerateTransactionObject(rootobjecthandle: Option, querytype: super::super::super::Win32::System::SystemServices::KTMOBJECT_TYPE, objectcursor: *mut super::super::super::Win32::System::SystemServices::KTMOBJECT_CURSOR, objectcursorlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtEnumerateTransactionObject(rootobjecthandle : super::super::super::Win32::Foundation:: HANDLE, querytype : super::super::super::Win32::System::SystemServices:: KTMOBJECT_TYPE, objectcursor : *mut super::super::super::Win32::System::SystemServices:: KTMOBJECT_CURSOR, objectcursorlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtEnumerateTransactionObject(rootobjecthandle.param().abi(), core::mem::transmute(querytype), core::mem::transmute(objectcursor), core::mem::transmute(objectcursorlength), core::mem::transmute(returnlength)) + NtEnumerateTransactionObject(core::mem::transmute(rootobjecthandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(querytype), core::mem::transmute(objectcursor), core::mem::transmute(objectcursorlength), core::mem::transmute(returnlength)) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] -pub unsafe fn NtGetNotificationResourceManager(resourcemanagerhandle: P0, transactionnotification: *mut super::super::super::Win32::Storage::FileSystem::TRANSACTION_NOTIFICATION, notificationlength: u32, timeout: Option<*const i64>, returnlength: Option<*mut u32>, asynchronous: u32, asynchronouscontext: usize) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtGetNotificationResourceManager(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE, transactionnotification: *mut super::super::super::Win32::Storage::FileSystem::TRANSACTION_NOTIFICATION, notificationlength: u32, timeout: Option<*const i64>, returnlength: Option<*mut u32>, asynchronous: u32, asynchronouscontext: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(transactionnotification), core::mem::transmute(notificationlength), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(asynchronous), core::mem::transmute(asynchronouscontext)) + NtGetNotificationResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(transactionnotification), core::mem::transmute(notificationlength), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(asynchronous), core::mem::transmute(asynchronouscontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NtLoadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4305,185 +4135,123 @@ pub unsafe fn NtLoadDriver(driverservicename: *const super::super::super::Win32: NtLoadDriver(core::mem::transmute(driverservicename)) } #[inline] -pub unsafe fn NtMakeTemporaryObject(handle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtMakeTemporaryObject(handle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtMakeTemporaryObject(handle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtMakeTemporaryObject(handle.param().abi()) + NtMakeTemporaryObject(core::mem::transmute(handle)) } #[inline] -pub unsafe fn NtManagePartition(targethandle: P0, sourcehandle: P1, partitioninformationclass: PARTITION_INFORMATION_CLASS, partitioninformation: *mut core::ffi::c_void, partitioninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtManagePartition(targethandle: super::super::super::Win32::Foundation::HANDLE, sourcehandle: Option, partitioninformationclass: PARTITION_INFORMATION_CLASS, partitioninformation: *mut core::ffi::c_void, partitioninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtManagePartition(targethandle : super::super::super::Win32::Foundation:: HANDLE, sourcehandle : super::super::super::Win32::Foundation:: HANDLE, partitioninformationclass : PARTITION_INFORMATION_CLASS, partitioninformation : *mut core::ffi::c_void, partitioninformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtManagePartition(targethandle.param().abi(), sourcehandle.param().abi(), core::mem::transmute(partitioninformationclass), core::mem::transmute(partitioninformation), core::mem::transmute(partitioninformationlength)) + NtManagePartition(core::mem::transmute(targethandle), core::mem::transmute(sourcehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(partitioninformationclass), core::mem::transmute(partitioninformation), core::mem::transmute(partitioninformationlength)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtOpenEnlistment(enlistmenthandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, resourcemanagerhandle: P2, enlistmentguid: *const windows_core::GUID, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(enlistmenthandle), core::mem::transmute(desiredaccess), resourcemanagerhandle.param().abi(), core::mem::transmute(enlistmentguid), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null()))) + NtOpenEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(desiredaccess), core::mem::transmute(resourcemanagerhandle), core::mem::transmute(enlistmentguid), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtOpenResourceManager(resourcemanagerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, tmhandle: P2, resourcemanagerguid: Option<*const windows_core::GUID>, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn NtOpenResourceManager(resourcemanagerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, tmhandle: super::super::super::Win32::Foundation::HANDLE, resourcemanagerguid: Option<*const windows_core::GUID>, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(desiredaccess), tmhandle.param().abi(), core::mem::transmute(resourcemanagerguid.unwrap_or(core::ptr::null())), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null()))) + NtOpenResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(tmhandle), core::mem::transmute(resourcemanagerguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtOpenTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, uow: *const windows_core::GUID, tmhandle: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn NtOpenTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, uow: *const windows_core::GUID, tmhandle: Option) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenTransaction(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); - NtOpenTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(uow), tmhandle.param().abi()) + NtOpenTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(uow), core::mem::transmute(tmhandle.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +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: Option) -> 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(core::mem::transmute(tmhandle), core::mem::transmute(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())), core::mem::transmute(openoptions)) + NtOpenTransactionManager(core::mem::transmute(tmhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(logfilename.unwrap_or(core::mem::zeroed())), core::mem::transmute(tmidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(openoptions.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(informationlevel), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength)) + NtPowerInformation(core::mem::transmute(informationlevel), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength)) } #[inline] -pub unsafe fn NtPrePrepareComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtPrePrepareComplete(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtPrePrepareComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtPrePrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtPrePrepareEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtPrePrepareEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtPrepareComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtPrepareComplete(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtPrepareComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtPrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtPrepareEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtPrepareEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtPropagationComplete(resourcemanagerhandle: P0, requestcookie: u32, bufferlength: u32, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtPropagationComplete(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE, requestcookie: u32, bufferlength: u32, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtPropagationComplete(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, requestcookie : u32, bufferlength : u32, buffer : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPropagationComplete(resourcemanagerhandle.param().abi(), core::mem::transmute(requestcookie), core::mem::transmute(bufferlength), core::mem::transmute(buffer)) + NtPropagationComplete(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(requestcookie), core::mem::transmute(bufferlength), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn NtPropagationFailed(resourcemanagerhandle: P0, requestcookie: u32, propstatus: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn NtPropagationFailed(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE, requestcookie: u32, propstatus: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtPropagationFailed(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, requestcookie : u32, propstatus : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPropagationFailed(resourcemanagerhandle.param().abi(), core::mem::transmute(requestcookie), propstatus.param().abi()) + NtPropagationFailed(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(requestcookie), core::mem::transmute(propstatus)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtQueryInformationEnlistment(enlistmenthandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryInformationEnlistment(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 { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationEnlistment(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); - NtQueryInformationEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentinformationclass), core::mem::transmute(enlistmentinformation), core::mem::transmute(enlistmentinformationlength), core::mem::transmute(returnlength)) + NtQueryInformationEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(enlistmentinformationclass), core::mem::transmute(enlistmentinformation), core::mem::transmute(enlistmentinformationlength), core::mem::transmute(returnlength)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtQueryInformationResourceManager(resourcemanagerhandle: P0, resourcemanagerinformationclass: super::super::super::Win32::System::SystemServices::RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation: *mut core::ffi::c_void, resourcemanagerinformationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(resourcemanagerinformationclass), core::mem::transmute(resourcemanagerinformation), core::mem::transmute(resourcemanagerinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + NtQueryInformationResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(resourcemanagerinformationclass), core::mem::transmute(resourcemanagerinformation), core::mem::transmute(resourcemanagerinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtQueryInformationTransaction(transactionhandle: P0, transactioninformationclass: super::super::super::Win32::System::SystemServices::TRANSACTION_INFORMATION_CLASS, transactioninformation: *mut core::ffi::c_void, transactioninformationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(transactioninformationclass), core::mem::transmute(transactioninformation), core::mem::transmute(transactioninformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + NtQueryInformationTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(transactioninformationclass), core::mem::transmute(transactioninformation), core::mem::transmute(transactioninformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtQueryInformationTransactionManager(transactionmanagerhandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryInformationTransactionManager(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 { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationTransactionManager(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); - NtQueryInformationTransactionManager(transactionmanagerhandle.param().abi(), core::mem::transmute(transactionmanagerinformationclass), core::mem::transmute(transactionmanagerinformation), core::mem::transmute(transactionmanagerinformationlength), core::mem::transmute(returnlength)) + NtQueryInformationTransactionManager(core::mem::transmute(transactionmanagerhandle), core::mem::transmute(transactionmanagerinformationclass), core::mem::transmute(transactionmanagerinformation), core::mem::transmute(transactionmanagerinformationlength), core::mem::transmute(returnlength)) } #[inline] -pub unsafe fn NtReadOnlyEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtReadOnlyEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtReadOnlyEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtRecoverEnlistment(enlistmenthandle: P0, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRecoverEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtRecoverEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtRecoverResourceManager(resourcemanagerhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRecoverResourceManager(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtRecoverResourceManager(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRecoverResourceManager(resourcemanagerhandle.param().abi()) + NtRecoverResourceManager(core::mem::transmute(resourcemanagerhandle)) } #[inline] -pub unsafe fn NtRecoverTransactionManager(transactionmanagerhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRecoverTransactionManager(transactionmanagerhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtRecoverTransactionManager(transactionmanagerhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRecoverTransactionManager(transactionmanagerhandle.param().abi()) + NtRecoverTransactionManager(core::mem::transmute(transactionmanagerhandle)) } #[inline] -pub unsafe fn NtRegisterProtocolAddressInformation(resourcemanager: P0, protocolid: *const windows_core::GUID, protocolinformationsize: u32, protocolinformation: *const core::ffi::c_void, createoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRegisterProtocolAddressInformation(resourcemanager: super::super::super::Win32::Foundation::HANDLE, protocolid: *const windows_core::GUID, protocolinformationsize: u32, protocolinformation: *const core::ffi::c_void, createoptions: Option) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtRegisterProtocolAddressInformation(resourcemanager : super::super::super::Win32::Foundation:: HANDLE, protocolid : *const windows_core::GUID, protocolinformationsize : u32, protocolinformation : *const core::ffi::c_void, createoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRegisterProtocolAddressInformation(resourcemanager.param().abi(), core::mem::transmute(protocolid), core::mem::transmute(protocolinformationsize), core::mem::transmute(protocolinformation), core::mem::transmute(createoptions)) + NtRegisterProtocolAddressInformation(core::mem::transmute(resourcemanager), core::mem::transmute(protocolid), core::mem::transmute(protocolinformationsize), core::mem::transmute(protocolinformation), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NtRenameTransactionManager(logfilename: *const super::super::super::Win32::Foundation::UNICODE_STRING, existingtransactionmanagerguid: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4491,81 +4259,56 @@ pub unsafe fn NtRenameTransactionManager(logfilename: *const super::super::super NtRenameTransactionManager(core::mem::transmute(logfilename), core::mem::transmute(existingtransactionmanagerguid)) } #[inline] -pub unsafe fn NtRollbackComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRollbackComplete(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtRollbackComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtRollbackEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRollbackEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtRollbackEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtRollbackTransaction(transactionhandle: P0, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtRollbackTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtRollbackTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRollbackTransaction(transactionhandle.param().abi(), wait.param().abi()) + NtRollbackTransaction(core::mem::transmute(transactionhandle), wait.param().abi()) } #[inline] -pub unsafe fn NtRollforwardTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtRollforwardTransactionManager(transactionmanagerhandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtRollforwardTransactionManager(core::mem::transmute(transactionmanagerhandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtSetInformationEnlistment(enlistmenthandle: P0, enlistmentinformationclass: super::super::super::Win32::System::SystemServices::ENLISTMENT_INFORMATION_CLASS, enlistmentinformation: *const core::ffi::c_void, enlistmentinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationEnlistment(enlistmenthandle: Option, enlistmentinformationclass: super::super::super::Win32::System::SystemServices::ENLISTMENT_INFORMATION_CLASS, enlistmentinformation: *const core::ffi::c_void, enlistmentinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, enlistmentinformationclass : super::super::super::Win32::System::SystemServices:: ENLISTMENT_INFORMATION_CLASS, enlistmentinformation : *const core::ffi::c_void, enlistmentinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentinformationclass), core::mem::transmute(enlistmentinformation), core::mem::transmute(enlistmentinformationlength)) + NtSetInformationEnlistment(core::mem::transmute(enlistmenthandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(enlistmentinformationclass), core::mem::transmute(enlistmentinformation), core::mem::transmute(enlistmentinformationlength)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtSetInformationResourceManager(resourcemanagerhandle: P0, resourcemanagerinformationclass: super::super::super::Win32::System::SystemServices::RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation: *const core::ffi::c_void, resourcemanagerinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationResourceManager(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE, resourcemanagerinformationclass: super::super::super::Win32::System::SystemServices::RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation: *const core::ffi::c_void, resourcemanagerinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationResourceManager(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, resourcemanagerinformationclass : super::super::super::Win32::System::SystemServices:: RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation : *const core::ffi::c_void, resourcemanagerinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationResourceManager(resourcemanagerhandle.param().abi(), core::mem::transmute(resourcemanagerinformationclass), core::mem::transmute(resourcemanagerinformation), core::mem::transmute(resourcemanagerinformationlength)) + NtSetInformationResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(resourcemanagerinformationclass), core::mem::transmute(resourcemanagerinformation), core::mem::transmute(resourcemanagerinformationlength)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtSetInformationTransaction(transactionhandle: P0, transactioninformationclass: super::super::super::Win32::System::SystemServices::TRANSACTION_INFORMATION_CLASS, transactioninformation: *const core::ffi::c_void, transactioninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, transactioninformationclass: super::super::super::Win32::System::SystemServices::TRANSACTION_INFORMATION_CLASS, transactioninformation: *const core::ffi::c_void, transactioninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, transactioninformationclass : super::super::super::Win32::System::SystemServices:: TRANSACTION_INFORMATION_CLASS, transactioninformation : *const core::ffi::c_void, transactioninformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationTransaction(transactionhandle.param().abi(), core::mem::transmute(transactioninformationclass), core::mem::transmute(transactioninformation), core::mem::transmute(transactioninformationlength)) + NtSetInformationTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(transactioninformationclass), core::mem::transmute(transactioninformation), core::mem::transmute(transactioninformationlength)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn NtSetInformationTransactionManager(tmhandle: P0, transactionmanagerinformationclass: super::super::super::Win32::System::SystemServices::TRANSACTIONMANAGER_INFORMATION_CLASS, transactionmanagerinformation: *const core::ffi::c_void, transactionmanagerinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationTransactionManager(tmhandle: Option, transactionmanagerinformationclass: super::super::super::Win32::System::SystemServices::TRANSACTIONMANAGER_INFORMATION_CLASS, transactionmanagerinformation: *const core::ffi::c_void, transactionmanagerinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationTransactionManager(tmhandle : super::super::super::Win32::Foundation:: HANDLE, transactionmanagerinformationclass : super::super::super::Win32::System::SystemServices:: TRANSACTIONMANAGER_INFORMATION_CLASS, transactionmanagerinformation : *const core::ffi::c_void, transactionmanagerinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationTransactionManager(tmhandle.param().abi(), core::mem::transmute(transactionmanagerinformationclass), core::mem::transmute(transactionmanagerinformation), core::mem::transmute(transactionmanagerinformationlength)) + NtSetInformationTransactionManager(core::mem::transmute(tmhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(transactionmanagerinformationclass), core::mem::transmute(transactionmanagerinformation), core::mem::transmute(transactionmanagerinformationlength)) } #[inline] -pub unsafe fn NtSinglePhaseReject(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSinglePhaseReject(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + NtSinglePhaseReject(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NtUnloadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4573,12 +4316,9 @@ pub unsafe fn NtUnloadDriver(driverservicename: *const super::super::super::Win3 NtUnloadDriver(core::mem::transmute(driverservicename)) } #[inline] -pub unsafe fn ObCloseHandle(handle: P0, previousmode: i8) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ObCloseHandle(handle: super::super::super::Win32::Foundation::HANDLE, previousmode: i8) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObCloseHandle(handle : super::super::super::Win32::Foundation:: HANDLE, previousmode : i8) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObCloseHandle(handle.param().abi(), core::mem::transmute(previousmode)) + ObCloseHandle(core::mem::transmute(handle), core::mem::transmute(previousmode)) } #[inline] pub unsafe fn ObDereferenceObjectDeferDelete(object: *const core::ffi::c_void) { @@ -4603,41 +4343,27 @@ pub unsafe fn ObGetObjectSecurity(object: *const core::ffi::c_void, securitydesc } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ObReferenceObjectByHandle(handle: P0, desiredaccess: u32, objecttype: P2, accessmode: i8, object: *mut *mut core::ffi::c_void, handleinformation: Option<*mut OBJECT_HANDLE_INFORMATION>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ObReferenceObjectByHandle(handle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objecttype: Option, accessmode: i8, object: *mut *mut core::ffi::c_void, handleinformation: Option<*mut OBJECT_HANDLE_INFORMATION>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(desiredaccess), objecttype.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(object), core::mem::transmute(handleinformation.unwrap_or(core::ptr::null_mut()))) + ObReferenceObjectByHandle(core::mem::transmute(handle), core::mem::transmute(desiredaccess), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(accessmode), core::mem::transmute(object), core::mem::transmute(handleinformation.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ObReferenceObjectByHandleWithTag(handle: P0, desiredaccess: u32, objecttype: P2, accessmode: i8, tag: u32, object: *mut *mut core::ffi::c_void, handleinformation: Option<*mut OBJECT_HANDLE_INFORMATION>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ObReferenceObjectByHandleWithTag(handle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objecttype: Option, accessmode: i8, tag: u32, object: *mut *mut core::ffi::c_void, handleinformation: Option<*mut OBJECT_HANDLE_INFORMATION>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(desiredaccess), objecttype.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(tag), core::mem::transmute(object), core::mem::transmute(handleinformation.unwrap_or(core::ptr::null_mut()))) + ObReferenceObjectByHandleWithTag(core::mem::transmute(handle), core::mem::transmute(desiredaccess), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(accessmode), core::mem::transmute(tag), core::mem::transmute(object), core::mem::transmute(handleinformation.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ObReferenceObjectByPointer(object: *const core::ffi::c_void, desiredaccess: u32, objecttype: P2, accessmode: i8) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn ObReferenceObjectByPointer(object: *const core::ffi::c_void, desiredaccess: u32, objecttype: Option, accessmode: i8) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObReferenceObjectByPointer(object : *const core::ffi::c_void, desiredaccess : u32, objecttype : super::super::Foundation:: POBJECT_TYPE, accessmode : i8) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObReferenceObjectByPointer(core::mem::transmute(object), core::mem::transmute(desiredaccess), objecttype.param().abi(), core::mem::transmute(accessmode)) + ObReferenceObjectByPointer(core::mem::transmute(object), core::mem::transmute(desiredaccess), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(accessmode)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ObReferenceObjectByPointerWithTag(object: *const core::ffi::c_void, desiredaccess: u32, objecttype: P2, accessmode: i8, tag: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn ObReferenceObjectByPointerWithTag(object: *const core::ffi::c_void, desiredaccess: u32, objecttype: Option, accessmode: i8, tag: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObReferenceObjectByPointerWithTag(object : *const core::ffi::c_void, desiredaccess : u32, objecttype : super::super::Foundation:: POBJECT_TYPE, accessmode : i8, tag : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObReferenceObjectByPointerWithTag(core::mem::transmute(object), core::mem::transmute(desiredaccess), objecttype.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(tag)) + ObReferenceObjectByPointerWithTag(core::mem::transmute(object), core::mem::transmute(desiredaccess), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(accessmode), core::mem::transmute(tag)) } #[inline] pub unsafe fn ObReferenceObjectSafe(object: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -4657,13 +4383,12 @@ pub unsafe fn ObRegisterCallbacks(callbackregistration: *const OB_CALLBACK_REGIS } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ObReleaseObjectSecurity(securitydescriptor: P0, memoryallocated: P1) +pub unsafe fn ObReleaseObjectSecurity(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, memoryallocated: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ObReleaseObjectSecurity(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, memoryallocated : super::super::super::Win32::Foundation:: BOOLEAN)); - ObReleaseObjectSecurity(securitydescriptor.param().abi(), memoryallocated.param().abi()) + ObReleaseObjectSecurity(core::mem::transmute(securitydescriptor), memoryallocated.param().abi()) } #[inline] pub unsafe fn ObUnRegisterCallbacks(registrationhandle: *const core::ffi::c_void) { @@ -4692,30 +4417,21 @@ pub unsafe fn ObfReferenceObjectWithTag(object: *const core::ffi::c_void, tag: u } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PcwAddInstance(buffer: P0, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, id: u32, data: &[PCW_DATA]) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PcwAddInstance(buffer: super::super::Foundation::PPCW_BUFFER, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, id: u32, data: &[PCW_DATA]) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PcwAddInstance(buffer : super::super::Foundation:: PPCW_BUFFER, name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, id : u32, count : u32, data : *const PCW_DATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - PcwAddInstance(buffer.param().abi(), core::mem::transmute(name), core::mem::transmute(id), data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr())) + PcwAddInstance(core::mem::transmute(buffer), core::mem::transmute(name), core::mem::transmute(id), data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr())) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PcwCloseInstance(instance: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PcwCloseInstance(instance: super::super::Foundation::PPCW_INSTANCE) { windows_targets::link!("ntoskrnl.exe" "system" fn PcwCloseInstance(instance : super::super::Foundation:: PPCW_INSTANCE)); - PcwCloseInstance(instance.param().abi()) + PcwCloseInstance(core::mem::transmute(instance)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PcwCreateInstance(instance: *mut super::super::Foundation::PPCW_INSTANCE, registration: P1, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, data: &[PCW_DATA]) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn PcwCreateInstance(instance: *mut super::super::Foundation::PPCW_INSTANCE, registration: super::super::Foundation::PPCW_REGISTRATION, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, data: &[PCW_DATA]) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PcwCreateInstance(instance : *mut super::super::Foundation:: PPCW_INSTANCE, registration : super::super::Foundation:: PPCW_REGISTRATION, name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, count : u32, data : *const PCW_DATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - PcwCreateInstance(core::mem::transmute(instance), registration.param().abi(), core::mem::transmute(name), data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr())) + PcwCreateInstance(core::mem::transmute(instance), core::mem::transmute(registration), core::mem::transmute(name), data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr())) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4725,12 +4441,9 @@ pub unsafe fn PcwRegister(registration: *mut super::super::Foundation::PPCW_REGI } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PcwUnregister(registration: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PcwUnregister(registration: super::super::Foundation::PPCW_REGISTRATION) { windows_targets::link!("ntoskrnl.exe" "system" fn PcwUnregister(registration : super::super::Foundation:: PPCW_REGISTRATION)); - PcwUnregister(registration.param().abi()) + PcwUnregister(core::mem::transmute(registration)) } #[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] @@ -4748,7 +4461,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(core::mem::transmute(powerrequest), core::mem::transmute(deviceobject), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + PoCreatePowerRequest(core::mem::transmute(powerrequest), core::mem::transmute(deviceobject), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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] @@ -4773,75 +4486,51 @@ pub unsafe fn PoEndDeviceBusy(idlepointer: *mut u32) { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxActivateComponent(handle: P0, component: u32, flags: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxActivateComponent(handle: super::super::Foundation::POHANDLE, component: u32, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxActivateComponent(handle : super::super::Foundation:: POHANDLE, component : u32, flags : u32)); - PoFxActivateComponent(handle.param().abi(), core::mem::transmute(component), core::mem::transmute(flags)) + PoFxActivateComponent(core::mem::transmute(handle), core::mem::transmute(component), core::mem::transmute(flags)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxCompleteDevicePowerNotRequired(handle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxCompleteDevicePowerNotRequired(handle: super::super::Foundation::POHANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxCompleteDevicePowerNotRequired(handle : super::super::Foundation:: POHANDLE)); - PoFxCompleteDevicePowerNotRequired(handle.param().abi()) + PoFxCompleteDevicePowerNotRequired(core::mem::transmute(handle)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxCompleteDirectedPowerDown(handle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxCompleteDirectedPowerDown(handle: super::super::Foundation::POHANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxCompleteDirectedPowerDown(handle : super::super::Foundation:: POHANDLE)); - PoFxCompleteDirectedPowerDown(handle.param().abi()) + PoFxCompleteDirectedPowerDown(core::mem::transmute(handle)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxCompleteIdleCondition(handle: P0, component: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxCompleteIdleCondition(handle: super::super::Foundation::POHANDLE, component: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxCompleteIdleCondition(handle : super::super::Foundation:: POHANDLE, component : u32)); - PoFxCompleteIdleCondition(handle.param().abi(), core::mem::transmute(component)) + PoFxCompleteIdleCondition(core::mem::transmute(handle), core::mem::transmute(component)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxCompleteIdleState(handle: P0, component: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxCompleteIdleState(handle: super::super::Foundation::POHANDLE, component: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxCompleteIdleState(handle : super::super::Foundation:: POHANDLE, component : u32)); - PoFxCompleteIdleState(handle.param().abi(), core::mem::transmute(component)) + PoFxCompleteIdleState(core::mem::transmute(handle), core::mem::transmute(component)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxIdleComponent(handle: P0, component: u32, flags: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxIdleComponent(handle: super::super::Foundation::POHANDLE, component: u32, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxIdleComponent(handle : super::super::Foundation:: POHANDLE, component : u32, flags : u32)); - PoFxIdleComponent(handle.param().abi(), core::mem::transmute(component), core::mem::transmute(flags)) + PoFxIdleComponent(core::mem::transmute(handle), core::mem::transmute(component), core::mem::transmute(flags)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxIssueComponentPerfStateChange(handle: P0, flags: u32, component: u32, perfchange: *const PO_FX_PERF_STATE_CHANGE, context: *const core::ffi::c_void) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxIssueComponentPerfStateChange(handle: super::super::Foundation::POHANDLE, flags: u32, component: u32, perfchange: *const PO_FX_PERF_STATE_CHANGE, context: *const core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxIssueComponentPerfStateChange(handle : super::super::Foundation:: POHANDLE, flags : u32, component : u32, perfchange : *const PO_FX_PERF_STATE_CHANGE, context : *const core::ffi::c_void)); - PoFxIssueComponentPerfStateChange(handle.param().abi(), core::mem::transmute(flags), core::mem::transmute(component), core::mem::transmute(perfchange), core::mem::transmute(context)) + PoFxIssueComponentPerfStateChange(core::mem::transmute(handle), core::mem::transmute(flags), core::mem::transmute(component), core::mem::transmute(perfchange), core::mem::transmute(context)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxIssueComponentPerfStateChangeMultiple(handle: P0, flags: u32, component: u32, perfchangescount: u32, perfchanges: *const PO_FX_PERF_STATE_CHANGE, context: *const core::ffi::c_void) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxIssueComponentPerfStateChangeMultiple(handle: super::super::Foundation::POHANDLE, flags: u32, component: u32, perfchangescount: u32, perfchanges: *const PO_FX_PERF_STATE_CHANGE, context: *const core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxIssueComponentPerfStateChangeMultiple(handle : super::super::Foundation:: POHANDLE, flags : u32, component : u32, perfchangescount : u32, perfchanges : *const PO_FX_PERF_STATE_CHANGE, context : *const core::ffi::c_void)); - PoFxIssueComponentPerfStateChangeMultiple(handle.param().abi(), core::mem::transmute(flags), core::mem::transmute(component), core::mem::transmute(perfchangescount), core::mem::transmute(perfchanges), core::mem::transmute(context)) + PoFxIssueComponentPerfStateChangeMultiple(core::mem::transmute(handle), core::mem::transmute(flags), core::mem::transmute(component), core::mem::transmute(perfchangescount), core::mem::transmute(perfchanges), core::mem::transmute(context)) } #[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] @@ -4851,48 +4540,33 @@ pub unsafe fn PoFxNotifySurprisePowerOn(pdo: *const super::super::Foundation::DE } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxPowerControl(handle: P0, powercontrolcode: *const windows_core::GUID, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: usize, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: usize, bytesreturned: Option<*mut usize>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxPowerControl(handle: super::super::Foundation::POHANDLE, powercontrolcode: *const windows_core::GUID, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: usize, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: usize, bytesreturned: Option<*mut usize>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(powercontrolcode), core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outbuffersize), core::mem::transmute(bytesreturned.unwrap_or(core::ptr::null_mut()))) + PoFxPowerControl(core::mem::transmute(handle), core::mem::transmute(powercontrolcode), core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outbuffersize), core::mem::transmute(bytesreturned.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxPowerOnCrashdumpDevice(handle: P0, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxPowerOnCrashdumpDevice(handle: super::super::Foundation::POHANDLE, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + PoFxPowerOnCrashdumpDevice(core::mem::transmute(handle), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxQueryCurrentComponentPerfState(handle: P0, flags: u32, component: u32, setindex: u32, currentperf: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxQueryCurrentComponentPerfState(handle: super::super::Foundation::POHANDLE, flags: u32, component: u32, setindex: u32, currentperf: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxQueryCurrentComponentPerfState(handle : super::super::Foundation:: POHANDLE, flags : u32, component : u32, setindex : u32, currentperf : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoFxQueryCurrentComponentPerfState(handle.param().abi(), core::mem::transmute(flags), core::mem::transmute(component), core::mem::transmute(setindex), core::mem::transmute(currentperf)) + PoFxQueryCurrentComponentPerfState(core::mem::transmute(handle), core::mem::transmute(flags), core::mem::transmute(component), core::mem::transmute(setindex), core::mem::transmute(currentperf)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxRegisterComponentPerfStates(handle: P0, component: u32, flags: u64, componentperfstatecallback: PPO_FX_COMPONENT_PERF_STATE_CALLBACK, inputstateinfo: *const PO_FX_COMPONENT_PERF_INFO, outputstateinfo: *mut *mut PO_FX_COMPONENT_PERF_INFO) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxRegisterComponentPerfStates(handle: super::super::Foundation::POHANDLE, component: u32, flags: u64, componentperfstatecallback: PPO_FX_COMPONENT_PERF_STATE_CALLBACK, inputstateinfo: *const PO_FX_COMPONENT_PERF_INFO, outputstateinfo: *mut *mut PO_FX_COMPONENT_PERF_INFO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxRegisterComponentPerfStates(handle : super::super::Foundation:: POHANDLE, component : u32, flags : u64, componentperfstatecallback : PPO_FX_COMPONENT_PERF_STATE_CALLBACK, inputstateinfo : *const PO_FX_COMPONENT_PERF_INFO, outputstateinfo : *mut *mut PO_FX_COMPONENT_PERF_INFO) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoFxRegisterComponentPerfStates(handle.param().abi(), core::mem::transmute(component), core::mem::transmute(flags), core::mem::transmute(componentperfstatecallback), core::mem::transmute(inputstateinfo), core::mem::transmute(outputstateinfo)) + PoFxRegisterComponentPerfStates(core::mem::transmute(handle), core::mem::transmute(component), core::mem::transmute(flags), core::mem::transmute(componentperfstatecallback), core::mem::transmute(inputstateinfo), core::mem::transmute(outputstateinfo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxRegisterCrashdumpDevice(handle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxRegisterCrashdumpDevice(handle: super::super::Foundation::POHANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxRegisterCrashdumpDevice(handle : super::super::Foundation:: POHANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoFxRegisterCrashdumpDevice(handle.param().abi()) + PoFxRegisterCrashdumpDevice(core::mem::transmute(handle)) } #[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] @@ -4902,86 +4576,63 @@ pub unsafe fn PoFxRegisterDevice(pdo: *const super::super::Foundation::DEVICE_OB } #[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 PoFxRegisterDripsWatchdogCallback(handle: P0, callback: PPO_FX_DRIPS_WATCHDOG_CALLBACK, includechilddevices: P2, matchingdriverobject: Option<*const super::super::Foundation::DRIVER_OBJECT>) +pub unsafe fn PoFxRegisterDripsWatchdogCallback(handle: super::super::Foundation::POHANDLE, callback: PPO_FX_DRIPS_WATCHDOG_CALLBACK, includechilddevices: P2, matchingdriverobject: Option<*const super::super::Foundation::DRIVER_OBJECT>) where - P0: windows_core::Param, P2: 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(), core::mem::transmute(callback), includechilddevices.param().abi(), core::mem::transmute(matchingdriverobject.unwrap_or(core::ptr::null()))) + PoFxRegisterDripsWatchdogCallback(core::mem::transmute(handle), core::mem::transmute(callback), includechilddevices.param().abi(), core::mem::transmute(matchingdriverobject.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxReportDevicePoweredOn(handle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxReportDevicePoweredOn(handle: super::super::Foundation::POHANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxReportDevicePoweredOn(handle : super::super::Foundation:: POHANDLE)); - PoFxReportDevicePoweredOn(handle.param().abi()) + PoFxReportDevicePoweredOn(core::mem::transmute(handle)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxSetComponentLatency(handle: P0, component: u32, latency: u64) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxSetComponentLatency(handle: super::super::Foundation::POHANDLE, component: u32, latency: u64) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxSetComponentLatency(handle : super::super::Foundation:: POHANDLE, component : u32, latency : u64)); - PoFxSetComponentLatency(handle.param().abi(), core::mem::transmute(component), core::mem::transmute(latency)) + PoFxSetComponentLatency(core::mem::transmute(handle), core::mem::transmute(component), core::mem::transmute(latency)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxSetComponentResidency(handle: P0, component: u32, residency: u64) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxSetComponentResidency(handle: super::super::Foundation::POHANDLE, component: u32, residency: u64) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxSetComponentResidency(handle : super::super::Foundation:: POHANDLE, component : u32, residency : u64)); - PoFxSetComponentResidency(handle.param().abi(), core::mem::transmute(component), core::mem::transmute(residency)) + PoFxSetComponentResidency(core::mem::transmute(handle), core::mem::transmute(component), core::mem::transmute(residency)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxSetComponentWake(handle: P0, component: u32, wakehint: P2) +pub unsafe fn PoFxSetComponentWake(handle: super::super::Foundation::POHANDLE, component: u32, wakehint: P2) where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxSetComponentWake(handle : super::super::Foundation:: POHANDLE, component : u32, wakehint : super::super::super::Win32::Foundation:: BOOLEAN)); - PoFxSetComponentWake(handle.param().abi(), core::mem::transmute(component), wakehint.param().abi()) + PoFxSetComponentWake(core::mem::transmute(handle), core::mem::transmute(component), wakehint.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxSetDeviceIdleTimeout(handle: P0, idletimeout: u64) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxSetDeviceIdleTimeout(handle: super::super::Foundation::POHANDLE, idletimeout: u64) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxSetDeviceIdleTimeout(handle : super::super::Foundation:: POHANDLE, idletimeout : u64)); - PoFxSetDeviceIdleTimeout(handle.param().abi(), core::mem::transmute(idletimeout)) + PoFxSetDeviceIdleTimeout(core::mem::transmute(handle), core::mem::transmute(idletimeout)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn PoFxSetTargetDripsDevicePowerState(handle: P0, targetstate: super::super::super::Win32::System::Power::DEVICE_POWER_STATE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxSetTargetDripsDevicePowerState(handle: super::super::Foundation::POHANDLE, targetstate: super::super::super::Win32::System::Power::DEVICE_POWER_STATE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxSetTargetDripsDevicePowerState(handle : super::super::Foundation:: POHANDLE, targetstate : super::super::super::Win32::System::Power:: DEVICE_POWER_STATE) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoFxSetTargetDripsDevicePowerState(handle.param().abi(), core::mem::transmute(targetstate)) + PoFxSetTargetDripsDevicePowerState(core::mem::transmute(handle), core::mem::transmute(targetstate)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxStartDevicePowerManagement(handle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxStartDevicePowerManagement(handle: super::super::Foundation::POHANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxStartDevicePowerManagement(handle : super::super::Foundation:: POHANDLE)); - PoFxStartDevicePowerManagement(handle.param().abi()) + PoFxStartDevicePowerManagement(core::mem::transmute(handle)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxUnregisterDevice(handle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PoFxUnregisterDevice(handle: super::super::Foundation::POHANDLE) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxUnregisterDevice(handle : super::super::Foundation:: POHANDLE)); - PoFxUnregisterDevice(handle.param().abi()) + PoFxUnregisterDevice(core::mem::transmute(handle)) } #[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] @@ -5010,18 +4661,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(core::ptr::null())), core::mem::transmute(settingguid), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut()))) + PoRegisterPowerSettingCallback(core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(settingguid), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(flags)) + PoRegisterSystemState(core::mem::transmute(statehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 { +pub unsafe fn PoRequestPowerIrp(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, minorfunction: u8, powerstate: POWER_STATE, completionfunction: Option, 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(core::mem::transmute(deviceobject), core::mem::transmute(minorfunction), core::mem::transmute(powerstate), core::mem::transmute(completionfunction), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(irp.unwrap_or(core::ptr::null_mut()))) + PoRequestPowerIrp(core::mem::transmute(deviceobject), core::mem::transmute(minorfunction), core::mem::transmute(powerstate), core::mem::transmute(completionfunction.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PoSetDeviceBusyEx(idlepointer: *mut u32) { @@ -5031,7 +4682,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(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(address), core::mem::transmute(length), core::mem::transmute(tag)) + PoSetHiberRange(core::mem::transmute(memorymap.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(address), core::mem::transmute(length), core::mem::transmute(tag)) } #[cfg(feature = "Win32_System_Power")] #[inline] @@ -5108,12 +4759,9 @@ pub unsafe fn ProbeForWrite(address: *mut core::ffi::c_void, length: usize, alig } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsAcquireSiloHardReference(silo: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsAcquireSiloHardReference(silo: super::super::Foundation::PESILO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsAcquireSiloHardReference(silo : super::super::Foundation:: PESILO) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsAcquireSiloHardReference(silo.param().abi()) + PsAcquireSiloHardReference(core::mem::transmute(silo)) } #[inline] pub unsafe fn PsAllocSiloContextSlot(reserved: usize, returnedcontextslot: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5128,30 +4776,21 @@ pub unsafe fn PsAllocateAffinityToken(affinitytoken: *mut super::super::Foundati } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsAttachSiloToCurrentThread(silo: P0) -> super::super::Foundation::PESILO -where - P0: windows_core::Param, -{ +pub unsafe fn PsAttachSiloToCurrentThread(silo: super::super::Foundation::PESILO) -> super::super::Foundation::PESILO { windows_targets::link!("ntoskrnl.exe" "system" fn PsAttachSiloToCurrentThread(silo : super::super::Foundation:: PESILO) -> super::super::Foundation:: PESILO); - PsAttachSiloToCurrentThread(silo.param().abi()) + PsAttachSiloToCurrentThread(core::mem::transmute(silo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsCreateSiloContext(silo: P0, size: u32, pooltype: super::super::Foundation::POOL_TYPE, contextcleanupcallback: SILO_CONTEXT_CLEANUP_CALLBACK, returnedsilocontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsCreateSiloContext(silo: super::super::Foundation::PESILO, size: u32, pooltype: super::super::Foundation::POOL_TYPE, contextcleanupcallback: Option, returnedsilocontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsCreateSiloContext(silo : super::super::Foundation:: PESILO, size : u32, pooltype : super::super::Foundation:: POOL_TYPE, contextcleanupcallback : SILO_CONTEXT_CLEANUP_CALLBACK, returnedsilocontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsCreateSiloContext(silo.param().abi(), core::mem::transmute(size), core::mem::transmute(pooltype), core::mem::transmute(contextcleanupcallback), core::mem::transmute(returnedsilocontext)) + PsCreateSiloContext(core::mem::transmute(silo), core::mem::transmute(size), core::mem::transmute(pooltype), core::mem::transmute(contextcleanupcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnedsilocontext)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_WindowsProgramming"))] #[inline] -pub unsafe fn PsCreateSystemThread(threadhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, processhandle: P3, clientid: Option<*mut super::super::super::Win32::System::WindowsProgramming::CLIENT_ID>, startroutine: PKSTART_ROUTINE, startcontext: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn PsCreateSystemThread(threadhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, processhandle: Option, clientid: Option<*mut super::super::super::Win32::System::WindowsProgramming::CLIENT_ID>, startroutine: PKSTART_ROUTINE, startcontext: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), processhandle.param().abi(), core::mem::transmute(clientid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startroutine), core::mem::transmute(startcontext.unwrap_or(core::ptr::null()))) + PsCreateSystemThread(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(processhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientid.unwrap_or(core::mem::zeroed())), core::mem::transmute(startroutine), core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PsDereferenceSiloContext(silocontext: *const core::ffi::c_void) { @@ -5160,21 +4799,15 @@ pub unsafe fn PsDereferenceSiloContext(silocontext: *const core::ffi::c_void) { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsDetachSiloFromCurrentThread(previoussilo: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PsDetachSiloFromCurrentThread(previoussilo: super::super::Foundation::PESILO) { windows_targets::link!("ntoskrnl.exe" "system" fn PsDetachSiloFromCurrentThread(previoussilo : super::super::Foundation:: PESILO)); - PsDetachSiloFromCurrentThread(previoussilo.param().abi()) + PsDetachSiloFromCurrentThread(core::mem::transmute(previoussilo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsFreeAffinityToken(affinitytoken: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PsFreeAffinityToken(affinitytoken: super::super::Foundation::PAFFINITY_TOKEN) { windows_targets::link!("ntoskrnl.exe" "system" fn PsFreeAffinityToken(affinitytoken : super::super::Foundation:: PAFFINITY_TOKEN)); - PsFreeAffinityToken(affinitytoken.param().abi()) + PsFreeAffinityToken(core::mem::transmute(affinitytoken)) } #[inline] pub unsafe fn PsFreeSiloContextSlot(contextslot: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5215,12 +4848,9 @@ pub unsafe fn PsGetCurrentThreadTeb() -> *mut core::ffi::c_void { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetEffectiveServerSilo(silo: P0) -> super::super::Foundation::PESILO -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetEffectiveServerSilo(silo: super::super::Foundation::PESILO) -> super::super::Foundation::PESILO { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetEffectiveServerSilo(silo : super::super::Foundation:: PESILO) -> super::super::Foundation:: PESILO); - PsGetEffectiveServerSilo(silo.param().abi()) + PsGetEffectiveServerSilo(core::mem::transmute(silo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5230,188 +4860,128 @@ pub unsafe fn PsGetHostSilo() -> super::super::Foundation::PESILO { } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetJobServerSilo(job: P0, serversilo: *mut super::super::Foundation::PESILO) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetJobServerSilo(job: Option, serversilo: *mut super::super::Foundation::PESILO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetJobServerSilo(job : super::super::Foundation:: PEJOB, serversilo : *mut super::super::Foundation:: PESILO) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsGetJobServerSilo(job.param().abi(), core::mem::transmute(serversilo)) + PsGetJobServerSilo(core::mem::transmute(job.unwrap_or(core::mem::zeroed())), core::mem::transmute(serversilo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetJobSilo(job: P0, silo: *mut super::super::Foundation::PESILO) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetJobSilo(job: super::super::Foundation::PEJOB, silo: *mut super::super::Foundation::PESILO) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetJobSilo(job : super::super::Foundation:: PEJOB, silo : *mut super::super::Foundation:: PESILO) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsGetJobSilo(job.param().abi(), core::mem::transmute(silo)) + PsGetJobSilo(core::mem::transmute(job), core::mem::transmute(silo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetParentSilo(job: P0) -> super::super::Foundation::PESILO -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetParentSilo(job: Option) -> super::super::Foundation::PESILO { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetParentSilo(job : super::super::Foundation:: PEJOB) -> super::super::Foundation:: PESILO); - PsGetParentSilo(job.param().abi()) + PsGetParentSilo(core::mem::transmute(job.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetPermanentSiloContext(silo: P0, contextslot: u32, returnedsilocontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetPermanentSiloContext(silo: super::super::Foundation::PESILO, contextslot: u32, returnedsilocontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetPermanentSiloContext(silo : super::super::Foundation:: PESILO, contextslot : u32, returnedsilocontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsGetPermanentSiloContext(silo.param().abi(), core::mem::transmute(contextslot), core::mem::transmute(returnedsilocontext)) + PsGetPermanentSiloContext(core::mem::transmute(silo), core::mem::transmute(contextslot), core::mem::transmute(returnedsilocontext)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetProcessCreateTimeQuadPart(process: P0) -> i64 -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetProcessCreateTimeQuadPart(process: super::super::Foundation::PEPROCESS) -> i64 { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetProcessCreateTimeQuadPart(process : super::super::Foundation:: PEPROCESS) -> i64); - PsGetProcessCreateTimeQuadPart(process.param().abi()) + PsGetProcessCreateTimeQuadPart(core::mem::transmute(process)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetProcessExitStatus(process: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetProcessExitStatus(process: super::super::Foundation::PEPROCESS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetProcessExitStatus(process : super::super::Foundation:: PEPROCESS) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsGetProcessExitStatus(process.param().abi()) + PsGetProcessExitStatus(core::mem::transmute(process)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetProcessId(process: P0) -> super::super::super::Win32::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetProcessId(process: super::super::Foundation::PEPROCESS) -> super::super::super::Win32::Foundation::HANDLE { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetProcessId(process : super::super::Foundation:: PEPROCESS) -> super::super::super::Win32::Foundation:: HANDLE); - PsGetProcessId(process.param().abi()) + PsGetProcessId(core::mem::transmute(process)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetProcessStartKey(process: P0) -> u64 -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetProcessStartKey(process: super::super::Foundation::PEPROCESS) -> u64 { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetProcessStartKey(process : super::super::Foundation:: PEPROCESS) -> u64); - PsGetProcessStartKey(process.param().abi()) + PsGetProcessStartKey(core::mem::transmute(process)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetServerSiloServiceSessionId(silo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetServerSiloServiceSessionId(silo: super::super::Foundation::PESILO) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetServerSiloServiceSessionId(silo : super::super::Foundation:: PESILO) -> u32); - PsGetServerSiloServiceSessionId(silo.param().abi()) + PsGetServerSiloServiceSessionId(core::mem::transmute(silo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetSiloContainerId(silo: P0) -> *mut windows_core::GUID -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetSiloContainerId(silo: super::super::Foundation::PESILO) -> *mut windows_core::GUID { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetSiloContainerId(silo : super::super::Foundation:: PESILO) -> *mut windows_core::GUID); - PsGetSiloContainerId(silo.param().abi()) + PsGetSiloContainerId(core::mem::transmute(silo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetSiloContext(silo: P0, contextslot: u32, returnedsilocontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetSiloContext(silo: super::super::Foundation::PESILO, contextslot: u32, returnedsilocontext: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetSiloContext(silo : super::super::Foundation:: PESILO, contextslot : u32, returnedsilocontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsGetSiloContext(silo.param().abi(), core::mem::transmute(contextslot), core::mem::transmute(returnedsilocontext)) + PsGetSiloContext(core::mem::transmute(silo), core::mem::transmute(contextslot), core::mem::transmute(returnedsilocontext)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetSiloMonitorContextSlot(monitor: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetSiloMonitorContextSlot(monitor: super::super::Foundation::PSILO_MONITOR) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetSiloMonitorContextSlot(monitor : super::super::Foundation:: PSILO_MONITOR) -> u32); - PsGetSiloMonitorContextSlot(monitor.param().abi()) + PsGetSiloMonitorContextSlot(core::mem::transmute(monitor)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetThreadCreateTime(thread: P0) -> i64 -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetThreadCreateTime(thread: super::super::Foundation::PETHREAD) -> i64 { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetThreadCreateTime(thread : super::super::Foundation:: PETHREAD) -> i64); - PsGetThreadCreateTime(thread.param().abi()) + PsGetThreadCreateTime(core::mem::transmute(thread)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetThreadExitStatus(thread: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetThreadExitStatus(thread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetThreadExitStatus(thread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsGetThreadExitStatus(thread.param().abi()) + PsGetThreadExitStatus(core::mem::transmute(thread)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetThreadId(thread: P0) -> super::super::super::Win32::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetThreadId(thread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::HANDLE { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetThreadId(thread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: HANDLE); - PsGetThreadId(thread.param().abi()) + PsGetThreadId(core::mem::transmute(thread)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetThreadProcessId(thread: P0) -> super::super::super::Win32::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetThreadProcessId(thread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::HANDLE { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetThreadProcessId(thread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: HANDLE); - PsGetThreadProcessId(thread.param().abi()) + PsGetThreadProcessId(core::mem::transmute(thread)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetThreadProperty(thread: P0, key: usize, flags: u32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetThreadProperty(thread: super::super::Foundation::PETHREAD, key: usize, flags: u32) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetThreadProperty(thread : super::super::Foundation:: PETHREAD, key : usize, flags : u32) -> *mut core::ffi::c_void); - PsGetThreadProperty(thread.param().abi(), core::mem::transmute(key), core::mem::transmute(flags)) + PsGetThreadProperty(core::mem::transmute(thread), core::mem::transmute(key), core::mem::transmute(flags)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsGetThreadServerSilo(thread: P0) -> super::super::Foundation::PESILO -where - P0: windows_core::Param, -{ +pub unsafe fn PsGetThreadServerSilo(thread: super::super::Foundation::PETHREAD) -> super::super::Foundation::PESILO { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetThreadServerSilo(thread : super::super::Foundation:: PETHREAD) -> super::super::Foundation:: PESILO); - PsGetThreadServerSilo(thread.param().abi()) + PsGetThreadServerSilo(core::mem::transmute(thread)) } #[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(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()))) + PsGetVersion(core::mem::transmute(majorversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(minorversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(buildnumber.unwrap_or(core::mem::zeroed())), core::mem::transmute(csdversion.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsInsertPermanentSiloContext(silo: P0, contextslot: u32, silocontext: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsInsertPermanentSiloContext(silo: super::super::Foundation::PESILO, contextslot: u32, silocontext: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsInsertPermanentSiloContext(silo : super::super::Foundation:: PESILO, contextslot : u32, silocontext : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsInsertPermanentSiloContext(silo.param().abi(), core::mem::transmute(contextslot), core::mem::transmute(silocontext)) + PsInsertPermanentSiloContext(core::mem::transmute(silo), core::mem::transmute(contextslot), core::mem::transmute(silocontext)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsInsertSiloContext(silo: P0, contextslot: u32, silocontext: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsInsertSiloContext(silo: super::super::Foundation::PESILO, contextslot: u32, silocontext: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsInsertSiloContext(silo : super::super::Foundation:: PESILO, contextslot : u32, silocontext : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsInsertSiloContext(silo.param().abi(), core::mem::transmute(contextslot), core::mem::transmute(silocontext)) + PsInsertSiloContext(core::mem::transmute(silo), core::mem::transmute(contextslot), core::mem::transmute(silocontext)) } #[inline] pub unsafe fn PsIsCurrentThreadInServerSilo() -> super::super::super::Win32::Foundation::BOOLEAN { @@ -5425,30 +4995,21 @@ pub unsafe fn PsIsCurrentThreadPrefetching() -> super::super::super::Win32::Foun } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsIsHostSilo(silo: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn PsIsHostSilo(silo: super::super::Foundation::PESILO) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn PsIsHostSilo(silo : super::super::Foundation:: PESILO) -> super::super::super::Win32::Foundation:: BOOLEAN); - PsIsHostSilo(silo.param().abi()) + PsIsHostSilo(core::mem::transmute(silo)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsMakeSiloContextPermanent(silo: P0, contextslot: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsMakeSiloContextPermanent(silo: super::super::Foundation::PESILO, contextslot: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsMakeSiloContextPermanent(silo : super::super::Foundation:: PESILO, contextslot : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsMakeSiloContextPermanent(silo.param().abi(), core::mem::transmute(contextslot)) + PsMakeSiloContextPermanent(core::mem::transmute(silo), core::mem::transmute(contextslot)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsQueryTotalCycleTimeProcess(process: P0, cycletimestamp: *mut u64) -> u64 -where - P0: windows_core::Param, -{ +pub unsafe fn PsQueryTotalCycleTimeProcess(process: super::super::Foundation::PEPROCESS, cycletimestamp: *mut u64) -> u64 { windows_targets::link!("ntoskrnl.exe" "system" fn PsQueryTotalCycleTimeProcess(process : super::super::Foundation:: PEPROCESS, cycletimestamp : *mut u64) -> u64); - PsQueryTotalCycleTimeProcess(process.param().abi(), core::mem::transmute(cycletimestamp)) + PsQueryTotalCycleTimeProcess(core::mem::transmute(process), core::mem::transmute(cycletimestamp)) } #[inline] pub unsafe fn PsReferenceSiloContext(silocontext: *const core::ffi::c_void) { @@ -5463,12 +5024,9 @@ pub unsafe fn PsRegisterSiloMonitor(registration: *const SILO_MONITOR_REGISTRATI } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsReleaseSiloHardReference(silo: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PsReleaseSiloHardReference(silo: super::super::Foundation::PESILO) { windows_targets::link!("ntoskrnl.exe" "system" fn PsReleaseSiloHardReference(silo : super::super::Foundation:: PESILO)); - PsReleaseSiloHardReference(silo.param().abi()) + PsReleaseSiloHardReference(core::mem::transmute(silo)) } #[inline] pub unsafe fn PsRemoveCreateThreadNotifyRoutine(notifyroutine: PCREATE_THREAD_NOTIFY_ROUTINE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5482,30 +5040,21 @@ pub unsafe fn PsRemoveLoadImageNotifyRoutine(notifyroutine: PLOAD_IMAGE_NOTIFY_R } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsRemoveSiloContext(silo: P0, contextslot: u32, removedsilocontext: Option<*mut *mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsRemoveSiloContext(silo: super::super::Foundation::PESILO, contextslot: u32, removedsilocontext: Option<*mut *mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(contextslot), core::mem::transmute(removedsilocontext.unwrap_or(core::ptr::null_mut()))) + PsRemoveSiloContext(core::mem::transmute(silo), core::mem::transmute(contextslot), core::mem::transmute(removedsilocontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsReplaceSiloContext(silo: P0, contextslot: u32, newsilocontext: *const core::ffi::c_void, oldsilocontext: Option<*mut *mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsReplaceSiloContext(silo: super::super::Foundation::PESILO, contextslot: u32, newsilocontext: *const core::ffi::c_void, oldsilocontext: Option<*mut *mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(contextslot), core::mem::transmute(newsilocontext), core::mem::transmute(oldsilocontext.unwrap_or(core::ptr::null_mut()))) + PsReplaceSiloContext(core::mem::transmute(silo), core::mem::transmute(contextslot), core::mem::transmute(newsilocontext), core::mem::transmute(oldsilocontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsRevertToUserMultipleGroupAffinityThread(affinitytoken: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PsRevertToUserMultipleGroupAffinityThread(affinitytoken: super::super::Foundation::PAFFINITY_TOKEN) { windows_targets::link!("ntoskrnl.exe" "system" fn PsRevertToUserMultipleGroupAffinityThread(affinitytoken : super::super::Foundation:: PAFFINITY_TOKEN)); - PsRevertToUserMultipleGroupAffinityThread(affinitytoken.param().abi()) + PsRevertToUserMultipleGroupAffinityThread(core::mem::transmute(affinitytoken)) } #[inline] pub unsafe fn PsSetCreateProcessNotifyRoutine(notifyroutine: PCREATE_PROCESS_NOTIFY_ROUTINE, remove: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -5562,48 +5111,32 @@ pub unsafe fn PsSetLoadImageNotifyRoutineEx(notifyroutine: PLOAD_IMAGE_NOTIFY_RO } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn PsSetSystemMultipleGroupAffinityThread(groupaffinities: &[super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY], affinitytoken: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn PsSetSystemMultipleGroupAffinityThread(groupaffinities: &[super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY], affinitytoken: super::super::Foundation::PAFFINITY_TOKEN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsSetSystemMultipleGroupAffinityThread(groupaffinities : *const super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY, groupcount : u16, affinitytoken : super::super::Foundation:: PAFFINITY_TOKEN) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsSetSystemMultipleGroupAffinityThread(core::mem::transmute(groupaffinities.as_ptr()), groupaffinities.len().try_into().unwrap(), affinitytoken.param().abi()) + PsSetSystemMultipleGroupAffinityThread(core::mem::transmute(groupaffinities.as_ptr()), groupaffinities.len().try_into().unwrap(), core::mem::transmute(affinitytoken)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsStartSiloMonitor(monitor: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsStartSiloMonitor(monitor: super::super::Foundation::PSILO_MONITOR) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsStartSiloMonitor(monitor : super::super::Foundation:: PSILO_MONITOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsStartSiloMonitor(monitor.param().abi()) + PsStartSiloMonitor(core::mem::transmute(monitor)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsTerminateServerSilo(serversilo: P0, exitstatus: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PsTerminateServerSilo(serversilo: super::super::Foundation::PESILO, exitstatus: super::super::super::Win32::Foundation::NTSTATUS) { windows_targets::link!("ntoskrnl.exe" "system" fn PsTerminateServerSilo(serversilo : super::super::Foundation:: PESILO, exitstatus : super::super::super::Win32::Foundation:: NTSTATUS)); - PsTerminateServerSilo(serversilo.param().abi(), exitstatus.param().abi()) + PsTerminateServerSilo(core::mem::transmute(serversilo), core::mem::transmute(exitstatus)) } #[inline] -pub unsafe fn PsTerminateSystemThread(exitstatus: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn PsTerminateSystemThread(exitstatus: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsTerminateSystemThread(exitstatus : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsTerminateSystemThread(exitstatus.param().abi()) + PsTerminateSystemThread(core::mem::transmute(exitstatus)) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PsUnregisterSiloMonitor(monitor: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PsUnregisterSiloMonitor(monitor: super::super::Foundation::PSILO_MONITOR) { windows_targets::link!("ntoskrnl.exe" "system" fn PsUnregisterSiloMonitor(monitor : super::super::Foundation:: PSILO_MONITOR)); - PsUnregisterSiloMonitor(monitor.param().abi()) + PsUnregisterSiloMonitor(core::mem::transmute(monitor)) } #[inline] pub unsafe fn PsWrapApcWow64Thread(apccontext: *mut *mut core::ffi::c_void, apcroutine: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5699,7 +5232,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(core::mem::transmute(descriptor), core::mem::transmute(start.unwrap_or(core::ptr::null_mut()))) + RtlCmDecodeMemIoResource(core::mem::transmute(descriptor), core::mem::transmute(start.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RtlCmEncodeMemIoResource(descriptor: *const CM_PARTIAL_RESOURCE_DESCRIPTOR, r#type: u8, length: u64, start: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5745,22 +5278,22 @@ 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(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::ptr::null()))) + RtlCopyString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::ptr::null()))) + RtlCopyUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RtlCreateHashTable(hashtable: *mut *mut RTL_DYNAMIC_HASH_TABLE, shift: u32, flags: u32) -> super::super::super::Win32::Foundation::BOOLEAN { +pub unsafe fn RtlCreateHashTable(hashtable: *mut *mut RTL_DYNAMIC_HASH_TABLE, shift: u32, flags: Option) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlCreateHashTable(hashtable : *mut *mut RTL_DYNAMIC_HASH_TABLE, shift : u32, flags : u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlCreateHashTable(core::mem::transmute(hashtable), core::mem::transmute(shift), core::mem::transmute(flags)) + RtlCreateHashTable(core::mem::transmute(hashtable), core::mem::transmute(shift), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RtlCreateHashTableEx(hashtable: *mut *mut RTL_DYNAMIC_HASH_TABLE, initialsize: u32, shift: u32, flags: u32) -> super::super::super::Win32::Foundation::BOOLEAN { +pub unsafe fn RtlCreateHashTableEx(hashtable: *mut *mut RTL_DYNAMIC_HASH_TABLE, initialsize: u32, shift: u32, flags: Option) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlCreateHashTableEx(hashtable : *mut *mut RTL_DYNAMIC_HASH_TABLE, initialsize : u32, shift : u32, flags : u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlCreateHashTableEx(core::mem::transmute(hashtable), core::mem::transmute(initialsize), core::mem::transmute(shift), core::mem::transmute(flags)) + RtlCreateHashTableEx(core::mem::transmute(hashtable), core::mem::transmute(initialsize), core::mem::transmute(shift), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RtlCreateRegistryKey(relativeto: u32, path: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -5865,9 +5398,9 @@ where RtlEnumerateGenericTableAvl(core::mem::transmute(table), restart.param().abi()) } #[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 { +pub unsafe fn RtlEnumerateGenericTableLikeADirectory(table: *const RTL_AVL_TABLE, matchfunction: Option, 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(core::mem::transmute(table), core::mem::transmute(matchfunction), core::mem::transmute(matchdata.unwrap_or(core::ptr::null())), core::mem::transmute(nextflag), core::mem::transmute(restartkey), core::mem::transmute(deletecount), core::mem::transmute(buffer)) + RtlEnumerateGenericTableLikeADirectory(core::mem::transmute(table), core::mem::transmute(matchfunction.unwrap_or(core::mem::zeroed())), core::mem::transmute(matchdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(nextflag), core::mem::transmute(restartkey), core::mem::transmute(deletecount), core::mem::transmute(buffer)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -5974,7 +5507,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(core::ptr::null_mut()))) + RtlFreeUTF8String(core::mem::transmute(utf8string.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -6035,14 +5568,14 @@ pub unsafe fn RtlGetNtSystemRoot() -> windows_core::PCWSTR { RtlGetNtSystemRoot() } #[inline] -pub unsafe fn RtlGetPersistedStateLocation(sourceid: P0, customvalue: P1, defaultpath: P2, statelocationtype: STATE_LOCATION_TYPE, targetpath: windows_core::PWSTR, bufferlengthin: u32, bufferlengthout: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn RtlGetPersistedStateLocation(sourceid: P0, customvalue: P1, defaultpath: P2, statelocationtype: STATE_LOCATION_TYPE, targetpath: Option, bufferlengthin: u32, bufferlengthout: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS where P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(statelocationtype), core::mem::transmute(targetpath), core::mem::transmute(bufferlengthin), core::mem::transmute(bufferlengthout.unwrap_or(core::ptr::null_mut()))) + RtlGetPersistedStateLocation(sourceid.param().abi(), customvalue.param().abi(), defaultpath.param().abi(), core::mem::transmute(statelocationtype), core::mem::transmute(targetpath.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlengthin), core::mem::transmute(bufferlengthout.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RtlGetSuiteMask() -> u32 { @@ -6079,13 +5612,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(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::ptr::null()))) + RtlInitUTF8String(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::ptr::null()))) + RtlInitUTF8StringEx(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -6094,63 +5627,63 @@ pub unsafe fn RtlInitWeakEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HASH RtlInitWeakEnumerationHashTable(core::mem::transmute(hashtable), core::mem::transmute(enumerator)) } #[inline] -pub unsafe fn RtlInitializeBitMap(bitmapheader: *mut RTL_BITMAP, bitmapbuffer: Option<*const u32>, sizeofbitmap: u32) { +pub unsafe fn RtlInitializeBitMap(bitmapheader: *mut RTL_BITMAP, bitmapbuffer: Option<*const u32>, sizeofbitmap: Option) { windows_targets::link!("ntdll.dll" "system" fn RtlInitializeBitMap(bitmapheader : *mut RTL_BITMAP, bitmapbuffer : *const u32, sizeofbitmap : u32)); - RtlInitializeBitMap(core::mem::transmute(bitmapheader), core::mem::transmute(bitmapbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(sizeofbitmap)) + RtlInitializeBitMap(core::mem::transmute(bitmapheader), core::mem::transmute(bitmapbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizeofbitmap.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(table), core::mem::transmute(compareroutine), core::mem::transmute(allocateroutine), core::mem::transmute(freeroutine), core::mem::transmute(tablecontext.unwrap_or(core::ptr::null()))) + RtlInitializeGenericTable(core::mem::transmute(table), core::mem::transmute(compareroutine), core::mem::transmute(allocateroutine), core::mem::transmute(freeroutine), core::mem::transmute(tablecontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(table), core::mem::transmute(compareroutine), core::mem::transmute(allocateroutine), core::mem::transmute(freeroutine), core::mem::transmute(tablecontext.unwrap_or(core::ptr::null()))) + RtlInitializeGenericTableAvl(core::mem::transmute(table), core::mem::transmute(compareroutine), core::mem::transmute(allocateroutine), core::mem::transmute(freeroutine), core::mem::transmute(tablecontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(table), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(newelement.unwrap_or(core::ptr::null_mut()))) + RtlInsertElementGenericTable(core::mem::transmute(table), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(newelement.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(table), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(newelement.unwrap_or(core::ptr::null_mut()))) + RtlInsertElementGenericTableAvl(core::mem::transmute(table), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(newelement.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(table), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(newelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nodeorparent), core::mem::transmute(searchresult)) + RtlInsertElementGenericTableFull(core::mem::transmute(table), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(newelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(nodeorparent), core::mem::transmute(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(core::mem::transmute(table), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(newelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nodeorparent), core::mem::transmute(searchresult)) + RtlInsertElementGenericTableFullAvl(core::mem::transmute(table), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(newelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(nodeorparent), core::mem::transmute(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(core::mem::transmute(hashtable), core::mem::transmute(entry), core::mem::transmute(signature), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) + RtlInsertEntryHashTable(core::mem::transmute(hashtable), core::mem::transmute(entry), core::mem::transmute(signature), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RtlInt64ToUnicodeString(value: u64, base: u32, string: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn RtlInt64ToUnicodeString(value: u64, base: Option, string: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlInt64ToUnicodeString(value : u64, base : u32, string : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlInt64ToUnicodeString(core::mem::transmute(value), core::mem::transmute(base), core::mem::transmute(string)) + RtlInt64ToUnicodeString(core::mem::transmute(value), core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(string)) } #[inline] -pub unsafe fn RtlIntegerToUnicodeString(value: u32, base: u32, string: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { +pub unsafe fn RtlIntegerToUnicodeString(value: u32, base: Option, string: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlIntegerToUnicodeString(value : u32, base : u32, string : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlIntegerToUnicodeString(core::mem::transmute(value), core::mem::transmute(base), core::mem::transmute(string)) + RtlIntegerToUnicodeString(core::mem::transmute(value), core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(string)) } #[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(core::mem::transmute(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()))) + RtlIoDecodeMemIoResource(core::mem::transmute(descriptor), core::mem::transmute(alignment.unwrap_or(core::mem::zeroed())), core::mem::transmute(minimumaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(maximumaddress.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -6202,21 +5735,15 @@ pub unsafe fn RtlIsStateSeparationEnabled() -> super::super::super::Win32::Found RtlIsStateSeparationEnabled() } #[inline] -pub unsafe fn RtlIsUntrustedObject(handle: P0, object: Option<*const core::ffi::c_void>, untrustedobject: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn RtlIsUntrustedObject(handle: Option, object: Option<*const core::ffi::c_void>, untrustedobject: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(untrustedobject)) + RtlIsUntrustedObject(core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(untrustedobject)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlLengthSecurityDescriptor(securitydescriptor: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RtlLengthSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlLengthSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> u32); - RtlLengthSecurityDescriptor(securitydescriptor.param().abi()) + RtlLengthSecurityDescriptor(core::mem::transmute(securitydescriptor)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -6244,7 +5771,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(core::mem::transmute(hashtable), core::mem::transmute(signature), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) + RtlLookupEntryHashTable(core::mem::transmute(hashtable), core::mem::transmute(signature), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -6264,7 +5791,7 @@ where P4: 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(core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorlength), core::mem::transmute(newsecuritydescriptor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::ptr::null_mut())), checkonly.param().abi()) + RtlNormalizeSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorlength), core::mem::transmute(newsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::mem::zeroed())), checkonly.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -6316,13 +5843,9 @@ where RtlPrefixUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) } #[inline] -pub unsafe fn RtlQueryRegistryValueWithFallback(primaryhandle: P0, fallbackhandle: P1, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, valuelength: u32, valuetype: Option<*mut u32>, valuedata: *mut core::ffi::c_void, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RtlQueryRegistryValueWithFallback(primaryhandle: Option, fallbackhandle: Option, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, valuelength: u32, valuetype: Option<*mut u32>, valuedata: *mut core::ffi::c_void, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(valuename), core::mem::transmute(valuelength), core::mem::transmute(valuetype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(valuedata), core::mem::transmute(resultlength)) + RtlQueryRegistryValueWithFallback(core::mem::transmute(primaryhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(fallbackhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuename), core::mem::transmute(valuelength), core::mem::transmute(valuetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuedata), core::mem::transmute(resultlength)) } #[inline] pub unsafe fn RtlQueryRegistryValues(relativeto: u32, path: P1, 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 @@ -6330,12 +5853,12 @@ where P1: 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(core::mem::transmute(relativeto), path.param().abi(), core::mem::transmute(querytable), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(environment.unwrap_or(core::ptr::null()))) + RtlQueryRegistryValues(core::mem::transmute(relativeto), path.param().abi(), core::mem::transmute(querytable), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(environment.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + RtlQueryValidationRunlevel(core::mem::transmute(componentname.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6353,25 +5876,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(core::mem::transmute(hashtable), core::mem::transmute(entry), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) + RtlRemoveEntryHashTable(core::mem::transmute(hashtable), core::mem::transmute(entry), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(runonce), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) + RtlRunOnceBeginInitialize(core::mem::transmute(runonce), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(runonce), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + RtlRunOnceComplete(core::mem::transmute(runonce), core::mem::transmute(flags), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(runonce), core::mem::transmute(initfn), core::mem::transmute(parameter.unwrap_or(core::ptr::null_mut())), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) + RtlRunOnceExecuteOnce(core::mem::transmute(runonce), core::mem::transmute(initfn), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Threading")] #[inline] @@ -6404,7 +5927,7 @@ where P3: 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(core::mem::transmute(securitydescriptor), daclpresent.param().abi(), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), dacldefaulted.param().abi()) + RtlSetDaclSecurityDescriptor(core::mem::transmute(securitydescriptor), daclpresent.param().abi(), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), dacldefaulted.param().abi()) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -6481,14 +6004,14 @@ pub unsafe fn RtlUTF8ToUnicodeN(unicodestringdestination: windows_core::PWSTR, u RtlUTF8ToUnicodeN(core::mem::transmute(unicodestringdestination), core::mem::transmute(unicodestringmaxbytecount), core::mem::transmute(unicodestringactualbytecount), core::mem::transmute(utf8stringsource.as_ptr()), utf8stringsource.len().try_into().unwrap()) } #[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 { +pub unsafe fn RtlUnicodeStringToInt64(string: *const super::super::super::Win32::Foundation::UNICODE_STRING, base: Option, 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(core::mem::transmute(string), core::mem::transmute(base), core::mem::transmute(number), core::mem::transmute(endpointer.unwrap_or(core::ptr::null_mut()))) + RtlUnicodeStringToInt64(core::mem::transmute(string), core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(number), core::mem::transmute(endpointer.unwrap_or(core::mem::zeroed()))) } #[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 { +pub unsafe fn RtlUnicodeStringToInteger(string: *const super::super::super::Win32::Foundation::UNICODE_STRING, base: Option, value: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToInteger(string : *const super::super::super::Win32::Foundation:: UNICODE_STRING, base : u32, value : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeStringToInteger(core::mem::transmute(string), core::mem::transmute(base), core::mem::transmute(value)) + RtlUnicodeStringToInteger(core::mem::transmute(string), core::mem::transmute(base.unwrap_or(core::mem::zeroed())), core::mem::transmute(value)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -6530,21 +6053,15 @@ pub unsafe fn RtlUpperString(destinationstring: *mut super::super::super::Win32: } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlValidRelativeSecurityDescriptor(securitydescriptorinput: P0, securitydescriptorlength: u32, requiredinformation: u32) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn RtlValidRelativeSecurityDescriptor(securitydescriptorinput: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, securitydescriptorlength: u32, requiredinformation: u32) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlValidRelativeSecurityDescriptor(securitydescriptorinput : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, securitydescriptorlength : u32, requiredinformation : u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlValidRelativeSecurityDescriptor(securitydescriptorinput.param().abi(), core::mem::transmute(securitydescriptorlength), core::mem::transmute(requiredinformation)) + RtlValidRelativeSecurityDescriptor(core::mem::transmute(securitydescriptorinput), core::mem::transmute(securitydescriptorlength), core::mem::transmute(requiredinformation)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlValidSecurityDescriptor(securitydescriptor: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn RtlValidSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlValidSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlValidSecurityDescriptor(securitydescriptor.param().abi()) + RtlValidSecurityDescriptor(core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -6575,7 +6092,7 @@ where P2: 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(core::mem::transmute(relativeto), path.param().abi(), valuename.param().abi(), core::mem::transmute(valuetype), core::mem::transmute(valuedata.unwrap_or(core::ptr::null())), core::mem::transmute(valuelength)) + RtlWriteRegistryValue(core::mem::transmute(relativeto), path.param().abi(), valuename.param().abi(), core::mem::transmute(valuetype), core::mem::transmute(valuedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuelength)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -6590,35 +6107,30 @@ pub unsafe fn RtlxUnicodeStringToAnsiSize(unicodestring: *const super::super::su } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAccessCheck(securitydescriptor: P0, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, subjectcontextlocked: P2, desiredaccess: u32, previouslygrantedaccess: u32, privileges: Option<*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 +pub unsafe fn SeAccessCheck(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, subjectcontextlocked: P2, desiredaccess: u32, previouslygrantedaccess: u32, privileges: Option<*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 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(subjectsecuritycontext), subjectcontextlocked.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(previouslygrantedaccess), core::mem::transmute(privileges.unwrap_or(core::ptr::null_mut())), core::mem::transmute(genericmapping), core::mem::transmute(accessmode), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) + SeAccessCheck(core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext), subjectcontextlocked.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(previouslygrantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping), core::mem::transmute(accessmode), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAssignSecurity(parentdescriptor: P0, explicitdescriptor: P1, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, isdirectoryobject: P3, 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 +pub unsafe fn SeAssignSecurity(parentdescriptor: Option, explicitdescriptor: Option, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, isdirectoryobject: P3, 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 where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAssignSecurity(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, isdirectoryobject : super::super::super::Win32::Foundation:: BOOLEAN, 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); - SeAssignSecurity(parentdescriptor.param().abi(), explicitdescriptor.param().abi(), core::mem::transmute(newdescriptor), isdirectoryobject.param().abi(), core::mem::transmute(subjectcontext), core::mem::transmute(genericmapping), core::mem::transmute(pooltype)) + SeAssignSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(explicitdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), isdirectoryobject.param().abi(), core::mem::transmute(subjectcontext), core::mem::transmute(genericmapping), core::mem::transmute(pooltype)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAssignSecurityEx(parentdescriptor: P0, explicitdescriptor: P1, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: P4, 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 +pub unsafe fn SeAssignSecurityEx(parentdescriptor: Option, explicitdescriptor: Option, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: P4, 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 where - P0: windows_core::Param, - P1: windows_core::Param, P4: 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(), core::mem::transmute(newdescriptor), core::mem::transmute(objecttype.unwrap_or(core::ptr::null())), isdirectoryobject.param().abi(), core::mem::transmute(autoinheritflags), core::mem::transmute(subjectcontext), core::mem::transmute(genericmapping), core::mem::transmute(pooltype)) + SeAssignSecurityEx(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(explicitdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), isdirectoryobject.param().abi(), core::mem::transmute(autoinheritflags), core::mem::transmute(subjectcontext), core::mem::transmute(genericmapping), core::mem::transmute(pooltype)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6630,13 +6142,9 @@ pub unsafe fn SeCaptureSubjectContext() -> super::super::Foundation::SECURITY_SU } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeComputeAutoInheritByObjectType(objecttype: *const core::ffi::c_void, securitydescriptor: P1, parentsecuritydescriptor: P2) -> u32 -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SeComputeAutoInheritByObjectType(objecttype: *const core::ffi::c_void, securitydescriptor: Option, parentsecuritydescriptor: Option) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn SeComputeAutoInheritByObjectType(objecttype : *const core::ffi::c_void, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, parentsecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> u32); - SeComputeAutoInheritByObjectType(core::mem::transmute(objecttype), securitydescriptor.param().abi(), parentsecuritydescriptor.param().abi()) + SeComputeAutoInheritByObjectType(core::mem::transmute(objecttype), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(parentsecuritydescriptor.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -6647,7 +6155,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(core::mem::transmute(cveid), core::mem::transmute(additionaldetails.unwrap_or(core::ptr::null()))) + SeEtwWriteKMCveEvent(core::mem::transmute(cveid), core::mem::transmute(additionaldetails.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6658,7 +6166,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(core::mem::transmute(imagetype), core::mem::transmute(callbacktype), core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(token.unwrap_or(core::ptr::null())), core::mem::transmute(callbackhandle)) + SeRegisterImageVerificationCallback(core::mem::transmute(imagetype), core::mem::transmute(callbacktype), core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackhandle)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6668,12 +6176,9 @@ pub unsafe fn SeReleaseSubjectContext(subjectcontext: *mut super::super::Foundat } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] -pub unsafe fn SeReportSecurityEvent(flags: u32, sourcename: *const super::super::super::Win32::Foundation::UNICODE_STRING, usersid: P2, auditparameters: *const super::super::super::Win32::Security::Authentication::Identity::SE_ADT_PARAMETER_ARRAY) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn SeReportSecurityEvent(flags: u32, sourcename: *const super::super::super::Win32::Foundation::UNICODE_STRING, usersid: Option, auditparameters: *const super::super::super::Win32::Security::Authentication::Identity::SE_ADT_PARAMETER_ARRAY) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeReportSecurityEvent(flags : u32, sourcename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, usersid : super::super::super::Win32::Security:: PSID, auditparameters : *const super::super::super::Win32::Security::Authentication::Identity:: SE_ADT_PARAMETER_ARRAY) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeReportSecurityEvent(core::mem::transmute(flags), core::mem::transmute(sourcename), usersid.param().abi(), core::mem::transmute(auditparameters)) + SeReportSecurityEvent(core::mem::transmute(flags), core::mem::transmute(sourcename), core::mem::transmute(usersid.unwrap_or(core::mem::zeroed())), core::mem::transmute(auditparameters)) } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] @@ -6699,18 +6204,15 @@ pub unsafe fn SeUnregisterImageVerificationCallback(callbackhandle: *const core: } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeValidSecurityDescriptor(length: u32, securitydescriptor: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn SeValidSecurityDescriptor(length: u32, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeValidSecurityDescriptor(length : u32, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeValidSecurityDescriptor(core::mem::transmute(length), securitydescriptor.param().abi()) + SeValidSecurityDescriptor(core::mem::transmute(length), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Wdk_Foundation")] #[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(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) + TmCommitComplete(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6729,21 +6231,21 @@ where } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +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: Option, 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(core::mem::transmute(enlistmenthandle), core::mem::transmute(previousmode), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(resourcemanager), core::mem::transmute(transaction), core::mem::transmute(createoptions), core::mem::transmute(notificationmask), core::mem::transmute(enlistmentkey.unwrap_or(core::ptr::null()))) + TmCreateEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(previousmode), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(resourcemanager), core::mem::transmute(transaction), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(notificationmask), core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(enlistment), core::mem::transmute(lastreference.unwrap_or(core::ptr::null_mut()))) + TmDereferenceEnlistmentKey(core::mem::transmute(enlistment), core::mem::transmute(lastreference.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(resourcemanager), core::mem::transmute(callbackroutine), core::mem::transmute(rmkey.unwrap_or(core::ptr::null()))) + TmEnableCallbacks(core::mem::transmute(resourcemanager), core::mem::transmute(callbackroutine), core::mem::transmute(rmkey.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6756,7 +6258,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(core::mem::transmute(transactionmanager), core::mem::transmute(logfilename.unwrap_or(core::ptr::null())), core::mem::transmute(tmid.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions)) + TmInitializeTransactionManager(core::mem::transmute(transactionmanager), core::mem::transmute(logfilename.unwrap_or(core::mem::zeroed())), core::mem::transmute(tmid.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6780,7 +6282,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(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) + TmPrepareComplete(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6796,18 +6298,15 @@ pub unsafe fn TmPropagationComplete(resourcemanager: *const super::super::Founda } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn TmPropagationFailed(resourcemanager: *const super::super::Foundation::KRESOURCEMANAGER, requestcookie: u32, status: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn TmPropagationFailed(resourcemanager: *const super::super::Foundation::KRESOURCEMANAGER, requestcookie: u32, status: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmPropagationFailed(resourcemanager : *const super::super::Foundation:: KRESOURCEMANAGER, requestcookie : u32, status : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmPropagationFailed(core::mem::transmute(resourcemanager), core::mem::transmute(requestcookie), status.param().abi()) + TmPropagationFailed(core::mem::transmute(resourcemanager), core::mem::transmute(requestcookie), core::mem::transmute(status)) } #[cfg(feature = "Wdk_Foundation")] #[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(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) + TmReadOnlyEnlistment(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6848,13 +6347,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(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) + TmRollbackComplete(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) + TmRollbackEnlistment(core::mem::transmute(enlistment), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6873,38 +6372,32 @@ pub unsafe fn TmSinglePhaseReject(enlistment: *const super::super::Foundation::K } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn VslCreateSecureSection(handle: *mut super::super::super::Win32::Foundation::HANDLE, targetprocess: P1, mdl: *const super::super::Foundation::MDL, devicepageprotection: u32, attributes: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn VslCreateSecureSection(handle: *mut super::super::super::Win32::Foundation::HANDLE, targetprocess: super::super::Foundation::PEPROCESS, mdl: *const super::super::Foundation::MDL, devicepageprotection: u32, attributes: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn VslCreateSecureSection(handle : *mut super::super::super::Win32::Foundation:: HANDLE, targetprocess : super::super::Foundation:: PEPROCESS, mdl : *const super::super::Foundation:: MDL, devicepageprotection : u32, attributes : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - VslCreateSecureSection(core::mem::transmute(handle), targetprocess.param().abi(), core::mem::transmute(mdl), core::mem::transmute(devicepageprotection), core::mem::transmute(attributes)) + VslCreateSecureSection(core::mem::transmute(handle), core::mem::transmute(targetprocess), core::mem::transmute(mdl), core::mem::transmute(devicepageprotection), core::mem::transmute(attributes)) } #[inline] -pub unsafe fn VslDeleteSecureSection(globalhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn VslDeleteSecureSection(globalhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn VslDeleteSecureSection(globalhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - VslDeleteSecureSection(globalhandle.param().abi()) + VslDeleteSecureSection(core::mem::transmute(globalhandle)) } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[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(core::mem::transmute(errorsource), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + WheaAddErrorSource(core::mem::transmute(errorsource), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(configuration), core::mem::transmute(numberpreallocatederrorreports)) + WheaAddErrorSourceDeviceDriver(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(configuration), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(configuration), core::mem::transmute(numbufferstopreallocate), core::mem::transmute(maxdatalength)) + WheaAddErrorSourceDeviceDriverV1(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(configuration), core::mem::transmute(numbufferstopreallocate), core::mem::transmute(maxdatalength)) } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] @@ -6985,7 +6478,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(core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + WheaRegisterInUsePageOfflineNotification(core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WheaRemoveErrorSource(errorsourceid: u32) { @@ -7026,7 +6519,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(core::mem::transmute(traceinformationclass), core::mem::transmute(traceinformation), core::mem::transmute(traceinformationlength), core::mem::transmute(requiredlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null()))) + WmiQueryTraceInformation(core::mem::transmute(traceinformationclass), core::mem::transmute(traceinformation), core::mem::transmute(traceinformationlength), core::mem::transmute(requiredlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ZwAllocateLocallyUniqueId(luid: *mut super::super::super::Win32::Foundation::LUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -7034,96 +6527,91 @@ pub unsafe fn ZwAllocateLocallyUniqueId(luid: *mut super::super::super::Win32::F ZwAllocateLocallyUniqueId(core::mem::transmute(luid)) } #[inline] -pub unsafe fn ZwClose(handle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwClose(handle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwClose(handle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwClose(handle.param().abi()) + ZwClose(core::mem::transmute(handle)) } #[inline] -pub unsafe fn ZwCommitComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwCommitComplete(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwCommitComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwCommitEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwCommitEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwCommitEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwCommitTransaction(transactionhandle: P0, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwCommitTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCommitTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCommitTransaction(transactionhandle.param().abi(), wait.param().abi()) + ZwCommitTransaction(core::mem::transmute(transactionhandle), wait.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwCreateEnlistment(enlistmenthandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, resourcemanagerhandle: P2, transactionhandle: P3, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: u32, notificationmask: u32, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: Option, notificationmask: u32, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(enlistmenthandle), core::mem::transmute(desiredaccess), resourcemanagerhandle.param().abi(), transactionhandle.param().abi(), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), core::mem::transmute(notificationmask), core::mem::transmute(enlistmentkey.unwrap_or(core::ptr::null()))) + ZwCreateEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(desiredaccess), core::mem::transmute(resourcemanagerhandle), core::mem::transmute(transactionhandle), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(notificationmask), core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", 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(core::mem::transmute(filehandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(createdisposition), core::mem::transmute(createoptions), core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ealength)) + ZwCreateFile(core::mem::transmute(filehandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(iostatusblock), core::mem::transmute(allocationsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileattributes), core::mem::transmute(shareaccess), core::mem::transmute(createdisposition), core::mem::transmute(createoptions), core::mem::transmute(eabuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealength)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwCreateResourceManager(resourcemanagerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, tmhandle: P2, resourcemanagerguid: Option<*const windows_core::GUID>, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: u32, description: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn ZwCreateResourceManager(resourcemanagerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, tmhandle: super::super::super::Win32::Foundation::HANDLE, resourcemanagerguid: Option<*const windows_core::GUID>, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: Option, description: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(desiredaccess), tmhandle.param().abi(), core::mem::transmute(resourcemanagerguid.unwrap_or(core::ptr::null())), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), core::mem::transmute(description.unwrap_or(core::ptr::null()))) + ZwCreateResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(tmhandle), core::mem::transmute(resourcemanagerguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(description.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwCreateSection(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, filehandle: P6) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn ZwCreateSection(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, filehandle: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(sectionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), filehandle.param().abi()) + ZwCreateSection(core::mem::transmute(sectionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(maximumsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(sectionpageprotection), core::mem::transmute(allocationattributes), core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwCreateTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, uow: Option<*const windows_core::GUID>, tmhandle: P4, createoptions: u32, isolationlevel: u32, isolationflags: u32, timeout: Option<*const i64>, description: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ZwCreateTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, uow: Option<*const windows_core::GUID>, tmhandle: Option, createoptions: Option, isolationlevel: Option, isolationflags: Option, timeout: Option<*const i64>, description: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(uow.unwrap_or(core::ptr::null())), tmhandle.param().abi(), core::mem::transmute(createoptions), core::mem::transmute(isolationlevel), core::mem::transmute(isolationflags), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(description.unwrap_or(core::ptr::null()))) + ZwCreateTransaction( + core::mem::transmute(transactionhandle), + core::mem::transmute(desiredaccess), + core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(uow.unwrap_or(core::mem::zeroed())), + core::mem::transmute(tmhandle.unwrap_or(core::mem::zeroed())), + core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), + core::mem::transmute(isolationlevel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(isolationflags.unwrap_or(core::mem::zeroed())), + core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(description.unwrap_or(core::mem::zeroed())), + ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +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: Option, commitstrength: Option) -> 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(core::mem::transmute(tmhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(logfilename.unwrap_or(core::ptr::null())), core::mem::transmute(createoptions), core::mem::transmute(commitstrength)) + ZwCreateTransactionManager(core::mem::transmute(tmhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(logfilename.unwrap_or(core::mem::zeroed())), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(commitstrength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwDeviceIoControlFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, iocontrolcode: u32, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwDeviceIoControlFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, iocontrolcode: u32, 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 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(iocontrolcode), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength)) + ZwDeviceIoControlFile( + core::mem::transmute(filehandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(iostatusblock), + core::mem::transmute(iocontrolcode), + core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(inputbufferlength), + core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(outputbufferlength), + ) } #[inline] pub unsafe fn ZwDisplayString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -7132,21 +6620,15 @@ pub unsafe fn ZwDisplayString(string: *const super::super::super::Win32::Foundat } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwEnumerateTransactionObject(rootobjecthandle: P0, querytype: super::super::super::Win32::System::SystemServices::KTMOBJECT_TYPE, objectcursor: *mut super::super::super::Win32::System::SystemServices::KTMOBJECT_CURSOR, objectcursorlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwEnumerateTransactionObject(rootobjecthandle: Option, querytype: super::super::super::Win32::System::SystemServices::KTMOBJECT_TYPE, objectcursor: *mut super::super::super::Win32::System::SystemServices::KTMOBJECT_CURSOR, objectcursorlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwEnumerateTransactionObject(rootobjecthandle : super::super::super::Win32::Foundation:: HANDLE, querytype : super::super::super::Win32::System::SystemServices:: KTMOBJECT_TYPE, objectcursor : *mut super::super::super::Win32::System::SystemServices:: KTMOBJECT_CURSOR, objectcursorlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwEnumerateTransactionObject(rootobjecthandle.param().abi(), core::mem::transmute(querytype), core::mem::transmute(objectcursor), core::mem::transmute(objectcursorlength), core::mem::transmute(returnlength)) + ZwEnumerateTransactionObject(core::mem::transmute(rootobjecthandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(querytype), core::mem::transmute(objectcursor), core::mem::transmute(objectcursorlength), core::mem::transmute(returnlength)) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] -pub unsafe fn ZwGetNotificationResourceManager(resourcemanagerhandle: P0, transactionnotification: *mut super::super::super::Win32::Storage::FileSystem::TRANSACTION_NOTIFICATION, notificationlength: u32, timeout: *const i64, returnlength: Option<*mut u32>, asynchronous: u32, asynchronouscontext: usize) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>, asynchronous: u32, asynchronouscontext: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(transactionnotification), core::mem::transmute(notificationlength), core::mem::transmute(timeout), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(asynchronous), core::mem::transmute(asynchronouscontext)) + ZwGetNotificationResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(transactionnotification), core::mem::transmute(notificationlength), core::mem::transmute(timeout), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(asynchronous), core::mem::transmute(asynchronouscontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ZwLoadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -7154,30 +6636,20 @@ pub unsafe fn ZwLoadDriver(driverservicename: *const super::super::super::Win32: ZwLoadDriver(core::mem::transmute(driverservicename)) } #[inline] -pub unsafe fn ZwMakeTemporaryObject(handle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwMakeTemporaryObject(handle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwMakeTemporaryObject(handle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwMakeTemporaryObject(handle.param().abi()) + ZwMakeTemporaryObject(core::mem::transmute(handle)) } #[inline] -pub unsafe fn ZwManagePartition(targethandle: P0, sourcehandle: P1, partitioninformationclass: PARTITION_INFORMATION_CLASS, partitioninformation: *mut core::ffi::c_void, partitioninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwManagePartition(targethandle: super::super::super::Win32::Foundation::HANDLE, sourcehandle: Option, partitioninformationclass: PARTITION_INFORMATION_CLASS, partitioninformation: *mut core::ffi::c_void, partitioninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwManagePartition(targethandle : super::super::super::Win32::Foundation:: HANDLE, sourcehandle : super::super::super::Win32::Foundation:: HANDLE, partitioninformationclass : PARTITION_INFORMATION_CLASS, partitioninformation : *mut core::ffi::c_void, partitioninformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwManagePartition(targethandle.param().abi(), sourcehandle.param().abi(), core::mem::transmute(partitioninformationclass), core::mem::transmute(partitioninformation), core::mem::transmute(partitioninformationlength)) + ZwManagePartition(core::mem::transmute(targethandle), core::mem::transmute(sourcehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(partitioninformationclass), core::mem::transmute(partitioninformation), core::mem::transmute(partitioninformationlength)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwOpenEnlistment(enlistmenthandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, rmhandle: P2, enlistmentguid: *const windows_core::GUID, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(enlistmenthandle), core::mem::transmute(desiredaccess), rmhandle.param().abi(), core::mem::transmute(enlistmentguid), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null()))) + ZwOpenEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(desiredaccess), core::mem::transmute(rmhandle), core::mem::transmute(enlistmentguid), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] @@ -7187,12 +6659,9 @@ pub unsafe fn ZwOpenFile(filehandle: *mut super::super::super::Win32::Foundation } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwOpenResourceManager(resourcemanagerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, tmhandle: P2, resourcemanagerguid: *const windows_core::GUID, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe 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: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(desiredaccess), tmhandle.param().abi(), core::mem::transmute(resourcemanagerguid), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null()))) + ZwOpenResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(tmhandle), core::mem::transmute(resourcemanagerguid), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -7202,73 +6671,51 @@ pub unsafe fn ZwOpenSymbolicLinkObject(linkhandle: *mut super::super::super::Win } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwOpenTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, uow: *const windows_core::GUID, tmhandle: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ZwOpenTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, uow: *const windows_core::GUID, tmhandle: Option) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(uow), tmhandle.param().abi()) + ZwOpenTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(uow), core::mem::transmute(tmhandle.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[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 { +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: Option) -> 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(core::mem::transmute(tmhandle), core::mem::transmute(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())), core::mem::transmute(openoptions)) + ZwOpenTransactionManager(core::mem::transmute(tmhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(logfilename.unwrap_or(core::mem::zeroed())), core::mem::transmute(tmidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(openoptions.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(informationlevel), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength)) + ZwPowerInformation(core::mem::transmute(informationlevel), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength)) } #[inline] -pub unsafe fn ZwPrePrepareComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwPrePrepareComplete(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwPrePrepareComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwPrePrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwPrePrepareEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwPrePrepareEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwPrepareComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwPrepareComplete(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwPrepareComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwPrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwPrepareEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwPrepareEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwPropagationComplete(resourcemanagerhandle: P0, requestcookie: u32, bufferlength: u32, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwPropagationComplete(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE, requestcookie: u32, bufferlength: u32, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwPropagationComplete(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, requestcookie : u32, bufferlength : u32, buffer : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPropagationComplete(resourcemanagerhandle.param().abi(), core::mem::transmute(requestcookie), core::mem::transmute(bufferlength), core::mem::transmute(buffer)) + ZwPropagationComplete(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(requestcookie), core::mem::transmute(bufferlength), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn ZwPropagationFailed(resourcemanagerhandle: P0, requestcookie: u32, propstatus: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ZwPropagationFailed(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE, requestcookie: u32, propstatus: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwPropagationFailed(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, requestcookie : u32, propstatus : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPropagationFailed(resourcemanagerhandle.param().abi(), core::mem::transmute(requestcookie), propstatus.param().abi()) + ZwPropagationFailed(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(requestcookie), core::mem::transmute(propstatus)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] @@ -7278,106 +6725,69 @@ pub unsafe fn ZwQueryInformationByName(objectattributes: *const super::super::Fo } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwQueryInformationEnlistment(enlistmenthandle: P0, enlistmentinformationclass: super::super::super::Win32::System::SystemServices::ENLISTMENT_INFORMATION_CLASS, enlistmentinformation: *mut core::ffi::c_void, enlistmentinformationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(enlistmentinformationclass), core::mem::transmute(enlistmentinformation), core::mem::transmute(enlistmentinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ZwQueryInformationEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(enlistmentinformationclass), core::mem::transmute(enlistmentinformation), core::mem::transmute(enlistmentinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Storage_FileSystem", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ZwQueryInformationFile(filehandle: P0, 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) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, 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) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, 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) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) + ZwQueryInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwQueryInformationResourceManager(resourcemanagerhandle: P0, resourcemanagerinformationclass: super::super::super::Win32::System::SystemServices::RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation: *mut core::ffi::c_void, resourcemanagerinformationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(resourcemanagerinformationclass), core::mem::transmute(resourcemanagerinformation), core::mem::transmute(resourcemanagerinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ZwQueryInformationResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(resourcemanagerinformationclass), core::mem::transmute(resourcemanagerinformation), core::mem::transmute(resourcemanagerinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwQueryInformationTransaction(transactionhandle: P0, transactioninformationclass: super::super::super::Win32::System::SystemServices::TRANSACTION_INFORMATION_CLASS, transactioninformation: *mut core::ffi::c_void, transactioninformationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(transactioninformationclass), core::mem::transmute(transactioninformation), core::mem::transmute(transactioninformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ZwQueryInformationTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(transactioninformationclass), core::mem::transmute(transactioninformation), core::mem::transmute(transactioninformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwQueryInformationTransactionManager(transactionmanagerhandle: P0, transactionmanagerinformationclass: super::super::super::Win32::System::SystemServices::TRANSACTIONMANAGER_INFORMATION_CLASS, transactionmanagerinformation: *mut core::ffi::c_void, transactionmanagerinformationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(transactionmanagerinformationclass), core::mem::transmute(transactionmanagerinformation), core::mem::transmute(transactionmanagerinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + ZwQueryInformationTransactionManager(core::mem::transmute(transactionmanagerhandle), core::mem::transmute(transactionmanagerinformationclass), core::mem::transmute(transactionmanagerinformation), core::mem::transmute(transactionmanagerinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQuerySymbolicLinkObject(linkhandle: super::super::super::Win32::Foundation::HANDLE, linktarget: *mut super::super::super::Win32::Foundation::UNICODE_STRING, returnedlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(linktarget), core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))) + ZwQuerySymbolicLinkObject(core::mem::transmute(linkhandle), core::mem::transmute(linktarget), core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwReadFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: Option<*const i64>, key: Option<*const u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwReadFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: Option<*const i64>, key: Option<*const u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null()))) + ZwReadFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwReadOnlyEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwReadOnlyEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwReadOnlyEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwRecoverEnlistment(enlistmenthandle: P0, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRecoverEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwRecoverEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(enlistmentkey.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwRecoverResourceManager(resourcemanagerhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRecoverResourceManager(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwRecoverResourceManager(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRecoverResourceManager(resourcemanagerhandle.param().abi()) + ZwRecoverResourceManager(core::mem::transmute(resourcemanagerhandle)) } #[inline] -pub unsafe fn ZwRecoverTransactionManager(transactionmanagerhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRecoverTransactionManager(transactionmanagerhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwRecoverTransactionManager(transactionmanagerhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRecoverTransactionManager(transactionmanagerhandle.param().abi()) + ZwRecoverTransactionManager(core::mem::transmute(transactionmanagerhandle)) } #[inline] -pub unsafe fn ZwRegisterProtocolAddressInformation(resourcemanager: P0, protocolid: *const windows_core::GUID, protocolinformationsize: u32, protocolinformation: *const core::ffi::c_void, createoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRegisterProtocolAddressInformation(resourcemanager: super::super::super::Win32::Foundation::HANDLE, protocolid: *const windows_core::GUID, protocolinformationsize: u32, protocolinformation: *const core::ffi::c_void, createoptions: Option) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwRegisterProtocolAddressInformation(resourcemanager : super::super::super::Win32::Foundation:: HANDLE, protocolid : *const windows_core::GUID, protocolinformationsize : u32, protocolinformation : *const core::ffi::c_void, createoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRegisterProtocolAddressInformation(resourcemanager.param().abi(), core::mem::transmute(protocolid), core::mem::transmute(protocolinformationsize), core::mem::transmute(protocolinformation), core::mem::transmute(createoptions)) + ZwRegisterProtocolAddressInformation(core::mem::transmute(resourcemanager), core::mem::transmute(protocolid), core::mem::transmute(protocolinformationsize), core::mem::transmute(protocolinformation), core::mem::transmute(createoptions.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ZwRenameTransactionManager(logfilename: *const super::super::super::Win32::Foundation::UNICODE_STRING, existingtransactionmanagerguid: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -7385,90 +6795,62 @@ pub unsafe fn ZwRenameTransactionManager(logfilename: *const super::super::super ZwRenameTransactionManager(core::mem::transmute(logfilename), core::mem::transmute(existingtransactionmanagerguid)) } #[inline] -pub unsafe fn ZwRollbackComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRollbackComplete(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwRollbackComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwRollbackEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRollbackEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwRollbackEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwRollbackTransaction(transactionhandle: P0, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwRollbackTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwRollbackTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRollbackTransaction(transactionhandle.param().abi(), wait.param().abi()) + ZwRollbackTransaction(core::mem::transmute(transactionhandle), wait.param().abi()) } #[inline] -pub unsafe fn ZwRollforwardTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwRollforwardTransactionManager(transactionmanagerhandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwRollforwardTransactionManager(core::mem::transmute(transactionmanagerhandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwSetInformationEnlistment(enlistmenthandle: P0, enlistmentinformationclass: super::super::super::Win32::System::SystemServices::ENLISTMENT_INFORMATION_CLASS, enlistmentinformation: *const core::ffi::c_void, enlistmentinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationEnlistment(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, enlistmentinformationclass: super::super::super::Win32::System::SystemServices::ENLISTMENT_INFORMATION_CLASS, enlistmentinformation: *const core::ffi::c_void, enlistmentinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, enlistmentinformationclass : super::super::super::Win32::System::SystemServices:: ENLISTMENT_INFORMATION_CLASS, enlistmentinformation : *const core::ffi::c_void, enlistmentinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentinformationclass), core::mem::transmute(enlistmentinformation), core::mem::transmute(enlistmentinformationlength)) + ZwSetInformationEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(enlistmentinformationclass), core::mem::transmute(enlistmentinformation), core::mem::transmute(enlistmentinformationlength)) } #[cfg(all(feature = "Wdk_Storage_FileSystem", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ZwSetInformationFile(filehandle: P0, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *const core::ffi::c_void, length: u32, fileinformationclass: super::super::Storage::FileSystem::FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *const core::ffi::c_void, length: u32, fileinformationclass: super::super::Storage::FileSystem::FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *const core::ffi::c_void, length : u32, fileinformationclass : super::super::Storage::FileSystem:: FILE_INFORMATION_CLASS) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationFile(filehandle.param().abi(), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) + ZwSetInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwSetInformationResourceManager(resourcemanagerhandle: P0, resourcemanagerinformationclass: super::super::super::Win32::System::SystemServices::RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation: *const core::ffi::c_void, resourcemanagerinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationResourceManager(resourcemanagerhandle: super::super::super::Win32::Foundation::HANDLE, resourcemanagerinformationclass: super::super::super::Win32::System::SystemServices::RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation: *const core::ffi::c_void, resourcemanagerinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationResourceManager(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, resourcemanagerinformationclass : super::super::super::Win32::System::SystemServices:: RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation : *const core::ffi::c_void, resourcemanagerinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationResourceManager(resourcemanagerhandle.param().abi(), core::mem::transmute(resourcemanagerinformationclass), core::mem::transmute(resourcemanagerinformation), core::mem::transmute(resourcemanagerinformationlength)) + ZwSetInformationResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(resourcemanagerinformationclass), core::mem::transmute(resourcemanagerinformation), core::mem::transmute(resourcemanagerinformationlength)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwSetInformationTransaction(transactionhandle: P0, transactioninformationclass: super::super::super::Win32::System::SystemServices::TRANSACTION_INFORMATION_CLASS, transactioninformation: *const core::ffi::c_void, transactioninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, transactioninformationclass: super::super::super::Win32::System::SystemServices::TRANSACTION_INFORMATION_CLASS, transactioninformation: *const core::ffi::c_void, transactioninformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, transactioninformationclass : super::super::super::Win32::System::SystemServices:: TRANSACTION_INFORMATION_CLASS, transactioninformation : *const core::ffi::c_void, transactioninformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationTransaction(transactionhandle.param().abi(), core::mem::transmute(transactioninformationclass), core::mem::transmute(transactioninformation), core::mem::transmute(transactioninformationlength)) + ZwSetInformationTransaction(core::mem::transmute(transactionhandle), core::mem::transmute(transactioninformationclass), core::mem::transmute(transactioninformation), core::mem::transmute(transactioninformationlength)) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] -pub unsafe fn ZwSetInformationTransactionManager(tmhandle: P0, transactionmanagerinformationclass: super::super::super::Win32::System::SystemServices::TRANSACTIONMANAGER_INFORMATION_CLASS, transactionmanagerinformation: *const core::ffi::c_void, transactionmanagerinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationTransactionManager(tmhandle: super::super::super::Win32::Foundation::HANDLE, transactionmanagerinformationclass: super::super::super::Win32::System::SystemServices::TRANSACTIONMANAGER_INFORMATION_CLASS, transactionmanagerinformation: *const core::ffi::c_void, transactionmanagerinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationTransactionManager(tmhandle : super::super::super::Win32::Foundation:: HANDLE, transactionmanagerinformationclass : super::super::super::Win32::System::SystemServices:: TRANSACTIONMANAGER_INFORMATION_CLASS, transactionmanagerinformation : *const core::ffi::c_void, transactionmanagerinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationTransactionManager(tmhandle.param().abi(), core::mem::transmute(transactionmanagerinformationclass), core::mem::transmute(transactionmanagerinformation), core::mem::transmute(transactionmanagerinformationlength)) + ZwSetInformationTransactionManager(core::mem::transmute(tmhandle), core::mem::transmute(transactionmanagerinformationclass), core::mem::transmute(transactionmanagerinformation), core::mem::transmute(transactionmanagerinformationlength)) } #[inline] -pub unsafe fn ZwSinglePhaseReject(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSinglePhaseReject(enlistmenthandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null()))) + ZwSinglePhaseReject(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ZwUnloadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -7477,13 +6859,9 @@ pub unsafe fn ZwUnloadDriver(driverservicename: *const super::super::super::Win3 } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwWriteFile(filehandle: P0, event: P1, apcroutine: super::super::super::Win32::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: Option<*const i64>, key: Option<*const u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwWriteFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: Option<*const i64>, key: Option<*const u32>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null()))) + ZwWriteFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), core::mem::transmute(byteoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn vDbgPrintEx(componentid: u32, level: u32, format: P2, 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 4ef4817a55..ace02119f5 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs @@ -1,16 +1,13 @@ #[inline] -pub unsafe fn NtCancelTimer(timerhandle: P0, currentstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtCancelTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, currentstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut()))) + NtCancelTimer(core::mem::transmute(timerhandle), core::mem::transmute(currentstate.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", 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(core::mem::transmute(timerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(timertype)) + NtCreateTimer(core::mem::transmute(timerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(timertype)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -22,7 +19,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(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(clientid.unwrap_or(core::ptr::null()))) + NtOpenProcess(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(clientid.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -31,78 +28,57 @@ pub unsafe fn NtOpenTimer(timerhandle: *mut super::super::super::Win32::Foundati NtOpenTimer(core::mem::transmute(timerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn NtQueryInformationProcess(processhandle: P0, processinformationclass: PROCESSINFOCLASS, processinformation: *mut core::ffi::c_void, processinformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryInformationProcess(processhandle: super::super::super::Win32::Foundation::HANDLE, processinformationclass: PROCESSINFOCLASS, processinformation: *mut core::ffi::c_void, processinformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationProcess(processhandle : super::super::super::Win32::Foundation:: HANDLE, processinformationclass : PROCESSINFOCLASS, processinformation : *mut core::ffi::c_void, processinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryInformationProcess(processhandle.param().abi(), core::mem::transmute(processinformationclass), core::mem::transmute(processinformation), core::mem::transmute(processinformationlength), core::mem::transmute(returnlength)) + NtQueryInformationProcess(core::mem::transmute(processhandle), core::mem::transmute(processinformationclass), core::mem::transmute(processinformation), core::mem::transmute(processinformationlength), core::mem::transmute(returnlength)) } #[inline] -pub unsafe fn NtQueryInformationThread(threadhandle: P0, threadinformationclass: THREADINFOCLASS, threadinformation: *mut core::ffi::c_void, threadinformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtQueryInformationThread(threadhandle: super::super::super::Win32::Foundation::HANDLE, threadinformationclass: THREADINFOCLASS, threadinformation: *mut core::ffi::c_void, threadinformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationThread(threadhandle : super::super::super::Win32::Foundation:: HANDLE, threadinformationclass : THREADINFOCLASS, threadinformation : *mut core::ffi::c_void, threadinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryInformationThread(threadhandle.param().abi(), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationlength), core::mem::transmute(returnlength)) + NtQueryInformationThread(core::mem::transmute(threadhandle), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationlength), core::mem::transmute(returnlength)) } #[inline] -pub unsafe fn NtSetInformationThread(threadhandle: P0, threadinformationclass: THREADINFOCLASS, threadinformation: *const core::ffi::c_void, threadinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetInformationThread(threadhandle: super::super::super::Win32::Foundation::HANDLE, threadinformationclass: THREADINFOCLASS, threadinformation: *const core::ffi::c_void, threadinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetInformationThread(threadhandle : super::super::super::Win32::Foundation:: HANDLE, threadinformationclass : THREADINFOCLASS, threadinformation : *const core::ffi::c_void, threadinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationThread(threadhandle.param().abi(), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationlength)) + NtSetInformationThread(core::mem::transmute(threadhandle), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationlength)) } #[cfg(feature = "Wdk_System_SystemServices")] #[inline] -pub unsafe fn NtSetTimer(timerhandle: P0, duetime: *const i64, timerapcroutine: super::SystemServices::PTIMER_APC_ROUTINE, timercontext: Option<*const core::ffi::c_void>, resumetimer: P4, period: i32, previousstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtSetTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, duetime: *const i64, timerapcroutine: Option, timercontext: Option<*const core::ffi::c_void>, resumetimer: P4, period: Option, previousstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P4: 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(), core::mem::transmute(duetime), core::mem::transmute(timerapcroutine), core::mem::transmute(timercontext.unwrap_or(core::ptr::null())), resumetimer.param().abi(), core::mem::transmute(period), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut()))) + NtSetTimer(core::mem::transmute(timerhandle), core::mem::transmute(duetime), core::mem::transmute(timerapcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(timercontext.unwrap_or(core::mem::zeroed())), resumetimer.param().abi(), core::mem::transmute(period.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn NtSetTimerEx(timerhandle: super::super::super::Win32::Foundation::HANDLE, timersetinformationclass: TIMER_SET_INFORMATION_CLASS, timersetinformation: Option<*mut core::ffi::c_void>, timersetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(timersetinformationclass), core::mem::transmute(timersetinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(timersetinformationlength)) + NtSetTimerEx(core::mem::transmute(timerhandle), core::mem::transmute(timersetinformationclass), core::mem::transmute(timersetinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(timersetinformationlength)) } #[inline] -pub unsafe fn NtTerminateProcess(processhandle: P0, exitstatus: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NtTerminateProcess(processhandle: Option, exitstatus: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtTerminateProcess(processhandle : super::super::super::Win32::Foundation:: HANDLE, exitstatus : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtTerminateProcess(processhandle.param().abi(), exitstatus.param().abi()) + NtTerminateProcess(core::mem::transmute(processhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(exitstatus)) } #[inline] -pub unsafe fn NtWaitForSingleObject(handle: P0, alertable: P1, timeout: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn NtWaitForSingleObject(handle: super::super::super::Win32::Foundation::HANDLE, alertable: P1, timeout: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtWaitForSingleObject(handle : super::super::super::Win32::Foundation:: HANDLE, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtWaitForSingleObject(handle.param().abi(), alertable.param().abi(), core::mem::transmute(timeout)) + NtWaitForSingleObject(core::mem::transmute(handle), alertable.param().abi(), core::mem::transmute(timeout)) } #[inline] -pub unsafe fn ZwCancelTimer(timerhandle: P0, currentstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwCancelTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, currentstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { 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(core::ptr::null_mut()))) + ZwCancelTimer(core::mem::transmute(timerhandle), core::mem::transmute(currentstate.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", 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(core::mem::transmute(timerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(timertype)) + ZwCreateTimer(core::mem::transmute(timerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(timertype)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -114,7 +90,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(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(clientid.unwrap_or(core::ptr::null()))) + ZwOpenProcess(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes), core::mem::transmute(clientid.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -123,64 +99,46 @@ pub unsafe fn ZwOpenTimer(timerhandle: *mut super::super::super::Win32::Foundati ZwOpenTimer(core::mem::transmute(timerhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn ZwQueryInformationProcess(processhandle: P0, processinformationclass: PROCESSINFOCLASS, processinformation: *mut core::ffi::c_void, processinformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryInformationProcess(processhandle: super::super::super::Win32::Foundation::HANDLE, processinformationclass: PROCESSINFOCLASS, processinformation: *mut core::ffi::c_void, processinformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationProcess(processhandle : super::super::super::Win32::Foundation:: HANDLE, processinformationclass : PROCESSINFOCLASS, processinformation : *mut core::ffi::c_void, processinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryInformationProcess(processhandle.param().abi(), core::mem::transmute(processinformationclass), core::mem::transmute(processinformation), core::mem::transmute(processinformationlength), core::mem::transmute(returnlength)) + ZwQueryInformationProcess(core::mem::transmute(processhandle), core::mem::transmute(processinformationclass), core::mem::transmute(processinformation), core::mem::transmute(processinformationlength), core::mem::transmute(returnlength)) } #[inline] -pub unsafe fn ZwQueryInformationThread(threadhandle: P0, threadinformationclass: THREADINFOCLASS, threadinformation: *mut core::ffi::c_void, threadinformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwQueryInformationThread(threadhandle: super::super::super::Win32::Foundation::HANDLE, threadinformationclass: THREADINFOCLASS, threadinformation: *mut core::ffi::c_void, threadinformationlength: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationThread(threadhandle : super::super::super::Win32::Foundation:: HANDLE, threadinformationclass : THREADINFOCLASS, threadinformation : *mut core::ffi::c_void, threadinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryInformationThread(threadhandle.param().abi(), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationlength), core::mem::transmute(returnlength)) + ZwQueryInformationThread(core::mem::transmute(threadhandle), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationlength), core::mem::transmute(returnlength)) } #[inline] -pub unsafe fn ZwSetInformationThread(threadhandle: P0, threadinformationclass: THREADINFOCLASS, threadinformation: *const core::ffi::c_void, threadinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetInformationThread(threadhandle: super::super::super::Win32::Foundation::HANDLE, threadinformationclass: THREADINFOCLASS, threadinformation: *const core::ffi::c_void, threadinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationThread(threadhandle : super::super::super::Win32::Foundation:: HANDLE, threadinformationclass : THREADINFOCLASS, threadinformation : *const core::ffi::c_void, threadinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationThread(threadhandle.param().abi(), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationlength)) + ZwSetInformationThread(core::mem::transmute(threadhandle), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationlength)) } #[cfg(feature = "Wdk_System_SystemServices")] #[inline] -pub unsafe fn ZwSetTimer(timerhandle: P0, duetime: *const i64, timerapcroutine: super::SystemServices::PTIMER_APC_ROUTINE, timercontext: Option<*const core::ffi::c_void>, resumetimer: P4, period: i32, previousstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwSetTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, duetime: *const i64, timerapcroutine: Option, timercontext: Option<*const core::ffi::c_void>, resumetimer: P4, period: Option, previousstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, P4: 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(), core::mem::transmute(duetime), core::mem::transmute(timerapcroutine), core::mem::transmute(timercontext.unwrap_or(core::ptr::null())), resumetimer.param().abi(), core::mem::transmute(period), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut()))) + ZwSetTimer(core::mem::transmute(timerhandle), core::mem::transmute(duetime), core::mem::transmute(timerapcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(timercontext.unwrap_or(core::mem::zeroed())), resumetimer.param().abi(), core::mem::transmute(period.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn ZwSetTimerEx(timerhandle: super::super::super::Win32::Foundation::HANDLE, timersetinformationclass: TIMER_SET_INFORMATION_CLASS, timersetinformation: Option<*mut core::ffi::c_void>, timersetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { 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(), core::mem::transmute(timersetinformationclass), core::mem::transmute(timersetinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(timersetinformationlength)) + ZwSetTimerEx(core::mem::transmute(timerhandle), core::mem::transmute(timersetinformationclass), core::mem::transmute(timersetinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(timersetinformationlength)) } #[inline] -pub unsafe fn ZwTerminateProcess(processhandle: P0, exitstatus: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ZwTerminateProcess(processhandle: Option, exitstatus: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwTerminateProcess(processhandle : super::super::super::Win32::Foundation:: HANDLE, exitstatus : super::super::super::Win32::Foundation:: NTSTATUS) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwTerminateProcess(processhandle.param().abi(), exitstatus.param().abi()) + ZwTerminateProcess(core::mem::transmute(processhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(exitstatus)) } #[inline] -pub unsafe fn ZwWaitForSingleObject(handle: P0, alertable: P1, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS +pub unsafe fn ZwWaitForSingleObject(handle: super::super::super::Win32::Foundation::HANDLE, alertable: P1, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS where - P0: windows_core::Param, 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(core::ptr::null()))) + ZwWaitForSingleObject(core::mem::transmute(handle), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } 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 4a8610d877..e929d46cdb 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 @@ -3270,14 +3270,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(core::ptr::null()))) + (windows_core::Interface::vtable(self).BindTemporaryResource)(windows_core::Interface::as_raw(self), core::mem::transmute(binding.unwrap_or(core::mem::zeroed()))) } 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(core::ptr::null()))) + (windows_core::Interface::vtable(self).BindPersistentResource)(windows_core::Interface::as_raw(self), core::mem::transmute(binding.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), core::mem::transmute(desc.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3447,7 +3447,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), core::mem::transmute(feature), core::mem::transmute(featurequerydatasize), core::mem::transmute(featurequerydata.unwrap_or(core::ptr::null())), core::mem::transmute(featuresupportdatasize), core::mem::transmute(featuresupportdata)).ok() + (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(feature), core::mem::transmute(featurequerydatasize), core::mem::transmute(featurequerydata.unwrap_or(core::mem::zeroed())), core::mem::transmute(featuresupportdatasize), core::mem::transmute(featuresupportdata)).ok() } pub unsafe fn CreateOperator(&self, desc: *const DML_OPERATOR_DESC, result__: *mut Option) -> windows_core::Result<()> where @@ -3482,7 +3482,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(core::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::mem::zeroed())), &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() @@ -3712,10 +3712,10 @@ windows_core::imp::define_interface!(IDMLObject, IDMLObject_Vtbl, 0xc8263aac_9e0 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), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(data.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(data.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, data: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs index e9884281d3..0bbbbad8c6 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs @@ -1,20 +1,18 @@ #[inline] -pub unsafe fn HtmlHelpA(hwndcaller: P0, pszfile: P1, ucommand: HTML_HELP_COMMAND, dwdata: usize) -> super::super::Foundation::HWND +pub unsafe fn HtmlHelpA(hwndcaller: Option, pszfile: P1, ucommand: HTML_HELP_COMMAND, dwdata: usize) -> super::super::Foundation::HWND where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("hhctrl.ocx" "system" fn HtmlHelpA(hwndcaller : super::super::Foundation:: HWND, pszfile : windows_core::PCSTR, ucommand : u32, dwdata : usize) -> super::super::Foundation:: HWND); - HtmlHelpA(hwndcaller.param().abi(), pszfile.param().abi(), ucommand.0 as _, core::mem::transmute(dwdata)) + HtmlHelpA(core::mem::transmute(hwndcaller.unwrap_or(core::mem::zeroed())), pszfile.param().abi(), ucommand.0 as _, core::mem::transmute(dwdata)) } #[inline] -pub unsafe fn HtmlHelpW(hwndcaller: P0, pszfile: P1, ucommand: HTML_HELP_COMMAND, dwdata: usize) -> super::super::Foundation::HWND +pub unsafe fn HtmlHelpW(hwndcaller: Option, pszfile: P1, ucommand: HTML_HELP_COMMAND, dwdata: usize) -> super::super::Foundation::HWND where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("hhctrl.ocx" "system" fn HtmlHelpW(hwndcaller : super::super::Foundation:: HWND, pszfile : windows_core::PCWSTR, ucommand : u32, dwdata : usize) -> super::super::Foundation:: HWND); - HtmlHelpW(hwndcaller.param().abi(), pszfile.param().abi(), ucommand.0 as _, core::mem::transmute(dwdata)) + HtmlHelpW(core::mem::transmute(hwndcaller.unwrap_or(core::mem::zeroed())), pszfile.param().abi(), ucommand.0 as _, core::mem::transmute(dwdata)) } pub const CLSID_IITCmdInt: windows_core::GUID = windows_core::GUID::from_u128(0x4662daa2_d393_11d0_9a56_00c04fb68bf7); pub const CLSID_IITDatabase: windows_core::GUID = windows_core::GUID::from_u128(0x66673452_8c23_11d0_a84e_00aa006c7d01); 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 fab47c8ca3..6dcad8db41 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs @@ -27,12 +27,9 @@ where DRMAcquireLicense(core::mem::transmute(hsession), core::mem::transmute(uflags), wszgroupidentitycredential.param().abi(), wszrequestedrights.param().abi(), wszcustomdata.param().abi(), wszurl.param().abi(), core::mem::transmute(pvcontext)).ok() } #[inline] -pub unsafe fn DRMActivate(hclient: u32, uflags: u32, ulangid: u32, pactservinfo: *mut DRM_ACTSERV_INFO, pvcontext: *mut core::ffi::c_void, hparentwnd: P5) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn DRMActivate(hclient: u32, uflags: u32, ulangid: u32, pactservinfo: *mut DRM_ACTSERV_INFO, pvcontext: *mut core::ffi::c_void, hparentwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMActivate(hclient : u32, uflags : u32, ulangid : u32, pactservinfo : *mut DRM_ACTSERV_INFO, pvcontext : *mut core::ffi::c_void, hparentwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - DRMActivate(core::mem::transmute(hclient), core::mem::transmute(uflags), core::mem::transmute(ulangid), core::mem::transmute(pactservinfo), core::mem::transmute(pvcontext), hparentwnd.param().abi()).ok() + DRMActivate(core::mem::transmute(hclient), core::mem::transmute(uflags), core::mem::transmute(ulangid), core::mem::transmute(pactservinfo), core::mem::transmute(pvcontext), core::mem::transmute(hparentwnd)).ok() } #[inline] pub unsafe fn DRMAddLicense(hlicensestorage: u32, uflags: u32, wszlicense: P2) -> windows_core::Result<()> @@ -91,9 +88,9 @@ pub unsafe fn DRMCloseSession(hsession: u32) -> windows_core::Result<()> { DRMCloseSession(core::mem::transmute(hsession)).ok() } #[inline] -pub unsafe fn DRMConstructCertificateChain(rgwszcertificates: &[windows_core::PCWSTR], pcchain: *mut u32, wszchain: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMConstructCertificateChain(rgwszcertificates: &[windows_core::PCWSTR], pcchain: *mut u32, wszchain: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMConstructCertificateChain(ccertificates : u32, rgwszcertificates : *const windows_core::PCWSTR, pcchain : *mut u32, wszchain : windows_core::PWSTR) -> windows_core::HRESULT); - DRMConstructCertificateChain(rgwszcertificates.len().try_into().unwrap(), core::mem::transmute(rgwszcertificates.as_ptr()), core::mem::transmute(pcchain), core::mem::transmute(wszchain)).ok() + DRMConstructCertificateChain(rgwszcertificates.len().try_into().unwrap(), core::mem::transmute(rgwszcertificates.as_ptr()), core::mem::transmute(pcchain), core::mem::transmute(wszchain.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DRMCreateBoundLicense(henv: u32, pparams: *mut DRMBOUNDLICENSEPARAMS, wszlicensechain: P2, phboundlicense: *mut u32, pherrorlog: *mut u32) -> windows_core::Result<()> @@ -163,7 +160,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(), core::mem::transmute(pstfrom), core::mem::transmute(pstuntil), core::mem::transmute(cextendedinfo), core::mem::transmute(pwszextendedinfoname.unwrap_or(core::ptr::null())), core::mem::transmute(pwszextendedinfovalue.unwrap_or(core::ptr::null())), core::mem::transmute(phright)).ok() + DRMCreateRight(wszrightname.param().abi(), core::mem::transmute(pstfrom), core::mem::transmute(pstuntil), core::mem::transmute(cextendedinfo), core::mem::transmute(pwszextendedinfoname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwszextendedinfovalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(phright)).ok() } #[inline] pub unsafe fn DRMCreateUser(wszusername: P0, wszuserid: P1, wszuseridtype: P2, phuser: *mut u32) -> windows_core::Result<()> @@ -185,12 +182,12 @@ where DRMDecode(wszalgid.param().abi(), wszencodedstring.param().abi(), core::mem::transmute(pudecodeddatalen), core::mem::transmute(pbdecodeddata)).ok() } #[inline] -pub unsafe fn DRMDeconstructCertificateChain(wszchain: P0, iwhich: u32, pccert: *mut u32, wszcert: windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn DRMDeconstructCertificateChain(wszchain: P0, iwhich: u32, pccert: *mut u32, wszcert: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMDeconstructCertificateChain(wszchain : windows_core::PCWSTR, iwhich : u32, pccert : *mut u32, wszcert : windows_core::PWSTR) -> windows_core::HRESULT); - DRMDeconstructCertificateChain(wszchain.param().abi(), core::mem::transmute(iwhich), core::mem::transmute(pccert), core::mem::transmute(wszcert)).ok() + DRMDeconstructCertificateChain(wszchain.param().abi(), core::mem::transmute(iwhich), core::mem::transmute(pccert), core::mem::transmute(wszcert.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DRMDecrypt(hcryptoprovider: u32, iposition: u32, cnuminbytes: u32, pbindata: *mut u8, pcnumoutbytes: *mut u32, pboutdata: *mut u8) -> windows_core::Result<()> { @@ -226,12 +223,12 @@ pub unsafe fn DRMDuplicateSession(hsessionin: u32, phsessionout: *mut u32) -> wi DRMDuplicateSession(core::mem::transmute(hsessionin), core::mem::transmute(phsessionout)).ok() } #[inline] -pub unsafe fn DRMEncode(wszalgid: P0, udatalen: u32, pbdecodeddata: *mut u8, puencodedstringlen: *mut u32, wszencodedstring: windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn DRMEncode(wszalgid: P0, udatalen: u32, pbdecodeddata: *mut u8, puencodedstringlen: *mut u32, wszencodedstring: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMEncode(wszalgid : windows_core::PCWSTR, udatalen : u32, pbdecodeddata : *mut u8, puencodedstringlen : *mut u32, wszencodedstring : windows_core::PWSTR) -> windows_core::HRESULT); - DRMEncode(wszalgid.param().abi(), core::mem::transmute(udatalen), core::mem::transmute(pbdecodeddata), core::mem::transmute(puencodedstringlen), core::mem::transmute(wszencodedstring)).ok() + DRMEncode(wszalgid.param().abi(), core::mem::transmute(udatalen), core::mem::transmute(pbdecodeddata), core::mem::transmute(puencodedstringlen), core::mem::transmute(wszencodedstring.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DRMEncrypt(hcryptoprovider: u32, iposition: u32, cnuminbytes: u32, pbindata: *mut u8, pcnumoutbytes: *mut u32, pboutdata: *mut u8) -> windows_core::Result<()> { @@ -239,14 +236,14 @@ pub unsafe fn DRMEncrypt(hcryptoprovider: u32, iposition: u32, cnuminbytes: u32, DRMEncrypt(core::mem::transmute(hcryptoprovider), core::mem::transmute(iposition), core::mem::transmute(cnuminbytes), core::mem::transmute(pbindata), core::mem::transmute(pcnumoutbytes), core::mem::transmute(pboutdata)).ok() } #[inline] -pub unsafe fn DRMEnumerateLicense(hsession: u32, uflags: u32, uindex: u32, pfsharedflag: *mut super::super::Foundation::BOOL, pucertificatedatalen: *mut u32, wszcertificatedata: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMEnumerateLicense(hsession: u32, uflags: u32, uindex: u32, pfsharedflag: *mut super::super::Foundation::BOOL, pucertificatedatalen: *mut u32, wszcertificatedata: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMEnumerateLicense(hsession : u32, uflags : u32, uindex : u32, pfsharedflag : *mut super::super::Foundation:: BOOL, pucertificatedatalen : *mut u32, wszcertificatedata : windows_core::PWSTR) -> windows_core::HRESULT); - DRMEnumerateLicense(core::mem::transmute(hsession), core::mem::transmute(uflags), core::mem::transmute(uindex), core::mem::transmute(pfsharedflag), core::mem::transmute(pucertificatedatalen), core::mem::transmute(wszcertificatedata)).ok() + DRMEnumerateLicense(core::mem::transmute(hsession), core::mem::transmute(uflags), core::mem::transmute(uindex), core::mem::transmute(pfsharedflag), core::mem::transmute(pucertificatedatalen), core::mem::transmute(wszcertificatedata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DRMGetApplicationSpecificData(hissuancelicense: u32, uindex: u32, punamelength: *mut u32, wszname: windows_core::PWSTR, puvaluelength: *mut u32, wszvalue: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetApplicationSpecificData(hissuancelicense: u32, uindex: u32, punamelength: *mut u32, wszname: Option, puvaluelength: *mut u32, wszvalue: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetApplicationSpecificData(hissuancelicense : u32, uindex : u32, punamelength : *mut u32, wszname : windows_core::PWSTR, puvaluelength : *mut u32, wszvalue : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetApplicationSpecificData(core::mem::transmute(hissuancelicense), core::mem::transmute(uindex), core::mem::transmute(punamelength), core::mem::transmute(wszname), core::mem::transmute(puvaluelength), core::mem::transmute(wszvalue)).ok() + DRMGetApplicationSpecificData(core::mem::transmute(hissuancelicense), core::mem::transmute(uindex), core::mem::transmute(punamelength), core::mem::transmute(wszname.unwrap_or(core::mem::zeroed())), core::mem::transmute(puvaluelength), core::mem::transmute(wszvalue.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DRMGetBoundLicenseAttribute(hqueryroot: u32, wszattribute: P1, iwhich: u32, peencoding: *mut DRMENCODINGTYPE, pcbuffer: *mut u32, pbbuffer: *mut u8) -> windows_core::Result<()> @@ -315,44 +312,44 @@ pub unsafe fn DRMGetIntervalTime(hissuancelicense: u32, pcdays: *mut u32) -> win DRMGetIntervalTime(core::mem::transmute(hissuancelicense), core::mem::transmute(pcdays)).ok() } #[inline] -pub unsafe fn DRMGetIssuanceLicenseInfo(hissuancelicense: u32, psttimefrom: *mut super::super::Foundation::SYSTEMTIME, psttimeuntil: *mut super::super::Foundation::SYSTEMTIME, uflags: u32, pudistributionpointnamelength: *mut u32, wszdistributionpointname: windows_core::PWSTR, pudistributionpointurllength: *mut u32, wszdistributionpointurl: windows_core::PWSTR, phowner: *mut u32, pfofficial: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { +pub unsafe fn DRMGetIssuanceLicenseInfo(hissuancelicense: u32, psttimefrom: *mut super::super::Foundation::SYSTEMTIME, psttimeuntil: *mut super::super::Foundation::SYSTEMTIME, uflags: u32, pudistributionpointnamelength: *mut u32, wszdistributionpointname: Option, pudistributionpointurllength: *mut u32, wszdistributionpointurl: Option, phowner: *mut u32, pfofficial: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetIssuanceLicenseInfo(hissuancelicense : u32, psttimefrom : *mut super::super::Foundation:: SYSTEMTIME, psttimeuntil : *mut super::super::Foundation:: SYSTEMTIME, uflags : u32, pudistributionpointnamelength : *mut u32, wszdistributionpointname : windows_core::PWSTR, pudistributionpointurllength : *mut u32, wszdistributionpointurl : windows_core::PWSTR, phowner : *mut u32, pfofficial : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DRMGetIssuanceLicenseInfo(core::mem::transmute(hissuancelicense), core::mem::transmute(psttimefrom), core::mem::transmute(psttimeuntil), core::mem::transmute(uflags), core::mem::transmute(pudistributionpointnamelength), core::mem::transmute(wszdistributionpointname), core::mem::transmute(pudistributionpointurllength), core::mem::transmute(wszdistributionpointurl), core::mem::transmute(phowner), core::mem::transmute(pfofficial)).ok() + DRMGetIssuanceLicenseInfo(core::mem::transmute(hissuancelicense), core::mem::transmute(psttimefrom), core::mem::transmute(psttimeuntil), core::mem::transmute(uflags), core::mem::transmute(pudistributionpointnamelength), core::mem::transmute(wszdistributionpointname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pudistributionpointurllength), core::mem::transmute(wszdistributionpointurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(phowner), core::mem::transmute(pfofficial)).ok() } #[inline] -pub unsafe fn DRMGetIssuanceLicenseTemplate(hissuancelicense: u32, puissuancelicensetemplatelength: *mut u32, wszissuancelicensetemplate: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetIssuanceLicenseTemplate(hissuancelicense: u32, puissuancelicensetemplatelength: *mut u32, wszissuancelicensetemplate: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetIssuanceLicenseTemplate(hissuancelicense : u32, puissuancelicensetemplatelength : *mut u32, wszissuancelicensetemplate : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetIssuanceLicenseTemplate(core::mem::transmute(hissuancelicense), core::mem::transmute(puissuancelicensetemplatelength), core::mem::transmute(wszissuancelicensetemplate)).ok() + DRMGetIssuanceLicenseTemplate(core::mem::transmute(hissuancelicense), core::mem::transmute(puissuancelicensetemplatelength), core::mem::transmute(wszissuancelicensetemplate.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DRMGetMetaData(hissuancelicense: u32, pucontentidlength: *mut u32, wszcontentid: windows_core::PWSTR, pucontentidtypelength: *mut u32, wszcontentidtype: windows_core::PWSTR, puskuidlength: *mut u32, wszskuid: windows_core::PWSTR, puskuidtypelength: *mut u32, wszskuidtype: windows_core::PWSTR, pucontenttypelength: *mut u32, wszcontenttype: windows_core::PWSTR, pucontentnamelength: *mut u32, wszcontentname: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetMetaData(hissuancelicense: u32, pucontentidlength: *mut u32, wszcontentid: Option, pucontentidtypelength: *mut u32, wszcontentidtype: Option, puskuidlength: *mut u32, wszskuid: Option, puskuidtypelength: *mut u32, wszskuidtype: Option, pucontenttypelength: *mut u32, wszcontenttype: Option, pucontentnamelength: *mut u32, wszcontentname: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetMetaData(hissuancelicense : u32, pucontentidlength : *mut u32, wszcontentid : windows_core::PWSTR, pucontentidtypelength : *mut u32, wszcontentidtype : windows_core::PWSTR, puskuidlength : *mut u32, wszskuid : windows_core::PWSTR, puskuidtypelength : *mut u32, wszskuidtype : windows_core::PWSTR, pucontenttypelength : *mut u32, wszcontenttype : windows_core::PWSTR, pucontentnamelength : *mut u32, wszcontentname : windows_core::PWSTR) -> windows_core::HRESULT); DRMGetMetaData( core::mem::transmute(hissuancelicense), core::mem::transmute(pucontentidlength), - core::mem::transmute(wszcontentid), + core::mem::transmute(wszcontentid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pucontentidtypelength), - core::mem::transmute(wszcontentidtype), + core::mem::transmute(wszcontentidtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(puskuidlength), - core::mem::transmute(wszskuid), + core::mem::transmute(wszskuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(puskuidtypelength), - core::mem::transmute(wszskuidtype), + core::mem::transmute(wszskuidtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pucontenttypelength), - core::mem::transmute(wszcontenttype), + core::mem::transmute(wszcontenttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pucontentnamelength), - core::mem::transmute(wszcontentname), + core::mem::transmute(wszcontentname.unwrap_or(core::mem::zeroed())), ) .ok() } #[inline] -pub unsafe fn DRMGetNameAndDescription(hissuancelicense: u32, uindex: u32, pulcid: *mut u32, punamelength: *mut u32, wszname: windows_core::PWSTR, pudescriptionlength: *mut u32, wszdescription: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetNameAndDescription(hissuancelicense: u32, uindex: u32, pulcid: *mut u32, punamelength: *mut u32, wszname: Option, pudescriptionlength: *mut u32, wszdescription: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetNameAndDescription(hissuancelicense : u32, uindex : u32, pulcid : *mut u32, punamelength : *mut u32, wszname : windows_core::PWSTR, pudescriptionlength : *mut u32, wszdescription : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetNameAndDescription(core::mem::transmute(hissuancelicense), core::mem::transmute(uindex), core::mem::transmute(pulcid), core::mem::transmute(punamelength), core::mem::transmute(wszname), core::mem::transmute(pudescriptionlength), core::mem::transmute(wszdescription)).ok() + DRMGetNameAndDescription(core::mem::transmute(hissuancelicense), core::mem::transmute(uindex), core::mem::transmute(pulcid), core::mem::transmute(punamelength), core::mem::transmute(wszname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pudescriptionlength), core::mem::transmute(wszdescription.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DRMGetOwnerLicense(hissuancelicense: u32, puownerlicenselength: *mut u32, wszownerlicense: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetOwnerLicense(hissuancelicense: u32, puownerlicenselength: *mut u32, wszownerlicense: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetOwnerLicense(hissuancelicense : u32, puownerlicenselength : *mut u32, wszownerlicense : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetOwnerLicense(core::mem::transmute(hissuancelicense), core::mem::transmute(puownerlicenselength), core::mem::transmute(wszownerlicense)).ok() + DRMGetOwnerLicense(core::mem::transmute(hissuancelicense), core::mem::transmute(puownerlicenselength), core::mem::transmute(wszownerlicense.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DRMGetProcAddress(hlibrary: u32, wszprocname: P1, ppfnprocaddress: *mut super::super::Foundation::FARPROC) -> windows_core::Result<()> @@ -363,32 +360,46 @@ where DRMGetProcAddress(core::mem::transmute(hlibrary), wszprocname.param().abi(), core::mem::transmute(ppfnprocaddress)).ok() } #[inline] -pub unsafe fn DRMGetRevocationPoint(hissuancelicense: u32, puidlength: *mut u32, wszid: windows_core::PWSTR, puidtypelength: *mut u32, wszidtype: windows_core::PWSTR, puurllength: *mut u32, wszrl: windows_core::PWSTR, pstfrequency: *mut super::super::Foundation::SYSTEMTIME, punamelength: *mut u32, wszname: windows_core::PWSTR, pupublickeylength: *mut u32, wszpublickey: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetRevocationPoint(hissuancelicense: u32, puidlength: *mut u32, wszid: Option, puidtypelength: *mut u32, wszidtype: Option, puurllength: *mut u32, wszrl: Option, pstfrequency: *mut super::super::Foundation::SYSTEMTIME, punamelength: *mut u32, wszname: Option, pupublickeylength: *mut u32, wszpublickey: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetRevocationPoint(hissuancelicense : u32, puidlength : *mut u32, wszid : windows_core::PWSTR, puidtypelength : *mut u32, wszidtype : windows_core::PWSTR, puurllength : *mut u32, wszrl : windows_core::PWSTR, pstfrequency : *mut super::super::Foundation:: SYSTEMTIME, punamelength : *mut u32, wszname : windows_core::PWSTR, pupublickeylength : *mut u32, wszpublickey : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetRevocationPoint(core::mem::transmute(hissuancelicense), core::mem::transmute(puidlength), core::mem::transmute(wszid), core::mem::transmute(puidtypelength), core::mem::transmute(wszidtype), core::mem::transmute(puurllength), core::mem::transmute(wszrl), core::mem::transmute(pstfrequency), core::mem::transmute(punamelength), core::mem::transmute(wszname), core::mem::transmute(pupublickeylength), core::mem::transmute(wszpublickey)).ok() + DRMGetRevocationPoint( + core::mem::transmute(hissuancelicense), + core::mem::transmute(puidlength), + core::mem::transmute(wszid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(puidtypelength), + core::mem::transmute(wszidtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(puurllength), + core::mem::transmute(wszrl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pstfrequency), + core::mem::transmute(punamelength), + core::mem::transmute(wszname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pupublickeylength), + core::mem::transmute(wszpublickey.unwrap_or(core::mem::zeroed())), + ) + .ok() } #[inline] -pub unsafe fn DRMGetRightExtendedInfo(hright: u32, uindex: u32, puextendedinfonamelength: *mut u32, wszextendedinfoname: windows_core::PWSTR, puextendedinfovaluelength: *mut u32, wszextendedinfovalue: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetRightExtendedInfo(hright: u32, uindex: u32, puextendedinfonamelength: *mut u32, wszextendedinfoname: Option, puextendedinfovaluelength: *mut u32, wszextendedinfovalue: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetRightExtendedInfo(hright : u32, uindex : u32, puextendedinfonamelength : *mut u32, wszextendedinfoname : windows_core::PWSTR, puextendedinfovaluelength : *mut u32, wszextendedinfovalue : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetRightExtendedInfo(core::mem::transmute(hright), core::mem::transmute(uindex), core::mem::transmute(puextendedinfonamelength), core::mem::transmute(wszextendedinfoname), core::mem::transmute(puextendedinfovaluelength), core::mem::transmute(wszextendedinfovalue)).ok() + DRMGetRightExtendedInfo(core::mem::transmute(hright), core::mem::transmute(uindex), core::mem::transmute(puextendedinfonamelength), core::mem::transmute(wszextendedinfoname.unwrap_or(core::mem::zeroed())), core::mem::transmute(puextendedinfovaluelength), core::mem::transmute(wszextendedinfovalue.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DRMGetRightInfo(hright: u32, purightnamelength: *mut u32, wszrightname: windows_core::PWSTR, pstfrom: *mut super::super::Foundation::SYSTEMTIME, pstuntil: *mut super::super::Foundation::SYSTEMTIME) -> windows_core::Result<()> { +pub unsafe fn DRMGetRightInfo(hright: u32, purightnamelength: *mut u32, wszrightname: Option, pstfrom: *mut super::super::Foundation::SYSTEMTIME, pstuntil: *mut super::super::Foundation::SYSTEMTIME) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetRightInfo(hright : u32, purightnamelength : *mut u32, wszrightname : windows_core::PWSTR, pstfrom : *mut super::super::Foundation:: SYSTEMTIME, pstuntil : *mut super::super::Foundation:: SYSTEMTIME) -> windows_core::HRESULT); - DRMGetRightInfo(core::mem::transmute(hright), core::mem::transmute(purightnamelength), core::mem::transmute(wszrightname), core::mem::transmute(pstfrom), core::mem::transmute(pstuntil)).ok() + DRMGetRightInfo(core::mem::transmute(hright), core::mem::transmute(purightnamelength), core::mem::transmute(wszrightname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstfrom), core::mem::transmute(pstuntil)).ok() } #[inline] -pub unsafe fn DRMGetSecurityProvider(uflags: u32, putypelen: *mut u32, wsztype: windows_core::PWSTR, pupathlen: *mut u32, wszpath: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetSecurityProvider(uflags: u32, putypelen: *mut u32, wsztype: Option, pupathlen: *mut u32, wszpath: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetSecurityProvider(uflags : u32, putypelen : *mut u32, wsztype : windows_core::PWSTR, pupathlen : *mut u32, wszpath : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetSecurityProvider(core::mem::transmute(uflags), core::mem::transmute(putypelen), core::mem::transmute(wsztype), core::mem::transmute(pupathlen), core::mem::transmute(wszpath)).ok() + DRMGetSecurityProvider(core::mem::transmute(uflags), core::mem::transmute(putypelen), core::mem::transmute(wsztype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pupathlen), core::mem::transmute(wszpath.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DRMGetServiceLocation(hclient: u32, uservicetype: u32, uservicelocation: u32, wszissuancelicense: P3, puserviceurllength: *mut u32, wszserviceurl: windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn DRMGetServiceLocation(hclient: u32, uservicetype: u32, uservicelocation: u32, wszissuancelicense: P3, puserviceurllength: *mut u32, wszserviceurl: Option) -> windows_core::Result<()> where P3: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetServiceLocation(hclient : u32, uservicetype : u32, uservicelocation : u32, wszissuancelicense : windows_core::PCWSTR, puserviceurllength : *mut u32, wszserviceurl : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetServiceLocation(core::mem::transmute(hclient), core::mem::transmute(uservicetype), core::mem::transmute(uservicelocation), wszissuancelicense.param().abi(), core::mem::transmute(puserviceurllength), core::mem::transmute(wszserviceurl)).ok() + DRMGetServiceLocation(core::mem::transmute(hclient), core::mem::transmute(uservicetype), core::mem::transmute(uservicelocation), wszissuancelicense.param().abi(), core::mem::transmute(puserviceurllength), core::mem::transmute(wszserviceurl.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DRMGetSignedIssuanceLicense(henv: u32, hissuancelicense: u32, uflags: u32, pbsymkey: *mut u8, cbsymkey: u32, wszsymkeytype: P5, wszclientlicensorcertificate: P6, pfncallback: DRMCALLBACK, wszurl: P8, pvcontext: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -413,7 +424,7 @@ where 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())), + core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(henablingprincipal), core::mem::transmute(hboundlicenseclc), core::mem::transmute(pfncallback), @@ -459,7 +470,7 @@ where DRMGetUnboundLicenseObjectCount(core::mem::transmute(hqueryroot), wszsubobjecttype.param().abi(), core::mem::transmute(pcsubobjects)).ok() } #[inline] -pub unsafe fn DRMGetUsagePolicy(hissuancelicense: u32, uindex: u32, peusagepolicytype: *mut DRM_USAGEPOLICY_TYPE, pfexclusion: *mut super::super::Foundation::BOOL, punamelength: *mut u32, wszname: windows_core::PWSTR, puminversionlength: *mut u32, wszminversion: windows_core::PWSTR, pumaxversionlength: *mut u32, wszmaxversion: windows_core::PWSTR, pupublickeylength: *mut u32, wszpublickey: windows_core::PWSTR, pudigestalgorithmlength: *mut u32, wszdigestalgorithm: windows_core::PWSTR, pcbdigest: *mut u32, pbdigest: *mut u8) -> windows_core::Result<()> { +pub unsafe fn DRMGetUsagePolicy(hissuancelicense: u32, uindex: u32, peusagepolicytype: *mut DRM_USAGEPOLICY_TYPE, pfexclusion: *mut super::super::Foundation::BOOL, punamelength: *mut u32, wszname: Option, puminversionlength: *mut u32, wszminversion: Option, pumaxversionlength: *mut u32, wszmaxversion: Option, pupublickeylength: *mut u32, wszpublickey: Option, pudigestalgorithmlength: *mut u32, wszdigestalgorithm: Option, pcbdigest: *mut u32, pbdigest: *mut u8) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetUsagePolicy(hissuancelicense : u32, uindex : u32, peusagepolicytype : *mut DRM_USAGEPOLICY_TYPE, pfexclusion : *mut super::super::Foundation:: BOOL, punamelength : *mut u32, wszname : windows_core::PWSTR, puminversionlength : *mut u32, wszminversion : windows_core::PWSTR, pumaxversionlength : *mut u32, wszmaxversion : windows_core::PWSTR, pupublickeylength : *mut u32, wszpublickey : windows_core::PWSTR, pudigestalgorithmlength : *mut u32, wszdigestalgorithm : windows_core::PWSTR, pcbdigest : *mut u32, pbdigest : *mut u8) -> windows_core::HRESULT); DRMGetUsagePolicy( core::mem::transmute(hissuancelicense), @@ -467,24 +478,24 @@ pub unsafe fn DRMGetUsagePolicy(hissuancelicense: u32, uindex: u32, peusagepolic core::mem::transmute(peusagepolicytype), core::mem::transmute(pfexclusion), core::mem::transmute(punamelength), - core::mem::transmute(wszname), + core::mem::transmute(wszname.unwrap_or(core::mem::zeroed())), core::mem::transmute(puminversionlength), - core::mem::transmute(wszminversion), + core::mem::transmute(wszminversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(pumaxversionlength), - core::mem::transmute(wszmaxversion), + core::mem::transmute(wszmaxversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(pupublickeylength), - core::mem::transmute(wszpublickey), + core::mem::transmute(wszpublickey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pudigestalgorithmlength), - core::mem::transmute(wszdigestalgorithm), + core::mem::transmute(wszdigestalgorithm.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdigest), core::mem::transmute(pbdigest), ) .ok() } #[inline] -pub unsafe fn DRMGetUserInfo(huser: u32, puusernamelength: *mut u32, wszusername: windows_core::PWSTR, puuseridlength: *mut u32, wszuserid: windows_core::PWSTR, puuseridtypelength: *mut u32, wszuseridtype: windows_core::PWSTR) -> windows_core::Result<()> { +pub unsafe fn DRMGetUserInfo(huser: u32, puusernamelength: *mut u32, wszusername: Option, puuseridlength: *mut u32, wszuserid: Option, puuseridtypelength: *mut u32, wszuseridtype: Option) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMGetUserInfo(huser : u32, puusernamelength : *mut u32, wszusername : windows_core::PWSTR, puuseridlength : *mut u32, wszuserid : windows_core::PWSTR, puuseridtypelength : *mut u32, wszuseridtype : windows_core::PWSTR) -> windows_core::HRESULT); - DRMGetUserInfo(core::mem::transmute(huser), core::mem::transmute(puusernamelength), core::mem::transmute(wszusername), core::mem::transmute(puuseridlength), core::mem::transmute(wszuserid), core::mem::transmute(puuseridtypelength), core::mem::transmute(wszuseridtype)).ok() + DRMGetUserInfo(core::mem::transmute(huser), core::mem::transmute(puusernamelength), core::mem::transmute(wszusername.unwrap_or(core::mem::zeroed())), core::mem::transmute(puuseridlength), core::mem::transmute(wszuserid.unwrap_or(core::mem::zeroed())), core::mem::transmute(puuseridtypelength), core::mem::transmute(wszuseridtype.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DRMGetUserRights(hissuancelicense: u32, huser: u32, uindex: u32, phright: *mut u32) -> windows_core::Result<()> { @@ -512,12 +523,9 @@ pub unsafe fn DRMIsActivated(hclient: u32, uflags: u32, pactservinfo: *mut DRM_A DRMIsActivated(core::mem::transmute(hclient), core::mem::transmute(uflags), core::mem::transmute(pactservinfo)).ok() } #[inline] -pub unsafe fn DRMIsWindowProtected(hwnd: P0, pfprotected: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DRMIsWindowProtected(hwnd: super::super::Foundation::HWND, pfprotected: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMIsWindowProtected(hwnd : super::super::Foundation:: HWND, pfprotected : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DRMIsWindowProtected(hwnd.param().abi(), core::mem::transmute(pfprotected)).ok() + DRMIsWindowProtected(core::mem::transmute(hwnd), core::mem::transmute(pfprotected)).ok() } #[inline] pub unsafe fn DRMLoadLibrary(henv: u32, especification: DRMSPECTYPE, wszlibraryprovider: P2, wszcredentials: P3, phlibrary: *mut u32) -> windows_core::Result<()> @@ -545,12 +553,9 @@ where DRMRegisterContent(fregister.param().abi()).ok() } #[inline] -pub unsafe fn DRMRegisterProtectedWindow(henv: u32, hwnd: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn DRMRegisterProtectedWindow(henv: u32, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMRegisterProtectedWindow(henv : u32, hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - DRMRegisterProtectedWindow(core::mem::transmute(henv), hwnd.param().abi()).ok() + DRMRegisterProtectedWindow(core::mem::transmute(henv), core::mem::transmute(hwnd)).ok() } #[inline] pub unsafe fn DRMRegisterRevocationList(henv: u32, wszrevocationlist: P1) -> windows_core::Result<()> @@ -636,12 +641,12 @@ where DRMSetUsagePolicy(core::mem::transmute(hissuancelicense), core::mem::transmute(eusagepolicytype), fdelete.param().abi(), fexclusion.param().abi(), wszname.param().abi(), wszminversion.param().abi(), wszmaxversion.param().abi(), wszpublickey.param().abi(), wszdigestalgorithm.param().abi(), core::mem::transmute(pbdigest), core::mem::transmute(cbdigest)).ok() } #[inline] -pub unsafe fn DRMVerify(wszdata: P0, pcattesteddata: *mut u32, wszattesteddata: windows_core::PWSTR, petype: *mut DRMATTESTTYPE, pcprincipal: *mut u32, wszprincipal: windows_core::PWSTR, pcmanifest: *mut u32, wszmanifest: windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn DRMVerify(wszdata: P0, pcattesteddata: *mut u32, wszattesteddata: Option, petype: *mut DRMATTESTTYPE, pcprincipal: *mut u32, wszprincipal: Option, pcmanifest: *mut u32, wszmanifest: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMVerify(wszdata : windows_core::PCWSTR, pcattesteddata : *mut u32, wszattesteddata : windows_core::PWSTR, petype : *mut DRMATTESTTYPE, pcprincipal : *mut u32, wszprincipal : windows_core::PWSTR, pcmanifest : *mut u32, wszmanifest : windows_core::PWSTR) -> windows_core::HRESULT); - DRMVerify(wszdata.param().abi(), core::mem::transmute(pcattesteddata), core::mem::transmute(wszattesteddata), core::mem::transmute(petype), core::mem::transmute(pcprincipal), core::mem::transmute(wszprincipal), core::mem::transmute(pcmanifest), core::mem::transmute(wszmanifest)).ok() + DRMVerify(wszdata.param().abi(), core::mem::transmute(pcattesteddata), core::mem::transmute(wszattesteddata.unwrap_or(core::mem::zeroed())), core::mem::transmute(petype), core::mem::transmute(pcprincipal), core::mem::transmute(wszprincipal.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcmanifest), core::mem::transmute(wszmanifest.unwrap_or(core::mem::zeroed()))).ok() } pub const DRMACTSERVINFOVERSION: u32 = 0u32; #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs index f952fa0dc1..2e13ffd9c3 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs @@ -712,11 +712,8 @@ impl windows_core::RuntimeName for IMXAttributes {} windows_core::imp::define_interface!(IMXNamespaceManager, IMXNamespaceManager_Vtbl, 0xc90352f6_643c_4fbc_bb23_e996eb2d51fd); windows_core::imp::interface_hierarchy!(IMXNamespaceManager, windows_core::IUnknown); impl IMXNamespaceManager { - pub unsafe fn putAllowOverride(&self, foverride: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).putAllowOverride)(windows_core::Interface::as_raw(self), foverride.param().abi()).ok() + pub unsafe fn putAllowOverride(&self, foverride: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).putAllowOverride)(windows_core::Interface::as_raw(self), core::mem::transmute(foverride)).ok() } pub unsafe fn getAllowOverride(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -729,12 +726,11 @@ impl IMXNamespaceManager { (windows_core::Interface::vtable(self).pushContext)(windows_core::Interface::as_raw(self)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn pushNodeContext(&self, contextnode: P0, fdeep: P1) -> windows_core::Result<()> + pub unsafe fn pushNodeContext(&self, contextnode: P0, fdeep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).pushNodeContext)(windows_core::Interface::as_raw(self), contextnode.param().abi(), fdeep.param().abi()).ok() + (windows_core::Interface::vtable(self).pushNodeContext)(windows_core::Interface::as_raw(self), contextnode.param().abi(), core::mem::transmute(fdeep)).ok() } pub unsafe fn popContext(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).popContext)(windows_core::Interface::as_raw(self)).ok() @@ -1091,41 +1087,29 @@ impl IMXWriter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).encoding)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetbyteOrderMark(&self, fwritebyteordermark: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetbyteOrderMark)(windows_core::Interface::as_raw(self), fwritebyteordermark.param().abi()).ok() + pub unsafe fn SetbyteOrderMark(&self, fwritebyteordermark: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetbyteOrderMark)(windows_core::Interface::as_raw(self), core::mem::transmute(fwritebyteordermark)).ok() } pub unsafe fn byteOrderMark(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).byteOrderMark)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Setindent(&self, findentmode: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setindent)(windows_core::Interface::as_raw(self), findentmode.param().abi()).ok() + pub unsafe fn Setindent(&self, findentmode: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setindent)(windows_core::Interface::as_raw(self), core::mem::transmute(findentmode)).ok() } pub unsafe fn indent(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).indent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Setstandalone(&self, fvalue: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setstandalone)(windows_core::Interface::as_raw(self), fvalue.param().abi()).ok() + pub unsafe fn Setstandalone(&self, fvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setstandalone)(windows_core::Interface::as_raw(self), core::mem::transmute(fvalue)).ok() } pub unsafe fn standalone(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).standalone)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetomitXMLDeclaration(&self, fvalue: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetomitXMLDeclaration)(windows_core::Interface::as_raw(self), fvalue.param().abi()).ok() + pub unsafe fn SetomitXMLDeclaration(&self, fvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetomitXMLDeclaration)(windows_core::Interface::as_raw(self), core::mem::transmute(fvalue)).ok() } pub unsafe fn omitXMLDeclaration(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1138,11 +1122,8 @@ impl IMXWriter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).version)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetdisableOutputEscaping(&self, fvalue: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetdisableOutputEscaping)(windows_core::Interface::as_raw(self), fvalue.param().abi()).ok() + pub unsafe fn SetdisableOutputEscaping(&self, fvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetdisableOutputEscaping)(windows_core::Interface::as_raw(self), core::mem::transmute(fvalue)).ok() } pub unsafe fn disableOutputEscaping(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1363,11 +1344,8 @@ impl IMXXMLFilter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).getFeature)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), &mut result__).map(|| result__) } - pub unsafe fn putFeature(&self, strname: &windows_core::BSTR, fvalue: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).putFeature)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), fvalue.param().abi()).ok() + pub unsafe fn putFeature(&self, strname: &windows_core::BSTR, fvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).putFeature)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), core::mem::transmute(fvalue)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn getProperty(&self, strname: &windows_core::BSTR) -> windows_core::Result { @@ -2426,12 +2404,11 @@ impl ISAXXMLReader { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).getFeature)(windows_core::Interface::as_raw(self), pwchname.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn putFeature(&self, pwchname: P0, vfvalue: P1) -> windows_core::Result<()> + pub unsafe fn putFeature(&self, pwchname: P0, vfvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).putFeature)(windows_core::Interface::as_raw(self), pwchname.param().abi(), vfvalue.param().abi()).ok() + (windows_core::Interface::vtable(self).putFeature)(windows_core::Interface::as_raw(self), pwchname.param().abi(), core::mem::transmute(vfvalue)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn getProperty(&self, pwchname: P0) -> windows_core::Result @@ -4697,11 +4674,8 @@ impl core::ops::Deref for IVBMXNamespaceManager { windows_core::imp::interface_hierarchy!(IVBMXNamespaceManager, windows_core::IUnknown, super::super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl IVBMXNamespaceManager { - pub unsafe fn SetallowOverride(&self, foverride: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetallowOverride)(windows_core::Interface::as_raw(self), foverride.param().abi()).ok() + pub unsafe fn SetallowOverride(&self, foverride: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetallowOverride)(windows_core::Interface::as_raw(self), core::mem::transmute(foverride)).ok() } pub unsafe fn allowOverride(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4713,12 +4687,11 @@ impl IVBMXNamespaceManager { pub unsafe fn pushContext(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).pushContext)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn pushNodeContext(&self, contextnode: P0, fdeep: P1) -> windows_core::Result<()> + pub unsafe fn pushNodeContext(&self, contextnode: P0, fdeep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).pushNodeContext)(windows_core::Interface::as_raw(self), contextnode.param().abi(), fdeep.param().abi()).ok() + (windows_core::Interface::vtable(self).pushNodeContext)(windows_core::Interface::as_raw(self), contextnode.param().abi(), core::mem::transmute(fdeep)).ok() } pub unsafe fn popContext(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).popContext)(windows_core::Interface::as_raw(self)).ok() @@ -5819,11 +5792,8 @@ impl IVBSAXXMLReader { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).getFeature)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), &mut result__).map(|| result__) } - pub unsafe fn putFeature(&self, strname: &windows_core::BSTR, fvalue: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).putFeature)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), fvalue.param().abi()).ok() + pub unsafe fn putFeature(&self, strname: &windows_core::BSTR, fvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).putFeature)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), core::mem::transmute(fvalue)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn getProperty(&self, strname: &windows_core::BSTR) -> windows_core::Result { @@ -6547,11 +6517,8 @@ impl IXMLDOMDocument { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).r#async)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Setasync(&self, isasync: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setasync)(windows_core::Interface::as_raw(self), isasync.param().abi()).ok() + pub unsafe fn Setasync(&self, isasync: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setasync)(windows_core::Interface::as_raw(self), core::mem::transmute(isasync)).ok() } pub unsafe fn abort(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).abort)(windows_core::Interface::as_raw(self)).ok() @@ -6568,31 +6535,22 @@ impl IXMLDOMDocument { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).validateOnParse)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetvalidateOnParse(&self, isvalidating: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetvalidateOnParse)(windows_core::Interface::as_raw(self), isvalidating.param().abi()).ok() + pub unsafe fn SetvalidateOnParse(&self, isvalidating: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetvalidateOnParse)(windows_core::Interface::as_raw(self), core::mem::transmute(isvalidating)).ok() } pub unsafe fn resolveExternals(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).resolveExternals)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetresolveExternals(&self, isresolving: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetresolveExternals)(windows_core::Interface::as_raw(self), isresolving.param().abi()).ok() + pub unsafe fn SetresolveExternals(&self, isresolving: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetresolveExternals)(windows_core::Interface::as_raw(self), core::mem::transmute(isresolving)).ok() } pub unsafe fn preserveWhiteSpace(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).preserveWhiteSpace)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetpreserveWhiteSpace(&self, ispreserving: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetpreserveWhiteSpace)(windows_core::Interface::as_raw(self), ispreserving.param().abi()).ok() + pub unsafe fn SetpreserveWhiteSpace(&self, ispreserving: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetpreserveWhiteSpace)(windows_core::Interface::as_raw(self), core::mem::transmute(ispreserving)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Setonreadystatechange(&self, readystatechangesink: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -7174,13 +7132,12 @@ impl IXMLDOMDocument3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).validateNode)(windows_core::Interface::as_raw(self), node.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn importNode(&self, node: P0, deep: P1) -> windows_core::Result + pub unsafe fn importNode(&self, node: P0, deep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).importNode)(windows_core::Interface::as_raw(self), node.param().abi(), deep.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).importNode)(windows_core::Interface::as_raw(self), node.param().abi(), core::mem::transmute(deep), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -7995,12 +7952,9 @@ impl IXMLDOMNode { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ownerDocument)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn cloneNode(&self, deep: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn cloneNode(&self, deep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).cloneNode)(windows_core::Interface::as_raw(self), deep.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).cloneNode)(windows_core::Interface::as_raw(self), core::mem::transmute(deep), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn nodeTypeString(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9352,11 +9306,8 @@ impl IXMLDOMSchemaCollection2 { pub unsafe fn validate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).validate)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetvalidateOnLoad(&self, validateonload: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetvalidateOnLoad)(windows_core::Interface::as_raw(self), validateonload.param().abi()).ok() + pub unsafe fn SetvalidateOnLoad(&self, validateonload: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetvalidateOnLoad)(windows_core::Interface::as_raw(self), core::mem::transmute(validateonload)).ok() } pub unsafe fn validateOnLoad(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10152,11 +10103,8 @@ impl IXMLDocument2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).r#async)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Setasync(&self, f: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setasync)(windows_core::Interface::as_raw(self), f.param().abi()).ok() + pub unsafe fn Setasync(&self, f: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setasync)(windows_core::Interface::as_raw(self), core::mem::transmute(f)).ok() } } #[cfg(feature = "Win32_System_Com")] 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 6ec9112c9c..64dece9cb9 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 @@ -84,11 +84,11 @@ impl IXmlReader { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), &mut result__).map(|| result__) } - pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: isize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), core::mem::transmute(pvalue)).ok() + pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pnodetype.unwrap_or(core::mem::zeroed()))) } pub unsafe fn GetNodeType(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -111,25 +111,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), core::mem::transmute(ppwszqualifiedname), core::mem::transmute(pcwchqualifiedname.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQualifiedName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszqualifiedname), core::mem::transmute(pcwchqualifiedname.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ppwsznamespaceuri), core::mem::transmute(pcwchnamespaceuri.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNamespaceUri)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwsznamespaceuri), core::mem::transmute(pcwchnamespaceuri.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ppwszlocalname), core::mem::transmute(pcwchlocalname.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocalName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszlocalname), core::mem::transmute(pcwchlocalname.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ppwszprefix), core::mem::transmute(pcwchprefix.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszprefix), core::mem::transmute(pcwchprefix.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ppwszvalue), core::mem::transmute(pcwchvalue.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszvalue), core::mem::transmute(pcwchvalue.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(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), core::mem::transmute(ppwszbaseuri), core::mem::transmute(pcwchbaseuri.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBaseUri)(windows_core::Interface::as_raw(self), core::mem::transmute(ppwszbaseuri), core::mem::transmute(pcwchbaseuri.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn IsDefault(&self) -> super::super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsDefault)(windows_core::Interface::as_raw(self)) @@ -424,8 +424,8 @@ impl IXmlWriter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), &mut result__).map(|| result__) } - pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: isize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), core::mem::transmute(pvalue)).ok() + pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn WriteAttributes(&self, preader: P0, fwritedefaultattributes: P1) -> windows_core::Result<()> where @@ -812,8 +812,8 @@ impl IXmlWriterLite { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), &mut result__).map(|| result__) } - pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: isize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), core::mem::transmute(pvalue)).ok() + pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn WriteAttributes(&self, preader: P0, fwritedefaultattributes: P1) -> windows_core::Result<()> where 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 8b4c4deddb..fa62ab4ce8 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs @@ -1,19 +1,12 @@ #[inline] -pub unsafe fn AllJoynAcceptBusConnection(serverbushandle: P0, abortevent: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AllJoynAcceptBusConnection(serverbushandle: super::super::Foundation::HANDLE, abortevent: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("msajapi.dll" "system" fn AllJoynAcceptBusConnection(serverbushandle : super::super::Foundation:: HANDLE, abortevent : super::super::Foundation:: HANDLE) -> u32); - AllJoynAcceptBusConnection(serverbushandle.param().abi(), abortevent.param().abi()) + AllJoynAcceptBusConnection(core::mem::transmute(serverbushandle), core::mem::transmute(abortevent)) } #[inline] -pub unsafe fn AllJoynCloseBusHandle(bushandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AllJoynCloseBusHandle(bushandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("msajapi.dll" "system" fn AllJoynCloseBusHandle(bushandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AllJoynCloseBusHandle(bushandle.param().abi()).ok() + AllJoynCloseBusHandle(core::mem::transmute(bushandle)).ok() } #[inline] pub unsafe fn AllJoynConnectToBus(connectionspec: P0) -> windows_core::Result @@ -28,41 +21,27 @@ 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(core::mem::transmute(outbuffersize), core::mem::transmute(inbuffersize), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) + AllJoynCreateBus(core::mem::transmute(outbuffersize), core::mem::transmute(inbuffersize), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn AllJoynEnumEvents(connectedbushandle: P0, eventtoreset: P1, eventtypes: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AllJoynEnumEvents(connectedbushandle: super::super::Foundation::HANDLE, eventtoreset: Option, eventtypes: *mut u32) -> windows_core::Result<()> { windows_targets::link!("msajapi.dll" "system" fn AllJoynEnumEvents(connectedbushandle : super::super::Foundation:: HANDLE, eventtoreset : super::super::Foundation:: HANDLE, eventtypes : *mut u32) -> super::super::Foundation:: BOOL); - AllJoynEnumEvents(connectedbushandle.param().abi(), eventtoreset.param().abi(), core::mem::transmute(eventtypes)).ok() + AllJoynEnumEvents(core::mem::transmute(connectedbushandle), core::mem::transmute(eventtoreset.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventtypes)).ok() } #[inline] -pub unsafe fn AllJoynEventSelect(connectedbushandle: P0, eventhandle: P1, eventtypes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AllJoynEventSelect(connectedbushandle: super::super::Foundation::HANDLE, eventhandle: super::super::Foundation::HANDLE, eventtypes: u32) -> windows_core::Result<()> { windows_targets::link!("msajapi.dll" "system" fn AllJoynEventSelect(connectedbushandle : super::super::Foundation:: HANDLE, eventhandle : super::super::Foundation:: HANDLE, eventtypes : u32) -> super::super::Foundation:: BOOL); - AllJoynEventSelect(connectedbushandle.param().abi(), eventhandle.param().abi(), core::mem::transmute(eventtypes)).ok() + AllJoynEventSelect(core::mem::transmute(connectedbushandle), core::mem::transmute(eventhandle), core::mem::transmute(eventtypes)).ok() } #[inline] -pub unsafe fn AllJoynReceiveFromBus(connectedbushandle: P0, buffer: Option<*mut core::ffi::c_void>, bytestoread: u32, bytestransferred: Option<*mut u32>, reserved: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AllJoynReceiveFromBus(connectedbushandle: super::super::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, bytestoread: u32, bytestransferred: Option<*mut u32>, reserved: *mut core::ffi::c_void) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(bytestoread), core::mem::transmute(bytestransferred.unwrap_or(core::ptr::null_mut())), core::mem::transmute(reserved)).ok() + AllJoynReceiveFromBus(core::mem::transmute(connectedbushandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(bytestoread), core::mem::transmute(bytestransferred.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AllJoynSendToBus(connectedbushandle: super::super::Foundation::HANDLE, buffer: Option<*const core::ffi::c_void>, bytestowrite: u32, bytestransferred: Option<*mut u32>, reserved: *mut core::ffi::c_void) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(bytestowrite), core::mem::transmute(bytestransferred.unwrap_or(core::ptr::null_mut())), core::mem::transmute(reserved)).ok() + AllJoynSendToBus(core::mem::transmute(connectedbushandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(bytestowrite), core::mem::transmute(bytestransferred.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved)).ok() } #[inline] pub unsafe fn QCC_StatusText(status: QStatus) -> windows_core::PCSTR { @@ -83,378 +62,304 @@ pub unsafe fn alljoyn_aboutdata_create_empty() -> alljoyn_aboutdata { alljoyn_aboutdata_create_empty() } #[inline] -pub unsafe fn alljoyn_aboutdata_create_full(arg: P0, language: P1) -> alljoyn_aboutdata +pub unsafe fn alljoyn_aboutdata_create_full(arg: alljoyn_msgarg, language: P1) -> alljoyn_aboutdata where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_create_full(arg : alljoyn_msgarg, language : windows_core::PCSTR) -> alljoyn_aboutdata); - alljoyn_aboutdata_create_full(arg.param().abi(), language.param().abi()) + alljoyn_aboutdata_create_full(core::mem::transmute(arg), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_createfrommsgarg(data: P0, arg: P1, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_createfrommsgarg(data: alljoyn_aboutdata, arg: alljoyn_msgarg, language: P2) -> QStatus where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_createfrommsgarg(data : alljoyn_aboutdata, arg : alljoyn_msgarg, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_createfrommsgarg(data.param().abi(), arg.param().abi(), language.param().abi()) + alljoyn_aboutdata_createfrommsgarg(core::mem::transmute(data), core::mem::transmute(arg), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_createfromxml(data: P0, aboutdataxml: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_createfromxml(data: alljoyn_aboutdata, aboutdataxml: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_createfromxml(data : alljoyn_aboutdata, aboutdataxml : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_createfromxml(data.param().abi(), aboutdataxml.param().abi()) + alljoyn_aboutdata_createfromxml(core::mem::transmute(data), aboutdataxml.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_destroy(data: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_destroy(data: alljoyn_aboutdata) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_destroy(data : alljoyn_aboutdata)); - alljoyn_aboutdata_destroy(data.param().abi()) + alljoyn_aboutdata_destroy(core::mem::transmute(data)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getaboutdata(data: P0, msgarg: P1, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_getaboutdata(data: alljoyn_aboutdata, msgarg: alljoyn_msgarg, language: P2) -> QStatus where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getaboutdata(data : alljoyn_aboutdata, msgarg : alljoyn_msgarg, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_getaboutdata(data.param().abi(), msgarg.param().abi(), language.param().abi()) + alljoyn_aboutdata_getaboutdata(core::mem::transmute(data), core::mem::transmute(msgarg), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_getajsoftwareversion(data: P0, ajsoftwareversion: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getajsoftwareversion(data: alljoyn_aboutdata, ajsoftwareversion: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getajsoftwareversion(data : alljoyn_aboutdata, ajsoftwareversion : *mut *mut i8) -> QStatus); - alljoyn_aboutdata_getajsoftwareversion(data.param().abi(), core::mem::transmute(ajsoftwareversion)) + alljoyn_aboutdata_getajsoftwareversion(core::mem::transmute(data), core::mem::transmute(ajsoftwareversion)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getannouncedaboutdata(data: P0, msgarg: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getannouncedaboutdata(data: alljoyn_aboutdata, msgarg: alljoyn_msgarg) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getannouncedaboutdata(data : alljoyn_aboutdata, msgarg : alljoyn_msgarg) -> QStatus); - alljoyn_aboutdata_getannouncedaboutdata(data.param().abi(), msgarg.param().abi()) + alljoyn_aboutdata_getannouncedaboutdata(core::mem::transmute(data), core::mem::transmute(msgarg)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getappid(data: P0, appid: *mut *mut u8, num: *mut usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getappid(data: alljoyn_aboutdata, appid: *mut *mut u8, num: *mut usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getappid(data : alljoyn_aboutdata, appid : *mut *mut u8, num : *mut usize) -> QStatus); - alljoyn_aboutdata_getappid(data.param().abi(), core::mem::transmute(appid), core::mem::transmute(num)) + alljoyn_aboutdata_getappid(core::mem::transmute(data), core::mem::transmute(appid), core::mem::transmute(num)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getappname(data: P0, appname: *mut *mut i8, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_getappname(data: alljoyn_aboutdata, appname: *mut *mut i8, language: P2) -> QStatus where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getappname(data : alljoyn_aboutdata, appname : *mut *mut i8, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_getappname(data.param().abi(), core::mem::transmute(appname), language.param().abi()) + alljoyn_aboutdata_getappname(core::mem::transmute(data), core::mem::transmute(appname), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_getdateofmanufacture(data: P0, dateofmanufacture: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getdateofmanufacture(data: alljoyn_aboutdata, dateofmanufacture: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getdateofmanufacture(data : alljoyn_aboutdata, dateofmanufacture : *mut *mut i8) -> QStatus); - alljoyn_aboutdata_getdateofmanufacture(data.param().abi(), core::mem::transmute(dateofmanufacture)) + alljoyn_aboutdata_getdateofmanufacture(core::mem::transmute(data), core::mem::transmute(dateofmanufacture)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getdefaultlanguage(data: P0, defaultlanguage: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getdefaultlanguage(data: alljoyn_aboutdata, defaultlanguage: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getdefaultlanguage(data : alljoyn_aboutdata, defaultlanguage : *mut *mut i8) -> QStatus); - alljoyn_aboutdata_getdefaultlanguage(data.param().abi(), core::mem::transmute(defaultlanguage)) + alljoyn_aboutdata_getdefaultlanguage(core::mem::transmute(data), core::mem::transmute(defaultlanguage)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getdescription(data: P0, description: *mut *mut i8, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_getdescription(data: alljoyn_aboutdata, description: *mut *mut i8, language: P2) -> QStatus where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getdescription(data : alljoyn_aboutdata, description : *mut *mut i8, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_getdescription(data.param().abi(), core::mem::transmute(description), language.param().abi()) + alljoyn_aboutdata_getdescription(core::mem::transmute(data), core::mem::transmute(description), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_getdeviceid(data: P0, deviceid: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getdeviceid(data: alljoyn_aboutdata, deviceid: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getdeviceid(data : alljoyn_aboutdata, deviceid : *mut *mut i8) -> QStatus); - alljoyn_aboutdata_getdeviceid(data.param().abi(), core::mem::transmute(deviceid)) + alljoyn_aboutdata_getdeviceid(core::mem::transmute(data), core::mem::transmute(deviceid)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getdevicename(data: P0, devicename: *mut *mut i8, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_getdevicename(data: alljoyn_aboutdata, devicename: *mut *mut i8, language: P2) -> QStatus where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getdevicename(data : alljoyn_aboutdata, devicename : *mut *mut i8, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_getdevicename(data.param().abi(), core::mem::transmute(devicename), language.param().abi()) + alljoyn_aboutdata_getdevicename(core::mem::transmute(data), core::mem::transmute(devicename), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_getfield(data: P0, name: P1, value: *mut alljoyn_msgarg, language: P3) -> QStatus +pub unsafe fn alljoyn_aboutdata_getfield(data: alljoyn_aboutdata, name: P1, value: *mut alljoyn_msgarg, language: P3) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getfield(data : alljoyn_aboutdata, name : windows_core::PCSTR, value : *mut alljoyn_msgarg, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_getfield(data.param().abi(), name.param().abi(), core::mem::transmute(value), language.param().abi()) + alljoyn_aboutdata_getfield(core::mem::transmute(data), name.param().abi(), core::mem::transmute(value), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_getfields(data: P0, fields: *const *const i8, num_fields: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getfields(data: alljoyn_aboutdata, fields: *const *const i8, num_fields: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getfields(data : alljoyn_aboutdata, fields : *const *const i8, num_fields : usize) -> usize); - alljoyn_aboutdata_getfields(data.param().abi(), core::mem::transmute(fields), core::mem::transmute(num_fields)) + alljoyn_aboutdata_getfields(core::mem::transmute(data), core::mem::transmute(fields), core::mem::transmute(num_fields)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getfieldsignature(data: P0, fieldname: P1) -> windows_core::PCSTR +pub unsafe fn alljoyn_aboutdata_getfieldsignature(data: alljoyn_aboutdata, fieldname: P1) -> windows_core::PCSTR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getfieldsignature(data : alljoyn_aboutdata, fieldname : windows_core::PCSTR) -> windows_core::PCSTR); - alljoyn_aboutdata_getfieldsignature(data.param().abi(), fieldname.param().abi()) + alljoyn_aboutdata_getfieldsignature(core::mem::transmute(data), fieldname.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_gethardwareversion(data: P0, hardwareversion: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_gethardwareversion(data: alljoyn_aboutdata, hardwareversion: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_gethardwareversion(data : alljoyn_aboutdata, hardwareversion : *mut *mut i8) -> QStatus); - alljoyn_aboutdata_gethardwareversion(data.param().abi(), core::mem::transmute(hardwareversion)) + alljoyn_aboutdata_gethardwareversion(core::mem::transmute(data), core::mem::transmute(hardwareversion)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getmanufacturer(data: P0, manufacturer: *mut *mut i8, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_getmanufacturer(data: alljoyn_aboutdata, manufacturer: *mut *mut i8, language: P2) -> QStatus where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getmanufacturer(data : alljoyn_aboutdata, manufacturer : *mut *mut i8, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_getmanufacturer(data.param().abi(), core::mem::transmute(manufacturer), language.param().abi()) + alljoyn_aboutdata_getmanufacturer(core::mem::transmute(data), core::mem::transmute(manufacturer), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_getmodelnumber(data: P0, modelnumber: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getmodelnumber(data: alljoyn_aboutdata, modelnumber: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getmodelnumber(data : alljoyn_aboutdata, modelnumber : *mut *mut i8) -> QStatus); - alljoyn_aboutdata_getmodelnumber(data.param().abi(), core::mem::transmute(modelnumber)) + alljoyn_aboutdata_getmodelnumber(core::mem::transmute(data), core::mem::transmute(modelnumber)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getsoftwareversion(data: P0, softwareversion: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getsoftwareversion(data: alljoyn_aboutdata, softwareversion: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getsoftwareversion(data : alljoyn_aboutdata, softwareversion : *mut *mut i8) -> QStatus); - alljoyn_aboutdata_getsoftwareversion(data.param().abi(), core::mem::transmute(softwareversion)) + alljoyn_aboutdata_getsoftwareversion(core::mem::transmute(data), core::mem::transmute(softwareversion)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getsupportedlanguages(data: P0, languagetags: *const *const i8, num: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getsupportedlanguages(data: alljoyn_aboutdata, languagetags: *const *const i8, num: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getsupportedlanguages(data : alljoyn_aboutdata, languagetags : *const *const i8, num : usize) -> usize); - alljoyn_aboutdata_getsupportedlanguages(data.param().abi(), core::mem::transmute(languagetags), core::mem::transmute(num)) + alljoyn_aboutdata_getsupportedlanguages(core::mem::transmute(data), core::mem::transmute(languagetags), core::mem::transmute(num)) } #[inline] -pub unsafe fn alljoyn_aboutdata_getsupporturl(data: P0, supporturl: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_getsupporturl(data: alljoyn_aboutdata, supporturl: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_getsupporturl(data : alljoyn_aboutdata, supporturl : *mut *mut i8) -> QStatus); - alljoyn_aboutdata_getsupporturl(data.param().abi(), core::mem::transmute(supporturl)) + alljoyn_aboutdata_getsupporturl(core::mem::transmute(data), core::mem::transmute(supporturl)) } #[inline] -pub unsafe fn alljoyn_aboutdata_isfieldannounced(data: P0, fieldname: P1) -> u8 +pub unsafe fn alljoyn_aboutdata_isfieldannounced(data: alljoyn_aboutdata, fieldname: P1) -> u8 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_isfieldannounced(data : alljoyn_aboutdata, fieldname : windows_core::PCSTR) -> u8); - alljoyn_aboutdata_isfieldannounced(data.param().abi(), fieldname.param().abi()) + alljoyn_aboutdata_isfieldannounced(core::mem::transmute(data), fieldname.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_isfieldlocalized(data: P0, fieldname: P1) -> u8 +pub unsafe fn alljoyn_aboutdata_isfieldlocalized(data: alljoyn_aboutdata, fieldname: P1) -> u8 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_isfieldlocalized(data : alljoyn_aboutdata, fieldname : windows_core::PCSTR) -> u8); - alljoyn_aboutdata_isfieldlocalized(data.param().abi(), fieldname.param().abi()) + alljoyn_aboutdata_isfieldlocalized(core::mem::transmute(data), fieldname.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_isfieldrequired(data: P0, fieldname: P1) -> u8 +pub unsafe fn alljoyn_aboutdata_isfieldrequired(data: alljoyn_aboutdata, fieldname: P1) -> u8 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_isfieldrequired(data : alljoyn_aboutdata, fieldname : windows_core::PCSTR) -> u8); - alljoyn_aboutdata_isfieldrequired(data.param().abi(), fieldname.param().abi()) + alljoyn_aboutdata_isfieldrequired(core::mem::transmute(data), fieldname.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_isvalid(data: P0, language: P1) -> u8 +pub unsafe fn alljoyn_aboutdata_isvalid(data: alljoyn_aboutdata, language: P1) -> u8 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_isvalid(data : alljoyn_aboutdata, language : windows_core::PCSTR) -> u8); - alljoyn_aboutdata_isvalid(data.param().abi(), language.param().abi()) + alljoyn_aboutdata_isvalid(core::mem::transmute(data), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setappid(data: P0, appid: *const u8, num: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdata_setappid(data: alljoyn_aboutdata, appid: *const u8, num: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setappid(data : alljoyn_aboutdata, appid : *const u8, num : usize) -> QStatus); - alljoyn_aboutdata_setappid(data.param().abi(), core::mem::transmute(appid), core::mem::transmute(num)) + alljoyn_aboutdata_setappid(core::mem::transmute(data), core::mem::transmute(appid), core::mem::transmute(num)) } #[inline] -pub unsafe fn alljoyn_aboutdata_setappid_fromstring(data: P0, appid: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_setappid_fromstring(data: alljoyn_aboutdata, appid: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setappid_fromstring(data : alljoyn_aboutdata, appid : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setappid_fromstring(data.param().abi(), appid.param().abi()) + alljoyn_aboutdata_setappid_fromstring(core::mem::transmute(data), appid.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setappname(data: P0, appname: P1, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_setappname(data: alljoyn_aboutdata, appname: P1, language: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setappname(data : alljoyn_aboutdata, appname : windows_core::PCSTR, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setappname(data.param().abi(), appname.param().abi(), language.param().abi()) + alljoyn_aboutdata_setappname(core::mem::transmute(data), appname.param().abi(), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setdateofmanufacture(data: P0, dateofmanufacture: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_setdateofmanufacture(data: alljoyn_aboutdata, dateofmanufacture: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setdateofmanufacture(data : alljoyn_aboutdata, dateofmanufacture : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setdateofmanufacture(data.param().abi(), dateofmanufacture.param().abi()) + alljoyn_aboutdata_setdateofmanufacture(core::mem::transmute(data), dateofmanufacture.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setdefaultlanguage(data: P0, defaultlanguage: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_setdefaultlanguage(data: alljoyn_aboutdata, defaultlanguage: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setdefaultlanguage(data : alljoyn_aboutdata, defaultlanguage : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setdefaultlanguage(data.param().abi(), defaultlanguage.param().abi()) + alljoyn_aboutdata_setdefaultlanguage(core::mem::transmute(data), defaultlanguage.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setdescription(data: P0, description: P1, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_setdescription(data: alljoyn_aboutdata, description: P1, language: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setdescription(data : alljoyn_aboutdata, description : windows_core::PCSTR, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setdescription(data.param().abi(), description.param().abi(), language.param().abi()) + alljoyn_aboutdata_setdescription(core::mem::transmute(data), description.param().abi(), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setdeviceid(data: P0, deviceid: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_setdeviceid(data: alljoyn_aboutdata, deviceid: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setdeviceid(data : alljoyn_aboutdata, deviceid : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setdeviceid(data.param().abi(), deviceid.param().abi()) + alljoyn_aboutdata_setdeviceid(core::mem::transmute(data), deviceid.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setdevicename(data: P0, devicename: P1, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_setdevicename(data: alljoyn_aboutdata, devicename: P1, language: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setdevicename(data : alljoyn_aboutdata, devicename : windows_core::PCSTR, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setdevicename(data.param().abi(), devicename.param().abi(), language.param().abi()) + alljoyn_aboutdata_setdevicename(core::mem::transmute(data), devicename.param().abi(), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setfield(data: P0, name: P1, value: P2, language: P3) -> QStatus +pub unsafe fn alljoyn_aboutdata_setfield(data: alljoyn_aboutdata, name: P1, value: alljoyn_msgarg, language: P3) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setfield(data : alljoyn_aboutdata, name : windows_core::PCSTR, value : alljoyn_msgarg, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setfield(data.param().abi(), name.param().abi(), value.param().abi(), language.param().abi()) + alljoyn_aboutdata_setfield(core::mem::transmute(data), name.param().abi(), core::mem::transmute(value), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_sethardwareversion(data: P0, hardwareversion: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_sethardwareversion(data: alljoyn_aboutdata, hardwareversion: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_sethardwareversion(data : alljoyn_aboutdata, hardwareversion : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_sethardwareversion(data.param().abi(), hardwareversion.param().abi()) + alljoyn_aboutdata_sethardwareversion(core::mem::transmute(data), hardwareversion.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setmanufacturer(data: P0, manufacturer: P1, language: P2) -> QStatus +pub unsafe fn alljoyn_aboutdata_setmanufacturer(data: alljoyn_aboutdata, manufacturer: P1, language: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setmanufacturer(data : alljoyn_aboutdata, manufacturer : windows_core::PCSTR, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setmanufacturer(data.param().abi(), manufacturer.param().abi(), language.param().abi()) + alljoyn_aboutdata_setmanufacturer(core::mem::transmute(data), manufacturer.param().abi(), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setmodelnumber(data: P0, modelnumber: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_setmodelnumber(data: alljoyn_aboutdata, modelnumber: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setmodelnumber(data : alljoyn_aboutdata, modelnumber : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setmodelnumber(data.param().abi(), modelnumber.param().abi()) + alljoyn_aboutdata_setmodelnumber(core::mem::transmute(data), modelnumber.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setsoftwareversion(data: P0, softwareversion: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_setsoftwareversion(data: alljoyn_aboutdata, softwareversion: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setsoftwareversion(data : alljoyn_aboutdata, softwareversion : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setsoftwareversion(data.param().abi(), softwareversion.param().abi()) + alljoyn_aboutdata_setsoftwareversion(core::mem::transmute(data), softwareversion.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setsupportedlanguage(data: P0, language: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_setsupportedlanguage(data: alljoyn_aboutdata, language: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setsupportedlanguage(data : alljoyn_aboutdata, language : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setsupportedlanguage(data.param().abi(), language.param().abi()) + alljoyn_aboutdata_setsupportedlanguage(core::mem::transmute(data), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutdata_setsupporturl(data: P0, supporturl: P1) -> QStatus +pub unsafe fn alljoyn_aboutdata_setsupporturl(data: alljoyn_aboutdata, supporturl: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdata_setsupporturl(data : alljoyn_aboutdata, supporturl : windows_core::PCSTR) -> QStatus); - alljoyn_aboutdata_setsupporturl(data.param().abi(), supporturl.param().abi()) + alljoyn_aboutdata_setsupporturl(core::mem::transmute(data), supporturl.param().abi()) } #[inline] pub unsafe fn alljoyn_aboutdatalistener_create(callbacks: *const alljoyn_aboutdatalistener_callbacks, context: *const core::ffi::c_void) -> alljoyn_aboutdatalistener { @@ -462,20 +367,14 @@ pub unsafe fn alljoyn_aboutdatalistener_create(callbacks: *const alljoyn_aboutda alljoyn_aboutdatalistener_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_aboutdatalistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutdatalistener_destroy(listener: alljoyn_aboutdatalistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutdatalistener_destroy(listener : alljoyn_aboutdatalistener)); - alljoyn_aboutdatalistener_destroy(listener.param().abi()) + alljoyn_aboutdatalistener_destroy(core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_abouticon_clear(icon: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticon_clear(icon: alljoyn_abouticon) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticon_clear(icon : alljoyn_abouticon)); - alljoyn_abouticon_clear(icon.param().abi()) + alljoyn_abouticon_clear(core::mem::transmute(icon)) } #[inline] pub unsafe fn alljoyn_abouticon_create() -> alljoyn_abouticon { @@ -483,107 +382,74 @@ pub unsafe fn alljoyn_abouticon_create() -> alljoyn_abouticon { alljoyn_abouticon_create() } #[inline] -pub unsafe fn alljoyn_abouticon_destroy(icon: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticon_destroy(icon: alljoyn_abouticon) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticon_destroy(icon : alljoyn_abouticon)); - alljoyn_abouticon_destroy(icon.param().abi()) + alljoyn_abouticon_destroy(core::mem::transmute(icon)) } #[inline] -pub unsafe fn alljoyn_abouticon_getcontent(icon: P0, data: *const *const u8, size: *mut usize) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticon_getcontent(icon: alljoyn_abouticon, data: *const *const u8, size: *mut usize) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticon_getcontent(icon : alljoyn_abouticon, data : *const *const u8, size : *mut usize)); - alljoyn_abouticon_getcontent(icon.param().abi(), core::mem::transmute(data), core::mem::transmute(size)) + alljoyn_abouticon_getcontent(core::mem::transmute(icon), core::mem::transmute(data), core::mem::transmute(size)) } #[inline] -pub unsafe fn alljoyn_abouticon_geturl(icon: P0, r#type: *const *const i8, url: *const *const i8) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticon_geturl(icon: alljoyn_abouticon, r#type: *const *const i8, url: *const *const i8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticon_geturl(icon : alljoyn_abouticon, r#type : *const *const i8, url : *const *const i8)); - alljoyn_abouticon_geturl(icon.param().abi(), core::mem::transmute(r#type), core::mem::transmute(url)) + alljoyn_abouticon_geturl(core::mem::transmute(icon), core::mem::transmute(r#type), core::mem::transmute(url)) } #[inline] -pub unsafe fn alljoyn_abouticon_setcontent(icon: P0, r#type: P1, data: *mut u8, csize: usize, ownsdata: u8) -> QStatus +pub unsafe fn alljoyn_abouticon_setcontent(icon: alljoyn_abouticon, r#type: P1, data: *mut u8, csize: usize, ownsdata: u8) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticon_setcontent(icon : alljoyn_abouticon, r#type : windows_core::PCSTR, data : *mut u8, csize : usize, ownsdata : u8) -> QStatus); - alljoyn_abouticon_setcontent(icon.param().abi(), r#type.param().abi(), core::mem::transmute(data), core::mem::transmute(csize), core::mem::transmute(ownsdata)) + alljoyn_abouticon_setcontent(core::mem::transmute(icon), r#type.param().abi(), core::mem::transmute(data), core::mem::transmute(csize), core::mem::transmute(ownsdata)) } #[inline] -pub unsafe fn alljoyn_abouticon_setcontent_frommsgarg(icon: P0, arg: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticon_setcontent_frommsgarg(icon: alljoyn_abouticon, arg: alljoyn_msgarg) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticon_setcontent_frommsgarg(icon : alljoyn_abouticon, arg : alljoyn_msgarg) -> QStatus); - alljoyn_abouticon_setcontent_frommsgarg(icon.param().abi(), arg.param().abi()) + alljoyn_abouticon_setcontent_frommsgarg(core::mem::transmute(icon), core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_abouticon_seturl(icon: P0, r#type: P1, url: P2) -> QStatus +pub unsafe fn alljoyn_abouticon_seturl(icon: alljoyn_abouticon, r#type: P1, url: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticon_seturl(icon : alljoyn_abouticon, r#type : windows_core::PCSTR, url : windows_core::PCSTR) -> QStatus); - alljoyn_abouticon_seturl(icon.param().abi(), r#type.param().abi(), url.param().abi()) + alljoyn_abouticon_seturl(core::mem::transmute(icon), r#type.param().abi(), url.param().abi()) } #[inline] -pub unsafe fn alljoyn_abouticonobj_create(bus: P0, icon: P1) -> alljoyn_abouticonobj -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticonobj_create(bus: alljoyn_busattachment, icon: alljoyn_abouticon) -> alljoyn_abouticonobj { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticonobj_create(bus : alljoyn_busattachment, icon : alljoyn_abouticon) -> alljoyn_abouticonobj); - alljoyn_abouticonobj_create(bus.param().abi(), icon.param().abi()) + alljoyn_abouticonobj_create(core::mem::transmute(bus), core::mem::transmute(icon)) } #[inline] -pub unsafe fn alljoyn_abouticonobj_destroy(icon: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticonobj_destroy(icon: alljoyn_abouticonobj) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticonobj_destroy(icon : alljoyn_abouticonobj)); - alljoyn_abouticonobj_destroy(icon.param().abi()) + alljoyn_abouticonobj_destroy(core::mem::transmute(icon)) } #[inline] -pub unsafe fn alljoyn_abouticonproxy_create(bus: P0, busname: P1, sessionid: u32) -> alljoyn_abouticonproxy +pub unsafe fn alljoyn_abouticonproxy_create(bus: alljoyn_busattachment, busname: P1, sessionid: u32) -> alljoyn_abouticonproxy where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticonproxy_create(bus : alljoyn_busattachment, busname : windows_core::PCSTR, sessionid : u32) -> alljoyn_abouticonproxy); - alljoyn_abouticonproxy_create(bus.param().abi(), busname.param().abi(), core::mem::transmute(sessionid)) + alljoyn_abouticonproxy_create(core::mem::transmute(bus), busname.param().abi(), core::mem::transmute(sessionid)) } #[inline] -pub unsafe fn alljoyn_abouticonproxy_destroy(proxy: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticonproxy_destroy(proxy: alljoyn_abouticonproxy) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticonproxy_destroy(proxy : alljoyn_abouticonproxy)); - alljoyn_abouticonproxy_destroy(proxy.param().abi()) + alljoyn_abouticonproxy_destroy(core::mem::transmute(proxy)) } #[inline] -pub unsafe fn alljoyn_abouticonproxy_geticon(proxy: P0, icon: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticonproxy_geticon(proxy: alljoyn_abouticonproxy, icon: alljoyn_abouticon) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticonproxy_geticon(proxy : alljoyn_abouticonproxy, icon : alljoyn_abouticon) -> QStatus); - alljoyn_abouticonproxy_geticon(proxy.param().abi(), icon.param().abi()) + alljoyn_abouticonproxy_geticon(core::mem::transmute(proxy), core::mem::transmute(icon)) } #[inline] -pub unsafe fn alljoyn_abouticonproxy_getversion(proxy: P0, version: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_abouticonproxy_getversion(proxy: alljoyn_abouticonproxy, version: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_abouticonproxy_getversion(proxy : alljoyn_abouticonproxy, version : *mut u16) -> QStatus); - alljoyn_abouticonproxy_getversion(proxy.param().abi(), core::mem::transmute(version)) + alljoyn_abouticonproxy_getversion(core::mem::transmute(proxy), core::mem::transmute(version)) } #[inline] pub unsafe fn alljoyn_aboutlistener_create(callback: *const alljoyn_aboutlistener_callback, context: *const core::ffi::c_void) -> alljoyn_aboutlistener { @@ -591,62 +457,39 @@ pub unsafe fn alljoyn_aboutlistener_create(callback: *const alljoyn_aboutlistene alljoyn_aboutlistener_create(core::mem::transmute(callback), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_aboutlistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutlistener_destroy(listener: alljoyn_aboutlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutlistener_destroy(listener : alljoyn_aboutlistener)); - alljoyn_aboutlistener_destroy(listener.param().abi()) + alljoyn_aboutlistener_destroy(core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_aboutobj_announce(obj: P0, sessionport: u16, aboutdata: P2) -> QStatus -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobj_announce(obj: alljoyn_aboutobj, sessionport: u16, aboutdata: alljoyn_aboutdata) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobj_announce(obj : alljoyn_aboutobj, sessionport : u16, aboutdata : alljoyn_aboutdata) -> QStatus); - alljoyn_aboutobj_announce(obj.param().abi(), core::mem::transmute(sessionport), aboutdata.param().abi()) + alljoyn_aboutobj_announce(core::mem::transmute(obj), core::mem::transmute(sessionport), core::mem::transmute(aboutdata)) } #[inline] -pub unsafe fn alljoyn_aboutobj_announce_using_datalistener(obj: P0, sessionport: u16, aboutlistener: P2) -> QStatus -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobj_announce_using_datalistener(obj: alljoyn_aboutobj, sessionport: u16, aboutlistener: alljoyn_aboutdatalistener) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobj_announce_using_datalistener(obj : alljoyn_aboutobj, sessionport : u16, aboutlistener : alljoyn_aboutdatalistener) -> QStatus); - alljoyn_aboutobj_announce_using_datalistener(obj.param().abi(), core::mem::transmute(sessionport), aboutlistener.param().abi()) + alljoyn_aboutobj_announce_using_datalistener(core::mem::transmute(obj), core::mem::transmute(sessionport), core::mem::transmute(aboutlistener)) } #[inline] -pub unsafe fn alljoyn_aboutobj_create(bus: P0, isannounced: alljoyn_about_announceflag) -> alljoyn_aboutobj -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobj_create(bus: alljoyn_busattachment, isannounced: alljoyn_about_announceflag) -> alljoyn_aboutobj { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobj_create(bus : alljoyn_busattachment, isannounced : alljoyn_about_announceflag) -> alljoyn_aboutobj); - alljoyn_aboutobj_create(bus.param().abi(), core::mem::transmute(isannounced)) + alljoyn_aboutobj_create(core::mem::transmute(bus), core::mem::transmute(isannounced)) } #[inline] -pub unsafe fn alljoyn_aboutobj_destroy(obj: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobj_destroy(obj: alljoyn_aboutobj) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobj_destroy(obj : alljoyn_aboutobj)); - alljoyn_aboutobj_destroy(obj.param().abi()) + alljoyn_aboutobj_destroy(core::mem::transmute(obj)) } #[inline] -pub unsafe fn alljoyn_aboutobj_unannounce(obj: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobj_unannounce(obj: alljoyn_aboutobj) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobj_unannounce(obj : alljoyn_aboutobj) -> QStatus); - alljoyn_aboutobj_unannounce(obj.param().abi()) + alljoyn_aboutobj_unannounce(core::mem::transmute(obj)) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_clear(description: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobjectdescription_clear(description: alljoyn_aboutobjectdescription) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_clear(description : alljoyn_aboutobjectdescription)); - alljoyn_aboutobjectdescription_clear(description.param().abi()) + alljoyn_aboutobjectdescription_clear(core::mem::transmute(description)) } #[inline] pub unsafe fn alljoyn_aboutobjectdescription_create() -> alljoyn_aboutobjectdescription { @@ -654,136 +497,101 @@ pub unsafe fn alljoyn_aboutobjectdescription_create() -> alljoyn_aboutobjectdesc alljoyn_aboutobjectdescription_create() } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_create_full(arg: P0) -> alljoyn_aboutobjectdescription -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobjectdescription_create_full(arg: alljoyn_msgarg) -> alljoyn_aboutobjectdescription { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_create_full(arg : alljoyn_msgarg) -> alljoyn_aboutobjectdescription); - alljoyn_aboutobjectdescription_create_full(arg.param().abi()) + alljoyn_aboutobjectdescription_create_full(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_createfrommsgarg(description: P0, arg: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobjectdescription_createfrommsgarg(description: alljoyn_aboutobjectdescription, arg: alljoyn_msgarg) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_createfrommsgarg(description : alljoyn_aboutobjectdescription, arg : alljoyn_msgarg) -> QStatus); - alljoyn_aboutobjectdescription_createfrommsgarg(description.param().abi(), arg.param().abi()) + alljoyn_aboutobjectdescription_createfrommsgarg(core::mem::transmute(description), core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_destroy(description: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobjectdescription_destroy(description: alljoyn_aboutobjectdescription) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_destroy(description : alljoyn_aboutobjectdescription)); - alljoyn_aboutobjectdescription_destroy(description.param().abi()) + alljoyn_aboutobjectdescription_destroy(core::mem::transmute(description)) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_getinterfacepaths(description: P0, interfacename: P1, paths: *const *const i8, numpaths: usize) -> usize +pub unsafe fn alljoyn_aboutobjectdescription_getinterfacepaths(description: alljoyn_aboutobjectdescription, interfacename: P1, paths: *const *const i8, numpaths: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_getinterfacepaths(description : alljoyn_aboutobjectdescription, interfacename : windows_core::PCSTR, paths : *const *const i8, numpaths : usize) -> usize); - alljoyn_aboutobjectdescription_getinterfacepaths(description.param().abi(), interfacename.param().abi(), core::mem::transmute(paths), core::mem::transmute(numpaths)) + alljoyn_aboutobjectdescription_getinterfacepaths(core::mem::transmute(description), interfacename.param().abi(), core::mem::transmute(paths), core::mem::transmute(numpaths)) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_getinterfaces(description: P0, path: P1, interfaces: *const *const i8, numinterfaces: usize) -> usize +pub unsafe fn alljoyn_aboutobjectdescription_getinterfaces(description: alljoyn_aboutobjectdescription, path: P1, interfaces: *const *const i8, numinterfaces: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_getinterfaces(description : alljoyn_aboutobjectdescription, path : windows_core::PCSTR, interfaces : *const *const i8, numinterfaces : usize) -> usize); - alljoyn_aboutobjectdescription_getinterfaces(description.param().abi(), path.param().abi(), core::mem::transmute(interfaces), core::mem::transmute(numinterfaces)) + alljoyn_aboutobjectdescription_getinterfaces(core::mem::transmute(description), path.param().abi(), core::mem::transmute(interfaces), core::mem::transmute(numinterfaces)) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_getmsgarg(description: P0, msgarg: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobjectdescription_getmsgarg(description: alljoyn_aboutobjectdescription, msgarg: alljoyn_msgarg) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_getmsgarg(description : alljoyn_aboutobjectdescription, msgarg : alljoyn_msgarg) -> QStatus); - alljoyn_aboutobjectdescription_getmsgarg(description.param().abi(), msgarg.param().abi()) + alljoyn_aboutobjectdescription_getmsgarg(core::mem::transmute(description), core::mem::transmute(msgarg)) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_getpaths(description: P0, paths: *const *const i8, numpaths: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutobjectdescription_getpaths(description: alljoyn_aboutobjectdescription, paths: *const *const i8, numpaths: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_getpaths(description : alljoyn_aboutobjectdescription, paths : *const *const i8, numpaths : usize) -> usize); - alljoyn_aboutobjectdescription_getpaths(description.param().abi(), core::mem::transmute(paths), core::mem::transmute(numpaths)) + alljoyn_aboutobjectdescription_getpaths(core::mem::transmute(description), core::mem::transmute(paths), core::mem::transmute(numpaths)) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_hasinterface(description: P0, interfacename: P1) -> u8 +pub unsafe fn alljoyn_aboutobjectdescription_hasinterface(description: alljoyn_aboutobjectdescription, interfacename: P1) -> u8 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_hasinterface(description : alljoyn_aboutobjectdescription, interfacename : windows_core::PCSTR) -> u8); - alljoyn_aboutobjectdescription_hasinterface(description.param().abi(), interfacename.param().abi()) + alljoyn_aboutobjectdescription_hasinterface(core::mem::transmute(description), interfacename.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_hasinterfaceatpath(description: P0, path: P1, interfacename: P2) -> u8 +pub unsafe fn alljoyn_aboutobjectdescription_hasinterfaceatpath(description: alljoyn_aboutobjectdescription, path: P1, interfacename: P2) -> u8 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_hasinterfaceatpath(description : alljoyn_aboutobjectdescription, path : windows_core::PCSTR, interfacename : windows_core::PCSTR) -> u8); - alljoyn_aboutobjectdescription_hasinterfaceatpath(description.param().abi(), path.param().abi(), interfacename.param().abi()) + alljoyn_aboutobjectdescription_hasinterfaceatpath(core::mem::transmute(description), path.param().abi(), interfacename.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutobjectdescription_haspath(description: P0, path: P1) -> u8 +pub unsafe fn alljoyn_aboutobjectdescription_haspath(description: alljoyn_aboutobjectdescription, path: P1) -> u8 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutobjectdescription_haspath(description : alljoyn_aboutobjectdescription, path : windows_core::PCSTR) -> u8); - alljoyn_aboutobjectdescription_haspath(description.param().abi(), path.param().abi()) + alljoyn_aboutobjectdescription_haspath(core::mem::transmute(description), path.param().abi()) } #[inline] -pub unsafe fn alljoyn_aboutproxy_create(bus: P0, busname: P1, sessionid: u32) -> alljoyn_aboutproxy +pub unsafe fn alljoyn_aboutproxy_create(bus: alljoyn_busattachment, busname: P1, sessionid: u32) -> alljoyn_aboutproxy where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutproxy_create(bus : alljoyn_busattachment, busname : windows_core::PCSTR, sessionid : u32) -> alljoyn_aboutproxy); - alljoyn_aboutproxy_create(bus.param().abi(), busname.param().abi(), core::mem::transmute(sessionid)) + alljoyn_aboutproxy_create(core::mem::transmute(bus), busname.param().abi(), core::mem::transmute(sessionid)) } #[inline] -pub unsafe fn alljoyn_aboutproxy_destroy(proxy: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutproxy_destroy(proxy: alljoyn_aboutproxy) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutproxy_destroy(proxy : alljoyn_aboutproxy)); - alljoyn_aboutproxy_destroy(proxy.param().abi()) + alljoyn_aboutproxy_destroy(core::mem::transmute(proxy)) } #[inline] -pub unsafe fn alljoyn_aboutproxy_getaboutdata(proxy: P0, language: P1, data: P2) -> QStatus +pub unsafe fn alljoyn_aboutproxy_getaboutdata(proxy: alljoyn_aboutproxy, language: P1, data: alljoyn_msgarg) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutproxy_getaboutdata(proxy : alljoyn_aboutproxy, language : windows_core::PCSTR, data : alljoyn_msgarg) -> QStatus); - alljoyn_aboutproxy_getaboutdata(proxy.param().abi(), language.param().abi(), data.param().abi()) + alljoyn_aboutproxy_getaboutdata(core::mem::transmute(proxy), language.param().abi(), core::mem::transmute(data)) } #[inline] -pub unsafe fn alljoyn_aboutproxy_getobjectdescription(proxy: P0, objectdesc: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutproxy_getobjectdescription(proxy: alljoyn_aboutproxy, objectdesc: alljoyn_msgarg) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutproxy_getobjectdescription(proxy : alljoyn_aboutproxy, objectdesc : alljoyn_msgarg) -> QStatus); - alljoyn_aboutproxy_getobjectdescription(proxy.param().abi(), objectdesc.param().abi()) + alljoyn_aboutproxy_getobjectdescription(core::mem::transmute(proxy), core::mem::transmute(objectdesc)) } #[inline] -pub unsafe fn alljoyn_aboutproxy_getversion(proxy: P0, version: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_aboutproxy_getversion(proxy: alljoyn_aboutproxy, version: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_aboutproxy_getversion(proxy : alljoyn_aboutproxy, version : *mut u16) -> QStatus); - alljoyn_aboutproxy_getversion(proxy.param().abi(), core::mem::transmute(version)) + alljoyn_aboutproxy_getversion(core::mem::transmute(proxy), core::mem::transmute(version)) } #[inline] pub unsafe fn alljoyn_applicationstatelistener_create(callbacks: *const alljoyn_applicationstatelistener_callbacks, context: *mut core::ffi::c_void) -> alljoyn_applicationstatelistener { @@ -791,12 +599,9 @@ pub unsafe fn alljoyn_applicationstatelistener_create(callbacks: *const alljoyn_ alljoyn_applicationstatelistener_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_applicationstatelistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_applicationstatelistener_destroy(listener: alljoyn_applicationstatelistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_applicationstatelistener_destroy(listener : alljoyn_applicationstatelistener)); - alljoyn_applicationstatelistener_destroy(listener.param().abi()) + alljoyn_applicationstatelistener_destroy(core::mem::transmute(listener)) } #[inline] pub unsafe fn alljoyn_authlistener_create(callbacks: *const alljoyn_authlistener_callbacks, context: *const core::ffi::c_void) -> alljoyn_authlistener { @@ -804,37 +609,24 @@ pub unsafe fn alljoyn_authlistener_create(callbacks: *const alljoyn_authlistener alljoyn_authlistener_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_authlistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_authlistener_destroy(listener: alljoyn_authlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_authlistener_destroy(listener : alljoyn_authlistener)); - alljoyn_authlistener_destroy(listener.param().abi()) + alljoyn_authlistener_destroy(core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_authlistener_requestcredentialsresponse(listener: P0, authcontext: *mut core::ffi::c_void, accept: i32, credentials: P3) -> QStatus -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn alljoyn_authlistener_requestcredentialsresponse(listener: alljoyn_authlistener, authcontext: *mut core::ffi::c_void, accept: i32, credentials: alljoyn_credentials) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_authlistener_requestcredentialsresponse(listener : alljoyn_authlistener, authcontext : *mut core::ffi::c_void, accept : i32, credentials : alljoyn_credentials) -> QStatus); - alljoyn_authlistener_requestcredentialsresponse(listener.param().abi(), core::mem::transmute(authcontext), core::mem::transmute(accept), credentials.param().abi()) + alljoyn_authlistener_requestcredentialsresponse(core::mem::transmute(listener), core::mem::transmute(authcontext), core::mem::transmute(accept), core::mem::transmute(credentials)) } #[inline] -pub unsafe fn alljoyn_authlistener_setsharedsecret(listener: P0, sharedsecret: *const u8, sharedsecretsize: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_authlistener_setsharedsecret(listener: alljoyn_authlistener, sharedsecret: *const u8, sharedsecretsize: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_authlistener_setsharedsecret(listener : alljoyn_authlistener, sharedsecret : *const u8, sharedsecretsize : usize) -> QStatus); - alljoyn_authlistener_setsharedsecret(listener.param().abi(), core::mem::transmute(sharedsecret), core::mem::transmute(sharedsecretsize)) + alljoyn_authlistener_setsharedsecret(core::mem::transmute(listener), core::mem::transmute(sharedsecret), core::mem::transmute(sharedsecretsize)) } #[inline] -pub unsafe fn alljoyn_authlistener_verifycredentialsresponse(listener: P0, authcontext: *mut core::ffi::c_void, accept: i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_authlistener_verifycredentialsresponse(listener: alljoyn_authlistener, authcontext: *mut core::ffi::c_void, accept: i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_authlistener_verifycredentialsresponse(listener : alljoyn_authlistener, authcontext : *mut core::ffi::c_void, accept : i32) -> QStatus); - alljoyn_authlistener_verifycredentialsresponse(listener.param().abi(), core::mem::transmute(authcontext), core::mem::transmute(accept)) + alljoyn_authlistener_verifycredentialsresponse(core::mem::transmute(listener), core::mem::transmute(authcontext), core::mem::transmute(accept)) } #[inline] pub unsafe fn alljoyn_authlistenerasync_create(callbacks: *const alljoyn_authlistenerasync_callbacks, context: *const core::ffi::c_void) -> alljoyn_authlistener { @@ -842,201 +634,160 @@ pub unsafe fn alljoyn_authlistenerasync_create(callbacks: *const alljoyn_authlis alljoyn_authlistenerasync_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_authlistenerasync_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_authlistenerasync_destroy(listener: alljoyn_authlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_authlistenerasync_destroy(listener : alljoyn_authlistener)); - alljoyn_authlistenerasync_destroy(listener.param().abi()) + alljoyn_authlistenerasync_destroy(core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_autopinger_adddestination(autopinger: P0, group: P1, destination: P2) -> QStatus +pub unsafe fn alljoyn_autopinger_adddestination(autopinger: alljoyn_autopinger, group: P1, destination: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_adddestination(autopinger : alljoyn_autopinger, group : windows_core::PCSTR, destination : windows_core::PCSTR) -> QStatus); - alljoyn_autopinger_adddestination(autopinger.param().abi(), group.param().abi(), destination.param().abi()) + alljoyn_autopinger_adddestination(core::mem::transmute(autopinger), group.param().abi(), destination.param().abi()) } #[inline] -pub unsafe fn alljoyn_autopinger_addpinggroup(autopinger: P0, group: P1, listener: P2, pinginterval: u32) +pub unsafe fn alljoyn_autopinger_addpinggroup(autopinger: alljoyn_autopinger, group: P1, listener: alljoyn_pinglistener, pinginterval: u32) where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_addpinggroup(autopinger : alljoyn_autopinger, group : windows_core::PCSTR, listener : alljoyn_pinglistener, pinginterval : u32)); - alljoyn_autopinger_addpinggroup(autopinger.param().abi(), group.param().abi(), listener.param().abi(), core::mem::transmute(pinginterval)) + alljoyn_autopinger_addpinggroup(core::mem::transmute(autopinger), group.param().abi(), core::mem::transmute(listener), core::mem::transmute(pinginterval)) } #[inline] -pub unsafe fn alljoyn_autopinger_create(bus: P0) -> alljoyn_autopinger -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_autopinger_create(bus: alljoyn_busattachment) -> alljoyn_autopinger { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_create(bus : alljoyn_busattachment) -> alljoyn_autopinger); - alljoyn_autopinger_create(bus.param().abi()) + alljoyn_autopinger_create(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_autopinger_destroy(autopinger: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_autopinger_destroy(autopinger: alljoyn_autopinger) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_destroy(autopinger : alljoyn_autopinger)); - alljoyn_autopinger_destroy(autopinger.param().abi()) + alljoyn_autopinger_destroy(core::mem::transmute(autopinger)) } #[inline] -pub unsafe fn alljoyn_autopinger_pause(autopinger: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_autopinger_pause(autopinger: alljoyn_autopinger) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_pause(autopinger : alljoyn_autopinger)); - alljoyn_autopinger_pause(autopinger.param().abi()) + alljoyn_autopinger_pause(core::mem::transmute(autopinger)) } #[inline] -pub unsafe fn alljoyn_autopinger_removedestination(autopinger: P0, group: P1, destination: P2, removeall: i32) -> QStatus +pub unsafe fn alljoyn_autopinger_removedestination(autopinger: alljoyn_autopinger, group: P1, destination: P2, removeall: i32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_removedestination(autopinger : alljoyn_autopinger, group : windows_core::PCSTR, destination : windows_core::PCSTR, removeall : i32) -> QStatus); - alljoyn_autopinger_removedestination(autopinger.param().abi(), group.param().abi(), destination.param().abi(), core::mem::transmute(removeall)) + alljoyn_autopinger_removedestination(core::mem::transmute(autopinger), group.param().abi(), destination.param().abi(), core::mem::transmute(removeall)) } #[inline] -pub unsafe fn alljoyn_autopinger_removepinggroup(autopinger: P0, group: P1) +pub unsafe fn alljoyn_autopinger_removepinggroup(autopinger: alljoyn_autopinger, group: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_removepinggroup(autopinger : alljoyn_autopinger, group : windows_core::PCSTR)); - alljoyn_autopinger_removepinggroup(autopinger.param().abi(), group.param().abi()) + alljoyn_autopinger_removepinggroup(core::mem::transmute(autopinger), group.param().abi()) } #[inline] -pub unsafe fn alljoyn_autopinger_resume(autopinger: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_autopinger_resume(autopinger: alljoyn_autopinger) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_resume(autopinger : alljoyn_autopinger)); - alljoyn_autopinger_resume(autopinger.param().abi()) + alljoyn_autopinger_resume(core::mem::transmute(autopinger)) } #[inline] -pub unsafe fn alljoyn_autopinger_setpinginterval(autopinger: P0, group: P1, pinginterval: u32) -> QStatus +pub unsafe fn alljoyn_autopinger_setpinginterval(autopinger: alljoyn_autopinger, group: P1, pinginterval: u32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_autopinger_setpinginterval(autopinger : alljoyn_autopinger, group : windows_core::PCSTR, pinginterval : u32) -> QStatus); - alljoyn_autopinger_setpinginterval(autopinger.param().abi(), group.param().abi(), core::mem::transmute(pinginterval)) + alljoyn_autopinger_setpinginterval(core::mem::transmute(autopinger), group.param().abi(), core::mem::transmute(pinginterval)) } #[inline] -pub unsafe fn alljoyn_busattachment_addlogonentry(bus: P0, authmechanism: P1, username: P2, password: P3) -> QStatus +pub unsafe fn alljoyn_busattachment_addlogonentry(bus: alljoyn_busattachment, authmechanism: P1, username: P2, password: P3) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_addlogonentry(bus : alljoyn_busattachment, authmechanism : windows_core::PCSTR, username : windows_core::PCSTR, password : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_addlogonentry(bus.param().abi(), authmechanism.param().abi(), username.param().abi(), password.param().abi()) + alljoyn_busattachment_addlogonentry(core::mem::transmute(bus), authmechanism.param().abi(), username.param().abi(), password.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_addmatch(bus: P0, rule: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_addmatch(bus: alljoyn_busattachment, rule: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_addmatch(bus : alljoyn_busattachment, rule : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_addmatch(bus.param().abi(), rule.param().abi()) + alljoyn_busattachment_addmatch(core::mem::transmute(bus), rule.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_advertisename(bus: P0, name: P1, transports: u16) -> QStatus +pub unsafe fn alljoyn_busattachment_advertisename(bus: alljoyn_busattachment, name: P1, transports: u16) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_advertisename(bus : alljoyn_busattachment, name : windows_core::PCSTR, transports : u16) -> QStatus); - alljoyn_busattachment_advertisename(bus.param().abi(), name.param().abi(), core::mem::transmute(transports)) + alljoyn_busattachment_advertisename(core::mem::transmute(bus), name.param().abi(), core::mem::transmute(transports)) } #[inline] -pub unsafe fn alljoyn_busattachment_bindsessionport(bus: P0, sessionport: *mut u16, opts: P2, listener: P3) -> QStatus -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_bindsessionport(bus: alljoyn_busattachment, sessionport: *mut u16, opts: alljoyn_sessionopts, listener: alljoyn_sessionportlistener) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_bindsessionport(bus : alljoyn_busattachment, sessionport : *mut u16, opts : alljoyn_sessionopts, listener : alljoyn_sessionportlistener) -> QStatus); - alljoyn_busattachment_bindsessionport(bus.param().abi(), core::mem::transmute(sessionport), opts.param().abi(), listener.param().abi()) + alljoyn_busattachment_bindsessionport(core::mem::transmute(bus), core::mem::transmute(sessionport), core::mem::transmute(opts), core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_busattachment_canceladvertisename(bus: P0, name: P1, transports: u16) -> QStatus +pub unsafe fn alljoyn_busattachment_canceladvertisename(bus: alljoyn_busattachment, name: P1, transports: u16) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_canceladvertisename(bus : alljoyn_busattachment, name : windows_core::PCSTR, transports : u16) -> QStatus); - alljoyn_busattachment_canceladvertisename(bus.param().abi(), name.param().abi(), core::mem::transmute(transports)) + alljoyn_busattachment_canceladvertisename(core::mem::transmute(bus), name.param().abi(), core::mem::transmute(transports)) } #[inline] -pub unsafe fn alljoyn_busattachment_cancelfindadvertisedname(bus: P0, nameprefix: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_cancelfindadvertisedname(bus: alljoyn_busattachment, nameprefix: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_cancelfindadvertisedname(bus : alljoyn_busattachment, nameprefix : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_cancelfindadvertisedname(bus.param().abi(), nameprefix.param().abi()) + alljoyn_busattachment_cancelfindadvertisedname(core::mem::transmute(bus), nameprefix.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_cancelfindadvertisednamebytransport(bus: P0, nameprefix: P1, transports: u16) -> QStatus +pub unsafe fn alljoyn_busattachment_cancelfindadvertisednamebytransport(bus: alljoyn_busattachment, nameprefix: P1, transports: u16) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_cancelfindadvertisednamebytransport(bus : alljoyn_busattachment, nameprefix : windows_core::PCSTR, transports : u16) -> QStatus); - alljoyn_busattachment_cancelfindadvertisednamebytransport(bus.param().abi(), nameprefix.param().abi(), core::mem::transmute(transports)) + alljoyn_busattachment_cancelfindadvertisednamebytransport(core::mem::transmute(bus), nameprefix.param().abi(), core::mem::transmute(transports)) } #[inline] -pub unsafe fn alljoyn_busattachment_cancelwhoimplements_interface(bus: P0, implementsinterface: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_cancelwhoimplements_interface(bus: alljoyn_busattachment, implementsinterface: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_cancelwhoimplements_interface(bus : alljoyn_busattachment, implementsinterface : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_cancelwhoimplements_interface(bus.param().abi(), implementsinterface.param().abi()) + alljoyn_busattachment_cancelwhoimplements_interface(core::mem::transmute(bus), implementsinterface.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_cancelwhoimplements_interfaces(bus: P0, implementsinterfaces: *const *const i8, numberinterfaces: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_cancelwhoimplements_interfaces(bus: alljoyn_busattachment, implementsinterfaces: *const *const i8, numberinterfaces: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_cancelwhoimplements_interfaces(bus : alljoyn_busattachment, implementsinterfaces : *const *const i8, numberinterfaces : usize) -> QStatus); - alljoyn_busattachment_cancelwhoimplements_interfaces(bus.param().abi(), core::mem::transmute(implementsinterfaces), core::mem::transmute(numberinterfaces)) + alljoyn_busattachment_cancelwhoimplements_interfaces(core::mem::transmute(bus), core::mem::transmute(implementsinterfaces), core::mem::transmute(numberinterfaces)) } #[inline] -pub unsafe fn alljoyn_busattachment_clearkeys(bus: P0, guid: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_clearkeys(bus: alljoyn_busattachment, guid: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_clearkeys(bus : alljoyn_busattachment, guid : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_clearkeys(bus.param().abi(), guid.param().abi()) + alljoyn_busattachment_clearkeys(core::mem::transmute(bus), guid.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_clearkeystore(bus: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_clearkeystore(bus: alljoyn_busattachment) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_clearkeystore(bus : alljoyn_busattachment)); - alljoyn_busattachment_clearkeystore(bus.param().abi()) + alljoyn_busattachment_clearkeystore(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_connect(bus: P0, connectspec: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_connect(bus: alljoyn_busattachment, connectspec: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_connect(bus : alljoyn_busattachment, connectspec : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_connect(bus.param().abi(), connectspec.param().abi()) + alljoyn_busattachment_connect(core::mem::transmute(bus), connectspec.param().abi()) } #[inline] pub unsafe fn alljoyn_busattachment_create(applicationname: P0, allowremotemessages: i32) -> alljoyn_busattachment @@ -1055,31 +806,28 @@ where alljoyn_busattachment_create_concurrency(applicationname.param().abi(), core::mem::transmute(allowremotemessages), core::mem::transmute(concurrency)) } #[inline] -pub unsafe fn alljoyn_busattachment_createinterface(bus: P0, name: P1, iface: *mut alljoyn_interfacedescription) -> QStatus +pub unsafe fn alljoyn_busattachment_createinterface(bus: alljoyn_busattachment, name: P1, iface: *mut alljoyn_interfacedescription) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_createinterface(bus : alljoyn_busattachment, name : windows_core::PCSTR, iface : *mut alljoyn_interfacedescription) -> QStatus); - alljoyn_busattachment_createinterface(bus.param().abi(), name.param().abi(), core::mem::transmute(iface)) + alljoyn_busattachment_createinterface(core::mem::transmute(bus), name.param().abi(), core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_busattachment_createinterface_secure(bus: P0, name: P1, iface: *mut alljoyn_interfacedescription, secpolicy: alljoyn_interfacedescription_securitypolicy) -> QStatus +pub unsafe fn alljoyn_busattachment_createinterface_secure(bus: alljoyn_busattachment, name: P1, iface: *mut alljoyn_interfacedescription, secpolicy: alljoyn_interfacedescription_securitypolicy) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_createinterface_secure(bus : alljoyn_busattachment, name : windows_core::PCSTR, iface : *mut alljoyn_interfacedescription, secpolicy : alljoyn_interfacedescription_securitypolicy) -> QStatus); - alljoyn_busattachment_createinterface_secure(bus.param().abi(), name.param().abi(), core::mem::transmute(iface), core::mem::transmute(secpolicy)) + alljoyn_busattachment_createinterface_secure(core::mem::transmute(bus), name.param().abi(), core::mem::transmute(iface), core::mem::transmute(secpolicy)) } #[inline] -pub unsafe fn alljoyn_busattachment_createinterfacesfromxml(bus: P0, xml: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_createinterfacesfromxml(bus: alljoyn_busattachment, xml: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_createinterfacesfromxml(bus : alljoyn_busattachment, xml : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_createinterfacesfromxml(bus.param().abi(), xml.param().abi()) + alljoyn_busattachment_createinterfacesfromxml(core::mem::transmute(bus), xml.param().abi()) } #[inline] pub unsafe fn alljoyn_busattachment_deletedefaultkeystore(applicationname: P0) -> QStatus @@ -1090,171 +838,126 @@ where alljoyn_busattachment_deletedefaultkeystore(applicationname.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_deleteinterface(bus: P0, iface: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_deleteinterface(bus: alljoyn_busattachment, iface: alljoyn_interfacedescription) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_deleteinterface(bus : alljoyn_busattachment, iface : alljoyn_interfacedescription) -> QStatus); - alljoyn_busattachment_deleteinterface(bus.param().abi(), iface.param().abi()) + alljoyn_busattachment_deleteinterface(core::mem::transmute(bus), core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_busattachment_destroy(bus: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_destroy(bus: alljoyn_busattachment) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_destroy(bus : alljoyn_busattachment)); - alljoyn_busattachment_destroy(bus.param().abi()) + alljoyn_busattachment_destroy(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_disconnect(bus: P0, unused: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_disconnect(bus: alljoyn_busattachment, unused: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_disconnect(bus : alljoyn_busattachment, unused : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_disconnect(bus.param().abi(), unused.param().abi()) + alljoyn_busattachment_disconnect(core::mem::transmute(bus), unused.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_enableconcurrentcallbacks(bus: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_enableconcurrentcallbacks(bus: alljoyn_busattachment) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_enableconcurrentcallbacks(bus : alljoyn_busattachment)); - alljoyn_busattachment_enableconcurrentcallbacks(bus.param().abi()) + alljoyn_busattachment_enableconcurrentcallbacks(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_enablepeersecurity(bus: P0, authmechanisms: P1, listener: P2, keystorefilename: P3, isshared: i32) -> QStatus +pub unsafe fn alljoyn_busattachment_enablepeersecurity(bus: alljoyn_busattachment, authmechanisms: P1, listener: alljoyn_authlistener, keystorefilename: P3, isshared: i32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_enablepeersecurity(bus : alljoyn_busattachment, authmechanisms : windows_core::PCSTR, listener : alljoyn_authlistener, keystorefilename : windows_core::PCSTR, isshared : i32) -> QStatus); - alljoyn_busattachment_enablepeersecurity(bus.param().abi(), authmechanisms.param().abi(), listener.param().abi(), keystorefilename.param().abi(), core::mem::transmute(isshared)) + alljoyn_busattachment_enablepeersecurity(core::mem::transmute(bus), authmechanisms.param().abi(), core::mem::transmute(listener), keystorefilename.param().abi(), core::mem::transmute(isshared)) } #[inline] -pub unsafe fn alljoyn_busattachment_enablepeersecuritywithpermissionconfigurationlistener(bus: P0, authmechanisms: P1, authlistener: P2, keystorefilename: P3, isshared: i32, permissionconfigurationlistener: P5) -> QStatus +pub unsafe fn alljoyn_busattachment_enablepeersecuritywithpermissionconfigurationlistener(bus: alljoyn_busattachment, authmechanisms: P1, authlistener: alljoyn_authlistener, keystorefilename: P3, isshared: i32, permissionconfigurationlistener: alljoyn_permissionconfigurationlistener) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_enablepeersecuritywithpermissionconfigurationlistener(bus : alljoyn_busattachment, authmechanisms : windows_core::PCSTR, authlistener : alljoyn_authlistener, keystorefilename : windows_core::PCSTR, isshared : i32, permissionconfigurationlistener : alljoyn_permissionconfigurationlistener) -> QStatus); - alljoyn_busattachment_enablepeersecuritywithpermissionconfigurationlistener(bus.param().abi(), authmechanisms.param().abi(), authlistener.param().abi(), keystorefilename.param().abi(), core::mem::transmute(isshared), permissionconfigurationlistener.param().abi()) + alljoyn_busattachment_enablepeersecuritywithpermissionconfigurationlistener(core::mem::transmute(bus), authmechanisms.param().abi(), core::mem::transmute(authlistener), keystorefilename.param().abi(), core::mem::transmute(isshared), core::mem::transmute(permissionconfigurationlistener)) } #[inline] -pub unsafe fn alljoyn_busattachment_findadvertisedname(bus: P0, nameprefix: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_findadvertisedname(bus: alljoyn_busattachment, nameprefix: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_findadvertisedname(bus : alljoyn_busattachment, nameprefix : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_findadvertisedname(bus.param().abi(), nameprefix.param().abi()) + alljoyn_busattachment_findadvertisedname(core::mem::transmute(bus), nameprefix.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_findadvertisednamebytransport(bus: P0, nameprefix: P1, transports: u16) -> QStatus +pub unsafe fn alljoyn_busattachment_findadvertisednamebytransport(bus: alljoyn_busattachment, nameprefix: P1, transports: u16) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_findadvertisednamebytransport(bus : alljoyn_busattachment, nameprefix : windows_core::PCSTR, transports : u16) -> QStatus); - alljoyn_busattachment_findadvertisednamebytransport(bus.param().abi(), nameprefix.param().abi(), core::mem::transmute(transports)) + alljoyn_busattachment_findadvertisednamebytransport(core::mem::transmute(bus), nameprefix.param().abi(), core::mem::transmute(transports)) } #[inline] -pub unsafe fn alljoyn_busattachment_getalljoyndebugobj(bus: P0) -> alljoyn_proxybusobject -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getalljoyndebugobj(bus: alljoyn_busattachment) -> alljoyn_proxybusobject { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getalljoyndebugobj(bus : alljoyn_busattachment) -> alljoyn_proxybusobject); - alljoyn_busattachment_getalljoyndebugobj(bus.param().abi()) + alljoyn_busattachment_getalljoyndebugobj(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_getalljoynproxyobj(bus: P0) -> alljoyn_proxybusobject -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getalljoynproxyobj(bus: alljoyn_busattachment) -> alljoyn_proxybusobject { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getalljoynproxyobj(bus : alljoyn_busattachment) -> alljoyn_proxybusobject); - alljoyn_busattachment_getalljoynproxyobj(bus.param().abi()) + alljoyn_busattachment_getalljoynproxyobj(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_getconcurrency(bus: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getconcurrency(bus: alljoyn_busattachment) -> u32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getconcurrency(bus : alljoyn_busattachment) -> u32); - alljoyn_busattachment_getconcurrency(bus.param().abi()) + alljoyn_busattachment_getconcurrency(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_getconnectspec(bus: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getconnectspec(bus: alljoyn_busattachment) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getconnectspec(bus : alljoyn_busattachment) -> windows_core::PCSTR); - alljoyn_busattachment_getconnectspec(bus.param().abi()) + alljoyn_busattachment_getconnectspec(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_getdbusproxyobj(bus: P0) -> alljoyn_proxybusobject -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getdbusproxyobj(bus: alljoyn_busattachment) -> alljoyn_proxybusobject { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getdbusproxyobj(bus : alljoyn_busattachment) -> alljoyn_proxybusobject); - alljoyn_busattachment_getdbusproxyobj(bus.param().abi()) + alljoyn_busattachment_getdbusproxyobj(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_getglobalguidstring(bus: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getglobalguidstring(bus: alljoyn_busattachment) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getglobalguidstring(bus : alljoyn_busattachment) -> windows_core::PCSTR); - alljoyn_busattachment_getglobalguidstring(bus.param().abi()) + alljoyn_busattachment_getglobalguidstring(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_getinterface(bus: P0, name: P1) -> alljoyn_interfacedescription +pub unsafe fn alljoyn_busattachment_getinterface(bus: alljoyn_busattachment, name: P1) -> alljoyn_interfacedescription where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getinterface(bus : alljoyn_busattachment, name : windows_core::PCSTR) -> alljoyn_interfacedescription); - alljoyn_busattachment_getinterface(bus.param().abi(), name.param().abi()) + alljoyn_busattachment_getinterface(core::mem::transmute(bus), name.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_getinterfaces(bus: P0, ifaces: *const alljoyn_interfacedescription, numifaces: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getinterfaces(bus: alljoyn_busattachment, ifaces: *const alljoyn_interfacedescription, numifaces: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getinterfaces(bus : alljoyn_busattachment, ifaces : *const alljoyn_interfacedescription, numifaces : usize) -> usize); - alljoyn_busattachment_getinterfaces(bus.param().abi(), core::mem::transmute(ifaces), core::mem::transmute(numifaces)) + alljoyn_busattachment_getinterfaces(core::mem::transmute(bus), core::mem::transmute(ifaces), core::mem::transmute(numifaces)) } #[inline] -pub unsafe fn alljoyn_busattachment_getkeyexpiration(bus: P0, guid: P1, timeout: *mut u32) -> QStatus +pub unsafe fn alljoyn_busattachment_getkeyexpiration(bus: alljoyn_busattachment, guid: P1, timeout: *mut u32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getkeyexpiration(bus : alljoyn_busattachment, guid : windows_core::PCSTR, timeout : *mut u32) -> QStatus); - alljoyn_busattachment_getkeyexpiration(bus.param().abi(), guid.param().abi(), core::mem::transmute(timeout)) + alljoyn_busattachment_getkeyexpiration(core::mem::transmute(bus), guid.param().abi(), core::mem::transmute(timeout)) } #[inline] -pub unsafe fn alljoyn_busattachment_getpeerguid(bus: P0, name: P1, guid: P2, guidsz: *mut usize) -> QStatus +pub unsafe fn alljoyn_busattachment_getpeerguid(bus: alljoyn_busattachment, name: P1, guid: P2, guidsz: *mut usize) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getpeerguid(bus : alljoyn_busattachment, name : windows_core::PCSTR, guid : windows_core::PCSTR, guidsz : *mut usize) -> QStatus); - alljoyn_busattachment_getpeerguid(bus.param().abi(), name.param().abi(), guid.param().abi(), core::mem::transmute(guidsz)) + alljoyn_busattachment_getpeerguid(core::mem::transmute(bus), name.param().abi(), guid.param().abi(), core::mem::transmute(guidsz)) } #[inline] -pub unsafe fn alljoyn_busattachment_getpermissionconfigurator(bus: P0) -> alljoyn_permissionconfigurator -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getpermissionconfigurator(bus: alljoyn_busattachment) -> alljoyn_permissionconfigurator { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getpermissionconfigurator(bus : alljoyn_busattachment) -> alljoyn_permissionconfigurator); - alljoyn_busattachment_getpermissionconfigurator(bus.param().abi()) + alljoyn_busattachment_getpermissionconfigurator(core::mem::transmute(bus)) } #[inline] pub unsafe fn alljoyn_busattachment_gettimestamp() -> u32 { @@ -1262,388 +965,275 @@ pub unsafe fn alljoyn_busattachment_gettimestamp() -> u32 { alljoyn_busattachment_gettimestamp() } #[inline] -pub unsafe fn alljoyn_busattachment_getuniquename(bus: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_getuniquename(bus: alljoyn_busattachment) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_getuniquename(bus : alljoyn_busattachment) -> windows_core::PCSTR); - alljoyn_busattachment_getuniquename(bus.param().abi()) + alljoyn_busattachment_getuniquename(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_isconnected(bus: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_isconnected(bus: alljoyn_busattachment) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_isconnected(bus : alljoyn_busattachment) -> i32); - alljoyn_busattachment_isconnected(bus.param().abi()) + alljoyn_busattachment_isconnected(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_ispeersecurityenabled(bus: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_ispeersecurityenabled(bus: alljoyn_busattachment) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_ispeersecurityenabled(bus : alljoyn_busattachment) -> i32); - alljoyn_busattachment_ispeersecurityenabled(bus.param().abi()) + alljoyn_busattachment_ispeersecurityenabled(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_isstarted(bus: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_isstarted(bus: alljoyn_busattachment) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_isstarted(bus : alljoyn_busattachment) -> i32); - alljoyn_busattachment_isstarted(bus.param().abi()) + alljoyn_busattachment_isstarted(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_isstopping(bus: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_isstopping(bus: alljoyn_busattachment) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_isstopping(bus : alljoyn_busattachment) -> i32); - alljoyn_busattachment_isstopping(bus.param().abi()) + alljoyn_busattachment_isstopping(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_join(bus: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_join(bus: alljoyn_busattachment) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_join(bus : alljoyn_busattachment) -> QStatus); - alljoyn_busattachment_join(bus.param().abi()) + alljoyn_busattachment_join(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_joinsession(bus: P0, sessionhost: P1, sessionport: u16, listener: P3, sessionid: *mut u32, opts: P5) -> QStatus +pub unsafe fn alljoyn_busattachment_joinsession(bus: alljoyn_busattachment, sessionhost: P1, sessionport: u16, listener: alljoyn_sessionlistener, sessionid: *mut u32, opts: alljoyn_sessionopts) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_joinsession(bus : alljoyn_busattachment, sessionhost : windows_core::PCSTR, sessionport : u16, listener : alljoyn_sessionlistener, sessionid : *mut u32, opts : alljoyn_sessionopts) -> QStatus); - alljoyn_busattachment_joinsession(bus.param().abi(), sessionhost.param().abi(), core::mem::transmute(sessionport), listener.param().abi(), core::mem::transmute(sessionid), opts.param().abi()) + alljoyn_busattachment_joinsession(core::mem::transmute(bus), sessionhost.param().abi(), core::mem::transmute(sessionport), core::mem::transmute(listener), core::mem::transmute(sessionid), core::mem::transmute(opts)) } #[inline] -pub unsafe fn alljoyn_busattachment_joinsessionasync(bus: P0, sessionhost: P1, sessionport: u16, listener: P3, opts: P4, callback: alljoyn_busattachment_joinsessioncb_ptr, context: *mut core::ffi::c_void) -> QStatus +pub unsafe fn alljoyn_busattachment_joinsessionasync(bus: alljoyn_busattachment, sessionhost: P1, sessionport: u16, listener: alljoyn_sessionlistener, opts: alljoyn_sessionopts, callback: alljoyn_busattachment_joinsessioncb_ptr, context: *mut core::ffi::c_void) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_joinsessionasync(bus : alljoyn_busattachment, sessionhost : windows_core::PCSTR, sessionport : u16, listener : alljoyn_sessionlistener, opts : alljoyn_sessionopts, callback : alljoyn_busattachment_joinsessioncb_ptr, context : *mut core::ffi::c_void) -> QStatus); - alljoyn_busattachment_joinsessionasync(bus.param().abi(), sessionhost.param().abi(), core::mem::transmute(sessionport), listener.param().abi(), opts.param().abi(), core::mem::transmute(callback), core::mem::transmute(context)) + alljoyn_busattachment_joinsessionasync(core::mem::transmute(bus), sessionhost.param().abi(), core::mem::transmute(sessionport), core::mem::transmute(listener), core::mem::transmute(opts), core::mem::transmute(callback), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_busattachment_leavesession(bus: P0, sessionid: u32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_leavesession(bus: alljoyn_busattachment, sessionid: u32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_leavesession(bus : alljoyn_busattachment, sessionid : u32) -> QStatus); - alljoyn_busattachment_leavesession(bus.param().abi(), core::mem::transmute(sessionid)) + alljoyn_busattachment_leavesession(core::mem::transmute(bus), core::mem::transmute(sessionid)) } #[inline] -pub unsafe fn alljoyn_busattachment_namehasowner(bus: P0, name: P1, hasowner: *mut i32) -> QStatus +pub unsafe fn alljoyn_busattachment_namehasowner(bus: alljoyn_busattachment, name: P1, hasowner: *mut i32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_namehasowner(bus : alljoyn_busattachment, name : windows_core::PCSTR, hasowner : *mut i32) -> QStatus); - alljoyn_busattachment_namehasowner(bus.param().abi(), name.param().abi(), core::mem::transmute(hasowner)) + alljoyn_busattachment_namehasowner(core::mem::transmute(bus), name.param().abi(), core::mem::transmute(hasowner)) } #[inline] -pub unsafe fn alljoyn_busattachment_ping(bus: P0, name: P1, timeout: u32) -> QStatus +pub unsafe fn alljoyn_busattachment_ping(bus: alljoyn_busattachment, name: P1, timeout: u32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_ping(bus : alljoyn_busattachment, name : windows_core::PCSTR, timeout : u32) -> QStatus); - alljoyn_busattachment_ping(bus.param().abi(), name.param().abi(), core::mem::transmute(timeout)) + alljoyn_busattachment_ping(core::mem::transmute(bus), name.param().abi(), core::mem::transmute(timeout)) } #[inline] -pub unsafe fn alljoyn_busattachment_registeraboutlistener(bus: P0, aboutlistener: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_registeraboutlistener(bus: alljoyn_busattachment, aboutlistener: alljoyn_aboutlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_registeraboutlistener(bus : alljoyn_busattachment, aboutlistener : alljoyn_aboutlistener)); - alljoyn_busattachment_registeraboutlistener(bus.param().abi(), aboutlistener.param().abi()) + alljoyn_busattachment_registeraboutlistener(core::mem::transmute(bus), core::mem::transmute(aboutlistener)) } #[inline] -pub unsafe fn alljoyn_busattachment_registerapplicationstatelistener(bus: P0, listener: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_registerapplicationstatelistener(bus: alljoyn_busattachment, listener: alljoyn_applicationstatelistener) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_registerapplicationstatelistener(bus : alljoyn_busattachment, listener : alljoyn_applicationstatelistener) -> QStatus); - alljoyn_busattachment_registerapplicationstatelistener(bus.param().abi(), listener.param().abi()) + alljoyn_busattachment_registerapplicationstatelistener(core::mem::transmute(bus), core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_busattachment_registerbuslistener(bus: P0, listener: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_registerbuslistener(bus: alljoyn_busattachment, listener: alljoyn_buslistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_registerbuslistener(bus : alljoyn_busattachment, listener : alljoyn_buslistener)); - alljoyn_busattachment_registerbuslistener(bus.param().abi(), listener.param().abi()) + alljoyn_busattachment_registerbuslistener(core::mem::transmute(bus), core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_busattachment_registerbusobject(bus: P0, obj: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_registerbusobject(bus: alljoyn_busattachment, obj: alljoyn_busobject) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_registerbusobject(bus : alljoyn_busattachment, obj : alljoyn_busobject) -> QStatus); - alljoyn_busattachment_registerbusobject(bus.param().abi(), obj.param().abi()) + alljoyn_busattachment_registerbusobject(core::mem::transmute(bus), core::mem::transmute(obj)) } #[inline] -pub unsafe fn alljoyn_busattachment_registerbusobject_secure(bus: P0, obj: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_registerbusobject_secure(bus: alljoyn_busattachment, obj: alljoyn_busobject) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_registerbusobject_secure(bus : alljoyn_busattachment, obj : alljoyn_busobject) -> QStatus); - alljoyn_busattachment_registerbusobject_secure(bus.param().abi(), obj.param().abi()) + alljoyn_busattachment_registerbusobject_secure(core::mem::transmute(bus), core::mem::transmute(obj)) } #[inline] -pub unsafe fn alljoyn_busattachment_registerkeystorelistener(bus: P0, listener: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_registerkeystorelistener(bus: alljoyn_busattachment, listener: alljoyn_keystorelistener) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_registerkeystorelistener(bus : alljoyn_busattachment, listener : alljoyn_keystorelistener) -> QStatus); - alljoyn_busattachment_registerkeystorelistener(bus.param().abi(), listener.param().abi()) + alljoyn_busattachment_registerkeystorelistener(core::mem::transmute(bus), core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_busattachment_registersignalhandler(bus: P0, signal_handler: alljoyn_messagereceiver_signalhandler_ptr, member: alljoyn_interfacedescription_member, srcpath: P3) -> QStatus +pub unsafe fn alljoyn_busattachment_registersignalhandler(bus: alljoyn_busattachment, signal_handler: alljoyn_messagereceiver_signalhandler_ptr, member: alljoyn_interfacedescription_member, srcpath: P3) -> QStatus where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_registersignalhandler(bus : alljoyn_busattachment, signal_handler : alljoyn_messagereceiver_signalhandler_ptr, member : alljoyn_interfacedescription_member, srcpath : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_registersignalhandler(bus.param().abi(), core::mem::transmute(signal_handler), core::mem::transmute(member), srcpath.param().abi()) + alljoyn_busattachment_registersignalhandler(core::mem::transmute(bus), core::mem::transmute(signal_handler), core::mem::transmute(member), srcpath.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_registersignalhandlerwithrule(bus: P0, signal_handler: alljoyn_messagereceiver_signalhandler_ptr, member: alljoyn_interfacedescription_member, matchrule: P3) -> QStatus +pub unsafe fn alljoyn_busattachment_registersignalhandlerwithrule(bus: alljoyn_busattachment, signal_handler: alljoyn_messagereceiver_signalhandler_ptr, member: alljoyn_interfacedescription_member, matchrule: P3) -> QStatus where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_registersignalhandlerwithrule(bus : alljoyn_busattachment, signal_handler : alljoyn_messagereceiver_signalhandler_ptr, member : alljoyn_interfacedescription_member, matchrule : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_registersignalhandlerwithrule(bus.param().abi(), core::mem::transmute(signal_handler), core::mem::transmute(member), matchrule.param().abi()) + alljoyn_busattachment_registersignalhandlerwithrule(core::mem::transmute(bus), core::mem::transmute(signal_handler), core::mem::transmute(member), matchrule.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_releasename(bus: P0, name: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_releasename(bus: alljoyn_busattachment, name: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_releasename(bus : alljoyn_busattachment, name : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_releasename(bus.param().abi(), name.param().abi()) + alljoyn_busattachment_releasename(core::mem::transmute(bus), name.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_reloadkeystore(bus: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_reloadkeystore(bus: alljoyn_busattachment) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_reloadkeystore(bus : alljoyn_busattachment) -> QStatus); - alljoyn_busattachment_reloadkeystore(bus.param().abi()) + alljoyn_busattachment_reloadkeystore(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_removematch(bus: P0, rule: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_removematch(bus: alljoyn_busattachment, rule: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_removematch(bus : alljoyn_busattachment, rule : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_removematch(bus.param().abi(), rule.param().abi()) + alljoyn_busattachment_removematch(core::mem::transmute(bus), rule.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_removesessionmember(bus: P0, sessionid: u32, membername: P2) -> QStatus +pub unsafe fn alljoyn_busattachment_removesessionmember(bus: alljoyn_busattachment, sessionid: u32, membername: P2) -> QStatus where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_removesessionmember(bus : alljoyn_busattachment, sessionid : u32, membername : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_removesessionmember(bus.param().abi(), core::mem::transmute(sessionid), membername.param().abi()) + alljoyn_busattachment_removesessionmember(core::mem::transmute(bus), core::mem::transmute(sessionid), membername.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_requestname(bus: P0, requestedname: P1, flags: u32) -> QStatus +pub unsafe fn alljoyn_busattachment_requestname(bus: alljoyn_busattachment, requestedname: P1, flags: u32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_requestname(bus : alljoyn_busattachment, requestedname : windows_core::PCSTR, flags : u32) -> QStatus); - alljoyn_busattachment_requestname(bus.param().abi(), requestedname.param().abi(), core::mem::transmute(flags)) + alljoyn_busattachment_requestname(core::mem::transmute(bus), requestedname.param().abi(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn alljoyn_busattachment_secureconnection(bus: P0, name: P1, forceauth: i32) -> QStatus +pub unsafe fn alljoyn_busattachment_secureconnection(bus: alljoyn_busattachment, name: P1, forceauth: i32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_secureconnection(bus : alljoyn_busattachment, name : windows_core::PCSTR, forceauth : i32) -> QStatus); - alljoyn_busattachment_secureconnection(bus.param().abi(), name.param().abi(), core::mem::transmute(forceauth)) + alljoyn_busattachment_secureconnection(core::mem::transmute(bus), name.param().abi(), core::mem::transmute(forceauth)) } #[inline] -pub unsafe fn alljoyn_busattachment_secureconnectionasync(bus: P0, name: P1, forceauth: i32) -> QStatus +pub unsafe fn alljoyn_busattachment_secureconnectionasync(bus: alljoyn_busattachment, name: P1, forceauth: i32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_secureconnectionasync(bus : alljoyn_busattachment, name : windows_core::PCSTR, forceauth : i32) -> QStatus); - alljoyn_busattachment_secureconnectionasync(bus.param().abi(), name.param().abi(), core::mem::transmute(forceauth)) + alljoyn_busattachment_secureconnectionasync(core::mem::transmute(bus), name.param().abi(), core::mem::transmute(forceauth)) } #[inline] -pub unsafe fn alljoyn_busattachment_setdaemondebug(bus: P0, module: P1, level: u32) -> QStatus +pub unsafe fn alljoyn_busattachment_setdaemondebug(bus: alljoyn_busattachment, module: P1, level: u32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_setdaemondebug(bus : alljoyn_busattachment, module : windows_core::PCSTR, level : u32) -> QStatus); - alljoyn_busattachment_setdaemondebug(bus.param().abi(), module.param().abi(), core::mem::transmute(level)) + alljoyn_busattachment_setdaemondebug(core::mem::transmute(bus), module.param().abi(), core::mem::transmute(level)) } #[inline] -pub unsafe fn alljoyn_busattachment_setkeyexpiration(bus: P0, guid: P1, timeout: u32) -> QStatus +pub unsafe fn alljoyn_busattachment_setkeyexpiration(bus: alljoyn_busattachment, guid: P1, timeout: u32) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_setkeyexpiration(bus : alljoyn_busattachment, guid : windows_core::PCSTR, timeout : u32) -> QStatus); - alljoyn_busattachment_setkeyexpiration(bus.param().abi(), guid.param().abi(), core::mem::transmute(timeout)) + alljoyn_busattachment_setkeyexpiration(core::mem::transmute(bus), guid.param().abi(), core::mem::transmute(timeout)) } #[inline] -pub unsafe fn alljoyn_busattachment_setlinktimeout(bus: P0, sessionid: u32, linktimeout: *mut u32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_setlinktimeout(bus: alljoyn_busattachment, sessionid: u32, linktimeout: *mut u32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_setlinktimeout(bus : alljoyn_busattachment, sessionid : u32, linktimeout : *mut u32) -> QStatus); - alljoyn_busattachment_setlinktimeout(bus.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(linktimeout)) + alljoyn_busattachment_setlinktimeout(core::mem::transmute(bus), core::mem::transmute(sessionid), core::mem::transmute(linktimeout)) } #[inline] -pub unsafe fn alljoyn_busattachment_setlinktimeoutasync(bus: P0, sessionid: u32, linktimeout: u32, callback: alljoyn_busattachment_setlinktimeoutcb_ptr, context: *mut core::ffi::c_void) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_setlinktimeoutasync(bus: alljoyn_busattachment, sessionid: u32, linktimeout: u32, callback: alljoyn_busattachment_setlinktimeoutcb_ptr, context: *mut core::ffi::c_void) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_setlinktimeoutasync(bus : alljoyn_busattachment, sessionid : u32, linktimeout : u32, callback : alljoyn_busattachment_setlinktimeoutcb_ptr, context : *mut core::ffi::c_void) -> QStatus); - alljoyn_busattachment_setlinktimeoutasync(bus.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(linktimeout), core::mem::transmute(callback), core::mem::transmute(context)) + alljoyn_busattachment_setlinktimeoutasync(core::mem::transmute(bus), core::mem::transmute(sessionid), core::mem::transmute(linktimeout), core::mem::transmute(callback), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_busattachment_setsessionlistener(bus: P0, sessionid: u32, listener: P2) -> QStatus -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_setsessionlistener(bus: alljoyn_busattachment, sessionid: u32, listener: alljoyn_sessionlistener) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_setsessionlistener(bus : alljoyn_busattachment, sessionid : u32, listener : alljoyn_sessionlistener) -> QStatus); - alljoyn_busattachment_setsessionlistener(bus.param().abi(), core::mem::transmute(sessionid), listener.param().abi()) + alljoyn_busattachment_setsessionlistener(core::mem::transmute(bus), core::mem::transmute(sessionid), core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_busattachment_start(bus: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_start(bus: alljoyn_busattachment) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_start(bus : alljoyn_busattachment) -> QStatus); - alljoyn_busattachment_start(bus.param().abi()) + alljoyn_busattachment_start(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_stop(bus: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_stop(bus: alljoyn_busattachment) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_stop(bus : alljoyn_busattachment) -> QStatus); - alljoyn_busattachment_stop(bus.param().abi()) + alljoyn_busattachment_stop(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_unbindsessionport(bus: P0, sessionport: u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_unbindsessionport(bus: alljoyn_busattachment, sessionport: u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unbindsessionport(bus : alljoyn_busattachment, sessionport : u16) -> QStatus); - alljoyn_busattachment_unbindsessionport(bus.param().abi(), core::mem::transmute(sessionport)) + alljoyn_busattachment_unbindsessionport(core::mem::transmute(bus), core::mem::transmute(sessionport)) } #[inline] -pub unsafe fn alljoyn_busattachment_unregisteraboutlistener(bus: P0, aboutlistener: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_unregisteraboutlistener(bus: alljoyn_busattachment, aboutlistener: alljoyn_aboutlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unregisteraboutlistener(bus : alljoyn_busattachment, aboutlistener : alljoyn_aboutlistener)); - alljoyn_busattachment_unregisteraboutlistener(bus.param().abi(), aboutlistener.param().abi()) + alljoyn_busattachment_unregisteraboutlistener(core::mem::transmute(bus), core::mem::transmute(aboutlistener)) } #[inline] -pub unsafe fn alljoyn_busattachment_unregisterallaboutlisteners(bus: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_unregisterallaboutlisteners(bus: alljoyn_busattachment) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unregisterallaboutlisteners(bus : alljoyn_busattachment)); - alljoyn_busattachment_unregisterallaboutlisteners(bus.param().abi()) + alljoyn_busattachment_unregisterallaboutlisteners(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_unregisterallhandlers(bus: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_unregisterallhandlers(bus: alljoyn_busattachment) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unregisterallhandlers(bus : alljoyn_busattachment) -> QStatus); - alljoyn_busattachment_unregisterallhandlers(bus.param().abi()) + alljoyn_busattachment_unregisterallhandlers(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busattachment_unregisterapplicationstatelistener(bus: P0, listener: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_unregisterapplicationstatelistener(bus: alljoyn_busattachment, listener: alljoyn_applicationstatelistener) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unregisterapplicationstatelistener(bus : alljoyn_busattachment, listener : alljoyn_applicationstatelistener) -> QStatus); - alljoyn_busattachment_unregisterapplicationstatelistener(bus.param().abi(), listener.param().abi()) + alljoyn_busattachment_unregisterapplicationstatelistener(core::mem::transmute(bus), core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_busattachment_unregisterbuslistener(bus: P0, listener: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_unregisterbuslistener(bus: alljoyn_busattachment, listener: alljoyn_buslistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unregisterbuslistener(bus : alljoyn_busattachment, listener : alljoyn_buslistener)); - alljoyn_busattachment_unregisterbuslistener(bus.param().abi(), listener.param().abi()) + alljoyn_busattachment_unregisterbuslistener(core::mem::transmute(bus), core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_busattachment_unregisterbusobject(bus: P0, object: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_unregisterbusobject(bus: alljoyn_busattachment, object: alljoyn_busobject) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unregisterbusobject(bus : alljoyn_busattachment, object : alljoyn_busobject)); - alljoyn_busattachment_unregisterbusobject(bus.param().abi(), object.param().abi()) + alljoyn_busattachment_unregisterbusobject(core::mem::transmute(bus), core::mem::transmute(object)) } #[inline] -pub unsafe fn alljoyn_busattachment_unregistersignalhandler(bus: P0, signal_handler: alljoyn_messagereceiver_signalhandler_ptr, member: alljoyn_interfacedescription_member, srcpath: P3) -> QStatus +pub unsafe fn alljoyn_busattachment_unregistersignalhandler(bus: alljoyn_busattachment, signal_handler: alljoyn_messagereceiver_signalhandler_ptr, member: alljoyn_interfacedescription_member, srcpath: P3) -> QStatus where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unregistersignalhandler(bus : alljoyn_busattachment, signal_handler : alljoyn_messagereceiver_signalhandler_ptr, member : alljoyn_interfacedescription_member, srcpath : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_unregistersignalhandler(bus.param().abi(), core::mem::transmute(signal_handler), core::mem::transmute(member), srcpath.param().abi()) + alljoyn_busattachment_unregistersignalhandler(core::mem::transmute(bus), core::mem::transmute(signal_handler), core::mem::transmute(member), srcpath.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_unregistersignalhandlerwithrule(bus: P0, signal_handler: alljoyn_messagereceiver_signalhandler_ptr, member: alljoyn_interfacedescription_member, matchrule: P3) -> QStatus +pub unsafe fn alljoyn_busattachment_unregistersignalhandlerwithrule(bus: alljoyn_busattachment, signal_handler: alljoyn_messagereceiver_signalhandler_ptr, member: alljoyn_interfacedescription_member, matchrule: P3) -> QStatus where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_unregistersignalhandlerwithrule(bus : alljoyn_busattachment, signal_handler : alljoyn_messagereceiver_signalhandler_ptr, member : alljoyn_interfacedescription_member, matchrule : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_unregistersignalhandlerwithrule(bus.param().abi(), core::mem::transmute(signal_handler), core::mem::transmute(member), matchrule.param().abi()) + alljoyn_busattachment_unregistersignalhandlerwithrule(core::mem::transmute(bus), core::mem::transmute(signal_handler), core::mem::transmute(member), matchrule.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_whoimplements_interface(bus: P0, implementsinterface: P1) -> QStatus +pub unsafe fn alljoyn_busattachment_whoimplements_interface(bus: alljoyn_busattachment, implementsinterface: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_whoimplements_interface(bus : alljoyn_busattachment, implementsinterface : windows_core::PCSTR) -> QStatus); - alljoyn_busattachment_whoimplements_interface(bus.param().abi(), implementsinterface.param().abi()) + alljoyn_busattachment_whoimplements_interface(core::mem::transmute(bus), implementsinterface.param().abi()) } #[inline] -pub unsafe fn alljoyn_busattachment_whoimplements_interfaces(bus: P0, implementsinterfaces: *const *const i8, numberinterfaces: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busattachment_whoimplements_interfaces(bus: alljoyn_busattachment, implementsinterfaces: *const *const i8, numberinterfaces: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busattachment_whoimplements_interfaces(bus : alljoyn_busattachment, implementsinterfaces : *const *const i8, numberinterfaces : usize) -> QStatus); - alljoyn_busattachment_whoimplements_interfaces(bus.param().abi(), core::mem::transmute(implementsinterfaces), core::mem::transmute(numberinterfaces)) + alljoyn_busattachment_whoimplements_interfaces(core::mem::transmute(bus), core::mem::transmute(implementsinterfaces), core::mem::transmute(numberinterfaces)) } #[inline] pub unsafe fn alljoyn_buslistener_create(callbacks: *const alljoyn_buslistener_callbacks, context: *const core::ffi::c_void) -> alljoyn_buslistener { @@ -1651,63 +1241,39 @@ pub unsafe fn alljoyn_buslistener_create(callbacks: *const alljoyn_buslistener_c alljoyn_buslistener_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_buslistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_buslistener_destroy(listener: alljoyn_buslistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_buslistener_destroy(listener : alljoyn_buslistener)); - alljoyn_buslistener_destroy(listener.param().abi()) + alljoyn_buslistener_destroy(core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_busobject_addinterface(bus: P0, iface: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_addinterface(bus: alljoyn_busobject, iface: alljoyn_interfacedescription) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_addinterface(bus : alljoyn_busobject, iface : alljoyn_interfacedescription) -> QStatus); - alljoyn_busobject_addinterface(bus.param().abi(), iface.param().abi()) + alljoyn_busobject_addinterface(core::mem::transmute(bus), core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_busobject_addinterface_announced(bus: P0, iface: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_addinterface_announced(bus: alljoyn_busobject, iface: alljoyn_interfacedescription) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_addinterface_announced(bus : alljoyn_busobject, iface : alljoyn_interfacedescription) -> QStatus); - alljoyn_busobject_addinterface_announced(bus.param().abi(), iface.param().abi()) + alljoyn_busobject_addinterface_announced(core::mem::transmute(bus), core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_busobject_addmethodhandler(bus: P0, member: alljoyn_interfacedescription_member, handler: alljoyn_messagereceiver_methodhandler_ptr, context: *mut core::ffi::c_void) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_addmethodhandler(bus: alljoyn_busobject, member: alljoyn_interfacedescription_member, handler: alljoyn_messagereceiver_methodhandler_ptr, context: *mut core::ffi::c_void) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_addmethodhandler(bus : alljoyn_busobject, member : alljoyn_interfacedescription_member, handler : alljoyn_messagereceiver_methodhandler_ptr, context : *mut core::ffi::c_void) -> QStatus); - alljoyn_busobject_addmethodhandler(bus.param().abi(), core::mem::transmute(member), core::mem::transmute(handler), core::mem::transmute(context)) + alljoyn_busobject_addmethodhandler(core::mem::transmute(bus), core::mem::transmute(member), core::mem::transmute(handler), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_busobject_addmethodhandlers(bus: P0, entries: *const alljoyn_busobject_methodentry, numentries: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_addmethodhandlers(bus: alljoyn_busobject, entries: *const alljoyn_busobject_methodentry, numentries: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_addmethodhandlers(bus : alljoyn_busobject, entries : *const alljoyn_busobject_methodentry, numentries : usize) -> QStatus); - alljoyn_busobject_addmethodhandlers(bus.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + alljoyn_busobject_addmethodhandlers(core::mem::transmute(bus), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn alljoyn_busobject_cancelsessionlessmessage(bus: P0, msg: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_cancelsessionlessmessage(bus: alljoyn_busobject, msg: alljoyn_message) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_cancelsessionlessmessage(bus : alljoyn_busobject, msg : alljoyn_message) -> QStatus); - alljoyn_busobject_cancelsessionlessmessage(bus.param().abi(), msg.param().abi()) + alljoyn_busobject_cancelsessionlessmessage(core::mem::transmute(bus), core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_busobject_cancelsessionlessmessage_serial(bus: P0, serialnumber: u32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_cancelsessionlessmessage_serial(bus: alljoyn_busobject, serialnumber: u32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_cancelsessionlessmessage_serial(bus : alljoyn_busobject, serialnumber : u32) -> QStatus); - alljoyn_busobject_cancelsessionlessmessage_serial(bus.param().abi(), core::mem::transmute(serialnumber)) + alljoyn_busobject_cancelsessionlessmessage_serial(core::mem::transmute(bus), core::mem::transmute(serialnumber)) } #[inline] pub unsafe fn alljoyn_busobject_create(path: P0, isplaceholder: i32, callbacks_in: *const alljoyn_busobject_callbacks, context_in: *const core::ffi::c_void) -> alljoyn_busobject @@ -1718,131 +1284,91 @@ where alljoyn_busobject_create(path.param().abi(), core::mem::transmute(isplaceholder), core::mem::transmute(callbacks_in), core::mem::transmute(context_in)) } #[inline] -pub unsafe fn alljoyn_busobject_destroy(bus: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_destroy(bus: alljoyn_busobject) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_destroy(bus : alljoyn_busobject)); - alljoyn_busobject_destroy(bus.param().abi()) + alljoyn_busobject_destroy(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busobject_emitpropertieschanged(bus: P0, ifcname: P1, propnames: *const *const i8, numprops: usize, id: u32) +pub unsafe fn alljoyn_busobject_emitpropertieschanged(bus: alljoyn_busobject, ifcname: P1, propnames: *const *const i8, numprops: usize, id: u32) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_emitpropertieschanged(bus : alljoyn_busobject, ifcname : windows_core::PCSTR, propnames : *const *const i8, numprops : usize, id : u32)); - alljoyn_busobject_emitpropertieschanged(bus.param().abi(), ifcname.param().abi(), core::mem::transmute(propnames), core::mem::transmute(numprops), core::mem::transmute(id)) + alljoyn_busobject_emitpropertieschanged(core::mem::transmute(bus), ifcname.param().abi(), core::mem::transmute(propnames), core::mem::transmute(numprops), core::mem::transmute(id)) } #[inline] -pub unsafe fn alljoyn_busobject_emitpropertychanged(bus: P0, ifcname: P1, propname: P2, val: P3, id: u32) +pub unsafe fn alljoyn_busobject_emitpropertychanged(bus: alljoyn_busobject, ifcname: P1, propname: P2, val: alljoyn_msgarg, id: u32) where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_emitpropertychanged(bus : alljoyn_busobject, ifcname : windows_core::PCSTR, propname : windows_core::PCSTR, val : alljoyn_msgarg, id : u32)); - alljoyn_busobject_emitpropertychanged(bus.param().abi(), ifcname.param().abi(), propname.param().abi(), val.param().abi(), core::mem::transmute(id)) + alljoyn_busobject_emitpropertychanged(core::mem::transmute(bus), ifcname.param().abi(), propname.param().abi(), core::mem::transmute(val), core::mem::transmute(id)) } #[inline] -pub unsafe fn alljoyn_busobject_getannouncedinterfacenames(bus: P0, interfaces: *const *const i8, numinterfaces: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_getannouncedinterfacenames(bus: alljoyn_busobject, interfaces: *const *const i8, numinterfaces: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_getannouncedinterfacenames(bus : alljoyn_busobject, interfaces : *const *const i8, numinterfaces : usize) -> usize); - alljoyn_busobject_getannouncedinterfacenames(bus.param().abi(), core::mem::transmute(interfaces), core::mem::transmute(numinterfaces)) + alljoyn_busobject_getannouncedinterfacenames(core::mem::transmute(bus), core::mem::transmute(interfaces), core::mem::transmute(numinterfaces)) } #[inline] -pub unsafe fn alljoyn_busobject_getbusattachment(bus: P0) -> alljoyn_busattachment -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_getbusattachment(bus: alljoyn_busobject) -> alljoyn_busattachment { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_getbusattachment(bus : alljoyn_busobject) -> alljoyn_busattachment); - alljoyn_busobject_getbusattachment(bus.param().abi()) + alljoyn_busobject_getbusattachment(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busobject_getname(bus: P0, buffer: P1, buffersz: usize) -> usize +pub unsafe fn alljoyn_busobject_getname(bus: alljoyn_busobject, buffer: P1, buffersz: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_getname(bus : alljoyn_busobject, buffer : windows_core::PCSTR, buffersz : usize) -> usize); - alljoyn_busobject_getname(bus.param().abi(), buffer.param().abi(), core::mem::transmute(buffersz)) + alljoyn_busobject_getname(core::mem::transmute(bus), buffer.param().abi(), core::mem::transmute(buffersz)) } #[inline] -pub unsafe fn alljoyn_busobject_getpath(bus: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_getpath(bus: alljoyn_busobject) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_getpath(bus : alljoyn_busobject) -> windows_core::PCSTR); - alljoyn_busobject_getpath(bus.param().abi()) + alljoyn_busobject_getpath(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busobject_issecure(bus: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_issecure(bus: alljoyn_busobject) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_issecure(bus : alljoyn_busobject) -> i32); - alljoyn_busobject_issecure(bus.param().abi()) + alljoyn_busobject_issecure(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_busobject_methodreply_args(bus: P0, msg: P1, args: P2, numargs: usize) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_methodreply_args(bus: alljoyn_busobject, msg: alljoyn_message, args: alljoyn_msgarg, numargs: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_methodreply_args(bus : alljoyn_busobject, msg : alljoyn_message, args : alljoyn_msgarg, numargs : usize) -> QStatus); - alljoyn_busobject_methodreply_args(bus.param().abi(), msg.param().abi(), args.param().abi(), core::mem::transmute(numargs)) + alljoyn_busobject_methodreply_args(core::mem::transmute(bus), core::mem::transmute(msg), core::mem::transmute(args), core::mem::transmute(numargs)) } #[inline] -pub unsafe fn alljoyn_busobject_methodreply_err(bus: P0, msg: P1, error: P2, errormessage: P3) -> QStatus +pub unsafe fn alljoyn_busobject_methodreply_err(bus: alljoyn_busobject, msg: alljoyn_message, error: P2, errormessage: P3) -> QStatus where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_methodreply_err(bus : alljoyn_busobject, msg : alljoyn_message, error : windows_core::PCSTR, errormessage : windows_core::PCSTR) -> QStatus); - alljoyn_busobject_methodreply_err(bus.param().abi(), msg.param().abi(), error.param().abi(), errormessage.param().abi()) + alljoyn_busobject_methodreply_err(core::mem::transmute(bus), core::mem::transmute(msg), error.param().abi(), errormessage.param().abi()) } #[inline] -pub unsafe fn alljoyn_busobject_methodreply_status(bus: P0, msg: P1, status: QStatus) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_methodreply_status(bus: alljoyn_busobject, msg: alljoyn_message, status: QStatus) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_methodreply_status(bus : alljoyn_busobject, msg : alljoyn_message, status : QStatus) -> QStatus); - alljoyn_busobject_methodreply_status(bus.param().abi(), msg.param().abi(), core::mem::transmute(status)) + alljoyn_busobject_methodreply_status(core::mem::transmute(bus), core::mem::transmute(msg), core::mem::transmute(status)) } #[inline] -pub unsafe fn alljoyn_busobject_setannounceflag(bus: P0, iface: P1, isannounced: alljoyn_about_announceflag) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_busobject_setannounceflag(bus: alljoyn_busobject, iface: alljoyn_interfacedescription, isannounced: alljoyn_about_announceflag) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_setannounceflag(bus : alljoyn_busobject, iface : alljoyn_interfacedescription, isannounced : alljoyn_about_announceflag) -> QStatus); - alljoyn_busobject_setannounceflag(bus.param().abi(), iface.param().abi(), core::mem::transmute(isannounced)) + alljoyn_busobject_setannounceflag(core::mem::transmute(bus), core::mem::transmute(iface), core::mem::transmute(isannounced)) } #[inline] -pub unsafe fn alljoyn_busobject_signal(bus: P0, destination: P1, sessionid: u32, signal: alljoyn_interfacedescription_member, args: P4, numargs: usize, timetolive: u16, flags: u8, msg: P8) -> QStatus +pub unsafe fn alljoyn_busobject_signal(bus: alljoyn_busobject, destination: P1, sessionid: u32, signal: alljoyn_interfacedescription_member, args: alljoyn_msgarg, numargs: usize, timetolive: u16, flags: u8, msg: alljoyn_message) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, - P4: windows_core::Param, - P8: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_busobject_signal(bus : alljoyn_busobject, destination : windows_core::PCSTR, sessionid : u32, signal : alljoyn_interfacedescription_member, args : alljoyn_msgarg, numargs : usize, timetolive : u16, flags : u8, msg : alljoyn_message) -> QStatus); - alljoyn_busobject_signal(bus.param().abi(), destination.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(signal), args.param().abi(), core::mem::transmute(numargs), core::mem::transmute(timetolive), core::mem::transmute(flags), msg.param().abi()) + alljoyn_busobject_signal(core::mem::transmute(bus), destination.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(signal), core::mem::transmute(args), core::mem::transmute(numargs), core::mem::transmute(timetolive), core::mem::transmute(flags), core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_credentials_clear(cred: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_clear(cred: alljoyn_credentials) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_clear(cred : alljoyn_credentials)); - alljoyn_credentials_clear(cred.param().abi()) + alljoyn_credentials_clear(core::mem::transmute(cred)) } #[inline] pub unsafe fn alljoyn_credentials_create() -> alljoyn_credentials { @@ -1850,121 +1376,89 @@ pub unsafe fn alljoyn_credentials_create() -> alljoyn_credentials { alljoyn_credentials_create() } #[inline] -pub unsafe fn alljoyn_credentials_destroy(cred: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_destroy(cred: alljoyn_credentials) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_destroy(cred : alljoyn_credentials)); - alljoyn_credentials_destroy(cred.param().abi()) + alljoyn_credentials_destroy(core::mem::transmute(cred)) } #[inline] -pub unsafe fn alljoyn_credentials_getcertchain(cred: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_getcertchain(cred: alljoyn_credentials) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_getcertchain(cred : alljoyn_credentials) -> windows_core::PCSTR); - alljoyn_credentials_getcertchain(cred.param().abi()) + alljoyn_credentials_getcertchain(core::mem::transmute(cred)) } #[inline] -pub unsafe fn alljoyn_credentials_getexpiration(cred: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_getexpiration(cred: alljoyn_credentials) -> u32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_getexpiration(cred : alljoyn_credentials) -> u32); - alljoyn_credentials_getexpiration(cred.param().abi()) + alljoyn_credentials_getexpiration(core::mem::transmute(cred)) } #[inline] -pub unsafe fn alljoyn_credentials_getlogonentry(cred: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_getlogonentry(cred: alljoyn_credentials) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_getlogonentry(cred : alljoyn_credentials) -> windows_core::PCSTR); - alljoyn_credentials_getlogonentry(cred.param().abi()) + alljoyn_credentials_getlogonentry(core::mem::transmute(cred)) } #[inline] -pub unsafe fn alljoyn_credentials_getpassword(cred: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_getpassword(cred: alljoyn_credentials) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_getpassword(cred : alljoyn_credentials) -> windows_core::PCSTR); - alljoyn_credentials_getpassword(cred.param().abi()) + alljoyn_credentials_getpassword(core::mem::transmute(cred)) } #[inline] -pub unsafe fn alljoyn_credentials_getprivateKey(cred: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_getprivateKey(cred: alljoyn_credentials) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_getprivateKey(cred : alljoyn_credentials) -> windows_core::PCSTR); - alljoyn_credentials_getprivateKey(cred.param().abi()) + alljoyn_credentials_getprivateKey(core::mem::transmute(cred)) } #[inline] -pub unsafe fn alljoyn_credentials_getusername(cred: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_getusername(cred: alljoyn_credentials) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_getusername(cred : alljoyn_credentials) -> windows_core::PCSTR); - alljoyn_credentials_getusername(cred.param().abi()) + alljoyn_credentials_getusername(core::mem::transmute(cred)) } #[inline] -pub unsafe fn alljoyn_credentials_isset(cred: P0, creds: u16) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_isset(cred: alljoyn_credentials, creds: u16) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_isset(cred : alljoyn_credentials, creds : u16) -> i32); - alljoyn_credentials_isset(cred.param().abi(), core::mem::transmute(creds)) + alljoyn_credentials_isset(core::mem::transmute(cred), core::mem::transmute(creds)) } #[inline] -pub unsafe fn alljoyn_credentials_setcertchain(cred: P0, certchain: P1) +pub unsafe fn alljoyn_credentials_setcertchain(cred: alljoyn_credentials, certchain: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_setcertchain(cred : alljoyn_credentials, certchain : windows_core::PCSTR)); - alljoyn_credentials_setcertchain(cred.param().abi(), certchain.param().abi()) + alljoyn_credentials_setcertchain(core::mem::transmute(cred), certchain.param().abi()) } #[inline] -pub unsafe fn alljoyn_credentials_setexpiration(cred: P0, expiration: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_credentials_setexpiration(cred: alljoyn_credentials, expiration: u32) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_setexpiration(cred : alljoyn_credentials, expiration : u32)); - alljoyn_credentials_setexpiration(cred.param().abi(), core::mem::transmute(expiration)) + alljoyn_credentials_setexpiration(core::mem::transmute(cred), core::mem::transmute(expiration)) } #[inline] -pub unsafe fn alljoyn_credentials_setlogonentry(cred: P0, logonentry: P1) +pub unsafe fn alljoyn_credentials_setlogonentry(cred: alljoyn_credentials, logonentry: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_setlogonentry(cred : alljoyn_credentials, logonentry : windows_core::PCSTR)); - alljoyn_credentials_setlogonentry(cred.param().abi(), logonentry.param().abi()) + alljoyn_credentials_setlogonentry(core::mem::transmute(cred), logonentry.param().abi()) } #[inline] -pub unsafe fn alljoyn_credentials_setpassword(cred: P0, pwd: P1) +pub unsafe fn alljoyn_credentials_setpassword(cred: alljoyn_credentials, pwd: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_setpassword(cred : alljoyn_credentials, pwd : windows_core::PCSTR)); - alljoyn_credentials_setpassword(cred.param().abi(), pwd.param().abi()) + alljoyn_credentials_setpassword(core::mem::transmute(cred), pwd.param().abi()) } #[inline] -pub unsafe fn alljoyn_credentials_setprivatekey(cred: P0, pk: P1) +pub unsafe fn alljoyn_credentials_setprivatekey(cred: alljoyn_credentials, pk: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_setprivatekey(cred : alljoyn_credentials, pk : windows_core::PCSTR)); - alljoyn_credentials_setprivatekey(cred.param().abi(), pk.param().abi()) + alljoyn_credentials_setprivatekey(core::mem::transmute(cred), pk.param().abi()) } #[inline] -pub unsafe fn alljoyn_credentials_setusername(cred: P0, username: P1) +pub unsafe fn alljoyn_credentials_setusername(cred: alljoyn_credentials, username: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_credentials_setusername(cred : alljoyn_credentials, username : windows_core::PCSTR)); - alljoyn_credentials_setusername(cred.param().abi(), username.param().abi()) + alljoyn_credentials_setusername(core::mem::transmute(cred), username.param().abi()) } #[inline] pub unsafe fn alljoyn_getbuildinfo() -> windows_core::PCSTR { @@ -1987,62 +1481,54 @@ pub unsafe fn alljoyn_init() -> QStatus { alljoyn_init() } #[inline] -pub unsafe fn alljoyn_interfacedescription_activate(iface: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_activate(iface: alljoyn_interfacedescription) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_activate(iface : alljoyn_interfacedescription)); - alljoyn_interfacedescription_activate(iface.param().abi()) + alljoyn_interfacedescription_activate(core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_addannotation(iface: P0, name: P1, value: P2) -> QStatus +pub unsafe fn alljoyn_interfacedescription_addannotation(iface: alljoyn_interfacedescription, name: P1, value: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_addannotation(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, value : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_addannotation(iface.param().abi(), name.param().abi(), value.param().abi()) + alljoyn_interfacedescription_addannotation(core::mem::transmute(iface), name.param().abi(), value.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_addargannotation(iface: P0, member: P1, argname: P2, name: P3, value: P4) -> QStatus +pub unsafe fn alljoyn_interfacedescription_addargannotation(iface: alljoyn_interfacedescription, member: P1, argname: P2, name: P3, value: P4) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_addargannotation(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, argname : windows_core::PCSTR, name : windows_core::PCSTR, value : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_addargannotation(iface.param().abi(), member.param().abi(), argname.param().abi(), name.param().abi(), value.param().abi()) + alljoyn_interfacedescription_addargannotation(core::mem::transmute(iface), member.param().abi(), argname.param().abi(), name.param().abi(), value.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_addmember(iface: P0, r#type: alljoyn_messagetype, name: P2, inputsig: P3, outsig: P4, argnames: P5, annotation: u8) -> QStatus +pub unsafe fn alljoyn_interfacedescription_addmember(iface: alljoyn_interfacedescription, r#type: alljoyn_messagetype, name: P2, inputsig: P3, outsig: P4, argnames: P5, annotation: u8) -> QStatus where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_addmember(iface : alljoyn_interfacedescription, r#type : alljoyn_messagetype, name : windows_core::PCSTR, inputsig : windows_core::PCSTR, outsig : windows_core::PCSTR, argnames : windows_core::PCSTR, annotation : u8) -> QStatus); - alljoyn_interfacedescription_addmember(iface.param().abi(), core::mem::transmute(r#type), name.param().abi(), inputsig.param().abi(), outsig.param().abi(), argnames.param().abi(), core::mem::transmute(annotation)) + alljoyn_interfacedescription_addmember(core::mem::transmute(iface), core::mem::transmute(r#type), name.param().abi(), inputsig.param().abi(), outsig.param().abi(), argnames.param().abi(), core::mem::transmute(annotation)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_addmemberannotation(iface: P0, member: P1, name: P2, value: P3) -> QStatus +pub unsafe fn alljoyn_interfacedescription_addmemberannotation(iface: alljoyn_interfacedescription, member: P1, name: P2, value: P3) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_addmemberannotation(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, name : windows_core::PCSTR, value : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_addmemberannotation(iface.param().abi(), member.param().abi(), name.param().abi(), value.param().abi()) + alljoyn_interfacedescription_addmemberannotation(core::mem::transmute(iface), member.param().abi(), name.param().abi(), value.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_addmethod(iface: P0, name: P1, inputsig: P2, outsig: P3, argnames: P4, annotation: u8, accessperms: P6) -> QStatus +pub unsafe fn alljoyn_interfacedescription_addmethod(iface: alljoyn_interfacedescription, name: P1, inputsig: P2, outsig: P3, argnames: P4, annotation: u8, accessperms: P6) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, @@ -2050,301 +1536,247 @@ where P6: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_addmethod(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, inputsig : windows_core::PCSTR, outsig : windows_core::PCSTR, argnames : windows_core::PCSTR, annotation : u8, accessperms : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_addmethod(iface.param().abi(), name.param().abi(), inputsig.param().abi(), outsig.param().abi(), argnames.param().abi(), core::mem::transmute(annotation), accessperms.param().abi()) + alljoyn_interfacedescription_addmethod(core::mem::transmute(iface), name.param().abi(), inputsig.param().abi(), outsig.param().abi(), argnames.param().abi(), core::mem::transmute(annotation), accessperms.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_addproperty(iface: P0, name: P1, signature: P2, access: u8) -> QStatus +pub unsafe fn alljoyn_interfacedescription_addproperty(iface: alljoyn_interfacedescription, name: P1, signature: P2, access: u8) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_addproperty(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, signature : windows_core::PCSTR, access : u8) -> QStatus); - alljoyn_interfacedescription_addproperty(iface.param().abi(), name.param().abi(), signature.param().abi(), core::mem::transmute(access)) + alljoyn_interfacedescription_addproperty(core::mem::transmute(iface), name.param().abi(), signature.param().abi(), core::mem::transmute(access)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_addpropertyannotation(iface: P0, property: P1, name: P2, value: P3) -> QStatus +pub unsafe fn alljoyn_interfacedescription_addpropertyannotation(iface: alljoyn_interfacedescription, property: P1, name: P2, value: P3) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_addpropertyannotation(iface : alljoyn_interfacedescription, property : windows_core::PCSTR, name : windows_core::PCSTR, value : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_addpropertyannotation(iface.param().abi(), property.param().abi(), name.param().abi(), value.param().abi()) + alljoyn_interfacedescription_addpropertyannotation(core::mem::transmute(iface), property.param().abi(), name.param().abi(), value.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_addsignal(iface: P0, name: P1, sig: P2, argnames: P3, annotation: u8, accessperms: P5) -> QStatus +pub unsafe fn alljoyn_interfacedescription_addsignal(iface: alljoyn_interfacedescription, name: P1, sig: P2, argnames: P3, annotation: u8, accessperms: P5) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_addsignal(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, sig : windows_core::PCSTR, argnames : windows_core::PCSTR, annotation : u8, accessperms : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_addsignal(iface.param().abi(), name.param().abi(), sig.param().abi(), argnames.param().abi(), core::mem::transmute(annotation), accessperms.param().abi()) + alljoyn_interfacedescription_addsignal(core::mem::transmute(iface), name.param().abi(), sig.param().abi(), argnames.param().abi(), core::mem::transmute(annotation), accessperms.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_eql(one: P0, other: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_eql(one: alljoyn_interfacedescription, other: alljoyn_interfacedescription) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_eql(one : alljoyn_interfacedescription, other : alljoyn_interfacedescription) -> i32); - alljoyn_interfacedescription_eql(one.param().abi(), other.param().abi()) + alljoyn_interfacedescription_eql(core::mem::transmute(one), core::mem::transmute(other)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getannotation(iface: P0, name: P1, value: P2, value_size: *mut usize) -> i32 +pub unsafe fn alljoyn_interfacedescription_getannotation(iface: alljoyn_interfacedescription, name: P1, value: P2, value_size: *mut usize) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getannotation(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, value : windows_core::PCSTR, value_size : *mut usize) -> i32); - alljoyn_interfacedescription_getannotation(iface.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) + alljoyn_interfacedescription_getannotation(core::mem::transmute(iface), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getannotationatindex(iface: P0, index: usize, name: P2, name_size: *mut usize, value: P4, value_size: *mut usize) +pub unsafe fn alljoyn_interfacedescription_getannotationatindex(iface: alljoyn_interfacedescription, index: usize, name: P2, name_size: *mut usize, value: P4, value_size: *mut usize) where - P0: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getannotationatindex(iface : alljoyn_interfacedescription, index : usize, name : windows_core::PCSTR, name_size : *mut usize, value : windows_core::PCSTR, value_size : *mut usize)); - alljoyn_interfacedescription_getannotationatindex(iface.param().abi(), core::mem::transmute(index), name.param().abi(), core::mem::transmute(name_size), value.param().abi(), core::mem::transmute(value_size)) + alljoyn_interfacedescription_getannotationatindex(core::mem::transmute(iface), core::mem::transmute(index), name.param().abi(), core::mem::transmute(name_size), value.param().abi(), core::mem::transmute(value_size)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getannotationscount(iface: P0) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_getannotationscount(iface: alljoyn_interfacedescription) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getannotationscount(iface : alljoyn_interfacedescription) -> usize); - alljoyn_interfacedescription_getannotationscount(iface.param().abi()) + alljoyn_interfacedescription_getannotationscount(core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getargdescriptionforlanguage(iface: P0, member: P1, arg: P2, description: P3, maxlanguagelength: usize, languagetag: P5) -> usize +pub unsafe fn alljoyn_interfacedescription_getargdescriptionforlanguage(iface: alljoyn_interfacedescription, member: P1, arg: P2, description: P3, maxlanguagelength: usize, languagetag: P5) -> usize where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getargdescriptionforlanguage(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, arg : windows_core::PCSTR, description : windows_core::PCSTR, maxlanguagelength : usize, languagetag : windows_core::PCSTR) -> usize); - alljoyn_interfacedescription_getargdescriptionforlanguage(iface.param().abi(), member.param().abi(), arg.param().abi(), description.param().abi(), core::mem::transmute(maxlanguagelength), languagetag.param().abi()) + alljoyn_interfacedescription_getargdescriptionforlanguage(core::mem::transmute(iface), member.param().abi(), arg.param().abi(), description.param().abi(), core::mem::transmute(maxlanguagelength), languagetag.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getdescriptionforlanguage(iface: P0, description: P1, maxlanguagelength: usize, languagetag: P3) -> usize +pub unsafe fn alljoyn_interfacedescription_getdescriptionforlanguage(iface: alljoyn_interfacedescription, description: P1, maxlanguagelength: usize, languagetag: P3) -> usize where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getdescriptionforlanguage(iface : alljoyn_interfacedescription, description : windows_core::PCSTR, maxlanguagelength : usize, languagetag : windows_core::PCSTR) -> usize); - alljoyn_interfacedescription_getdescriptionforlanguage(iface.param().abi(), description.param().abi(), core::mem::transmute(maxlanguagelength), languagetag.param().abi()) + alljoyn_interfacedescription_getdescriptionforlanguage(core::mem::transmute(iface), description.param().abi(), core::mem::transmute(maxlanguagelength), languagetag.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getdescriptionlanguages(iface: P0, languages: *const *const i8, size: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_getdescriptionlanguages(iface: alljoyn_interfacedescription, languages: *const *const i8, size: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getdescriptionlanguages(iface : alljoyn_interfacedescription, languages : *const *const i8, size : usize) -> usize); - alljoyn_interfacedescription_getdescriptionlanguages(iface.param().abi(), core::mem::transmute(languages), core::mem::transmute(size)) + alljoyn_interfacedescription_getdescriptionlanguages(core::mem::transmute(iface), core::mem::transmute(languages), core::mem::transmute(size)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getdescriptionlanguages2(iface: P0, languages: P1, languagessize: usize) -> usize +pub unsafe fn alljoyn_interfacedescription_getdescriptionlanguages2(iface: alljoyn_interfacedescription, languages: P1, languagessize: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getdescriptionlanguages2(iface : alljoyn_interfacedescription, languages : windows_core::PCSTR, languagessize : usize) -> usize); - alljoyn_interfacedescription_getdescriptionlanguages2(iface.param().abi(), languages.param().abi(), core::mem::transmute(languagessize)) + alljoyn_interfacedescription_getdescriptionlanguages2(core::mem::transmute(iface), languages.param().abi(), core::mem::transmute(languagessize)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getdescriptiontranslationcallback(iface: P0) -> alljoyn_interfacedescription_translation_callback_ptr -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_getdescriptiontranslationcallback(iface: alljoyn_interfacedescription) -> alljoyn_interfacedescription_translation_callback_ptr { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getdescriptiontranslationcallback(iface : alljoyn_interfacedescription) -> alljoyn_interfacedescription_translation_callback_ptr); - alljoyn_interfacedescription_getdescriptiontranslationcallback(iface.param().abi()) + alljoyn_interfacedescription_getdescriptiontranslationcallback(core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getmember(iface: P0, name: P1, member: *mut alljoyn_interfacedescription_member) -> i32 +pub unsafe fn alljoyn_interfacedescription_getmember(iface: alljoyn_interfacedescription, name: P1, member: *mut alljoyn_interfacedescription_member) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getmember(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, member : *mut alljoyn_interfacedescription_member) -> i32); - alljoyn_interfacedescription_getmember(iface.param().abi(), name.param().abi(), core::mem::transmute(member)) + alljoyn_interfacedescription_getmember(core::mem::transmute(iface), name.param().abi(), core::mem::transmute(member)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getmemberannotation(iface: P0, member: P1, name: P2, value: P3, value_size: *mut usize) -> i32 +pub unsafe fn alljoyn_interfacedescription_getmemberannotation(iface: alljoyn_interfacedescription, member: P1, name: P2, value: P3, value_size: *mut usize) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getmemberannotation(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, name : windows_core::PCSTR, value : windows_core::PCSTR, value_size : *mut usize) -> i32); - alljoyn_interfacedescription_getmemberannotation(iface.param().abi(), member.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) + alljoyn_interfacedescription_getmemberannotation(core::mem::transmute(iface), member.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getmemberargannotation(iface: P0, member: P1, argname: P2, name: P3, value: P4, value_size: *mut usize) -> i32 +pub unsafe fn alljoyn_interfacedescription_getmemberargannotation(iface: alljoyn_interfacedescription, member: P1, argname: P2, name: P3, value: P4, value_size: *mut usize) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getmemberargannotation(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, argname : windows_core::PCSTR, name : windows_core::PCSTR, value : windows_core::PCSTR, value_size : *mut usize) -> i32); - alljoyn_interfacedescription_getmemberargannotation(iface.param().abi(), member.param().abi(), argname.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) + alljoyn_interfacedescription_getmemberargannotation(core::mem::transmute(iface), member.param().abi(), argname.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(value_size)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getmemberdescriptionforlanguage(iface: P0, member: P1, description: P2, maxlanguagelength: usize, languagetag: P4) -> usize +pub unsafe fn alljoyn_interfacedescription_getmemberdescriptionforlanguage(iface: alljoyn_interfacedescription, member: P1, description: P2, maxlanguagelength: usize, languagetag: P4) -> usize where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getmemberdescriptionforlanguage(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, description : windows_core::PCSTR, maxlanguagelength : usize, languagetag : windows_core::PCSTR) -> usize); - alljoyn_interfacedescription_getmemberdescriptionforlanguage(iface.param().abi(), member.param().abi(), description.param().abi(), core::mem::transmute(maxlanguagelength), languagetag.param().abi()) + alljoyn_interfacedescription_getmemberdescriptionforlanguage(core::mem::transmute(iface), member.param().abi(), description.param().abi(), core::mem::transmute(maxlanguagelength), languagetag.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getmembers(iface: P0, members: *mut alljoyn_interfacedescription_member, nummembers: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_getmembers(iface: alljoyn_interfacedescription, members: *mut alljoyn_interfacedescription_member, nummembers: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getmembers(iface : alljoyn_interfacedescription, members : *mut alljoyn_interfacedescription_member, nummembers : usize) -> usize); - alljoyn_interfacedescription_getmembers(iface.param().abi(), core::mem::transmute(members), core::mem::transmute(nummembers)) + alljoyn_interfacedescription_getmembers(core::mem::transmute(iface), core::mem::transmute(members), core::mem::transmute(nummembers)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getmethod(iface: P0, name: P1, member: *mut alljoyn_interfacedescription_member) -> i32 +pub unsafe fn alljoyn_interfacedescription_getmethod(iface: alljoyn_interfacedescription, name: P1, member: *mut alljoyn_interfacedescription_member) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getmethod(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, member : *mut alljoyn_interfacedescription_member) -> i32); - alljoyn_interfacedescription_getmethod(iface.param().abi(), name.param().abi(), core::mem::transmute(member)) + alljoyn_interfacedescription_getmethod(core::mem::transmute(iface), name.param().abi(), core::mem::transmute(member)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getname(iface: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_getname(iface: alljoyn_interfacedescription) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getname(iface : alljoyn_interfacedescription) -> windows_core::PCSTR); - alljoyn_interfacedescription_getname(iface.param().abi()) + alljoyn_interfacedescription_getname(core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getproperties(iface: P0, props: *mut alljoyn_interfacedescription_property, numprops: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_getproperties(iface: alljoyn_interfacedescription, props: *mut alljoyn_interfacedescription_property, numprops: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getproperties(iface : alljoyn_interfacedescription, props : *mut alljoyn_interfacedescription_property, numprops : usize) -> usize); - alljoyn_interfacedescription_getproperties(iface.param().abi(), core::mem::transmute(props), core::mem::transmute(numprops)) + alljoyn_interfacedescription_getproperties(core::mem::transmute(iface), core::mem::transmute(props), core::mem::transmute(numprops)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getproperty(iface: P0, name: P1, property: *mut alljoyn_interfacedescription_property) -> i32 +pub unsafe fn alljoyn_interfacedescription_getproperty(iface: alljoyn_interfacedescription, name: P1, property: *mut alljoyn_interfacedescription_property) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getproperty(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, property : *mut alljoyn_interfacedescription_property) -> i32); - alljoyn_interfacedescription_getproperty(iface.param().abi(), name.param().abi(), core::mem::transmute(property)) + alljoyn_interfacedescription_getproperty(core::mem::transmute(iface), name.param().abi(), core::mem::transmute(property)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getpropertyannotation(iface: P0, property: P1, name: P2, value: P3, str_size: *mut usize) -> i32 +pub unsafe fn alljoyn_interfacedescription_getpropertyannotation(iface: alljoyn_interfacedescription, property: P1, name: P2, value: P3, str_size: *mut usize) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getpropertyannotation(iface : alljoyn_interfacedescription, property : windows_core::PCSTR, name : windows_core::PCSTR, value : windows_core::PCSTR, str_size : *mut usize) -> i32); - alljoyn_interfacedescription_getpropertyannotation(iface.param().abi(), property.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(str_size)) + alljoyn_interfacedescription_getpropertyannotation(core::mem::transmute(iface), property.param().abi(), name.param().abi(), value.param().abi(), core::mem::transmute(str_size)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getpropertydescriptionforlanguage(iface: P0, property: P1, description: P2, maxlanguagelength: usize, languagetag: P4) -> usize +pub unsafe fn alljoyn_interfacedescription_getpropertydescriptionforlanguage(iface: alljoyn_interfacedescription, property: P1, description: P2, maxlanguagelength: usize, languagetag: P4) -> usize where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getpropertydescriptionforlanguage(iface : alljoyn_interfacedescription, property : windows_core::PCSTR, description : windows_core::PCSTR, maxlanguagelength : usize, languagetag : windows_core::PCSTR) -> usize); - alljoyn_interfacedescription_getpropertydescriptionforlanguage(iface.param().abi(), property.param().abi(), description.param().abi(), core::mem::transmute(maxlanguagelength), languagetag.param().abi()) + alljoyn_interfacedescription_getpropertydescriptionforlanguage(core::mem::transmute(iface), property.param().abi(), description.param().abi(), core::mem::transmute(maxlanguagelength), languagetag.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getsecuritypolicy(iface: P0) -> alljoyn_interfacedescription_securitypolicy -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_getsecuritypolicy(iface: alljoyn_interfacedescription) -> alljoyn_interfacedescription_securitypolicy { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getsecuritypolicy(iface : alljoyn_interfacedescription) -> alljoyn_interfacedescription_securitypolicy); - alljoyn_interfacedescription_getsecuritypolicy(iface.param().abi()) + alljoyn_interfacedescription_getsecuritypolicy(core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_getsignal(iface: P0, name: P1, member: *mut alljoyn_interfacedescription_member) -> i32 +pub unsafe fn alljoyn_interfacedescription_getsignal(iface: alljoyn_interfacedescription, name: P1, member: *mut alljoyn_interfacedescription_member) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_getsignal(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, member : *mut alljoyn_interfacedescription_member) -> i32); - alljoyn_interfacedescription_getsignal(iface.param().abi(), name.param().abi(), core::mem::transmute(member)) + alljoyn_interfacedescription_getsignal(core::mem::transmute(iface), name.param().abi(), core::mem::transmute(member)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_hasdescription(iface: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_hasdescription(iface: alljoyn_interfacedescription) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_hasdescription(iface : alljoyn_interfacedescription) -> i32); - alljoyn_interfacedescription_hasdescription(iface.param().abi()) + alljoyn_interfacedescription_hasdescription(core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_hasmember(iface: P0, name: P1, insig: P2, outsig: P3) -> i32 +pub unsafe fn alljoyn_interfacedescription_hasmember(iface: alljoyn_interfacedescription, name: P1, insig: P2, outsig: P3) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_hasmember(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, insig : windows_core::PCSTR, outsig : windows_core::PCSTR) -> i32); - alljoyn_interfacedescription_hasmember(iface.param().abi(), name.param().abi(), insig.param().abi(), outsig.param().abi()) + alljoyn_interfacedescription_hasmember(core::mem::transmute(iface), name.param().abi(), insig.param().abi(), outsig.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_hasproperties(iface: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_hasproperties(iface: alljoyn_interfacedescription) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_hasproperties(iface : alljoyn_interfacedescription) -> i32); - alljoyn_interfacedescription_hasproperties(iface.param().abi()) + alljoyn_interfacedescription_hasproperties(core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_hasproperty(iface: P0, name: P1) -> i32 +pub unsafe fn alljoyn_interfacedescription_hasproperty(iface: alljoyn_interfacedescription, name: P1) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_hasproperty(iface : alljoyn_interfacedescription, name : windows_core::PCSTR) -> i32); - alljoyn_interfacedescription_hasproperty(iface.param().abi(), name.param().abi()) + alljoyn_interfacedescription_hasproperty(core::mem::transmute(iface), name.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_introspect(iface: P0, str: P1, buf: usize, indent: usize) -> usize +pub unsafe fn alljoyn_interfacedescription_introspect(iface: alljoyn_interfacedescription, str: P1, buf: usize, indent: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_introspect(iface : alljoyn_interfacedescription, str : windows_core::PCSTR, buf : usize, indent : usize) -> usize); - alljoyn_interfacedescription_introspect(iface.param().abi(), str.param().abi(), core::mem::transmute(buf), core::mem::transmute(indent)) + alljoyn_interfacedescription_introspect(core::mem::transmute(iface), str.param().abi(), core::mem::transmute(buf), core::mem::transmute(indent)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_issecure(iface: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_issecure(iface: alljoyn_interfacedescription) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_issecure(iface : alljoyn_interfacedescription) -> i32); - alljoyn_interfacedescription_issecure(iface.param().abi()) + alljoyn_interfacedescription_issecure(core::mem::transmute(iface)) } #[inline] pub unsafe fn alljoyn_interfacedescription_member_eql(one: alljoyn_interfacedescription_member, other: alljoyn_interfacedescription_member) -> i32 { @@ -2431,105 +1863,93 @@ pub unsafe fn alljoyn_interfacedescription_property_getannotationscount(property alljoyn_interfacedescription_property_getannotationscount(core::mem::transmute(property)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setargdescription(iface: P0, member: P1, argname: P2, description: P3) -> QStatus +pub unsafe fn alljoyn_interfacedescription_setargdescription(iface: alljoyn_interfacedescription, member: P1, argname: P2, description: P3) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setargdescription(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, argname : windows_core::PCSTR, description : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_setargdescription(iface.param().abi(), member.param().abi(), argname.param().abi(), description.param().abi()) + alljoyn_interfacedescription_setargdescription(core::mem::transmute(iface), member.param().abi(), argname.param().abi(), description.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setargdescriptionforlanguage(iface: P0, member: P1, arg: P2, description: P3, languagetag: P4) -> QStatus +pub unsafe fn alljoyn_interfacedescription_setargdescriptionforlanguage(iface: alljoyn_interfacedescription, member: P1, arg: P2, description: P3, languagetag: P4) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setargdescriptionforlanguage(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, arg : windows_core::PCSTR, description : windows_core::PCSTR, languagetag : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_setargdescriptionforlanguage(iface.param().abi(), member.param().abi(), arg.param().abi(), description.param().abi(), languagetag.param().abi()) + alljoyn_interfacedescription_setargdescriptionforlanguage(core::mem::transmute(iface), member.param().abi(), arg.param().abi(), description.param().abi(), languagetag.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setdescription(iface: P0, description: P1) +pub unsafe fn alljoyn_interfacedescription_setdescription(iface: alljoyn_interfacedescription, description: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setdescription(iface : alljoyn_interfacedescription, description : windows_core::PCSTR)); - alljoyn_interfacedescription_setdescription(iface.param().abi(), description.param().abi()) + alljoyn_interfacedescription_setdescription(core::mem::transmute(iface), description.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setdescriptionforlanguage(iface: P0, description: P1, languagetag: P2) -> QStatus +pub unsafe fn alljoyn_interfacedescription_setdescriptionforlanguage(iface: alljoyn_interfacedescription, description: P1, languagetag: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setdescriptionforlanguage(iface : alljoyn_interfacedescription, description : windows_core::PCSTR, languagetag : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_setdescriptionforlanguage(iface.param().abi(), description.param().abi(), languagetag.param().abi()) + alljoyn_interfacedescription_setdescriptionforlanguage(core::mem::transmute(iface), description.param().abi(), languagetag.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setdescriptionlanguage(iface: P0, language: P1) +pub unsafe fn alljoyn_interfacedescription_setdescriptionlanguage(iface: alljoyn_interfacedescription, language: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setdescriptionlanguage(iface : alljoyn_interfacedescription, language : windows_core::PCSTR)); - alljoyn_interfacedescription_setdescriptionlanguage(iface.param().abi(), language.param().abi()) + alljoyn_interfacedescription_setdescriptionlanguage(core::mem::transmute(iface), language.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setdescriptiontranslationcallback(iface: P0, translationcallback: alljoyn_interfacedescription_translation_callback_ptr) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_interfacedescription_setdescriptiontranslationcallback(iface: alljoyn_interfacedescription, translationcallback: alljoyn_interfacedescription_translation_callback_ptr) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setdescriptiontranslationcallback(iface : alljoyn_interfacedescription, translationcallback : alljoyn_interfacedescription_translation_callback_ptr)); - alljoyn_interfacedescription_setdescriptiontranslationcallback(iface.param().abi(), core::mem::transmute(translationcallback)) + alljoyn_interfacedescription_setdescriptiontranslationcallback(core::mem::transmute(iface), core::mem::transmute(translationcallback)) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setmemberdescription(iface: P0, member: P1, description: P2) -> QStatus +pub unsafe fn alljoyn_interfacedescription_setmemberdescription(iface: alljoyn_interfacedescription, member: P1, description: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setmemberdescription(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, description : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_setmemberdescription(iface.param().abi(), member.param().abi(), description.param().abi()) + alljoyn_interfacedescription_setmemberdescription(core::mem::transmute(iface), member.param().abi(), description.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setmemberdescriptionforlanguage(iface: P0, member: P1, description: P2, languagetag: P3) -> QStatus +pub unsafe fn alljoyn_interfacedescription_setmemberdescriptionforlanguage(iface: alljoyn_interfacedescription, member: P1, description: P2, languagetag: P3) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setmemberdescriptionforlanguage(iface : alljoyn_interfacedescription, member : windows_core::PCSTR, description : windows_core::PCSTR, languagetag : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_setmemberdescriptionforlanguage(iface.param().abi(), member.param().abi(), description.param().abi(), languagetag.param().abi()) + alljoyn_interfacedescription_setmemberdescriptionforlanguage(core::mem::transmute(iface), member.param().abi(), description.param().abi(), languagetag.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setpropertydescription(iface: P0, name: P1, description: P2) -> QStatus +pub unsafe fn alljoyn_interfacedescription_setpropertydescription(iface: alljoyn_interfacedescription, name: P1, description: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setpropertydescription(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, description : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_setpropertydescription(iface.param().abi(), name.param().abi(), description.param().abi()) + alljoyn_interfacedescription_setpropertydescription(core::mem::transmute(iface), name.param().abi(), description.param().abi()) } #[inline] -pub unsafe fn alljoyn_interfacedescription_setpropertydescriptionforlanguage(iface: P0, name: P1, description: P2, languagetag: P3) -> QStatus +pub unsafe fn alljoyn_interfacedescription_setpropertydescriptionforlanguage(iface: alljoyn_interfacedescription, name: P1, description: P2, languagetag: P3) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_interfacedescription_setpropertydescriptionforlanguage(iface : alljoyn_interfacedescription, name : windows_core::PCSTR, description : windows_core::PCSTR, languagetag : windows_core::PCSTR) -> QStatus); - alljoyn_interfacedescription_setpropertydescriptionforlanguage(iface.param().abi(), name.param().abi(), description.param().abi(), languagetag.param().abi()) + alljoyn_interfacedescription_setpropertydescriptionforlanguage(core::mem::transmute(iface), name.param().abi(), description.param().abi(), languagetag.param().abi()) } #[inline] pub unsafe fn alljoyn_keystorelistener_create(callbacks: *const alljoyn_keystorelistener_callbacks, context: *const core::ffi::c_void) -> alljoyn_keystorelistener { @@ -2537,33 +1957,26 @@ pub unsafe fn alljoyn_keystorelistener_create(callbacks: *const alljoyn_keystore alljoyn_keystorelistener_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_keystorelistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_keystorelistener_destroy(listener: alljoyn_keystorelistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_keystorelistener_destroy(listener : alljoyn_keystorelistener)); - alljoyn_keystorelistener_destroy(listener.param().abi()) + alljoyn_keystorelistener_destroy(core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_keystorelistener_getkeys(listener: P0, keystore: P1, sink: P2, sink_sz: *mut usize) -> QStatus +pub unsafe fn alljoyn_keystorelistener_getkeys(listener: alljoyn_keystorelistener, keystore: alljoyn_keystore, sink: P2, sink_sz: *mut usize) -> QStatus where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_keystorelistener_getkeys(listener : alljoyn_keystorelistener, keystore : alljoyn_keystore, sink : windows_core::PCSTR, sink_sz : *mut usize) -> QStatus); - alljoyn_keystorelistener_getkeys(listener.param().abi(), keystore.param().abi(), sink.param().abi(), core::mem::transmute(sink_sz)) + alljoyn_keystorelistener_getkeys(core::mem::transmute(listener), core::mem::transmute(keystore), sink.param().abi(), core::mem::transmute(sink_sz)) } #[inline] -pub unsafe fn alljoyn_keystorelistener_putkeys(listener: P0, keystore: P1, source: P2, password: P3) -> QStatus +pub unsafe fn alljoyn_keystorelistener_putkeys(listener: alljoyn_keystorelistener, keystore: alljoyn_keystore, source: P2, password: P3) -> QStatus where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_keystorelistener_putkeys(listener : alljoyn_keystorelistener, keystore : alljoyn_keystore, source : windows_core::PCSTR, password : windows_core::PCSTR) -> QStatus); - alljoyn_keystorelistener_putkeys(listener.param().abi(), keystore.param().abi(), source.param().abi(), password.param().abi()) + alljoyn_keystorelistener_putkeys(core::mem::transmute(listener), core::mem::transmute(keystore), source.param().abi(), password.param().abi()) } #[inline] pub unsafe fn alljoyn_keystorelistener_with_synchronization_create(callbacks: *const alljoyn_keystorelistener_with_synchronization_callbacks, context: *mut core::ffi::c_void) -> alljoyn_keystorelistener { @@ -2571,240 +1984,158 @@ pub unsafe fn alljoyn_keystorelistener_with_synchronization_create(callbacks: *c alljoyn_keystorelistener_with_synchronization_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_message_create(bus: P0) -> alljoyn_message -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_create(bus: alljoyn_busattachment) -> alljoyn_message { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_create(bus : alljoyn_busattachment) -> alljoyn_message); - alljoyn_message_create(bus.param().abi()) + alljoyn_message_create(core::mem::transmute(bus)) } #[inline] -pub unsafe fn alljoyn_message_description(msg: P0, str: P1, buf: usize) -> usize +pub unsafe fn alljoyn_message_description(msg: alljoyn_message, str: P1, buf: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_description(msg : alljoyn_message, str : windows_core::PCSTR, buf : usize) -> usize); - alljoyn_message_description(msg.param().abi(), str.param().abi(), core::mem::transmute(buf)) + alljoyn_message_description(core::mem::transmute(msg), str.param().abi(), core::mem::transmute(buf)) } #[inline] -pub unsafe fn alljoyn_message_destroy(msg: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_destroy(msg: alljoyn_message) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_destroy(msg : alljoyn_message)); - alljoyn_message_destroy(msg.param().abi()) + alljoyn_message_destroy(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_eql(one: P0, other: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_message_eql(one: alljoyn_message, other: alljoyn_message) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_eql(one : alljoyn_message, other : alljoyn_message) -> i32); - alljoyn_message_eql(one.param().abi(), other.param().abi()) + alljoyn_message_eql(core::mem::transmute(one), core::mem::transmute(other)) } #[inline] -pub unsafe fn alljoyn_message_getarg(msg: P0, argn: usize) -> alljoyn_msgarg -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getarg(msg: alljoyn_message, argn: usize) -> alljoyn_msgarg { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getarg(msg : alljoyn_message, argn : usize) -> alljoyn_msgarg); - alljoyn_message_getarg(msg.param().abi(), core::mem::transmute(argn)) + alljoyn_message_getarg(core::mem::transmute(msg), core::mem::transmute(argn)) } #[inline] -pub unsafe fn alljoyn_message_getargs(msg: P0, numargs: *mut usize, args: *mut alljoyn_msgarg) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getargs(msg: alljoyn_message, numargs: *mut usize, args: *mut alljoyn_msgarg) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getargs(msg : alljoyn_message, numargs : *mut usize, args : *mut alljoyn_msgarg)); - alljoyn_message_getargs(msg.param().abi(), core::mem::transmute(numargs), core::mem::transmute(args)) + alljoyn_message_getargs(core::mem::transmute(msg), core::mem::transmute(numargs), core::mem::transmute(args)) } #[inline] -pub unsafe fn alljoyn_message_getauthmechanism(msg: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getauthmechanism(msg: alljoyn_message) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getauthmechanism(msg : alljoyn_message) -> windows_core::PCSTR); - alljoyn_message_getauthmechanism(msg.param().abi()) + alljoyn_message_getauthmechanism(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getcallserial(msg: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getcallserial(msg: alljoyn_message) -> u32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getcallserial(msg : alljoyn_message) -> u32); - alljoyn_message_getcallserial(msg.param().abi()) + alljoyn_message_getcallserial(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getcompressiontoken(msg: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getcompressiontoken(msg: alljoyn_message) -> u32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getcompressiontoken(msg : alljoyn_message) -> u32); - alljoyn_message_getcompressiontoken(msg.param().abi()) + alljoyn_message_getcompressiontoken(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getdestination(msg: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getdestination(msg: alljoyn_message) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getdestination(msg : alljoyn_message) -> windows_core::PCSTR); - alljoyn_message_getdestination(msg.param().abi()) + alljoyn_message_getdestination(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_geterrorname(msg: P0, errormessage: P1, errormessage_size: *mut usize) -> windows_core::PCSTR +pub unsafe fn alljoyn_message_geterrorname(msg: alljoyn_message, errormessage: P1, errormessage_size: *mut usize) -> windows_core::PCSTR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_geterrorname(msg : alljoyn_message, errormessage : windows_core::PCSTR, errormessage_size : *mut usize) -> windows_core::PCSTR); - alljoyn_message_geterrorname(msg.param().abi(), errormessage.param().abi(), core::mem::transmute(errormessage_size)) + alljoyn_message_geterrorname(core::mem::transmute(msg), errormessage.param().abi(), core::mem::transmute(errormessage_size)) } #[inline] -pub unsafe fn alljoyn_message_getflags(msg: P0) -> u8 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getflags(msg: alljoyn_message) -> u8 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getflags(msg : alljoyn_message) -> u8); - alljoyn_message_getflags(msg.param().abi()) + alljoyn_message_getflags(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getinterface(msg: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getinterface(msg: alljoyn_message) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getinterface(msg : alljoyn_message) -> windows_core::PCSTR); - alljoyn_message_getinterface(msg.param().abi()) + alljoyn_message_getinterface(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getmembername(msg: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getmembername(msg: alljoyn_message) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getmembername(msg : alljoyn_message) -> windows_core::PCSTR); - alljoyn_message_getmembername(msg.param().abi()) + alljoyn_message_getmembername(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getobjectpath(msg: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getobjectpath(msg: alljoyn_message) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getobjectpath(msg : alljoyn_message) -> windows_core::PCSTR); - alljoyn_message_getobjectpath(msg.param().abi()) + alljoyn_message_getobjectpath(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getreceiveendpointname(msg: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getreceiveendpointname(msg: alljoyn_message) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getreceiveendpointname(msg : alljoyn_message) -> windows_core::PCSTR); - alljoyn_message_getreceiveendpointname(msg.param().abi()) + alljoyn_message_getreceiveendpointname(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getreplyserial(msg: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getreplyserial(msg: alljoyn_message) -> u32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getreplyserial(msg : alljoyn_message) -> u32); - alljoyn_message_getreplyserial(msg.param().abi()) + alljoyn_message_getreplyserial(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getsender(msg: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getsender(msg: alljoyn_message) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getsender(msg : alljoyn_message) -> windows_core::PCSTR); - alljoyn_message_getsender(msg.param().abi()) + alljoyn_message_getsender(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getsessionid(msg: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getsessionid(msg: alljoyn_message) -> u32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getsessionid(msg : alljoyn_message) -> u32); - alljoyn_message_getsessionid(msg.param().abi()) + alljoyn_message_getsessionid(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_getsignature(msg: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_getsignature(msg: alljoyn_message) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_getsignature(msg : alljoyn_message) -> windows_core::PCSTR); - alljoyn_message_getsignature(msg.param().abi()) + alljoyn_message_getsignature(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_gettimestamp(msg: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_gettimestamp(msg: alljoyn_message) -> u32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_gettimestamp(msg : alljoyn_message) -> u32); - alljoyn_message_gettimestamp(msg.param().abi()) + alljoyn_message_gettimestamp(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_gettype(msg: P0) -> alljoyn_messagetype -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_gettype(msg: alljoyn_message) -> alljoyn_messagetype { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_gettype(msg : alljoyn_message) -> alljoyn_messagetype); - alljoyn_message_gettype(msg.param().abi()) + alljoyn_message_gettype(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_isbroadcastsignal(msg: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_isbroadcastsignal(msg: alljoyn_message) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_isbroadcastsignal(msg : alljoyn_message) -> i32); - alljoyn_message_isbroadcastsignal(msg.param().abi()) + alljoyn_message_isbroadcastsignal(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_isencrypted(msg: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_isencrypted(msg: alljoyn_message) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_isencrypted(msg : alljoyn_message) -> i32); - alljoyn_message_isencrypted(msg.param().abi()) + alljoyn_message_isencrypted(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_isexpired(msg: P0, tillexpirems: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_isexpired(msg: alljoyn_message, tillexpirems: *mut u32) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_isexpired(msg : alljoyn_message, tillexpirems : *mut u32) -> i32); - alljoyn_message_isexpired(msg.param().abi(), core::mem::transmute(tillexpirems)) + alljoyn_message_isexpired(core::mem::transmute(msg), core::mem::transmute(tillexpirems)) } #[inline] -pub unsafe fn alljoyn_message_isglobalbroadcast(msg: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_isglobalbroadcast(msg: alljoyn_message) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_isglobalbroadcast(msg : alljoyn_message) -> i32); - alljoyn_message_isglobalbroadcast(msg.param().abi()) + alljoyn_message_isglobalbroadcast(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_issessionless(msg: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_issessionless(msg: alljoyn_message) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_issessionless(msg : alljoyn_message) -> i32); - alljoyn_message_issessionless(msg.param().abi()) + alljoyn_message_issessionless(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_isunreliable(msg: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_message_isunreliable(msg: alljoyn_message) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_isunreliable(msg : alljoyn_message) -> i32); - alljoyn_message_isunreliable(msg.param().abi()) + alljoyn_message_isunreliable(core::mem::transmute(msg)) } #[inline] -pub unsafe fn alljoyn_message_parseargs(msg: P0, signature: P1) -> QStatus +pub unsafe fn alljoyn_message_parseargs(msg: alljoyn_message, signature: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "cdecl" fn alljoyn_message_parseargs(msg : alljoyn_message, signature : windows_core::PCSTR) -> QStatus); - alljoyn_message_parseargs(msg.param().abi(), signature.param().abi()) + alljoyn_message_parseargs(core::mem::transmute(msg), signature.param().abi()) } #[inline] pub unsafe fn alljoyn_message_setendianess(endian: i8) { @@ -2812,13 +2143,12 @@ pub unsafe fn alljoyn_message_setendianess(endian: i8) { alljoyn_message_setendianess(core::mem::transmute(endian)) } #[inline] -pub unsafe fn alljoyn_message_tostring(msg: P0, str: P1, buf: usize) -> usize +pub unsafe fn alljoyn_message_tostring(msg: alljoyn_message, str: P1, buf: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_message_tostring(msg : alljoyn_message, str : windows_core::PCSTR, buf : usize) -> usize); - alljoyn_message_tostring(msg.param().abi(), str.param().abi(), core::mem::transmute(buf)) + alljoyn_message_tostring(core::mem::transmute(msg), str.param().abi(), core::mem::transmute(buf)) } #[inline] pub unsafe fn alljoyn_msgarg_array_create(size: usize) -> alljoyn_msgarg { @@ -2826,82 +2156,64 @@ pub unsafe fn alljoyn_msgarg_array_create(size: usize) -> alljoyn_msgarg { alljoyn_msgarg_array_create(core::mem::transmute(size)) } #[inline] -pub unsafe fn alljoyn_msgarg_array_element(arg: P0, index: usize) -> alljoyn_msgarg -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_array_element(arg: alljoyn_msgarg, index: usize) -> alljoyn_msgarg { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_array_element(arg : alljoyn_msgarg, index : usize) -> alljoyn_msgarg); - alljoyn_msgarg_array_element(arg.param().abi(), core::mem::transmute(index)) + alljoyn_msgarg_array_element(core::mem::transmute(arg), core::mem::transmute(index)) } #[inline] -pub unsafe fn alljoyn_msgarg_array_get(args: P0, numargs: usize, signature: P2) -> QStatus +pub unsafe fn alljoyn_msgarg_array_get(args: alljoyn_msgarg, numargs: usize, signature: P2) -> QStatus where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "cdecl" fn alljoyn_msgarg_array_get(args : alljoyn_msgarg, numargs : usize, signature : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_array_get(args.param().abi(), core::mem::transmute(numargs), signature.param().abi()) + alljoyn_msgarg_array_get(core::mem::transmute(args), core::mem::transmute(numargs), signature.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_array_set(args: P0, numargs: *mut usize, signature: P2) -> QStatus +pub unsafe fn alljoyn_msgarg_array_set(args: alljoyn_msgarg, numargs: *mut usize, signature: P2) -> QStatus where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "cdecl" fn alljoyn_msgarg_array_set(args : alljoyn_msgarg, numargs : *mut usize, signature : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_array_set(args.param().abi(), core::mem::transmute(numargs), signature.param().abi()) + alljoyn_msgarg_array_set(core::mem::transmute(args), core::mem::transmute(numargs), signature.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_array_set_offset(args: P0, argoffset: usize, numargs: *mut usize, signature: P3) -> QStatus +pub unsafe fn alljoyn_msgarg_array_set_offset(args: alljoyn_msgarg, argoffset: usize, numargs: *mut usize, signature: P3) -> QStatus where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "cdecl" fn alljoyn_msgarg_array_set_offset(args : alljoyn_msgarg, argoffset : usize, numargs : *mut usize, signature : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_array_set_offset(args.param().abi(), core::mem::transmute(argoffset), core::mem::transmute(numargs), signature.param().abi()) + alljoyn_msgarg_array_set_offset(core::mem::transmute(args), core::mem::transmute(argoffset), core::mem::transmute(numargs), signature.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_array_signature(values: P0, numvalues: usize, str: P2, buf: usize) -> usize +pub unsafe fn alljoyn_msgarg_array_signature(values: alljoyn_msgarg, numvalues: usize, str: P2, buf: usize) -> usize where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_array_signature(values : alljoyn_msgarg, numvalues : usize, str : windows_core::PCSTR, buf : usize) -> usize); - alljoyn_msgarg_array_signature(values.param().abi(), core::mem::transmute(numvalues), str.param().abi(), core::mem::transmute(buf)) + alljoyn_msgarg_array_signature(core::mem::transmute(values), core::mem::transmute(numvalues), str.param().abi(), core::mem::transmute(buf)) } #[inline] -pub unsafe fn alljoyn_msgarg_array_tostring(args: P0, numargs: usize, str: P2, buf: usize, indent: usize) -> usize +pub unsafe fn alljoyn_msgarg_array_tostring(args: alljoyn_msgarg, numargs: usize, str: P2, buf: usize, indent: usize) -> usize where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_array_tostring(args : alljoyn_msgarg, numargs : usize, str : windows_core::PCSTR, buf : usize, indent : usize) -> usize); - alljoyn_msgarg_array_tostring(args.param().abi(), core::mem::transmute(numargs), str.param().abi(), core::mem::transmute(buf), core::mem::transmute(indent)) + alljoyn_msgarg_array_tostring(core::mem::transmute(args), core::mem::transmute(numargs), str.param().abi(), core::mem::transmute(buf), core::mem::transmute(indent)) } #[inline] -pub unsafe fn alljoyn_msgarg_clear(arg: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_clear(arg: alljoyn_msgarg) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_clear(arg : alljoyn_msgarg)); - alljoyn_msgarg_clear(arg.param().abi()) + alljoyn_msgarg_clear(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_msgarg_clone(destination: P0, source: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_clone(destination: alljoyn_msgarg, source: alljoyn_msgarg) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_clone(destination : alljoyn_msgarg, source : alljoyn_msgarg)); - alljoyn_msgarg_clone(destination.param().abi(), source.param().abi()) + alljoyn_msgarg_clone(core::mem::transmute(destination), core::mem::transmute(source)) } #[inline] -pub unsafe fn alljoyn_msgarg_copy(source: P0) -> alljoyn_msgarg -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_copy(source: alljoyn_msgarg) -> alljoyn_msgarg { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_copy(source : alljoyn_msgarg) -> alljoyn_msgarg); - alljoyn_msgarg_copy(source.param().abi()) + alljoyn_msgarg_copy(core::mem::transmute(source)) } #[inline] pub unsafe fn alljoyn_msgarg_create() -> alljoyn_msgarg { @@ -2917,625 +2229,416 @@ where alljoyn_msgarg_create_and_set(signature.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_destroy(arg: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_destroy(arg: alljoyn_msgarg) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_destroy(arg : alljoyn_msgarg)); - alljoyn_msgarg_destroy(arg.param().abi()) + alljoyn_msgarg_destroy(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_msgarg_equal(lhv: P0, rhv: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_equal(lhv: alljoyn_msgarg, rhv: alljoyn_msgarg) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_equal(lhv : alljoyn_msgarg, rhv : alljoyn_msgarg) -> i32); - alljoyn_msgarg_equal(lhv.param().abi(), rhv.param().abi()) + alljoyn_msgarg_equal(core::mem::transmute(lhv), core::mem::transmute(rhv)) } #[inline] -pub unsafe fn alljoyn_msgarg_get(arg: P0, signature: P1) -> QStatus +pub unsafe fn alljoyn_msgarg_get(arg: alljoyn_msgarg, signature: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "cdecl" fn alljoyn_msgarg_get(arg : alljoyn_msgarg, signature : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_get(arg.param().abi(), signature.param().abi()) + alljoyn_msgarg_get(core::mem::transmute(arg), signature.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_get_array_element(arg: P0, index: usize, element: *mut alljoyn_msgarg) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_array_element(arg: alljoyn_msgarg, index: usize, element: *mut alljoyn_msgarg) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_array_element(arg : alljoyn_msgarg, index : usize, element : *mut alljoyn_msgarg)); - alljoyn_msgarg_get_array_element(arg.param().abi(), core::mem::transmute(index), core::mem::transmute(element)) + alljoyn_msgarg_get_array_element(core::mem::transmute(arg), core::mem::transmute(index), core::mem::transmute(element)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_array_elementsignature(arg: P0, index: usize) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_array_elementsignature(arg: alljoyn_msgarg, index: usize) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_array_elementsignature(arg : alljoyn_msgarg, index : usize) -> windows_core::PCSTR); - alljoyn_msgarg_get_array_elementsignature(arg.param().abi(), core::mem::transmute(index)) + alljoyn_msgarg_get_array_elementsignature(core::mem::transmute(arg), core::mem::transmute(index)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_array_numberofelements(arg: P0) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_array_numberofelements(arg: alljoyn_msgarg) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_array_numberofelements(arg : alljoyn_msgarg) -> usize); - alljoyn_msgarg_get_array_numberofelements(arg.param().abi()) + alljoyn_msgarg_get_array_numberofelements(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_bool(arg: P0, b: *mut i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_bool(arg: alljoyn_msgarg, b: *mut i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_bool(arg : alljoyn_msgarg, b : *mut i32) -> QStatus); - alljoyn_msgarg_get_bool(arg.param().abi(), core::mem::transmute(b)) + alljoyn_msgarg_get_bool(core::mem::transmute(arg), core::mem::transmute(b)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_bool_array(arg: P0, length: *mut usize, ab: *mut i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_bool_array(arg: alljoyn_msgarg, length: *mut usize, ab: *mut i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_bool_array(arg : alljoyn_msgarg, length : *mut usize, ab : *mut i32) -> QStatus); - alljoyn_msgarg_get_bool_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ab)) + alljoyn_msgarg_get_bool_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ab)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_double(arg: P0, d: *mut f64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_double(arg: alljoyn_msgarg, d: *mut f64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_double(arg : alljoyn_msgarg, d : *mut f64) -> QStatus); - alljoyn_msgarg_get_double(arg.param().abi(), core::mem::transmute(d)) + alljoyn_msgarg_get_double(core::mem::transmute(arg), core::mem::transmute(d)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_double_array(arg: P0, length: *mut usize, ad: *mut f64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_double_array(arg: alljoyn_msgarg, length: *mut usize, ad: *mut f64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_double_array(arg : alljoyn_msgarg, length : *mut usize, ad : *mut f64) -> QStatus); - alljoyn_msgarg_get_double_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ad)) + alljoyn_msgarg_get_double_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ad)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_int16(arg: P0, n: *mut i16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_int16(arg: alljoyn_msgarg, n: *mut i16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_int16(arg : alljoyn_msgarg, n : *mut i16) -> QStatus); - alljoyn_msgarg_get_int16(arg.param().abi(), core::mem::transmute(n)) + alljoyn_msgarg_get_int16(core::mem::transmute(arg), core::mem::transmute(n)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_int16_array(arg: P0, length: *mut usize, an: *mut i16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_int16_array(arg: alljoyn_msgarg, length: *mut usize, an: *mut i16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_int16_array(arg : alljoyn_msgarg, length : *mut usize, an : *mut i16) -> QStatus); - alljoyn_msgarg_get_int16_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(an)) + alljoyn_msgarg_get_int16_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(an)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_int32(arg: P0, i: *mut i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_int32(arg: alljoyn_msgarg, i: *mut i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_int32(arg : alljoyn_msgarg, i : *mut i32) -> QStatus); - alljoyn_msgarg_get_int32(arg.param().abi(), core::mem::transmute(i)) + alljoyn_msgarg_get_int32(core::mem::transmute(arg), core::mem::transmute(i)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_int32_array(arg: P0, length: *mut usize, ai: *mut i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_int32_array(arg: alljoyn_msgarg, length: *mut usize, ai: *mut i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_int32_array(arg : alljoyn_msgarg, length : *mut usize, ai : *mut i32) -> QStatus); - alljoyn_msgarg_get_int32_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ai)) + alljoyn_msgarg_get_int32_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ai)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_int64(arg: P0, x: *mut i64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_int64(arg: alljoyn_msgarg, x: *mut i64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_int64(arg : alljoyn_msgarg, x : *mut i64) -> QStatus); - alljoyn_msgarg_get_int64(arg.param().abi(), core::mem::transmute(x)) + alljoyn_msgarg_get_int64(core::mem::transmute(arg), core::mem::transmute(x)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_int64_array(arg: P0, length: *mut usize, ax: *mut i64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_int64_array(arg: alljoyn_msgarg, length: *mut usize, ax: *mut i64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_int64_array(arg : alljoyn_msgarg, length : *mut usize, ax : *mut i64) -> QStatus); - alljoyn_msgarg_get_int64_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ax)) + alljoyn_msgarg_get_int64_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ax)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_objectpath(arg: P0, o: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_objectpath(arg: alljoyn_msgarg, o: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_objectpath(arg : alljoyn_msgarg, o : *mut *mut i8) -> QStatus); - alljoyn_msgarg_get_objectpath(arg.param().abi(), core::mem::transmute(o)) + alljoyn_msgarg_get_objectpath(core::mem::transmute(arg), core::mem::transmute(o)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_signature(arg: P0, g: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_signature(arg: alljoyn_msgarg, g: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_signature(arg : alljoyn_msgarg, g : *mut *mut i8) -> QStatus); - alljoyn_msgarg_get_signature(arg.param().abi(), core::mem::transmute(g)) + alljoyn_msgarg_get_signature(core::mem::transmute(arg), core::mem::transmute(g)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_string(arg: P0, s: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_string(arg: alljoyn_msgarg, s: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_string(arg : alljoyn_msgarg, s : *mut *mut i8) -> QStatus); - alljoyn_msgarg_get_string(arg.param().abi(), core::mem::transmute(s)) + alljoyn_msgarg_get_string(core::mem::transmute(arg), core::mem::transmute(s)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_uint16(arg: P0, q: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_uint16(arg: alljoyn_msgarg, q: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_uint16(arg : alljoyn_msgarg, q : *mut u16) -> QStatus); - alljoyn_msgarg_get_uint16(arg.param().abi(), core::mem::transmute(q)) + alljoyn_msgarg_get_uint16(core::mem::transmute(arg), core::mem::transmute(q)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_uint16_array(arg: P0, length: *mut usize, aq: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_uint16_array(arg: alljoyn_msgarg, length: *mut usize, aq: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_uint16_array(arg : alljoyn_msgarg, length : *mut usize, aq : *mut u16) -> QStatus); - alljoyn_msgarg_get_uint16_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(aq)) + alljoyn_msgarg_get_uint16_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(aq)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_uint32(arg: P0, u: *mut u32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_uint32(arg: alljoyn_msgarg, u: *mut u32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_uint32(arg : alljoyn_msgarg, u : *mut u32) -> QStatus); - alljoyn_msgarg_get_uint32(arg.param().abi(), core::mem::transmute(u)) + alljoyn_msgarg_get_uint32(core::mem::transmute(arg), core::mem::transmute(u)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_uint32_array(arg: P0, length: *mut usize, au: *mut u32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_uint32_array(arg: alljoyn_msgarg, length: *mut usize, au: *mut u32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_uint32_array(arg : alljoyn_msgarg, length : *mut usize, au : *mut u32) -> QStatus); - alljoyn_msgarg_get_uint32_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(au)) + alljoyn_msgarg_get_uint32_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(au)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_uint64(arg: P0, t: *mut u64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_uint64(arg: alljoyn_msgarg, t: *mut u64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_uint64(arg : alljoyn_msgarg, t : *mut u64) -> QStatus); - alljoyn_msgarg_get_uint64(arg.param().abi(), core::mem::transmute(t)) + alljoyn_msgarg_get_uint64(core::mem::transmute(arg), core::mem::transmute(t)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_uint64_array(arg: P0, length: *mut usize, at: *mut u64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_uint64_array(arg: alljoyn_msgarg, length: *mut usize, at: *mut u64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_uint64_array(arg : alljoyn_msgarg, length : *mut usize, at : *mut u64) -> QStatus); - alljoyn_msgarg_get_uint64_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(at)) + alljoyn_msgarg_get_uint64_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(at)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_uint8(arg: P0, y: *mut u8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_uint8(arg: alljoyn_msgarg, y: *mut u8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_uint8(arg : alljoyn_msgarg, y : *mut u8) -> QStatus); - alljoyn_msgarg_get_uint8(arg.param().abi(), core::mem::transmute(y)) + alljoyn_msgarg_get_uint8(core::mem::transmute(arg), core::mem::transmute(y)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_uint8_array(arg: P0, length: *mut usize, ay: *mut u8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_uint8_array(arg: alljoyn_msgarg, length: *mut usize, ay: *mut u8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_uint8_array(arg : alljoyn_msgarg, length : *mut usize, ay : *mut u8) -> QStatus); - alljoyn_msgarg_get_uint8_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ay)) + alljoyn_msgarg_get_uint8_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ay)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_variant(arg: P0, v: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_get_variant(arg: alljoyn_msgarg, v: alljoyn_msgarg) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_variant(arg : alljoyn_msgarg, v : alljoyn_msgarg) -> QStatus); - alljoyn_msgarg_get_variant(arg.param().abi(), v.param().abi()) + alljoyn_msgarg_get_variant(core::mem::transmute(arg), core::mem::transmute(v)) } #[inline] -pub unsafe fn alljoyn_msgarg_get_variant_array(arg: P0, signature: P1, length: *mut usize, av: *mut alljoyn_msgarg) -> QStatus +pub unsafe fn alljoyn_msgarg_get_variant_array(arg: alljoyn_msgarg, signature: P1, length: *mut usize, av: *mut alljoyn_msgarg) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_get_variant_array(arg : alljoyn_msgarg, signature : windows_core::PCSTR, length : *mut usize, av : *mut alljoyn_msgarg) -> QStatus); - alljoyn_msgarg_get_variant_array(arg.param().abi(), signature.param().abi(), core::mem::transmute(length), core::mem::transmute(av)) + alljoyn_msgarg_get_variant_array(core::mem::transmute(arg), signature.param().abi(), core::mem::transmute(length), core::mem::transmute(av)) } #[inline] -pub unsafe fn alljoyn_msgarg_getdictelement(arg: P0, elemsig: P1) -> QStatus +pub unsafe fn alljoyn_msgarg_getdictelement(arg: alljoyn_msgarg, elemsig: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "cdecl" fn alljoyn_msgarg_getdictelement(arg : alljoyn_msgarg, elemsig : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_getdictelement(arg.param().abi(), elemsig.param().abi()) + alljoyn_msgarg_getdictelement(core::mem::transmute(arg), elemsig.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_getkey(arg: P0) -> alljoyn_msgarg -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_getkey(arg: alljoyn_msgarg) -> alljoyn_msgarg { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_getkey(arg : alljoyn_msgarg) -> alljoyn_msgarg); - alljoyn_msgarg_getkey(arg.param().abi()) + alljoyn_msgarg_getkey(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_msgarg_getmember(arg: P0, index: usize) -> alljoyn_msgarg -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_getmember(arg: alljoyn_msgarg, index: usize) -> alljoyn_msgarg { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_getmember(arg : alljoyn_msgarg, index : usize) -> alljoyn_msgarg); - alljoyn_msgarg_getmember(arg.param().abi(), core::mem::transmute(index)) + alljoyn_msgarg_getmember(core::mem::transmute(arg), core::mem::transmute(index)) } #[inline] -pub unsafe fn alljoyn_msgarg_getnummembers(arg: P0) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_getnummembers(arg: alljoyn_msgarg) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_getnummembers(arg : alljoyn_msgarg) -> usize); - alljoyn_msgarg_getnummembers(arg.param().abi()) + alljoyn_msgarg_getnummembers(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_msgarg_gettype(arg: P0) -> alljoyn_typeid -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_gettype(arg: alljoyn_msgarg) -> alljoyn_typeid { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_gettype(arg : alljoyn_msgarg) -> alljoyn_typeid); - alljoyn_msgarg_gettype(arg.param().abi()) + alljoyn_msgarg_gettype(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_msgarg_getvalue(arg: P0) -> alljoyn_msgarg -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_getvalue(arg: alljoyn_msgarg) -> alljoyn_msgarg { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_getvalue(arg : alljoyn_msgarg) -> alljoyn_msgarg); - alljoyn_msgarg_getvalue(arg.param().abi()) + alljoyn_msgarg_getvalue(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_msgarg_hassignature(arg: P0, signature: P1) -> i32 +pub unsafe fn alljoyn_msgarg_hassignature(arg: alljoyn_msgarg, signature: P1) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_hassignature(arg : alljoyn_msgarg, signature : windows_core::PCSTR) -> i32); - alljoyn_msgarg_hassignature(arg.param().abi(), signature.param().abi()) + alljoyn_msgarg_hassignature(core::mem::transmute(arg), signature.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_set(arg: P0, signature: P1) -> QStatus +pub unsafe fn alljoyn_msgarg_set(arg: alljoyn_msgarg, signature: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "cdecl" fn alljoyn_msgarg_set(arg : alljoyn_msgarg, signature : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_set(arg.param().abi(), signature.param().abi()) + alljoyn_msgarg_set(core::mem::transmute(arg), signature.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_set_and_stabilize(arg: P0, signature: P1) -> QStatus +pub unsafe fn alljoyn_msgarg_set_and_stabilize(arg: alljoyn_msgarg, signature: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "cdecl" fn alljoyn_msgarg_set_and_stabilize(arg : alljoyn_msgarg, signature : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_set_and_stabilize(arg.param().abi(), signature.param().abi()) + alljoyn_msgarg_set_and_stabilize(core::mem::transmute(arg), signature.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_set_bool(arg: P0, b: i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_bool(arg: alljoyn_msgarg, b: i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_bool(arg : alljoyn_msgarg, b : i32) -> QStatus); - alljoyn_msgarg_set_bool(arg.param().abi(), core::mem::transmute(b)) + alljoyn_msgarg_set_bool(core::mem::transmute(arg), core::mem::transmute(b)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_bool_array(arg: P0, length: usize, ab: *mut i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_bool_array(arg: alljoyn_msgarg, length: usize, ab: *mut i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_bool_array(arg : alljoyn_msgarg, length : usize, ab : *mut i32) -> QStatus); - alljoyn_msgarg_set_bool_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ab)) + alljoyn_msgarg_set_bool_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ab)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_double(arg: P0, d: f64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_double(arg: alljoyn_msgarg, d: f64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_double(arg : alljoyn_msgarg, d : f64) -> QStatus); - alljoyn_msgarg_set_double(arg.param().abi(), core::mem::transmute(d)) + alljoyn_msgarg_set_double(core::mem::transmute(arg), core::mem::transmute(d)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_double_array(arg: P0, length: usize, ad: *mut f64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_double_array(arg: alljoyn_msgarg, length: usize, ad: *mut f64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_double_array(arg : alljoyn_msgarg, length : usize, ad : *mut f64) -> QStatus); - alljoyn_msgarg_set_double_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ad)) + alljoyn_msgarg_set_double_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ad)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_int16(arg: P0, n: i16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_int16(arg: alljoyn_msgarg, n: i16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_int16(arg : alljoyn_msgarg, n : i16) -> QStatus); - alljoyn_msgarg_set_int16(arg.param().abi(), core::mem::transmute(n)) + alljoyn_msgarg_set_int16(core::mem::transmute(arg), core::mem::transmute(n)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_int16_array(arg: P0, length: usize, an: *mut i16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_int16_array(arg: alljoyn_msgarg, length: usize, an: *mut i16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_int16_array(arg : alljoyn_msgarg, length : usize, an : *mut i16) -> QStatus); - alljoyn_msgarg_set_int16_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(an)) + alljoyn_msgarg_set_int16_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(an)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_int32(arg: P0, i: i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_int32(arg: alljoyn_msgarg, i: i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_int32(arg : alljoyn_msgarg, i : i32) -> QStatus); - alljoyn_msgarg_set_int32(arg.param().abi(), core::mem::transmute(i)) + alljoyn_msgarg_set_int32(core::mem::transmute(arg), core::mem::transmute(i)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_int32_array(arg: P0, length: usize, ai: *mut i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_int32_array(arg: alljoyn_msgarg, length: usize, ai: *mut i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_int32_array(arg : alljoyn_msgarg, length : usize, ai : *mut i32) -> QStatus); - alljoyn_msgarg_set_int32_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ai)) + alljoyn_msgarg_set_int32_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ai)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_int64(arg: P0, x: i64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_int64(arg: alljoyn_msgarg, x: i64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_int64(arg : alljoyn_msgarg, x : i64) -> QStatus); - alljoyn_msgarg_set_int64(arg.param().abi(), core::mem::transmute(x)) + alljoyn_msgarg_set_int64(core::mem::transmute(arg), core::mem::transmute(x)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_int64_array(arg: P0, length: usize, ax: *mut i64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_int64_array(arg: alljoyn_msgarg, length: usize, ax: *mut i64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_int64_array(arg : alljoyn_msgarg, length : usize, ax : *mut i64) -> QStatus); - alljoyn_msgarg_set_int64_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ax)) + alljoyn_msgarg_set_int64_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ax)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_objectpath(arg: P0, o: P1) -> QStatus +pub unsafe fn alljoyn_msgarg_set_objectpath(arg: alljoyn_msgarg, o: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_objectpath(arg : alljoyn_msgarg, o : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_set_objectpath(arg.param().abi(), o.param().abi()) + alljoyn_msgarg_set_objectpath(core::mem::transmute(arg), o.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_set_objectpath_array(arg: P0, length: usize, ao: *const *const i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_objectpath_array(arg: alljoyn_msgarg, length: usize, ao: *const *const i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_objectpath_array(arg : alljoyn_msgarg, length : usize, ao : *const *const i8) -> QStatus); - alljoyn_msgarg_set_objectpath_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ao)) + alljoyn_msgarg_set_objectpath_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ao)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_signature(arg: P0, g: P1) -> QStatus +pub unsafe fn alljoyn_msgarg_set_signature(arg: alljoyn_msgarg, g: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_signature(arg : alljoyn_msgarg, g : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_set_signature(arg.param().abi(), g.param().abi()) + alljoyn_msgarg_set_signature(core::mem::transmute(arg), g.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_set_signature_array(arg: P0, length: usize, ag: *const *const i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_signature_array(arg: alljoyn_msgarg, length: usize, ag: *const *const i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_signature_array(arg : alljoyn_msgarg, length : usize, ag : *const *const i8) -> QStatus); - alljoyn_msgarg_set_signature_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ag)) + alljoyn_msgarg_set_signature_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ag)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_string(arg: P0, s: P1) -> QStatus +pub unsafe fn alljoyn_msgarg_set_string(arg: alljoyn_msgarg, s: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_string(arg : alljoyn_msgarg, s : windows_core::PCSTR) -> QStatus); - alljoyn_msgarg_set_string(arg.param().abi(), s.param().abi()) + alljoyn_msgarg_set_string(core::mem::transmute(arg), s.param().abi()) } #[inline] -pub unsafe fn alljoyn_msgarg_set_string_array(arg: P0, length: usize, r#as: *const *const i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_string_array(arg: alljoyn_msgarg, length: usize, r#as: *const *const i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_string_array(arg : alljoyn_msgarg, length : usize, r#as : *const *const i8) -> QStatus); - alljoyn_msgarg_set_string_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(r#as)) + alljoyn_msgarg_set_string_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(r#as)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_uint16(arg: P0, q: u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_uint16(arg: alljoyn_msgarg, q: u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_uint16(arg : alljoyn_msgarg, q : u16) -> QStatus); - alljoyn_msgarg_set_uint16(arg.param().abi(), core::mem::transmute(q)) + alljoyn_msgarg_set_uint16(core::mem::transmute(arg), core::mem::transmute(q)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_uint16_array(arg: P0, length: usize, aq: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_uint16_array(arg: alljoyn_msgarg, length: usize, aq: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_uint16_array(arg : alljoyn_msgarg, length : usize, aq : *mut u16) -> QStatus); - alljoyn_msgarg_set_uint16_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(aq)) + alljoyn_msgarg_set_uint16_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(aq)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_uint32(arg: P0, u: u32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_uint32(arg: alljoyn_msgarg, u: u32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_uint32(arg : alljoyn_msgarg, u : u32) -> QStatus); - alljoyn_msgarg_set_uint32(arg.param().abi(), core::mem::transmute(u)) + alljoyn_msgarg_set_uint32(core::mem::transmute(arg), core::mem::transmute(u)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_uint32_array(arg: P0, length: usize, au: *mut u32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_uint32_array(arg: alljoyn_msgarg, length: usize, au: *mut u32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_uint32_array(arg : alljoyn_msgarg, length : usize, au : *mut u32) -> QStatus); - alljoyn_msgarg_set_uint32_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(au)) + alljoyn_msgarg_set_uint32_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(au)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_uint64(arg: P0, t: u64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_uint64(arg: alljoyn_msgarg, t: u64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_uint64(arg : alljoyn_msgarg, t : u64) -> QStatus); - alljoyn_msgarg_set_uint64(arg.param().abi(), core::mem::transmute(t)) + alljoyn_msgarg_set_uint64(core::mem::transmute(arg), core::mem::transmute(t)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_uint64_array(arg: P0, length: usize, at: *mut u64) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_uint64_array(arg: alljoyn_msgarg, length: usize, at: *mut u64) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_uint64_array(arg : alljoyn_msgarg, length : usize, at : *mut u64) -> QStatus); - alljoyn_msgarg_set_uint64_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(at)) + alljoyn_msgarg_set_uint64_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(at)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_uint8(arg: P0, y: u8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_uint8(arg: alljoyn_msgarg, y: u8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_uint8(arg : alljoyn_msgarg, y : u8) -> QStatus); - alljoyn_msgarg_set_uint8(arg.param().abi(), core::mem::transmute(y)) + alljoyn_msgarg_set_uint8(core::mem::transmute(arg), core::mem::transmute(y)) } #[inline] -pub unsafe fn alljoyn_msgarg_set_uint8_array(arg: P0, length: usize, ay: *mut u8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_set_uint8_array(arg: alljoyn_msgarg, length: usize, ay: *mut u8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_set_uint8_array(arg : alljoyn_msgarg, length : usize, ay : *mut u8) -> QStatus); - alljoyn_msgarg_set_uint8_array(arg.param().abi(), core::mem::transmute(length), core::mem::transmute(ay)) + alljoyn_msgarg_set_uint8_array(core::mem::transmute(arg), core::mem::transmute(length), core::mem::transmute(ay)) } #[inline] -pub unsafe fn alljoyn_msgarg_setdictentry(arg: P0, key: P1, value: P2) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_setdictentry(arg: alljoyn_msgarg, key: alljoyn_msgarg, value: alljoyn_msgarg) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_setdictentry(arg : alljoyn_msgarg, key : alljoyn_msgarg, value : alljoyn_msgarg) -> QStatus); - alljoyn_msgarg_setdictentry(arg.param().abi(), key.param().abi(), value.param().abi()) + alljoyn_msgarg_setdictentry(core::mem::transmute(arg), core::mem::transmute(key), core::mem::transmute(value)) } #[inline] -pub unsafe fn alljoyn_msgarg_setstruct(arg: P0, struct_members: P1, num_members: usize) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_setstruct(arg: alljoyn_msgarg, struct_members: alljoyn_msgarg, num_members: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_setstruct(arg : alljoyn_msgarg, struct_members : alljoyn_msgarg, num_members : usize) -> QStatus); - alljoyn_msgarg_setstruct(arg.param().abi(), struct_members.param().abi(), core::mem::transmute(num_members)) + alljoyn_msgarg_setstruct(core::mem::transmute(arg), core::mem::transmute(struct_members), core::mem::transmute(num_members)) } #[inline] -pub unsafe fn alljoyn_msgarg_signature(arg: P0, str: P1, buf: usize) -> usize +pub unsafe fn alljoyn_msgarg_signature(arg: alljoyn_msgarg, str: P1, buf: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_signature(arg : alljoyn_msgarg, str : windows_core::PCSTR, buf : usize) -> usize); - alljoyn_msgarg_signature(arg.param().abi(), str.param().abi(), core::mem::transmute(buf)) + alljoyn_msgarg_signature(core::mem::transmute(arg), str.param().abi(), core::mem::transmute(buf)) } #[inline] -pub unsafe fn alljoyn_msgarg_stabilize(arg: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_msgarg_stabilize(arg: alljoyn_msgarg) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_stabilize(arg : alljoyn_msgarg)); - alljoyn_msgarg_stabilize(arg.param().abi()) + alljoyn_msgarg_stabilize(core::mem::transmute(arg)) } #[inline] -pub unsafe fn alljoyn_msgarg_tostring(arg: P0, str: P1, buf: usize, indent: usize) -> usize +pub unsafe fn alljoyn_msgarg_tostring(arg: alljoyn_msgarg, str: P1, buf: usize, indent: usize) -> usize where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_msgarg_tostring(arg : alljoyn_msgarg, str : windows_core::PCSTR, buf : usize, indent : usize) -> usize); - alljoyn_msgarg_tostring(arg.param().abi(), str.param().abi(), core::mem::transmute(buf), core::mem::transmute(indent)) + alljoyn_msgarg_tostring(core::mem::transmute(arg), str.param().abi(), core::mem::transmute(buf), core::mem::transmute(indent)) } #[inline] -pub unsafe fn alljoyn_observer_create(bus: P0, mandatoryinterfaces: *const *const i8, nummandatoryinterfaces: usize) -> alljoyn_observer -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_observer_create(bus: alljoyn_busattachment, mandatoryinterfaces: *const *const i8, nummandatoryinterfaces: usize) -> alljoyn_observer { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observer_create(bus : alljoyn_busattachment, mandatoryinterfaces : *const *const i8, nummandatoryinterfaces : usize) -> alljoyn_observer); - alljoyn_observer_create(bus.param().abi(), core::mem::transmute(mandatoryinterfaces), core::mem::transmute(nummandatoryinterfaces)) + alljoyn_observer_create(core::mem::transmute(bus), core::mem::transmute(mandatoryinterfaces), core::mem::transmute(nummandatoryinterfaces)) } #[inline] -pub unsafe fn alljoyn_observer_destroy(observer: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_observer_destroy(observer: alljoyn_observer) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observer_destroy(observer : alljoyn_observer)); - alljoyn_observer_destroy(observer.param().abi()) + alljoyn_observer_destroy(core::mem::transmute(observer)) } #[inline] -pub unsafe fn alljoyn_observer_get(observer: P0, uniquebusname: P1, objectpath: P2) -> alljoyn_proxybusobject_ref +pub unsafe fn alljoyn_observer_get(observer: alljoyn_observer, uniquebusname: P1, objectpath: P2) -> alljoyn_proxybusobject_ref where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observer_get(observer : alljoyn_observer, uniquebusname : windows_core::PCSTR, objectpath : windows_core::PCSTR) -> alljoyn_proxybusobject_ref); - alljoyn_observer_get(observer.param().abi(), uniquebusname.param().abi(), objectpath.param().abi()) + alljoyn_observer_get(core::mem::transmute(observer), uniquebusname.param().abi(), objectpath.param().abi()) } #[inline] -pub unsafe fn alljoyn_observer_getfirst(observer: P0) -> alljoyn_proxybusobject_ref -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_observer_getfirst(observer: alljoyn_observer) -> alljoyn_proxybusobject_ref { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observer_getfirst(observer : alljoyn_observer) -> alljoyn_proxybusobject_ref); - alljoyn_observer_getfirst(observer.param().abi()) + alljoyn_observer_getfirst(core::mem::transmute(observer)) } #[inline] -pub unsafe fn alljoyn_observer_getnext(observer: P0, proxyref: P1) -> alljoyn_proxybusobject_ref -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_observer_getnext(observer: alljoyn_observer, proxyref: alljoyn_proxybusobject_ref) -> alljoyn_proxybusobject_ref { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observer_getnext(observer : alljoyn_observer, proxyref : alljoyn_proxybusobject_ref) -> alljoyn_proxybusobject_ref); - alljoyn_observer_getnext(observer.param().abi(), proxyref.param().abi()) + alljoyn_observer_getnext(core::mem::transmute(observer), core::mem::transmute(proxyref)) } #[inline] -pub unsafe fn alljoyn_observer_registerlistener(observer: P0, listener: P1, triggeronexisting: i32) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_observer_registerlistener(observer: alljoyn_observer, listener: alljoyn_observerlistener, triggeronexisting: i32) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observer_registerlistener(observer : alljoyn_observer, listener : alljoyn_observerlistener, triggeronexisting : i32)); - alljoyn_observer_registerlistener(observer.param().abi(), listener.param().abi(), core::mem::transmute(triggeronexisting)) + alljoyn_observer_registerlistener(core::mem::transmute(observer), core::mem::transmute(listener), core::mem::transmute(triggeronexisting)) } #[inline] -pub unsafe fn alljoyn_observer_unregisteralllisteners(observer: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_observer_unregisteralllisteners(observer: alljoyn_observer) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observer_unregisteralllisteners(observer : alljoyn_observer)); - alljoyn_observer_unregisteralllisteners(observer.param().abi()) + alljoyn_observer_unregisteralllisteners(core::mem::transmute(observer)) } #[inline] -pub unsafe fn alljoyn_observer_unregisterlistener(observer: P0, listener: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_observer_unregisterlistener(observer: alljoyn_observer, listener: alljoyn_observerlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observer_unregisterlistener(observer : alljoyn_observer, listener : alljoyn_observerlistener)); - alljoyn_observer_unregisterlistener(observer.param().abi(), listener.param().abi()) + alljoyn_observer_unregisterlistener(core::mem::transmute(observer), core::mem::transmute(listener)) } #[inline] pub unsafe fn alljoyn_observerlistener_create(callback: *const alljoyn_observerlistener_callback, context: *const core::ffi::c_void) -> alljoyn_observerlistener { @@ -3543,12 +2646,9 @@ pub unsafe fn alljoyn_observerlistener_create(callback: *const alljoyn_observerl alljoyn_observerlistener_create(core::mem::transmute(callback), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_observerlistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_observerlistener_destroy(listener: alljoyn_observerlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_observerlistener_destroy(listener : alljoyn_observerlistener)); - alljoyn_observerlistener_destroy(listener.param().abi()) + alljoyn_observerlistener_destroy(core::mem::transmute(listener)) } #[inline] pub unsafe fn alljoyn_passwordmanager_setcredentials(authmechanism: P0, password: P1) -> QStatus @@ -3565,12 +2665,9 @@ pub unsafe fn alljoyn_permissionconfigurationlistener_create(callbacks: *const a alljoyn_permissionconfigurationlistener_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurationlistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurationlistener_destroy(listener: alljoyn_permissionconfigurationlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurationlistener_destroy(listener : alljoyn_permissionconfigurationlistener)); - alljoyn_permissionconfigurationlistener_destroy(listener.param().abi()) + alljoyn_permissionconfigurationlistener_destroy(core::mem::transmute(listener)) } #[inline] pub unsafe fn alljoyn_permissionconfigurator_certificatechain_destroy(certificatechain: *mut i8) { @@ -3588,44 +2685,29 @@ pub unsafe fn alljoyn_permissionconfigurator_certificateidarray_cleanup(certific alljoyn_permissionconfigurator_certificateidarray_cleanup(core::mem::transmute(certificateidarray)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_claim(configurator: P0, cakey: *mut i8, identitycertificatechain: *mut i8, groupid: *const u8, groupsize: usize, groupauthority: *mut i8, manifestsxmls: *mut *mut i8, manifestscount: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_claim(configurator: alljoyn_permissionconfigurator, cakey: *mut i8, identitycertificatechain: *mut i8, groupid: *const u8, groupsize: usize, groupauthority: *mut i8, manifestsxmls: *mut *mut i8, manifestscount: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_claim(configurator : alljoyn_permissionconfigurator, cakey : *mut i8, identitycertificatechain : *mut i8, groupid : *const u8, groupsize : usize, groupauthority : *mut i8, manifestsxmls : *mut *mut i8, manifestscount : usize) -> QStatus); - alljoyn_permissionconfigurator_claim(configurator.param().abi(), core::mem::transmute(cakey), core::mem::transmute(identitycertificatechain), core::mem::transmute(groupid), core::mem::transmute(groupsize), core::mem::transmute(groupauthority), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount)) + alljoyn_permissionconfigurator_claim(core::mem::transmute(configurator), core::mem::transmute(cakey), core::mem::transmute(identitycertificatechain), core::mem::transmute(groupid), core::mem::transmute(groupsize), core::mem::transmute(groupauthority), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_endmanagement(configurator: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_endmanagement(configurator: alljoyn_permissionconfigurator) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_endmanagement(configurator : alljoyn_permissionconfigurator) -> QStatus); - alljoyn_permissionconfigurator_endmanagement(configurator.param().abi()) + alljoyn_permissionconfigurator_endmanagement(core::mem::transmute(configurator)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getapplicationstate(configurator: P0, state: *mut alljoyn_applicationstate) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getapplicationstate(configurator: alljoyn_permissionconfigurator, state: *mut alljoyn_applicationstate) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getapplicationstate(configurator : alljoyn_permissionconfigurator, state : *mut alljoyn_applicationstate) -> QStatus); - alljoyn_permissionconfigurator_getapplicationstate(configurator.param().abi(), core::mem::transmute(state)) + alljoyn_permissionconfigurator_getapplicationstate(core::mem::transmute(configurator), core::mem::transmute(state)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getclaimcapabilities(configurator: P0, claimcapabilities: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getclaimcapabilities(configurator: alljoyn_permissionconfigurator, claimcapabilities: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getclaimcapabilities(configurator : alljoyn_permissionconfigurator, claimcapabilities : *mut u16) -> QStatus); - alljoyn_permissionconfigurator_getclaimcapabilities(configurator.param().abi(), core::mem::transmute(claimcapabilities)) + alljoyn_permissionconfigurator_getclaimcapabilities(core::mem::transmute(configurator), core::mem::transmute(claimcapabilities)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getclaimcapabilitiesadditionalinfo(configurator: P0, additionalinfo: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getclaimcapabilitiesadditionalinfo(configurator: alljoyn_permissionconfigurator, additionalinfo: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getclaimcapabilitiesadditionalinfo(configurator : alljoyn_permissionconfigurator, additionalinfo : *mut u16) -> QStatus); - alljoyn_permissionconfigurator_getclaimcapabilitiesadditionalinfo(configurator.param().abi(), core::mem::transmute(additionalinfo)) + alljoyn_permissionconfigurator_getclaimcapabilitiesadditionalinfo(core::mem::transmute(configurator), core::mem::transmute(additionalinfo)) } #[inline] pub unsafe fn alljoyn_permissionconfigurator_getdefaultclaimcapabilities() -> u16 { @@ -3633,84 +2715,54 @@ pub unsafe fn alljoyn_permissionconfigurator_getdefaultclaimcapabilities() -> u1 alljoyn_permissionconfigurator_getdefaultclaimcapabilities() } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getdefaultpolicy(configurator: P0, policyxml: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getdefaultpolicy(configurator: alljoyn_permissionconfigurator, policyxml: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getdefaultpolicy(configurator : alljoyn_permissionconfigurator, policyxml : *mut *mut i8) -> QStatus); - alljoyn_permissionconfigurator_getdefaultpolicy(configurator.param().abi(), core::mem::transmute(policyxml)) + alljoyn_permissionconfigurator_getdefaultpolicy(core::mem::transmute(configurator), core::mem::transmute(policyxml)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getidentity(configurator: P0, identitycertificatechain: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getidentity(configurator: alljoyn_permissionconfigurator, identitycertificatechain: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getidentity(configurator : alljoyn_permissionconfigurator, identitycertificatechain : *mut *mut i8) -> QStatus); - alljoyn_permissionconfigurator_getidentity(configurator.param().abi(), core::mem::transmute(identitycertificatechain)) + alljoyn_permissionconfigurator_getidentity(core::mem::transmute(configurator), core::mem::transmute(identitycertificatechain)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getidentitycertificateid(configurator: P0, certificateid: *mut alljoyn_certificateid) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getidentitycertificateid(configurator: alljoyn_permissionconfigurator, certificateid: *mut alljoyn_certificateid) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getidentitycertificateid(configurator : alljoyn_permissionconfigurator, certificateid : *mut alljoyn_certificateid) -> QStatus); - alljoyn_permissionconfigurator_getidentitycertificateid(configurator.param().abi(), core::mem::transmute(certificateid)) + alljoyn_permissionconfigurator_getidentitycertificateid(core::mem::transmute(configurator), core::mem::transmute(certificateid)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getmanifests(configurator: P0, manifestarray: *mut alljoyn_manifestarray) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getmanifests(configurator: alljoyn_permissionconfigurator, manifestarray: *mut alljoyn_manifestarray) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getmanifests(configurator : alljoyn_permissionconfigurator, manifestarray : *mut alljoyn_manifestarray) -> QStatus); - alljoyn_permissionconfigurator_getmanifests(configurator.param().abi(), core::mem::transmute(manifestarray)) + alljoyn_permissionconfigurator_getmanifests(core::mem::transmute(configurator), core::mem::transmute(manifestarray)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getmanifesttemplate(configurator: P0, manifesttemplatexml: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getmanifesttemplate(configurator: alljoyn_permissionconfigurator, manifesttemplatexml: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getmanifesttemplate(configurator : alljoyn_permissionconfigurator, manifesttemplatexml : *mut *mut i8) -> QStatus); - alljoyn_permissionconfigurator_getmanifesttemplate(configurator.param().abi(), core::mem::transmute(manifesttemplatexml)) + alljoyn_permissionconfigurator_getmanifesttemplate(core::mem::transmute(configurator), core::mem::transmute(manifesttemplatexml)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getmembershipsummaries(configurator: P0, certificateids: *mut alljoyn_certificateidarray) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getmembershipsummaries(configurator: alljoyn_permissionconfigurator, certificateids: *mut alljoyn_certificateidarray) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getmembershipsummaries(configurator : alljoyn_permissionconfigurator, certificateids : *mut alljoyn_certificateidarray) -> QStatus); - alljoyn_permissionconfigurator_getmembershipsummaries(configurator.param().abi(), core::mem::transmute(certificateids)) + alljoyn_permissionconfigurator_getmembershipsummaries(core::mem::transmute(configurator), core::mem::transmute(certificateids)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getpolicy(configurator: P0, policyxml: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getpolicy(configurator: alljoyn_permissionconfigurator, policyxml: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getpolicy(configurator : alljoyn_permissionconfigurator, policyxml : *mut *mut i8) -> QStatus); - alljoyn_permissionconfigurator_getpolicy(configurator.param().abi(), core::mem::transmute(policyxml)) + alljoyn_permissionconfigurator_getpolicy(core::mem::transmute(configurator), core::mem::transmute(policyxml)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_getpublickey(configurator: P0, publickey: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_getpublickey(configurator: alljoyn_permissionconfigurator, publickey: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_getpublickey(configurator : alljoyn_permissionconfigurator, publickey : *mut *mut i8) -> QStatus); - alljoyn_permissionconfigurator_getpublickey(configurator.param().abi(), core::mem::transmute(publickey)) + alljoyn_permissionconfigurator_getpublickey(core::mem::transmute(configurator), core::mem::transmute(publickey)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_installmanifests(configurator: P0, manifestsxmls: *mut *mut i8, manifestscount: usize, append: i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_installmanifests(configurator: alljoyn_permissionconfigurator, manifestsxmls: *mut *mut i8, manifestscount: usize, append: i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_installmanifests(configurator : alljoyn_permissionconfigurator, manifestsxmls : *mut *mut i8, manifestscount : usize, append : i32) -> QStatus); - alljoyn_permissionconfigurator_installmanifests(configurator.param().abi(), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount), core::mem::transmute(append)) + alljoyn_permissionconfigurator_installmanifests(core::mem::transmute(configurator), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount), core::mem::transmute(append)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_installmembership(configurator: P0, membershipcertificatechain: *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_installmembership(configurator: alljoyn_permissionconfigurator, membershipcertificatechain: *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_installmembership(configurator : alljoyn_permissionconfigurator, membershipcertificatechain : *mut i8) -> QStatus); - alljoyn_permissionconfigurator_installmembership(configurator.param().abi(), core::mem::transmute(membershipcertificatechain)) + alljoyn_permissionconfigurator_installmembership(core::mem::transmute(configurator), core::mem::transmute(membershipcertificatechain)) } #[inline] pub unsafe fn alljoyn_permissionconfigurator_manifestarray_cleanup(manifestarray: *mut alljoyn_manifestarray) { @@ -3733,84 +2785,54 @@ pub unsafe fn alljoyn_permissionconfigurator_publickey_destroy(publickey: *mut i alljoyn_permissionconfigurator_publickey_destroy(core::mem::transmute(publickey)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_removemembership(configurator: P0, serial: *const u8, seriallen: usize, issuerpublickey: *mut i8, issueraki: *const u8, issuerakilen: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_removemembership(configurator: alljoyn_permissionconfigurator, serial: *const u8, seriallen: usize, issuerpublickey: *mut i8, issueraki: *const u8, issuerakilen: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_removemembership(configurator : alljoyn_permissionconfigurator, serial : *const u8, seriallen : usize, issuerpublickey : *mut i8, issueraki : *const u8, issuerakilen : usize) -> QStatus); - alljoyn_permissionconfigurator_removemembership(configurator.param().abi(), core::mem::transmute(serial), core::mem::transmute(seriallen), core::mem::transmute(issuerpublickey), core::mem::transmute(issueraki), core::mem::transmute(issuerakilen)) + alljoyn_permissionconfigurator_removemembership(core::mem::transmute(configurator), core::mem::transmute(serial), core::mem::transmute(seriallen), core::mem::transmute(issuerpublickey), core::mem::transmute(issueraki), core::mem::transmute(issuerakilen)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_reset(configurator: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_reset(configurator: alljoyn_permissionconfigurator) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_reset(configurator : alljoyn_permissionconfigurator) -> QStatus); - alljoyn_permissionconfigurator_reset(configurator.param().abi()) + alljoyn_permissionconfigurator_reset(core::mem::transmute(configurator)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_resetpolicy(configurator: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_resetpolicy(configurator: alljoyn_permissionconfigurator) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_resetpolicy(configurator : alljoyn_permissionconfigurator) -> QStatus); - alljoyn_permissionconfigurator_resetpolicy(configurator.param().abi()) + alljoyn_permissionconfigurator_resetpolicy(core::mem::transmute(configurator)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_setapplicationstate(configurator: P0, state: alljoyn_applicationstate) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_setapplicationstate(configurator: alljoyn_permissionconfigurator, state: alljoyn_applicationstate) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_setapplicationstate(configurator : alljoyn_permissionconfigurator, state : alljoyn_applicationstate) -> QStatus); - alljoyn_permissionconfigurator_setapplicationstate(configurator.param().abi(), core::mem::transmute(state)) + alljoyn_permissionconfigurator_setapplicationstate(core::mem::transmute(configurator), core::mem::transmute(state)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_setclaimcapabilities(configurator: P0, claimcapabilities: u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_setclaimcapabilities(configurator: alljoyn_permissionconfigurator, claimcapabilities: u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_setclaimcapabilities(configurator : alljoyn_permissionconfigurator, claimcapabilities : u16) -> QStatus); - alljoyn_permissionconfigurator_setclaimcapabilities(configurator.param().abi(), core::mem::transmute(claimcapabilities)) + alljoyn_permissionconfigurator_setclaimcapabilities(core::mem::transmute(configurator), core::mem::transmute(claimcapabilities)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_setclaimcapabilitiesadditionalinfo(configurator: P0, additionalinfo: u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_setclaimcapabilitiesadditionalinfo(configurator: alljoyn_permissionconfigurator, additionalinfo: u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_setclaimcapabilitiesadditionalinfo(configurator : alljoyn_permissionconfigurator, additionalinfo : u16) -> QStatus); - alljoyn_permissionconfigurator_setclaimcapabilitiesadditionalinfo(configurator.param().abi(), core::mem::transmute(additionalinfo)) + alljoyn_permissionconfigurator_setclaimcapabilitiesadditionalinfo(core::mem::transmute(configurator), core::mem::transmute(additionalinfo)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_setmanifesttemplatefromxml(configurator: P0, manifesttemplatexml: *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_setmanifesttemplatefromxml(configurator: alljoyn_permissionconfigurator, manifesttemplatexml: *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_setmanifesttemplatefromxml(configurator : alljoyn_permissionconfigurator, manifesttemplatexml : *mut i8) -> QStatus); - alljoyn_permissionconfigurator_setmanifesttemplatefromxml(configurator.param().abi(), core::mem::transmute(manifesttemplatexml)) + alljoyn_permissionconfigurator_setmanifesttemplatefromxml(core::mem::transmute(configurator), core::mem::transmute(manifesttemplatexml)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_startmanagement(configurator: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_startmanagement(configurator: alljoyn_permissionconfigurator) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_startmanagement(configurator : alljoyn_permissionconfigurator) -> QStatus); - alljoyn_permissionconfigurator_startmanagement(configurator.param().abi()) + alljoyn_permissionconfigurator_startmanagement(core::mem::transmute(configurator)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_updateidentity(configurator: P0, identitycertificatechain: *mut i8, manifestsxmls: *mut *mut i8, manifestscount: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_updateidentity(configurator: alljoyn_permissionconfigurator, identitycertificatechain: *mut i8, manifestsxmls: *mut *mut i8, manifestscount: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_updateidentity(configurator : alljoyn_permissionconfigurator, identitycertificatechain : *mut i8, manifestsxmls : *mut *mut i8, manifestscount : usize) -> QStatus); - alljoyn_permissionconfigurator_updateidentity(configurator.param().abi(), core::mem::transmute(identitycertificatechain), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount)) + alljoyn_permissionconfigurator_updateidentity(core::mem::transmute(configurator), core::mem::transmute(identitycertificatechain), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount)) } #[inline] -pub unsafe fn alljoyn_permissionconfigurator_updatepolicy(configurator: P0, policyxml: *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_permissionconfigurator_updatepolicy(configurator: alljoyn_permissionconfigurator, policyxml: *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_permissionconfigurator_updatepolicy(configurator : alljoyn_permissionconfigurator, policyxml : *mut i8) -> QStatus); - alljoyn_permissionconfigurator_updatepolicy(configurator.param().abi(), core::mem::transmute(policyxml)) + alljoyn_permissionconfigurator_updatepolicy(core::mem::transmute(configurator), core::mem::transmute(policyxml)) } #[inline] pub unsafe fn alljoyn_pinglistener_create(callback: *const alljoyn_pinglistener_callback, context: *const core::ffi::c_void) -> alljoyn_pinglistener { @@ -3818,399 +2840,291 @@ pub unsafe fn alljoyn_pinglistener_create(callback: *const alljoyn_pinglistener_ alljoyn_pinglistener_create(core::mem::transmute(callback), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_pinglistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_pinglistener_destroy(listener: alljoyn_pinglistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_pinglistener_destroy(listener : alljoyn_pinglistener)); - alljoyn_pinglistener_destroy(listener.param().abi()) + alljoyn_pinglistener_destroy(core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_addchild(proxyobj: P0, child: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_addchild(proxyobj: alljoyn_proxybusobject, child: alljoyn_proxybusobject) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_addchild(proxyobj : alljoyn_proxybusobject, child : alljoyn_proxybusobject) -> QStatus); - alljoyn_proxybusobject_addchild(proxyobj.param().abi(), child.param().abi()) + alljoyn_proxybusobject_addchild(core::mem::transmute(proxyobj), core::mem::transmute(child)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_addinterface(proxyobj: P0, iface: P1) -> QStatus -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_addinterface(proxyobj: alljoyn_proxybusobject, iface: alljoyn_interfacedescription) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_addinterface(proxyobj : alljoyn_proxybusobject, iface : alljoyn_interfacedescription) -> QStatus); - alljoyn_proxybusobject_addinterface(proxyobj.param().abi(), iface.param().abi()) + alljoyn_proxybusobject_addinterface(core::mem::transmute(proxyobj), core::mem::transmute(iface)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_addinterface_by_name(proxyobj: P0, name: P1) -> QStatus +pub unsafe fn alljoyn_proxybusobject_addinterface_by_name(proxyobj: alljoyn_proxybusobject, name: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_addinterface_by_name(proxyobj : alljoyn_proxybusobject, name : windows_core::PCSTR) -> QStatus); - alljoyn_proxybusobject_addinterface_by_name(proxyobj.param().abi(), name.param().abi()) + alljoyn_proxybusobject_addinterface_by_name(core::mem::transmute(proxyobj), name.param().abi()) } #[inline] -pub unsafe fn alljoyn_proxybusobject_copy(source: P0) -> alljoyn_proxybusobject -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_copy(source: alljoyn_proxybusobject) -> alljoyn_proxybusobject { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_copy(source : alljoyn_proxybusobject) -> alljoyn_proxybusobject); - alljoyn_proxybusobject_copy(source.param().abi()) + alljoyn_proxybusobject_copy(core::mem::transmute(source)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_create(bus: P0, service: P1, path: P2, sessionid: u32) -> alljoyn_proxybusobject +pub unsafe fn alljoyn_proxybusobject_create(bus: alljoyn_busattachment, service: P1, path: P2, sessionid: u32) -> alljoyn_proxybusobject where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_create(bus : alljoyn_busattachment, service : windows_core::PCSTR, path : windows_core::PCSTR, sessionid : u32) -> alljoyn_proxybusobject); - alljoyn_proxybusobject_create(bus.param().abi(), service.param().abi(), path.param().abi(), core::mem::transmute(sessionid)) + alljoyn_proxybusobject_create(core::mem::transmute(bus), service.param().abi(), path.param().abi(), core::mem::transmute(sessionid)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_create_secure(bus: P0, service: P1, path: P2, sessionid: u32) -> alljoyn_proxybusobject +pub unsafe fn alljoyn_proxybusobject_create_secure(bus: alljoyn_busattachment, service: P1, path: P2, sessionid: u32) -> alljoyn_proxybusobject where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_create_secure(bus : alljoyn_busattachment, service : windows_core::PCSTR, path : windows_core::PCSTR, sessionid : u32) -> alljoyn_proxybusobject); - alljoyn_proxybusobject_create_secure(bus.param().abi(), service.param().abi(), path.param().abi(), core::mem::transmute(sessionid)) + alljoyn_proxybusobject_create_secure(core::mem::transmute(bus), service.param().abi(), path.param().abi(), core::mem::transmute(sessionid)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_destroy(proxyobj: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_destroy(proxyobj: alljoyn_proxybusobject) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_destroy(proxyobj : alljoyn_proxybusobject)); - alljoyn_proxybusobject_destroy(proxyobj.param().abi()) + alljoyn_proxybusobject_destroy(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_enablepropertycaching(proxyobj: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_enablepropertycaching(proxyobj: alljoyn_proxybusobject) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_enablepropertycaching(proxyobj : alljoyn_proxybusobject)); - alljoyn_proxybusobject_enablepropertycaching(proxyobj.param().abi()) + alljoyn_proxybusobject_enablepropertycaching(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getallproperties(proxyobj: P0, iface: P1, values: P2) -> QStatus +pub unsafe fn alljoyn_proxybusobject_getallproperties(proxyobj: alljoyn_proxybusobject, iface: P1, values: alljoyn_msgarg) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getallproperties(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR, values : alljoyn_msgarg) -> QStatus); - alljoyn_proxybusobject_getallproperties(proxyobj.param().abi(), iface.param().abi(), values.param().abi()) + alljoyn_proxybusobject_getallproperties(core::mem::transmute(proxyobj), iface.param().abi(), core::mem::transmute(values)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getallpropertiesasync(proxyobj: P0, iface: P1, callback: alljoyn_proxybusobject_listener_getallpropertiescb_ptr, timeout: u32, context: *mut core::ffi::c_void) -> QStatus +pub unsafe fn alljoyn_proxybusobject_getallpropertiesasync(proxyobj: alljoyn_proxybusobject, iface: P1, callback: alljoyn_proxybusobject_listener_getallpropertiescb_ptr, timeout: u32, context: *mut core::ffi::c_void) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getallpropertiesasync(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR, callback : alljoyn_proxybusobject_listener_getallpropertiescb_ptr, timeout : u32, context : *mut core::ffi::c_void) -> QStatus); - alljoyn_proxybusobject_getallpropertiesasync(proxyobj.param().abi(), iface.param().abi(), core::mem::transmute(callback), core::mem::transmute(timeout), core::mem::transmute(context)) + alljoyn_proxybusobject_getallpropertiesasync(core::mem::transmute(proxyobj), iface.param().abi(), core::mem::transmute(callback), core::mem::transmute(timeout), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getchild(proxyobj: P0, path: P1) -> alljoyn_proxybusobject +pub unsafe fn alljoyn_proxybusobject_getchild(proxyobj: alljoyn_proxybusobject, path: P1) -> alljoyn_proxybusobject where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getchild(proxyobj : alljoyn_proxybusobject, path : windows_core::PCSTR) -> alljoyn_proxybusobject); - alljoyn_proxybusobject_getchild(proxyobj.param().abi(), path.param().abi()) + alljoyn_proxybusobject_getchild(core::mem::transmute(proxyobj), path.param().abi()) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getchildren(proxyobj: P0, children: *mut alljoyn_proxybusobject, numchildren: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_getchildren(proxyobj: alljoyn_proxybusobject, children: *mut alljoyn_proxybusobject, numchildren: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getchildren(proxyobj : alljoyn_proxybusobject, children : *mut alljoyn_proxybusobject, numchildren : usize) -> usize); - alljoyn_proxybusobject_getchildren(proxyobj.param().abi(), core::mem::transmute(children), core::mem::transmute(numchildren)) + alljoyn_proxybusobject_getchildren(core::mem::transmute(proxyobj), core::mem::transmute(children), core::mem::transmute(numchildren)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getinterface(proxyobj: P0, iface: P1) -> alljoyn_interfacedescription +pub unsafe fn alljoyn_proxybusobject_getinterface(proxyobj: alljoyn_proxybusobject, iface: P1) -> alljoyn_interfacedescription where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getinterface(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR) -> alljoyn_interfacedescription); - alljoyn_proxybusobject_getinterface(proxyobj.param().abi(), iface.param().abi()) + alljoyn_proxybusobject_getinterface(core::mem::transmute(proxyobj), iface.param().abi()) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getinterfaces(proxyobj: P0, ifaces: *const alljoyn_interfacedescription, numifaces: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_getinterfaces(proxyobj: alljoyn_proxybusobject, ifaces: *const alljoyn_interfacedescription, numifaces: usize) -> usize { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getinterfaces(proxyobj : alljoyn_proxybusobject, ifaces : *const alljoyn_interfacedescription, numifaces : usize) -> usize); - alljoyn_proxybusobject_getinterfaces(proxyobj.param().abi(), core::mem::transmute(ifaces), core::mem::transmute(numifaces)) + alljoyn_proxybusobject_getinterfaces(core::mem::transmute(proxyobj), core::mem::transmute(ifaces), core::mem::transmute(numifaces)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getpath(proxyobj: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_getpath(proxyobj: alljoyn_proxybusobject) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getpath(proxyobj : alljoyn_proxybusobject) -> windows_core::PCSTR); - alljoyn_proxybusobject_getpath(proxyobj.param().abi()) + alljoyn_proxybusobject_getpath(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getproperty(proxyobj: P0, iface: P1, property: P2, value: P3) -> QStatus +pub unsafe fn alljoyn_proxybusobject_getproperty(proxyobj: alljoyn_proxybusobject, iface: P1, property: P2, value: alljoyn_msgarg) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getproperty(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR, property : windows_core::PCSTR, value : alljoyn_msgarg) -> QStatus); - alljoyn_proxybusobject_getproperty(proxyobj.param().abi(), iface.param().abi(), property.param().abi(), value.param().abi()) + alljoyn_proxybusobject_getproperty(core::mem::transmute(proxyobj), iface.param().abi(), property.param().abi(), core::mem::transmute(value)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getpropertyasync(proxyobj: P0, iface: P1, property: P2, callback: alljoyn_proxybusobject_listener_getpropertycb_ptr, timeout: u32, context: *mut core::ffi::c_void) -> QStatus +pub unsafe fn alljoyn_proxybusobject_getpropertyasync(proxyobj: alljoyn_proxybusobject, iface: P1, property: P2, callback: alljoyn_proxybusobject_listener_getpropertycb_ptr, timeout: u32, context: *mut core::ffi::c_void) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getpropertyasync(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR, property : windows_core::PCSTR, callback : alljoyn_proxybusobject_listener_getpropertycb_ptr, timeout : u32, context : *mut core::ffi::c_void) -> QStatus); - alljoyn_proxybusobject_getpropertyasync(proxyobj.param().abi(), iface.param().abi(), property.param().abi(), core::mem::transmute(callback), core::mem::transmute(timeout), core::mem::transmute(context)) + alljoyn_proxybusobject_getpropertyasync(core::mem::transmute(proxyobj), iface.param().abi(), property.param().abi(), core::mem::transmute(callback), core::mem::transmute(timeout), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getservicename(proxyobj: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_getservicename(proxyobj: alljoyn_proxybusobject) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getservicename(proxyobj : alljoyn_proxybusobject) -> windows_core::PCSTR); - alljoyn_proxybusobject_getservicename(proxyobj.param().abi()) + alljoyn_proxybusobject_getservicename(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getsessionid(proxyobj: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_getsessionid(proxyobj: alljoyn_proxybusobject) -> u32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getsessionid(proxyobj : alljoyn_proxybusobject) -> u32); - alljoyn_proxybusobject_getsessionid(proxyobj.param().abi()) + alljoyn_proxybusobject_getsessionid(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_getuniquename(proxyobj: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_getuniquename(proxyobj: alljoyn_proxybusobject) -> windows_core::PCSTR { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_getuniquename(proxyobj : alljoyn_proxybusobject) -> windows_core::PCSTR); - alljoyn_proxybusobject_getuniquename(proxyobj.param().abi()) + alljoyn_proxybusobject_getuniquename(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_implementsinterface(proxyobj: P0, iface: P1) -> i32 +pub unsafe fn alljoyn_proxybusobject_implementsinterface(proxyobj: alljoyn_proxybusobject, iface: P1) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_implementsinterface(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR) -> i32); - alljoyn_proxybusobject_implementsinterface(proxyobj.param().abi(), iface.param().abi()) + alljoyn_proxybusobject_implementsinterface(core::mem::transmute(proxyobj), iface.param().abi()) } #[inline] -pub unsafe fn alljoyn_proxybusobject_introspectremoteobject(proxyobj: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_introspectremoteobject(proxyobj: alljoyn_proxybusobject) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_introspectremoteobject(proxyobj : alljoyn_proxybusobject) -> QStatus); - alljoyn_proxybusobject_introspectremoteobject(proxyobj.param().abi()) + alljoyn_proxybusobject_introspectremoteobject(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_introspectremoteobjectasync(proxyobj: P0, callback: alljoyn_proxybusobject_listener_introspectcb_ptr, context: *mut core::ffi::c_void) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_introspectremoteobjectasync(proxyobj: alljoyn_proxybusobject, callback: alljoyn_proxybusobject_listener_introspectcb_ptr, context: *mut core::ffi::c_void) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_introspectremoteobjectasync(proxyobj : alljoyn_proxybusobject, callback : alljoyn_proxybusobject_listener_introspectcb_ptr, context : *mut core::ffi::c_void) -> QStatus); - alljoyn_proxybusobject_introspectremoteobjectasync(proxyobj.param().abi(), core::mem::transmute(callback), core::mem::transmute(context)) + alljoyn_proxybusobject_introspectremoteobjectasync(core::mem::transmute(proxyobj), core::mem::transmute(callback), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_issecure(proxyobj: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_issecure(proxyobj: alljoyn_proxybusobject) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_issecure(proxyobj : alljoyn_proxybusobject) -> i32); - alljoyn_proxybusobject_issecure(proxyobj.param().abi()) + alljoyn_proxybusobject_issecure(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_isvalid(proxyobj: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_isvalid(proxyobj: alljoyn_proxybusobject) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_isvalid(proxyobj : alljoyn_proxybusobject) -> i32); - alljoyn_proxybusobject_isvalid(proxyobj.param().abi()) + alljoyn_proxybusobject_isvalid(core::mem::transmute(proxyobj)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_methodcall(proxyobj: P0, ifacename: P1, methodname: P2, args: P3, numargs: usize, replymsg: P5, timeout: u32, flags: u8) -> QStatus +pub unsafe fn alljoyn_proxybusobject_methodcall(proxyobj: alljoyn_proxybusobject, ifacename: P1, methodname: P2, args: alljoyn_msgarg, numargs: usize, replymsg: alljoyn_message, timeout: u32, flags: u8) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_methodcall(proxyobj : alljoyn_proxybusobject, ifacename : windows_core::PCSTR, methodname : windows_core::PCSTR, args : alljoyn_msgarg, numargs : usize, replymsg : alljoyn_message, timeout : u32, flags : u8) -> QStatus); - alljoyn_proxybusobject_methodcall(proxyobj.param().abi(), ifacename.param().abi(), methodname.param().abi(), args.param().abi(), core::mem::transmute(numargs), replymsg.param().abi(), core::mem::transmute(timeout), core::mem::transmute(flags)) + alljoyn_proxybusobject_methodcall(core::mem::transmute(proxyobj), ifacename.param().abi(), methodname.param().abi(), core::mem::transmute(args), core::mem::transmute(numargs), core::mem::transmute(replymsg), core::mem::transmute(timeout), core::mem::transmute(flags)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_methodcall_member(proxyobj: P0, method: alljoyn_interfacedescription_member, args: P2, numargs: usize, replymsg: P4, timeout: u32, flags: u8) -> QStatus -where - P0: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_methodcall_member(proxyobj: alljoyn_proxybusobject, method: alljoyn_interfacedescription_member, args: alljoyn_msgarg, numargs: usize, replymsg: alljoyn_message, timeout: u32, flags: u8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_methodcall_member(proxyobj : alljoyn_proxybusobject, method : alljoyn_interfacedescription_member, args : alljoyn_msgarg, numargs : usize, replymsg : alljoyn_message, timeout : u32, flags : u8) -> QStatus); - alljoyn_proxybusobject_methodcall_member(proxyobj.param().abi(), core::mem::transmute(method), args.param().abi(), core::mem::transmute(numargs), replymsg.param().abi(), core::mem::transmute(timeout), core::mem::transmute(flags)) + alljoyn_proxybusobject_methodcall_member(core::mem::transmute(proxyobj), core::mem::transmute(method), core::mem::transmute(args), core::mem::transmute(numargs), core::mem::transmute(replymsg), core::mem::transmute(timeout), core::mem::transmute(flags)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_methodcall_member_noreply(proxyobj: P0, method: alljoyn_interfacedescription_member, args: P2, numargs: usize, flags: u8) -> QStatus -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_methodcall_member_noreply(proxyobj: alljoyn_proxybusobject, method: alljoyn_interfacedescription_member, args: alljoyn_msgarg, numargs: usize, flags: u8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_methodcall_member_noreply(proxyobj : alljoyn_proxybusobject, method : alljoyn_interfacedescription_member, args : alljoyn_msgarg, numargs : usize, flags : u8) -> QStatus); - alljoyn_proxybusobject_methodcall_member_noreply(proxyobj.param().abi(), core::mem::transmute(method), args.param().abi(), core::mem::transmute(numargs), core::mem::transmute(flags)) + alljoyn_proxybusobject_methodcall_member_noreply(core::mem::transmute(proxyobj), core::mem::transmute(method), core::mem::transmute(args), core::mem::transmute(numargs), core::mem::transmute(flags)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_methodcall_noreply(proxyobj: P0, ifacename: P1, methodname: P2, args: P3, numargs: usize, flags: u8) -> QStatus +pub unsafe fn alljoyn_proxybusobject_methodcall_noreply(proxyobj: alljoyn_proxybusobject, ifacename: P1, methodname: P2, args: alljoyn_msgarg, numargs: usize, flags: u8) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_methodcall_noreply(proxyobj : alljoyn_proxybusobject, ifacename : windows_core::PCSTR, methodname : windows_core::PCSTR, args : alljoyn_msgarg, numargs : usize, flags : u8) -> QStatus); - alljoyn_proxybusobject_methodcall_noreply(proxyobj.param().abi(), ifacename.param().abi(), methodname.param().abi(), args.param().abi(), core::mem::transmute(numargs), core::mem::transmute(flags)) + alljoyn_proxybusobject_methodcall_noreply(core::mem::transmute(proxyobj), ifacename.param().abi(), methodname.param().abi(), core::mem::transmute(args), core::mem::transmute(numargs), core::mem::transmute(flags)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_methodcallasync(proxyobj: P0, ifacename: P1, methodname: P2, replyfunc: alljoyn_messagereceiver_replyhandler_ptr, args: P4, numargs: usize, context: *mut core::ffi::c_void, timeout: u32, flags: u8) -> QStatus +pub unsafe fn alljoyn_proxybusobject_methodcallasync(proxyobj: alljoyn_proxybusobject, ifacename: P1, methodname: P2, replyfunc: alljoyn_messagereceiver_replyhandler_ptr, args: alljoyn_msgarg, numargs: usize, context: *mut core::ffi::c_void, timeout: u32, flags: u8) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_methodcallasync(proxyobj : alljoyn_proxybusobject, ifacename : windows_core::PCSTR, methodname : windows_core::PCSTR, replyfunc : alljoyn_messagereceiver_replyhandler_ptr, args : alljoyn_msgarg, numargs : usize, context : *mut core::ffi::c_void, timeout : u32, flags : u8) -> QStatus); - alljoyn_proxybusobject_methodcallasync(proxyobj.param().abi(), ifacename.param().abi(), methodname.param().abi(), core::mem::transmute(replyfunc), args.param().abi(), core::mem::transmute(numargs), core::mem::transmute(context), core::mem::transmute(timeout), core::mem::transmute(flags)) + alljoyn_proxybusobject_methodcallasync(core::mem::transmute(proxyobj), ifacename.param().abi(), methodname.param().abi(), core::mem::transmute(replyfunc), core::mem::transmute(args), core::mem::transmute(numargs), core::mem::transmute(context), core::mem::transmute(timeout), core::mem::transmute(flags)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_methodcallasync_member(proxyobj: P0, method: alljoyn_interfacedescription_member, replyfunc: alljoyn_messagereceiver_replyhandler_ptr, args: P3, numargs: usize, context: *mut core::ffi::c_void, timeout: u32, flags: u8) -> QStatus -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_methodcallasync_member(proxyobj: alljoyn_proxybusobject, method: alljoyn_interfacedescription_member, replyfunc: alljoyn_messagereceiver_replyhandler_ptr, args: alljoyn_msgarg, numargs: usize, context: *mut core::ffi::c_void, timeout: u32, flags: u8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_methodcallasync_member(proxyobj : alljoyn_proxybusobject, method : alljoyn_interfacedescription_member, replyfunc : alljoyn_messagereceiver_replyhandler_ptr, args : alljoyn_msgarg, numargs : usize, context : *mut core::ffi::c_void, timeout : u32, flags : u8) -> QStatus); - alljoyn_proxybusobject_methodcallasync_member(proxyobj.param().abi(), core::mem::transmute(method), core::mem::transmute(replyfunc), args.param().abi(), core::mem::transmute(numargs), core::mem::transmute(context), core::mem::transmute(timeout), core::mem::transmute(flags)) + alljoyn_proxybusobject_methodcallasync_member(core::mem::transmute(proxyobj), core::mem::transmute(method), core::mem::transmute(replyfunc), core::mem::transmute(args), core::mem::transmute(numargs), core::mem::transmute(context), core::mem::transmute(timeout), core::mem::transmute(flags)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_parsexml(proxyobj: P0, xml: P1, identifier: P2) -> QStatus +pub unsafe fn alljoyn_proxybusobject_parsexml(proxyobj: alljoyn_proxybusobject, xml: P1, identifier: P2) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_parsexml(proxyobj : alljoyn_proxybusobject, xml : windows_core::PCSTR, identifier : windows_core::PCSTR) -> QStatus); - alljoyn_proxybusobject_parsexml(proxyobj.param().abi(), xml.param().abi(), identifier.param().abi()) + alljoyn_proxybusobject_parsexml(core::mem::transmute(proxyobj), xml.param().abi(), identifier.param().abi()) } #[inline] -pub unsafe fn alljoyn_proxybusobject_ref_create(proxy: P0) -> alljoyn_proxybusobject_ref -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_ref_create(proxy: alljoyn_proxybusobject) -> alljoyn_proxybusobject_ref { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_ref_create(proxy : alljoyn_proxybusobject) -> alljoyn_proxybusobject_ref); - alljoyn_proxybusobject_ref_create(proxy.param().abi()) + alljoyn_proxybusobject_ref_create(core::mem::transmute(proxy)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_ref_decref(r#ref: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_ref_decref(r#ref: alljoyn_proxybusobject_ref) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_ref_decref(r#ref : alljoyn_proxybusobject_ref)); - alljoyn_proxybusobject_ref_decref(r#ref.param().abi()) + alljoyn_proxybusobject_ref_decref(core::mem::transmute(r#ref)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_ref_get(r#ref: P0) -> alljoyn_proxybusobject -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_ref_get(r#ref: alljoyn_proxybusobject_ref) -> alljoyn_proxybusobject { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_ref_get(r#ref : alljoyn_proxybusobject_ref) -> alljoyn_proxybusobject); - alljoyn_proxybusobject_ref_get(r#ref.param().abi()) + alljoyn_proxybusobject_ref_get(core::mem::transmute(r#ref)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_ref_incref(r#ref: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_ref_incref(r#ref: alljoyn_proxybusobject_ref) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_ref_incref(r#ref : alljoyn_proxybusobject_ref)); - alljoyn_proxybusobject_ref_incref(r#ref.param().abi()) + alljoyn_proxybusobject_ref_incref(core::mem::transmute(r#ref)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_registerpropertieschangedlistener(proxyobj: P0, iface: P1, properties: *const *const i8, numproperties: usize, callback: alljoyn_proxybusobject_listener_propertieschanged_ptr, context: *mut core::ffi::c_void) -> QStatus +pub unsafe fn alljoyn_proxybusobject_registerpropertieschangedlistener(proxyobj: alljoyn_proxybusobject, iface: P1, properties: *const *const i8, numproperties: usize, callback: alljoyn_proxybusobject_listener_propertieschanged_ptr, context: *mut core::ffi::c_void) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_registerpropertieschangedlistener(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR, properties : *const *const i8, numproperties : usize, callback : alljoyn_proxybusobject_listener_propertieschanged_ptr, context : *mut core::ffi::c_void) -> QStatus); - alljoyn_proxybusobject_registerpropertieschangedlistener(proxyobj.param().abi(), iface.param().abi(), core::mem::transmute(properties), core::mem::transmute(numproperties), core::mem::transmute(callback), core::mem::transmute(context)) + alljoyn_proxybusobject_registerpropertieschangedlistener(core::mem::transmute(proxyobj), iface.param().abi(), core::mem::transmute(properties), core::mem::transmute(numproperties), core::mem::transmute(callback), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_removechild(proxyobj: P0, path: P1) -> QStatus +pub unsafe fn alljoyn_proxybusobject_removechild(proxyobj: alljoyn_proxybusobject, path: P1) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_removechild(proxyobj : alljoyn_proxybusobject, path : windows_core::PCSTR) -> QStatus); - alljoyn_proxybusobject_removechild(proxyobj.param().abi(), path.param().abi()) + alljoyn_proxybusobject_removechild(core::mem::transmute(proxyobj), path.param().abi()) } #[inline] -pub unsafe fn alljoyn_proxybusobject_secureconnection(proxyobj: P0, forceauth: i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_secureconnection(proxyobj: alljoyn_proxybusobject, forceauth: i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_secureconnection(proxyobj : alljoyn_proxybusobject, forceauth : i32) -> QStatus); - alljoyn_proxybusobject_secureconnection(proxyobj.param().abi(), core::mem::transmute(forceauth)) + alljoyn_proxybusobject_secureconnection(core::mem::transmute(proxyobj), core::mem::transmute(forceauth)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_secureconnectionasync(proxyobj: P0, forceauth: i32) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_proxybusobject_secureconnectionasync(proxyobj: alljoyn_proxybusobject, forceauth: i32) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_secureconnectionasync(proxyobj : alljoyn_proxybusobject, forceauth : i32) -> QStatus); - alljoyn_proxybusobject_secureconnectionasync(proxyobj.param().abi(), core::mem::transmute(forceauth)) + alljoyn_proxybusobject_secureconnectionasync(core::mem::transmute(proxyobj), core::mem::transmute(forceauth)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_setproperty(proxyobj: P0, iface: P1, property: P2, value: P3) -> QStatus +pub unsafe fn alljoyn_proxybusobject_setproperty(proxyobj: alljoyn_proxybusobject, iface: P1, property: P2, value: alljoyn_msgarg) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_setproperty(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR, property : windows_core::PCSTR, value : alljoyn_msgarg) -> QStatus); - alljoyn_proxybusobject_setproperty(proxyobj.param().abi(), iface.param().abi(), property.param().abi(), value.param().abi()) + alljoyn_proxybusobject_setproperty(core::mem::transmute(proxyobj), iface.param().abi(), property.param().abi(), core::mem::transmute(value)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_setpropertyasync(proxyobj: P0, iface: P1, property: P2, value: P3, callback: alljoyn_proxybusobject_listener_setpropertycb_ptr, timeout: u32, context: *mut core::ffi::c_void) -> QStatus +pub unsafe fn alljoyn_proxybusobject_setpropertyasync(proxyobj: alljoyn_proxybusobject, iface: P1, property: P2, value: alljoyn_msgarg, callback: alljoyn_proxybusobject_listener_setpropertycb_ptr, timeout: u32, context: *mut core::ffi::c_void) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_setpropertyasync(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR, property : windows_core::PCSTR, value : alljoyn_msgarg, callback : alljoyn_proxybusobject_listener_setpropertycb_ptr, timeout : u32, context : *mut core::ffi::c_void) -> QStatus); - alljoyn_proxybusobject_setpropertyasync(proxyobj.param().abi(), iface.param().abi(), property.param().abi(), value.param().abi(), core::mem::transmute(callback), core::mem::transmute(timeout), core::mem::transmute(context)) + alljoyn_proxybusobject_setpropertyasync(core::mem::transmute(proxyobj), iface.param().abi(), property.param().abi(), core::mem::transmute(value), core::mem::transmute(callback), core::mem::transmute(timeout), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_proxybusobject_unregisterpropertieschangedlistener(proxyobj: P0, iface: P1, callback: alljoyn_proxybusobject_listener_propertieschanged_ptr) -> QStatus +pub unsafe fn alljoyn_proxybusobject_unregisterpropertieschangedlistener(proxyobj: alljoyn_proxybusobject, iface: P1, callback: alljoyn_proxybusobject_listener_propertieschanged_ptr) -> QStatus where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msajapi.dll" "system" fn alljoyn_proxybusobject_unregisterpropertieschangedlistener(proxyobj : alljoyn_proxybusobject, iface : windows_core::PCSTR, callback : alljoyn_proxybusobject_listener_propertieschanged_ptr) -> QStatus); - alljoyn_proxybusobject_unregisterpropertieschangedlistener(proxyobj.param().abi(), iface.param().abi(), core::mem::transmute(callback)) + alljoyn_proxybusobject_unregisterpropertieschangedlistener(core::mem::transmute(proxyobj), iface.param().abi(), core::mem::transmute(callback)) } #[inline] pub unsafe fn alljoyn_routerinit() -> QStatus { @@ -4228,12 +3142,9 @@ pub unsafe fn alljoyn_routershutdown() -> QStatus { alljoyn_routershutdown() } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_claim(proxy: P0, cakey: *mut i8, identitycertificatechain: *mut i8, groupid: *const u8, groupsize: usize, groupauthority: *mut i8, manifestsxmls: *mut *mut i8, manifestscount: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_claim(proxy: alljoyn_securityapplicationproxy, cakey: *mut i8, identitycertificatechain: *mut i8, groupid: *const u8, groupsize: usize, groupauthority: *mut i8, manifestsxmls: *mut *mut i8, manifestscount: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_claim(proxy : alljoyn_securityapplicationproxy, cakey : *mut i8, identitycertificatechain : *mut i8, groupid : *const u8, groupsize : usize, groupauthority : *mut i8, manifestsxmls : *mut *mut i8, manifestscount : usize) -> QStatus); - alljoyn_securityapplicationproxy_claim(proxy.param().abi(), core::mem::transmute(cakey), core::mem::transmute(identitycertificatechain), core::mem::transmute(groupid), core::mem::transmute(groupsize), core::mem::transmute(groupauthority), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount)) + alljoyn_securityapplicationproxy_claim(core::mem::transmute(proxy), core::mem::transmute(cakey), core::mem::transmute(identitycertificatechain), core::mem::transmute(groupid), core::mem::transmute(groupsize), core::mem::transmute(groupauthority), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount)) } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_computemanifestdigest(unsignedmanifestxml: *mut i8, identitycertificatepem: *mut i8, digest: *mut *mut u8, digestsize: *mut usize) -> QStatus { @@ -4241,20 +3152,14 @@ pub unsafe fn alljoyn_securityapplicationproxy_computemanifestdigest(unsignedman alljoyn_securityapplicationproxy_computemanifestdigest(core::mem::transmute(unsignedmanifestxml), core::mem::transmute(identitycertificatepem), core::mem::transmute(digest), core::mem::transmute(digestsize)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_create(bus: P0, appbusname: *mut i8, sessionid: u32) -> alljoyn_securityapplicationproxy -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_create(bus: alljoyn_busattachment, appbusname: *mut i8, sessionid: u32) -> alljoyn_securityapplicationproxy { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_create(bus : alljoyn_busattachment, appbusname : *mut i8, sessionid : u32) -> alljoyn_securityapplicationproxy); - alljoyn_securityapplicationproxy_create(bus.param().abi(), core::mem::transmute(appbusname), core::mem::transmute(sessionid)) + alljoyn_securityapplicationproxy_create(core::mem::transmute(bus), core::mem::transmute(appbusname), core::mem::transmute(sessionid)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_destroy(proxy: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_destroy(proxy: alljoyn_securityapplicationproxy) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_destroy(proxy : alljoyn_securityapplicationproxy)); - alljoyn_securityapplicationproxy_destroy(proxy.param().abi()) + alljoyn_securityapplicationproxy_destroy(core::mem::transmute(proxy)) } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_digest_destroy(digest: *mut u8) { @@ -4267,60 +3172,39 @@ pub unsafe fn alljoyn_securityapplicationproxy_eccpublickey_destroy(eccpublickey alljoyn_securityapplicationproxy_eccpublickey_destroy(core::mem::transmute(eccpublickey)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_endmanagement(proxy: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_endmanagement(proxy: alljoyn_securityapplicationproxy) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_endmanagement(proxy : alljoyn_securityapplicationproxy) -> QStatus); - alljoyn_securityapplicationproxy_endmanagement(proxy.param().abi()) + alljoyn_securityapplicationproxy_endmanagement(core::mem::transmute(proxy)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_getapplicationstate(proxy: P0, applicationstate: *mut alljoyn_applicationstate) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_getapplicationstate(proxy: alljoyn_securityapplicationproxy, applicationstate: *mut alljoyn_applicationstate) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_getapplicationstate(proxy : alljoyn_securityapplicationproxy, applicationstate : *mut alljoyn_applicationstate) -> QStatus); - alljoyn_securityapplicationproxy_getapplicationstate(proxy.param().abi(), core::mem::transmute(applicationstate)) + alljoyn_securityapplicationproxy_getapplicationstate(core::mem::transmute(proxy), core::mem::transmute(applicationstate)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_getclaimcapabilities(proxy: P0, capabilities: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_getclaimcapabilities(proxy: alljoyn_securityapplicationproxy, capabilities: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_getclaimcapabilities(proxy : alljoyn_securityapplicationproxy, capabilities : *mut u16) -> QStatus); - alljoyn_securityapplicationproxy_getclaimcapabilities(proxy.param().abi(), core::mem::transmute(capabilities)) + alljoyn_securityapplicationproxy_getclaimcapabilities(core::mem::transmute(proxy), core::mem::transmute(capabilities)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_getclaimcapabilitiesadditionalinfo(proxy: P0, additionalinfo: *mut u16) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_getclaimcapabilitiesadditionalinfo(proxy: alljoyn_securityapplicationproxy, additionalinfo: *mut u16) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_getclaimcapabilitiesadditionalinfo(proxy : alljoyn_securityapplicationproxy, additionalinfo : *mut u16) -> QStatus); - alljoyn_securityapplicationproxy_getclaimcapabilitiesadditionalinfo(proxy.param().abi(), core::mem::transmute(additionalinfo)) + alljoyn_securityapplicationproxy_getclaimcapabilitiesadditionalinfo(core::mem::transmute(proxy), core::mem::transmute(additionalinfo)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_getdefaultpolicy(proxy: P0, policyxml: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_getdefaultpolicy(proxy: alljoyn_securityapplicationproxy, policyxml: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_getdefaultpolicy(proxy : alljoyn_securityapplicationproxy, policyxml : *mut *mut i8) -> QStatus); - alljoyn_securityapplicationproxy_getdefaultpolicy(proxy.param().abi(), core::mem::transmute(policyxml)) + alljoyn_securityapplicationproxy_getdefaultpolicy(core::mem::transmute(proxy), core::mem::transmute(policyxml)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_geteccpublickey(proxy: P0, eccpublickey: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_geteccpublickey(proxy: alljoyn_securityapplicationproxy, eccpublickey: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_geteccpublickey(proxy : alljoyn_securityapplicationproxy, eccpublickey : *mut *mut i8) -> QStatus); - alljoyn_securityapplicationproxy_geteccpublickey(proxy.param().abi(), core::mem::transmute(eccpublickey)) + alljoyn_securityapplicationproxy_geteccpublickey(core::mem::transmute(proxy), core::mem::transmute(eccpublickey)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_getmanifesttemplate(proxy: P0, manifesttemplatexml: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_getmanifesttemplate(proxy: alljoyn_securityapplicationproxy, manifesttemplatexml: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_getmanifesttemplate(proxy : alljoyn_securityapplicationproxy, manifesttemplatexml : *mut *mut i8) -> QStatus); - alljoyn_securityapplicationproxy_getmanifesttemplate(proxy.param().abi(), core::mem::transmute(manifesttemplatexml)) + alljoyn_securityapplicationproxy_getmanifesttemplate(core::mem::transmute(proxy), core::mem::transmute(manifesttemplatexml)) } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_getpermissionmanagementsessionport() -> u16 { @@ -4328,20 +3212,14 @@ pub unsafe fn alljoyn_securityapplicationproxy_getpermissionmanagementsessionpor alljoyn_securityapplicationproxy_getpermissionmanagementsessionport() } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_getpolicy(proxy: P0, policyxml: *mut *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_getpolicy(proxy: alljoyn_securityapplicationproxy, policyxml: *mut *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_getpolicy(proxy : alljoyn_securityapplicationproxy, policyxml : *mut *mut i8) -> QStatus); - alljoyn_securityapplicationproxy_getpolicy(proxy.param().abi(), core::mem::transmute(policyxml)) + alljoyn_securityapplicationproxy_getpolicy(core::mem::transmute(proxy), core::mem::transmute(policyxml)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_installmembership(proxy: P0, membershipcertificatechain: *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_installmembership(proxy: alljoyn_securityapplicationproxy, membershipcertificatechain: *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_installmembership(proxy : alljoyn_securityapplicationproxy, membershipcertificatechain : *mut i8) -> QStatus); - alljoyn_securityapplicationproxy_installmembership(proxy.param().abi(), core::mem::transmute(membershipcertificatechain)) + alljoyn_securityapplicationproxy_installmembership(core::mem::transmute(proxy), core::mem::transmute(membershipcertificatechain)) } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_manifest_destroy(signedmanifestxml: *mut i8) { @@ -4359,20 +3237,14 @@ pub unsafe fn alljoyn_securityapplicationproxy_policy_destroy(policyxml: *mut i8 alljoyn_securityapplicationproxy_policy_destroy(core::mem::transmute(policyxml)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_reset(proxy: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_reset(proxy: alljoyn_securityapplicationproxy) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_reset(proxy : alljoyn_securityapplicationproxy) -> QStatus); - alljoyn_securityapplicationproxy_reset(proxy.param().abi()) + alljoyn_securityapplicationproxy_reset(core::mem::transmute(proxy)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_resetpolicy(proxy: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_resetpolicy(proxy: alljoyn_securityapplicationproxy) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_resetpolicy(proxy : alljoyn_securityapplicationproxy) -> QStatus); - alljoyn_securityapplicationproxy_resetpolicy(proxy.param().abi()) + alljoyn_securityapplicationproxy_resetpolicy(core::mem::transmute(proxy)) } #[inline] pub unsafe fn alljoyn_securityapplicationproxy_setmanifestsignature(unsignedmanifestxml: *mut i8, identitycertificatepem: *mut i8, signature: *const u8, signaturesize: usize, signedmanifestxml: *mut *mut i8) -> QStatus { @@ -4385,28 +3257,19 @@ pub unsafe fn alljoyn_securityapplicationproxy_signmanifest(unsignedmanifestxml: alljoyn_securityapplicationproxy_signmanifest(core::mem::transmute(unsignedmanifestxml), core::mem::transmute(identitycertificatepem), core::mem::transmute(signingprivatekeypem), core::mem::transmute(signedmanifestxml)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_startmanagement(proxy: P0) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_startmanagement(proxy: alljoyn_securityapplicationproxy) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_startmanagement(proxy : alljoyn_securityapplicationproxy) -> QStatus); - alljoyn_securityapplicationproxy_startmanagement(proxy.param().abi()) + alljoyn_securityapplicationproxy_startmanagement(core::mem::transmute(proxy)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_updateidentity(proxy: P0, identitycertificatechain: *mut i8, manifestsxmls: *mut *mut i8, manifestscount: usize) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_updateidentity(proxy: alljoyn_securityapplicationproxy, identitycertificatechain: *mut i8, manifestsxmls: *mut *mut i8, manifestscount: usize) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_updateidentity(proxy : alljoyn_securityapplicationproxy, identitycertificatechain : *mut i8, manifestsxmls : *mut *mut i8, manifestscount : usize) -> QStatus); - alljoyn_securityapplicationproxy_updateidentity(proxy.param().abi(), core::mem::transmute(identitycertificatechain), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount)) + alljoyn_securityapplicationproxy_updateidentity(core::mem::transmute(proxy), core::mem::transmute(identitycertificatechain), core::mem::transmute(manifestsxmls), core::mem::transmute(manifestscount)) } #[inline] -pub unsafe fn alljoyn_securityapplicationproxy_updatepolicy(proxy: P0, policyxml: *mut i8) -> QStatus -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_securityapplicationproxy_updatepolicy(proxy: alljoyn_securityapplicationproxy, policyxml: *mut i8) -> QStatus { windows_targets::link!("msajapi.dll" "system" fn alljoyn_securityapplicationproxy_updatepolicy(proxy : alljoyn_securityapplicationproxy, policyxml : *mut i8) -> QStatus); - alljoyn_securityapplicationproxy_updatepolicy(proxy.param().abi(), core::mem::transmute(policyxml)) + alljoyn_securityapplicationproxy_updatepolicy(core::mem::transmute(proxy), core::mem::transmute(policyxml)) } #[inline] pub unsafe fn alljoyn_sessionlistener_create(callbacks: *const alljoyn_sessionlistener_callbacks, context: *const core::ffi::c_void) -> alljoyn_sessionlistener { @@ -4414,21 +3277,14 @@ pub unsafe fn alljoyn_sessionlistener_create(callbacks: *const alljoyn_sessionli alljoyn_sessionlistener_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_sessionlistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionlistener_destroy(listener: alljoyn_sessionlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionlistener_destroy(listener : alljoyn_sessionlistener)); - alljoyn_sessionlistener_destroy(listener.param().abi()) + alljoyn_sessionlistener_destroy(core::mem::transmute(listener)) } #[inline] -pub unsafe fn alljoyn_sessionopts_cmp(one: P0, other: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_cmp(one: alljoyn_sessionopts, other: alljoyn_sessionopts) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_cmp(one : alljoyn_sessionopts, other : alljoyn_sessionopts) -> i32); - alljoyn_sessionopts_cmp(one.param().abi(), other.param().abi()) + alljoyn_sessionopts_cmp(core::mem::transmute(one), core::mem::transmute(other)) } #[inline] pub unsafe fn alljoyn_sessionopts_create(traffic: u8, ismultipoint: i32, proximity: u8, transports: u16) -> alljoyn_sessionopts { @@ -4436,85 +3292,54 @@ pub unsafe fn alljoyn_sessionopts_create(traffic: u8, ismultipoint: i32, proximi alljoyn_sessionopts_create(core::mem::transmute(traffic), core::mem::transmute(ismultipoint), core::mem::transmute(proximity), core::mem::transmute(transports)) } #[inline] -pub unsafe fn alljoyn_sessionopts_destroy(opts: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_destroy(opts: alljoyn_sessionopts) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_destroy(opts : alljoyn_sessionopts)); - alljoyn_sessionopts_destroy(opts.param().abi()) + alljoyn_sessionopts_destroy(core::mem::transmute(opts)) } #[inline] -pub unsafe fn alljoyn_sessionopts_get_multipoint(opts: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_get_multipoint(opts: alljoyn_sessionopts) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_get_multipoint(opts : alljoyn_sessionopts) -> i32); - alljoyn_sessionopts_get_multipoint(opts.param().abi()) + alljoyn_sessionopts_get_multipoint(core::mem::transmute(opts)) } #[inline] -pub unsafe fn alljoyn_sessionopts_get_proximity(opts: P0) -> u8 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_get_proximity(opts: alljoyn_sessionopts) -> u8 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_get_proximity(opts : alljoyn_sessionopts) -> u8); - alljoyn_sessionopts_get_proximity(opts.param().abi()) + alljoyn_sessionopts_get_proximity(core::mem::transmute(opts)) } #[inline] -pub unsafe fn alljoyn_sessionopts_get_traffic(opts: P0) -> u8 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_get_traffic(opts: alljoyn_sessionopts) -> u8 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_get_traffic(opts : alljoyn_sessionopts) -> u8); - alljoyn_sessionopts_get_traffic(opts.param().abi()) + alljoyn_sessionopts_get_traffic(core::mem::transmute(opts)) } #[inline] -pub unsafe fn alljoyn_sessionopts_get_transports(opts: P0) -> u16 -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_get_transports(opts: alljoyn_sessionopts) -> u16 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_get_transports(opts : alljoyn_sessionopts) -> u16); - alljoyn_sessionopts_get_transports(opts.param().abi()) + alljoyn_sessionopts_get_transports(core::mem::transmute(opts)) } #[inline] -pub unsafe fn alljoyn_sessionopts_iscompatible(one: P0, other: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_iscompatible(one: alljoyn_sessionopts, other: alljoyn_sessionopts) -> i32 { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_iscompatible(one : alljoyn_sessionopts, other : alljoyn_sessionopts) -> i32); - alljoyn_sessionopts_iscompatible(one.param().abi(), other.param().abi()) + alljoyn_sessionopts_iscompatible(core::mem::transmute(one), core::mem::transmute(other)) } #[inline] -pub unsafe fn alljoyn_sessionopts_set_multipoint(opts: P0, ismultipoint: i32) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_set_multipoint(opts: alljoyn_sessionopts, ismultipoint: i32) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_set_multipoint(opts : alljoyn_sessionopts, ismultipoint : i32)); - alljoyn_sessionopts_set_multipoint(opts.param().abi(), core::mem::transmute(ismultipoint)) + alljoyn_sessionopts_set_multipoint(core::mem::transmute(opts), core::mem::transmute(ismultipoint)) } #[inline] -pub unsafe fn alljoyn_sessionopts_set_proximity(opts: P0, proximity: u8) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_set_proximity(opts: alljoyn_sessionopts, proximity: u8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_set_proximity(opts : alljoyn_sessionopts, proximity : u8)); - alljoyn_sessionopts_set_proximity(opts.param().abi(), core::mem::transmute(proximity)) + alljoyn_sessionopts_set_proximity(core::mem::transmute(opts), core::mem::transmute(proximity)) } #[inline] -pub unsafe fn alljoyn_sessionopts_set_traffic(opts: P0, traffic: u8) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_set_traffic(opts: alljoyn_sessionopts, traffic: u8) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_set_traffic(opts : alljoyn_sessionopts, traffic : u8)); - alljoyn_sessionopts_set_traffic(opts.param().abi(), core::mem::transmute(traffic)) + alljoyn_sessionopts_set_traffic(core::mem::transmute(opts), core::mem::transmute(traffic)) } #[inline] -pub unsafe fn alljoyn_sessionopts_set_transports(opts: P0, transports: u16) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionopts_set_transports(opts: alljoyn_sessionopts, transports: u16) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionopts_set_transports(opts : alljoyn_sessionopts, transports : u16)); - alljoyn_sessionopts_set_transports(opts.param().abi(), core::mem::transmute(transports)) + alljoyn_sessionopts_set_transports(core::mem::transmute(opts), core::mem::transmute(transports)) } #[inline] pub unsafe fn alljoyn_sessionportlistener_create(callbacks: *const alljoyn_sessionportlistener_callbacks, context: *const core::ffi::c_void) -> alljoyn_sessionportlistener { @@ -4522,12 +3347,9 @@ pub unsafe fn alljoyn_sessionportlistener_create(callbacks: *const alljoyn_sessi alljoyn_sessionportlistener_create(core::mem::transmute(callbacks), core::mem::transmute(context)) } #[inline] -pub unsafe fn alljoyn_sessionportlistener_destroy(listener: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn alljoyn_sessionportlistener_destroy(listener: alljoyn_sessionportlistener) { windows_targets::link!("msajapi.dll" "system" fn alljoyn_sessionportlistener_destroy(listener : alljoyn_sessionportlistener)); - alljoyn_sessionportlistener_destroy(listener.param().abi()) + alljoyn_sessionportlistener_destroy(core::mem::transmute(listener)) } #[inline] pub unsafe fn alljoyn_shutdown() -> QStatus { 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 f77cf93d84..1dc661ccd1 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs @@ -24,18 +24,16 @@ pub unsafe fn WinBioAsyncMonitorFrameworkChanges(frameworkhandle: u32, changetyp WinBioAsyncMonitorFrameworkChanges(core::mem::transmute(frameworkhandle), core::mem::transmute(changetypes)).ok() } #[inline] -pub unsafe fn WinBioAsyncOpenFramework(notificationmethod: WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow: P1, messagecode: u32, callbackroutine: PWINBIO_ASYNC_COMPLETION_CALLBACK, userdata: Option<*const core::ffi::c_void>, asynchronousopen: P5, frameworkhandle: Option<*mut u32>) -> windows_core::Result<()> +pub unsafe fn WinBioAsyncOpenFramework(notificationmethod: WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow: Option, messagecode: Option, callbackroutine: Option, userdata: Option<*const core::ffi::c_void>, asynchronousopen: P5, frameworkhandle: Option<*mut u32>) -> windows_core::Result<()> where - P1: windows_core::Param, P5: 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(core::mem::transmute(notificationmethod), targetwindow.param().abi(), core::mem::transmute(messagecode), core::mem::transmute(callbackroutine), core::mem::transmute(userdata.unwrap_or(core::ptr::null())), asynchronousopen.param().abi(), core::mem::transmute(frameworkhandle.unwrap_or(core::ptr::null_mut()))).ok() + WinBioAsyncOpenFramework(core::mem::transmute(notificationmethod), core::mem::transmute(targetwindow.unwrap_or(core::mem::zeroed())), core::mem::transmute(messagecode.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed())), asynchronousopen.param().abi(), core::mem::transmute(frameworkhandle.unwrap_or(core::mem::zeroed()))).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: P7, messagecode: u32, callbackroutine: PWINBIO_ASYNC_COMPLETION_CALLBACK, userdata: Option<*const core::ffi::c_void>, asynchronousopen: P11, sessionhandle: Option<*mut u32>) -> windows_core::Result<()> +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: Option, messagecode: Option, callbackroutine: Option, userdata: Option<*const core::ffi::c_void>, asynchronousopen: P11, sessionhandle: Option<*mut u32>) -> windows_core::Result<()> where - P7: windows_core::Param, P11: windows_core::Param, { windows_targets::link!("winbio.dll" "system" fn WinBioAsyncOpenSession(factor : u32, pooltype : WINBIO_POOL, flags : u32, unitarray : *const u32, unitcount : usize, databaseid : *const windows_core::GUID, 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, sessionhandle : *mut u32) -> windows_core::HRESULT); @@ -45,14 +43,14 @@ where core::mem::transmute(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())), + core::mem::transmute(databaseid.unwrap_or(core::mem::zeroed())), core::mem::transmute(notificationmethod), - targetwindow.param().abi(), - core::mem::transmute(messagecode), - core::mem::transmute(callbackroutine), - core::mem::transmute(userdata.unwrap_or(core::ptr::null())), + core::mem::transmute(targetwindow.unwrap_or(core::mem::zeroed())), + core::mem::transmute(messagecode.unwrap_or(core::mem::zeroed())), + core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(userdata.unwrap_or(core::mem::zeroed())), asynchronousopen.param().abi(), - core::mem::transmute(sessionhandle.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(sessionhandle.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -64,12 +62,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(core::mem::transmute(sessionhandle), core::mem::transmute(purpose), core::mem::transmute(flags), core::mem::transmute(unitid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sample), core::mem::transmute(samplesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rejectdetail.unwrap_or(core::ptr::null_mut()))).ok() + WinBioCaptureSample(core::mem::transmute(sessionhandle), core::mem::transmute(purpose), core::mem::transmute(flags), core::mem::transmute(unitid.unwrap_or(core::mem::zeroed())), core::mem::transmute(sample), core::mem::transmute(samplesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(rejectdetail.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(sessionhandle), core::mem::transmute(purpose), core::mem::transmute(flags), core::mem::transmute(capturecallback), core::mem::transmute(capturecallbackcontext.unwrap_or(core::ptr::null()))).ok() + WinBioCaptureSampleWithCallback(core::mem::transmute(sessionhandle), core::mem::transmute(purpose), core::mem::transmute(flags), core::mem::transmute(capturecallback), core::mem::transmute(capturecallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WinBioCloseFramework(frameworkhandle: u32) -> windows_core::Result<()> { @@ -84,12 +82,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(core::mem::transmute(sessionhandle), core::mem::transmute(unitid), core::mem::transmute(component), core::mem::transmute(controlcode), core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), core::mem::transmute(receivedatasize), core::mem::transmute(operationstatus.unwrap_or(core::ptr::null_mut()))).ok() + WinBioControlUnit(core::mem::transmute(sessionhandle), core::mem::transmute(unitid), core::mem::transmute(component), core::mem::transmute(controlcode), core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), core::mem::transmute(receivedatasize), core::mem::transmute(operationstatus.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(sessionhandle), core::mem::transmute(unitid), core::mem::transmute(component), core::mem::transmute(controlcode), core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), core::mem::transmute(receivedatasize), core::mem::transmute(operationstatus.unwrap_or(core::ptr::null_mut()))).ok() + WinBioControlUnitPrivileged(core::mem::transmute(sessionhandle), core::mem::transmute(unitid), core::mem::transmute(component), core::mem::transmute(controlcode), core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), core::mem::transmute(receivedatasize), core::mem::transmute(operationstatus.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WinBioDeleteTemplate(sessionhandle: u32, unitid: u32, identity: *const WINBIO_IDENTITY, subfactor: u8) -> windows_core::Result<()> { @@ -104,17 +102,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(core::mem::transmute(sessionhandle), core::mem::transmute(rejectdetail.unwrap_or(core::ptr::null_mut()))).ok() + WinBioEnrollCapture(core::mem::transmute(sessionhandle), core::mem::transmute(rejectdetail.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(sessionhandle), core::mem::transmute(enrollcallback), core::mem::transmute(enrollcallbackcontext.unwrap_or(core::ptr::null()))).ok() + WinBioEnrollCaptureWithCallback(core::mem::transmute(sessionhandle), core::mem::transmute(enrollcallback), core::mem::transmute(enrollcallbackcontext.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(sessionhandle), core::mem::transmute(identity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(isnewtemplate.unwrap_or(core::ptr::null_mut()))).ok() + WinBioEnrollCommit(core::mem::transmute(sessionhandle), core::mem::transmute(identity.unwrap_or(core::mem::zeroed())), core::mem::transmute(isnewtemplate.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WinBioEnrollDiscard(sessionhandle: u32) -> windows_core::Result<()> { @@ -139,7 +137,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(core::mem::transmute(sessionhandle), core::mem::transmute(unitid), core::mem::transmute(identity), core::mem::transmute(subfactorarray), core::mem::transmute(subfactorcount.unwrap_or(core::ptr::null_mut()))).ok() + WinBioEnumEnrollments(core::mem::transmute(sessionhandle), core::mem::transmute(unitid), core::mem::transmute(identity), core::mem::transmute(subfactorarray), core::mem::transmute(subfactorcount.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WinBioEnumServiceProviders(factor: u32, bspschemaarray: *mut *mut WINBIO_BSP_SCHEMA, bspcount: *mut usize) -> windows_core::Result<()> { @@ -179,19 +177,19 @@ pub unsafe fn WinBioGetLogonSetting(value: *mut u8, source: *mut WINBIO_SETTING_ WinBioGetLogonSetting(core::mem::transmute(value), core::mem::transmute(source)) } #[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<()> { +pub unsafe fn WinBioGetProperty(sessionhandle: u32, propertytype: u32, propertyid: u32, unitid: Option, identity: Option<*const WINBIO_IDENTITY>, subfactor: Option, 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(core::mem::transmute(sessionhandle), core::mem::transmute(propertytype), core::mem::transmute(propertyid), core::mem::transmute(unitid), core::mem::transmute(identity.unwrap_or(core::ptr::null())), core::mem::transmute(subfactor), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersize.unwrap_or(core::ptr::null_mut()))).ok() + WinBioGetProperty(core::mem::transmute(sessionhandle), core::mem::transmute(propertytype), core::mem::transmute(propertyid), core::mem::transmute(unitid.unwrap_or(core::mem::zeroed())), core::mem::transmute(identity.unwrap_or(core::mem::zeroed())), core::mem::transmute(subfactor.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersize.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + WinBioIdentify(core::mem::transmute(sessionhandle), core::mem::transmute(unitid.unwrap_or(core::mem::zeroed())), core::mem::transmute(identity.unwrap_or(core::mem::zeroed())), core::mem::transmute(subfactor.unwrap_or(core::mem::zeroed())), core::mem::transmute(rejectdetail.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(sessionhandle), core::mem::transmute(identifycallback), core::mem::transmute(identifycallbackcontext.unwrap_or(core::ptr::null()))).ok() + WinBioIdentifyWithCallback(core::mem::transmute(sessionhandle), core::mem::transmute(identifycallback), core::mem::transmute(identifycallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WinBioImproveBegin(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -206,12 +204,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(core::mem::transmute(sessionhandle), core::mem::transmute(unitid.unwrap_or(core::ptr::null_mut()))).ok() + WinBioLocateSensor(core::mem::transmute(sessionhandle), core::mem::transmute(unitid.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(sessionhandle), core::mem::transmute(locatecallback), core::mem::transmute(locatecallbackcontext.unwrap_or(core::ptr::null()))).ok() + WinBioLocateSensorWithCallback(core::mem::transmute(sessionhandle), core::mem::transmute(locatecallback), core::mem::transmute(locatecallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WinBioLockUnit(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -232,12 +230,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(core::mem::transmute(factor), core::mem::transmute(pooltype), core::mem::transmute(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(|| core::mem::transmute(result__)) + WinBioOpenSession(core::mem::transmute(factor), core::mem::transmute(pooltype), core::mem::transmute(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::mem::zeroed())), &mut result__).map(|| core::mem::transmute(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(core::mem::transmute(sessionhandle), core::mem::transmute(eventmask), core::mem::transmute(eventcallback), core::mem::transmute(eventcallbackcontext.unwrap_or(core::ptr::null()))).ok() + WinBioRegisterEventMonitor(core::mem::transmute(sessionhandle), core::mem::transmute(eventmask), core::mem::transmute(eventcallback), core::mem::transmute(eventcallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WinBioReleaseFocus() -> windows_core::Result<()> { @@ -265,9 +263,9 @@ pub unsafe fn WinBioSetCredential(r#type: WINBIO_CREDENTIAL_TYPE, credential: &[ WinBioSetCredential(core::mem::transmute(r#type), core::mem::transmute(credential.as_ptr()), credential.len().try_into().unwrap(), core::mem::transmute(format)).ok() } #[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<()> { +pub unsafe fn WinBioSetProperty(sessionhandle: u32, propertytype: u32, propertyid: u32, unitid: Option, identity: Option<*const WINBIO_IDENTITY>, subfactor: Option, 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(core::mem::transmute(sessionhandle), core::mem::transmute(propertytype), core::mem::transmute(propertyid), core::mem::transmute(unitid), core::mem::transmute(identity.unwrap_or(core::ptr::null())), core::mem::transmute(subfactor), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersize)).ok() + WinBioSetProperty(core::mem::transmute(sessionhandle), core::mem::transmute(propertytype), core::mem::transmute(propertyid), core::mem::transmute(unitid.unwrap_or(core::mem::zeroed())), core::mem::transmute(identity.unwrap_or(core::mem::zeroed())), core::mem::transmute(subfactor.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersize)).ok() } #[inline] pub unsafe fn WinBioUnlockUnit(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -282,12 +280,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(core::mem::transmute(sessionhandle), core::mem::transmute(identity), core::mem::transmute(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() + WinBioVerify(core::mem::transmute(sessionhandle), core::mem::transmute(identity), core::mem::transmute(subfactor), core::mem::transmute(unitid.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#match.unwrap_or(core::mem::zeroed())), core::mem::transmute(rejectdetail.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(sessionhandle), core::mem::transmute(identity), core::mem::transmute(subfactor), core::mem::transmute(verifycallback), core::mem::transmute(verifycallbackcontext.unwrap_or(core::ptr::null()))).ok() + WinBioVerifyWithCallback(core::mem::transmute(sessionhandle), core::mem::transmute(identity), core::mem::transmute(subfactor), core::mem::transmute(verifycallback), core::mem::transmute(verifycallbackcontext.unwrap_or(core::mem::zeroed()))).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 c4be44f991..0e5630da99 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs @@ -1,71 +1,48 @@ #[inline] -pub unsafe fn BluetoothAuthenticateDevice(hwndparent: P0, hradio: P1, pbtbi: *mut BLUETOOTH_DEVICE_INFO, pszpasskey: Option<&[u16]>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn BluetoothAuthenticateDevice(hwndparent: Option, hradio: Option, pbtbi: *mut BLUETOOTH_DEVICE_INFO, pszpasskey: Option<&[u16]>) -> u32 { windows_targets::link!("bthprops.cpl" "system" fn BluetoothAuthenticateDevice(hwndparent : super::super::Foundation:: HWND, hradio : super::super::Foundation:: HANDLE, pbtbi : *mut BLUETOOTH_DEVICE_INFO, pszpasskey : windows_core::PCWSTR, ulpasskeylength : u32) -> u32); - BluetoothAuthenticateDevice(hwndparent.param().abi(), hradio.param().abi(), core::mem::transmute(pbtbi), core::mem::transmute(pszpasskey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszpasskey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + BluetoothAuthenticateDevice(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtbi), core::mem::transmute(pszpasskey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszpasskey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn BluetoothAuthenticateDeviceEx(hwndparentin: P0, hradioin: P1, pbtdiinout: *mut BLUETOOTH_DEVICE_INFO, pbtoobdata: Option<*const BLUETOOTH_OOB_DATA_INFO>, authenticationrequirement: AUTHENTICATION_REQUIREMENTS) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn BluetoothAuthenticateDeviceEx(hwndparentin: Option, hradioin: Option, pbtdiinout: *mut BLUETOOTH_DEVICE_INFO, pbtoobdata: Option<*const BLUETOOTH_OOB_DATA_INFO>, authenticationrequirement: AUTHENTICATION_REQUIREMENTS) -> u32 { 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(), core::mem::transmute(pbtdiinout), core::mem::transmute(pbtoobdata.unwrap_or(core::ptr::null())), core::mem::transmute(authenticationrequirement)) + BluetoothAuthenticateDeviceEx(core::mem::transmute(hwndparentin.unwrap_or(core::mem::zeroed())), core::mem::transmute(hradioin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtdiinout), core::mem::transmute(pbtoobdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(authenticationrequirement)) } #[inline] -pub unsafe fn BluetoothAuthenticateMultipleDevices(hwndparent: P0, hradio: P1, rgbtdi: &mut [BLUETOOTH_DEVICE_INFO]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn BluetoothAuthenticateMultipleDevices(hwndparent: Option, hradio: Option, rgbtdi: &mut [BLUETOOTH_DEVICE_INFO]) -> u32 { windows_targets::link!("bthprops.cpl" "system" fn BluetoothAuthenticateMultipleDevices(hwndparent : super::super::Foundation:: HWND, hradio : super::super::Foundation:: HANDLE, cdevices : u32, rgbtdi : *mut BLUETOOTH_DEVICE_INFO) -> u32); - BluetoothAuthenticateMultipleDevices(hwndparent.param().abi(), hradio.param().abi(), rgbtdi.len().try_into().unwrap(), core::mem::transmute(rgbtdi.as_ptr())) + BluetoothAuthenticateMultipleDevices(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), rgbtdi.len().try_into().unwrap(), core::mem::transmute(rgbtdi.as_ptr())) } #[inline] -pub unsafe fn BluetoothDisplayDeviceProperties(hwndparent: P0, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothDisplayDeviceProperties(hwndparent: Option, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> windows_core::Result<()> { windows_targets::link!("bthprops.cpl" "system" fn BluetoothDisplayDeviceProperties(hwndparent : super::super::Foundation:: HWND, pbtdi : *mut BLUETOOTH_DEVICE_INFO) -> super::super::Foundation:: BOOL); - BluetoothDisplayDeviceProperties(hwndparent.param().abi(), core::mem::transmute(pbtdi)).ok() + BluetoothDisplayDeviceProperties(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtdi)).ok() } #[inline] -pub unsafe fn BluetoothEnableDiscovery(hradio: P0, fenabled: P1) -> super::super::Foundation::BOOL +pub unsafe fn BluetoothEnableDiscovery(hradio: Option, fenabled: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothEnableDiscovery(hradio : super::super::Foundation:: HANDLE, fenabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - BluetoothEnableDiscovery(hradio.param().abi(), fenabled.param().abi()) + BluetoothEnableDiscovery(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), fenabled.param().abi()) } #[inline] -pub unsafe fn BluetoothEnableIncomingConnections(hradio: P0, fenabled: P1) -> super::super::Foundation::BOOL +pub unsafe fn BluetoothEnableIncomingConnections(hradio: Option, fenabled: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothEnableIncomingConnections(hradio : super::super::Foundation:: HANDLE, fenabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - BluetoothEnableIncomingConnections(hradio.param().abi(), fenabled.param().abi()) + BluetoothEnableIncomingConnections(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), fenabled.param().abi()) } #[inline] -pub unsafe fn BluetoothEnumerateInstalledServices(hradio: P0, pbtdi: *const BLUETOOTH_DEVICE_INFO, pcserviceinout: *mut u32, pguidservices: Option<*mut windows_core::GUID>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothEnumerateInstalledServices(hradio: Option, pbtdi: *const BLUETOOTH_DEVICE_INFO, pcserviceinout: *mut u32, pguidservices: Option<*mut windows_core::GUID>) -> u32 { 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(), core::mem::transmute(pbtdi), core::mem::transmute(pcserviceinout), core::mem::transmute(pguidservices.unwrap_or(core::ptr::null_mut()))) + BluetoothEnumerateInstalledServices(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtdi), core::mem::transmute(pcserviceinout), core::mem::transmute(pguidservices.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BluetoothFindDeviceClose(hfind: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothFindDeviceClose(hfind: HBLUETOOTH_DEVICE_FIND) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindDeviceClose(hfind : HBLUETOOTH_DEVICE_FIND) -> super::super::Foundation:: BOOL); - BluetoothFindDeviceClose(hfind.param().abi()).ok() + BluetoothFindDeviceClose(core::mem::transmute(hfind)).ok() } #[inline] pub unsafe fn BluetoothFindFirstDevice(pbtsp: *const BLUETOOTH_DEVICE_SEARCH_PARAMS, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> windows_core::Result { @@ -80,124 +57,79 @@ pub unsafe fn BluetoothFindFirstRadio(pbtfrp: *const BLUETOOTH_FIND_RADIO_PARAMS (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn BluetoothFindNextDevice(hfind: P0, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothFindNextDevice(hfind: HBLUETOOTH_DEVICE_FIND, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindNextDevice(hfind : HBLUETOOTH_DEVICE_FIND, pbtdi : *mut BLUETOOTH_DEVICE_INFO) -> super::super::Foundation:: BOOL); - BluetoothFindNextDevice(hfind.param().abi(), core::mem::transmute(pbtdi)).ok() + BluetoothFindNextDevice(core::mem::transmute(hfind), core::mem::transmute(pbtdi)).ok() } #[inline] -pub unsafe fn BluetoothFindNextRadio(hfind: P0, phradio: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothFindNextRadio(hfind: HBLUETOOTH_RADIO_FIND, phradio: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindNextRadio(hfind : HBLUETOOTH_RADIO_FIND, phradio : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - BluetoothFindNextRadio(hfind.param().abi(), core::mem::transmute(phradio)).ok() + BluetoothFindNextRadio(core::mem::transmute(hfind), core::mem::transmute(phradio)).ok() } #[inline] -pub unsafe fn BluetoothFindRadioClose(hfind: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothFindRadioClose(hfind: HBLUETOOTH_RADIO_FIND) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindRadioClose(hfind : HBLUETOOTH_RADIO_FIND) -> super::super::Foundation:: BOOL); - BluetoothFindRadioClose(hfind.param().abi()).ok() + BluetoothFindRadioClose(core::mem::transmute(hfind)).ok() } #[inline] -pub unsafe fn BluetoothGATTAbortReliableWrite(hdevice: P0, reliablewritecontext: u64, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTAbortReliableWrite(hdevice: super::super::Foundation::HANDLE, reliablewritecontext: u64, flags: u32) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTAbortReliableWrite(hdevice : super::super::Foundation:: HANDLE, reliablewritecontext : u64, flags : u32) -> windows_core::HRESULT); - BluetoothGATTAbortReliableWrite(hdevice.param().abi(), core::mem::transmute(reliablewritecontext), core::mem::transmute(flags)).ok() + BluetoothGATTAbortReliableWrite(core::mem::transmute(hdevice), core::mem::transmute(reliablewritecontext), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn BluetoothGATTBeginReliableWrite(hdevice: P0, reliablewritecontext: *mut u64, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTBeginReliableWrite(hdevice: super::super::Foundation::HANDLE, reliablewritecontext: *mut u64, flags: u32) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTBeginReliableWrite(hdevice : super::super::Foundation:: HANDLE, reliablewritecontext : *mut u64, flags : u32) -> windows_core::HRESULT); - BluetoothGATTBeginReliableWrite(hdevice.param().abi(), core::mem::transmute(reliablewritecontext), core::mem::transmute(flags)).ok() + BluetoothGATTBeginReliableWrite(core::mem::transmute(hdevice), core::mem::transmute(reliablewritecontext), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn BluetoothGATTEndReliableWrite(hdevice: P0, reliablewritecontext: u64, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTEndReliableWrite(hdevice: super::super::Foundation::HANDLE, reliablewritecontext: u64, flags: u32) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTEndReliableWrite(hdevice : super::super::Foundation:: HANDLE, reliablewritecontext : u64, flags : u32) -> windows_core::HRESULT); - BluetoothGATTEndReliableWrite(hdevice.param().abi(), core::mem::transmute(reliablewritecontext), core::mem::transmute(flags)).ok() + BluetoothGATTEndReliableWrite(core::mem::transmute(hdevice), core::mem::transmute(reliablewritecontext), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn BluetoothGATTGetCharacteristicValue(hdevice: P0, characteristic: *const BTH_LE_GATT_CHARACTERISTIC, characteristicvaluedatasize: u32, characteristicvalue: Option<*mut BTH_LE_GATT_CHARACTERISTIC_VALUE>, characteristicvaluesizerequired: Option<*mut u16>, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTGetCharacteristicValue(hdevice: super::super::Foundation::HANDLE, characteristic: *const BTH_LE_GATT_CHARACTERISTIC, characteristicvaluedatasize: u32, characteristicvalue: Option<*mut BTH_LE_GATT_CHARACTERISTIC_VALUE>, characteristicvaluesizerequired: Option<*mut u16>, flags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(characteristic), core::mem::transmute(characteristicvaluedatasize), core::mem::transmute(characteristicvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(characteristicvaluesizerequired.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags)).ok() + BluetoothGATTGetCharacteristicValue(core::mem::transmute(hdevice), core::mem::transmute(characteristic), core::mem::transmute(characteristicvaluedatasize), core::mem::transmute(characteristicvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(characteristicvaluesizerequired.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTGetCharacteristics(hdevice: super::super::Foundation::HANDLE, service: Option<*const BTH_LE_GATT_SERVICE>, characteristicsbuffer: Option<&mut [BTH_LE_GATT_CHARACTERISTIC]>, characteristicsbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> { 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(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())), core::mem::transmute(characteristicsbufferactual), core::mem::transmute(flags)).ok() + BluetoothGATTGetCharacteristics(core::mem::transmute(hdevice), core::mem::transmute(service.unwrap_or(core::mem::zeroed())), 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())), core::mem::transmute(characteristicsbufferactual), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTGetDescriptorValue(hdevice: super::super::Foundation::HANDLE, 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<()> { 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(), core::mem::transmute(descriptor), core::mem::transmute(descriptorvaluedatasize), core::mem::transmute(descriptorvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(descriptorvaluesizerequired.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags)).ok() + BluetoothGATTGetDescriptorValue(core::mem::transmute(hdevice), core::mem::transmute(descriptor), core::mem::transmute(descriptorvaluedatasize), core::mem::transmute(descriptorvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(descriptorvaluesizerequired.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTGetDescriptors(hdevice: super::super::Foundation::HANDLE, characteristic: *const BTH_LE_GATT_CHARACTERISTIC, descriptorsbuffer: Option<&mut [BTH_LE_GATT_DESCRIPTOR]>, descriptorsbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetDescriptors(hdevice : super::super::Foundation:: HANDLE, characteristic : *const BTH_LE_GATT_CHARACTERISTIC, descriptorsbuffercount : u16, descriptorsbuffer : *mut BTH_LE_GATT_DESCRIPTOR, descriptorsbufferactual : *mut u16, flags : u32) -> windows_core::HRESULT); - BluetoothGATTGetDescriptors(hdevice.param().abi(), core::mem::transmute(characteristic), descriptorsbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptorsbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(descriptorsbufferactual), core::mem::transmute(flags)).ok() + BluetoothGATTGetDescriptors(core::mem::transmute(hdevice), core::mem::transmute(characteristic), descriptorsbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptorsbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(descriptorsbufferactual), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn BluetoothGATTGetIncludedServices(hdevice: P0, parentservice: Option<*const BTH_LE_GATT_SERVICE>, includedservicesbuffer: Option<&mut [BTH_LE_GATT_SERVICE]>, includedservicesbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTGetIncludedServices(hdevice: super::super::Foundation::HANDLE, parentservice: Option<*const BTH_LE_GATT_SERVICE>, includedservicesbuffer: Option<&mut [BTH_LE_GATT_SERVICE]>, includedservicesbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> { 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(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())), core::mem::transmute(includedservicesbufferactual), core::mem::transmute(flags)).ok() + BluetoothGATTGetIncludedServices(core::mem::transmute(hdevice), core::mem::transmute(parentservice.unwrap_or(core::mem::zeroed())), 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())), core::mem::transmute(includedservicesbufferactual), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn BluetoothGATTGetServices(hdevice: P0, servicesbuffer: Option<&mut [BTH_LE_GATT_SERVICE]>, servicesbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTGetServices(hdevice: super::super::Foundation::HANDLE, servicesbuffer: Option<&mut [BTH_LE_GATT_SERVICE]>, servicesbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetServices(hdevice : super::super::Foundation:: HANDLE, servicesbuffercount : u16, servicesbuffer : *mut BTH_LE_GATT_SERVICE, servicesbufferactual : *mut u16, flags : u32) -> windows_core::HRESULT); - BluetoothGATTGetServices(hdevice.param().abi(), servicesbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(servicesbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(servicesbufferactual), core::mem::transmute(flags)).ok() + BluetoothGATTGetServices(core::mem::transmute(hdevice), servicesbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(servicesbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(servicesbufferactual), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn BluetoothGATTRegisterEvent(hservice: P0, eventtype: BTH_LE_GATT_EVENT_TYPE, eventparameterin: *const core::ffi::c_void, callback: PFNBLUETOOTH_GATT_EVENT_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>, peventhandle: *mut isize, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const core::ffi::c_void>, peventhandle: *mut isize, flags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(eventtype), core::mem::transmute(eventparameterin), core::mem::transmute(callback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(peventhandle), core::mem::transmute(flags)).ok() + BluetoothGATTRegisterEvent(core::mem::transmute(hservice), core::mem::transmute(eventtype), core::mem::transmute(eventparameterin), core::mem::transmute(callback), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(peventhandle), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTSetCharacteristicValue(hdevice: super::super::Foundation::HANDLE, characteristic: *const BTH_LE_GATT_CHARACTERISTIC, characteristicvalue: *const BTH_LE_GATT_CHARACTERISTIC_VALUE, reliablewritecontext: Option, flags: u32) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTSetCharacteristicValue(hdevice : super::super::Foundation:: HANDLE, characteristic : *const BTH_LE_GATT_CHARACTERISTIC, characteristicvalue : *const BTH_LE_GATT_CHARACTERISTIC_VALUE, reliablewritecontext : u64, flags : u32) -> windows_core::HRESULT); - BluetoothGATTSetCharacteristicValue(hdevice.param().abi(), core::mem::transmute(characteristic), core::mem::transmute(characteristicvalue), core::mem::transmute(reliablewritecontext), core::mem::transmute(flags)).ok() + BluetoothGATTSetCharacteristicValue(core::mem::transmute(hdevice), core::mem::transmute(characteristic), core::mem::transmute(characteristicvalue), core::mem::transmute(reliablewritecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn BluetoothGATTSetDescriptorValue(hdevice: P0, descriptor: *const BTH_LE_GATT_DESCRIPTOR, descriptorvalue: *const BTH_LE_GATT_DESCRIPTOR_VALUE, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGATTSetDescriptorValue(hdevice: super::super::Foundation::HANDLE, descriptor: *const BTH_LE_GATT_DESCRIPTOR, descriptorvalue: *const BTH_LE_GATT_DESCRIPTOR_VALUE, flags: u32) -> windows_core::Result<()> { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTSetDescriptorValue(hdevice : super::super::Foundation:: HANDLE, descriptor : *const BTH_LE_GATT_DESCRIPTOR, descriptorvalue : *const BTH_LE_GATT_DESCRIPTOR_VALUE, flags : u32) -> windows_core::HRESULT); - BluetoothGATTSetDescriptorValue(hdevice.param().abi(), core::mem::transmute(descriptor), core::mem::transmute(descriptorvalue), core::mem::transmute(flags)).ok() + BluetoothGATTSetDescriptorValue(core::mem::transmute(hdevice), core::mem::transmute(descriptor), core::mem::transmute(descriptorvalue), core::mem::transmute(flags)).ok() } #[inline] pub unsafe fn BluetoothGATTUnregisterEvent(eventhandle: isize, flags: u32) -> windows_core::Result<()> { @@ -205,36 +137,24 @@ pub unsafe fn BluetoothGATTUnregisterEvent(eventhandle: isize, flags: u32) -> wi BluetoothGATTUnregisterEvent(core::mem::transmute(eventhandle), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn BluetoothGetDeviceInfo(hradio: P0, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGetDeviceInfo(hradio: Option, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGetDeviceInfo(hradio : super::super::Foundation:: HANDLE, pbtdi : *mut BLUETOOTH_DEVICE_INFO) -> u32); - BluetoothGetDeviceInfo(hradio.param().abi(), core::mem::transmute(pbtdi)) + BluetoothGetDeviceInfo(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtdi)) } #[inline] -pub unsafe fn BluetoothGetRadioInfo(hradio: P0, pradioinfo: *mut BLUETOOTH_RADIO_INFO) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothGetRadioInfo(hradio: super::super::Foundation::HANDLE, pradioinfo: *mut BLUETOOTH_RADIO_INFO) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGetRadioInfo(hradio : super::super::Foundation:: HANDLE, pradioinfo : *mut BLUETOOTH_RADIO_INFO) -> u32); - BluetoothGetRadioInfo(hradio.param().abi(), core::mem::transmute(pradioinfo)) + BluetoothGetRadioInfo(core::mem::transmute(hradio), core::mem::transmute(pradioinfo)) } #[inline] -pub unsafe fn BluetoothIsConnectable(hradio: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothIsConnectable(hradio: Option) -> super::super::Foundation::BOOL { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothIsConnectable(hradio : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - BluetoothIsConnectable(hradio.param().abi()) + BluetoothIsConnectable(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BluetoothIsDiscoverable(hradio: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothIsDiscoverable(hradio: Option) -> super::super::Foundation::BOOL { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothIsDiscoverable(hradio : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - BluetoothIsDiscoverable(hradio.param().abi()) + BluetoothIsDiscoverable(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn BluetoothIsVersionAvailable(majorversion: u8, minorversion: u8) -> super::super::Foundation::BOOL { @@ -242,14 +162,14 @@ pub unsafe fn BluetoothIsVersionAvailable(majorversion: u8, minorversion: u8) -> BluetoothIsVersionAvailable(core::mem::transmute(majorversion), core::mem::transmute(minorversion)) } #[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 { +pub unsafe fn BluetoothRegisterForAuthentication(pbtdi: Option<*const BLUETOOTH_DEVICE_INFO>, phreghandle: *mut isize, pfncallback: Option, 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(core::ptr::null())), core::mem::transmute(phreghandle), core::mem::transmute(pfncallback), core::mem::transmute(pvparam.unwrap_or(core::ptr::null()))) + BluetoothRegisterForAuthentication(core::mem::transmute(pbtdi.unwrap_or(core::mem::zeroed())), core::mem::transmute(phreghandle), core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed()))) } #[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 { +pub unsafe fn BluetoothRegisterForAuthenticationEx(pbtdiin: Option<*const BLUETOOTH_DEVICE_INFO>, phreghandleout: *mut isize, pfncallbackin: Option, 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(core::ptr::null())), core::mem::transmute(phreghandleout), core::mem::transmute(pfncallbackin), core::mem::transmute(pvparam.unwrap_or(core::ptr::null()))) + BluetoothRegisterForAuthenticationEx(core::mem::transmute(pbtdiin.unwrap_or(core::mem::zeroed())), core::mem::transmute(phreghandleout), core::mem::transmute(pfncallbackin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn BluetoothRemoveDevice(paddress: *const BLUETOOTH_ADDRESS) -> u32 { @@ -279,7 +199,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(core::ptr::null())), core::mem::transmute(usstringoffset), core::mem::transmute(pszstring), core::mem::transmute(pcchstringlength)) + BluetoothSdpGetString(core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), core::mem::transmute(pstringdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(usstringoffset), core::mem::transmute(pszstring), core::mem::transmute(pcchstringlength)) } #[inline] pub unsafe fn BluetoothSelectDevices(pbtsdp: *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> windows_core::Result<()> { @@ -292,37 +212,27 @@ pub unsafe fn BluetoothSelectDevicesFree(pbtsdp: *mut BLUETOOTH_SELECT_DEVICE_PA BluetoothSelectDevicesFree(core::mem::transmute(pbtsdp)) } #[inline] -pub unsafe fn BluetoothSendAuthenticationResponse(hradio: P0, pbtdi: *const BLUETOOTH_DEVICE_INFO, pszpasskey: P2) -> u32 +pub unsafe fn BluetoothSendAuthenticationResponse(hradio: Option, pbtdi: *const BLUETOOTH_DEVICE_INFO, pszpasskey: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSendAuthenticationResponse(hradio : super::super::Foundation:: HANDLE, pbtdi : *const BLUETOOTH_DEVICE_INFO, pszpasskey : windows_core::PCWSTR) -> u32); - BluetoothSendAuthenticationResponse(hradio.param().abi(), core::mem::transmute(pbtdi), pszpasskey.param().abi()) + BluetoothSendAuthenticationResponse(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtdi), pszpasskey.param().abi()) } #[inline] -pub unsafe fn BluetoothSendAuthenticationResponseEx(hradioin: P0, pauthresponse: *const BLUETOOTH_AUTHENTICATE_RESPONSE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothSendAuthenticationResponseEx(hradioin: Option, pauthresponse: *const BLUETOOTH_AUTHENTICATE_RESPONSE) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSendAuthenticationResponseEx(hradioin : super::super::Foundation:: HANDLE, pauthresponse : *const BLUETOOTH_AUTHENTICATE_RESPONSE) -> u32); - BluetoothSendAuthenticationResponseEx(hradioin.param().abi(), core::mem::transmute(pauthresponse)) + BluetoothSendAuthenticationResponseEx(core::mem::transmute(hradioin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthresponse)) } #[inline] -pub unsafe fn BluetoothSetLocalServiceInfo(hradioin: P0, pclassguid: *const windows_core::GUID, ulinstance: u32, pserviceinfoin: *const BLUETOOTH_LOCAL_SERVICE_INFO) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothSetLocalServiceInfo(hradioin: Option, pclassguid: *const windows_core::GUID, ulinstance: u32, pserviceinfoin: *const BLUETOOTH_LOCAL_SERVICE_INFO) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSetLocalServiceInfo(hradioin : super::super::Foundation:: HANDLE, pclassguid : *const windows_core::GUID, ulinstance : u32, pserviceinfoin : *const BLUETOOTH_LOCAL_SERVICE_INFO) -> u32); - BluetoothSetLocalServiceInfo(hradioin.param().abi(), core::mem::transmute(pclassguid), core::mem::transmute(ulinstance), core::mem::transmute(pserviceinfoin)) + BluetoothSetLocalServiceInfo(core::mem::transmute(hradioin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pclassguid), core::mem::transmute(ulinstance), core::mem::transmute(pserviceinfoin)) } #[inline] -pub unsafe fn BluetoothSetServiceState(hradio: P0, pbtdi: *const BLUETOOTH_DEVICE_INFO, pguidservice: *const windows_core::GUID, dwserviceflags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn BluetoothSetServiceState(hradio: Option, pbtdi: *const BLUETOOTH_DEVICE_INFO, pguidservice: *const windows_core::GUID, dwserviceflags: u32) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSetServiceState(hradio : super::super::Foundation:: HANDLE, pbtdi : *const BLUETOOTH_DEVICE_INFO, pguidservice : *const windows_core::GUID, dwserviceflags : u32) -> u32); - BluetoothSetServiceState(hradio.param().abi(), core::mem::transmute(pbtdi), core::mem::transmute(pguidservice), core::mem::transmute(dwserviceflags)) + BluetoothSetServiceState(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbtdi), core::mem::transmute(pguidservice), core::mem::transmute(dwserviceflags)) } #[inline] pub unsafe fn BluetoothUnregisterAuthentication(hreghandle: isize) -> 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 18478da0d0..65cd355884 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs @@ -31,70 +31,50 @@ where BuildCommDCBW(lpdef.param().abi(), core::mem::transmute(lpdcb)).ok() } #[inline] -pub unsafe fn ClearCommBreak(hfile: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ClearCommBreak(hfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ClearCommBreak(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ClearCommBreak(hfile.param().abi()).ok() + ClearCommBreak(core::mem::transmute(hfile)).ok() } #[inline] -pub unsafe fn ClearCommError(hfile: P0, lperrors: Option<*mut CLEAR_COMM_ERROR_FLAGS>, lpstat: Option<*mut COMSTAT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ClearCommError(hfile: super::super::Foundation::HANDLE, lperrors: Option<*mut CLEAR_COMM_ERROR_FLAGS>, lpstat: Option<*mut COMSTAT>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(lpstat.unwrap_or(core::ptr::null_mut()))).ok() + ClearCommError(core::mem::transmute(hfile), core::mem::transmute(lperrors.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpstat.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CommConfigDialogA(lpszname: P0, hwnd: P1, lpcc: *mut COMMCONFIG) -> windows_core::Result<()> +pub unsafe fn CommConfigDialogA(lpszname: P0, hwnd: Option, lpcc: *mut COMMCONFIG) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CommConfigDialogA(lpszname : windows_core::PCSTR, hwnd : super::super::Foundation:: HWND, lpcc : *mut COMMCONFIG) -> super::super::Foundation:: BOOL); - CommConfigDialogA(lpszname.param().abi(), hwnd.param().abi(), core::mem::transmute(lpcc)).ok() + CommConfigDialogA(lpszname.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcc)).ok() } #[inline] -pub unsafe fn CommConfigDialogW(lpszname: P0, hwnd: P1, lpcc: *mut COMMCONFIG) -> windows_core::Result<()> +pub unsafe fn CommConfigDialogW(lpszname: P0, hwnd: Option, lpcc: *mut COMMCONFIG) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CommConfigDialogW(lpszname : windows_core::PCWSTR, hwnd : super::super::Foundation:: HWND, lpcc : *mut COMMCONFIG) -> super::super::Foundation:: BOOL); - CommConfigDialogW(lpszname.param().abi(), hwnd.param().abi(), core::mem::transmute(lpcc)).ok() + CommConfigDialogW(lpszname.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcc)).ok() } #[inline] -pub unsafe fn EscapeCommFunction(hfile: P0, dwfunc: ESCAPE_COMM_FUNCTION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EscapeCommFunction(hfile: super::super::Foundation::HANDLE, dwfunc: ESCAPE_COMM_FUNCTION) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn EscapeCommFunction(hfile : super::super::Foundation:: HANDLE, dwfunc : ESCAPE_COMM_FUNCTION) -> super::super::Foundation:: BOOL); - EscapeCommFunction(hfile.param().abi(), core::mem::transmute(dwfunc)).ok() + EscapeCommFunction(core::mem::transmute(hfile), core::mem::transmute(dwfunc)).ok() } #[inline] -pub unsafe fn GetCommConfig(hcommdev: P0, lpcc: Option<*mut COMMCONFIG>, lpdwsize: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetCommConfig(hcommdev: super::super::Foundation::HANDLE, lpcc: Option<*mut COMMCONFIG>, lpdwsize: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(lpdwsize)).ok() + GetCommConfig(core::mem::transmute(hcommdev), core::mem::transmute(lpcc.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsize)).ok() } #[inline] -pub unsafe fn GetCommMask(hfile: P0, lpevtmask: *mut COMM_EVENT_MASK) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetCommMask(hfile: super::super::Foundation::HANDLE, lpevtmask: *mut COMM_EVENT_MASK) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCommMask(hfile : super::super::Foundation:: HANDLE, lpevtmask : *mut COMM_EVENT_MASK) -> super::super::Foundation:: BOOL); - GetCommMask(hfile.param().abi(), core::mem::transmute(lpevtmask)).ok() + GetCommMask(core::mem::transmute(hfile), core::mem::transmute(lpevtmask)).ok() } #[inline] -pub unsafe fn GetCommModemStatus(hfile: P0, lpmodemstat: *mut MODEM_STATUS_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetCommModemStatus(hfile: super::super::Foundation::HANDLE, lpmodemstat: *mut MODEM_STATUS_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCommModemStatus(hfile : super::super::Foundation:: HANDLE, lpmodemstat : *mut MODEM_STATUS_FLAGS) -> super::super::Foundation:: BOOL); - GetCommModemStatus(hfile.param().abi(), core::mem::transmute(lpmodemstat)).ok() + GetCommModemStatus(core::mem::transmute(hfile), core::mem::transmute(lpmodemstat)).ok() } #[inline] pub unsafe fn GetCommPorts(lpportnumbers: &mut [u32], puportnumbersfound: *mut u32) -> u32 { @@ -102,28 +82,19 @@ pub unsafe fn GetCommPorts(lpportnumbers: &mut [u32], puportnumbersfound: *mut u GetCommPorts(core::mem::transmute(lpportnumbers.as_ptr()), lpportnumbers.len().try_into().unwrap(), core::mem::transmute(puportnumbersfound)) } #[inline] -pub unsafe fn GetCommProperties(hfile: P0, lpcommprop: *mut COMMPROP) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetCommProperties(hfile: super::super::Foundation::HANDLE, lpcommprop: *mut COMMPROP) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCommProperties(hfile : super::super::Foundation:: HANDLE, lpcommprop : *mut COMMPROP) -> super::super::Foundation:: BOOL); - GetCommProperties(hfile.param().abi(), core::mem::transmute(lpcommprop)).ok() + GetCommProperties(core::mem::transmute(hfile), core::mem::transmute(lpcommprop)).ok() } #[inline] -pub unsafe fn GetCommState(hfile: P0, lpdcb: *mut DCB) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetCommState(hfile: super::super::Foundation::HANDLE, lpdcb: *mut DCB) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCommState(hfile : super::super::Foundation:: HANDLE, lpdcb : *mut DCB) -> super::super::Foundation:: BOOL); - GetCommState(hfile.param().abi(), core::mem::transmute(lpdcb)).ok() + GetCommState(core::mem::transmute(hfile), core::mem::transmute(lpdcb)).ok() } #[inline] -pub unsafe fn GetCommTimeouts(hfile: P0, lpcommtimeouts: *mut COMMTIMEOUTS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetCommTimeouts(hfile: super::super::Foundation::HANDLE, lpcommtimeouts: *mut COMMTIMEOUTS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCommTimeouts(hfile : super::super::Foundation:: HANDLE, lpcommtimeouts : *mut COMMTIMEOUTS) -> super::super::Foundation:: BOOL); - GetCommTimeouts(hfile.param().abi(), core::mem::transmute(lpcommtimeouts)).ok() + GetCommTimeouts(core::mem::transmute(hfile), core::mem::transmute(lpcommtimeouts)).ok() } #[inline] pub unsafe fn GetDefaultCommConfigA(lpszname: P0, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> windows_core::Result<()> @@ -147,52 +118,34 @@ pub unsafe fn OpenCommPort(uportnumber: u32, dwdesiredaccess: u32, dwflagsandatt OpenCommPort(core::mem::transmute(uportnumber), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwflagsandattributes)) } #[inline] -pub unsafe fn PurgeComm(hfile: P0, dwflags: PURGE_COMM_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PurgeComm(hfile: super::super::Foundation::HANDLE, dwflags: PURGE_COMM_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn PurgeComm(hfile : super::super::Foundation:: HANDLE, dwflags : PURGE_COMM_FLAGS) -> super::super::Foundation:: BOOL); - PurgeComm(hfile.param().abi(), core::mem::transmute(dwflags)).ok() + PurgeComm(core::mem::transmute(hfile), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SetCommBreak(hfile: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetCommBreak(hfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetCommBreak(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetCommBreak(hfile.param().abi()).ok() + SetCommBreak(core::mem::transmute(hfile)).ok() } #[inline] -pub unsafe fn SetCommConfig(hcommdev: P0, lpcc: *const COMMCONFIG, dwsize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetCommConfig(hcommdev: super::super::Foundation::HANDLE, lpcc: *const COMMCONFIG, dwsize: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetCommConfig(hcommdev : super::super::Foundation:: HANDLE, lpcc : *const COMMCONFIG, dwsize : u32) -> super::super::Foundation:: BOOL); - SetCommConfig(hcommdev.param().abi(), core::mem::transmute(lpcc), core::mem::transmute(dwsize)).ok() + SetCommConfig(core::mem::transmute(hcommdev), core::mem::transmute(lpcc), core::mem::transmute(dwsize)).ok() } #[inline] -pub unsafe fn SetCommMask(hfile: P0, dwevtmask: COMM_EVENT_MASK) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetCommMask(hfile: super::super::Foundation::HANDLE, dwevtmask: COMM_EVENT_MASK) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetCommMask(hfile : super::super::Foundation:: HANDLE, dwevtmask : COMM_EVENT_MASK) -> super::super::Foundation:: BOOL); - SetCommMask(hfile.param().abi(), core::mem::transmute(dwevtmask)).ok() + SetCommMask(core::mem::transmute(hfile), core::mem::transmute(dwevtmask)).ok() } #[inline] -pub unsafe fn SetCommState(hfile: P0, lpdcb: *const DCB) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetCommState(hfile: super::super::Foundation::HANDLE, lpdcb: *const DCB) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetCommState(hfile : super::super::Foundation:: HANDLE, lpdcb : *const DCB) -> super::super::Foundation:: BOOL); - SetCommState(hfile.param().abi(), core::mem::transmute(lpdcb)).ok() + SetCommState(core::mem::transmute(hfile), core::mem::transmute(lpdcb)).ok() } #[inline] -pub unsafe fn SetCommTimeouts(hfile: P0, lpcommtimeouts: *const COMMTIMEOUTS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetCommTimeouts(hfile: super::super::Foundation::HANDLE, lpcommtimeouts: *const COMMTIMEOUTS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetCommTimeouts(hfile : super::super::Foundation:: HANDLE, lpcommtimeouts : *const COMMTIMEOUTS) -> super::super::Foundation:: BOOL); - SetCommTimeouts(hfile.param().abi(), core::mem::transmute(lpcommtimeouts)).ok() + SetCommTimeouts(core::mem::transmute(hfile), core::mem::transmute(lpcommtimeouts)).ok() } #[inline] pub unsafe fn SetDefaultCommConfigA(lpszname: P0, lpcc: *const COMMCONFIG, dwsize: u32) -> windows_core::Result<()> @@ -211,29 +164,20 @@ where SetDefaultCommConfigW(lpszname.param().abi(), core::mem::transmute(lpcc), core::mem::transmute(dwsize)).ok() } #[inline] -pub unsafe fn SetupComm(hfile: P0, dwinqueue: u32, dwoutqueue: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupComm(hfile: super::super::Foundation::HANDLE, dwinqueue: u32, dwoutqueue: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetupComm(hfile : super::super::Foundation:: HANDLE, dwinqueue : u32, dwoutqueue : u32) -> super::super::Foundation:: BOOL); - SetupComm(hfile.param().abi(), core::mem::transmute(dwinqueue), core::mem::transmute(dwoutqueue)).ok() + SetupComm(core::mem::transmute(hfile), core::mem::transmute(dwinqueue), core::mem::transmute(dwoutqueue)).ok() } #[inline] -pub unsafe fn TransmitCommChar(hfile: P0, cchar: i8) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TransmitCommChar(hfile: super::super::Foundation::HANDLE, cchar: i8) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn TransmitCommChar(hfile : super::super::Foundation:: HANDLE, cchar : i8) -> super::super::Foundation:: BOOL); - TransmitCommChar(hfile.param().abi(), core::mem::transmute(cchar)).ok() + TransmitCommChar(core::mem::transmute(hfile), core::mem::transmute(cchar)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WaitCommEvent(hfile: P0, lpevtmask: *mut COMM_EVENT_MASK, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WaitCommEvent(hfile: super::super::Foundation::HANDLE, lpevtmask: *mut COMM_EVENT_MASK, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpevtmask), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() + WaitCommEvent(core::mem::transmute(hfile), core::mem::transmute(lpevtmask), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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 8145d516bb..7679d4974b 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs @@ -135,7 +135,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(core::ptr::null_mut())), + core::mem::transmute(cancelcontext.unwrap_or(core::mem::zeroed())), ) .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 b1104222ab..aa4e1051aa 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs @@ -11,9 +11,9 @@ pub unsafe fn CM_Add_Empty_Log_Conf(plclogconf: *mut usize, dndevinst: u32, prio } #[cfg(feature = "Win32_Data_HtmlHelp")] #[inline] -pub unsafe fn CM_Add_Empty_Log_Conf_Ex(plclogconf: *mut usize, dndevinst: u32, priority: super::super::Data::HtmlHelp::PRIORITY, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Add_Empty_Log_Conf_Ex(plclogconf: *mut usize, dndevinst: u32, priority: super::super::Data::HtmlHelp::PRIORITY, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Add_Empty_Log_Conf_Ex(plclogconf : *mut usize, dndevinst : u32, priority : super::super::Data::HtmlHelp:: PRIORITY, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Add_Empty_Log_Conf_Ex(core::mem::transmute(plclogconf), core::mem::transmute(dndevinst), core::mem::transmute(priority), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Add_Empty_Log_Conf_Ex(core::mem::transmute(plclogconf), core::mem::transmute(dndevinst), core::mem::transmute(priority), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Add_IDA(dndevinst: u32, pszid: P1, ulflags: u32) -> CONFIGRET @@ -32,20 +32,20 @@ where CM_Add_IDW(core::mem::transmute(dndevinst), pszid.param().abi(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Add_ID_ExA(dndevinst: u32, pszid: P1, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Add_ID_ExA(dndevinst: u32, pszid: P1, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Add_ID_ExA(dndevinst : u32, pszid : windows_core::PCSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Add_ID_ExA(core::mem::transmute(dndevinst), pszid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Add_ID_ExA(core::mem::transmute(dndevinst), pszid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Add_ID_ExW(dndevinst: u32, pszid: P1, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Add_ID_ExW(dndevinst: u32, pszid: P1, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Add_ID_ExW(dndevinst : u32, pszid : windows_core::PCWSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Add_ID_ExW(core::mem::transmute(dndevinst), pszid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Add_ID_ExW(core::mem::transmute(dndevinst), pszid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Add_Range(ullstartvalue: u64, ullendvalue: u64, rlh: usize, ulflags: u32) -> CONFIGRET { @@ -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(core::ptr::null_mut())), core::mem::transmute(lclogconf), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(ulflags)) + CM_Add_Res_Des(core::mem::transmute(prdresdes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lclogconf), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(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 { +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: Option) -> 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(core::ptr::null_mut())), core::mem::transmute(lclogconf), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Add_Res_Des_Ex(core::mem::transmute(prdresdes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lclogconf), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Connect_MachineA(uncservername: P0, phmachine: *mut isize) -> CONFIGRET @@ -95,20 +95,20 @@ where CM_Create_DevNodeW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(dnparent), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Create_DevNode_ExA(pdndevinst: *mut u32, pdeviceid: P1, dnparent: u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Create_DevNode_ExA(pdndevinst: *mut u32, pdeviceid: P1, dnparent: u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Create_DevNode_ExA(pdndevinst : *mut u32, pdeviceid : windows_core::PCSTR, dnparent : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Create_DevNode_ExA(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(dnparent), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Create_DevNode_ExA(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(dnparent), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Create_DevNode_ExW(pdndevinst: *mut u32, pdeviceid: P1, dnparent: u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Create_DevNode_ExW(pdndevinst: *mut u32, pdeviceid: P1, dnparent: u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Create_DevNode_ExW(pdndevinst : *mut u32, pdeviceid : windows_core::PCWSTR, dnparent : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Create_DevNode_ExW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(dnparent), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Create_DevNode_ExW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(dnparent), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Create_Range_List(prlh: *mut usize, ulflags: u32) -> CONFIGRET { @@ -121,9 +121,9 @@ pub unsafe fn CM_Delete_Class_Key(classguid: *const windows_core::GUID, ulflags: CM_Delete_Class_Key(core::mem::transmute(classguid), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Delete_Class_Key_Ex(classguid: *const windows_core::GUID, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Delete_Class_Key_Ex(classguid: *const windows_core::GUID, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Delete_Class_Key_Ex(classguid : *const windows_core::GUID, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Delete_Class_Key_Ex(core::mem::transmute(classguid), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Delete_Class_Key_Ex(core::mem::transmute(classguid), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Delete_DevNode_Key(dndevnode: u32, ulhardwareprofile: u32, ulflags: u32) -> CONFIGRET { @@ -131,9 +131,9 @@ pub unsafe fn CM_Delete_DevNode_Key(dndevnode: u32, ulhardwareprofile: u32, ulfl CM_Delete_DevNode_Key(core::mem::transmute(dndevnode), core::mem::transmute(ulhardwareprofile), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Delete_DevNode_Key_Ex(dndevnode: u32, ulhardwareprofile: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Delete_DevNode_Key_Ex(dndevnode: u32, ulhardwareprofile: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Delete_DevNode_Key_Ex(dndevnode : u32, ulhardwareprofile : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Delete_DevNode_Key_Ex(core::mem::transmute(dndevnode), core::mem::transmute(ulhardwareprofile), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Delete_DevNode_Key_Ex(core::mem::transmute(dndevnode), core::mem::transmute(ulhardwareprofile), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Delete_Device_Interface_KeyA(pszdeviceinterface: P0, ulflags: u32) -> CONFIGRET @@ -152,20 +152,20 @@ where CM_Delete_Device_Interface_KeyW(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Delete_Device_Interface_Key_ExA(pszdeviceinterface: P0, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Delete_Device_Interface_Key_ExA(pszdeviceinterface: P0, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Delete_Device_Interface_Key_ExA(pszdeviceinterface : windows_core::PCSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Delete_Device_Interface_Key_ExA(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Delete_Device_Interface_Key_ExA(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Delete_Device_Interface_Key_ExW(pszdeviceinterface: P0, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Delete_Device_Interface_Key_ExW(pszdeviceinterface: P0, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Delete_Device_Interface_Key_ExW(pszdeviceinterface : windows_core::PCWSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Delete_Device_Interface_Key_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Delete_Device_Interface_Key_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Delete_Range(ullstartvalue: u64, ullendvalue: u64, rlh: usize, ulflags: u32) -> CONFIGRET { @@ -178,9 +178,9 @@ pub unsafe fn CM_Detect_Resource_Conflict(dndevinst: u32, resourceid: u32, resou CM_Detect_Resource_Conflict(core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(pbconflictdetected), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Detect_Resource_Conflict_Ex(dndevinst: u32, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, pbconflictdetected: *mut super::super::Foundation::BOOL, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Detect_Resource_Conflict_Ex(dndevinst: u32, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, pbconflictdetected: *mut super::super::Foundation::BOOL, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Detect_Resource_Conflict_Ex(dndevinst : u32, resourceid : u32, resourcedata : *const core::ffi::c_void, resourcelen : u32, pbconflictdetected : *mut super::super::Foundation:: BOOL, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Detect_Resource_Conflict_Ex(core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(pbconflictdetected), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Detect_Resource_Conflict_Ex(core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(pbconflictdetected), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Disable_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -188,14 +188,14 @@ pub unsafe fn CM_Disable_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { CM_Disable_DevNode(core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Disable_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Disable_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Disable_DevNode_Ex(dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Disable_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Disable_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Disconnect_Machine(hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Disconnect_Machine(hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Disconnect_Machine(hmachine : isize) -> CONFIGRET); - CM_Disconnect_Machine(core::mem::transmute(hmachine)) + CM_Disconnect_Machine(core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Dup_Range_List(rlhold: usize, rlhnew: usize, ulflags: u32) -> CONFIGRET { @@ -208,9 +208,9 @@ pub unsafe fn CM_Enable_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { CM_Enable_DevNode(core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Enable_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Enable_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Enable_DevNode_Ex(dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Enable_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Enable_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Enumerate_Classes(ulclassindex: u32, classguid: *mut windows_core::GUID, ulflags: CM_ENUMERATE_FLAGS) -> CONFIGRET { @@ -218,9 +218,9 @@ pub unsafe fn CM_Enumerate_Classes(ulclassindex: u32, classguid: *mut windows_co CM_Enumerate_Classes(core::mem::transmute(ulclassindex), core::mem::transmute(classguid), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Enumerate_Classes_Ex(ulclassindex: u32, classguid: *mut windows_core::GUID, ulflags: CM_ENUMERATE_FLAGS, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Enumerate_Classes_Ex(ulclassindex: u32, classguid: *mut windows_core::GUID, ulflags: CM_ENUMERATE_FLAGS, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Enumerate_Classes_Ex(ulclassindex : u32, classguid : *mut windows_core::GUID, ulflags : CM_ENUMERATE_FLAGS, hmachine : isize) -> CONFIGRET); - CM_Enumerate_Classes_Ex(core::mem::transmute(ulclassindex), core::mem::transmute(classguid), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Enumerate_Classes_Ex(core::mem::transmute(ulclassindex), core::mem::transmute(classguid), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Enumerate_EnumeratorsA(ulenumindex: u32, buffer: windows_core::PSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET { @@ -233,14 +233,14 @@ pub unsafe fn CM_Enumerate_EnumeratorsW(ulenumindex: u32, buffer: windows_core:: CM_Enumerate_EnumeratorsW(core::mem::transmute(ulenumindex), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Enumerate_Enumerators_ExA(ulenumindex: u32, buffer: windows_core::PSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Enumerate_Enumerators_ExA(ulenumindex: u32, buffer: windows_core::PSTR, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Enumerate_Enumerators_ExA(ulenumindex : u32, buffer : windows_core::PSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Enumerate_Enumerators_ExA(core::mem::transmute(ulenumindex), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Enumerate_Enumerators_ExA(core::mem::transmute(ulenumindex), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Enumerate_Enumerators_ExW(ulenumindex: u32, buffer: windows_core::PWSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Enumerate_Enumerators_ExW(ulenumindex: u32, buffer: windows_core::PWSTR, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Enumerate_Enumerators_ExW(ulenumindex : u32, buffer : windows_core::PWSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Enumerate_Enumerators_ExW(core::mem::transmute(ulenumindex), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Enumerate_Enumerators_ExW(core::mem::transmute(ulenumindex), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Find_Range(pullstart: *mut u64, ullstart: u64, ullength: u32, ullalignment: u64, ullend: u64, rlh: usize, ulflags: u32) -> CONFIGRET { @@ -258,9 +258,9 @@ pub unsafe fn CM_Free_Log_Conf(lclogconftobefreed: usize, ulflags: u32) -> CONFI CM_Free_Log_Conf(core::mem::transmute(lclogconftobefreed), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Free_Log_Conf_Ex(lclogconftobefreed: usize, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Free_Log_Conf_Ex(lclogconftobefreed: usize, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Free_Log_Conf_Ex(lclogconftobefreed : usize, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Free_Log_Conf_Ex(core::mem::transmute(lclogconftobefreed), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Free_Log_Conf_Ex(core::mem::transmute(lclogconftobefreed), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Free_Log_Conf_Handle(lclogconf: usize) -> 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(core::ptr::null_mut())), core::mem::transmute(rdresdes), core::mem::transmute(ulflags)) + CM_Free_Res_Des(core::mem::transmute(prdresdes.unwrap_or(core::mem::zeroed())), core::mem::transmute(rdresdes), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Free_Res_Des_Ex(prdresdes: Option<*mut usize>, rdresdes: usize, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Free_Res_Des_Ex(prdresdes: Option<*mut usize>, rdresdes: usize, ulflags: u32, hmachine: Option) -> 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(core::ptr::null_mut())), core::mem::transmute(rdresdes), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Free_Res_Des_Ex(core::mem::transmute(prdresdes.unwrap_or(core::mem::zeroed())), core::mem::transmute(rdresdes), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Free_Res_Des_Handle(rdresdes: usize) -> CONFIGRET { @@ -298,81 +298,81 @@ pub unsafe fn CM_Get_Child(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32) - CM_Get_Child(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Child_Ex(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Child_Ex(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Child_Ex(pdndevinst : *mut u32, dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Child_Ex(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Child_Ex(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Class_Key_NameA(classguid: *const windows_core::GUID, pszkeyname: windows_core::PSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET { +pub unsafe fn CM_Get_Class_Key_NameA(classguid: *const windows_core::GUID, pszkeyname: Option, pullength: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Key_NameA(classguid : *const windows_core::GUID, pszkeyname : windows_core::PSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Class_Key_NameA(core::mem::transmute(classguid), core::mem::transmute(pszkeyname), core::mem::transmute(pullength), core::mem::transmute(ulflags)) + CM_Get_Class_Key_NameA(core::mem::transmute(classguid), core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Class_Key_NameW(classguid: *const windows_core::GUID, pszkeyname: windows_core::PWSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET { +pub unsafe fn CM_Get_Class_Key_NameW(classguid: *const windows_core::GUID, pszkeyname: Option, pullength: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Key_NameW(classguid : *const windows_core::GUID, pszkeyname : windows_core::PWSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Class_Key_NameW(core::mem::transmute(classguid), core::mem::transmute(pszkeyname), core::mem::transmute(pullength), core::mem::transmute(ulflags)) + CM_Get_Class_Key_NameW(core::mem::transmute(classguid), core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Class_Key_Name_ExA(classguid: *const windows_core::GUID, pszkeyname: windows_core::PSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Class_Key_Name_ExA(classguid: *const windows_core::GUID, pszkeyname: Option, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Key_Name_ExA(classguid : *const windows_core::GUID, pszkeyname : windows_core::PSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Key_Name_ExA(core::mem::transmute(classguid), core::mem::transmute(pszkeyname), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Class_Key_Name_ExA(core::mem::transmute(classguid), core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Class_Key_Name_ExW(classguid: *const windows_core::GUID, pszkeyname: windows_core::PWSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Class_Key_Name_ExW(classguid: *const windows_core::GUID, pszkeyname: Option, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Key_Name_ExW(classguid : *const windows_core::GUID, pszkeyname : windows_core::PWSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Key_Name_ExW(core::mem::transmute(classguid), core::mem::transmute(pszkeyname), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Class_Key_Name_ExW(core::mem::transmute(classguid), core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Class_NameA(classguid: *const windows_core::GUID, buffer: windows_core::PSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET { +pub unsafe fn CM_Get_Class_NameA(classguid: *const windows_core::GUID, buffer: Option, pullength: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_NameA(classguid : *const windows_core::GUID, buffer : windows_core::PSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Class_NameA(core::mem::transmute(classguid), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags)) + CM_Get_Class_NameA(core::mem::transmute(classguid), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Class_NameW(classguid: *const windows_core::GUID, buffer: windows_core::PWSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET { +pub unsafe fn CM_Get_Class_NameW(classguid: *const windows_core::GUID, buffer: Option, pullength: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_NameW(classguid : *const windows_core::GUID, buffer : windows_core::PWSTR, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Class_NameW(core::mem::transmute(classguid), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags)) + CM_Get_Class_NameW(core::mem::transmute(classguid), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Class_Name_ExA(classguid: *const windows_core::GUID, buffer: windows_core::PSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Class_Name_ExA(classguid: *const windows_core::GUID, buffer: Option, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Name_ExA(classguid : *const windows_core::GUID, buffer : windows_core::PSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Name_ExA(core::mem::transmute(classguid), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Class_Name_ExA(core::mem::transmute(classguid), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Class_Name_ExW(classguid: *const windows_core::GUID, buffer: windows_core::PWSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Class_Name_ExW(classguid: *const windows_core::GUID, buffer: Option, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Name_ExW(classguid : *const windows_core::GUID, buffer : windows_core::PWSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Name_ExW(core::mem::transmute(classguid), core::mem::transmute(buffer), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Class_Name_ExW(core::mem::transmute(classguid), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_Class_PropertyW(classguid: *const windows_core::GUID, propertykey: *const super::super::Foundation::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::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Class_PropertyW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags)) + CM_Get_Class_PropertyW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags)) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn CM_Get_Class_Property_ExW(classguid: *const windows_core::GUID, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Class_Property_ExW(classguid: *const windows_core::GUID, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Property_ExW(classguid : *const windows_core::GUID, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Property_ExW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Class_Property_ExW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Class_Property_Keys(classguid: *const windows_core::GUID, propertykeyarray: Option<*mut super::super::Foundation::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::super::Foundation:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Class_Property_Keys(core::mem::transmute(classguid), core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags)) + CM_Get_Class_Property_Keys(core::mem::transmute(classguid), core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Class_Property_Keys_Ex(classguid: *const windows_core::GUID, propertykeyarray: Option<*mut super::super::Foundation::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Class_Property_Keys_Ex(classguid: *const windows_core::GUID, propertykeyarray: Option<*mut super::super::Foundation::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Property_Keys_Ex(classguid : *const windows_core::GUID, propertykeyarray : *mut super::super::Foundation:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Property_Keys_Ex(core::mem::transmute(classguid), core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Class_Property_Keys_Ex(core::mem::transmute(classguid), core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option) -> 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(core::mem::transmute(classguid), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Class_Registry_PropertyA(core::mem::transmute(classguid), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option) -> 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(core::mem::transmute(classguid), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Class_Registry_PropertyW(core::mem::transmute(classguid), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Depth(puldepth: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -380,9 +380,9 @@ pub unsafe fn CM_Get_Depth(puldepth: *mut u32, dndevinst: u32, ulflags: u32) -> CM_Get_Depth(core::mem::transmute(puldepth), core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Depth_Ex(puldepth: *mut u32, dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Depth_Ex(puldepth: *mut u32, dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Depth_Ex(puldepth : *mut u32, dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Depth_Ex(core::mem::transmute(puldepth), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Depth_Ex(core::mem::transmute(puldepth), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_DevNode_Custom_PropertyA(dndevinst: u32, pszcustompropertyname: P1, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32) -> CONFIGRET @@ -390,7 +390,7 @@ where P1: 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(core::mem::transmute(dndevinst), pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) + CM_Get_DevNode_Custom_PropertyA(core::mem::transmute(dndevinst), pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] pub unsafe fn CM_Get_DevNode_Custom_PropertyW(dndevinst: u32, pszcustompropertyname: P1, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32) -> CONFIGRET @@ -398,65 +398,65 @@ where P1: 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(core::mem::transmute(dndevinst), pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) + CM_Get_DevNode_Custom_PropertyW(core::mem::transmute(dndevinst), pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_DevNode_Custom_Property_ExA(dndevinst: u32, pszcustompropertyname: P1, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_DevNode_Custom_Property_ExA(dndevinst: u32, pszcustompropertyname: P1, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: 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(core::mem::transmute(dndevinst), pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_DevNode_Custom_Property_ExA(core::mem::transmute(dndevinst), pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_DevNode_Custom_Property_ExW(dndevinst: u32, pszcustompropertyname: P1, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_DevNode_Custom_Property_ExW(dndevinst: u32, pszcustompropertyname: P1, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: 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(core::mem::transmute(dndevinst), pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_DevNode_Custom_Property_ExW(core::mem::transmute(dndevinst), pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_DevNode_PropertyW(dndevinst: u32, propertykey: *const super::super::Foundation::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::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_DevNode_PropertyW(core::mem::transmute(dndevinst), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags)) + CM_Get_DevNode_PropertyW(core::mem::transmute(dndevinst), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags)) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn CM_Get_DevNode_Property_ExW(dndevinst: u32, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_DevNode_Property_ExW(dndevinst: u32, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Property_ExW(dndevinst : u32, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Property_ExW(core::mem::transmute(dndevinst), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_DevNode_Property_ExW(core::mem::transmute(dndevinst), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_DevNode_Property_Keys(dndevinst: u32, propertykeyarray: Option<*mut super::super::Foundation::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Property_Keys(dndevinst : u32, propertykeyarray : *mut super::super::Foundation:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_DevNode_Property_Keys(core::mem::transmute(dndevinst), core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags)) + CM_Get_DevNode_Property_Keys(core::mem::transmute(dndevinst), core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_DevNode_Property_Keys_Ex(dndevinst: u32, propertykeyarray: Option<*mut super::super::Foundation::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_DevNode_Property_Keys_Ex(dndevinst: u32, propertykeyarray: Option<*mut super::super::Foundation::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Property_Keys_Ex(dndevinst : u32, propertykeyarray : *mut super::super::Foundation:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Property_Keys_Ex(core::mem::transmute(dndevinst), core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_DevNode_Property_Keys_Ex(core::mem::transmute(dndevinst), core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) + CM_Get_DevNode_Registry_PropertyA(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(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(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags)) + CM_Get_DevNode_Registry_PropertyW(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(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 { +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: Option) -> 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(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_DevNode_Registry_Property_ExA(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option) -> 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(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_DevNode_Registry_Property_ExW(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(pulregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_DevNode_Status(pulstatus: *mut CM_DEVNODE_STATUS_FLAGS, pulproblemnumber: *mut CM_PROB, dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -464,9 +464,9 @@ pub unsafe fn CM_Get_DevNode_Status(pulstatus: *mut CM_DEVNODE_STATUS_FLAGS, pul CM_Get_DevNode_Status(core::mem::transmute(pulstatus), core::mem::transmute(pulproblemnumber), core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_DevNode_Status_Ex(pulstatus: *mut CM_DEVNODE_STATUS_FLAGS, pulproblemnumber: *mut CM_PROB, dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_DevNode_Status_Ex(pulstatus: *mut CM_DEVNODE_STATUS_FLAGS, pulproblemnumber: *mut CM_PROB, dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Status_Ex(pulstatus : *mut CM_DEVNODE_STATUS_FLAGS, pulproblemnumber : *mut CM_PROB, dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Status_Ex(core::mem::transmute(pulstatus), core::mem::transmute(pulproblemnumber), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_DevNode_Status_Ex(core::mem::transmute(pulstatus), core::mem::transmute(pulproblemnumber), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Device_IDA(dndevinst: u32, buffer: &mut [u8], ulflags: u32) -> CONFIGRET { @@ -479,14 +479,14 @@ pub unsafe fn CM_Get_Device_IDW(dndevinst: u32, buffer: &mut [u16], ulflags: u32 CM_Get_Device_IDW(core::mem::transmute(dndevinst), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Device_ID_ExA(dndevinst: u32, buffer: &mut [u8], ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Device_ID_ExA(dndevinst: u32, buffer: &mut [u8], ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_ExA(dndevinst : u32, buffer : windows_core::PSTR, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_ExA(core::mem::transmute(dndevinst), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_ID_ExA(core::mem::transmute(dndevinst), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Device_ID_ExW(dndevinst: u32, buffer: &mut [u16], ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Device_ID_ExW(dndevinst: u32, buffer: &mut [u16], ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_ExW(dndevinst : u32, buffer : windows_core::PWSTR, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_ExW(core::mem::transmute(dndevinst), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_ID_ExW(core::mem::transmute(dndevinst), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Device_ID_ListA(pszfilter: P0, buffer: &mut [u8], ulflags: u32) -> CONFIGRET @@ -505,20 +505,20 @@ where CM_Get_Device_ID_ListW(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Device_ID_List_ExA(pszfilter: P0, buffer: &mut [u8], ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_ID_List_ExA(pszfilter: P0, buffer: &mut [u8], ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_List_ExA(pszfilter : windows_core::PCSTR, buffer : windows_core::PSTR, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_List_ExA(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_ID_List_ExA(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Device_ID_List_ExW(pszfilter: P0, buffer: &mut [u16], ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_ID_List_ExW(pszfilter: P0, buffer: &mut [u16], ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_List_ExW(pszfilter : windows_core::PCWSTR, buffer : windows_core::PWSTR, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_List_ExW(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_ID_List_ExW(pszfilter.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Device_ID_List_SizeA(pullen: *mut u32, pszfilter: P1, ulflags: u32) -> CONFIGRET @@ -537,20 +537,20 @@ where CM_Get_Device_ID_List_SizeW(core::mem::transmute(pullen), pszfilter.param().abi(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Device_ID_List_Size_ExA(pullen: *mut u32, pszfilter: P1, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_ID_List_Size_ExA(pullen: *mut u32, pszfilter: P1, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_List_Size_ExA(pullen : *mut u32, pszfilter : windows_core::PCSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_List_Size_ExA(core::mem::transmute(pullen), pszfilter.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_ID_List_Size_ExA(core::mem::transmute(pullen), pszfilter.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Device_ID_List_Size_ExW(pullen: *mut u32, pszfilter: P1, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_ID_List_Size_ExW(pullen: *mut u32, pszfilter: P1, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_List_Size_ExW(pullen : *mut u32, pszfilter : windows_core::PCWSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_List_Size_ExW(core::mem::transmute(pullen), pszfilter.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_ID_List_Size_ExW(core::mem::transmute(pullen), pszfilter.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Device_ID_Size(pullen: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -558,9 +558,9 @@ pub unsafe fn CM_Get_Device_ID_Size(pullen: *mut u32, dndevinst: u32, ulflags: u CM_Get_Device_ID_Size(core::mem::transmute(pullen), core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Device_ID_Size_Ex(pullen: *mut u32, dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Device_ID_Size_Ex(pullen: *mut u32, dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_Size_Ex(pullen : *mut u32, dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_Size_Ex(core::mem::transmute(pullen), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_ID_Size_Ex(core::mem::transmute(pullen), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Device_Interface_AliasA(pszdeviceinterface: P0, aliasinterfaceguid: *const windows_core::GUID, pszaliasdeviceinterface: windows_core::PSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET @@ -579,20 +579,20 @@ where CM_Get_Device_Interface_AliasW(pszdeviceinterface.param().abi(), core::mem::transmute(aliasinterfaceguid), core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Device_Interface_Alias_ExA(pszdeviceinterface: P0, aliasinterfaceguid: *const windows_core::GUID, pszaliasdeviceinterface: windows_core::PSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_Interface_Alias_ExA(pszdeviceinterface: P0, aliasinterfaceguid: *const windows_core::GUID, pszaliasdeviceinterface: windows_core::PSTR, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_Alias_ExA(pszdeviceinterface : windows_core::PCSTR, aliasinterfaceguid : *const windows_core::GUID, pszaliasdeviceinterface : windows_core::PSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_Alias_ExA(pszdeviceinterface.param().abi(), core::mem::transmute(aliasinterfaceguid), core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_Interface_Alias_ExA(pszdeviceinterface.param().abi(), core::mem::transmute(aliasinterfaceguid), core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Device_Interface_Alias_ExW(pszdeviceinterface: P0, aliasinterfaceguid: *const windows_core::GUID, pszaliasdeviceinterface: windows_core::PWSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_Interface_Alias_ExW(pszdeviceinterface: P0, aliasinterfaceguid: *const windows_core::GUID, pszaliasdeviceinterface: windows_core::PWSTR, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_Alias_ExW(pszdeviceinterface : windows_core::PCWSTR, aliasinterfaceguid : *const windows_core::GUID, pszaliasdeviceinterface : windows_core::PWSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_Alias_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(aliasinterfaceguid), core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_Interface_Alias_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(aliasinterfaceguid), core::mem::transmute(pszaliasdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Device_Interface_ListA(interfaceclassguid: *const windows_core::GUID, pdeviceid: P1, buffer: &mut [u8], ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET @@ -611,20 +611,20 @@ where CM_Get_Device_Interface_ListW(core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Device_Interface_List_ExA(interfaceclassguid: *const windows_core::GUID, pdeviceid: P1, buffer: &mut [u8], ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_Interface_List_ExA(interfaceclassguid: *const windows_core::GUID, pdeviceid: P1, buffer: &mut [u8], ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_List_ExA(interfaceclassguid : *const windows_core::GUID, pdeviceid : windows_core::PCSTR, buffer : windows_core::PSTR, bufferlen : u32, ulflags : CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_List_ExA(core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_Interface_List_ExA(core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Device_Interface_List_ExW(interfaceclassguid: *const windows_core::GUID, pdeviceid: P1, buffer: &mut [u16], ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_Interface_List_ExW(interfaceclassguid: *const windows_core::GUID, pdeviceid: P1, buffer: &mut [u16], ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_List_ExW(interfaceclassguid : *const windows_core::GUID, pdeviceid : windows_core::PCWSTR, buffer : windows_core::PWSTR, bufferlen : u32, ulflags : CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_List_ExW(core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_Interface_List_ExW(core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Device_Interface_List_SizeA(pullen: *mut u32, interfaceclassguid: *const windows_core::GUID, pdeviceid: P2, ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET @@ -643,20 +643,20 @@ where CM_Get_Device_Interface_List_SizeW(core::mem::transmute(pullen), core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Device_Interface_List_Size_ExA(pullen: *mut u32, interfaceclassguid: *const windows_core::GUID, pdeviceid: P2, ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_Interface_List_Size_ExA(pullen: *mut u32, interfaceclassguid: *const windows_core::GUID, pdeviceid: P2, ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine: Option) -> CONFIGRET where P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_List_Size_ExA(pullen : *mut u32, interfaceclassguid : *const windows_core::GUID, pdeviceid : windows_core::PCSTR, ulflags : CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_List_Size_ExA(core::mem::transmute(pullen), core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_Interface_List_Size_ExA(core::mem::transmute(pullen), core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Device_Interface_List_Size_ExW(pullen: *mut u32, interfaceclassguid: *const windows_core::GUID, pdeviceid: P2, ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_Interface_List_Size_ExW(pullen: *mut u32, interfaceclassguid: *const windows_core::GUID, pdeviceid: P2, ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine: Option) -> CONFIGRET where P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_List_Size_ExW(pullen : *mut u32, interfaceclassguid : *const windows_core::GUID, pdeviceid : windows_core::PCWSTR, ulflags : CM_GET_DEVICE_INTERFACE_LIST_FLAGS, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_List_Size_ExW(core::mem::transmute(pullen), core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_Interface_List_Size_ExW(core::mem::transmute(pullen), core::mem::transmute(interfaceclassguid), pdeviceid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -665,16 +665,16 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_PropertyW(pszdeviceinterface : windows_core::PCWSTR, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Device_Interface_PropertyW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags)) + CM_Get_Device_Interface_PropertyW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags)) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn CM_Get_Device_Interface_Property_ExW(pszdeviceinterface: P0, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_Interface_Property_ExW(pszdeviceinterface: P0, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET 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::super::Foundation:: 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(), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykey), core::mem::transmute(propertytype), core::mem::transmute(propertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffersize), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface: P0, propertykeyarray: Option<*mut super::super::Foundation::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32) -> CONFIGRET @@ -682,25 +682,25 @@ 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::super::Foundation:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags)) + CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Device_Interface_Property_Keys_ExW(pszdeviceinterface: P0, propertykeyarray: Option<*mut super::super::Foundation::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_Device_Interface_Property_Keys_ExW(pszdeviceinterface: P0, propertykeyarray: Option<*mut super::super::Foundation::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET 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::super::Foundation:: 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(core::ptr::null_mut())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Device_Interface_Property_Keys_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertykeycount), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) + CM_Get_First_Log_Conf(core::mem::transmute(plclogconf.unwrap_or(core::mem::zeroed())), core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_First_Log_Conf_Ex(plclogconf: Option<*mut usize>, dndevinst: u32, ulflags: CM_LOG_CONF, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_First_Log_Conf_Ex(plclogconf: Option<*mut usize>, dndevinst: u32, ulflags: CM_LOG_CONF, hmachine: Option) -> 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(core::ptr::null_mut())), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_First_Log_Conf_Ex(core::mem::transmute(plclogconf.unwrap_or(core::mem::zeroed())), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Global_State(pulstate: *mut u32, ulflags: u32) -> CONFIGRET { @@ -708,9 +708,9 @@ pub unsafe fn CM_Get_Global_State(pulstate: *mut u32, ulflags: u32) -> CONFIGRET CM_Get_Global_State(core::mem::transmute(pulstate), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Global_State_Ex(pulstate: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Global_State_Ex(pulstate: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Global_State_Ex(pulstate : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Global_State_Ex(core::mem::transmute(pulstate), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Global_State_Ex(core::mem::transmute(pulstate), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_HW_Prof_FlagsA(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32) -> CONFIGRET @@ -729,20 +729,20 @@ where CM_Get_HW_Prof_FlagsW(pdeviceid.param().abi(), core::mem::transmute(ulhardwareprofile), core::mem::transmute(pulvalue), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_HW_Prof_Flags_ExA(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_HW_Prof_Flags_ExA(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_HW_Prof_Flags_ExA(pdeviceid : windows_core::PCSTR, ulhardwareprofile : u32, pulvalue : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_HW_Prof_Flags_ExA(pdeviceid.param().abi(), core::mem::transmute(ulhardwareprofile), core::mem::transmute(pulvalue), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_HW_Prof_Flags_ExA(pdeviceid.param().abi(), core::mem::transmute(ulhardwareprofile), core::mem::transmute(pulvalue), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_HW_Prof_Flags_ExW(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Get_HW_Prof_Flags_ExW(pdeviceid: P0, ulhardwareprofile: u32, pulvalue: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_HW_Prof_Flags_ExW(pdeviceid : windows_core::PCWSTR, ulhardwareprofile : u32, pulvalue : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_HW_Prof_Flags_ExW(pdeviceid.param().abi(), core::mem::transmute(ulhardwareprofile), core::mem::transmute(pulvalue), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_HW_Prof_Flags_ExW(pdeviceid.param().abi(), core::mem::transmute(ulhardwareprofile), core::mem::transmute(pulvalue), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Hardware_Profile_InfoA(ulindex: u32, phwprofileinfo: *mut HWPROFILEINFO_A, ulflags: u32) -> CONFIGRET { @@ -755,14 +755,14 @@ pub unsafe fn CM_Get_Hardware_Profile_InfoW(ulindex: u32, phwprofileinfo: *mut H CM_Get_Hardware_Profile_InfoW(core::mem::transmute(ulindex), core::mem::transmute(phwprofileinfo), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Hardware_Profile_Info_ExA(ulindex: u32, phwprofileinfo: *mut HWPROFILEINFO_A, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Hardware_Profile_Info_ExA(ulindex: u32, phwprofileinfo: *mut HWPROFILEINFO_A, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Hardware_Profile_Info_ExA(ulindex : u32, phwprofileinfo : *mut HWPROFILEINFO_A, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Hardware_Profile_Info_ExA(core::mem::transmute(ulindex), core::mem::transmute(phwprofileinfo), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Hardware_Profile_Info_ExA(core::mem::transmute(ulindex), core::mem::transmute(phwprofileinfo), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Hardware_Profile_Info_ExW(ulindex: u32, phwprofileinfo: *mut HWPROFILEINFO_W, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Hardware_Profile_Info_ExW(ulindex: u32, phwprofileinfo: *mut HWPROFILEINFO_W, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Hardware_Profile_Info_ExW(ulindex : u32, phwprofileinfo : *mut HWPROFILEINFO_W, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Hardware_Profile_Info_ExW(core::mem::transmute(ulindex), core::mem::transmute(phwprofileinfo), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Hardware_Profile_Info_ExW(core::mem::transmute(ulindex), core::mem::transmute(phwprofileinfo), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Log_Conf_Priority(lclogconf: usize, ppriority: *mut u32, ulflags: u32) -> CONFIGRET { @@ -770,29 +770,29 @@ pub unsafe fn CM_Get_Log_Conf_Priority(lclogconf: usize, ppriority: *mut u32, ul CM_Get_Log_Conf_Priority(core::mem::transmute(lclogconf), core::mem::transmute(ppriority), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Log_Conf_Priority_Ex(lclogconf: usize, ppriority: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Log_Conf_Priority_Ex(lclogconf: usize, ppriority: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Log_Conf_Priority_Ex(lclogconf : usize, ppriority : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Log_Conf_Priority_Ex(core::mem::transmute(lclogconf), core::mem::transmute(ppriority), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Log_Conf_Priority_Ex(core::mem::transmute(lclogconf), core::mem::transmute(ppriority), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Next_Log_Conf(plclogconf: Option<*mut usize>, lclogconf: usize, ulflags: u32) -> CONFIGRET { +pub unsafe fn CM_Get_Next_Log_Conf(plclogconf: Option<*mut usize>, lclogconf: usize, ulflags: Option) -> 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(core::ptr::null_mut())), core::mem::transmute(lclogconf), core::mem::transmute(ulflags)) + CM_Get_Next_Log_Conf(core::mem::transmute(plclogconf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lclogconf), core::mem::transmute(ulflags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Get_Next_Log_Conf_Ex(plclogconf: Option<*mut usize>, lclogconf: usize, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Next_Log_Conf_Ex(plclogconf: Option<*mut usize>, lclogconf: usize, ulflags: Option, hmachine: Option) -> 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(core::ptr::null_mut())), core::mem::transmute(lclogconf), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Next_Log_Conf_Ex(core::mem::transmute(plclogconf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lclogconf), core::mem::transmute(ulflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(prdresdes), core::mem::transmute(rdresdes), core::mem::transmute(forresource), core::mem::transmute(presourceid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ulflags)) + CM_Get_Next_Res_Des(core::mem::transmute(prdresdes), core::mem::transmute(rdresdes), core::mem::transmute(forresource), core::mem::transmute(presourceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 { +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: Option) -> 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(core::mem::transmute(prdresdes), core::mem::transmute(rdresdes), core::mem::transmute(forresource), core::mem::transmute(presourceid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Next_Res_Des_Ex(core::mem::transmute(prdresdes), core::mem::transmute(rdresdes), core::mem::transmute(forresource), core::mem::transmute(presourceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Parent(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -800,9 +800,9 @@ pub unsafe fn CM_Get_Parent(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32) CM_Get_Parent(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Parent_Ex(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Parent_Ex(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Parent_Ex(pdndevinst : *mut u32, dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Parent_Ex(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Parent_Ex(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Res_Des_Data(rdresdes: usize, buffer: *mut core::ffi::c_void, bufferlen: u32, ulflags: u32) -> CONFIGRET { @@ -810,9 +810,9 @@ pub unsafe fn CM_Get_Res_Des_Data(rdresdes: usize, buffer: *mut core::ffi::c_voi CM_Get_Res_Des_Data(core::mem::transmute(rdresdes), core::mem::transmute(buffer), core::mem::transmute(bufferlen), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Res_Des_Data_Ex(rdresdes: usize, buffer: *mut core::ffi::c_void, bufferlen: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Res_Des_Data_Ex(rdresdes: usize, buffer: *mut core::ffi::c_void, bufferlen: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Res_Des_Data_Ex(rdresdes : usize, buffer : *mut core::ffi::c_void, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Res_Des_Data_Ex(core::mem::transmute(rdresdes), core::mem::transmute(buffer), core::mem::transmute(bufferlen), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Res_Des_Data_Ex(core::mem::transmute(rdresdes), core::mem::transmute(buffer), core::mem::transmute(bufferlen), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Res_Des_Data_Size(pulsize: *mut u32, rdresdes: usize, ulflags: u32) -> CONFIGRET { @@ -820,9 +820,9 @@ pub unsafe fn CM_Get_Res_Des_Data_Size(pulsize: *mut u32, rdresdes: usize, ulfla CM_Get_Res_Des_Data_Size(core::mem::transmute(pulsize), core::mem::transmute(rdresdes), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Res_Des_Data_Size_Ex(pulsize: *mut u32, rdresdes: usize, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Res_Des_Data_Size_Ex(pulsize: *mut u32, rdresdes: usize, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Res_Des_Data_Size_Ex(pulsize : *mut u32, rdresdes : usize, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Res_Des_Data_Size_Ex(core::mem::transmute(pulsize), core::mem::transmute(rdresdes), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Res_Des_Data_Size_Ex(core::mem::transmute(pulsize), core::mem::transmute(rdresdes), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Resource_Conflict_Count(clconflictlist: usize, pulcount: *mut u32) -> CONFIGRET { @@ -845,9 +845,9 @@ pub unsafe fn CM_Get_Sibling(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32) CM_Get_Sibling(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Get_Sibling_Ex(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Get_Sibling_Ex(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Sibling_Ex(pdndevinst : *mut u32, dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Sibling_Ex(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Get_Sibling_Ex(core::mem::transmute(pdndevinst), core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Get_Version() -> u16 { @@ -855,9 +855,9 @@ pub unsafe fn CM_Get_Version() -> u16 { CM_Get_Version() } #[inline] -pub unsafe fn CM_Get_Version_Ex(hmachine: isize) -> u16 { +pub unsafe fn CM_Get_Version_Ex(hmachine: Option) -> u16 { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Version_Ex(hmachine : isize) -> u16); - CM_Get_Version_Ex(core::mem::transmute(hmachine)) + CM_Get_Version_Ex(core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Intersect_Range_List(rlhold1: usize, rlhold2: usize, rlhnew: usize, ulflags: u32) -> CONFIGRET { @@ -875,9 +875,9 @@ pub unsafe fn CM_Is_Dock_Station_Present(pbpresent: *mut super::super::Foundatio CM_Is_Dock_Station_Present(core::mem::transmute(pbpresent)) } #[inline] -pub unsafe fn CM_Is_Dock_Station_Present_Ex(pbpresent: *mut super::super::Foundation::BOOL, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Is_Dock_Station_Present_Ex(pbpresent: *mut super::super::Foundation::BOOL, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Is_Dock_Station_Present_Ex(pbpresent : *mut super::super::Foundation:: BOOL, hmachine : isize) -> CONFIGRET); - CM_Is_Dock_Station_Present_Ex(core::mem::transmute(pbpresent), core::mem::transmute(hmachine)) + CM_Is_Dock_Station_Present_Ex(core::mem::transmute(pbpresent), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Is_Version_Available(wversion: u16) -> super::super::Foundation::BOOL { @@ -885,9 +885,9 @@ pub unsafe fn CM_Is_Version_Available(wversion: u16) -> super::super::Foundation CM_Is_Version_Available(core::mem::transmute(wversion)) } #[inline] -pub unsafe fn CM_Is_Version_Available_Ex(wversion: u16, hmachine: isize) -> super::super::Foundation::BOOL { +pub unsafe fn CM_Is_Version_Available_Ex(wversion: u16, hmachine: Option) -> super::super::Foundation::BOOL { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Is_Version_Available_Ex(wversion : u16, hmachine : isize) -> super::super::Foundation:: BOOL); - CM_Is_Version_Available_Ex(core::mem::transmute(wversion), core::mem::transmute(hmachine)) + CM_Is_Version_Available_Ex(core::mem::transmute(wversion), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Locate_DevNodeA(pdndevinst: *mut u32, pdeviceid: P1, ulflags: CM_LOCATE_DEVNODE_FLAGS) -> CONFIGRET @@ -906,20 +906,20 @@ where CM_Locate_DevNodeW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Locate_DevNode_ExA(pdndevinst: *mut u32, pdeviceid: P1, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Locate_DevNode_ExA(pdndevinst: *mut u32, pdeviceid: P1, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Locate_DevNode_ExA(pdndevinst : *mut u32, pdeviceid : windows_core::PCSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Locate_DevNode_ExA(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Locate_DevNode_ExA(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Locate_DevNode_ExW(pdndevinst: *mut u32, pdeviceid: P1, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Locate_DevNode_ExW(pdndevinst: *mut u32, pdeviceid: P1, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Locate_DevNode_ExW(pdndevinst : *mut u32, pdeviceid : windows_core::PCWSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Locate_DevNode_ExW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Locate_DevNode_ExW(core::mem::transmute(pdndevinst), pdeviceid.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_MapCrToWin32Err(cmreturncode: CONFIGRET, defaulterr: u32) -> u32 { @@ -937,9 +937,9 @@ pub unsafe fn CM_Modify_Res_Des(prdresdes: *mut usize, rdresdes: usize, resource CM_Modify_Res_Des(core::mem::transmute(prdresdes), core::mem::transmute(rdresdes), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Modify_Res_Des_Ex(prdresdes: *mut usize, rdresdes: usize, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Modify_Res_Des_Ex(prdresdes: *mut usize, rdresdes: usize, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Modify_Res_Des_Ex(prdresdes : *mut usize, rdresdes : usize, resourceid : u32, resourcedata : *const core::ffi::c_void, resourcelen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Modify_Res_Des_Ex(core::mem::transmute(prdresdes), core::mem::transmute(rdresdes), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Modify_Res_Des_Ex(core::mem::transmute(prdresdes), core::mem::transmute(rdresdes), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Move_DevNode(dnfromdevinst: u32, dntodevinst: u32, ulflags: u32) -> CONFIGRET { @@ -947,9 +947,9 @@ pub unsafe fn CM_Move_DevNode(dnfromdevinst: u32, dntodevinst: u32, ulflags: u32 CM_Move_DevNode(core::mem::transmute(dnfromdevinst), core::mem::transmute(dntodevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Move_DevNode_Ex(dnfromdevinst: u32, dntodevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Move_DevNode_Ex(dnfromdevinst: u32, dntodevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Move_DevNode_Ex(dnfromdevinst : u32, dntodevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Move_DevNode_Ex(core::mem::transmute(dnfromdevinst), core::mem::transmute(dntodevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Move_DevNode_Ex(core::mem::transmute(dnfromdevinst), core::mem::transmute(dntodevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Next_Range(preelement: *mut usize, pullstart: *mut u64, pullend: *mut u64, ulflags: u32) -> CONFIGRET { @@ -963,7 +963,7 @@ where P1: 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(core::ptr::null())), pszclassname.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkclass), core::mem::transmute(ulflags)) + CM_Open_Class_KeyA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), pszclassname.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkclass), core::mem::transmute(ulflags)) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -972,25 +972,25 @@ where P1: 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(core::ptr::null())), pszclassname.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkclass), core::mem::transmute(ulflags)) + CM_Open_Class_KeyW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), pszclassname.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkclass), core::mem::transmute(ulflags)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn CM_Open_Class_Key_ExA(classguid: Option<*const windows_core::GUID>, pszclassname: P1, samdesired: u32, disposition: u32, phkclass: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Open_Class_Key_ExA(classguid: Option<*const windows_core::GUID>, pszclassname: P1, samdesired: u32, disposition: u32, phkclass: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: 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(core::ptr::null())), pszclassname.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkclass), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Open_Class_Key_ExA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), pszclassname.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkclass), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn CM_Open_Class_Key_ExW(classguid: Option<*const windows_core::GUID>, pszclassname: P1, samdesired: u32, disposition: u32, phkclass: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Open_Class_Key_ExW(classguid: Option<*const windows_core::GUID>, pszclassname: P1, samdesired: u32, disposition: u32, phkclass: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: Option) -> CONFIGRET where P1: 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(core::ptr::null())), pszclassname.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkclass), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Open_Class_Key_ExW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), pszclassname.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkclass), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1000,9 +1000,9 @@ pub unsafe fn CM_Open_DevNode_Key(dndevnode: u32, samdesired: u32, ulhardwarepro } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn CM_Open_DevNode_Key_Ex(dndevnode: u32, samdesired: u32, ulhardwareprofile: u32, disposition: u32, phkdevice: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Open_DevNode_Key_Ex(dndevnode: u32, samdesired: u32, ulhardwareprofile: u32, disposition: u32, phkdevice: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_DevNode_Key_Ex(dndevnode : u32, samdesired : u32, ulhardwareprofile : u32, disposition : u32, phkdevice : *mut super::super::System::Registry:: HKEY, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Open_DevNode_Key_Ex(core::mem::transmute(dndevnode), core::mem::transmute(samdesired), core::mem::transmute(ulhardwareprofile), core::mem::transmute(disposition), core::mem::transmute(phkdevice), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Open_DevNode_Key_Ex(core::mem::transmute(dndevnode), core::mem::transmute(samdesired), core::mem::transmute(ulhardwareprofile), core::mem::transmute(disposition), core::mem::transmute(phkdevice), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1024,41 +1024,41 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn CM_Open_Device_Interface_Key_ExA(pszdeviceinterface: P0, samdesired: u32, disposition: u32, phkdeviceinterface: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Open_Device_Interface_Key_ExA(pszdeviceinterface: P0, samdesired: u32, disposition: u32, phkdeviceinterface: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_Device_Interface_Key_ExA(pszdeviceinterface : windows_core::PCSTR, samdesired : u32, disposition : u32, phkdeviceinterface : *mut super::super::System::Registry:: HKEY, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Open_Device_Interface_Key_ExA(pszdeviceinterface.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkdeviceinterface), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Open_Device_Interface_Key_ExA(pszdeviceinterface.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkdeviceinterface), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn CM_Open_Device_Interface_Key_ExW(pszdeviceinterface: P0, samdesired: u32, disposition: u32, phkdeviceinterface: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Open_Device_Interface_Key_ExW(pszdeviceinterface: P0, samdesired: u32, disposition: u32, phkdeviceinterface: *mut super::super::System::Registry::HKEY, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_Device_Interface_Key_ExW(pszdeviceinterface : windows_core::PCWSTR, samdesired : u32, disposition : u32, phkdeviceinterface : *mut super::super::System::Registry:: HKEY, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Open_Device_Interface_Key_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkdeviceinterface), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Open_Device_Interface_Key_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(disposition), core::mem::transmute(phkdeviceinterface), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(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()), core::mem::transmute(ulflags)) + CM_Query_And_Remove_SubTreeA(core::mem::transmute(dnancestor), core::mem::transmute(pvetotype.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(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(core::mem::transmute(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()), core::mem::transmute(ulflags)) + CM_Query_And_Remove_SubTreeW(core::mem::transmute(dnancestor), core::mem::transmute(pvetotype.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(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 { +pub unsafe fn CM_Query_And_Remove_SubTree_ExA(dnancestor: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u8]>, ulflags: u32, hmachine: Option) -> 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(core::mem::transmute(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()), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Query_And_Remove_SubTree_ExA(core::mem::transmute(dnancestor), core::mem::transmute(pvetotype.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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 { +pub unsafe fn CM_Query_And_Remove_SubTree_ExW(dnancestor: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u16]>, ulflags: u32, hmachine: Option) -> 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(core::mem::transmute(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()), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Query_And_Remove_SubTree_ExW(core::mem::transmute(dnancestor), core::mem::transmute(pvetotype.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Query_Arbitrator_Free_Data(pdata: *mut core::ffi::c_void, datalen: u32, dndevinst: u32, resourceid: u32, ulflags: u32) -> CONFIGRET { @@ -1066,9 +1066,9 @@ pub unsafe fn CM_Query_Arbitrator_Free_Data(pdata: *mut core::ffi::c_void, datal CM_Query_Arbitrator_Free_Data(core::mem::transmute(pdata), core::mem::transmute(datalen), core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Query_Arbitrator_Free_Data_Ex(pdata: *mut core::ffi::c_void, datalen: u32, dndevinst: u32, resourceid: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Query_Arbitrator_Free_Data_Ex(pdata: *mut core::ffi::c_void, datalen: u32, dndevinst: u32, resourceid: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_Arbitrator_Free_Data_Ex(pdata : *mut core::ffi::c_void, datalen : u32, dndevinst : u32, resourceid : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Query_Arbitrator_Free_Data_Ex(core::mem::transmute(pdata), core::mem::transmute(datalen), core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Query_Arbitrator_Free_Data_Ex(core::mem::transmute(pdata), core::mem::transmute(datalen), core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Query_Arbitrator_Free_Size(pulsize: *mut u32, dndevinst: u32, resourceid: u32, ulflags: u32) -> CONFIGRET { @@ -1076,9 +1076,9 @@ pub unsafe fn CM_Query_Arbitrator_Free_Size(pulsize: *mut u32, dndevinst: u32, r CM_Query_Arbitrator_Free_Size(core::mem::transmute(pulsize), core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Query_Arbitrator_Free_Size_Ex(pulsize: *mut u32, dndevinst: u32, resourceid: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Query_Arbitrator_Free_Size_Ex(pulsize: *mut u32, dndevinst: u32, resourceid: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_Arbitrator_Free_Size_Ex(pulsize : *mut u32, dndevinst : u32, resourceid : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Query_Arbitrator_Free_Size_Ex(core::mem::transmute(pulsize), core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Query_Arbitrator_Free_Size_Ex(core::mem::transmute(pulsize), core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Query_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRET { @@ -1086,14 +1086,14 @@ pub unsafe fn CM_Query_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRE CM_Query_Remove_SubTree(core::mem::transmute(dnancestor), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Query_Remove_SubTree_Ex(dnancestor: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Query_Remove_SubTree_Ex(dnancestor: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_Remove_SubTree_Ex(dnancestor : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Query_Remove_SubTree_Ex(core::mem::transmute(dnancestor), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Query_Remove_SubTree_Ex(core::mem::transmute(dnancestor), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Query_Resource_Conflict_List(pclconflictlist: *mut usize, dndevinst: u32, resourceid: CM_RESTYPE, resourcedata: *const core::ffi::c_void, resourcelen: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Query_Resource_Conflict_List(pclconflictlist: *mut usize, dndevinst: u32, resourceid: CM_RESTYPE, resourcedata: *const core::ffi::c_void, resourcelen: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_Resource_Conflict_List(pclconflictlist : *mut usize, dndevinst : u32, resourceid : CM_RESTYPE, resourcedata : *const core::ffi::c_void, resourcelen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Query_Resource_Conflict_List(core::mem::transmute(pclconflictlist), core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Query_Resource_Conflict_List(core::mem::transmute(pclconflictlist), core::mem::transmute(dndevinst), core::mem::transmute(resourceid), core::mem::transmute(resourcedata), core::mem::transmute(resourcelen), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Reenumerate_DevNode(dndevinst: u32, ulflags: CM_REENUMERATE_FLAGS) -> CONFIGRET { @@ -1101,9 +1101,9 @@ pub unsafe fn CM_Reenumerate_DevNode(dndevinst: u32, ulflags: CM_REENUMERATE_FLA CM_Reenumerate_DevNode(core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Reenumerate_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Reenumerate_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Reenumerate_DevNode_Ex(dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Reenumerate_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Reenumerate_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Register_Device_Driver(dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -1111,9 +1111,9 @@ pub unsafe fn CM_Register_Device_Driver(dndevinst: u32, ulflags: u32) -> CONFIGR CM_Register_Device_Driver(core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Register_Device_Driver_Ex(dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Register_Device_Driver_Ex(dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Register_Device_Driver_Ex(dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Register_Device_Driver_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Register_Device_Driver_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Register_Device_InterfaceA(dndevinst: u32, interfaceclassguid: *const windows_core::GUID, pszreference: P2, pszdeviceinterface: windows_core::PSTR, pullength: *mut u32, ulflags: u32) -> CONFIGRET @@ -1132,25 +1132,25 @@ where CM_Register_Device_InterfaceW(core::mem::transmute(dndevinst), core::mem::transmute(interfaceclassguid), pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Register_Device_Interface_ExA(dndevinst: u32, interfaceclassguid: *const windows_core::GUID, pszreference: P2, pszdeviceinterface: windows_core::PSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Register_Device_Interface_ExA(dndevinst: u32, interfaceclassguid: *const windows_core::GUID, pszreference: P2, pszdeviceinterface: windows_core::PSTR, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Register_Device_Interface_ExA(dndevinst : u32, interfaceclassguid : *const windows_core::GUID, pszreference : windows_core::PCSTR, pszdeviceinterface : windows_core::PSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Register_Device_Interface_ExA(core::mem::transmute(dndevinst), core::mem::transmute(interfaceclassguid), pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Register_Device_Interface_ExA(core::mem::transmute(dndevinst), core::mem::transmute(interfaceclassguid), pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Register_Device_Interface_ExW(dndevinst: u32, interfaceclassguid: *const windows_core::GUID, pszreference: P2, pszdeviceinterface: windows_core::PWSTR, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Register_Device_Interface_ExW(dndevinst: u32, interfaceclassguid: *const windows_core::GUID, pszreference: P2, pszdeviceinterface: windows_core::PWSTR, pullength: *mut u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Register_Device_Interface_ExW(dndevinst : u32, interfaceclassguid : *const windows_core::GUID, pszreference : windows_core::PCWSTR, pszdeviceinterface : windows_core::PWSTR, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Register_Device_Interface_ExW(core::mem::transmute(dndevinst), core::mem::transmute(interfaceclassguid), pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Register_Device_Interface_ExW(core::mem::transmute(dndevinst), core::mem::transmute(interfaceclassguid), pszreference.param().abi(), core::mem::transmute(pszdeviceinterface), core::mem::transmute(pullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(pfilter), core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pcallback), core::mem::transmute(pnotifycontext)) + CM_Register_Notification(core::mem::transmute(pfilter), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcallback), core::mem::transmute(pnotifycontext)) } #[inline] pub unsafe fn CM_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRET { @@ -1158,29 +1158,29 @@ pub unsafe fn CM_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRET { CM_Remove_SubTree(core::mem::transmute(dnancestor), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Remove_SubTree_Ex(dnancestor: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Remove_SubTree_Ex(dnancestor: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Remove_SubTree_Ex(dnancestor : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Remove_SubTree_Ex(core::mem::transmute(dnancestor), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Remove_SubTree_Ex(core::mem::transmute(dnancestor), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(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()), core::mem::transmute(ulflags)) + CM_Request_Device_EjectA(core::mem::transmute(dndevinst), core::mem::transmute(pvetotype.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(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(core::mem::transmute(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()), core::mem::transmute(ulflags)) + CM_Request_Device_EjectW(core::mem::transmute(dndevinst), core::mem::transmute(pvetotype.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(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 { +pub unsafe fn CM_Request_Device_Eject_ExA(dndevinst: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u8]>, ulflags: u32, hmachine: Option) -> 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(core::mem::transmute(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()), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Request_Device_Eject_ExA(core::mem::transmute(dndevinst), core::mem::transmute(pvetotype.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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 { +pub unsafe fn CM_Request_Device_Eject_ExW(dndevinst: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u16]>, ulflags: u32, hmachine: Option) -> 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(core::mem::transmute(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()), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Request_Device_Eject_ExW(core::mem::transmute(dndevinst), core::mem::transmute(pvetotype.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Request_Eject_PC() -> CONFIGRET { @@ -1188,9 +1188,9 @@ pub unsafe fn CM_Request_Eject_PC() -> CONFIGRET { CM_Request_Eject_PC() } #[inline] -pub unsafe fn CM_Request_Eject_PC_Ex(hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Request_Eject_PC_Ex(hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Eject_PC_Ex(hmachine : isize) -> CONFIGRET); - CM_Request_Eject_PC_Ex(core::mem::transmute(hmachine)) + CM_Request_Eject_PC_Ex(core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Run_Detection(ulflags: u32) -> CONFIGRET { @@ -1198,9 +1198,9 @@ pub unsafe fn CM_Run_Detection(ulflags: u32) -> CONFIGRET { CM_Run_Detection(core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Run_Detection_Ex(ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Run_Detection_Ex(ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Run_Detection_Ex(ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Run_Detection_Ex(core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Run_Detection_Ex(core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -1210,19 +1210,19 @@ pub unsafe fn CM_Set_Class_PropertyW(classguid: *const windows_core::GUID, prope } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn CM_Set_Class_Property_ExW(classguid: *const windows_core::GUID, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Set_Class_Property_ExW(classguid: *const windows_core::GUID, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_Class_Property_ExW(classguid : *const windows_core::GUID, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_Class_Property_ExW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(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(ulflags), core::mem::transmute(hmachine)) + CM_Set_Class_Property_ExW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(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(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option) -> 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(core::mem::transmute(classguid), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(ullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Set_Class_Registry_PropertyA(core::mem::transmute(classguid), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option) -> 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(core::mem::transmute(classguid), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(ullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Set_Class_Registry_PropertyW(core::mem::transmute(classguid), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Set_DevNode_Problem(dndevinst: u32, ulproblem: u32, ulflags: u32) -> CONFIGRET { @@ -1230,9 +1230,9 @@ pub unsafe fn CM_Set_DevNode_Problem(dndevinst: u32, ulproblem: u32, ulflags: u3 CM_Set_DevNode_Problem(core::mem::transmute(dndevinst), core::mem::transmute(ulproblem), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Set_DevNode_Problem_Ex(dndevinst: u32, ulproblem: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Set_DevNode_Problem_Ex(dndevinst: u32, ulproblem: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_Problem_Ex(dndevinst : u32, ulproblem : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_DevNode_Problem_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulproblem), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Set_DevNode_Problem_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulproblem), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -1242,29 +1242,29 @@ pub unsafe fn CM_Set_DevNode_PropertyW(dndevinst: u32, propertykey: *const super } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn CM_Set_DevNode_Property_ExW(dndevinst: u32, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Set_DevNode_Property_ExW(dndevinst: u32, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_Property_ExW(dndevinst : u32, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_DevNode_Property_ExW(core::mem::transmute(dndevinst), core::mem::transmute(propertykey), core::mem::transmute(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(ulflags), core::mem::transmute(hmachine)) + CM_Set_DevNode_Property_ExW(core::mem::transmute(dndevinst), core::mem::transmute(propertykey), core::mem::transmute(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(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(ullength), core::mem::transmute(ulflags)) + CM_Set_DevNode_Registry_PropertyA(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ullength), core::mem::transmute(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(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(ullength), core::mem::transmute(ulflags)) + CM_Set_DevNode_Registry_PropertyW(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ullength), core::mem::transmute(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 { +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: Option) -> 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(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(ullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Set_DevNode_Registry_Property_ExA(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option) -> 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(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), core::mem::transmute(ullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Set_DevNode_Registry_Property_ExW(core::mem::transmute(dndevinst), core::mem::transmute(ulproperty), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ullength), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -1277,12 +1277,12 @@ where } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn CM_Set_Device_Interface_Property_ExW(pszdeviceinterface: P0, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Set_Device_Interface_Property_ExW(pszdeviceinterface: P0, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_Device_Interface_Property_ExW(pszdeviceinterface : windows_core::PCWSTR, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykey), core::mem::transmute(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(ulflags), core::mem::transmute(hmachine)) + CM_Set_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykey), core::mem::transmute(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(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Set_HW_Prof(ulhardwareprofile: u32, ulflags: u32) -> CONFIGRET { @@ -1290,9 +1290,9 @@ pub unsafe fn CM_Set_HW_Prof(ulhardwareprofile: u32, ulflags: u32) -> CONFIGRET CM_Set_HW_Prof(core::mem::transmute(ulhardwareprofile), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Set_HW_Prof_Ex(ulhardwareprofile: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Set_HW_Prof_Ex(ulhardwareprofile: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_HW_Prof_Ex(ulhardwareprofile : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_HW_Prof_Ex(core::mem::transmute(ulhardwareprofile), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Set_HW_Prof_Ex(core::mem::transmute(ulhardwareprofile), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Set_HW_Prof_FlagsA(pdeviceid: P0, ulconfig: u32, ulvalue: u32, ulflags: u32) -> CONFIGRET @@ -1311,20 +1311,20 @@ where CM_Set_HW_Prof_FlagsW(pdeviceid.param().abi(), core::mem::transmute(ulconfig), core::mem::transmute(ulvalue), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Set_HW_Prof_Flags_ExA(pdeviceid: P0, ulconfig: u32, ulvalue: u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Set_HW_Prof_Flags_ExA(pdeviceid: P0, ulconfig: u32, ulvalue: u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_HW_Prof_Flags_ExA(pdeviceid : windows_core::PCSTR, ulconfig : u32, ulvalue : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_HW_Prof_Flags_ExA(pdeviceid.param().abi(), core::mem::transmute(ulconfig), core::mem::transmute(ulvalue), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Set_HW_Prof_Flags_ExA(pdeviceid.param().abi(), core::mem::transmute(ulconfig), core::mem::transmute(ulvalue), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Set_HW_Prof_Flags_ExW(pdeviceid: P0, ulconfig: u32, ulvalue: u32, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Set_HW_Prof_Flags_ExW(pdeviceid: P0, ulconfig: u32, ulvalue: u32, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_HW_Prof_Flags_ExW(pdeviceid : windows_core::PCWSTR, ulconfig : u32, ulvalue : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_HW_Prof_Flags_ExW(pdeviceid.param().abi(), core::mem::transmute(ulconfig), core::mem::transmute(ulvalue), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Set_HW_Prof_Flags_ExW(pdeviceid.param().abi(), core::mem::transmute(ulconfig), core::mem::transmute(ulvalue), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Setup_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -1332,9 +1332,9 @@ pub unsafe fn CM_Setup_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { CM_Setup_DevNode(core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Setup_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Setup_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Setup_DevNode_Ex(dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Setup_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Setup_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Test_Range_Available(ullstartvalue: u64, ullendvalue: u64, rlh: usize, ulflags: u32) -> CONFIGRET { @@ -1347,9 +1347,9 @@ pub unsafe fn CM_Uninstall_DevNode(dndevinst: u32, ulflags: u32) -> CONFIGRET { CM_Uninstall_DevNode(core::mem::transmute(dndevinst), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Uninstall_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { +pub unsafe fn CM_Uninstall_DevNode_Ex(dndevinst: u32, ulflags: u32, hmachine: Option) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Uninstall_DevNode_Ex(dndevinst : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Uninstall_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Uninstall_DevNode_Ex(core::mem::transmute(dndevinst), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CM_Unregister_Device_InterfaceA(pszdeviceinterface: P0, ulflags: u32) -> CONFIGRET @@ -1368,177 +1368,149 @@ where CM_Unregister_Device_InterfaceW(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn CM_Unregister_Device_Interface_ExA(pszdeviceinterface: P0, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Unregister_Device_Interface_ExA(pszdeviceinterface: P0, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Unregister_Device_Interface_ExA(pszdeviceinterface : windows_core::PCSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Unregister_Device_Interface_ExA(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Unregister_Device_Interface_ExA(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Unregister_Device_Interface_ExW(pszdeviceinterface: P0, ulflags: u32, hmachine: isize) -> CONFIGRET +pub unsafe fn CM_Unregister_Device_Interface_ExW(pszdeviceinterface: P0, ulflags: u32, hmachine: Option) -> CONFIGRET where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Unregister_Device_Interface_ExW(pszdeviceinterface : windows_core::PCWSTR, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Unregister_Device_Interface_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine)) + CM_Unregister_Device_Interface_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(hmachine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CM_Unregister_Notification(notifycontext: P0) -> CONFIGRET -where - P0: windows_core::Param, -{ +pub unsafe fn CM_Unregister_Notification(notifycontext: HCMNOTIFICATION) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Unregister_Notification(notifycontext : HCMNOTIFICATION) -> CONFIGRET); - CM_Unregister_Notification(notifycontext.param().abi()) + CM_Unregister_Notification(core::mem::transmute(notifycontext)) } #[inline] -pub unsafe fn DiInstallDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, driverinfodata: Option<*const SP_DRVINFO_DATA_V2_W>, flags: DIINSTALLDEVICE_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DiInstallDevice(hwndparent: Option, deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, driverinfodata: Option<*const SP_DRVINFO_DATA_V2_W>, flags: DIINSTALLDEVICE_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(driverinfodata.unwrap_or(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() + DiInstallDevice(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(driverinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DiInstallDriverA(hwndparent: P0, infpath: P1, flags: DIINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> +pub unsafe fn DiInstallDriverA(hwndparent: Option, infpath: P1, flags: DIINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() + DiInstallDriverA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), infpath.param().abi(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DiInstallDriverW(hwndparent: P0, infpath: P1, flags: DIINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> +pub unsafe fn DiInstallDriverW(hwndparent: Option, infpath: P1, flags: DIINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() + DiInstallDriverW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), infpath.param().abi(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DiRollbackDriver(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, hwndparent: P2, flags: DIROLLBACKDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn DiRollbackDriver(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, hwndparent: Option, flags: DIROLLBACKDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { 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(), core::mem::transmute(deviceinfodata), hwndparent.param().abi(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() + DiRollbackDriver(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DiShowUpdateDevice(hwndparent: Option, deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, flags: u32, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() + DiShowUpdateDevice(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DiShowUpdateDriver(hwndparent: P0, filepath: P1, flags: u32, needreboot: Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiShowUpdateDriver(hwndparent: Option, filepath: P1, flags: u32, needreboot: Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))) + DiShowUpdateDriver(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), filepath.param().abi(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))) } #[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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DiUninstallDevice(hwndparent: super::super::Foundation::HWND, deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, flags: u32, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() + DiUninstallDevice(core::mem::transmute(hwndparent), core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DiUninstallDriverA(hwndparent: P0, infpath: P1, flags: DIUNINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> +pub unsafe fn DiUninstallDriverA(hwndparent: Option, infpath: P1, flags: DIUNINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() + DiUninstallDriverA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), infpath.param().abi(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DiUninstallDriverW(hwndparent: P0, infpath: P1, flags: DIUNINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> +pub unsafe fn DiUninstallDriverW(hwndparent: Option, infpath: P1, flags: DIUNINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() + DiUninstallDriverW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), infpath.param().abi(), core::mem::transmute(flags), core::mem::transmute(needreboot.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InstallHinfSectionA(window: P0, modulehandle: P1, commandline: P2, showcommand: i32) +pub unsafe fn InstallHinfSectionA(window: super::super::Foundation::HWND, modulehandle: super::super::Foundation::HINSTANCE, commandline: P2, showcommand: i32) where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn InstallHinfSectionA(window : super::super::Foundation:: HWND, modulehandle : super::super::Foundation:: HINSTANCE, commandline : windows_core::PCSTR, showcommand : i32)); - InstallHinfSectionA(window.param().abi(), modulehandle.param().abi(), commandline.param().abi(), core::mem::transmute(showcommand)) + InstallHinfSectionA(core::mem::transmute(window), core::mem::transmute(modulehandle), commandline.param().abi(), core::mem::transmute(showcommand)) } #[inline] -pub unsafe fn InstallHinfSectionW(window: P0, modulehandle: P1, commandline: P2, showcommand: i32) +pub unsafe fn InstallHinfSectionW(window: super::super::Foundation::HWND, modulehandle: super::super::Foundation::HINSTANCE, commandline: P2, showcommand: i32) where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn InstallHinfSectionW(window : super::super::Foundation:: HWND, modulehandle : super::super::Foundation:: HINSTANCE, commandline : windows_core::PCWSTR, showcommand : i32)); - InstallHinfSectionW(window.param().abi(), modulehandle.param().abi(), commandline.param().abi(), core::mem::transmute(showcommand)) + InstallHinfSectionW(core::mem::transmute(window), core::mem::transmute(modulehandle), commandline.param().abi(), core::mem::transmute(showcommand)) } #[inline] -pub unsafe fn SetupAddInstallSectionToDiskSpaceListA(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupAddInstallSectionToDiskSpaceListA(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P3: 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(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupAddInstallSectionToDiskSpaceListA(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).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: P3, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupAddInstallSectionToDiskSpaceListW(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P3: 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(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupAddInstallSectionToDiskSpaceListW(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).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: P3, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupAddSectionToDiskSpaceListA(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P3: 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(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupAddSectionToDiskSpaceListA(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).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: P3, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupAddSectionToDiskSpaceListW(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P3: 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(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupAddSectionToDiskSpaceListW(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupAddToDiskSpaceListA(diskspace: *const core::ffi::c_void, targetfilespec: P1, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupAddToDiskSpaceListA(diskspace: *const core::ffi::c_void, targetfilespec: P1, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(diskspace), targetfilespec.param().abi(), core::mem::transmute(filesize), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupAddToDiskSpaceListA(core::mem::transmute(diskspace), targetfilespec.param().abi(), core::mem::transmute(filesize), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupAddToDiskSpaceListW(diskspace: *const core::ffi::c_void, targetfilespec: P1, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupAddToDiskSpaceListW(diskspace: *const core::ffi::c_void, targetfilespec: P1, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(diskspace), targetfilespec.param().abi(), core::mem::transmute(filesize), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupAddToDiskSpaceListW(core::mem::transmute(diskspace), targetfilespec.param().abi(), core::mem::transmute(filesize), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupAddToSourceListA(flags: u32, source: P1) -> windows_core::Result<()> @@ -1557,42 +1529,40 @@ where SetupAddToSourceListW(core::mem::transmute(flags), source.param().abi()).ok() } #[inline] -pub unsafe fn SetupAdjustDiskSpaceListA(diskspace: *const core::ffi::c_void, driveroot: P1, amount: i64, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupAdjustDiskSpaceListA(diskspace: *const core::ffi::c_void, driveroot: P1, amount: i64, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(diskspace), driveroot.param().abi(), core::mem::transmute(amount), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupAdjustDiskSpaceListA(core::mem::transmute(diskspace), driveroot.param().abi(), core::mem::transmute(amount), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupAdjustDiskSpaceListW(diskspace: *const core::ffi::c_void, driveroot: P1, amount: i64, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupAdjustDiskSpaceListW(diskspace: *const core::ffi::c_void, driveroot: P1, amount: i64, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(diskspace), driveroot.param().abi(), core::mem::transmute(amount), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupAdjustDiskSpaceListW(core::mem::transmute(diskspace), driveroot.param().abi(), core::mem::transmute(amount), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupBackupErrorA(hwndparent: P0, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 +pub unsafe fn SetupBackupErrorA(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupBackupErrorA(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCSTR, sourcefile : windows_core::PCSTR, targetfile : windows_core::PCSTR, win32errorcode : u32, style : u32) -> u32); - SetupBackupErrorA(hwndparent.param().abi(), dialogtitle.param().abi(), sourcefile.param().abi(), targetfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) + SetupBackupErrorA(core::mem::transmute(hwndparent), dialogtitle.param().abi(), sourcefile.param().abi(), targetfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) } #[inline] -pub unsafe fn SetupBackupErrorW(hwndparent: P0, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 +pub unsafe fn SetupBackupErrorW(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupBackupErrorW(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCWSTR, sourcefile : windows_core::PCWSTR, targetfile : windows_core::PCWSTR, win32errorcode : u32, style : u32) -> u32); - SetupBackupErrorW(hwndparent.param().abi(), dialogtitle.param().abi(), sourcefile.param().abi(), targetfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) + SetupBackupErrorW(core::mem::transmute(hwndparent), dialogtitle.param().abi(), sourcefile.param().abi(), targetfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) } #[inline] pub unsafe fn SetupCancelTemporarySourceList() -> windows_core::Result<()> { @@ -1615,20 +1585,14 @@ pub unsafe fn SetupCloseLog() { SetupCloseLog() } #[inline] -pub unsafe fn SetupCommitFileQueueA(owner: P0, queuehandle: *const core::ffi::c_void, msghandler: PSP_FILE_CALLBACK_A, context: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupCommitFileQueueA(owner: Option, queuehandle: *const core::ffi::c_void, msghandler: PSP_FILE_CALLBACK_A, context: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupCommitFileQueueA(owner : super::super::Foundation:: HWND, queuehandle : *const core::ffi::c_void, msghandler : PSP_FILE_CALLBACK_A, context : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupCommitFileQueueA(owner.param().abi(), core::mem::transmute(queuehandle), core::mem::transmute(msghandler), core::mem::transmute(context)).ok() + SetupCommitFileQueueA(core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), core::mem::transmute(queuehandle), core::mem::transmute(msghandler), core::mem::transmute(context)).ok() } #[inline] -pub unsafe fn SetupCommitFileQueueW(owner: P0, queuehandle: *const core::ffi::c_void, msghandler: PSP_FILE_CALLBACK_W, context: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupCommitFileQueueW(owner: Option, queuehandle: *const core::ffi::c_void, msghandler: PSP_FILE_CALLBACK_W, context: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupCommitFileQueueW(owner : super::super::Foundation:: HWND, queuehandle : *const core::ffi::c_void, msghandler : PSP_FILE_CALLBACK_W, context : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupCommitFileQueueW(owner.param().abi(), core::mem::transmute(queuehandle), core::mem::transmute(msghandler), core::mem::transmute(context)).ok() + SetupCommitFileQueueW(core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), core::mem::transmute(queuehandle), core::mem::transmute(msghandler), core::mem::transmute(context)).ok() } #[inline] pub unsafe fn SetupConfigureWmiFromInfSectionA(infhandle: *const core::ffi::c_void, sectionname: P1, flags: u32) -> super::super::Foundation::BOOL @@ -1647,9 +1611,8 @@ where SetupConfigureWmiFromInfSectionW(core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SetupCopyErrorA(hwndparent: P0, dialogtitle: P1, diskname: P2, pathtosource: P3, sourcefile: P4, targetpathfile: P5, win32errorcode: u32, style: u32, pathbuffer: Option<&mut [u8]>, pathrequiredsize: Option<*mut u32>) -> u32 +pub unsafe fn SetupCopyErrorA(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, diskname: P2, pathtosource: P3, sourcefile: P4, targetpathfile: P5, win32errorcode: u32, style: u32, pathbuffer: Option<&mut [u8]>, pathrequiredsize: Option<*mut u32>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, @@ -1657,12 +1620,11 @@ 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(), core::mem::transmute(win32errorcode), core::mem::transmute(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()))) + SetupCopyErrorA(core::mem::transmute(hwndparent), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(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::mem::zeroed()))) } #[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 +pub unsafe fn SetupCopyErrorW(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, diskname: P2, pathtosource: P3, sourcefile: P4, targetpathfile: P5, win32errorcode: u32, style: u32, pathbuffer: Option<&mut [u16]>, pathrequiredsize: Option<*mut u32>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, @@ -1670,7 +1632,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(), core::mem::transmute(win32errorcode), core::mem::transmute(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()))) + SetupCopyErrorW(core::mem::transmute(hwndparent), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(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::mem::zeroed()))) } #[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<()> @@ -1686,8 +1648,8 @@ where core::mem::transmute(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())), + core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(destinationinffilenamecomponent.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -1705,20 +1667,20 @@ where core::mem::transmute(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())), + core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(destinationinffilenamecomponent.unwrap_or(core::mem::zeroed())), ) .ok() } #[inline] -pub unsafe fn SetupCreateDiskSpaceListA(reserved1: Option<*const core::ffi::c_void>, reserved2: u32, flags: u32) -> *mut core::ffi::c_void { +pub unsafe fn SetupCreateDiskSpaceListA(reserved1: Option<*const core::ffi::c_void>, reserved2: Option, 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(core::ptr::null())), core::mem::transmute(reserved2), core::mem::transmute(flags)) + SetupCreateDiskSpaceListA(core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SetupCreateDiskSpaceListW(reserved1: Option<*const core::ffi::c_void>, reserved2: u32, flags: u32) -> *mut core::ffi::c_void { +pub unsafe fn SetupCreateDiskSpaceListW(reserved1: Option<*const core::ffi::c_void>, reserved2: Option, 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(core::ptr::null())), core::mem::transmute(reserved2), core::mem::transmute(flags)) + SetupCreateDiskSpaceListW(core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] pub unsafe fn SetupDecompressOrCopyFileA(sourcefilename: P0, targetfilename: P1, compressiontype: Option<*const FILE_COMPRESSION_TYPE>) -> u32 @@ -1727,7 +1689,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(core::ptr::null()))) + SetupDecompressOrCopyFileA(sourcefilename.param().abi(), targetfilename.param().abi(), core::mem::transmute(compressiontype.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetupDecompressOrCopyFileW(sourcefilename: P0, targetfilename: P1, compressiontype: Option<*const FILE_COMPRESSION_TYPE>) -> u32 @@ -1736,7 +1698,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(core::ptr::null()))) + SetupDecompressOrCopyFileW(sourcefilename.param().abi(), targetfilename.param().abi(), core::mem::transmute(compressiontype.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetupDefaultQueueCallbackA(context: *const core::ffi::c_void, notification: u32, param1: usize, param2: usize) -> u32 { @@ -1749,24 +1711,22 @@ pub unsafe fn SetupDefaultQueueCallbackW(context: *const core::ffi::c_void, noti SetupDefaultQueueCallbackW(core::mem::transmute(context), core::mem::transmute(notification), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] -pub unsafe fn SetupDeleteErrorA(hwndparent: P0, dialogtitle: P1, file: P2, win32errorcode: u32, style: u32) -> u32 +pub unsafe fn SetupDeleteErrorA(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, file: P2, win32errorcode: u32, style: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDeleteErrorA(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCSTR, file : windows_core::PCSTR, win32errorcode : u32, style : u32) -> u32); - SetupDeleteErrorA(hwndparent.param().abi(), dialogtitle.param().abi(), file.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) + SetupDeleteErrorA(core::mem::transmute(hwndparent), dialogtitle.param().abi(), file.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) } #[inline] -pub unsafe fn SetupDeleteErrorW(hwndparent: P0, dialogtitle: P1, file: P2, win32errorcode: u32, style: u32) -> u32 +pub unsafe fn SetupDeleteErrorW(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, file: P2, win32errorcode: u32, style: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDeleteErrorW(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCWSTR, file : windows_core::PCWSTR, win32errorcode : u32, style : u32) -> u32); - SetupDeleteErrorW(hwndparent.param().abi(), dialogtitle.param().abi(), file.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) + SetupDeleteErrorW(core::mem::transmute(hwndparent), dialogtitle.param().abi(), file.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) } #[inline] pub unsafe fn SetupDestroyDiskSpaceList(diskspace: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1774,12 +1734,9 @@ pub unsafe fn SetupDestroyDiskSpaceList(diskspace: *mut core::ffi::c_void) -> wi SetupDestroyDiskSpaceList(core::mem::transmute(diskspace)).ok() } #[inline] -pub unsafe fn SetupDiAskForOEMDisk(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiAskForOEMDisk(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> { 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(core::ptr::null()))).ok() + SetupDiAskForOEMDisk(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiBuildClassInfoList(flags: u32, classguidlist: Option<&mut [windows_core::GUID]>, requiredsize: *mut u32) -> windows_core::Result<()> { @@ -1792,7 +1749,7 @@ where P4: 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(core::mem::transmute(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()), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiBuildClassInfoListExA(core::mem::transmute(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()), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiBuildClassInfoListExW(flags: u32, classguidlist: Option<&mut [windows_core::GUID]>, requiredsize: *mut u32, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1800,39 +1757,27 @@ where P4: 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(core::mem::transmute(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()), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiBuildClassInfoListExW(core::mem::transmute(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()), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiBuildDriverInfoList(deviceinfoset: P0, deviceinfodata: Option<*mut SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiBuildDriverInfoList(deviceinfoset: HDEVINFO, deviceinfodata: Option<*mut SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(drivertype)).ok() + SetupDiBuildDriverInfoList(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(drivertype)).ok() } #[inline] -pub unsafe fn SetupDiCallClassInstaller(installfunction: DI_FUNCTION, deviceinfoset: P1, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetupDiCallClassInstaller(installfunction: DI_FUNCTION, deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiCallClassInstaller(installfunction : DI_FUNCTION, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiCallClassInstaller(core::mem::transmute(installfunction), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null()))).ok() + SetupDiCallClassInstaller(core::mem::transmute(installfunction), core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiCancelDriverInfoSearch(deviceinfoset: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiCancelDriverInfoSearch(deviceinfoset: HDEVINFO) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiCancelDriverInfoSearch(deviceinfoset : HDEVINFO) -> super::super::Foundation:: BOOL); - SetupDiCancelDriverInfoSearch(deviceinfoset.param().abi()).ok() + SetupDiCancelDriverInfoSearch(core::mem::transmute(deviceinfoset)).ok() } #[inline] -pub unsafe fn SetupDiChangeState(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiChangeState(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiChangeState(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiChangeState(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiChangeState(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[inline] pub unsafe fn SetupDiClassGuidsFromNameA(classname: P0, classguidlist: &mut [windows_core::GUID], requiredsize: *mut u32) -> windows_core::Result<()> @@ -1849,7 +1794,7 @@ where P4: 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(), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiClassGuidsFromNameExA(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiClassGuidsFromNameExW(classname: P0, classguidlist: &mut [windows_core::GUID], requiredsize: *mut u32, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1858,7 +1803,7 @@ where P4: 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(), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiClassGuidsFromNameExW(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), core::mem::transmute(requiredsize), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiClassGuidsFromNameW(classname: P0, classguidlist: &mut [windows_core::GUID], requiredsize: *mut u32) -> windows_core::Result<()> @@ -1871,7 +1816,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(core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiClassNameFromGuidA(core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiClassNameFromGuidExA(classguid: *const windows_core::GUID, classname: &mut [u8], requiredsize: Option<*mut u32>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1879,7 +1824,7 @@ where P4: 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(core::mem::transmute(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() + SetupDiClassNameFromGuidExA(core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiClassNameFromGuidExW(classguid: *const windows_core::GUID, classname: &mut [u16], requiredsize: Option<*mut u32>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1887,157 +1832,130 @@ where P4: 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(core::mem::transmute(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() + SetupDiClassNameFromGuidExW(core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiClassNameFromGuidW(core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SetupDiCreateDevRegKeyA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32, infhandle: Option<*const core::ffi::c_void>, infsectionname: P6) -> windows_core::Result +pub unsafe fn SetupDiCreateDevRegKeyA(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32, infhandle: Option<*const core::ffi::c_void>, infsectionname: P6) -> windows_core::Result where - P0: windows_core::Param, P6: 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(scope), core::mem::transmute(hwprofile), core::mem::transmute(keytype), core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), infsectionname.param().abi()); + let result__ = SetupDiCreateDevRegKeyA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(scope), core::mem::transmute(hwprofile), core::mem::transmute(keytype), core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), infsectionname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SetupDiCreateDevRegKeyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32, infhandle: Option<*const core::ffi::c_void>, infsectionname: P6) -> windows_core::Result +pub unsafe fn SetupDiCreateDevRegKeyW(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32, infhandle: Option<*const core::ffi::c_void>, infsectionname: P6) -> windows_core::Result where - P0: windows_core::Param, P6: 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(scope), core::mem::transmute(hwprofile), core::mem::transmute(keytype), core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), infsectionname.param().abi()); + let result__ = SetupDiCreateDevRegKeyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(scope), core::mem::transmute(hwprofile), core::mem::transmute(keytype), core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), infsectionname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiCreateDeviceInfoA(deviceinfoset: P0, devicename: P1, classguid: *const windows_core::GUID, devicedescription: P3, hwndparent: P4, creationflags: SETUP_DI_DEVICE_CREATION_FLAGS, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupDiCreateDeviceInfoA(deviceinfoset: HDEVINFO, devicename: P1, classguid: *const windows_core::GUID, devicedescription: P3, hwndparent: Option, creationflags: SETUP_DI_DEVICE_CREATION_FLAGS, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, - P4: 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(), core::mem::transmute(classguid), devicedescription.param().abi(), hwndparent.param().abi(), core::mem::transmute(creationflags), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiCreateDeviceInfoA(core::mem::transmute(deviceinfoset), devicename.param().abi(), core::mem::transmute(classguid), devicedescription.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(creationflags), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiCreateDeviceInfoList(classguid: Option<*const windows_core::GUID>, hwndparent: P1) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn SetupDiCreateDeviceInfoList(classguid: Option<*const windows_core::GUID>, hwndparent: Option) -> windows_core::Result { 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(core::ptr::null())), hwndparent.param().abi()); + let result__ = SetupDiCreateDeviceInfoList(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiCreateDeviceInfoListExA(classguid: Option<*const windows_core::GUID>, hwndparent: P1, machinename: P2, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn SetupDiCreateDeviceInfoListExA(classguid: Option<*const windows_core::GUID>, hwndparent: Option, machinename: P2, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result where - P1: windows_core::Param, P2: 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(core::ptr::null())), hwndparent.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); + let result__ = SetupDiCreateDeviceInfoListExA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiCreateDeviceInfoListExW(classguid: Option<*const windows_core::GUID>, hwndparent: P1, machinename: P2, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn SetupDiCreateDeviceInfoListExW(classguid: Option<*const windows_core::GUID>, hwndparent: Option, machinename: P2, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result where - P1: windows_core::Param, P2: 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(core::ptr::null())), hwndparent.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); + let result__ = SetupDiCreateDeviceInfoListExW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiCreateDeviceInfoW(deviceinfoset: P0, devicename: P1, classguid: *const windows_core::GUID, devicedescription: P3, hwndparent: P4, creationflags: SETUP_DI_DEVICE_CREATION_FLAGS, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupDiCreateDeviceInfoW(deviceinfoset: HDEVINFO, devicename: P1, classguid: *const windows_core::GUID, devicedescription: P3, hwndparent: Option, creationflags: SETUP_DI_DEVICE_CREATION_FLAGS, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, - P4: 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(), core::mem::transmute(classguid), devicedescription.param().abi(), hwndparent.param().abi(), core::mem::transmute(creationflags), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiCreateDeviceInfoW(core::mem::transmute(deviceinfoset), devicename.param().abi(), core::mem::transmute(classguid), devicedescription.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(creationflags), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiCreateDeviceInterfaceA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const windows_core::GUID, referencestring: P3, creationflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupDiCreateDeviceInterfaceA(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const windows_core::GUID, referencestring: P3, creationflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, P3: 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(interfaceclassguid), referencestring.param().abi(), core::mem::transmute(creationflags), core::mem::transmute(deviceinterfacedata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiCreateDeviceInterfaceA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(interfaceclassguid), referencestring.param().abi(), core::mem::transmute(creationflags), core::mem::transmute(deviceinterfacedata.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SetupDiCreateDeviceInterfaceRegKeyA(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: u32, samdesired: u32, infhandle: Option<*const core::ffi::c_void>, infsectionname: P5) -> windows_core::Result +pub unsafe fn SetupDiCreateDeviceInterfaceRegKeyA(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: Option, samdesired: u32, infhandle: Option<*const core::ffi::c_void>, infsectionname: P5) -> windows_core::Result where - P0: windows_core::Param, P5: 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(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(reserved), core::mem::transmute(samdesired), core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), infsectionname.param().abi()); + let result__ = SetupDiCreateDeviceInterfaceRegKeyA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), infsectionname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SetupDiCreateDeviceInterfaceRegKeyW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: u32, samdesired: u32, infhandle: Option<*const core::ffi::c_void>, infsectionname: P5) -> windows_core::Result +pub unsafe fn SetupDiCreateDeviceInterfaceRegKeyW(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: Option, samdesired: u32, infhandle: Option<*const core::ffi::c_void>, infsectionname: P5) -> windows_core::Result where - P0: windows_core::Param, P5: 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(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(reserved), core::mem::transmute(samdesired), core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), infsectionname.param().abi()); + let result__ = SetupDiCreateDeviceInterfaceRegKeyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), infsectionname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiCreateDeviceInterfaceW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const windows_core::GUID, referencestring: P3, creationflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupDiCreateDeviceInterfaceW(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const windows_core::GUID, referencestring: P3, creationflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, P3: 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(interfaceclassguid), referencestring.param().abi(), core::mem::transmute(creationflags), core::mem::transmute(deviceinterfacedata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiCreateDeviceInterfaceW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(interfaceclassguid), referencestring.param().abi(), core::mem::transmute(creationflags), core::mem::transmute(deviceinterfacedata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiDeleteDevRegKey(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiDeleteDevRegKey(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiDeleteDevRegKey(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, scope : u32, hwprofile : u32, keytype : u32) -> super::super::Foundation:: BOOL); - SetupDiDeleteDevRegKey(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata), core::mem::transmute(scope), core::mem::transmute(hwprofile), core::mem::transmute(keytype)).ok() + SetupDiDeleteDevRegKey(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(scope), core::mem::transmute(hwprofile), core::mem::transmute(keytype)).ok() } #[inline] -pub unsafe fn SetupDiDeleteDeviceInfo(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiDeleteDeviceInfo(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiDeleteDeviceInfo(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiDeleteDeviceInfo(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiDeleteDeviceInfo(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[inline] -pub unsafe fn SetupDiDeleteDeviceInterfaceData(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiDeleteDeviceInterfaceData(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiDeleteDeviceInterfaceData(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiDeleteDeviceInterfaceData(deviceinfoset.param().abi(), core::mem::transmute(deviceinterfacedata)).ok() + SetupDiDeleteDeviceInterfaceData(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata)).ok() } #[inline] -pub unsafe fn SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: Option) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, reserved : u32) -> super::super::Foundation:: BOOL); - SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset.param().abi(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(reserved)).ok() + SetupDiDeleteDeviceInterfaceRegKey(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -2046,73 +1964,52 @@ pub unsafe fn SetupDiDestroyClassImageList(classimagelistdata: *const SP_CLASSIM SetupDiDestroyClassImageList(core::mem::transmute(classimagelistdata)).ok() } #[inline] -pub unsafe fn SetupDiDestroyDeviceInfoList(deviceinfoset: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiDestroyDeviceInfoList(deviceinfoset: HDEVINFO) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiDestroyDeviceInfoList(deviceinfoset : HDEVINFO) -> super::super::Foundation:: BOOL); - SetupDiDestroyDeviceInfoList(deviceinfoset.param().abi()).ok() + SetupDiDestroyDeviceInfoList(core::mem::transmute(deviceinfoset)).ok() } #[inline] -pub unsafe fn SetupDiDestroyDriverInfoList(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiDestroyDriverInfoList(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(drivertype)).ok() + SetupDiDestroyDriverInfoList(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(drivertype)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetupDiDrawMiniIcon(hdc: P0, rc: super::super::Foundation::RECT, miniiconindex: i32, flags: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiDrawMiniIcon(hdc: super::super::Graphics::Gdi::HDC, rc: super::super::Foundation::RECT, miniiconindex: i32, flags: u32) -> i32 { windows_targets::link!("setupapi.dll" "system" fn SetupDiDrawMiniIcon(hdc : super::super::Graphics::Gdi:: HDC, rc : super::super::Foundation:: RECT, miniiconindex : i32, flags : u32) -> i32); - SetupDiDrawMiniIcon(hdc.param().abi(), core::mem::transmute(rc), core::mem::transmute(miniiconindex), core::mem::transmute(flags)) + SetupDiDrawMiniIcon(core::mem::transmute(hdc), core::mem::transmute(rc), core::mem::transmute(miniiconindex), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SetupDiEnumDeviceInfo(deviceinfoset: P0, memberindex: u32, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiEnumDeviceInfo(deviceinfoset: HDEVINFO, memberindex: u32, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiEnumDeviceInfo(deviceinfoset : HDEVINFO, memberindex : u32, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiEnumDeviceInfo(deviceinfoset.param().abi(), core::mem::transmute(memberindex), core::mem::transmute(deviceinfodata)).ok() + SetupDiEnumDeviceInfo(core::mem::transmute(deviceinfoset), core::mem::transmute(memberindex), core::mem::transmute(deviceinfodata)).ok() } #[inline] -pub unsafe fn SetupDiEnumDeviceInterfaces(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, interfaceclassguid: *const windows_core::GUID, memberindex: u32, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiEnumDeviceInterfaces(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, interfaceclassguid: *const windows_core::GUID, memberindex: u32, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(interfaceclassguid), core::mem::transmute(memberindex), core::mem::transmute(deviceinterfacedata)).ok() + SetupDiEnumDeviceInterfaces(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(interfaceclassguid), core::mem::transmute(memberindex), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiEnumDriverInfoA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE, memberindex: u32, driverinfodata: *mut SP_DRVINFO_DATA_V2_A) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(drivertype), core::mem::transmute(memberindex), core::mem::transmute(driverinfodata)).ok() + SetupDiEnumDriverInfoA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(drivertype), core::mem::transmute(memberindex), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiEnumDriverInfoW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE, memberindex: u32, driverinfodata: *mut SP_DRVINFO_DATA_V2_W) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(drivertype), core::mem::transmute(memberindex), core::mem::transmute(driverinfodata)).ok() + SetupDiEnumDriverInfoW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(drivertype), core::mem::transmute(memberindex), core::mem::transmute(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(core::mem::transmute(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() + SetupDiGetActualModelsSectionA(core::mem::transmute(context), core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + SetupDiGetActualModelsSectionW(core::mem::transmute(context), core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetActualSectionToInstallA(infhandle: *const core::ffi::c_void, infsectionname: P1, infsectionwithext: Option<&mut [u8]>, requiredsize: Option<*mut u32>, extension: Option<*mut windows_core::PSTR>) -> windows_core::Result<()> @@ -2120,7 +2017,7 @@ where P1: 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(core::mem::transmute(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() + SetupDiGetActualSectionToInstallA(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(extension.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -2132,12 +2029,12 @@ where SetupDiGetActualSectionToInstallExA( core::mem::transmute(infhandle), infsectionname.param().abi(), - core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), + core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), 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())), - core::mem::transmute(reserved.unwrap_or(core::ptr::null())), + core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(extension.unwrap_or(core::mem::zeroed())), + core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -2151,12 +2048,12 @@ where SetupDiGetActualSectionToInstallExW( core::mem::transmute(infhandle), infsectionname.param().abi(), - core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), + core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), 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())), - core::mem::transmute(reserved.unwrap_or(core::ptr::null())), + core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(extension.unwrap_or(core::mem::zeroed())), + core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -2166,17 +2063,17 @@ where P1: 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(core::mem::transmute(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() + SetupDiGetActualSectionToInstallW(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(extension.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(miniiconindex)).ok() + SetupDiGetClassBitmapIndex(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(classguid), core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetClassDescriptionA(core::mem::transmute(classguid), core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetClassDescriptionExA(classguid: *const windows_core::GUID, classdescription: &mut [u8], requiredsize: Option<*mut u32>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2184,7 +2081,7 @@ where P4: 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(core::mem::transmute(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() + SetupDiGetClassDescriptionExA(core::mem::transmute(classguid), core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetClassDescriptionExW(classguid: *const windows_core::GUID, classdescription: &mut [u16], requiredsize: Option<*mut u32>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2192,73 +2089,61 @@ where P4: 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(core::mem::transmute(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() + SetupDiGetClassDescriptionExW(core::mem::transmute(classguid), core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(classguid), core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetClassDescriptionW(core::mem::transmute(classguid), core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn SetupDiGetClassDevPropertySheetsA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, propertysheetheader: *const super::super::UI::Controls::PROPSHEETHEADERA_V2, propertysheetheaderpagelistsize: u32, requiredsize: Option<*mut u32>, propertysheettype: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetClassDevPropertySheetsA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, propertysheetheader: *const super::super::UI::Controls::PROPSHEETHEADERA_V2, propertysheetheaderpagelistsize: u32, requiredsize: Option<*mut u32>, propertysheettype: u32) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(propertysheetheader), core::mem::transmute(propertysheetheaderpagelistsize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertysheettype)).ok() + SetupDiGetClassDevPropertySheetsA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertysheetheader), core::mem::transmute(propertysheetheaderpagelistsize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertysheettype)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn SetupDiGetClassDevPropertySheetsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, propertysheetheader: *const super::super::UI::Controls::PROPSHEETHEADERW_V2, propertysheetheaderpagelistsize: u32, requiredsize: Option<*mut u32>, propertysheettype: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetClassDevPropertySheetsW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, propertysheetheader: *const super::super::UI::Controls::PROPSHEETHEADERW_V2, propertysheetheaderpagelistsize: u32, requiredsize: Option<*mut u32>, propertysheettype: u32) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(propertysheetheader), core::mem::transmute(propertysheetheaderpagelistsize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertysheettype)).ok() + SetupDiGetClassDevPropertySheetsW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertysheetheader), core::mem::transmute(propertysheetheaderpagelistsize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertysheettype)).ok() } #[inline] -pub unsafe fn SetupDiGetClassDevsA(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: P2, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS) -> windows_core::Result +pub unsafe fn SetupDiGetClassDevsA(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: Option, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS) -> windows_core::Result where P1: windows_core::Param, - P2: 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(core::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), core::mem::transmute(flags)); + let result__ = SetupDiGetClassDevsA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), enumerator.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiGetClassDevsExA(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: P2, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS, deviceinfoset: P4, machinename: P5, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn SetupDiGetClassDevsExA(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: Option, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS, deviceinfoset: Option, machinename: P5, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result where P1: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, P5: 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(core::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), core::mem::transmute(flags), deviceinfoset.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); + let result__ = SetupDiGetClassDevsExA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), enumerator.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(deviceinfoset.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiGetClassDevsExW(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: P2, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS, deviceinfoset: P4, machinename: P5, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn SetupDiGetClassDevsExW(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: Option, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS, deviceinfoset: Option, machinename: P5, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result where P1: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, P5: 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(core::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), core::mem::transmute(flags), deviceinfoset.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); + let result__ = SetupDiGetClassDevsExW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), enumerator.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(deviceinfoset.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiGetClassDevsW(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: P2, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS) -> windows_core::Result +pub unsafe fn SetupDiGetClassDevsW(classguid: Option<*const windows_core::GUID>, enumerator: P1, hwndparent: Option, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS) -> windows_core::Result where P1: windows_core::Param, - P2: 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(core::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), core::mem::transmute(flags)); + let result__ = SetupDiGetClassDevsW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), enumerator.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_UI_Controls")] @@ -2280,7 +2165,7 @@ where P1: 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(core::mem::transmute(classimagelistdata), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiGetClassImageListExA(core::mem::transmute(classimagelistdata), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -2289,23 +2174,17 @@ where P1: 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(core::mem::transmute(classimagelistdata), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiGetClassImageListExW(core::mem::transmute(classimagelistdata), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetClassInstallParamsA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, classinstallparams: Option<*mut SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32, requiredsize: Option<*mut u32>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(core::ptr::null_mut())), core::mem::transmute(classinstallparamssize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetClassInstallParamsA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparamssize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetClassInstallParamsW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, classinstallparams: Option<*mut SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32, requiredsize: Option<*mut u32>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(core::ptr::null_mut())), core::mem::transmute(classinstallparamssize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetClassInstallParamsW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparamssize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2314,12 +2193,12 @@ where P7: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyExW(classguid : *const windows_core::GUID, propertykey : *const super::super::Foundation:: 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(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(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())), core::mem::transmute(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiGetClassPropertyExW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetClassPropertyKeys(classguid: *const windows_core::GUID, propertykeyarray: Option<&mut [super::super::Foundation::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::super::Foundation:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyKeys(core::mem::transmute(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())), core::mem::transmute(flags)).ok() + SetupDiGetClassPropertyKeys(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } #[inline] pub unsafe fn SetupDiGetClassPropertyKeysExW(classguid: *const windows_core::GUID, propertykeyarray: Option<&mut [super::super::Foundation::DEVPROPKEY]>, requiredpropertykeycount: Option<*mut u32>, flags: u32, machinename: P5, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2327,13 +2206,13 @@ where P5: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyKeysExW(classguid : *const windows_core::GUID, propertykeyarray : *mut super::super::Foundation:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32, machinename : windows_core::PCWSTR, reserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyKeysExW(core::mem::transmute(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())), core::mem::transmute(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiGetClassPropertyKeysExW(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn SetupDiGetClassPropertyW(classguid: *const windows_core::GUID, propertykey: *const super::super::Foundation::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::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(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())), core::mem::transmute(flags)).ok() + SetupDiGetClassPropertyW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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: P6, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2341,7 +2220,7 @@ where P6: 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(core::mem::transmute(classguid), core::mem::transmute(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() + SetupDiGetClassRegistryPropertyA(core::mem::transmute(classguid), core::mem::transmute(property), core::mem::transmute(propertyregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).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: P6, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2349,192 +2228,130 @@ where P6: 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(core::mem::transmute(classguid), core::mem::transmute(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() + SetupDiGetClassRegistryPropertyW(core::mem::transmute(classguid), core::mem::transmute(property), core::mem::transmute(propertyregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiGetCustomDevicePropertyA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P2, flags: u32, propertyregdatatype: Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> +pub unsafe fn SetupDiGetCustomDevicePropertyA(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P2, flags: u32, propertyregdatatype: Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(deviceinfodata), custompropertyname.param().abi(), core::mem::transmute(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() + SetupDiGetCustomDevicePropertyA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), custompropertyname.param().abi(), core::mem::transmute(flags), core::mem::transmute(propertyregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiGetCustomDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P2, flags: u32, propertyregdatatype: Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> +pub unsafe fn SetupDiGetCustomDevicePropertyW(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P2, flags: u32, propertyregdatatype: Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(deviceinfodata), custompropertyname.param().abi(), core::mem::transmute(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() + SetupDiGetCustomDevicePropertyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), custompropertyname.param().abi(), core::mem::transmute(flags), core::mem::transmute(propertyregdatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiGetDeviceInfoListClass(deviceinfoset: P0, classguid: *mut windows_core::GUID) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInfoListClass(deviceinfoset: HDEVINFO, classguid: *mut windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInfoListClass(deviceinfoset : HDEVINFO, classguid : *mut windows_core::GUID) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInfoListClass(deviceinfoset.param().abi(), core::mem::transmute(classguid)).ok() + SetupDiGetDeviceInfoListClass(core::mem::transmute(deviceinfoset), core::mem::transmute(classguid)).ok() } #[inline] -pub unsafe fn SetupDiGetDeviceInfoListDetailA(deviceinfoset: P0, deviceinfosetdetaildata: *mut SP_DEVINFO_LIST_DETAIL_DATA_A) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInfoListDetailA(deviceinfoset: HDEVINFO, deviceinfosetdetaildata: *mut SP_DEVINFO_LIST_DETAIL_DATA_A) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInfoListDetailA(deviceinfoset : HDEVINFO, deviceinfosetdetaildata : *mut SP_DEVINFO_LIST_DETAIL_DATA_A) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInfoListDetailA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfosetdetaildata)).ok() + SetupDiGetDeviceInfoListDetailA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfosetdetaildata)).ok() } #[inline] -pub unsafe fn SetupDiGetDeviceInfoListDetailW(deviceinfoset: P0, deviceinfosetdetaildata: *mut SP_DEVINFO_LIST_DETAIL_DATA_W) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInfoListDetailW(deviceinfoset: HDEVINFO, deviceinfosetdetaildata: *mut SP_DEVINFO_LIST_DETAIL_DATA_W) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInfoListDetailW(deviceinfoset : HDEVINFO, deviceinfosetdetaildata : *mut SP_DEVINFO_LIST_DETAIL_DATA_W) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInfoListDetailW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfosetdetaildata)).ok() + SetupDiGetDeviceInfoListDetailW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfosetdetaildata)).ok() } #[inline] -pub unsafe fn SetupDiGetDeviceInstallParamsA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_A) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInstallParamsA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_A) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(deviceinstallparams)).ok() + SetupDiGetDeviceInstallParamsA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinstallparams)).ok() } #[inline] -pub unsafe fn SetupDiGetDeviceInstallParamsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_W) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInstallParamsW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_W) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(deviceinstallparams)).ok() + SetupDiGetDeviceInstallParamsW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInstanceIdA(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(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() + SetupDiGetDeviceInstanceIdA(core::mem::transmute(deviceinfoset), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiGetDeviceInstanceIdW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInstanceIdW(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(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() + SetupDiGetDeviceInstanceIdW(core::mem::transmute(deviceinfoset), core::mem::transmute(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::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInterfaceAlias(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, aliasinterfaceclassguid: *const windows_core::GUID, aliasdeviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfaceAlias(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, aliasinterfaceclassguid : *const windows_core::GUID, aliasdeviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfaceAlias(deviceinfoset.param().abi(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(aliasinterfaceclassguid), core::mem::transmute(aliasdeviceinterfacedata)).ok() + SetupDiGetDeviceInterfaceAlias(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(aliasinterfaceclassguid), core::mem::transmute(aliasdeviceinterfacedata)).ok() } #[inline] -pub unsafe fn SetupDiGetDeviceInterfaceDetailA(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata: Option<*mut SP_DEVICE_INTERFACE_DETAIL_DATA_A>, deviceinterfacedetaildatasize: u32, requiredsize: Option<*mut u32>, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInterfaceDetailA(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata: Option<*mut SP_DEVICE_INTERFACE_DETAIL_DATA_A>, deviceinterfacedetaildatasize: u32, requiredsize: Option<*mut u32>, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> { 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(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(deviceinterfacedetaildata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(deviceinterfacedetaildatasize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetDeviceInterfaceDetailA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(deviceinterfacedetaildata.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinterfacedetaildatasize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInterfaceDetailW(deviceinfoset: HDEVINFO, 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<()> { 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(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(deviceinterfacedetaildata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(deviceinterfacedetaildatasize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetDeviceInterfaceDetailW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(deviceinterfacedetaildata.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinterfacedetaildatasize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykeyarray: Option<&mut [super::super::Foundation::DEVPROPKEY]>, requiredpropertykeycount: Option<*mut u32>, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykeyarray: Option<&mut [super::super::Foundation::DEVPROPKEY]>, requiredpropertykeycount: Option<*mut u32>, flags: u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykeyarray : *mut super::super::Foundation:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset.param().abi(), core::mem::transmute(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())), core::mem::transmute(flags)).ok() + SetupDiGetDeviceInterfacePropertyKeys(core::mem::transmute(deviceinfoset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn SetupDiGetDeviceInterfacePropertyW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceInterfacePropertyW(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykey: *const super::super::Foundation::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 SetupDiGetDeviceInterfacePropertyW(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfacePropertyW(deviceinfoset.param().abi(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(propertykey), core::mem::transmute(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())), core::mem::transmute(flags)).ok() + SetupDiGetDeviceInterfacePropertyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(propertykey), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SetupDiGetDevicePropertyKeys(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykeyarray: Option<&mut [super::super::Foundation::DEVPROPKEY]>, requiredpropertykeycount: Option<*mut u32>, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDevicePropertyKeys(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, propertykeyarray: Option<&mut [super::super::Foundation::DEVPROPKEY]>, requiredpropertykeycount: Option<*mut u32>, flags: u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDevicePropertyKeys(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykeyarray : *mut super::super::Foundation:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDevicePropertyKeys(deviceinfoset.param().abi(), core::mem::transmute(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())), core::mem::transmute(flags)).ok() + SetupDiGetDevicePropertyKeys(core::mem::transmute(deviceinfoset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn SetupDiGetDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDevicePropertyW(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, propertykey: *const super::super::Foundation::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 SetupDiGetDevicePropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDevicePropertyW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata), core::mem::transmute(propertykey), core::mem::transmute(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())), core::mem::transmute(flags)).ok() + SetupDiGetDevicePropertyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(propertykey), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceRegistryPropertyA(deviceinfoset: HDEVINFO, 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<()> { 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(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() + SetupDiGetDeviceRegistryPropertyA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(property), core::mem::transmute(propertyregdatatype.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDeviceRegistryPropertyW(deviceinfoset: HDEVINFO, 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<()> { 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(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() + SetupDiGetDeviceRegistryPropertyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(property), core::mem::transmute(propertyregdatatype.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDriverInfoDetailA(deviceinfoset: HDEVINFO, 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<()> { 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(core::ptr::null())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinfodetaildata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(driverinfodetaildatasize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetDriverInfoDetailA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinfodetaildata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodetaildatasize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDriverInfoDetailW(deviceinfoset: HDEVINFO, 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<()> { 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(core::ptr::null())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinfodetaildata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(driverinfodetaildatasize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetDriverInfoDetailW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinfodetaildata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodetaildatasize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDriverInstallParamsA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinstallparams: *mut SP_DRVINSTALL_PARAMS) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinstallparams)).ok() + SetupDiGetDriverInstallParamsA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetDriverInstallParamsW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinstallparams: *mut SP_DRVINSTALL_PARAMS) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinstallparams)).ok() + SetupDiGetDriverInstallParamsW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata), core::mem::transmute(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(core::mem::transmute(hwprofile), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetHwProfileFriendlyNameA(core::mem::transmute(hwprofile), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileFriendlyNameExA(hwprofile: u32, friendlyname: &mut [u8], requiredsize: Option<*mut u32>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2542,7 +2359,7 @@ where P4: 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(core::mem::transmute(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() + SetupDiGetHwProfileFriendlyNameExA(core::mem::transmute(hwprofile), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileFriendlyNameExW(hwprofile: u32, friendlyname: &mut [u16], requiredsize: Option<*mut u32>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2550,17 +2367,17 @@ where P4: 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(core::mem::transmute(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() + SetupDiGetHwProfileFriendlyNameExW(core::mem::transmute(hwprofile), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(hwprofile), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetHwProfileFriendlyNameW(core::mem::transmute(hwprofile), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(requiredsize), core::mem::transmute(currentlyactiveindex.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetHwProfileList(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), core::mem::transmute(requiredsize), core::mem::transmute(currentlyactiveindex.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileListExA(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: Option<*mut u32>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2568,7 +2385,7 @@ where P4: 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(), core::mem::transmute(requiredsize), core::mem::transmute(currentlyactiveindex.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiGetHwProfileListExA(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), core::mem::transmute(requiredsize), core::mem::transmute(currentlyactiveindex.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileListExW(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: Option<*mut u32>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2576,7 +2393,7 @@ where P4: 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(), core::mem::transmute(requiredsize), core::mem::transmute(currentlyactiveindex.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiGetHwProfileListExW(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), core::mem::transmute(requiredsize), core::mem::transmute(currentlyactiveindex.unwrap_or(core::mem::zeroed())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetINFClassA(infname: P0, classguid: *mut windows_core::GUID, classname: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2584,7 +2401,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(), core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetINFClassA(infname.param().abi(), core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiGetINFClassW(infname: P0, classguid: *mut windows_core::GUID, classname: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2592,121 +2409,93 @@ 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(), core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiGetINFClassW(infname.param().abi(), core::mem::transmute(classguid), core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiGetSelectedDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetSelectedDevice(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetSelectedDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiGetSelectedDevice(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiGetSelectedDevice(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[inline] -pub unsafe fn SetupDiGetSelectedDriverA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *mut SP_DRVINFO_DATA_V2_A) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetSelectedDriverA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *mut SP_DRVINFO_DATA_V2_A) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(driverinfodata)).ok() + SetupDiGetSelectedDriverA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetSelectedDriverW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *mut SP_DRVINFO_DATA_V2_W) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(driverinfodata)).ok() + SetupDiGetSelectedDriverW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata)).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn SetupDiGetWizardPage(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, installwizarddata: *const SP_INSTALLWIZARD_DATA, pagetype: u32, flags: u32) -> super::super::UI::Controls::HPROPSHEETPAGE -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiGetWizardPage(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, installwizarddata: *const SP_INSTALLWIZARD_DATA, pagetype: u32, flags: u32) -> super::super::UI::Controls::HPROPSHEETPAGE { 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(core::ptr::null())), core::mem::transmute(installwizarddata), core::mem::transmute(pagetype), core::mem::transmute(flags)) + SetupDiGetWizardPage(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(installwizarddata), core::mem::transmute(pagetype), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SetupDiInstallClassA(hwndparent: P0, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SetupDiInstallClassA(hwndparent: Option, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(filequeue.unwrap_or(core::ptr::null()))).ok() + SetupDiInstallClassA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), inffilename.param().abi(), core::mem::transmute(flags), core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed()))).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<()> +pub unsafe fn SetupDiInstallClassExA(hwndparent: Option, 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<()> where - P0: windows_core::Param, 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(), core::mem::transmute(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() + SetupDiInstallClassExA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), inffilename.param().abi(), core::mem::transmute(flags), core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed())), core::mem::transmute(interfaceclassguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).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<()> +pub unsafe fn SetupDiInstallClassExW(hwndparent: Option, 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<()> where - P0: windows_core::Param, 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(), core::mem::transmute(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() + SetupDiInstallClassExW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), inffilename.param().abi(), core::mem::transmute(flags), core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed())), core::mem::transmute(interfaceclassguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiInstallClassW(hwndparent: P0, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SetupDiInstallClassW(hwndparent: Option, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(filequeue.unwrap_or(core::ptr::null()))).ok() + SetupDiInstallClassW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), inffilename.param().abi(), core::mem::transmute(flags), core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiInstallDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiInstallDevice(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiInstallDevice(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiInstallDevice(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[inline] -pub unsafe fn SetupDiInstallDeviceInterfaces(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiInstallDeviceInterfaces(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallDeviceInterfaces(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiInstallDeviceInterfaces(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiInstallDeviceInterfaces(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[inline] -pub unsafe fn SetupDiInstallDriverFiles(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiInstallDriverFiles(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallDriverFiles(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiInstallDriverFiles(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiInstallDriverFiles(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[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(core::mem::transmute(classguid), core::mem::transmute(largeicon.unwrap_or(core::ptr::null_mut())), core::mem::transmute(miniiconindex.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiLoadClassIcon(core::mem::transmute(classguid), core::mem::transmute(largeicon.unwrap_or(core::mem::zeroed())), core::mem::transmute(miniiconindex.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SetupDiLoadDeviceIcon(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, cxicon: u32, cyicon: u32, flags: u32, hicon: *mut super::super::UI::WindowsAndMessaging::HICON) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiLoadDeviceIcon(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, cxicon: u32, cyicon: u32, flags: u32, hicon: *mut super::super::UI::WindowsAndMessaging::HICON) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiLoadDeviceIcon(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, cxicon : u32, cyicon : u32, flags : u32, hicon : *mut super::super::UI::WindowsAndMessaging:: HICON) -> super::super::Foundation:: BOOL); - SetupDiLoadDeviceIcon(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata), core::mem::transmute(cxicon), core::mem::transmute(cyicon), core::mem::transmute(flags), core::mem::transmute(hicon)).ok() + SetupDiLoadDeviceIcon(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(cxicon), core::mem::transmute(cyicon), core::mem::transmute(flags), core::mem::transmute(hicon)).ok() } #[cfg(feature = "Win32_System_Registry")] #[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(core::ptr::null())), core::mem::transmute(samdesired)); + let result__ = SetupDiOpenClassRegKey(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -2716,7 +2505,7 @@ where P3: 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(core::ptr::null())), core::mem::transmute(samdesired), core::mem::transmute(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); + let result__ = SetupDiOpenClassRegKeyExA(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -2726,147 +2515,104 @@ where P3: 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(core::ptr::null())), core::mem::transmute(samdesired), core::mem::transmute(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); + let result__ = SetupDiOpenClassRegKeyExW(core::mem::transmute(classguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SetupDiOpenDevRegKey(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32, samdesired: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiOpenDevRegKey(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32, samdesired: u32) -> windows_core::Result { windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenDevRegKey(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, scope : u32, hwprofile : u32, keytype : u32, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiOpenDevRegKey(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata), core::mem::transmute(scope), core::mem::transmute(hwprofile), core::mem::transmute(keytype), core::mem::transmute(samdesired)); + let result__ = SetupDiOpenDevRegKey(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(scope), core::mem::transmute(hwprofile), core::mem::transmute(keytype), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiOpenDeviceInfoA(deviceinfoset: P0, deviceinstanceid: P1, hwndparent: P2, openflags: u32, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupDiOpenDeviceInfoA(deviceinfoset: HDEVINFO, deviceinstanceid: P1, hwndparent: Option, openflags: u32, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - 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(), core::mem::transmute(openflags), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiOpenDeviceInfoA(core::mem::transmute(deviceinfoset), deviceinstanceid.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(openflags), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiOpenDeviceInfoW(deviceinfoset: P0, deviceinstanceid: P1, hwndparent: P2, openflags: u32, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupDiOpenDeviceInfoW(deviceinfoset: HDEVINFO, deviceinstanceid: P1, hwndparent: Option, openflags: u32, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - 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(), core::mem::transmute(openflags), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiOpenDeviceInfoW(core::mem::transmute(deviceinfoset), deviceinstanceid.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(openflags), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiOpenDeviceInterfaceA(deviceinfoset: P0, devicepath: P1, openflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupDiOpenDeviceInterfaceA(deviceinfoset: HDEVINFO, devicepath: P1, openflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(openflags), core::mem::transmute(deviceinterfacedata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiOpenDeviceInterfaceA(core::mem::transmute(deviceinfoset), devicepath.param().abi(), core::mem::transmute(openflags), core::mem::transmute(deviceinterfacedata.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SetupDiOpenDeviceInterfaceRegKey(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: u32, samdesired: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiOpenDeviceInterfaceRegKey(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: Option, samdesired: u32) -> windows_core::Result { windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenDeviceInterfaceRegKey(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, reserved : u32, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiOpenDeviceInterfaceRegKey(deviceinfoset.param().abi(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(reserved), core::mem::transmute(samdesired)); + let result__ = SetupDiOpenDeviceInterfaceRegKey(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetupDiOpenDeviceInterfaceW(deviceinfoset: P0, devicepath: P1, openflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupDiOpenDeviceInterfaceW(deviceinfoset: HDEVINFO, devicepath: P1, openflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(openflags), core::mem::transmute(deviceinterfacedata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiOpenDeviceInterfaceW(core::mem::transmute(deviceinfoset), devicepath.param().abi(), core::mem::transmute(openflags), core::mem::transmute(deviceinterfacedata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiRegisterCoDeviceInstallers(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiRegisterCoDeviceInstallers(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiRegisterCoDeviceInstallers(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiRegisterCoDeviceInstallers(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiRegisterCoDeviceInstallers(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[inline] -pub unsafe fn SetupDiRegisterDeviceInfo(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, flags: u32, compareproc: PSP_DETSIG_CMPPROC, comparecontext: Option<*const core::ffi::c_void>, dupdeviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiRegisterDeviceInfo(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA, flags: u32, compareproc: Option, comparecontext: Option<*const core::ffi::c_void>, dupdeviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> { 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(), core::mem::transmute(deviceinfodata), core::mem::transmute(flags), core::mem::transmute(compareproc), core::mem::transmute(comparecontext.unwrap_or(core::ptr::null())), core::mem::transmute(dupdeviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiRegisterDeviceInfo(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(flags), core::mem::transmute(compareproc.unwrap_or(core::mem::zeroed())), core::mem::transmute(comparecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(dupdeviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiRemoveDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiRemoveDevice(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL { windows_targets::link!("setupapi.dll" "system" fn SetupDiRemoveDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiRemoveDevice(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)) + SetupDiRemoveDevice(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)) } #[inline] -pub unsafe fn SetupDiRemoveDeviceInterface(deviceinfoset: P0, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiRemoveDeviceInterface(deviceinfoset: HDEVINFO, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiRemoveDeviceInterface(deviceinfoset : HDEVINFO, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiRemoveDeviceInterface(deviceinfoset.param().abi(), core::mem::transmute(deviceinterfacedata)).ok() + SetupDiRemoveDeviceInterface(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata)).ok() } #[inline] -pub unsafe fn SetupDiRestartDevices(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiRestartDevices(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiRestartDevices(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiRestartDevices(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiRestartDevices(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[inline] -pub unsafe fn SetupDiSelectBestCompatDrv(deviceinfoset: P0, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSelectBestCompatDrv(deviceinfoset: HDEVINFO, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + SetupDiSelectBestCompatDrv(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiSelectDevice(deviceinfoset: P0, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSelectDevice(deviceinfoset: HDEVINFO, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + SetupDiSelectDevice(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiSelectOEMDrv(hwndparent: P0, deviceinfoset: P1, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetupDiSelectOEMDrv(hwndparent: Option, deviceinfoset: HDEVINFO, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + SetupDiSelectOEMDrv(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetClassInstallParamsA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, classinstallparams: Option<*const SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(core::ptr::null())), core::mem::transmute(classinstallparamssize)).ok() + SetupDiSetClassInstallParamsA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetClassInstallParamsW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, classinstallparams: Option<*const SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(core::ptr::null())), core::mem::transmute(classinstallparamssize)).ok() + SetupDiSetClassInstallParamsW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(classinstallparamssize)).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2875,7 +2621,7 @@ where P6: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassPropertyExW(classguid : *const windows_core::GUID, propertykey : *const super::super::Foundation:: 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(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(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(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiSetClassPropertyExW(core::mem::transmute(classguid), core::mem::transmute(propertykey), core::mem::transmute(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(flags), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2889,7 +2635,7 @@ where P4: 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(core::mem::transmute(classguid), core::mem::transmute(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() + SetupDiSetClassRegistryPropertyA(core::mem::transmute(classguid), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupDiSetClassRegistryPropertyW(classguid: *const windows_core::GUID, property: u32, propertybuffer: Option<&[u8]>, machinename: P4, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2897,133 +2643,94 @@ where P4: 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(core::mem::transmute(classguid), core::mem::transmute(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() + SetupDiSetClassRegistryPropertyW(core::mem::transmute(classguid), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiSetDeviceInstallParamsA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_A) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDeviceInstallParamsA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_A) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(deviceinstallparams)).ok() + SetupDiSetDeviceInstallParamsA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinstallparams)).ok() } #[inline] -pub unsafe fn SetupDiSetDeviceInstallParamsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_W) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDeviceInstallParamsW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_W) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(deviceinstallparams)).ok() + SetupDiSetDeviceInstallParamsW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDeviceInterfaceDefault(deviceinfoset: HDEVINFO, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA, flags: u32, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupDiSetDeviceInterfaceDefault(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn SetupDiSetDeviceInterfacePropertyW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDeviceInterfacePropertyW(deviceinfoset: HDEVINFO, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, flags: u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceInterfacePropertyW(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceInterfacePropertyW(deviceinfoset.param().abi(), core::mem::transmute(deviceinterfacedata), core::mem::transmute(propertykey), core::mem::transmute(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(flags)).ok() + SetupDiSetDeviceInterfacePropertyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinterfacedata), core::mem::transmute(propertykey), core::mem::transmute(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(flags)).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn SetupDiSetDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDevicePropertyW(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA, propertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: Option<&[u8]>, flags: u32) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDevicePropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykey : *const super::super::Foundation:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDevicePropertyW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata), core::mem::transmute(propertykey), core::mem::transmute(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(flags)).ok() + SetupDiSetDevicePropertyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(propertykey), core::mem::transmute(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(flags)).ok() } #[inline] -pub unsafe fn SetupDiSetDeviceRegistryPropertyA(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, property: SETUP_DI_REGISTRY_PROPERTY, propertybuffer: Option<&[u8]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDeviceRegistryPropertyA(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA, property: SETUP_DI_REGISTRY_PROPERTY, propertybuffer: Option<&[u8]>) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceRegistryPropertyA(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, property : SETUP_DI_REGISTRY_PROPERTY, propertybuffer : *const u8, propertybuffersize : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceRegistryPropertyA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata), core::mem::transmute(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())).ok() + SetupDiSetDeviceRegistryPropertyA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(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())).ok() } #[inline] -pub unsafe fn SetupDiSetDeviceRegistryPropertyW(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, property: SETUP_DI_REGISTRY_PROPERTY, propertybuffer: Option<&[u8]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDeviceRegistryPropertyW(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA, property: SETUP_DI_REGISTRY_PROPERTY, propertybuffer: Option<&[u8]>) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceRegistryPropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, property : SETUP_DI_REGISTRY_PROPERTY, propertybuffer : *const u8, propertybuffersize : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceRegistryPropertyW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata), core::mem::transmute(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())).ok() + SetupDiSetDeviceRegistryPropertyW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata), core::mem::transmute(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())).ok() } #[inline] -pub unsafe fn SetupDiSetDriverInstallParamsA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinstallparams: *const SP_DRVINSTALL_PARAMS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDriverInstallParamsA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinstallparams: *const SP_DRVINSTALL_PARAMS) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinstallparams)).ok() + SetupDiSetDriverInstallParamsA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetDriverInstallParamsW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinstallparams: *const SP_DRVINSTALL_PARAMS) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinstallparams)).ok() + SetupDiSetDriverInstallParamsW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata), core::mem::transmute(driverinstallparams)).ok() } #[inline] -pub unsafe fn SetupDiSetSelectedDevice(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetSelectedDevice(deviceinfoset: HDEVINFO, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiSetSelectedDevice(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiSetSelectedDevice(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiSetSelectedDevice(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[inline] -pub unsafe fn SetupDiSetSelectedDriverA(deviceinfoset: P0, deviceinfodata: Option<*mut SP_DEVINFO_DATA>, driverinfodata: Option<*mut SP_DRVINFO_DATA_V2_A>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetSelectedDriverA(deviceinfoset: HDEVINFO, deviceinfodata: Option<*mut SP_DEVINFO_DATA>, driverinfodata: Option<*mut SP_DRVINFO_DATA_V2_A>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(driverinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiSetSelectedDriverA(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiSetSelectedDriverW(deviceinfoset: HDEVINFO, deviceinfodata: Option<*mut SP_DEVINFO_DATA>, driverinfodata: Option<*mut SP_DRVINFO_DATA_V2_W>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(driverinfodata.unwrap_or(core::ptr::null_mut()))).ok() + SetupDiSetSelectedDriverW(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(driverinfodata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupDiUnremoveDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupDiUnremoveDevice(deviceinfoset: HDEVINFO, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupDiUnremoveDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiUnremoveDevice(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata)).ok() + SetupDiUnremoveDevice(core::mem::transmute(deviceinfoset), core::mem::transmute(deviceinfodata)).ok() } #[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 { +pub unsafe fn SetupDuplicateDiskSpaceListA(diskspace: *const core::ffi::c_void, reserved1: Option<*const core::ffi::c_void>, reserved2: Option, 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(core::mem::transmute(diskspace), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2), core::mem::transmute(flags)) + SetupDuplicateDiskSpaceListA(core::mem::transmute(diskspace), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 { +pub unsafe fn SetupDuplicateDiskSpaceListW(diskspace: *const core::ffi::c_void, reserved1: Option<*const core::ffi::c_void>, reserved2: Option, 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(core::mem::transmute(diskspace), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2), core::mem::transmute(flags)) + SetupDuplicateDiskSpaceListW(core::mem::transmute(diskspace), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(infhandle), core::mem::transmute(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() + SetupEnumInfSectionsA(core::mem::transmute(infhandle), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(infhandle), core::mem::transmute(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() + SetupEnumInfSectionsW(core::mem::transmute(infhandle), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupFindFirstLineA(infhandle: *const core::ffi::c_void, section: P1, key: P2, context: *mut INFCONTEXT) -> windows_core::Result<()> @@ -3087,7 +2794,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(core::mem::transmute(context), core::mem::transmute(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() + SetupGetBinaryField(core::mem::transmute(context), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetFieldCount(context: *const INFCONTEXT) -> u32 { @@ -3108,7 +2815,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(core::ptr::null_mut())), core::mem::transmute(sourcefilesize), core::mem::transmute(targetfilesize), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(sourcefilesize), core::mem::transmute(targetfilesize), core::mem::transmute(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<()> @@ -3116,7 +2823,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(core::ptr::null_mut())), core::mem::transmute(sourcefilesize), core::mem::transmute(targetfilesize), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(sourcefilesize), core::mem::transmute(targetfilesize), core::mem::transmute(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 @@ -3144,7 +2851,7 @@ where P2: 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(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() + SetupGetInfDriverStoreLocationA(filename.param().abi(), core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), localename.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -3154,7 +2861,7 @@ where P2: 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(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() + SetupGetInfDriverStoreLocationW(filename.param().abi(), core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), localename.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetInfFileListA(directorypath: P0, infstyle: INF_STYLE, returnbuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3162,7 +2869,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(), core::mem::transmute(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() + SetupGetInfFileListA(directorypath.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetInfFileListW(directorypath: P0, infstyle: INF_STYLE, returnbuffer: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3170,17 +2877,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(), core::mem::transmute(infstyle), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupGetInfFileListW(directorypath.param().abi(), core::mem::transmute(infstyle), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(infspec), core::mem::transmute(searchcontrol), core::mem::transmute(returnbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnbuffersize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupGetInfInformationA(core::mem::transmute(infspec), core::mem::transmute(searchcontrol), core::mem::transmute(returnbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnbuffersize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(infspec), core::mem::transmute(searchcontrol), core::mem::transmute(returnbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnbuffersize), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() + SetupGetInfInformationW(core::mem::transmute(infspec), core::mem::transmute(searchcontrol), core::mem::transmute(returnbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnbuffersize), core::mem::transmute(requiredsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetInfPublishedNameA(driverstorelocation: P0, returnbuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3188,7 +2895,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(core::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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetInfPublishedNameW(driverstorelocation: P0, returnbuffer: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3196,7 +2903,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(core::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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetIntField(context: *const INFCONTEXT, fieldindex: u32, integervalue: *mut i32) -> windows_core::Result<()> { @@ -3242,7 +2949,7 @@ where P3: 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(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() + SetupGetLineTextA(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetLineTextW(context: Option<*const INFCONTEXT>, infhandle: Option<*const core::ffi::c_void>, section: P2, key: P3, returnbuffer: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3251,17 +2958,17 @@ where P3: 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(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() + SetupGetLineTextW(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).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(core::mem::transmute(context), core::mem::transmute(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() + SetupGetMultiSzFieldA(core::mem::transmute(context), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(context), core::mem::transmute(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() + SetupGetMultiSzFieldW(core::mem::transmute(context), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetNonInteractiveMode() -> super::super::Foundation::BOOL { @@ -3274,7 +2981,7 @@ where P2: 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(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), filename.param().abi(), core::mem::transmute(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() + SetupGetSourceFileLocationA(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), filename.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetSourceFileLocationW(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, filename: P2, sourceid: *mut u32, returnbuffer: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3282,7 +2989,7 @@ where P2: 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(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), filename.param().abi(), core::mem::transmute(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() + SetupGetSourceFileLocationW(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), filename.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetSourceFileSizeA(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, filename: P2, section: P3, filesize: *mut u32, roundingfactor: u32) -> windows_core::Result<()> @@ -3291,7 +2998,7 @@ where P3: 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(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), filename.param().abi(), section.param().abi(), core::mem::transmute(filesize), core::mem::transmute(roundingfactor)).ok() + SetupGetSourceFileSizeA(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), filename.param().abi(), section.param().abi(), core::mem::transmute(filesize), core::mem::transmute(roundingfactor)).ok() } #[inline] pub unsafe fn SetupGetSourceFileSizeW(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, filename: P2, section: P3, filesize: *mut u32, roundingfactor: u32) -> windows_core::Result<()> @@ -3300,27 +3007,27 @@ where P3: 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(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), filename.param().abi(), section.param().abi(), core::mem::transmute(filesize), core::mem::transmute(roundingfactor)).ok() + SetupGetSourceFileSizeW(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), filename.param().abi(), section.param().abi(), core::mem::transmute(filesize), core::mem::transmute(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(core::mem::transmute(infhandle), core::mem::transmute(sourceid), core::mem::transmute(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() + SetupGetSourceInfoA(core::mem::transmute(infhandle), core::mem::transmute(sourceid), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(infhandle), core::mem::transmute(sourceid), core::mem::transmute(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() + SetupGetSourceInfoW(core::mem::transmute(infhandle), core::mem::transmute(sourceid), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(context), core::mem::transmute(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() + SetupGetStringFieldA(core::mem::transmute(context), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(context), core::mem::transmute(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() + SetupGetStringFieldW(core::mem::transmute(context), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetTargetPathA(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, section: P2, returnbuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3328,7 +3035,7 @@ where P2: 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(core::mem::transmute(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() + SetupGetTargetPathA(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetTargetPathW(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, section: P2, returnbuffer: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3336,7 +3043,7 @@ where P2: 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(core::mem::transmute(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() + SetupGetTargetPathW(core::mem::transmute(infhandle), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupGetThreadLogToken() -> u64 { @@ -3344,21 +3051,14 @@ pub unsafe fn SetupGetThreadLogToken() -> u64 { SetupGetThreadLogToken() } #[inline] -pub unsafe fn SetupInitDefaultQueueCallback(ownerwindow: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn SetupInitDefaultQueueCallback(ownerwindow: Option) -> *mut core::ffi::c_void { windows_targets::link!("setupapi.dll" "system" fn SetupInitDefaultQueueCallback(ownerwindow : super::super::Foundation:: HWND) -> *mut core::ffi::c_void); - SetupInitDefaultQueueCallback(ownerwindow.param().abi()) + SetupInitDefaultQueueCallback(core::mem::transmute(ownerwindow.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetupInitDefaultQueueCallbackEx(ownerwindow: P0, alternateprogresswindow: P1, progressmessage: u32, reserved1: u32, reserved2: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetupInitDefaultQueueCallbackEx(ownerwindow: Option, alternateprogresswindow: Option, progressmessage: u32, reserved1: Option, reserved2: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { 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(), core::mem::transmute(progressmessage), core::mem::transmute(reserved1), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))) + SetupInitDefaultQueueCallbackEx(core::mem::transmute(ownerwindow.unwrap_or(core::mem::zeroed())), core::mem::transmute(alternateprogresswindow.unwrap_or(core::mem::zeroed())), core::mem::transmute(progressmessage), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetupInitializeFileLogA(logfilename: P0, flags: u32) -> *mut core::ffi::c_void @@ -3377,44 +3077,44 @@ where SetupInitializeFileLogW(logfilename.param().abi(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SetupInstallFileA(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P2, sourcepathroot: P3, destinationname: P4, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_A, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SetupInstallFileA(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P2, sourcepathroot: P3, destinationname: P4, copystyle: SP_COPY_STYLE, copymsghandler: Option, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null())), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), core::mem::transmute(copystyle), core::mem::transmute(copymsghandler), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + SetupInstallFileA(core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), core::mem::transmute(copystyle), core::mem::transmute(copymsghandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupInstallFileExA(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P2, sourcepathroot: P3, destinationname: P4, 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<()> +pub unsafe fn SetupInstallFileExA(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P2, sourcepathroot: P3, destinationname: P4, copystyle: SP_COPY_STYLE, copymsghandler: Option, context: Option<*const core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null())), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), core::mem::transmute(copystyle), core::mem::transmute(copymsghandler), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(filewasinuse)).ok() + SetupInstallFileExA(core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), core::mem::transmute(copystyle), core::mem::transmute(copymsghandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(filewasinuse)).ok() } #[inline] -pub unsafe fn SetupInstallFileExW(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P2, sourcepathroot: P3, destinationname: P4, 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<()> +pub unsafe fn SetupInstallFileExW(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P2, sourcepathroot: P3, destinationname: P4, copystyle: SP_COPY_STYLE, copymsghandler: Option, context: Option<*const core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null())), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), core::mem::transmute(copystyle), core::mem::transmute(copymsghandler), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(filewasinuse)).ok() + SetupInstallFileExW(core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), core::mem::transmute(copystyle), core::mem::transmute(copymsghandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(filewasinuse)).ok() } #[inline] -pub unsafe fn SetupInstallFileW(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P2, sourcepathroot: P3, destinationname: P4, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_W, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SetupInstallFileW(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P2, sourcepathroot: P3, destinationname: P4, copystyle: SP_COPY_STYLE, copymsghandler: Option, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null())), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), core::mem::transmute(copystyle), core::mem::transmute(copymsghandler), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + SetupInstallFileW(core::mem::transmute(infhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(infcontext.unwrap_or(core::mem::zeroed())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), core::mem::transmute(copystyle), core::mem::transmute(copymsghandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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: P3, sourcerootpath: P4, copyflags: u32) -> windows_core::Result<()> @@ -3423,7 +3123,7 @@ where P4: 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(core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), core::mem::transmute(filequeue), sectionname.param().abi(), sourcerootpath.param().abi(), core::mem::transmute(copyflags)).ok() + SetupInstallFilesFromInfSectionA(core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(filequeue), sectionname.param().abi(), sourcerootpath.param().abi(), core::mem::transmute(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: P3, sourcerootpath: P4, copyflags: u32) -> windows_core::Result<()> @@ -3432,33 +3132,53 @@ where P4: 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(core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), core::mem::transmute(filequeue), sectionname.param().abi(), sourcerootpath.param().abi(), core::mem::transmute(copyflags)).ok() + SetupInstallFilesFromInfSectionW(core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(filequeue), sectionname.param().abi(), sourcerootpath.param().abi(), core::mem::transmute(copyflags)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SetupInstallFromInfSectionA(owner: P0, infhandle: *const core::ffi::c_void, sectionname: P2, flags: u32, relativekeyroot: P4, sourcerootpath: P5, copyflags: u32, msghandler: PSP_FILE_CALLBACK_A, context: Option<*const core::ffi::c_void>, deviceinfoset: P9, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupInstallFromInfSectionA(owner: Option, infhandle: *const core::ffi::c_void, sectionname: P2, flags: u32, relativekeyroot: Option, sourcerootpath: P5, copyflags: u32, msghandler: Option, context: Option<*const core::ffi::c_void>, deviceinfoset: Option, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, P5: windows_core::Param, - P9: 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(), core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(flags), relativekeyroot.param().abi(), sourcerootpath.param().abi(), core::mem::transmute(copyflags), core::mem::transmute(msghandler), core::mem::transmute(context.unwrap_or(core::ptr::null())), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null()))).ok() + SetupInstallFromInfSectionA( + core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(infhandle), + sectionname.param().abi(), + core::mem::transmute(flags), + core::mem::transmute(relativekeyroot.unwrap_or(core::mem::zeroed())), + sourcerootpath.param().abi(), + core::mem::transmute(copyflags), + core::mem::transmute(msghandler.unwrap_or(core::mem::zeroed())), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), + core::mem::transmute(deviceinfoset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), + ) + .ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SetupInstallFromInfSectionW(owner: P0, infhandle: *const core::ffi::c_void, sectionname: P2, flags: u32, relativekeyroot: P4, sourcerootpath: P5, copyflags: u32, msghandler: PSP_FILE_CALLBACK_W, context: Option<*const core::ffi::c_void>, deviceinfoset: P9, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> +pub unsafe fn SetupInstallFromInfSectionW(owner: Option, infhandle: *const core::ffi::c_void, sectionname: P2, flags: u32, relativekeyroot: Option, sourcerootpath: P5, copyflags: u32, msghandler: Option, context: Option<*const core::ffi::c_void>, deviceinfoset: Option, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, P5: windows_core::Param, - P9: 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(), core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(flags), relativekeyroot.param().abi(), sourcerootpath.param().abi(), core::mem::transmute(copyflags), core::mem::transmute(msghandler), core::mem::transmute(context.unwrap_or(core::ptr::null())), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null()))).ok() + SetupInstallFromInfSectionW( + core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(infhandle), + sectionname.param().abi(), + core::mem::transmute(flags), + core::mem::transmute(relativekeyroot.unwrap_or(core::mem::zeroed())), + sourcerootpath.param().abi(), + core::mem::transmute(copyflags), + core::mem::transmute(msghandler.unwrap_or(core::mem::zeroed())), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), + core::mem::transmute(deviceinfoset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), + ) + .ok() } #[inline] pub unsafe fn SetupInstallServicesFromInfSectionA(infhandle: *const core::ffi::c_void, sectionname: P1, flags: SPSVCINST_FLAGS) -> windows_core::Result<()> @@ -3469,22 +3189,20 @@ where SetupInstallServicesFromInfSectionA(core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SetupInstallServicesFromInfSectionExA(infhandle: *const core::ffi::c_void, sectionname: P1, flags: SPSVCINST_FLAGS, deviceinfoset: P3, deviceinfodata: Option<*const SP_DEVINFO_DATA>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SetupInstallServicesFromInfSectionExA(infhandle: *const core::ffi::c_void, sectionname: P1, flags: SPSVCINST_FLAGS, deviceinfoset: Option, deviceinfodata: Option<*const SP_DEVINFO_DATA>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P1: windows_core::Param, - P3: 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(core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(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() + SetupInstallServicesFromInfSectionExA(core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(flags), core::mem::transmute(deviceinfoset.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupInstallServicesFromInfSectionExW(infhandle: *const core::ffi::c_void, sectionname: P1, flags: SPSVCINST_FLAGS, deviceinfoset: P3, deviceinfodata: Option<*const SP_DEVINFO_DATA>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SetupInstallServicesFromInfSectionExW(infhandle: *const core::ffi::c_void, sectionname: P1, flags: SPSVCINST_FLAGS, deviceinfoset: Option, deviceinfodata: Option<*const SP_DEVINFO_DATA>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P1: windows_core::Param, - P3: 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(core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(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() + SetupInstallServicesFromInfSectionExW(core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(flags), core::mem::transmute(deviceinfoset.unwrap_or(core::mem::zeroed())), core::mem::transmute(deviceinfodata.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupInstallServicesFromInfSectionW(infhandle: *const core::ffi::c_void, sectionname: P1, flags: SPSVCINST_FLAGS) -> windows_core::Result<()> @@ -3495,20 +3213,20 @@ where SetupInstallServicesFromInfSectionW(core::mem::transmute(infhandle), sectionname.param().abi(), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SetupIterateCabinetA(cabinetfile: P0, reserved: u32, msghandler: PSP_FILE_CALLBACK_A, context: *const core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn SetupIterateCabinetA(cabinetfile: P0, reserved: Option, msghandler: PSP_FILE_CALLBACK_A, context: *const core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupIterateCabinetA(cabinetfile : windows_core::PCSTR, reserved : u32, msghandler : PSP_FILE_CALLBACK_A, context : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupIterateCabinetA(cabinetfile.param().abi(), core::mem::transmute(reserved), core::mem::transmute(msghandler), core::mem::transmute(context)).ok() + SetupIterateCabinetA(cabinetfile.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(msghandler), core::mem::transmute(context)).ok() } #[inline] -pub unsafe fn SetupIterateCabinetW(cabinetfile: P0, reserved: u32, msghandler: PSP_FILE_CALLBACK_W, context: *const core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn SetupIterateCabinetW(cabinetfile: P0, reserved: Option, msghandler: PSP_FILE_CALLBACK_W, context: *const core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupIterateCabinetW(cabinetfile : windows_core::PCWSTR, reserved : u32, msghandler : PSP_FILE_CALLBACK_W, context : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupIterateCabinetW(cabinetfile.param().abi(), core::mem::transmute(reserved), core::mem::transmute(msghandler), core::mem::transmute(context)).ok() + SetupIterateCabinetW(cabinetfile.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(msghandler), core::mem::transmute(context)).ok() } #[inline] pub unsafe fn SetupLogErrorA(messagestring: P0, severity: u32) -> windows_core::Result<()> @@ -3558,7 +3276,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(), core::mem::transmute(infhandle), core::mem::transmute(errorline.unwrap_or(core::ptr::null_mut()))).ok() + SetupOpenAppendInfFileA(filename.param().abi(), core::mem::transmute(infhandle), core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupOpenAppendInfFileW(filename: P0, infhandle: *const core::ffi::c_void, errorline: Option<*mut u32>) -> windows_core::Result<()> @@ -3566,7 +3284,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(), core::mem::transmute(infhandle), core::mem::transmute(errorline.unwrap_or(core::ptr::null_mut()))).ok() + SetupOpenAppendInfFileW(filename.param().abi(), core::mem::transmute(infhandle), core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupOpenFileQueue() -> *mut core::ffi::c_void { @@ -3580,7 +3298,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(), core::mem::transmute(infstyle), core::mem::transmute(errorline.unwrap_or(core::ptr::null_mut()))) + SetupOpenInfFileA(filename.param().abi(), infclass.param().abi(), core::mem::transmute(infstyle), core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetupOpenInfFileW(filename: P0, infclass: P1, infstyle: INF_STYLE, errorline: Option<*mut u32>) -> *mut core::ffi::c_void @@ -3589,7 +3307,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(), core::mem::transmute(infstyle), core::mem::transmute(errorline.unwrap_or(core::ptr::null_mut()))) + SetupOpenInfFileW(filename.param().abi(), infclass.param().abi(), core::mem::transmute(infstyle), core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetupOpenLog(erase: P0) -> windows_core::Result<()> @@ -3621,9 +3339,8 @@ where SetupPrepareQueueForRestoreW(core::mem::transmute(queuehandle), backuppath.param().abi(), core::mem::transmute(restoreflags)) } #[inline] -pub unsafe fn SetupPromptForDiskA(hwndparent: P0, dialogtitle: P1, diskname: P2, pathtosource: P3, filesought: P4, tagfile: P5, diskpromptstyle: u32, pathbuffer: Option<&mut [u8]>, pathrequiredsize: Option<*mut u32>) -> u32 +pub unsafe fn SetupPromptForDiskA(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, diskname: P2, pathtosource: P3, filesought: P4, tagfile: P5, diskpromptstyle: u32, pathbuffer: Option<&mut [u8]>, pathrequiredsize: Option<*mut u32>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, @@ -3631,12 +3348,11 @@ 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(), core::mem::transmute(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()))) + SetupPromptForDiskA(core::mem::transmute(hwndparent), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), core::mem::transmute(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::mem::zeroed()))) } #[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 +pub unsafe fn SetupPromptForDiskW(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, diskname: P2, pathtosource: P3, filesought: P4, tagfile: P5, diskpromptstyle: u32, pathbuffer: Option<&mut [u16]>, pathrequiredsize: Option<*mut u32>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, @@ -3644,26 +3360,25 @@ 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(), core::mem::transmute(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()))) + SetupPromptForDiskW(core::mem::transmute(hwndparent), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), core::mem::transmute(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::mem::zeroed()))) } #[inline] -pub unsafe fn SetupPromptReboot(filequeue: Option<*const core::ffi::c_void>, owner: P1, scanonly: P2) -> i32 +pub unsafe fn SetupPromptReboot(filequeue: Option<*const core::ffi::c_void>, owner: Option, scanonly: P2) -> i32 where - P1: windows_core::Param, P2: 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(core::ptr::null())), owner.param().abi(), scanonly.param().abi()) + SetupPromptReboot(core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed())), core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(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() + SetupQueryDrivesInDiskSpaceListA(core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(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() + SetupQueryDrivesInDiskSpaceListW(core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupQueryFileLogA(fileloghandle: *const core::ffi::c_void, logsectionname: P1, targetfilename: P2, desiredinfo: SetupFileLogInfo, dataout: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3672,7 +3387,7 @@ where P2: 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(core::mem::transmute(fileloghandle), logsectionname.param().abi(), targetfilename.param().abi(), core::mem::transmute(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() + SetupQueryFileLogA(core::mem::transmute(fileloghandle), logsectionname.param().abi(), targetfilename.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupQueryFileLogW(fileloghandle: *const core::ffi::c_void, logsectionname: P1, targetfilename: P2, desiredinfo: SetupFileLogInfo, dataout: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3681,29 +3396,29 @@ where P2: 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(core::mem::transmute(fileloghandle), logsectionname.param().abi(), targetfilename.param().abi(), core::mem::transmute(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() + SetupQueryFileLogW(core::mem::transmute(fileloghandle), logsectionname.param().abi(), targetfilename.param().abi(), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(infinformation), core::mem::transmute(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() + SetupQueryInfFileInformationA(core::mem::transmute(infinformation), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(infinformation), core::mem::transmute(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() + SetupQueryInfFileInformationW(core::mem::transmute(infinformation), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(infinformation), core::mem::transmute(infindex), core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), core::mem::transmute(originalfileinfo)).ok() + SetupQueryInfOriginalFileInformationA(core::mem::transmute(infinformation), core::mem::transmute(infindex), core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(infinformation), core::mem::transmute(infindex), core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), core::mem::transmute(originalfileinfo)).ok() + SetupQueryInfOriginalFileInformationW(core::mem::transmute(infinformation), core::mem::transmute(infindex), core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(originalfileinfo)).ok() } #[inline] pub unsafe fn SetupQueryInfVersionInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, key: P2, returnbuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3711,7 +3426,7 @@ where P2: 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(core::mem::transmute(infinformation), core::mem::transmute(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() + SetupQueryInfVersionInformationA(core::mem::transmute(infinformation), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupQueryInfVersionInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, key: P2, returnbuffer: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3719,7 +3434,7 @@ where P2: 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(core::mem::transmute(infinformation), core::mem::transmute(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() + SetupQueryInfVersionInformationW(core::mem::transmute(infinformation), core::mem::transmute(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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupQuerySourceListA(flags: u32, list: *mut *mut windows_core::PCSTR, count: *mut u32) -> windows_core::Result<()> { @@ -3732,20 +3447,20 @@ pub unsafe fn SetupQuerySourceListW(flags: u32, list: *mut *mut windows_core::PC SetupQuerySourceListW(core::mem::transmute(flags), core::mem::transmute(list), core::mem::transmute(count)).ok() } #[inline] -pub unsafe fn SetupQuerySpaceRequiredOnDriveA(diskspace: *const core::ffi::c_void, drivespec: P1, spacerequired: *mut i64, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupQuerySpaceRequiredOnDriveA(diskspace: *const core::ffi::c_void, drivespec: P1, spacerequired: *mut i64, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(diskspace), drivespec.param().abi(), core::mem::transmute(spacerequired), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupQuerySpaceRequiredOnDriveA(core::mem::transmute(diskspace), drivespec.param().abi(), core::mem::transmute(spacerequired), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupQuerySpaceRequiredOnDriveW(diskspace: *const core::ffi::c_void, drivespec: P1, spacerequired: *mut i64, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupQuerySpaceRequiredOnDriveW(diskspace: *const core::ffi::c_void, drivespec: P1, spacerequired: *mut i64, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(diskspace), drivespec.param().abi(), core::mem::transmute(spacerequired), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupQuerySpaceRequiredOnDriveW(core::mem::transmute(diskspace), drivespec.param().abi(), core::mem::transmute(spacerequired), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupQueueCopyA(queuehandle: *const core::ffi::c_void, sourcerootpath: P1, sourcepath: P2, sourcefilename: P3, sourcedescription: P4, sourcetagfile: P5, targetdirectory: P6, targetfilename: P7, copystyle: u32) -> windows_core::Result<()> @@ -3778,7 +3493,7 @@ where P4: 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(core::mem::transmute(queuehandle), sourcerootpath.param().abi(), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi(), core::mem::transmute(copystyle)).ok() + SetupQueueCopySectionA(core::mem::transmute(queuehandle), sourcerootpath.param().abi(), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi(), core::mem::transmute(copystyle)).ok() } #[inline] pub unsafe fn SetupQueueCopySectionW(queuehandle: *const core::ffi::c_void, sourcerootpath: P1, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, section: P4, copystyle: u32) -> windows_core::Result<()> @@ -3787,7 +3502,7 @@ where P4: 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(core::mem::transmute(queuehandle), sourcerootpath.param().abi(), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi(), core::mem::transmute(copystyle)).ok() + SetupQueueCopySectionW(core::mem::transmute(queuehandle), sourcerootpath.param().abi(), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi(), core::mem::transmute(copystyle)).ok() } #[inline] pub unsafe fn SetupQueueCopyW(queuehandle: *const core::ffi::c_void, sourcerootpath: P1, sourcepath: P2, sourcefilename: P3, sourcedescription: P4, sourcetagfile: P5, targetdirectory: P6, targetfilename: P7, copystyle: u32) -> windows_core::Result<()> @@ -3838,7 +3553,7 @@ where P3: 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(core::mem::transmute(queuehandle), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi()).ok() + SetupQueueDeleteSectionA(core::mem::transmute(queuehandle), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), 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: P3) -> windows_core::Result<()> @@ -3846,7 +3561,7 @@ where P3: 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(core::mem::transmute(queuehandle), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi()).ok() + SetupQueueDeleteSectionW(core::mem::transmute(queuehandle), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi()).ok() } #[inline] pub unsafe fn SetupQueueDeleteW(queuehandle: *const core::ffi::c_void, pathpart1: P1, pathpart2: P2) -> windows_core::Result<()> @@ -3874,7 +3589,7 @@ where P3: 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(core::mem::transmute(queuehandle), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi()).ok() + SetupQueueRenameSectionA(core::mem::transmute(queuehandle), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), 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: P3) -> windows_core::Result<()> @@ -3882,7 +3597,7 @@ where P3: 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(core::mem::transmute(queuehandle), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi()).ok() + SetupQueueRenameSectionW(core::mem::transmute(queuehandle), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), section.param().abi()).ok() } #[inline] pub unsafe fn SetupQueueRenameW(queuehandle: *const core::ffi::c_void, sourcepath: P1, sourcefilename: P2, targetpath: P3, targetfilename: P4) -> windows_core::Result<()> @@ -3914,20 +3629,20 @@ where SetupRemoveFileLogEntryW(core::mem::transmute(fileloghandle), logsectionname.param().abi(), targetfilename.param().abi()).ok() } #[inline] -pub unsafe fn SetupRemoveFromDiskSpaceListA(diskspace: *const core::ffi::c_void, targetfilespec: P1, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupRemoveFromDiskSpaceListA(diskspace: *const core::ffi::c_void, targetfilespec: P1, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(diskspace), targetfilespec.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupRemoveFromDiskSpaceListA(core::mem::transmute(diskspace), targetfilespec.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupRemoveFromDiskSpaceListW(diskspace: *const core::ffi::c_void, targetfilespec: P1, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupRemoveFromDiskSpaceListW(diskspace: *const core::ffi::c_void, targetfilespec: P1, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(diskspace), targetfilespec.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupRemoveFromDiskSpaceListW(core::mem::transmute(diskspace), targetfilespec.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupRemoveFromSourceListA(flags: u32, source: P1) -> windows_core::Result<()> @@ -3946,74 +3661,66 @@ where SetupRemoveFromSourceListW(core::mem::transmute(flags), source.param().abi()).ok() } #[inline] -pub unsafe fn SetupRemoveInstallSectionFromDiskSpaceListA(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupRemoveInstallSectionFromDiskSpaceListA(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P3: 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(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupRemoveInstallSectionFromDiskSpaceListA(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).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: P3, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupRemoveInstallSectionFromDiskSpaceListW(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P3: 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(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupRemoveInstallSectionFromDiskSpaceListW(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(layoutinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).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: P3, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupRemoveSectionFromDiskSpaceListA(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P3: 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(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupRemoveSectionFromDiskSpaceListA(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).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: P3, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> +pub unsafe fn SetupRemoveSectionFromDiskSpaceListW(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, sectionname: P3, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: Option) -> windows_core::Result<()> where P3: 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(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2)).ok() + SetupRemoveSectionFromDiskSpaceListW(core::mem::transmute(diskspace), core::mem::transmute(infhandle), core::mem::transmute(listinfhandle.unwrap_or(core::mem::zeroed())), sectionname.param().abi(), core::mem::transmute(operation), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupRenameErrorA(hwndparent: P0, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 +pub unsafe fn SetupRenameErrorA(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupRenameErrorA(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCSTR, sourcefile : windows_core::PCSTR, targetfile : windows_core::PCSTR, win32errorcode : u32, style : u32) -> u32); - SetupRenameErrorA(hwndparent.param().abi(), dialogtitle.param().abi(), sourcefile.param().abi(), targetfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) + SetupRenameErrorA(core::mem::transmute(hwndparent), dialogtitle.param().abi(), sourcefile.param().abi(), targetfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) } #[inline] -pub unsafe fn SetupRenameErrorW(hwndparent: P0, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 +pub unsafe fn SetupRenameErrorW(hwndparent: super::super::Foundation::HWND, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupRenameErrorW(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCWSTR, sourcefile : windows_core::PCWSTR, targetfile : windows_core::PCWSTR, win32errorcode : u32, style : u32) -> u32); - SetupRenameErrorW(hwndparent.param().abi(), dialogtitle.param().abi(), sourcefile.param().abi(), targetfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) + SetupRenameErrorW(core::mem::transmute(hwndparent), dialogtitle.param().abi(), sourcefile.param().abi(), targetfile.param().abi(), core::mem::transmute(win32errorcode), core::mem::transmute(style)) } #[inline] -pub unsafe fn SetupScanFileQueueA(filequeue: *const core::ffi::c_void, flags: SETUPSCANFILEQUEUE_FLAGS, window: P2, callbackroutine: PSP_FILE_CALLBACK_A, callbackcontext: Option<*const core::ffi::c_void>, result: *mut u32) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn SetupScanFileQueueA(filequeue: *const core::ffi::c_void, flags: SETUPSCANFILEQUEUE_FLAGS, window: Option, callbackroutine: Option, callbackcontext: Option<*const core::ffi::c_void>, result: *mut u32) -> windows_core::Result<()> { 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(core::mem::transmute(filequeue), core::mem::transmute(flags), window.param().abi(), core::mem::transmute(callbackroutine), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(result)).ok() + SetupScanFileQueueA(core::mem::transmute(filequeue), core::mem::transmute(flags), core::mem::transmute(window.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(result)).ok() } #[inline] -pub unsafe fn SetupScanFileQueueW(filequeue: *const core::ffi::c_void, flags: SETUPSCANFILEQUEUE_FLAGS, window: P2, callbackroutine: PSP_FILE_CALLBACK_W, callbackcontext: Option<*const core::ffi::c_void>, result: *mut u32) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn SetupScanFileQueueW(filequeue: *const core::ffi::c_void, flags: SETUPSCANFILEQUEUE_FLAGS, window: Option, callbackroutine: Option, callbackcontext: Option<*const core::ffi::c_void>, result: *mut u32) -> windows_core::Result<()> { 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(core::mem::transmute(filequeue), core::mem::transmute(flags), window.param().abi(), core::mem::transmute(callbackroutine), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(result)).ok() + SetupScanFileQueueW(core::mem::transmute(filequeue), core::mem::transmute(flags), core::mem::transmute(window.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(result)).ok() } #[inline] pub unsafe fn SetupSetDirectoryIdA(infhandle: *const core::ffi::c_void, id: u32, directory: P2) -> windows_core::Result<()> @@ -4024,20 +3731,20 @@ where SetupSetDirectoryIdA(core::mem::transmute(infhandle), core::mem::transmute(id), directory.param().abi()).ok() } #[inline] -pub unsafe fn SetupSetDirectoryIdExA(infhandle: *const core::ffi::c_void, id: u32, directory: P2, flags: u32, reserved1: u32, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SetupSetDirectoryIdExA(infhandle: *const core::ffi::c_void, id: u32, directory: P2, flags: u32, reserved1: Option, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P2: 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(core::mem::transmute(infhandle), core::mem::transmute(id), directory.param().abi(), core::mem::transmute(flags), core::mem::transmute(reserved1), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))).ok() + SetupSetDirectoryIdExA(core::mem::transmute(infhandle), core::mem::transmute(id), directory.param().abi(), core::mem::transmute(flags), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetupSetDirectoryIdExW(infhandle: *const core::ffi::c_void, id: u32, directory: P2, flags: u32, reserved1: u32, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SetupSetDirectoryIdExW(infhandle: *const core::ffi::c_void, id: u32, directory: P2, flags: u32, reserved1: Option, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P2: 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(core::mem::transmute(infhandle), core::mem::transmute(id), directory.param().abi(), core::mem::transmute(flags), core::mem::transmute(reserved1), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))).ok() + SetupSetDirectoryIdExW(core::mem::transmute(infhandle), core::mem::transmute(id), directory.param().abi(), core::mem::transmute(flags), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupSetDirectoryIdW(infhandle: *const core::ffi::c_void, id: u32, directory: P2) -> windows_core::Result<()> @@ -4054,7 +3761,7 @@ where P2: 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(core::mem::transmute(queuehandle), core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), alternatedefaultcatalogfile.param().abi()).ok() + SetupSetFileQueueAlternatePlatformA(core::mem::transmute(queuehandle), core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), alternatedefaultcatalogfile.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -4063,7 +3770,7 @@ where P2: 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(core::mem::transmute(queuehandle), core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), alternatedefaultcatalogfile.param().abi()).ok() + SetupSetFileQueueAlternatePlatformW(core::mem::transmute(queuehandle), core::mem::transmute(alternateplatforminfo.unwrap_or(core::mem::zeroed())), alternatedefaultcatalogfile.param().abi()).ok() } #[inline] pub unsafe fn SetupSetFileQueueFlags(filequeue: *const core::ffi::c_void, flagmask: u32, flags: u32) -> windows_core::Result<()> { @@ -4122,7 +3829,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(core::mem::transmute(filequeue), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + SetupUninstallNewlyCopiedInfs(core::mem::transmute(filequeue), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetupUninstallOEMInfA(inffilename: P0, flags: u32, reserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -4130,7 +3837,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(), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) + SetupUninstallOEMInfA(inffilename.param().abi(), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetupUninstallOEMInfW(inffilename: P0, flags: u32, reserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -4138,7 +3845,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(), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) + SetupUninstallOEMInfW(inffilename.param().abi(), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -4147,7 +3854,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(core::ptr::null())), core::mem::transmute(infsignerinfo)) + SetupVerifyInfFileA(infname.param().abi(), core::mem::transmute(altplatforminfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(infsignerinfo)) } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -4156,7 +3863,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(core::ptr::null())), core::mem::transmute(infsignerinfo)) + SetupVerifyInfFileW(infname.param().abi(), core::mem::transmute(altplatforminfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(infsignerinfo)) } #[inline] pub unsafe fn SetupWriteTextLog(logtoken: u64, category: u32, flags: u32, messagestr: P3) @@ -4180,24 +3887,22 @@ pub unsafe fn SetupWriteTextLogInfLine(logtoken: u64, flags: u32, infhandle: *co SetupWriteTextLogInfLine(core::mem::transmute(logtoken), core::mem::transmute(flags), core::mem::transmute(infhandle), core::mem::transmute(context)) } #[inline] -pub unsafe fn UpdateDriverForPlugAndPlayDevicesA(hwndparent: P0, hardwareid: P1, fullinfpath: P2, installflags: UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> +pub unsafe fn UpdateDriverForPlugAndPlayDevicesA(hwndparent: Option, hardwareid: P1, fullinfpath: P2, installflags: UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(installflags), core::mem::transmute(brebootrequired.unwrap_or(core::ptr::null_mut()))).ok() + UpdateDriverForPlugAndPlayDevicesA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), hardwareid.param().abi(), fullinfpath.param().abi(), core::mem::transmute(installflags), core::mem::transmute(brebootrequired.unwrap_or(core::mem::zeroed()))).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<()> +pub unsafe fn UpdateDriverForPlugAndPlayDevicesW(hwndparent: Option, hardwareid: P1, fullinfpath: P2, installflags: UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(installflags), core::mem::transmute(brebootrequired.unwrap_or(core::ptr::null_mut()))).ok() + UpdateDriverForPlugAndPlayDevicesW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), hardwareid.param().abi(), fullinfpath.param().abi(), core::mem::transmute(installflags), core::mem::transmute(brebootrequired.unwrap_or(core::mem::zeroed()))).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 3298a74043..b34bd85d19 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn DevCloseObjectQuery(hdevquery: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn DevCloseObjectQuery(hdevquery: HDEVQUERY) { windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCloseObjectQuery(hdevquery : HDEVQUERY)); - DevCloseObjectQuery(hdevquery.param().abi()) + DevCloseObjectQuery(core::mem::transmute(hdevquery)) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -19,7 +16,7 @@ pub unsafe fn DevCreateObjectQuery(objecttype: DEV_OBJECT_TYPE, queryflags: u32, 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())), core::mem::transmute(pcallback), - core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__, ) .map(|| core::mem::transmute(result__)) @@ -39,7 +36,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())), core::mem::transmute(pcallback), - core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__, ) .map(|| core::mem::transmute(result__)) @@ -61,7 +58,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())), core::mem::transmute(pcallback), - core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__, ) .map(|| core::mem::transmute(result__)) @@ -85,7 +82,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())), core::mem::transmute(pcallback), - core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__, ) .map(|| core::mem::transmute(result__)) @@ -107,7 +104,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())), core::mem::transmute(pcallback), - core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__, ) .map(|| core::mem::transmute(result__)) @@ -131,7 +128,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())), core::mem::transmute(pcallback), - core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__, ) .map(|| core::mem::transmute(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 54d7c0dd8f..35dad30620 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs @@ -37,28 +37,19 @@ pub unsafe fn CLIPOBJ_ppoGetPath(pco: *mut CLIPOBJ) -> *mut PATHOBJ { CLIPOBJ_ppoGetPath(core::mem::transmute(pco)) } #[inline] -pub unsafe fn CapabilitiesRequestAndCapabilitiesReply(hmonitor: P0, pszasciicapabilitiesstring: &mut [u8]) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn CapabilitiesRequestAndCapabilitiesReply(hmonitor: super::super::Foundation::HANDLE, pszasciicapabilitiesstring: &mut [u8]) -> i32 { windows_targets::link!("dxva2.dll" "system" fn CapabilitiesRequestAndCapabilitiesReply(hmonitor : super::super::Foundation:: HANDLE, pszasciicapabilitiesstring : windows_core::PSTR, dwcapabilitiesstringlengthincharacters : u32) -> i32); - CapabilitiesRequestAndCapabilitiesReply(hmonitor.param().abi(), core::mem::transmute(pszasciicapabilitiesstring.as_ptr()), pszasciicapabilitiesstring.len().try_into().unwrap()) + CapabilitiesRequestAndCapabilitiesReply(core::mem::transmute(hmonitor), core::mem::transmute(pszasciicapabilitiesstring.as_ptr()), pszasciicapabilitiesstring.len().try_into().unwrap()) } #[inline] -pub unsafe fn DegaussMonitor(hmonitor: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DegaussMonitor(hmonitor: super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("dxva2.dll" "system" fn DegaussMonitor(hmonitor : super::super::Foundation:: HANDLE) -> i32); - DegaussMonitor(hmonitor.param().abi()) + DegaussMonitor(core::mem::transmute(hmonitor)) } #[inline] -pub unsafe fn DestroyPhysicalMonitor(hmonitor: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyPhysicalMonitor(hmonitor: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("dxva2.dll" "system" fn DestroyPhysicalMonitor(hmonitor : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DestroyPhysicalMonitor(hmonitor.param().abi()).ok() + DestroyPhysicalMonitor(core::mem::transmute(hmonitor)).ok() } #[inline] pub unsafe fn DestroyPhysicalMonitors(pphysicalmonitorarray: &[PHYSICAL_MONITOR]) -> windows_core::Result<()> { @@ -76,12 +67,9 @@ pub unsafe fn DisplayConfigSetDeviceInfo(setpacket: *const DISPLAYCONFIG_DEVICE_ DisplayConfigSetDeviceInfo(core::mem::transmute(setpacket)) } #[inline] -pub unsafe fn EngAcquireSemaphore(hsem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn EngAcquireSemaphore(hsem: HSEMAPHORE) { windows_targets::link!("gdi32.dll" "system" fn EngAcquireSemaphore(hsem : HSEMAPHORE)); - EngAcquireSemaphore(hsem.param().abi()) + EngAcquireSemaphore(core::mem::transmute(hsem)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -90,13 +78,9 @@ pub unsafe fn EngAlphaBlend(psodest: *mut SURFOBJ, psosrc: *mut SURFOBJ, pco: *m EngAlphaBlend(core::mem::transmute(psodest), core::mem::transmute(psosrc), core::mem::transmute(pco), core::mem::transmute(pxlo), core::mem::transmute(prcldest), core::mem::transmute(prclsrc), core::mem::transmute(pblendobj)) } #[inline] -pub unsafe fn EngAssociateSurface(hsurf: P0, hdev: P1, flhooks: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EngAssociateSurface(hsurf: HSURF, hdev: HDEV, flhooks: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngAssociateSurface(hsurf : HSURF, hdev : HDEV, flhooks : u32) -> super::super::Foundation:: BOOL); - EngAssociateSurface(hsurf.param().abi(), hdev.param().abi(), core::mem::transmute(flhooks)) + EngAssociateSurface(core::mem::transmute(hsurf), core::mem::transmute(hdev), core::mem::transmute(flhooks)) } #[inline] pub unsafe fn EngBitBlt(psotrg: *const SURFOBJ, psosrc: *const SURFOBJ, psomask: *const SURFOBJ, pco: *const CLIPOBJ, pxlo: *const XLATEOBJ, prcltrg: *const super::super::Foundation::RECTL, pptlsrc: *const super::super::Foundation::POINTL, pptlmask: *const super::super::Foundation::POINTL, pbo: *const BRUSHOBJ, pptlbrush: *const super::super::Foundation::POINTL, rop4: u32) -> super::super::Foundation::BOOL { @@ -131,20 +115,14 @@ pub unsafe fn EngCreateClip() -> *mut CLIPOBJ { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn EngCreateDeviceBitmap(dhsurf: P0, sizl: super::super::Foundation::SIZE, iformatcompat: u32) -> super::super::Graphics::Gdi::HBITMAP -where - P0: windows_core::Param, -{ +pub unsafe fn EngCreateDeviceBitmap(dhsurf: DHSURF, sizl: super::super::Foundation::SIZE, iformatcompat: u32) -> super::super::Graphics::Gdi::HBITMAP { windows_targets::link!("gdi32.dll" "system" fn EngCreateDeviceBitmap(dhsurf : DHSURF, sizl : super::super::Foundation:: SIZE, iformatcompat : u32) -> super::super::Graphics::Gdi:: HBITMAP); - EngCreateDeviceBitmap(dhsurf.param().abi(), core::mem::transmute(sizl), core::mem::transmute(iformatcompat)) + EngCreateDeviceBitmap(core::mem::transmute(dhsurf), core::mem::transmute(sizl), core::mem::transmute(iformatcompat)) } #[inline] -pub unsafe fn EngCreateDeviceSurface(dhsurf: P0, sizl: super::super::Foundation::SIZE, iformatcompat: u32) -> HSURF -where - P0: windows_core::Param, -{ +pub unsafe fn EngCreateDeviceSurface(dhsurf: DHSURF, sizl: super::super::Foundation::SIZE, iformatcompat: u32) -> HSURF { windows_targets::link!("gdi32.dll" "system" fn EngCreateDeviceSurface(dhsurf : DHSURF, sizl : super::super::Foundation:: SIZE, iformatcompat : u32) -> HSURF); - EngCreateDeviceSurface(dhsurf.param().abi(), core::mem::transmute(sizl), core::mem::transmute(iformatcompat)) + EngCreateDeviceSurface(core::mem::transmute(dhsurf), core::mem::transmute(sizl), core::mem::transmute(iformatcompat)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -160,16 +138,13 @@ 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(core::ptr::null()))) + EngDeleteClip(core::mem::transmute(pco.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn EngDeletePalette(hpal: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn EngDeletePalette(hpal: super::super::Graphics::Gdi::HPALETTE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngDeletePalette(hpal : super::super::Graphics::Gdi:: HPALETTE) -> super::super::Foundation:: BOOL); - EngDeletePalette(hpal.param().abi()) + EngDeletePalette(core::mem::transmute(hpal)) } #[inline] pub unsafe fn EngDeletePath(ppo: *mut PATHOBJ) { @@ -177,20 +152,14 @@ pub unsafe fn EngDeletePath(ppo: *mut PATHOBJ) { EngDeletePath(core::mem::transmute(ppo)) } #[inline] -pub unsafe fn EngDeleteSemaphore(hsem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn EngDeleteSemaphore(hsem: HSEMAPHORE) { windows_targets::link!("gdi32.dll" "system" fn EngDeleteSemaphore(hsem : HSEMAPHORE)); - EngDeleteSemaphore(hsem.param().abi()) + EngDeleteSemaphore(core::mem::transmute(hsem)) } #[inline] -pub unsafe fn EngDeleteSurface(hsurf: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn EngDeleteSurface(hsurf: HSURF) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngDeleteSurface(hsurf : HSURF) -> super::super::Foundation:: BOOL); - EngDeleteSurface(hsurf.param().abi()) + EngDeleteSurface(core::mem::transmute(hsurf)) } #[inline] pub unsafe fn EngEraseSurface(pso: *mut SURFOBJ, prcl: *mut super::super::Foundation::RECTL, icolor: u32) -> super::super::Foundation::BOOL { @@ -203,20 +172,14 @@ pub unsafe fn EngFillPath(pso: *mut SURFOBJ, ppo: *mut PATHOBJ, pco: *mut CLIPOB EngFillPath(core::mem::transmute(pso), core::mem::transmute(ppo), core::mem::transmute(pco), core::mem::transmute(pbo), core::mem::transmute(pptlbrushorg), core::mem::transmute(mix), core::mem::transmute(floptions)) } #[inline] -pub unsafe fn EngFindResource(h: P0, iname: i32, itype: i32, pulsize: *mut u32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn EngFindResource(h: super::super::Foundation::HANDLE, iname: i32, itype: i32, pulsize: *mut u32) -> *mut core::ffi::c_void { windows_targets::link!("gdi32.dll" "system" fn EngFindResource(h : super::super::Foundation:: HANDLE, iname : i32, itype : i32, pulsize : *mut u32) -> *mut core::ffi::c_void); - EngFindResource(h.param().abi(), core::mem::transmute(iname), core::mem::transmute(itype), core::mem::transmute(pulsize)) + EngFindResource(core::mem::transmute(h), core::mem::transmute(iname), core::mem::transmute(itype), core::mem::transmute(pulsize)) } #[inline] -pub unsafe fn EngFreeModule(h: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn EngFreeModule(h: super::super::Foundation::HANDLE) { windows_targets::link!("gdi32.dll" "system" fn EngFreeModule(h : super::super::Foundation:: HANDLE)); - EngFreeModule(h.param().abi()) + EngFreeModule(core::mem::transmute(h)) } #[inline] pub unsafe fn EngGetCurrentCodePage(oemcodepage: *mut u16, ansicodepage: *mut u16) { @@ -224,20 +187,14 @@ pub unsafe fn EngGetCurrentCodePage(oemcodepage: *mut u16, ansicodepage: *mut u1 EngGetCurrentCodePage(core::mem::transmute(oemcodepage), core::mem::transmute(ansicodepage)) } #[inline] -pub unsafe fn EngGetDriverName(hdev: P0) -> windows_core::PWSTR -where - P0: windows_core::Param, -{ +pub unsafe fn EngGetDriverName(hdev: HDEV) -> windows_core::PWSTR { windows_targets::link!("gdi32.dll" "system" fn EngGetDriverName(hdev : HDEV) -> windows_core::PWSTR); - EngGetDriverName(hdev.param().abi()) + EngGetDriverName(core::mem::transmute(hdev)) } #[inline] -pub unsafe fn EngGetPrinterDataFileName(hdev: P0) -> windows_core::PWSTR -where - P0: windows_core::Param, -{ +pub unsafe fn EngGetPrinterDataFileName(hdev: HDEV) -> windows_core::PWSTR { windows_targets::link!("gdi32.dll" "system" fn EngGetPrinterDataFileName(hdev : HDEV) -> windows_core::PWSTR); - EngGetPrinterDataFileName(hdev.param().abi()) + EngGetPrinterDataFileName(core::mem::transmute(hdev)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -259,30 +216,24 @@ where EngLoadModule(pwsz.param().abi()) } #[inline] -pub unsafe fn EngLockSurface(hsurf: P0) -> *mut SURFOBJ -where - P0: windows_core::Param, -{ +pub unsafe fn EngLockSurface(hsurf: HSURF) -> *mut SURFOBJ { windows_targets::link!("gdi32.dll" "system" fn EngLockSurface(hsurf : HSURF) -> *mut SURFOBJ); - EngLockSurface(hsurf.param().abi()) + EngLockSurface(core::mem::transmute(hsurf)) } #[inline] -pub unsafe fn EngMarkBandingSurface(hsurf: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn EngMarkBandingSurface(hsurf: HSURF) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngMarkBandingSurface(hsurf : HSURF) -> super::super::Foundation:: BOOL); - EngMarkBandingSurface(hsurf.param().abi()) + EngMarkBandingSurface(core::mem::transmute(hsurf)) } #[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), core::mem::transmute(maxbytesinunicodestring), core::mem::transmute(bytesinunicodestring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) + EngMultiByteToUnicodeN(core::mem::transmute(unicodestring), core::mem::transmute(maxbytesinunicodestring), core::mem::transmute(bytesinunicodestring.unwrap_or(core::mem::zeroed())), 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 { +pub unsafe fn EngMultiByteToWideChar(codepage: u32, widecharstring: Option, bytesinwidecharstring: i32, multibytestring: Option<&[u8]>) -> i32 { windows_targets::link!("gdi32.dll" "system" fn EngMultiByteToWideChar(codepage : u32, widecharstring : windows_core::PWSTR, bytesinwidecharstring : i32, multibytestring : windows_core::PCSTR, bytesinmultibytestring : i32) -> i32); - EngMultiByteToWideChar(core::mem::transmute(codepage), core::mem::transmute(widecharstring), core::mem::transmute(bytesinwidecharstring), core::mem::transmute(multibytestring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), multibytestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + EngMultiByteToWideChar(core::mem::transmute(codepage), core::mem::transmute(widecharstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(bytesinwidecharstring), core::mem::transmute(multibytestring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), multibytestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn EngPaint(pso: *mut SURFOBJ, pco: *mut CLIPOBJ, pbo: *mut BRUSHOBJ, pptlbrushorg: *mut super::super::Foundation::POINTL, mix: u32) -> super::super::Foundation::BOOL { @@ -297,12 +248,9 @@ pub unsafe fn EngPlgBlt(psotrg: *mut SURFOBJ, psosrc: *mut SURFOBJ, psomsk: *mut } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn EngQueryEMFInfo(hdev: P0, pemfinfo: *mut EMFINFO) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn EngQueryEMFInfo(hdev: HDEV, pemfinfo: *mut EMFINFO) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngQueryEMFInfo(hdev : HDEV, pemfinfo : *mut EMFINFO) -> super::super::Foundation:: BOOL); - EngQueryEMFInfo(hdev.param().abi(), core::mem::transmute(pemfinfo)) + EngQueryEMFInfo(core::mem::transmute(hdev), core::mem::transmute(pemfinfo)) } #[inline] pub unsafe fn EngQueryLocalTime() -> ENG_TIME_FIELDS { @@ -312,12 +260,9 @@ pub unsafe fn EngQueryLocalTime() -> ENG_TIME_FIELDS { result__ } #[inline] -pub unsafe fn EngReleaseSemaphore(hsem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn EngReleaseSemaphore(hsem: HSEMAPHORE) { windows_targets::link!("gdi32.dll" "system" fn EngReleaseSemaphore(hsem : HSEMAPHORE)); - EngReleaseSemaphore(hsem.param().abi()) + EngReleaseSemaphore(core::mem::transmute(hsem)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -349,7 +294,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(core::mem::transmute(psodst), core::mem::transmute(psosrc), core::mem::transmute(pco.unwrap_or(core::ptr::null())), core::mem::transmute(pxlo.unwrap_or(core::ptr::null())), core::mem::transmute(prcldst), core::mem::transmute(prclsrc), core::mem::transmute(transcolor), core::mem::transmute(bcalledfrombitblt)) + EngTransparentBlt(core::mem::transmute(psodst), core::mem::transmute(psosrc), core::mem::transmute(pco.unwrap_or(core::mem::zeroed())), core::mem::transmute(pxlo.unwrap_or(core::mem::zeroed())), core::mem::transmute(prcldst), core::mem::transmute(prclsrc), core::mem::transmute(transcolor), core::mem::transmute(bcalledfrombitblt)) } #[inline] pub unsafe fn EngUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: Option<*mut u32>, unicodestring: P3, bytesinunicodestring: u32) @@ -357,7 +302,7 @@ where P3: 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(core::ptr::null_mut())), unicodestring.param().abi(), core::mem::transmute(bytesinunicodestring)) + EngUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::mem::zeroed())), unicodestring.param().abi(), core::mem::transmute(bytesinunicodestring)) } #[inline] pub unsafe fn EngUnlockSurface(pso: *mut SURFOBJ) { @@ -419,12 +364,9 @@ pub unsafe fn GetAutoRotationState(pstate: *mut AR_STATE) -> super::super::Found GetAutoRotationState(core::mem::transmute(pstate)) } #[inline] -pub unsafe fn GetCapabilitiesStringLength(hmonitor: P0, pdwcapabilitiesstringlengthincharacters: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetCapabilitiesStringLength(hmonitor: super::super::Foundation::HANDLE, pdwcapabilitiesstringlengthincharacters: *mut u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetCapabilitiesStringLength(hmonitor : super::super::Foundation:: HANDLE, pdwcapabilitiesstringlengthincharacters : *mut u32) -> i32); - GetCapabilitiesStringLength(hmonitor.param().abi(), core::mem::transmute(pdwcapabilitiesstringlengthincharacters)) + GetCapabilitiesStringLength(core::mem::transmute(hmonitor), core::mem::transmute(pdwcapabilitiesstringlengthincharacters)) } #[inline] pub unsafe fn GetDisplayAutoRotationPreferences(porientation: *mut ORIENTATION_PREFERENCE) -> super::super::Foundation::BOOL { @@ -437,85 +379,55 @@ pub unsafe fn GetDisplayConfigBufferSizes(flags: QUERY_DISPLAY_CONFIG_FLAGS, num GetDisplayConfigBufferSizes(core::mem::transmute(flags), core::mem::transmute(numpatharrayelements), core::mem::transmute(nummodeinfoarrayelements)) } #[inline] -pub unsafe fn GetMonitorBrightness(hmonitor: P0, pdwminimumbrightness: *mut u32, pdwcurrentbrightness: *mut u32, pdwmaximumbrightness: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorBrightness(hmonitor: super::super::Foundation::HANDLE, pdwminimumbrightness: *mut u32, pdwcurrentbrightness: *mut u32, pdwmaximumbrightness: *mut u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorBrightness(hmonitor : super::super::Foundation:: HANDLE, pdwminimumbrightness : *mut u32, pdwcurrentbrightness : *mut u32, pdwmaximumbrightness : *mut u32) -> i32); - GetMonitorBrightness(hmonitor.param().abi(), core::mem::transmute(pdwminimumbrightness), core::mem::transmute(pdwcurrentbrightness), core::mem::transmute(pdwmaximumbrightness)) + GetMonitorBrightness(core::mem::transmute(hmonitor), core::mem::transmute(pdwminimumbrightness), core::mem::transmute(pdwcurrentbrightness), core::mem::transmute(pdwmaximumbrightness)) } #[inline] -pub unsafe fn GetMonitorCapabilities(hmonitor: P0, pdwmonitorcapabilities: *mut u32, pdwsupportedcolortemperatures: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorCapabilities(hmonitor: super::super::Foundation::HANDLE, pdwmonitorcapabilities: *mut u32, pdwsupportedcolortemperatures: *mut u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorCapabilities(hmonitor : super::super::Foundation:: HANDLE, pdwmonitorcapabilities : *mut u32, pdwsupportedcolortemperatures : *mut u32) -> i32); - GetMonitorCapabilities(hmonitor.param().abi(), core::mem::transmute(pdwmonitorcapabilities), core::mem::transmute(pdwsupportedcolortemperatures)) + GetMonitorCapabilities(core::mem::transmute(hmonitor), core::mem::transmute(pdwmonitorcapabilities), core::mem::transmute(pdwsupportedcolortemperatures)) } #[inline] -pub unsafe fn GetMonitorColorTemperature(hmonitor: P0, pctcurrentcolortemperature: *mut MC_COLOR_TEMPERATURE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorColorTemperature(hmonitor: super::super::Foundation::HANDLE, pctcurrentcolortemperature: *mut MC_COLOR_TEMPERATURE) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorColorTemperature(hmonitor : super::super::Foundation:: HANDLE, pctcurrentcolortemperature : *mut MC_COLOR_TEMPERATURE) -> i32); - GetMonitorColorTemperature(hmonitor.param().abi(), core::mem::transmute(pctcurrentcolortemperature)) + GetMonitorColorTemperature(core::mem::transmute(hmonitor), core::mem::transmute(pctcurrentcolortemperature)) } #[inline] -pub unsafe fn GetMonitorContrast(hmonitor: P0, pdwminimumcontrast: *mut u32, pdwcurrentcontrast: *mut u32, pdwmaximumcontrast: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorContrast(hmonitor: super::super::Foundation::HANDLE, pdwminimumcontrast: *mut u32, pdwcurrentcontrast: *mut u32, pdwmaximumcontrast: *mut u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorContrast(hmonitor : super::super::Foundation:: HANDLE, pdwminimumcontrast : *mut u32, pdwcurrentcontrast : *mut u32, pdwmaximumcontrast : *mut u32) -> i32); - GetMonitorContrast(hmonitor.param().abi(), core::mem::transmute(pdwminimumcontrast), core::mem::transmute(pdwcurrentcontrast), core::mem::transmute(pdwmaximumcontrast)) + GetMonitorContrast(core::mem::transmute(hmonitor), core::mem::transmute(pdwminimumcontrast), core::mem::transmute(pdwcurrentcontrast), core::mem::transmute(pdwmaximumcontrast)) } #[inline] -pub unsafe fn GetMonitorDisplayAreaPosition(hmonitor: P0, ptpositiontype: MC_POSITION_TYPE, pdwminimumposition: *mut u32, pdwcurrentposition: *mut u32, pdwmaximumposition: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorDisplayAreaPosition(hmonitor: super::super::Foundation::HANDLE, ptpositiontype: MC_POSITION_TYPE, pdwminimumposition: *mut u32, pdwcurrentposition: *mut u32, pdwmaximumposition: *mut u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorDisplayAreaPosition(hmonitor : super::super::Foundation:: HANDLE, ptpositiontype : MC_POSITION_TYPE, pdwminimumposition : *mut u32, pdwcurrentposition : *mut u32, pdwmaximumposition : *mut u32) -> i32); - GetMonitorDisplayAreaPosition(hmonitor.param().abi(), core::mem::transmute(ptpositiontype), core::mem::transmute(pdwminimumposition), core::mem::transmute(pdwcurrentposition), core::mem::transmute(pdwmaximumposition)) + GetMonitorDisplayAreaPosition(core::mem::transmute(hmonitor), core::mem::transmute(ptpositiontype), core::mem::transmute(pdwminimumposition), core::mem::transmute(pdwcurrentposition), core::mem::transmute(pdwmaximumposition)) } #[inline] -pub unsafe fn GetMonitorDisplayAreaSize(hmonitor: P0, stsizetype: MC_SIZE_TYPE, pdwminimumwidthorheight: *mut u32, pdwcurrentwidthorheight: *mut u32, pdwmaximumwidthorheight: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorDisplayAreaSize(hmonitor: super::super::Foundation::HANDLE, stsizetype: MC_SIZE_TYPE, pdwminimumwidthorheight: *mut u32, pdwcurrentwidthorheight: *mut u32, pdwmaximumwidthorheight: *mut u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorDisplayAreaSize(hmonitor : super::super::Foundation:: HANDLE, stsizetype : MC_SIZE_TYPE, pdwminimumwidthorheight : *mut u32, pdwcurrentwidthorheight : *mut u32, pdwmaximumwidthorheight : *mut u32) -> i32); - GetMonitorDisplayAreaSize(hmonitor.param().abi(), core::mem::transmute(stsizetype), core::mem::transmute(pdwminimumwidthorheight), core::mem::transmute(pdwcurrentwidthorheight), core::mem::transmute(pdwmaximumwidthorheight)) + GetMonitorDisplayAreaSize(core::mem::transmute(hmonitor), core::mem::transmute(stsizetype), core::mem::transmute(pdwminimumwidthorheight), core::mem::transmute(pdwcurrentwidthorheight), core::mem::transmute(pdwmaximumwidthorheight)) } #[inline] -pub unsafe fn GetMonitorRedGreenOrBlueDrive(hmonitor: P0, dtdrivetype: MC_DRIVE_TYPE, pdwminimumdrive: *mut u32, pdwcurrentdrive: *mut u32, pdwmaximumdrive: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorRedGreenOrBlueDrive(hmonitor: super::super::Foundation::HANDLE, dtdrivetype: MC_DRIVE_TYPE, pdwminimumdrive: *mut u32, pdwcurrentdrive: *mut u32, pdwmaximumdrive: *mut u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorRedGreenOrBlueDrive(hmonitor : super::super::Foundation:: HANDLE, dtdrivetype : MC_DRIVE_TYPE, pdwminimumdrive : *mut u32, pdwcurrentdrive : *mut u32, pdwmaximumdrive : *mut u32) -> i32); - GetMonitorRedGreenOrBlueDrive(hmonitor.param().abi(), core::mem::transmute(dtdrivetype), core::mem::transmute(pdwminimumdrive), core::mem::transmute(pdwcurrentdrive), core::mem::transmute(pdwmaximumdrive)) + GetMonitorRedGreenOrBlueDrive(core::mem::transmute(hmonitor), core::mem::transmute(dtdrivetype), core::mem::transmute(pdwminimumdrive), core::mem::transmute(pdwcurrentdrive), core::mem::transmute(pdwmaximumdrive)) } #[inline] -pub unsafe fn GetMonitorRedGreenOrBlueGain(hmonitor: P0, gtgaintype: MC_GAIN_TYPE, pdwminimumgain: *mut u32, pdwcurrentgain: *mut u32, pdwmaximumgain: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorRedGreenOrBlueGain(hmonitor: super::super::Foundation::HANDLE, gtgaintype: MC_GAIN_TYPE, pdwminimumgain: *mut u32, pdwcurrentgain: *mut u32, pdwmaximumgain: *mut u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorRedGreenOrBlueGain(hmonitor : super::super::Foundation:: HANDLE, gtgaintype : MC_GAIN_TYPE, pdwminimumgain : *mut u32, pdwcurrentgain : *mut u32, pdwmaximumgain : *mut u32) -> i32); - GetMonitorRedGreenOrBlueGain(hmonitor.param().abi(), core::mem::transmute(gtgaintype), core::mem::transmute(pdwminimumgain), core::mem::transmute(pdwcurrentgain), core::mem::transmute(pdwmaximumgain)) + GetMonitorRedGreenOrBlueGain(core::mem::transmute(hmonitor), core::mem::transmute(gtgaintype), core::mem::transmute(pdwminimumgain), core::mem::transmute(pdwcurrentgain), core::mem::transmute(pdwmaximumgain)) } #[inline] -pub unsafe fn GetMonitorTechnologyType(hmonitor: P0, pdtydisplaytechnologytype: *mut MC_DISPLAY_TECHNOLOGY_TYPE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorTechnologyType(hmonitor: super::super::Foundation::HANDLE, pdtydisplaytechnologytype: *mut MC_DISPLAY_TECHNOLOGY_TYPE) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetMonitorTechnologyType(hmonitor : super::super::Foundation:: HANDLE, pdtydisplaytechnologytype : *mut MC_DISPLAY_TECHNOLOGY_TYPE) -> i32); - GetMonitorTechnologyType(hmonitor.param().abi(), core::mem::transmute(pdtydisplaytechnologytype)) + GetMonitorTechnologyType(core::mem::transmute(hmonitor), core::mem::transmute(pdtydisplaytechnologytype)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor: P0, pdwnumberofphysicalmonitors: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor: super::super::Graphics::Gdi::HMONITOR, pdwnumberofphysicalmonitors: *mut u32) -> windows_core::Result<()> { windows_targets::link!("dxva2.dll" "system" fn GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor : super::super::Graphics::Gdi:: HMONITOR, pdwnumberofphysicalmonitors : *mut u32) -> super::super::Foundation:: BOOL); - GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor.param().abi(), core::mem::transmute(pdwnumberofphysicalmonitors)).ok() + GetNumberOfPhysicalMonitorsFromHMONITOR(core::mem::transmute(hmonitor), core::mem::transmute(pdwnumberofphysicalmonitors)).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] #[inline] @@ -529,12 +441,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetPhysicalMonitorsFromHMONITOR(hmonitor: P0, pphysicalmonitorarray: &mut [PHYSICAL_MONITOR]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetPhysicalMonitorsFromHMONITOR(hmonitor: super::super::Graphics::Gdi::HMONITOR, pphysicalmonitorarray: &mut [PHYSICAL_MONITOR]) -> windows_core::Result<()> { windows_targets::link!("dxva2.dll" "system" fn GetPhysicalMonitorsFromHMONITOR(hmonitor : super::super::Graphics::Gdi:: HMONITOR, dwphysicalmonitorarraysize : u32, pphysicalmonitorarray : *mut PHYSICAL_MONITOR) -> super::super::Foundation:: BOOL); - GetPhysicalMonitorsFromHMONITOR(hmonitor.param().abi(), pphysicalmonitorarray.len().try_into().unwrap(), core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() + GetPhysicalMonitorsFromHMONITOR(core::mem::transmute(hmonitor), pphysicalmonitorarray.len().try_into().unwrap(), core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] #[inline] @@ -546,26 +455,20 @@ where GetPhysicalMonitorsFromIDirect3DDevice9(pdirect3ddevice9.param().abi(), pphysicalmonitorarray.len().try_into().unwrap(), core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() } #[inline] -pub unsafe fn GetTimingReport(hmonitor: P0, pmtrmonitortimingreport: *mut MC_TIMING_REPORT) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTimingReport(hmonitor: super::super::Foundation::HANDLE, pmtrmonitortimingreport: *mut MC_TIMING_REPORT) -> i32 { windows_targets::link!("dxva2.dll" "system" fn GetTimingReport(hmonitor : super::super::Foundation:: HANDLE, pmtrmonitortimingreport : *mut MC_TIMING_REPORT) -> i32); - GetTimingReport(hmonitor.param().abi(), core::mem::transmute(pmtrmonitortimingreport)) + GetTimingReport(core::mem::transmute(hmonitor), core::mem::transmute(pmtrmonitortimingreport)) } #[inline] -pub unsafe fn GetVCPFeatureAndVCPFeatureReply(hmonitor: P0, bvcpcode: u8, pvct: Option<*mut MC_VCP_CODE_TYPE>, pdwcurrentvalue: *mut u32, pdwmaximumvalue: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetVCPFeatureAndVCPFeatureReply(hmonitor: super::super::Foundation::HANDLE, bvcpcode: u8, pvct: Option<*mut MC_VCP_CODE_TYPE>, pdwcurrentvalue: *mut u32, pdwmaximumvalue: Option<*mut u32>) -> i32 { 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(), core::mem::transmute(bvcpcode), core::mem::transmute(pvct.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwcurrentvalue), core::mem::transmute(pdwmaximumvalue.unwrap_or(core::ptr::null_mut()))) + GetVCPFeatureAndVCPFeatureReply(core::mem::transmute(hmonitor), core::mem::transmute(bvcpcode), core::mem::transmute(pvct.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwcurrentvalue), core::mem::transmute(pdwmaximumvalue.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(redgamma), core::mem::transmute(greengamma), core::mem::transmute(bluegamma)) + HT_Get8BPPFormatPalette(core::mem::transmute(ppaletteentry.unwrap_or(core::mem::zeroed())), core::mem::transmute(redgamma), core::mem::transmute(greengamma), core::mem::transmute(bluegamma)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -574,7 +477,7 @@ where P1: 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(core::ptr::null_mut())), use8bppmaskpal.param().abi(), core::mem::transmute(cmymask), core::mem::transmute(redgamma), core::mem::transmute(greengamma), core::mem::transmute(bluegamma)) + HT_Get8BPPMaskPalette(core::mem::transmute(ppaletteentry.unwrap_or(core::mem::zeroed())), use8bppmaskpal.param().abi(), core::mem::transmute(cmymask), core::mem::transmute(redgamma), core::mem::transmute(greengamma), core::mem::transmute(bluegamma)) } #[inline] pub unsafe fn PATHOBJ_bEnum(ppo: *mut PATHOBJ, ppd: *mut PATHDATA) -> super::super::Foundation::BOOL { @@ -604,23 +507,17 @@ 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(core::mem::transmute(flags), core::mem::transmute(numpatharrayelements), core::mem::transmute(patharray), core::mem::transmute(nummodeinfoarrayelements), core::mem::transmute(modeinfoarray), core::mem::transmute(currenttopologyid.unwrap_or(core::ptr::null_mut()))) + QueryDisplayConfig(core::mem::transmute(flags), core::mem::transmute(numpatharrayelements), core::mem::transmute(patharray), core::mem::transmute(nummodeinfoarrayelements), core::mem::transmute(modeinfoarray), core::mem::transmute(currenttopologyid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RestoreMonitorFactoryColorDefaults(hmonitor: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn RestoreMonitorFactoryColorDefaults(hmonitor: super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("dxva2.dll" "system" fn RestoreMonitorFactoryColorDefaults(hmonitor : super::super::Foundation:: HANDLE) -> i32); - RestoreMonitorFactoryColorDefaults(hmonitor.param().abi()) + RestoreMonitorFactoryColorDefaults(core::mem::transmute(hmonitor)) } #[inline] -pub unsafe fn RestoreMonitorFactoryDefaults(hmonitor: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn RestoreMonitorFactoryDefaults(hmonitor: super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("dxva2.dll" "system" fn RestoreMonitorFactoryDefaults(hmonitor : super::super::Foundation:: HANDLE) -> i32); - RestoreMonitorFactoryDefaults(hmonitor.param().abi()) + RestoreMonitorFactoryDefaults(core::mem::transmute(hmonitor)) } #[inline] pub unsafe fn STROBJ_bEnum(pstro: *mut STROBJ, pc: *mut u32, ppgpos: *mut *mut GLYPHPOS) -> super::super::Foundation::BOOL { @@ -648,20 +545,14 @@ pub unsafe fn STROBJ_vEnumStart(pstro: *mut STROBJ) { STROBJ_vEnumStart(core::mem::transmute(pstro)) } #[inline] -pub unsafe fn SaveCurrentMonitorSettings(hmonitor: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SaveCurrentMonitorSettings(hmonitor: super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SaveCurrentMonitorSettings(hmonitor : super::super::Foundation:: HANDLE) -> i32); - SaveCurrentMonitorSettings(hmonitor.param().abi()) + SaveCurrentMonitorSettings(core::mem::transmute(hmonitor)) } #[inline] -pub unsafe fn SaveCurrentSettings(hmonitor: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SaveCurrentSettings(hmonitor: super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SaveCurrentSettings(hmonitor : super::super::Foundation:: HANDLE) -> i32); - SaveCurrentSettings(hmonitor.param().abi()) + SaveCurrentSettings(core::mem::transmute(hmonitor)) } #[inline] pub unsafe fn SetDisplayAutoRotationPreferences(orientation: ORIENTATION_PREFERENCE) -> super::super::Foundation::BOOL { @@ -674,68 +565,44 @@ pub unsafe fn SetDisplayConfig(patharray: Option<&[DISPLAYCONFIG_PATH_INFO]>, mo SetDisplayConfig(patharray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(patharray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), modeinfoarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(modeinfoarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SetMonitorBrightness(hmonitor: P0, dwnewbrightness: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMonitorBrightness(hmonitor: super::super::Foundation::HANDLE, dwnewbrightness: u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SetMonitorBrightness(hmonitor : super::super::Foundation:: HANDLE, dwnewbrightness : u32) -> i32); - SetMonitorBrightness(hmonitor.param().abi(), core::mem::transmute(dwnewbrightness)) + SetMonitorBrightness(core::mem::transmute(hmonitor), core::mem::transmute(dwnewbrightness)) } #[inline] -pub unsafe fn SetMonitorColorTemperature(hmonitor: P0, ctcurrentcolortemperature: MC_COLOR_TEMPERATURE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMonitorColorTemperature(hmonitor: super::super::Foundation::HANDLE, ctcurrentcolortemperature: MC_COLOR_TEMPERATURE) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SetMonitorColorTemperature(hmonitor : super::super::Foundation:: HANDLE, ctcurrentcolortemperature : MC_COLOR_TEMPERATURE) -> i32); - SetMonitorColorTemperature(hmonitor.param().abi(), core::mem::transmute(ctcurrentcolortemperature)) + SetMonitorColorTemperature(core::mem::transmute(hmonitor), core::mem::transmute(ctcurrentcolortemperature)) } #[inline] -pub unsafe fn SetMonitorContrast(hmonitor: P0, dwnewcontrast: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMonitorContrast(hmonitor: super::super::Foundation::HANDLE, dwnewcontrast: u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SetMonitorContrast(hmonitor : super::super::Foundation:: HANDLE, dwnewcontrast : u32) -> i32); - SetMonitorContrast(hmonitor.param().abi(), core::mem::transmute(dwnewcontrast)) + SetMonitorContrast(core::mem::transmute(hmonitor), core::mem::transmute(dwnewcontrast)) } #[inline] -pub unsafe fn SetMonitorDisplayAreaPosition(hmonitor: P0, ptpositiontype: MC_POSITION_TYPE, dwnewposition: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMonitorDisplayAreaPosition(hmonitor: super::super::Foundation::HANDLE, ptpositiontype: MC_POSITION_TYPE, dwnewposition: u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SetMonitorDisplayAreaPosition(hmonitor : super::super::Foundation:: HANDLE, ptpositiontype : MC_POSITION_TYPE, dwnewposition : u32) -> i32); - SetMonitorDisplayAreaPosition(hmonitor.param().abi(), core::mem::transmute(ptpositiontype), core::mem::transmute(dwnewposition)) + SetMonitorDisplayAreaPosition(core::mem::transmute(hmonitor), core::mem::transmute(ptpositiontype), core::mem::transmute(dwnewposition)) } #[inline] -pub unsafe fn SetMonitorDisplayAreaSize(hmonitor: P0, stsizetype: MC_SIZE_TYPE, dwnewdisplayareawidthorheight: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMonitorDisplayAreaSize(hmonitor: super::super::Foundation::HANDLE, stsizetype: MC_SIZE_TYPE, dwnewdisplayareawidthorheight: u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SetMonitorDisplayAreaSize(hmonitor : super::super::Foundation:: HANDLE, stsizetype : MC_SIZE_TYPE, dwnewdisplayareawidthorheight : u32) -> i32); - SetMonitorDisplayAreaSize(hmonitor.param().abi(), core::mem::transmute(stsizetype), core::mem::transmute(dwnewdisplayareawidthorheight)) + SetMonitorDisplayAreaSize(core::mem::transmute(hmonitor), core::mem::transmute(stsizetype), core::mem::transmute(dwnewdisplayareawidthorheight)) } #[inline] -pub unsafe fn SetMonitorRedGreenOrBlueDrive(hmonitor: P0, dtdrivetype: MC_DRIVE_TYPE, dwnewdrive: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMonitorRedGreenOrBlueDrive(hmonitor: super::super::Foundation::HANDLE, dtdrivetype: MC_DRIVE_TYPE, dwnewdrive: u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SetMonitorRedGreenOrBlueDrive(hmonitor : super::super::Foundation:: HANDLE, dtdrivetype : MC_DRIVE_TYPE, dwnewdrive : u32) -> i32); - SetMonitorRedGreenOrBlueDrive(hmonitor.param().abi(), core::mem::transmute(dtdrivetype), core::mem::transmute(dwnewdrive)) + SetMonitorRedGreenOrBlueDrive(core::mem::transmute(hmonitor), core::mem::transmute(dtdrivetype), core::mem::transmute(dwnewdrive)) } #[inline] -pub unsafe fn SetMonitorRedGreenOrBlueGain(hmonitor: P0, gtgaintype: MC_GAIN_TYPE, dwnewgain: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMonitorRedGreenOrBlueGain(hmonitor: super::super::Foundation::HANDLE, gtgaintype: MC_GAIN_TYPE, dwnewgain: u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SetMonitorRedGreenOrBlueGain(hmonitor : super::super::Foundation:: HANDLE, gtgaintype : MC_GAIN_TYPE, dwnewgain : u32) -> i32); - SetMonitorRedGreenOrBlueGain(hmonitor.param().abi(), core::mem::transmute(gtgaintype), core::mem::transmute(dwnewgain)) + SetMonitorRedGreenOrBlueGain(core::mem::transmute(hmonitor), core::mem::transmute(gtgaintype), core::mem::transmute(dwnewgain)) } #[inline] -pub unsafe fn SetVCPFeature(hmonitor: P0, bvcpcode: u8, dwnewvalue: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetVCPFeature(hmonitor: super::super::Foundation::HANDLE, bvcpcode: u8, dwnewvalue: u32) -> i32 { windows_targets::link!("dxva2.dll" "system" fn SetVCPFeature(hmonitor : super::super::Foundation:: HANDLE, bvcpcode : u8, dwnewvalue : u32) -> i32); - SetVCPFeature(hmonitor.param().abi(), core::mem::transmute(bvcpcode), core::mem::transmute(dwnewvalue)) + SetVCPFeature(core::mem::transmute(hmonitor), core::mem::transmute(bvcpcode), core::mem::transmute(dwnewvalue)) } #[inline] pub unsafe fn XFORMOBJ_bApplyXform(pxo: *mut XFORMOBJ, imode: u32, cpoints: u32, pvin: *mut core::ffi::c_void, pvout: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { @@ -745,7 +612,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(core::mem::transmute(pxo), core::mem::transmute(pxform.unwrap_or(core::ptr::null_mut()))) + XFORMOBJ_iGetXform(core::mem::transmute(pxo), core::mem::transmute(pxform.unwrap_or(core::mem::zeroed()))) } #[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 b24c7aaf23..03b5024886 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 @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn SwDeviceClose(hswdevice: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn SwDeviceClose(hswdevice: HSWDEVICE) { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceClose(hswdevice : HSWDEVICE)); - SwDeviceClose(hswdevice.param().abi()) + SwDeviceClose(core::mem::transmute(hswdevice)) } #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Security"))] #[inline] @@ -15,65 +12,53 @@ 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(), core::mem::transmute(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())), core::mem::transmute(pcallback), core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + SwDeviceCreate(pszenumeratorname.param().abi(), pszparentdeviceinstance.param().abi(), core::mem::transmute(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())), core::mem::transmute(pcallback), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn SwDeviceGetLifetime(hswdevice: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn SwDeviceGetLifetime(hswdevice: HSWDEVICE) -> windows_core::Result { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceGetLifetime(hswdevice : HSWDEVICE, plifetime : *mut SW_DEVICE_LIFETIME) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SwDeviceGetLifetime(hswdevice.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + SwDeviceGetLifetime(core::mem::transmute(hswdevice), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn SwDeviceInterfacePropertySet(hswdevice: P0, pszdeviceinterfaceid: P1, pproperties: &[super::super::Properties::DEVPROPERTY]) -> windows_core::Result<()> +pub unsafe fn SwDeviceInterfacePropertySet(hswdevice: HSWDEVICE, pszdeviceinterfaceid: P1, pproperties: &[super::super::Properties::DEVPROPERTY]) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceInterfacePropertySet(hswdevice : HSWDEVICE, pszdeviceinterfaceid : windows_core::PCWSTR, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY) -> windows_core::HRESULT); - SwDeviceInterfacePropertySet(hswdevice.param().abi(), pszdeviceinterfaceid.param().abi(), pproperties.len().try_into().unwrap(), core::mem::transmute(pproperties.as_ptr())).ok() + SwDeviceInterfacePropertySet(core::mem::transmute(hswdevice), pszdeviceinterfaceid.param().abi(), pproperties.len().try_into().unwrap(), core::mem::transmute(pproperties.as_ptr())).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn SwDeviceInterfaceRegister(hswdevice: P0, pinterfaceclassguid: *const windows_core::GUID, pszreferencestring: P2, pproperties: Option<&[super::super::Properties::DEVPROPERTY]>, fenabled: P5) -> windows_core::Result +pub unsafe fn SwDeviceInterfaceRegister(hswdevice: HSWDEVICE, pinterfaceclassguid: *const windows_core::GUID, pszreferencestring: P2, pproperties: Option<&[super::super::Properties::DEVPROPERTY]>, fenabled: P5) -> windows_core::Result where - P0: windows_core::Param, P2: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceInterfaceRegister(hswdevice : HSWDEVICE, pinterfaceclassguid : *const windows_core::GUID, pszreferencestring : windows_core::PCWSTR, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY, fenabled : super::super::super::Foundation:: BOOL, ppszdeviceinterfaceid : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SwDeviceInterfaceRegister(hswdevice.param().abi(), core::mem::transmute(pinterfaceclassguid), pszreferencestring.param().abi(), 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())), fenabled.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + SwDeviceInterfaceRegister(core::mem::transmute(hswdevice), core::mem::transmute(pinterfaceclassguid), pszreferencestring.param().abi(), 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())), fenabled.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn SwDeviceInterfaceSetState(hswdevice: P0, pszdeviceinterfaceid: P1, fenabled: P2) -> windows_core::Result<()> +pub unsafe fn SwDeviceInterfaceSetState(hswdevice: HSWDEVICE, pszdeviceinterfaceid: P1, fenabled: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceInterfaceSetState(hswdevice : HSWDEVICE, pszdeviceinterfaceid : windows_core::PCWSTR, fenabled : super::super::super::Foundation:: BOOL) -> windows_core::HRESULT); - SwDeviceInterfaceSetState(hswdevice.param().abi(), pszdeviceinterfaceid.param().abi(), fenabled.param().abi()).ok() + SwDeviceInterfaceSetState(core::mem::transmute(hswdevice), pszdeviceinterfaceid.param().abi(), fenabled.param().abi()).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn SwDevicePropertySet(hswdevice: P0, pproperties: &[super::super::Properties::DEVPROPERTY]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SwDevicePropertySet(hswdevice: HSWDEVICE, pproperties: &[super::super::Properties::DEVPROPERTY]) -> windows_core::Result<()> { windows_targets::link!("cfgmgr32.dll" "system" fn SwDevicePropertySet(hswdevice : HSWDEVICE, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY) -> windows_core::HRESULT); - SwDevicePropertySet(hswdevice.param().abi(), pproperties.len().try_into().unwrap(), core::mem::transmute(pproperties.as_ptr())).ok() + SwDevicePropertySet(core::mem::transmute(hswdevice), pproperties.len().try_into().unwrap(), core::mem::transmute(pproperties.as_ptr())).ok() } #[inline] -pub unsafe fn SwDeviceSetLifetime(hswdevice: P0, lifetime: SW_DEVICE_LIFETIME) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SwDeviceSetLifetime(hswdevice: HSWDEVICE, lifetime: SW_DEVICE_LIFETIME) -> windows_core::Result<()> { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceSetLifetime(hswdevice : HSWDEVICE, lifetime : SW_DEVICE_LIFETIME) -> windows_core::HRESULT); - SwDeviceSetLifetime(hswdevice.param().abi(), core::mem::transmute(lifetime)).ok() + SwDeviceSetLifetime(core::mem::transmute(hswdevice), core::mem::transmute(lifetime)).ok() } #[inline] pub unsafe fn SwMemFree(pmem: *const core::ffi::c_void) { 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 aa1aa0cade..a8013da5ae 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs @@ -4,28 +4,19 @@ pub unsafe fn CanSendToFaxRecipient() -> super::super::Foundation::BOOL { CanSendToFaxRecipient() } #[inline] -pub unsafe fn FaxAbort(faxhandle: P0, jobid: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FaxAbort(faxhandle: super::super::Foundation::HANDLE, jobid: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winfax.dll" "system" fn FaxAbort(faxhandle : super::super::Foundation:: HANDLE, jobid : u32) -> super::super::Foundation:: BOOL); - FaxAbort(faxhandle.param().abi(), core::mem::transmute(jobid)) + FaxAbort(core::mem::transmute(faxhandle), core::mem::transmute(jobid)) } #[inline] -pub unsafe fn FaxAccessCheck(faxhandle: P0, accessmask: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FaxAccessCheck(faxhandle: super::super::Foundation::HANDLE, accessmask: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winfax.dll" "system" fn FaxAccessCheck(faxhandle : super::super::Foundation:: HANDLE, accessmask : u32) -> super::super::Foundation:: BOOL); - FaxAccessCheck(faxhandle.param().abi(), core::mem::transmute(accessmask)) + FaxAccessCheck(core::mem::transmute(faxhandle), core::mem::transmute(accessmask)) } #[inline] -pub unsafe fn FaxClose(faxhandle: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FaxClose(faxhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("winfax.dll" "system" fn FaxClose(faxhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FaxClose(faxhandle.param().abi()) + FaxClose(core::mem::transmute(faxhandle)) } #[inline] pub unsafe fn FaxCompleteJobParamsA(jobparams: *mut *mut FAX_JOB_PARAMA, coverpageinfo: *mut *mut FAX_COVERPAGE_INFOA) -> super::super::Foundation::BOOL { @@ -54,88 +45,62 @@ where FaxConnectFaxServerW(machinename.param().abi(), core::mem::transmute(faxhandle)).ok() } #[inline] -pub unsafe fn FaxEnableRoutingMethodA(faxporthandle: P0, routingguid: P1, enabled: P2) -> windows_core::Result<()> +pub unsafe fn FaxEnableRoutingMethodA(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, enabled: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxEnableRoutingMethodA(faxporthandle : super::super::Foundation:: HANDLE, routingguid : windows_core::PCSTR, enabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FaxEnableRoutingMethodA(faxporthandle.param().abi(), routingguid.param().abi(), enabled.param().abi()).ok() + FaxEnableRoutingMethodA(core::mem::transmute(faxporthandle), routingguid.param().abi(), enabled.param().abi()).ok() } #[inline] -pub unsafe fn FaxEnableRoutingMethodW(faxporthandle: P0, routingguid: P1, enabled: P2) -> windows_core::Result<()> +pub unsafe fn FaxEnableRoutingMethodW(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, enabled: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxEnableRoutingMethodW(faxporthandle : super::super::Foundation:: HANDLE, routingguid : windows_core::PCWSTR, enabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FaxEnableRoutingMethodW(faxporthandle.param().abi(), routingguid.param().abi(), enabled.param().abi()).ok() + FaxEnableRoutingMethodW(core::mem::transmute(faxporthandle), routingguid.param().abi(), enabled.param().abi()).ok() } #[inline] -pub unsafe fn FaxEnumGlobalRoutingInfoA(faxhandle: P0, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOA, methodsreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxEnumGlobalRoutingInfoA(faxhandle: super::super::Foundation::HANDLE, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOA, methodsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxEnumGlobalRoutingInfoA(faxhandle : super::super::Foundation:: HANDLE, routinginfo : *mut *mut FAX_GLOBAL_ROUTING_INFOA, methodsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumGlobalRoutingInfoA(faxhandle.param().abi(), core::mem::transmute(routinginfo), core::mem::transmute(methodsreturned)).ok() + FaxEnumGlobalRoutingInfoA(core::mem::transmute(faxhandle), core::mem::transmute(routinginfo), core::mem::transmute(methodsreturned)).ok() } #[inline] -pub unsafe fn FaxEnumGlobalRoutingInfoW(faxhandle: P0, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOW, methodsreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxEnumGlobalRoutingInfoW(faxhandle: super::super::Foundation::HANDLE, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOW, methodsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxEnumGlobalRoutingInfoW(faxhandle : super::super::Foundation:: HANDLE, routinginfo : *mut *mut FAX_GLOBAL_ROUTING_INFOW, methodsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumGlobalRoutingInfoW(faxhandle.param().abi(), core::mem::transmute(routinginfo), core::mem::transmute(methodsreturned)).ok() + FaxEnumGlobalRoutingInfoW(core::mem::transmute(faxhandle), core::mem::transmute(routinginfo), core::mem::transmute(methodsreturned)).ok() } #[inline] -pub unsafe fn FaxEnumJobsA(faxhandle: P0, jobentry: *mut *mut FAX_JOB_ENTRYA, jobsreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxEnumJobsA(faxhandle: super::super::Foundation::HANDLE, jobentry: *mut *mut FAX_JOB_ENTRYA, jobsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxEnumJobsA(faxhandle : super::super::Foundation:: HANDLE, jobentry : *mut *mut FAX_JOB_ENTRYA, jobsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumJobsA(faxhandle.param().abi(), core::mem::transmute(jobentry), core::mem::transmute(jobsreturned)).ok() + FaxEnumJobsA(core::mem::transmute(faxhandle), core::mem::transmute(jobentry), core::mem::transmute(jobsreturned)).ok() } #[inline] -pub unsafe fn FaxEnumJobsW(faxhandle: P0, jobentry: *mut *mut FAX_JOB_ENTRYW, jobsreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxEnumJobsW(faxhandle: super::super::Foundation::HANDLE, jobentry: *mut *mut FAX_JOB_ENTRYW, jobsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxEnumJobsW(faxhandle : super::super::Foundation:: HANDLE, jobentry : *mut *mut FAX_JOB_ENTRYW, jobsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumJobsW(faxhandle.param().abi(), core::mem::transmute(jobentry), core::mem::transmute(jobsreturned)).ok() + FaxEnumJobsW(core::mem::transmute(faxhandle), core::mem::transmute(jobentry), core::mem::transmute(jobsreturned)).ok() } #[inline] -pub unsafe fn FaxEnumPortsA(faxhandle: P0, portinfo: *mut *mut FAX_PORT_INFOA, portsreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxEnumPortsA(faxhandle: super::super::Foundation::HANDLE, portinfo: *mut *mut FAX_PORT_INFOA, portsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxEnumPortsA(faxhandle : super::super::Foundation:: HANDLE, portinfo : *mut *mut FAX_PORT_INFOA, portsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumPortsA(faxhandle.param().abi(), core::mem::transmute(portinfo), core::mem::transmute(portsreturned)).ok() + FaxEnumPortsA(core::mem::transmute(faxhandle), core::mem::transmute(portinfo), core::mem::transmute(portsreturned)).ok() } #[inline] -pub unsafe fn FaxEnumPortsW(faxhandle: P0, portinfo: *mut *mut FAX_PORT_INFOW, portsreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxEnumPortsW(faxhandle: super::super::Foundation::HANDLE, portinfo: *mut *mut FAX_PORT_INFOW, portsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxEnumPortsW(faxhandle : super::super::Foundation:: HANDLE, portinfo : *mut *mut FAX_PORT_INFOW, portsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumPortsW(faxhandle.param().abi(), core::mem::transmute(portinfo), core::mem::transmute(portsreturned)).ok() + FaxEnumPortsW(core::mem::transmute(faxhandle), core::mem::transmute(portinfo), core::mem::transmute(portsreturned)).ok() } #[inline] -pub unsafe fn FaxEnumRoutingMethodsA(faxporthandle: P0, routingmethod: *mut *mut FAX_ROUTING_METHODA, methodsreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxEnumRoutingMethodsA(faxporthandle: super::super::Foundation::HANDLE, routingmethod: *mut *mut FAX_ROUTING_METHODA, methodsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxEnumRoutingMethodsA(faxporthandle : super::super::Foundation:: HANDLE, routingmethod : *mut *mut FAX_ROUTING_METHODA, methodsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumRoutingMethodsA(faxporthandle.param().abi(), core::mem::transmute(routingmethod), core::mem::transmute(methodsreturned)).ok() + FaxEnumRoutingMethodsA(core::mem::transmute(faxporthandle), core::mem::transmute(routingmethod), core::mem::transmute(methodsreturned)).ok() } #[inline] -pub unsafe fn FaxEnumRoutingMethodsW(faxporthandle: P0, routingmethod: *mut *mut FAX_ROUTING_METHODW, methodsreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxEnumRoutingMethodsW(faxporthandle: super::super::Foundation::HANDLE, routingmethod: *mut *mut FAX_ROUTING_METHODW, methodsreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxEnumRoutingMethodsW(faxporthandle : super::super::Foundation:: HANDLE, routingmethod : *mut *mut FAX_ROUTING_METHODW, methodsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumRoutingMethodsW(faxporthandle.param().abi(), core::mem::transmute(routingmethod), core::mem::transmute(methodsreturned)).ok() + FaxEnumRoutingMethodsW(core::mem::transmute(faxporthandle), core::mem::transmute(routingmethod), core::mem::transmute(methodsreturned)).ok() } #[inline] pub unsafe fn FaxFreeBuffer(buffer: *mut core::ffi::c_void) { @@ -143,128 +108,85 @@ pub unsafe fn FaxFreeBuffer(buffer: *mut core::ffi::c_void) { FaxFreeBuffer(core::mem::transmute(buffer)) } #[inline] -pub unsafe fn FaxGetConfigurationA(faxhandle: P0, faxconfig: *mut *mut FAX_CONFIGURATIONA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetConfigurationA(faxhandle: super::super::Foundation::HANDLE, faxconfig: *mut *mut FAX_CONFIGURATIONA) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetConfigurationA(faxhandle : super::super::Foundation:: HANDLE, faxconfig : *mut *mut FAX_CONFIGURATIONA) -> super::super::Foundation:: BOOL); - FaxGetConfigurationA(faxhandle.param().abi(), core::mem::transmute(faxconfig)).ok() + FaxGetConfigurationA(core::mem::transmute(faxhandle), core::mem::transmute(faxconfig)).ok() } #[inline] -pub unsafe fn FaxGetConfigurationW(faxhandle: P0, faxconfig: *mut *mut FAX_CONFIGURATIONW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetConfigurationW(faxhandle: super::super::Foundation::HANDLE, faxconfig: *mut *mut FAX_CONFIGURATIONW) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetConfigurationW(faxhandle : super::super::Foundation:: HANDLE, faxconfig : *mut *mut FAX_CONFIGURATIONW) -> super::super::Foundation:: BOOL); - FaxGetConfigurationW(faxhandle.param().abi(), core::mem::transmute(faxconfig)).ok() + FaxGetConfigurationW(core::mem::transmute(faxhandle), core::mem::transmute(faxconfig)).ok() } #[inline] -pub unsafe fn FaxGetDeviceStatusA(faxporthandle: P0, devicestatus: *mut *mut FAX_DEVICE_STATUSA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetDeviceStatusA(faxporthandle: super::super::Foundation::HANDLE, devicestatus: *mut *mut FAX_DEVICE_STATUSA) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetDeviceStatusA(faxporthandle : super::super::Foundation:: HANDLE, devicestatus : *mut *mut FAX_DEVICE_STATUSA) -> super::super::Foundation:: BOOL); - FaxGetDeviceStatusA(faxporthandle.param().abi(), core::mem::transmute(devicestatus)).ok() + FaxGetDeviceStatusA(core::mem::transmute(faxporthandle), core::mem::transmute(devicestatus)).ok() } #[inline] -pub unsafe fn FaxGetDeviceStatusW(faxporthandle: P0, devicestatus: *mut *mut FAX_DEVICE_STATUSW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetDeviceStatusW(faxporthandle: super::super::Foundation::HANDLE, devicestatus: *mut *mut FAX_DEVICE_STATUSW) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetDeviceStatusW(faxporthandle : super::super::Foundation:: HANDLE, devicestatus : *mut *mut FAX_DEVICE_STATUSW) -> super::super::Foundation:: BOOL); - FaxGetDeviceStatusW(faxporthandle.param().abi(), core::mem::transmute(devicestatus)).ok() + FaxGetDeviceStatusW(core::mem::transmute(faxporthandle), core::mem::transmute(devicestatus)).ok() } #[inline] -pub unsafe fn FaxGetJobA(faxhandle: P0, jobid: u32, jobentry: *mut *mut FAX_JOB_ENTRYA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetJobA(faxhandle: super::super::Foundation::HANDLE, jobid: u32, jobentry: *mut *mut FAX_JOB_ENTRYA) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetJobA(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, jobentry : *mut *mut FAX_JOB_ENTRYA) -> super::super::Foundation:: BOOL); - FaxGetJobA(faxhandle.param().abi(), core::mem::transmute(jobid), core::mem::transmute(jobentry)).ok() + FaxGetJobA(core::mem::transmute(faxhandle), core::mem::transmute(jobid), core::mem::transmute(jobentry)).ok() } #[inline] -pub unsafe fn FaxGetJobW(faxhandle: P0, jobid: u32, jobentry: *mut *mut FAX_JOB_ENTRYW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetJobW(faxhandle: super::super::Foundation::HANDLE, jobid: u32, jobentry: *mut *mut FAX_JOB_ENTRYW) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetJobW(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, jobentry : *mut *mut FAX_JOB_ENTRYW) -> super::super::Foundation:: BOOL); - FaxGetJobW(faxhandle.param().abi(), core::mem::transmute(jobid), core::mem::transmute(jobentry)).ok() + FaxGetJobW(core::mem::transmute(faxhandle), core::mem::transmute(jobid), core::mem::transmute(jobentry)).ok() } #[inline] -pub unsafe fn FaxGetLoggingCategoriesA(faxhandle: P0, categories: *mut *mut FAX_LOG_CATEGORYA, numbercategories: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetLoggingCategoriesA(faxhandle: super::super::Foundation::HANDLE, categories: *mut *mut FAX_LOG_CATEGORYA, numbercategories: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetLoggingCategoriesA(faxhandle : super::super::Foundation:: HANDLE, categories : *mut *mut FAX_LOG_CATEGORYA, numbercategories : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetLoggingCategoriesA(faxhandle.param().abi(), core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() + FaxGetLoggingCategoriesA(core::mem::transmute(faxhandle), core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() } #[inline] -pub unsafe fn FaxGetLoggingCategoriesW(faxhandle: P0, categories: *mut *mut FAX_LOG_CATEGORYW, numbercategories: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetLoggingCategoriesW(faxhandle: super::super::Foundation::HANDLE, categories: *mut *mut FAX_LOG_CATEGORYW, numbercategories: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetLoggingCategoriesW(faxhandle : super::super::Foundation:: HANDLE, categories : *mut *mut FAX_LOG_CATEGORYW, numbercategories : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetLoggingCategoriesW(faxhandle.param().abi(), core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() + FaxGetLoggingCategoriesW(core::mem::transmute(faxhandle), core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() } #[inline] -pub unsafe fn FaxGetPageData(faxhandle: P0, jobid: u32, buffer: *mut *mut u8, buffersize: *mut u32, imagewidth: *mut u32, imageheight: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetPageData(faxhandle: super::super::Foundation::HANDLE, jobid: u32, buffer: *mut *mut u8, buffersize: *mut u32, imagewidth: *mut u32, imageheight: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winfax.dll" "system" fn FaxGetPageData(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, buffer : *mut *mut u8, buffersize : *mut u32, imagewidth : *mut u32, imageheight : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetPageData(faxhandle.param().abi(), core::mem::transmute(jobid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(imagewidth), core::mem::transmute(imageheight)) + FaxGetPageData(core::mem::transmute(faxhandle), core::mem::transmute(jobid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(imagewidth), core::mem::transmute(imageheight)) } #[inline] -pub unsafe fn FaxGetPortA(faxporthandle: P0, portinfo: *mut *mut FAX_PORT_INFOA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetPortA(faxporthandle: super::super::Foundation::HANDLE, portinfo: *mut *mut FAX_PORT_INFOA) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetPortA(faxporthandle : super::super::Foundation:: HANDLE, portinfo : *mut *mut FAX_PORT_INFOA) -> super::super::Foundation:: BOOL); - FaxGetPortA(faxporthandle.param().abi(), core::mem::transmute(portinfo)).ok() + FaxGetPortA(core::mem::transmute(faxporthandle), core::mem::transmute(portinfo)).ok() } #[inline] -pub unsafe fn FaxGetPortW(faxporthandle: P0, portinfo: *mut *mut FAX_PORT_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxGetPortW(faxporthandle: super::super::Foundation::HANDLE, portinfo: *mut *mut FAX_PORT_INFOW) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxGetPortW(faxporthandle : super::super::Foundation:: HANDLE, portinfo : *mut *mut FAX_PORT_INFOW) -> super::super::Foundation:: BOOL); - FaxGetPortW(faxporthandle.param().abi(), core::mem::transmute(portinfo)).ok() + FaxGetPortW(core::mem::transmute(faxporthandle), core::mem::transmute(portinfo)).ok() } #[inline] -pub unsafe fn FaxGetRoutingInfoA(faxporthandle: P0, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> windows_core::Result<()> +pub unsafe fn FaxGetRoutingInfoA(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxGetRoutingInfoA(faxporthandle : super::super::Foundation:: HANDLE, routingguid : windows_core::PCSTR, routinginfobuffer : *mut *mut u8, routinginfobuffersize : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetRoutingInfoA(faxporthandle.param().abi(), routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() + FaxGetRoutingInfoA(core::mem::transmute(faxporthandle), routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() } #[inline] -pub unsafe fn FaxGetRoutingInfoW(faxporthandle: P0, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> windows_core::Result<()> +pub unsafe fn FaxGetRoutingInfoW(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxGetRoutingInfoW(faxporthandle : super::super::Foundation:: HANDLE, routingguid : windows_core::PCWSTR, routinginfobuffer : *mut *mut u8, routinginfobuffersize : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetRoutingInfoW(faxporthandle.param().abi(), routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() + FaxGetRoutingInfoW(core::mem::transmute(faxporthandle), routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() } #[inline] -pub unsafe fn FaxInitializeEventQueue(faxhandle: P0, completionport: P1, completionkey: usize, hwnd: P3, messagestart: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FaxInitializeEventQueue(faxhandle: super::super::Foundation::HANDLE, completionport: super::super::Foundation::HANDLE, completionkey: usize, hwnd: super::super::Foundation::HWND, messagestart: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winfax.dll" "system" fn FaxInitializeEventQueue(faxhandle : super::super::Foundation:: HANDLE, completionport : super::super::Foundation:: HANDLE, completionkey : usize, hwnd : super::super::Foundation:: HWND, messagestart : u32) -> super::super::Foundation:: BOOL); - FaxInitializeEventQueue(faxhandle.param().abi(), completionport.param().abi(), core::mem::transmute(completionkey), hwnd.param().abi(), core::mem::transmute(messagestart)) + FaxInitializeEventQueue(core::mem::transmute(faxhandle), core::mem::transmute(completionport), core::mem::transmute(completionkey), core::mem::transmute(hwnd), core::mem::transmute(messagestart)) } #[inline] -pub unsafe fn FaxOpenPort(faxhandle: P0, deviceid: u32, flags: u32, faxporthandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FaxOpenPort(faxhandle: super::super::Foundation::HANDLE, deviceid: u32, flags: u32, faxporthandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("winfax.dll" "system" fn FaxOpenPort(faxhandle : super::super::Foundation:: HANDLE, deviceid : u32, flags : u32, faxporthandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FaxOpenPort(faxhandle.param().abi(), core::mem::transmute(deviceid), core::mem::transmute(flags), core::mem::transmute(faxporthandle)) + FaxOpenPort(core::mem::transmute(faxhandle), core::mem::transmute(deviceid), core::mem::transmute(flags), core::mem::transmute(faxporthandle)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -279,15 +201,14 @@ pub unsafe fn FaxPrintCoverPageW(faxcontextinfo: *const FAX_CONTEXT_INFOW, cover FaxPrintCoverPageW(core::mem::transmute(faxcontextinfo), core::mem::transmute(coverpageinfo)).ok() } #[inline] -pub unsafe fn FaxRegisterRoutingExtensionW(faxhandle: P0, extensionname: P1, friendlyname: P2, imagename: P3, callback: PFAX_ROUTING_INSTALLATION_CALLBACKW, context: *const core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn FaxRegisterRoutingExtensionW(faxhandle: super::super::Foundation::HANDLE, extensionname: P1, friendlyname: P2, imagename: P3, callback: PFAX_ROUTING_INSTALLATION_CALLBACKW, context: *const core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxRegisterRoutingExtensionW(faxhandle : super::super::Foundation:: HANDLE, extensionname : windows_core::PCWSTR, friendlyname : windows_core::PCWSTR, imagename : windows_core::PCWSTR, callback : PFAX_ROUTING_INSTALLATION_CALLBACKW, context : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - FaxRegisterRoutingExtensionW(faxhandle.param().abi(), extensionname.param().abi(), friendlyname.param().abi(), imagename.param().abi(), core::mem::transmute(callback), core::mem::transmute(context)).ok() + FaxRegisterRoutingExtensionW(core::mem::transmute(faxhandle), extensionname.param().abi(), friendlyname.param().abi(), imagename.param().abi(), core::mem::transmute(callback), core::mem::transmute(context)).ok() } #[inline] pub unsafe fn FaxRegisterServiceProviderW(deviceprovider: P0, friendlyname: P1, imagename: P2, tspname: P3) -> windows_core::Result<()> @@ -301,138 +222,102 @@ where FaxRegisterServiceProviderW(deviceprovider.param().abi(), friendlyname.param().abi(), imagename.param().abi(), tspname.param().abi()).ok() } #[inline] -pub unsafe fn FaxSendDocumentA(faxhandle: P0, filename: P1, jobparams: *const FAX_JOB_PARAMA, coverpageinfo: *const FAX_COVERPAGE_INFOA, faxjobid: *mut u32) -> windows_core::Result<()> +pub unsafe fn FaxSendDocumentA(faxhandle: super::super::Foundation::HANDLE, filename: P1, jobparams: *const FAX_JOB_PARAMA, coverpageinfo: *const FAX_COVERPAGE_INFOA, faxjobid: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxSendDocumentA(faxhandle : super::super::Foundation:: HANDLE, filename : windows_core::PCSTR, jobparams : *const FAX_JOB_PARAMA, coverpageinfo : *const FAX_COVERPAGE_INFOA, faxjobid : *mut u32) -> super::super::Foundation:: BOOL); - FaxSendDocumentA(faxhandle.param().abi(), filename.param().abi(), core::mem::transmute(jobparams), core::mem::transmute(coverpageinfo), core::mem::transmute(faxjobid)).ok() + FaxSendDocumentA(core::mem::transmute(faxhandle), filename.param().abi(), core::mem::transmute(jobparams), core::mem::transmute(coverpageinfo), core::mem::transmute(faxjobid)).ok() } #[inline] -pub unsafe fn FaxSendDocumentForBroadcastA(faxhandle: P0, filename: P1, faxjobid: *mut u32, faxrecipientcallback: PFAX_RECIPIENT_CALLBACKA, context: *const core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn FaxSendDocumentForBroadcastA(faxhandle: super::super::Foundation::HANDLE, filename: P1, faxjobid: *mut u32, faxrecipientcallback: PFAX_RECIPIENT_CALLBACKA, context: *const core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxSendDocumentForBroadcastA(faxhandle : super::super::Foundation:: HANDLE, filename : windows_core::PCSTR, faxjobid : *mut u32, faxrecipientcallback : PFAX_RECIPIENT_CALLBACKA, context : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - FaxSendDocumentForBroadcastA(faxhandle.param().abi(), filename.param().abi(), core::mem::transmute(faxjobid), core::mem::transmute(faxrecipientcallback), core::mem::transmute(context)).ok() + FaxSendDocumentForBroadcastA(core::mem::transmute(faxhandle), filename.param().abi(), core::mem::transmute(faxjobid), core::mem::transmute(faxrecipientcallback), core::mem::transmute(context)).ok() } #[inline] -pub unsafe fn FaxSendDocumentForBroadcastW(faxhandle: P0, filename: P1, faxjobid: *mut u32, faxrecipientcallback: PFAX_RECIPIENT_CALLBACKW, context: *const core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn FaxSendDocumentForBroadcastW(faxhandle: super::super::Foundation::HANDLE, filename: P1, faxjobid: *mut u32, faxrecipientcallback: PFAX_RECIPIENT_CALLBACKW, context: *const core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxSendDocumentForBroadcastW(faxhandle : super::super::Foundation:: HANDLE, filename : windows_core::PCWSTR, faxjobid : *mut u32, faxrecipientcallback : PFAX_RECIPIENT_CALLBACKW, context : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - FaxSendDocumentForBroadcastW(faxhandle.param().abi(), filename.param().abi(), core::mem::transmute(faxjobid), core::mem::transmute(faxrecipientcallback), core::mem::transmute(context)).ok() + FaxSendDocumentForBroadcastW(core::mem::transmute(faxhandle), filename.param().abi(), core::mem::transmute(faxjobid), core::mem::transmute(faxrecipientcallback), core::mem::transmute(context)).ok() } #[inline] -pub unsafe fn FaxSendDocumentW(faxhandle: P0, filename: P1, jobparams: *const FAX_JOB_PARAMW, coverpageinfo: *const FAX_COVERPAGE_INFOW, faxjobid: *mut u32) -> windows_core::Result<()> +pub unsafe fn FaxSendDocumentW(faxhandle: super::super::Foundation::HANDLE, filename: P1, jobparams: *const FAX_JOB_PARAMW, coverpageinfo: *const FAX_COVERPAGE_INFOW, faxjobid: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxSendDocumentW(faxhandle : super::super::Foundation:: HANDLE, filename : windows_core::PCWSTR, jobparams : *const FAX_JOB_PARAMW, coverpageinfo : *const FAX_COVERPAGE_INFOW, faxjobid : *mut u32) -> super::super::Foundation:: BOOL); - FaxSendDocumentW(faxhandle.param().abi(), filename.param().abi(), core::mem::transmute(jobparams), core::mem::transmute(coverpageinfo), core::mem::transmute(faxjobid)).ok() + FaxSendDocumentW(core::mem::transmute(faxhandle), filename.param().abi(), core::mem::transmute(jobparams), core::mem::transmute(coverpageinfo), core::mem::transmute(faxjobid)).ok() } #[inline] -pub unsafe fn FaxSetConfigurationA(faxhandle: P0, faxconfig: *const FAX_CONFIGURATIONA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetConfigurationA(faxhandle: super::super::Foundation::HANDLE, faxconfig: *const FAX_CONFIGURATIONA) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetConfigurationA(faxhandle : super::super::Foundation:: HANDLE, faxconfig : *const FAX_CONFIGURATIONA) -> super::super::Foundation:: BOOL); - FaxSetConfigurationA(faxhandle.param().abi(), core::mem::transmute(faxconfig)).ok() + FaxSetConfigurationA(core::mem::transmute(faxhandle), core::mem::transmute(faxconfig)).ok() } #[inline] -pub unsafe fn FaxSetConfigurationW(faxhandle: P0, faxconfig: *const FAX_CONFIGURATIONW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetConfigurationW(faxhandle: super::super::Foundation::HANDLE, faxconfig: *const FAX_CONFIGURATIONW) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetConfigurationW(faxhandle : super::super::Foundation:: HANDLE, faxconfig : *const FAX_CONFIGURATIONW) -> super::super::Foundation:: BOOL); - FaxSetConfigurationW(faxhandle.param().abi(), core::mem::transmute(faxconfig)).ok() + FaxSetConfigurationW(core::mem::transmute(faxhandle), core::mem::transmute(faxconfig)).ok() } #[inline] -pub unsafe fn FaxSetGlobalRoutingInfoA(faxhandle: P0, routinginfo: *const FAX_GLOBAL_ROUTING_INFOA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetGlobalRoutingInfoA(faxhandle: super::super::Foundation::HANDLE, routinginfo: *const FAX_GLOBAL_ROUTING_INFOA) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetGlobalRoutingInfoA(faxhandle : super::super::Foundation:: HANDLE, routinginfo : *const FAX_GLOBAL_ROUTING_INFOA) -> super::super::Foundation:: BOOL); - FaxSetGlobalRoutingInfoA(faxhandle.param().abi(), core::mem::transmute(routinginfo)).ok() + FaxSetGlobalRoutingInfoA(core::mem::transmute(faxhandle), core::mem::transmute(routinginfo)).ok() } #[inline] -pub unsafe fn FaxSetGlobalRoutingInfoW(faxhandle: P0, routinginfo: *const FAX_GLOBAL_ROUTING_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetGlobalRoutingInfoW(faxhandle: super::super::Foundation::HANDLE, routinginfo: *const FAX_GLOBAL_ROUTING_INFOW) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetGlobalRoutingInfoW(faxhandle : super::super::Foundation:: HANDLE, routinginfo : *const FAX_GLOBAL_ROUTING_INFOW) -> super::super::Foundation:: BOOL); - FaxSetGlobalRoutingInfoW(faxhandle.param().abi(), core::mem::transmute(routinginfo)).ok() + FaxSetGlobalRoutingInfoW(core::mem::transmute(faxhandle), core::mem::transmute(routinginfo)).ok() } #[inline] -pub unsafe fn FaxSetJobA(faxhandle: P0, jobid: u32, command: u32, jobentry: *const FAX_JOB_ENTRYA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetJobA(faxhandle: super::super::Foundation::HANDLE, jobid: u32, command: u32, jobentry: *const FAX_JOB_ENTRYA) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetJobA(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, command : u32, jobentry : *const FAX_JOB_ENTRYA) -> super::super::Foundation:: BOOL); - FaxSetJobA(faxhandle.param().abi(), core::mem::transmute(jobid), core::mem::transmute(command), core::mem::transmute(jobentry)).ok() + FaxSetJobA(core::mem::transmute(faxhandle), core::mem::transmute(jobid), core::mem::transmute(command), core::mem::transmute(jobentry)).ok() } #[inline] -pub unsafe fn FaxSetJobW(faxhandle: P0, jobid: u32, command: u32, jobentry: *const FAX_JOB_ENTRYW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetJobW(faxhandle: super::super::Foundation::HANDLE, jobid: u32, command: u32, jobentry: *const FAX_JOB_ENTRYW) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetJobW(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, command : u32, jobentry : *const FAX_JOB_ENTRYW) -> super::super::Foundation:: BOOL); - FaxSetJobW(faxhandle.param().abi(), core::mem::transmute(jobid), core::mem::transmute(command), core::mem::transmute(jobentry)).ok() + FaxSetJobW(core::mem::transmute(faxhandle), core::mem::transmute(jobid), core::mem::transmute(command), core::mem::transmute(jobentry)).ok() } #[inline] -pub unsafe fn FaxSetLoggingCategoriesA(faxhandle: P0, categories: *const FAX_LOG_CATEGORYA, numbercategories: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetLoggingCategoriesA(faxhandle: super::super::Foundation::HANDLE, categories: *const FAX_LOG_CATEGORYA, numbercategories: u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetLoggingCategoriesA(faxhandle : super::super::Foundation:: HANDLE, categories : *const FAX_LOG_CATEGORYA, numbercategories : u32) -> super::super::Foundation:: BOOL); - FaxSetLoggingCategoriesA(faxhandle.param().abi(), core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() + FaxSetLoggingCategoriesA(core::mem::transmute(faxhandle), core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() } #[inline] -pub unsafe fn FaxSetLoggingCategoriesW(faxhandle: P0, categories: *const FAX_LOG_CATEGORYW, numbercategories: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetLoggingCategoriesW(faxhandle: super::super::Foundation::HANDLE, categories: *const FAX_LOG_CATEGORYW, numbercategories: u32) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetLoggingCategoriesW(faxhandle : super::super::Foundation:: HANDLE, categories : *const FAX_LOG_CATEGORYW, numbercategories : u32) -> super::super::Foundation:: BOOL); - FaxSetLoggingCategoriesW(faxhandle.param().abi(), core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() + FaxSetLoggingCategoriesW(core::mem::transmute(faxhandle), core::mem::transmute(categories), core::mem::transmute(numbercategories)).ok() } #[inline] -pub unsafe fn FaxSetPortA(faxporthandle: P0, portinfo: *const FAX_PORT_INFOA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetPortA(faxporthandle: super::super::Foundation::HANDLE, portinfo: *const FAX_PORT_INFOA) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetPortA(faxporthandle : super::super::Foundation:: HANDLE, portinfo : *const FAX_PORT_INFOA) -> super::super::Foundation:: BOOL); - FaxSetPortA(faxporthandle.param().abi(), core::mem::transmute(portinfo)).ok() + FaxSetPortA(core::mem::transmute(faxporthandle), core::mem::transmute(portinfo)).ok() } #[inline] -pub unsafe fn FaxSetPortW(faxporthandle: P0, portinfo: *const FAX_PORT_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaxSetPortW(faxporthandle: super::super::Foundation::HANDLE, portinfo: *const FAX_PORT_INFOW) -> windows_core::Result<()> { windows_targets::link!("winfax.dll" "system" fn FaxSetPortW(faxporthandle : super::super::Foundation:: HANDLE, portinfo : *const FAX_PORT_INFOW) -> super::super::Foundation:: BOOL); - FaxSetPortW(faxporthandle.param().abi(), core::mem::transmute(portinfo)).ok() + FaxSetPortW(core::mem::transmute(faxporthandle), core::mem::transmute(portinfo)).ok() } #[inline] -pub unsafe fn FaxSetRoutingInfoA(faxporthandle: P0, routingguid: P1, routinginfobuffer: *const u8, routinginfobuffersize: u32) -> windows_core::Result<()> +pub unsafe fn FaxSetRoutingInfoA(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, routinginfobuffer: *const u8, routinginfobuffersize: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxSetRoutingInfoA(faxporthandle : super::super::Foundation:: HANDLE, routingguid : windows_core::PCSTR, routinginfobuffer : *const u8, routinginfobuffersize : u32) -> super::super::Foundation:: BOOL); - FaxSetRoutingInfoA(faxporthandle.param().abi(), routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() + FaxSetRoutingInfoA(core::mem::transmute(faxporthandle), routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() } #[inline] -pub unsafe fn FaxSetRoutingInfoW(faxporthandle: P0, routingguid: P1, routinginfobuffer: *const u8, routinginfobuffersize: u32) -> windows_core::Result<()> +pub unsafe fn FaxSetRoutingInfoW(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, routinginfobuffer: *const u8, routinginfobuffersize: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxSetRoutingInfoW(faxporthandle : super::super::Foundation:: HANDLE, routingguid : windows_core::PCWSTR, routinginfobuffer : *const u8, routinginfobuffersize : u32) -> super::super::Foundation:: BOOL); - FaxSetRoutingInfoW(faxporthandle.param().abi(), routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() + FaxSetRoutingInfoW(core::mem::transmute(faxporthandle), routingguid.param().abi(), core::mem::transmute(routinginfobuffer), core::mem::transmute(routinginfobuffersize)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -469,13 +354,12 @@ where SendToFaxRecipient(core::mem::transmute(sndmode), lpfilename.param().abi()) } #[inline] -pub unsafe fn StiCreateInstanceW(hinst: P0, dwver: u32, ppsti: *mut Option, punkouter: P3) -> windows_core::Result<()> +pub unsafe fn StiCreateInstanceW(hinst: super::super::Foundation::HINSTANCE, dwver: u32, ppsti: *mut Option, punkouter: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("sti.dll" "system" fn StiCreateInstanceW(hinst : super::super::Foundation:: HINSTANCE, dwver : u32, ppsti : *mut * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - StiCreateInstanceW(hinst.param().abi(), core::mem::transmute(dwver), core::mem::transmute(ppsti), punkouter.param().abi()).ok() + StiCreateInstanceW(core::mem::transmute(hinst), core::mem::transmute(dwver), core::mem::transmute(ppsti), punkouter.param().abi()).ok() } pub const CF_MSFAXSRV_DEVICE_ID: windows_core::PCWSTR = windows_core::w!("FAXSRV_DeviceID"); pub const CF_MSFAXSRV_FSP_GUID: windows_core::PCWSTR = windows_core::w!("FAXSRV_FSPGuid"); @@ -1882,19 +1766,17 @@ impl IFaxAccountNotify { { (windows_core::Interface::vtable(self).OnOutgoingJobChanged)(windows_core::Interface::as_raw(self), pfaxaccount.param().abi(), core::mem::transmute_copy(bstrjobid), pjobstatus.param().abi()).ok() } - pub unsafe fn OnIncomingMessageAdded(&self, pfaxaccount: P0, bstrmessageid: &windows_core::BSTR, faddedtoreceivefolder: P2) -> windows_core::Result<()> + pub unsafe fn OnIncomingMessageAdded(&self, pfaxaccount: P0, bstrmessageid: &windows_core::BSTR, faddedtoreceivefolder: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).OnIncomingMessageAdded)(windows_core::Interface::as_raw(self), pfaxaccount.param().abi(), core::mem::transmute_copy(bstrmessageid), faddedtoreceivefolder.param().abi()).ok() + (windows_core::Interface::vtable(self).OnIncomingMessageAdded)(windows_core::Interface::as_raw(self), pfaxaccount.param().abi(), core::mem::transmute_copy(bstrmessageid), core::mem::transmute(faddedtoreceivefolder)).ok() } - pub unsafe fn OnIncomingMessageRemoved(&self, pfaxaccount: P0, bstrmessageid: &windows_core::BSTR, fremovedfromreceivefolder: P2) -> windows_core::Result<()> + pub unsafe fn OnIncomingMessageRemoved(&self, pfaxaccount: P0, bstrmessageid: &windows_core::BSTR, fremovedfromreceivefolder: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).OnIncomingMessageRemoved)(windows_core::Interface::as_raw(self), pfaxaccount.param().abi(), core::mem::transmute_copy(bstrmessageid), fremovedfromreceivefolder.param().abi()).ok() + (windows_core::Interface::vtable(self).OnIncomingMessageRemoved)(windows_core::Interface::as_raw(self), pfaxaccount.param().abi(), core::mem::transmute_copy(bstrmessageid), core::mem::transmute(fremovedfromreceivefolder)).ok() } pub unsafe fn OnOutgoingMessageAdded(&self, pfaxaccount: P0, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()> where @@ -2511,21 +2393,15 @@ impl IFaxActivityLogging { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LogIncoming)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLogIncoming(&self, blogincoming: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogIncoming)(windows_core::Interface::as_raw(self), blogincoming.param().abi()).ok() + pub unsafe fn SetLogIncoming(&self, blogincoming: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogIncoming)(windows_core::Interface::as_raw(self), core::mem::transmute(blogincoming)).ok() } pub unsafe fn LogOutgoing(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LogOutgoing)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLogOutgoing(&self, blogoutgoing: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogOutgoing)(windows_core::Interface::as_raw(self), blogoutgoing.param().abi()).ok() + pub unsafe fn SetLogOutgoing(&self, blogoutgoing: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogOutgoing)(windows_core::Interface::as_raw(self), core::mem::transmute(blogoutgoing)).ok() } pub unsafe fn DatabasePath(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2653,11 +2529,8 @@ impl IFaxConfiguration { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseArchive)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseArchive(&self, busearchive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseArchive)(windows_core::Interface::as_raw(self), busearchive.param().abi()).ok() + pub unsafe fn SetUseArchive(&self, busearchive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseArchive)(windows_core::Interface::as_raw(self), core::mem::transmute(busearchive)).ok() } pub unsafe fn ArchiveLocation(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2670,11 +2543,8 @@ impl IFaxConfiguration { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SizeQuotaWarning)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSizeQuotaWarning(&self, bsizequotawarning: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSizeQuotaWarning)(windows_core::Interface::as_raw(self), bsizequotawarning.param().abi()).ok() + pub unsafe fn SetSizeQuotaWarning(&self, bsizequotawarning: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSizeQuotaWarning)(windows_core::Interface::as_raw(self), core::mem::transmute(bsizequotawarning)).ok() } pub unsafe fn HighQuotaWaterMark(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2709,41 +2579,29 @@ impl IFaxConfiguration { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OutgoingQueueBlocked)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOutgoingQueueBlocked(&self, boutgoingblocked: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOutgoingQueueBlocked)(windows_core::Interface::as_raw(self), boutgoingblocked.param().abi()).ok() + pub unsafe fn SetOutgoingQueueBlocked(&self, boutgoingblocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOutgoingQueueBlocked)(windows_core::Interface::as_raw(self), core::mem::transmute(boutgoingblocked)).ok() } pub unsafe fn OutgoingQueuePaused(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OutgoingQueuePaused)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOutgoingQueuePaused(&self, boutgoingpaused: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOutgoingQueuePaused)(windows_core::Interface::as_raw(self), boutgoingpaused.param().abi()).ok() + pub unsafe fn SetOutgoingQueuePaused(&self, boutgoingpaused: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOutgoingQueuePaused)(windows_core::Interface::as_raw(self), core::mem::transmute(boutgoingpaused)).ok() } pub unsafe fn AllowPersonalCoverPages(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowPersonalCoverPages)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowPersonalCoverPages(&self, ballowpersonalcoverpages: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowPersonalCoverPages)(windows_core::Interface::as_raw(self), ballowpersonalcoverpages.param().abi()).ok() + pub unsafe fn SetAllowPersonalCoverPages(&self, ballowpersonalcoverpages: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowPersonalCoverPages)(windows_core::Interface::as_raw(self), core::mem::transmute(ballowpersonalcoverpages)).ok() } pub unsafe fn UseDeviceTSID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseDeviceTSID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseDeviceTSID(&self, busedevicetsid: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseDeviceTSID)(windows_core::Interface::as_raw(self), busedevicetsid.param().abi()).ok() + pub unsafe fn SetUseDeviceTSID(&self, busedevicetsid: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseDeviceTSID)(windows_core::Interface::as_raw(self), core::mem::transmute(busedevicetsid)).ok() } pub unsafe fn Retries(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2784,41 +2642,29 @@ impl IFaxConfiguration { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Branding)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBranding(&self, bbranding: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBranding)(windows_core::Interface::as_raw(self), bbranding.param().abi()).ok() + pub unsafe fn SetBranding(&self, bbranding: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBranding)(windows_core::Interface::as_raw(self), core::mem::transmute(bbranding)).ok() } pub unsafe fn IncomingQueueBlocked(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IncomingQueueBlocked)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIncomingQueueBlocked(&self, bincomingblocked: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIncomingQueueBlocked)(windows_core::Interface::as_raw(self), bincomingblocked.param().abi()).ok() + pub unsafe fn SetIncomingQueueBlocked(&self, bincomingblocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIncomingQueueBlocked)(windows_core::Interface::as_raw(self), core::mem::transmute(bincomingblocked)).ok() } pub unsafe fn AutoCreateAccountOnConnect(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoCreateAccountOnConnect)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoCreateAccountOnConnect(&self, bautocreateaccountonconnect: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoCreateAccountOnConnect)(windows_core::Interface::as_raw(self), bautocreateaccountonconnect.param().abi()).ok() + pub unsafe fn SetAutoCreateAccountOnConnect(&self, bautocreateaccountonconnect: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoCreateAccountOnConnect)(windows_core::Interface::as_raw(self), core::mem::transmute(bautocreateaccountonconnect)).ok() } pub unsafe fn IncomingFaxesArePublic(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IncomingFaxesArePublic)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIncomingFaxesArePublic(&self, bincomingfaxesarepublic: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIncomingFaxesArePublic)(windows_core::Interface::as_raw(self), bincomingfaxesarepublic.param().abi()).ok() + pub unsafe fn SetIncomingFaxesArePublic(&self, bincomingfaxesarepublic: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIncomingFaxesArePublic)(windows_core::Interface::as_raw(self), core::mem::transmute(bincomingfaxesarepublic)).ok() } pub unsafe fn Refresh(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self)).ok() @@ -3321,11 +3167,8 @@ impl IFaxDevice { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SendEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSendEnabled(&self, bsendenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSendEnabled)(windows_core::Interface::as_raw(self), bsendenabled.param().abi()).ok() + pub unsafe fn SetSendEnabled(&self, bsendenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSendEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(bsendenabled)).ok() } pub unsafe fn ReceiveMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3370,11 +3213,8 @@ impl IFaxDevice { pub unsafe fn SetExtensionProperty(&self, bstrguid: &windows_core::BSTR, vproperty: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetExtensionProperty)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrguid), core::mem::transmute_copy(vproperty)).ok() } - pub unsafe fn UseRoutingMethod(&self, bstrmethodguid: &windows_core::BSTR, buse: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).UseRoutingMethod)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmethodguid), buse.param().abi()).ok() + pub unsafe fn UseRoutingMethod(&self, bstrmethodguid: &windows_core::BSTR, buse: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UseRoutingMethod)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmethodguid), core::mem::transmute(buse)).ok() } pub unsafe fn RingingNow(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4344,11 +4184,8 @@ impl IFaxDocument { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GroupBroadcastReceipts)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetGroupBroadcastReceipts(&self, busegrouping: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGroupBroadcastReceipts)(windows_core::Interface::as_raw(self), busegrouping.param().abi()).ok() + pub unsafe fn SetGroupBroadcastReceipts(&self, busegrouping: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGroupBroadcastReceipts)(windows_core::Interface::as_raw(self), core::mem::transmute(busegrouping)).ok() } pub unsafe fn Priority(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4384,11 +4221,8 @@ impl IFaxDocument { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AttachFaxToReceipt)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAttachFaxToReceipt(&self, battachfax: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAttachFaxToReceipt)(windows_core::Interface::as_raw(self), battachfax.param().abi()).ok() + pub unsafe fn SetAttachFaxToReceipt(&self, battachfax: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAttachFaxToReceipt)(windows_core::Interface::as_raw(self), core::mem::transmute(battachfax)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5813,11 +5647,8 @@ impl IFaxIncomingArchive { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseArchive)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseArchive(&self, busearchive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseArchive)(windows_core::Interface::as_raw(self), busearchive.param().abi()).ok() + pub unsafe fn SetUseArchive(&self, busearchive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseArchive)(windows_core::Interface::as_raw(self), core::mem::transmute(busearchive)).ok() } pub unsafe fn ArchiveFolder(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5830,11 +5661,8 @@ impl IFaxIncomingArchive { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SizeQuotaWarning)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSizeQuotaWarning(&self, bsizequotawarning: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSizeQuotaWarning)(windows_core::Interface::as_raw(self), bsizequotawarning.param().abi()).ok() + pub unsafe fn SetSizeQuotaWarning(&self, bsizequotawarning: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSizeQuotaWarning)(windows_core::Interface::as_raw(self), core::mem::transmute(bsizequotawarning)).ok() } pub unsafe fn HighQuotaWaterMark(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6794,11 +6622,8 @@ impl IFaxIncomingMessage2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HasCoverPage)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetHasCoverPage(&self, bhascoverpage: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHasCoverPage)(windows_core::Interface::as_raw(self), bhascoverpage.param().abi()).ok() + pub unsafe fn SetHasCoverPage(&self, bhascoverpage: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHasCoverPage)(windows_core::Interface::as_raw(self), core::mem::transmute(bhascoverpage)).ok() } pub unsafe fn Recipients(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6815,11 +6640,8 @@ impl IFaxIncomingMessage2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetRead(&self, bread: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRead)(windows_core::Interface::as_raw(self), bread.param().abi()).ok() + pub unsafe fn SetRead(&self, bread: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRead)(windows_core::Interface::as_raw(self), core::mem::transmute(bread)).ok() } pub unsafe fn ReAssign(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReAssign)(windows_core::Interface::as_raw(self)).ok() @@ -7139,11 +6961,8 @@ impl IFaxIncomingQueue { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Blocked)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBlocked(&self, bblocked: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBlocked)(windows_core::Interface::as_raw(self), bblocked.param().abi()).ok() + pub unsafe fn SetBlocked(&self, bblocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBlocked)(windows_core::Interface::as_raw(self), core::mem::transmute(bblocked)).ok() } pub unsafe fn Refresh(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self)).ok() @@ -7939,11 +7758,8 @@ impl IFaxOutboundRoutingRule { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseDevice)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseDevice(&self, busedevice: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseDevice)(windows_core::Interface::as_raw(self), busedevice.param().abi()).ok() + pub unsafe fn SetUseDevice(&self, busedevice: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(busedevice)).ok() } pub unsafe fn DeviceId(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8135,12 +7951,9 @@ impl IFaxOutboundRoutingRules { pub unsafe fn Remove(&self, lindex: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute(lindex)).ok() } - pub unsafe fn Add(&self, lcountrycode: i32, lareacode: i32, busedevice: P2, bstrgroupname: &windows_core::BSTR, ldeviceid: i32) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn Add(&self, lcountrycode: i32, lareacode: i32, busedevice: super::super::Foundation::VARIANT_BOOL, bstrgroupname: &windows_core::BSTR, ldeviceid: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute(lcountrycode), core::mem::transmute(lareacode), busedevice.param().abi(), core::mem::transmute_copy(bstrgroupname), core::mem::transmute(ldeviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute(lcountrycode), core::mem::transmute(lareacode), core::mem::transmute(busedevice), core::mem::transmute_copy(bstrgroupname), core::mem::transmute(ldeviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -8260,11 +8073,8 @@ impl IFaxOutgoingArchive { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseArchive)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseArchive(&self, busearchive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseArchive)(windows_core::Interface::as_raw(self), busearchive.param().abi()).ok() + pub unsafe fn SetUseArchive(&self, busearchive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseArchive)(windows_core::Interface::as_raw(self), core::mem::transmute(busearchive)).ok() } pub unsafe fn ArchiveFolder(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8277,11 +8087,8 @@ impl IFaxOutgoingArchive { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SizeQuotaWarning)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSizeQuotaWarning(&self, bsizequotawarning: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSizeQuotaWarning)(windows_core::Interface::as_raw(self), bsizequotawarning.param().abi()).ok() + pub unsafe fn SetSizeQuotaWarning(&self, bsizequotawarning: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSizeQuotaWarning)(windows_core::Interface::as_raw(self), core::mem::transmute(bsizequotawarning)).ok() } pub unsafe fn HighQuotaWaterMark(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9603,11 +9410,8 @@ impl IFaxOutgoingMessage2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetRead(&self, bread: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRead)(windows_core::Interface::as_raw(self), bread.param().abi()).ok() + pub unsafe fn SetRead(&self, bread: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRead)(windows_core::Interface::as_raw(self), core::mem::transmute(bread)).ok() } pub unsafe fn Save(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self)).ok() @@ -9843,41 +9647,29 @@ impl IFaxOutgoingQueue { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Blocked)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBlocked(&self, bblocked: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBlocked)(windows_core::Interface::as_raw(self), bblocked.param().abi()).ok() + pub unsafe fn SetBlocked(&self, bblocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBlocked)(windows_core::Interface::as_raw(self), core::mem::transmute(bblocked)).ok() } pub unsafe fn Paused(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Paused)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPaused(&self, bpaused: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPaused)(windows_core::Interface::as_raw(self), bpaused.param().abi()).ok() + pub unsafe fn SetPaused(&self, bpaused: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPaused)(windows_core::Interface::as_raw(self), core::mem::transmute(bpaused)).ok() } pub unsafe fn AllowPersonalCoverPages(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowPersonalCoverPages)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowPersonalCoverPages(&self, ballowpersonalcoverpages: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowPersonalCoverPages)(windows_core::Interface::as_raw(self), ballowpersonalcoverpages.param().abi()).ok() + pub unsafe fn SetAllowPersonalCoverPages(&self, ballowpersonalcoverpages: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowPersonalCoverPages)(windows_core::Interface::as_raw(self), core::mem::transmute(ballowpersonalcoverpages)).ok() } pub unsafe fn UseDeviceTSID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseDeviceTSID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseDeviceTSID(&self, busedevicetsid: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseDeviceTSID)(windows_core::Interface::as_raw(self), busedevicetsid.param().abi()).ok() + pub unsafe fn SetUseDeviceTSID(&self, busedevicetsid: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseDeviceTSID)(windows_core::Interface::as_raw(self), core::mem::transmute(busedevicetsid)).ok() } pub unsafe fn Retries(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9918,11 +9710,8 @@ impl IFaxOutgoingQueue { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Branding)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBranding(&self, bbranding: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBranding)(windows_core::Interface::as_raw(self), bbranding.param().abi()).ok() + pub unsafe fn SetBranding(&self, bbranding: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBranding)(windows_core::Interface::as_raw(self), core::mem::transmute(bbranding)).ok() } pub unsafe fn Refresh(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self)).ok() @@ -10272,11 +10061,8 @@ impl IFaxReceiptOptions { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseForInboundRouting)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseForInboundRouting(&self, buseforinboundrouting: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseForInboundRouting)(windows_core::Interface::as_raw(self), buseforinboundrouting.param().abi()).ok() + pub unsafe fn SetUseForInboundRouting(&self, buseforinboundrouting: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseForInboundRouting)(windows_core::Interface::as_raw(self), core::mem::transmute(buseforinboundrouting)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -12137,14 +11923,11 @@ impl IFaxServerNotify2 { { (windows_core::Interface::vtable(self).OnServerActivityChange)(windows_core::Interface::as_raw(self), pfaxserver.param().abi(), core::mem::transmute(lincomingmessages), core::mem::transmute(lroutingmessages), core::mem::transmute(loutgoingmessages), core::mem::transmute(lqueuedmessages)).ok() } - pub unsafe fn OnQueuesStatusChange(&self, pfaxserver: P0, boutgoingqueueblocked: P1, boutgoingqueuepaused: P2, bincomingqueueblocked: P3) -> windows_core::Result<()> + pub unsafe fn OnQueuesStatusChange(&self, pfaxserver: P0, boutgoingqueueblocked: super::super::Foundation::VARIANT_BOOL, boutgoingqueuepaused: super::super::Foundation::VARIANT_BOOL, bincomingqueueblocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).OnQueuesStatusChange)(windows_core::Interface::as_raw(self), pfaxserver.param().abi(), boutgoingqueueblocked.param().abi(), boutgoingqueuepaused.param().abi(), bincomingqueueblocked.param().abi()).ok() + (windows_core::Interface::vtable(self).OnQueuesStatusChange)(windows_core::Interface::as_raw(self), pfaxserver.param().abi(), core::mem::transmute(boutgoingqueueblocked), core::mem::transmute(boutgoingqueuepaused), core::mem::transmute(bincomingqueueblocked)).ok() } pub unsafe fn OnNewCall(&self, pfaxserver: P0, lcallid: i32, ldeviceid: i32, bstrcallerid: &windows_core::BSTR) -> windows_core::Result<()> where @@ -12158,15 +11941,11 @@ impl IFaxServerNotify2 { { (windows_core::Interface::vtable(self).OnServerShutDown)(windows_core::Interface::as_raw(self), pfaxserver.param().abi()).ok() } - pub unsafe fn OnDeviceStatusChange(&self, pfaxserver: P0, ldeviceid: i32, bpoweredoff: P2, bsending: P3, breceiving: P4, bringing: P5) -> windows_core::Result<()> + pub unsafe fn OnDeviceStatusChange(&self, pfaxserver: P0, ldeviceid: i32, bpoweredoff: super::super::Foundation::VARIANT_BOOL, bsending: super::super::Foundation::VARIANT_BOOL, breceiving: super::super::Foundation::VARIANT_BOOL, bringing: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).OnDeviceStatusChange)(windows_core::Interface::as_raw(self), pfaxserver.param().abi(), core::mem::transmute(ldeviceid), bpoweredoff.param().abi(), bsending.param().abi(), breceiving.param().abi(), bringing.param().abi()).ok() + (windows_core::Interface::vtable(self).OnDeviceStatusChange)(windows_core::Interface::as_raw(self), pfaxserver.param().abi(), core::mem::transmute(ldeviceid), core::mem::transmute(bpoweredoff), core::mem::transmute(bsending), core::mem::transmute(breceiving), core::mem::transmute(bringing)).ok() } pub unsafe fn OnGeneralServerConfigChanged(&self, pfaxserver: P0) -> windows_core::Result<()> where @@ -12383,12 +12162,11 @@ pub const IS_DIGITAL_CAMERA_VAL: u32 = 1u32; windows_core::imp::define_interface!(IStiDevice, IStiDevice_Vtbl, 0x6cfa5a80_2dc8_11d0_90ea_00aa0060f86c); windows_core::imp::interface_hierarchy!(IStiDevice, windows_core::IUnknown); impl IStiDevice { - pub unsafe fn Initialize(&self, hinst: P0, pwszdevicename: P1, dwversion: u32, dwmode: u32) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, hinst: super::super::Foundation::HINSTANCE, pwszdevicename: P1, dwversion: u32, dwmode: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hinst.param().abi(), pwszdevicename.param().abi(), core::mem::transmute(dwversion), core::mem::transmute(dwmode)).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hinst), pwszdevicename.param().abi(), core::mem::transmute(dwversion), core::mem::transmute(dwmode)).ok() } pub unsafe fn GetCapabilities(&self, pdevcaps: *mut STI_DEV_CAPS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevcaps)).ok() @@ -12417,19 +12195,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), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Subscribe(&self, lpsubsribe: *mut STISUBSCRIBE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Subscribe)(windows_core::Interface::as_raw(self), core::mem::transmute(lpsubsribe)).ok() @@ -12761,12 +12539,11 @@ windows_core::imp::define_interface!(IStiUSD, IStiUSD_Vtbl, 0x0c9bb460_51ac_11d0 windows_core::imp::interface_hierarchy!(IStiUSD, windows_core::IUnknown); impl IStiUSD { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn Initialize(&self, pheldcb: P0, dwstiversion: u32, hparameterskey: P2) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, pheldcb: P0, dwstiversion: u32, hparameterskey: super::super::System::Registry::HKEY) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pheldcb.param().abi(), core::mem::transmute(dwstiversion), hparameterskey.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pheldcb.param().abi(), core::mem::transmute(dwstiversion), core::mem::transmute(hparameterskey)).ok() } pub unsafe fn GetCapabilities(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -12796,25 +12573,22 @@ 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), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytes), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SetNotificationHandle(&self, hevent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNotificationHandle)(windows_core::Interface::as_raw(self), hevent.param().abi()).ok() + pub unsafe fn SetNotificationHandle(&self, hevent: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNotificationHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetNotificationData(&self, lpnotify: *mut STINOTIFY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetNotificationData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpnotify)).ok() @@ -12985,11 +12759,8 @@ impl windows_core::RuntimeName for IStiUSD {} windows_core::imp::define_interface!(IStillImageW, IStillImageW_Vtbl, 0x641bd880_2dc8_11d0_90ea_00aa0060f86c); windows_core::imp::interface_hierarchy!(IStillImageW, windows_core::IUnknown); impl IStillImageW { - pub unsafe fn Initialize(&self, hinst: P0, dwversion: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hinst.param().abi(), core::mem::transmute(dwversion)).ok() + pub unsafe fn Initialize(&self, hinst: super::super::Foundation::HINSTANCE, dwversion: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hinst), core::mem::transmute(dwversion)).ok() } pub unsafe fn GetDeviceList(&self, dwtype: u32, dwflags: u32, pdwitemsreturned: *mut u32, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceList)(windows_core::Interface::as_raw(self), core::mem::transmute(dwtype), core::mem::transmute(dwflags), core::mem::transmute(pdwitemsreturned), core::mem::transmute(ppbuffer)).ok() @@ -13022,7 +12793,7 @@ impl IStillImageW { (windows_core::Interface::vtable(self).SetDeviceValue)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), pvaluename.param().abi(), core::mem::transmute(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(core::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::mem::zeroed())), 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/Geolocation/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs index dac3accba1..9facf4ce6b 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs @@ -1953,12 +1953,11 @@ impl ILocation { pub unsafe fn SetDesiredAccuracy(&self, reporttype: *const windows_core::GUID, desiredaccuracy: super::Sensors::LOCATION_DESIRED_ACCURACY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDesiredAccuracy)(windows_core::Interface::as_raw(self), core::mem::transmute(reporttype), core::mem::transmute(desiredaccuracy)).ok() } - pub unsafe fn RequestPermissions(&self, hparent: P0, preporttypes: &[windows_core::GUID], fmodal: P3) -> windows_core::Result<()> + pub unsafe fn RequestPermissions(&self, hparent: Option, preporttypes: &[windows_core::GUID], fmodal: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), hparent.param().abi(), core::mem::transmute(preporttypes.as_ptr()), preporttypes.len().try_into().unwrap(), fmodal.param().abi()).ok() + (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(preporttypes.as_ptr()), preporttypes.len().try_into().unwrap(), fmodal.param().abi()).ok() } } #[repr(C)] 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 a8ac231d9d..cee94147a3 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs @@ -1,51 +1,35 @@ #[inline] -pub unsafe fn DirectInput8Create(hinst: P0, dwversion: u32, riidltf: *const windows_core::GUID, ppvout: *mut *mut core::ffi::c_void, punkouter: P4) -> windows_core::Result<()> +pub unsafe fn DirectInput8Create(hinst: super::super::Foundation::HINSTANCE, dwversion: u32, riidltf: *const windows_core::GUID, ppvout: *mut *mut core::ffi::c_void, punkouter: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("dinput8.dll" "system" fn DirectInput8Create(hinst : super::super::Foundation:: HINSTANCE, dwversion : u32, riidltf : *const windows_core::GUID, ppvout : *mut *mut core::ffi::c_void, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - DirectInput8Create(hinst.param().abi(), core::mem::transmute(dwversion), core::mem::transmute(riidltf), core::mem::transmute(ppvout), punkouter.param().abi()).ok() + DirectInput8Create(core::mem::transmute(hinst), core::mem::transmute(dwversion), core::mem::transmute(riidltf), core::mem::transmute(ppvout), punkouter.param().abi()).ok() } #[inline] -pub unsafe fn HidD_FlushQueue(hiddeviceobject: P0) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_FlushQueue(hiddeviceobject: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_FlushQueue(hiddeviceobject : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOLEAN); - HidD_FlushQueue(hiddeviceobject.param().abi()) + HidD_FlushQueue(core::mem::transmute(hiddeviceobject)) } #[inline] -pub unsafe fn HidD_FreePreparsedData(preparseddata: P0) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_FreePreparsedData(preparseddata: PHIDP_PREPARSED_DATA) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_FreePreparsedData(preparseddata : PHIDP_PREPARSED_DATA) -> super::super::Foundation:: BOOLEAN); - HidD_FreePreparsedData(preparseddata.param().abi()) + HidD_FreePreparsedData(core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidD_GetAttributes(hiddeviceobject: P0, attributes: *mut HIDD_ATTRIBUTES) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetAttributes(hiddeviceobject: super::super::Foundation::HANDLE, attributes: *mut HIDD_ATTRIBUTES) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetAttributes(hiddeviceobject : super::super::Foundation:: HANDLE, attributes : *mut HIDD_ATTRIBUTES) -> super::super::Foundation:: BOOLEAN); - HidD_GetAttributes(hiddeviceobject.param().abi(), core::mem::transmute(attributes)) + HidD_GetAttributes(core::mem::transmute(hiddeviceobject), core::mem::transmute(attributes)) } #[inline] -pub unsafe fn HidD_GetConfiguration(hiddeviceobject: P0, configuration: *mut HIDD_CONFIGURATION, configurationlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetConfiguration(hiddeviceobject: super::super::Foundation::HANDLE, configuration: *mut HIDD_CONFIGURATION, configurationlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetConfiguration(hiddeviceobject : super::super::Foundation:: HANDLE, configuration : *mut HIDD_CONFIGURATION, configurationlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetConfiguration(hiddeviceobject.param().abi(), core::mem::transmute(configuration), core::mem::transmute(configurationlength)) + HidD_GetConfiguration(core::mem::transmute(hiddeviceobject), core::mem::transmute(configuration), core::mem::transmute(configurationlength)) } #[inline] -pub unsafe fn HidD_GetFeature(hiddeviceobject: P0, reportbuffer: *mut core::ffi::c_void, reportbufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetFeature(hiddeviceobject: super::super::Foundation::HANDLE, reportbuffer: *mut core::ffi::c_void, reportbufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetFeature(hiddeviceobject : super::super::Foundation:: HANDLE, reportbuffer : *mut core::ffi::c_void, reportbufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetFeature(hiddeviceobject.param().abi(), core::mem::transmute(reportbuffer), core::mem::transmute(reportbufferlength)) + HidD_GetFeature(core::mem::transmute(hiddeviceobject), core::mem::transmute(reportbuffer), core::mem::transmute(reportbufferlength)) } #[inline] pub unsafe fn HidD_GetHidGuid() -> windows_core::GUID { @@ -55,305 +39,194 @@ pub unsafe fn HidD_GetHidGuid() -> windows_core::GUID { result__ } #[inline] -pub unsafe fn HidD_GetIndexedString(hiddeviceobject: P0, stringindex: u32, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetIndexedString(hiddeviceobject: super::super::Foundation::HANDLE, stringindex: u32, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetIndexedString(hiddeviceobject : super::super::Foundation:: HANDLE, stringindex : u32, buffer : *mut core::ffi::c_void, bufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetIndexedString(hiddeviceobject.param().abi(), core::mem::transmute(stringindex), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) + HidD_GetIndexedString(core::mem::transmute(hiddeviceobject), core::mem::transmute(stringindex), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) } #[inline] -pub unsafe fn HidD_GetInputReport(hiddeviceobject: P0, reportbuffer: *mut core::ffi::c_void, reportbufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetInputReport(hiddeviceobject: super::super::Foundation::HANDLE, reportbuffer: *mut core::ffi::c_void, reportbufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetInputReport(hiddeviceobject : super::super::Foundation:: HANDLE, reportbuffer : *mut core::ffi::c_void, reportbufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetInputReport(hiddeviceobject.param().abi(), core::mem::transmute(reportbuffer), core::mem::transmute(reportbufferlength)) + HidD_GetInputReport(core::mem::transmute(hiddeviceobject), core::mem::transmute(reportbuffer), core::mem::transmute(reportbufferlength)) } #[inline] -pub unsafe fn HidD_GetManufacturerString(hiddeviceobject: P0, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetManufacturerString(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetManufacturerString(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetManufacturerString(hiddeviceobject.param().abi(), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) + HidD_GetManufacturerString(core::mem::transmute(hiddeviceobject), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) } #[inline] -pub unsafe fn HidD_GetMsGenreDescriptor(hiddeviceobject: P0, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetMsGenreDescriptor(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetMsGenreDescriptor(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetMsGenreDescriptor(hiddeviceobject.param().abi(), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) + HidD_GetMsGenreDescriptor(core::mem::transmute(hiddeviceobject), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) } #[inline] -pub unsafe fn HidD_GetNumInputBuffers(hiddeviceobject: P0, numberbuffers: *mut u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetNumInputBuffers(hiddeviceobject: super::super::Foundation::HANDLE, numberbuffers: *mut u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetNumInputBuffers(hiddeviceobject : super::super::Foundation:: HANDLE, numberbuffers : *mut u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetNumInputBuffers(hiddeviceobject.param().abi(), core::mem::transmute(numberbuffers)) + HidD_GetNumInputBuffers(core::mem::transmute(hiddeviceobject), core::mem::transmute(numberbuffers)) } #[inline] -pub unsafe fn HidD_GetPhysicalDescriptor(hiddeviceobject: P0, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetPhysicalDescriptor(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetPhysicalDescriptor(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetPhysicalDescriptor(hiddeviceobject.param().abi(), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) + HidD_GetPhysicalDescriptor(core::mem::transmute(hiddeviceobject), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) } #[inline] -pub unsafe fn HidD_GetPreparsedData(hiddeviceobject: P0, preparseddata: *mut PHIDP_PREPARSED_DATA) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetPreparsedData(hiddeviceobject: super::super::Foundation::HANDLE, preparseddata: *mut PHIDP_PREPARSED_DATA) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetPreparsedData(hiddeviceobject : super::super::Foundation:: HANDLE, preparseddata : *mut PHIDP_PREPARSED_DATA) -> super::super::Foundation:: BOOLEAN); - HidD_GetPreparsedData(hiddeviceobject.param().abi(), core::mem::transmute(preparseddata)) + HidD_GetPreparsedData(core::mem::transmute(hiddeviceobject), core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidD_GetProductString(hiddeviceobject: P0, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetProductString(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetProductString(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetProductString(hiddeviceobject.param().abi(), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) + HidD_GetProductString(core::mem::transmute(hiddeviceobject), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) } #[inline] -pub unsafe fn HidD_GetSerialNumberString(hiddeviceobject: P0, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_GetSerialNumberString(hiddeviceobject: super::super::Foundation::HANDLE, buffer: *mut core::ffi::c_void, bufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_GetSerialNumberString(hiddeviceobject : super::super::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, bufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_GetSerialNumberString(hiddeviceobject.param().abi(), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) + HidD_GetSerialNumberString(core::mem::transmute(hiddeviceobject), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) } #[inline] -pub unsafe fn HidD_SetConfiguration(hiddeviceobject: P0, configuration: *const HIDD_CONFIGURATION, configurationlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_SetConfiguration(hiddeviceobject: super::super::Foundation::HANDLE, configuration: *const HIDD_CONFIGURATION, configurationlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_SetConfiguration(hiddeviceobject : super::super::Foundation:: HANDLE, configuration : *const HIDD_CONFIGURATION, configurationlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_SetConfiguration(hiddeviceobject.param().abi(), core::mem::transmute(configuration), core::mem::transmute(configurationlength)) + HidD_SetConfiguration(core::mem::transmute(hiddeviceobject), core::mem::transmute(configuration), core::mem::transmute(configurationlength)) } #[inline] -pub unsafe fn HidD_SetFeature(hiddeviceobject: P0, reportbuffer: *const core::ffi::c_void, reportbufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_SetFeature(hiddeviceobject: super::super::Foundation::HANDLE, reportbuffer: *const core::ffi::c_void, reportbufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_SetFeature(hiddeviceobject : super::super::Foundation:: HANDLE, reportbuffer : *const core::ffi::c_void, reportbufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_SetFeature(hiddeviceobject.param().abi(), core::mem::transmute(reportbuffer), core::mem::transmute(reportbufferlength)) + HidD_SetFeature(core::mem::transmute(hiddeviceobject), core::mem::transmute(reportbuffer), core::mem::transmute(reportbufferlength)) } #[inline] -pub unsafe fn HidD_SetNumInputBuffers(hiddeviceobject: P0, numberbuffers: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_SetNumInputBuffers(hiddeviceobject: super::super::Foundation::HANDLE, numberbuffers: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_SetNumInputBuffers(hiddeviceobject : super::super::Foundation:: HANDLE, numberbuffers : u32) -> super::super::Foundation:: BOOLEAN); - HidD_SetNumInputBuffers(hiddeviceobject.param().abi(), core::mem::transmute(numberbuffers)) + HidD_SetNumInputBuffers(core::mem::transmute(hiddeviceobject), core::mem::transmute(numberbuffers)) } #[inline] -pub unsafe fn HidD_SetOutputReport(hiddeviceobject: P0, reportbuffer: *const core::ffi::c_void, reportbufferlength: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn HidD_SetOutputReport(hiddeviceobject: super::super::Foundation::HANDLE, reportbuffer: *const core::ffi::c_void, reportbufferlength: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("hid.dll" "system" fn HidD_SetOutputReport(hiddeviceobject : super::super::Foundation:: HANDLE, reportbuffer : *const core::ffi::c_void, reportbufferlength : u32) -> super::super::Foundation:: BOOLEAN); - HidD_SetOutputReport(hiddeviceobject.param().abi(), core::mem::transmute(reportbuffer), core::mem::transmute(reportbufferlength)) + HidD_SetOutputReport(core::mem::transmute(hiddeviceobject), core::mem::transmute(reportbuffer), core::mem::transmute(reportbufferlength)) } #[inline] -pub unsafe fn HidP_GetButtonArray(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, buttondata: *mut HIDP_BUTTON_ARRAY_DATA, buttondatalength: *mut u16, preparseddata: P6, report: &[u8]) -> super::super::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn HidP_GetButtonArray(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usage: u16, buttondata: *mut HIDP_BUTTON_ARRAY_DATA, buttondatalength: *mut u16, preparseddata: PHIDP_PREPARSED_DATA, report: &[u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetButtonArray(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, buttondata : *mut HIDP_BUTTON_ARRAY_DATA, buttondatalength : *mut u16, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetButtonArray(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(buttondata), core::mem::transmute(buttondatalength), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_GetButtonArray(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage), core::mem::transmute(buttondata), core::mem::transmute(buttondatalength), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_GetButtonCaps(reporttype: HIDP_REPORT_TYPE, buttoncaps: *mut HIDP_BUTTON_CAPS, buttoncapslength: *mut u16, preparseddata: P3) -> super::super::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn HidP_GetButtonCaps(reporttype: HIDP_REPORT_TYPE, buttoncaps: *mut HIDP_BUTTON_CAPS, buttoncapslength: *mut u16, preparseddata: PHIDP_PREPARSED_DATA) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetButtonCaps(reporttype : HIDP_REPORT_TYPE, buttoncaps : *mut HIDP_BUTTON_CAPS, buttoncapslength : *mut u16, preparseddata : PHIDP_PREPARSED_DATA) -> super::super::Foundation:: NTSTATUS); - HidP_GetButtonCaps(core::mem::transmute(reporttype), core::mem::transmute(buttoncaps), core::mem::transmute(buttoncapslength), preparseddata.param().abi()) + HidP_GetButtonCaps(core::mem::transmute(reporttype), core::mem::transmute(buttoncaps), core::mem::transmute(buttoncapslength), core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidP_GetCaps(preparseddata: P0, capabilities: *mut HIDP_CAPS) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn HidP_GetCaps(preparseddata: PHIDP_PREPARSED_DATA, capabilities: *mut HIDP_CAPS) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetCaps(preparseddata : PHIDP_PREPARSED_DATA, capabilities : *mut HIDP_CAPS) -> super::super::Foundation:: NTSTATUS); - HidP_GetCaps(preparseddata.param().abi(), core::mem::transmute(capabilities)) + HidP_GetCaps(core::mem::transmute(preparseddata), core::mem::transmute(capabilities)) } #[inline] -pub unsafe fn HidP_GetData(reporttype: HIDP_REPORT_TYPE, datalist: *mut HIDP_DATA, datalength: *mut u32, preparseddata: P3, report: &mut [u8]) -> super::super::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn HidP_GetData(reporttype: HIDP_REPORT_TYPE, datalist: *mut HIDP_DATA, datalength: *mut u32, preparseddata: PHIDP_PREPARSED_DATA, report: &mut [u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetData(reporttype : HIDP_REPORT_TYPE, datalist : *mut HIDP_DATA, datalength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetData(core::mem::transmute(reporttype), core::mem::transmute(datalist), core::mem::transmute(datalength), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_GetData(core::mem::transmute(reporttype), core::mem::transmute(datalist), core::mem::transmute(datalength), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_GetExtendedAttributes(reporttype: HIDP_REPORT_TYPE, dataindex: u16, preparseddata: P2, attributes: *mut HIDP_EXTENDED_ATTRIBUTES, lengthattributes: *mut u32) -> super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn HidP_GetExtendedAttributes(reporttype: HIDP_REPORT_TYPE, dataindex: u16, preparseddata: PHIDP_PREPARSED_DATA, attributes: *mut HIDP_EXTENDED_ATTRIBUTES, lengthattributes: *mut u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetExtendedAttributes(reporttype : HIDP_REPORT_TYPE, dataindex : u16, preparseddata : PHIDP_PREPARSED_DATA, attributes : *mut HIDP_EXTENDED_ATTRIBUTES, lengthattributes : *mut u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetExtendedAttributes(core::mem::transmute(reporttype), core::mem::transmute(dataindex), preparseddata.param().abi(), core::mem::transmute(attributes), core::mem::transmute(lengthattributes)) + HidP_GetExtendedAttributes(core::mem::transmute(reporttype), core::mem::transmute(dataindex), core::mem::transmute(preparseddata), core::mem::transmute(attributes), core::mem::transmute(lengthattributes)) } #[inline] -pub unsafe fn HidP_GetLinkCollectionNodes(linkcollectionnodes: *mut HIDP_LINK_COLLECTION_NODE, linkcollectionnodeslength: *mut u32, preparseddata: P2) -> super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn HidP_GetLinkCollectionNodes(linkcollectionnodes: *mut HIDP_LINK_COLLECTION_NODE, linkcollectionnodeslength: *mut u32, preparseddata: PHIDP_PREPARSED_DATA) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetLinkCollectionNodes(linkcollectionnodes : *mut HIDP_LINK_COLLECTION_NODE, linkcollectionnodeslength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA) -> super::super::Foundation:: NTSTATUS); - HidP_GetLinkCollectionNodes(core::mem::transmute(linkcollectionnodes), core::mem::transmute(linkcollectionnodeslength), preparseddata.param().abi()) + HidP_GetLinkCollectionNodes(core::mem::transmute(linkcollectionnodes), core::mem::transmute(linkcollectionnodeslength), core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidP_GetScaledUsageValue(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, usagevalue: *mut i32, preparseddata: P5, report: &[u8]) -> super::super::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn HidP_GetScaledUsageValue(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usage: u16, usagevalue: *mut i32, preparseddata: PHIDP_PREPARSED_DATA, report: &[u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetScaledUsageValue(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : *mut i32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetScaledUsageValue(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(usagevalue), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_GetScaledUsageValue(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage), core::mem::transmute(usagevalue), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_GetSpecificButtonCaps(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, buttoncaps: *mut HIDP_BUTTON_CAPS, buttoncapslength: *mut u16, preparseddata: P6) -> super::super::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn HidP_GetSpecificButtonCaps(reporttype: HIDP_REPORT_TYPE, usagepage: Option, linkcollection: Option, usage: Option, buttoncaps: *mut HIDP_BUTTON_CAPS, buttoncapslength: *mut u16, preparseddata: PHIDP_PREPARSED_DATA) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetSpecificButtonCaps(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, buttoncaps : *mut HIDP_BUTTON_CAPS, buttoncapslength : *mut u16, preparseddata : PHIDP_PREPARSED_DATA) -> super::super::Foundation:: NTSTATUS); - HidP_GetSpecificButtonCaps(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(buttoncaps), core::mem::transmute(buttoncapslength), preparseddata.param().abi()) + HidP_GetSpecificButtonCaps(core::mem::transmute(reporttype), core::mem::transmute(usagepage.unwrap_or(core::mem::zeroed())), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage.unwrap_or(core::mem::zeroed())), core::mem::transmute(buttoncaps), core::mem::transmute(buttoncapslength), core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidP_GetSpecificValueCaps(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, valuecaps: *mut HIDP_VALUE_CAPS, valuecapslength: *mut u16, preparseddata: P6) -> super::super::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn HidP_GetSpecificValueCaps(reporttype: HIDP_REPORT_TYPE, usagepage: Option, linkcollection: Option, usage: Option, valuecaps: *mut HIDP_VALUE_CAPS, valuecapslength: *mut u16, preparseddata: PHIDP_PREPARSED_DATA) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetSpecificValueCaps(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, valuecaps : *mut HIDP_VALUE_CAPS, valuecapslength : *mut u16, preparseddata : PHIDP_PREPARSED_DATA) -> super::super::Foundation:: NTSTATUS); - HidP_GetSpecificValueCaps(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(valuecaps), core::mem::transmute(valuecapslength), preparseddata.param().abi()) + HidP_GetSpecificValueCaps(core::mem::transmute(reporttype), core::mem::transmute(usagepage.unwrap_or(core::mem::zeroed())), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuecaps), core::mem::transmute(valuecapslength), core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidP_GetUsageValue(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, usagevalue: *mut u32, preparseddata: P5, report: &[u8]) -> super::super::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn HidP_GetUsageValue(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usage: u16, usagevalue: *mut u32, preparseddata: PHIDP_PREPARSED_DATA, report: &[u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetUsageValue(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetUsageValue(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(usagevalue), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_GetUsageValue(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage), core::mem::transmute(usagevalue), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_GetUsageValueArray(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, usagevalue: &mut [u8], preparseddata: P6, report: &[u8]) -> super::super::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn HidP_GetUsageValueArray(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usage: u16, usagevalue: &mut [u8], preparseddata: PHIDP_PREPARSED_DATA, report: &[u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetUsageValueArray(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : windows_core::PSTR, usagevaluebytelength : u16, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetUsageValueArray(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_GetUsageValueArray(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage), core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_GetUsages(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usagelist: *mut u16, usagelength: *mut u32, preparseddata: P5, report: &mut [u8]) -> super::super::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn HidP_GetUsages(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usagelist: *mut u16, usagelength: *mut u32, preparseddata: PHIDP_PREPARSED_DATA, report: &mut [u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetUsages(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usagelist : *mut u16, usagelength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetUsages(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usagelist), core::mem::transmute(usagelength), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_GetUsages(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usagelist), core::mem::transmute(usagelength), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_GetUsagesEx(reporttype: HIDP_REPORT_TYPE, linkcollection: u16, buttonlist: *mut USAGE_AND_PAGE, usagelength: *mut u32, preparseddata: P4, report: &[u8]) -> super::super::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn HidP_GetUsagesEx(reporttype: HIDP_REPORT_TYPE, linkcollection: Option, buttonlist: *mut USAGE_AND_PAGE, usagelength: *mut u32, preparseddata: PHIDP_PREPARSED_DATA, report: &[u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetUsagesEx(reporttype : HIDP_REPORT_TYPE, linkcollection : u16, buttonlist : *mut USAGE_AND_PAGE, usagelength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetUsagesEx(core::mem::transmute(reporttype), core::mem::transmute(linkcollection), core::mem::transmute(buttonlist), core::mem::transmute(usagelength), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_GetUsagesEx(core::mem::transmute(reporttype), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(buttonlist), core::mem::transmute(usagelength), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_GetValueCaps(reporttype: HIDP_REPORT_TYPE, valuecaps: *mut HIDP_VALUE_CAPS, valuecapslength: *mut u16, preparseddata: P3) -> super::super::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn HidP_GetValueCaps(reporttype: HIDP_REPORT_TYPE, valuecaps: *mut HIDP_VALUE_CAPS, valuecapslength: *mut u16, preparseddata: PHIDP_PREPARSED_DATA) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_GetValueCaps(reporttype : HIDP_REPORT_TYPE, valuecaps : *mut HIDP_VALUE_CAPS, valuecapslength : *mut u16, preparseddata : PHIDP_PREPARSED_DATA) -> super::super::Foundation:: NTSTATUS); - HidP_GetValueCaps(core::mem::transmute(reporttype), core::mem::transmute(valuecaps), core::mem::transmute(valuecapslength), preparseddata.param().abi()) + HidP_GetValueCaps(core::mem::transmute(reporttype), core::mem::transmute(valuecaps), core::mem::transmute(valuecapslength), core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidP_InitializeReportForID(reporttype: HIDP_REPORT_TYPE, reportid: u8, preparseddata: P2, report: &mut [u8]) -> super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn HidP_InitializeReportForID(reporttype: HIDP_REPORT_TYPE, reportid: u8, preparseddata: PHIDP_PREPARSED_DATA, report: &mut [u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_InitializeReportForID(reporttype : HIDP_REPORT_TYPE, reportid : u8, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_InitializeReportForID(core::mem::transmute(reporttype), core::mem::transmute(reportid), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_InitializeReportForID(core::mem::transmute(reporttype), core::mem::transmute(reportid), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_MaxDataListLength(reporttype: HIDP_REPORT_TYPE, preparseddata: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn HidP_MaxDataListLength(reporttype: HIDP_REPORT_TYPE, preparseddata: PHIDP_PREPARSED_DATA) -> u32 { windows_targets::link!("hid.dll" "system" fn HidP_MaxDataListLength(reporttype : HIDP_REPORT_TYPE, preparseddata : PHIDP_PREPARSED_DATA) -> u32); - HidP_MaxDataListLength(core::mem::transmute(reporttype), preparseddata.param().abi()) + HidP_MaxDataListLength(core::mem::transmute(reporttype), core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidP_MaxUsageListLength(reporttype: HIDP_REPORT_TYPE, usagepage: u16, preparseddata: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn HidP_MaxUsageListLength(reporttype: HIDP_REPORT_TYPE, usagepage: Option, preparseddata: PHIDP_PREPARSED_DATA) -> u32 { windows_targets::link!("hid.dll" "system" fn HidP_MaxUsageListLength(reporttype : HIDP_REPORT_TYPE, usagepage : u16, preparseddata : PHIDP_PREPARSED_DATA) -> u32); - HidP_MaxUsageListLength(core::mem::transmute(reporttype), core::mem::transmute(usagepage), preparseddata.param().abi()) + HidP_MaxUsageListLength(core::mem::transmute(reporttype), core::mem::transmute(usagepage.unwrap_or(core::mem::zeroed())), core::mem::transmute(preparseddata)) } #[inline] -pub unsafe fn HidP_SetButtonArray(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, buttondata: &[HIDP_BUTTON_ARRAY_DATA], preparseddata: P6, report: &mut [u8]) -> super::super::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn HidP_SetButtonArray(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usage: u16, buttondata: &[HIDP_BUTTON_ARRAY_DATA], preparseddata: PHIDP_PREPARSED_DATA, report: &mut [u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_SetButtonArray(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, buttondata : *const HIDP_BUTTON_ARRAY_DATA, buttondatalength : u16, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetButtonArray(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(buttondata.as_ptr()), buttondata.len().try_into().unwrap(), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_SetButtonArray(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage), core::mem::transmute(buttondata.as_ptr()), buttondata.len().try_into().unwrap(), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_SetData(reporttype: HIDP_REPORT_TYPE, datalist: *mut HIDP_DATA, datalength: *mut u32, preparseddata: P3, report: &[u8]) -> super::super::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn HidP_SetData(reporttype: HIDP_REPORT_TYPE, datalist: *mut HIDP_DATA, datalength: *mut u32, preparseddata: PHIDP_PREPARSED_DATA, report: &[u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_SetData(reporttype : HIDP_REPORT_TYPE, datalist : *mut HIDP_DATA, datalength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetData(core::mem::transmute(reporttype), core::mem::transmute(datalist), core::mem::transmute(datalength), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_SetData(core::mem::transmute(reporttype), core::mem::transmute(datalist), core::mem::transmute(datalength), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_SetScaledUsageValue(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, usagevalue: i32, preparseddata: P5, report: &mut [u8]) -> super::super::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn HidP_SetScaledUsageValue(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usage: u16, usagevalue: i32, preparseddata: PHIDP_PREPARSED_DATA, report: &mut [u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_SetScaledUsageValue(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : i32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetScaledUsageValue(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(usagevalue), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_SetScaledUsageValue(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage), core::mem::transmute(usagevalue), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_SetUsageValue(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, usagevalue: u32, preparseddata: P5, report: &mut [u8]) -> super::super::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn HidP_SetUsageValue(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usage: u16, usagevalue: u32, preparseddata: PHIDP_PREPARSED_DATA, report: &mut [u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_SetUsageValue(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : u32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetUsageValue(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(usagevalue), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_SetUsageValue(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage), core::mem::transmute(usagevalue), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_SetUsageValueArray(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usage: u16, usagevalue: &[u8], preparseddata: P6, report: &mut [u8]) -> super::super::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn HidP_SetUsageValueArray(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usage: u16, usagevalue: &[u8], preparseddata: PHIDP_PREPARSED_DATA, report: &mut [u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_SetUsageValueArray(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : windows_core::PCSTR, usagevaluebytelength : u16, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetUsageValueArray(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usage), core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_SetUsageValueArray(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usage), core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] -pub unsafe fn HidP_SetUsages(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usagelist: *mut u16, usagelength: *mut u32, preparseddata: P5, report: &[u8]) -> super::super::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn HidP_SetUsages(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usagelist: *mut u16, usagelength: *mut u32, preparseddata: PHIDP_PREPARSED_DATA, report: &[u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_SetUsages(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usagelist : *mut u16, usagelength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetUsages(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usagelist), core::mem::transmute(usagelength), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_SetUsages(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usagelist), core::mem::transmute(usagelength), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[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(), core::mem::transmute(keyaction), core::mem::transmute(modifierstate), core::mem::transmute(insertcodesprocedure), core::mem::transmute(insertcodescontext.unwrap_or(core::ptr::null()))) + HidP_TranslateUsagesToI8042ScanCodes(core::mem::transmute(changedusagelist.as_ptr()), changedusagelist.len().try_into().unwrap(), core::mem::transmute(keyaction), core::mem::transmute(modifierstate), core::mem::transmute(insertcodesprocedure), core::mem::transmute(insertcodescontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HidP_UnsetUsages(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usagelist: *mut u16, usagelength: *mut u32, preparseddata: P5, report: &[u8]) -> super::super::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn HidP_UnsetUsages(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: Option, usagelist: *mut u16, usagelength: *mut u32, preparseddata: PHIDP_PREPARSED_DATA, report: &[u8]) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_UnsetUsages(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usagelist : *mut u16, usagelength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_UnsetUsages(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection), core::mem::transmute(usagelist), core::mem::transmute(usagelength), preparseddata.param().abi(), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) + HidP_UnsetUsages(core::mem::transmute(reporttype), core::mem::transmute(usagepage), core::mem::transmute(linkcollection.unwrap_or(core::mem::zeroed())), core::mem::transmute(usagelist), core::mem::transmute(usagelength), core::mem::transmute(preparseddata), core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] pub unsafe fn HidP_UsageListDifference(previoususagelist: *const u16, currentusagelist: *const u16, breakusagelist: *mut u16, makeusagelist: *mut u16, usagelistlength: u32) -> super::super::Foundation::NTSTATUS { @@ -4549,17 +4422,11 @@ impl IDirectInput8A { pub unsafe fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn RunControlPanel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn Initialize(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn FindDevice(&self, param0: *const windows_core::GUID, param1: P1, param2: *mut windows_core::GUID) -> windows_core::Result<()> where @@ -4665,17 +4532,11 @@ impl IDirectInput8W { pub unsafe fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn RunControlPanel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn Initialize(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn FindDevice(&self, param0: *const windows_core::GUID, param1: P1, param2: *mut windows_core::GUID) -> windows_core::Result<()> where @@ -4781,17 +4642,11 @@ impl IDirectInputA { pub unsafe fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn RunControlPanel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn Initialize(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } } #[repr(C)] @@ -5222,17 +5077,11 @@ impl IDirectInputDevice8A { pub unsafe fn SetDataFormat(&self, param0: *mut DIDATAFORMAT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn SetEventNotification(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn SetEventNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn GetObjectInfo(&self, param0: *mut DIDEVICEOBJECTINSTANCEA, param1: u32, param2: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() @@ -5240,17 +5089,11 @@ impl IDirectInputDevice8A { pub unsafe fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEA) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn RunControlPanel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn Initialize(&self, param0: P0, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } pub unsafe fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut Option, param3: P3) -> windows_core::Result<()> where @@ -5560,17 +5403,11 @@ impl IDirectInputDevice8W { pub unsafe fn SetDataFormat(&self, param0: *mut DIDATAFORMAT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn SetEventNotification(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn SetEventNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn GetObjectInfo(&self, param0: *mut DIDEVICEOBJECTINSTANCEW, param1: u32, param2: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() @@ -5578,17 +5415,11 @@ impl IDirectInputDevice8W { pub unsafe fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEW) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn RunControlPanel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn Initialize(&self, param0: P0, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } pub unsafe fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut Option, param3: P3) -> windows_core::Result<()> where @@ -5898,17 +5729,11 @@ impl IDirectInputDeviceA { pub unsafe fn SetDataFormat(&self, param0: *mut DIDATAFORMAT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn SetEventNotification(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn SetEventNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn GetObjectInfo(&self, param0: *mut DIDEVICEOBJECTINSTANCEA, param1: u32, param2: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() @@ -5916,17 +5741,11 @@ impl IDirectInputDeviceA { pub unsafe fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEA) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn RunControlPanel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn Initialize(&self, param0: P0, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } } #[repr(C)] @@ -6081,17 +5900,11 @@ impl IDirectInputDeviceW { pub unsafe fn SetDataFormat(&self, param0: *mut DIDATAFORMAT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDataFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn SetEventNotification(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn SetEventNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn GetObjectInfo(&self, param0: *mut DIDEVICEOBJECTINSTANCEW, param1: u32, param2: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() @@ -6099,17 +5912,11 @@ impl IDirectInputDeviceW { pub unsafe fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEW) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn RunControlPanel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn Initialize(&self, param0: P0, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } } #[repr(C)] @@ -6237,11 +6044,8 @@ impl windows_core::RuntimeName for IDirectInputDeviceW {} windows_core::imp::define_interface!(IDirectInputEffect, IDirectInputEffect_Vtbl, 0xe7e1f7c0_88d2_11d0_9ad0_00a0c9a06e35); windows_core::imp::interface_hierarchy!(IDirectInputEffect, windows_core::IUnknown); impl IDirectInputEffect { - pub unsafe fn Initialize(&self, param0: P0, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } pub unsafe fn GetEffectGuid(&self, param0: *mut windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetEffectGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() @@ -6498,11 +6302,8 @@ impl IDirectInputJoyConfig { pub unsafe fn Unacquire(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unacquire)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn SendNotify(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SendNotify)(windows_core::Interface::as_raw(self)).ok() @@ -6543,11 +6344,8 @@ impl IDirectInputJoyConfig { pub unsafe fn SetUserValues(&self, param0: *mut DIJOYUSERVALUES, param1: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetUserValues)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn AddNewHardware(&self, param0: P0, param1: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddNewHardware)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn AddNewHardware(&self, param0: super::super::Foundation::HWND, param1: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddNewHardware)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn OpenTypeKey(&self, param0: P0, param1: u32, param2: *mut super::super::System::Registry::HKEY) -> windows_core::Result<()> @@ -6708,11 +6506,8 @@ impl IDirectInputJoyConfig8 { pub unsafe fn Unacquire(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unacquire)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn SendNotify(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SendNotify)(windows_core::Interface::as_raw(self)).ok() @@ -6754,11 +6549,8 @@ impl IDirectInputJoyConfig8 { pub unsafe fn SetUserValues(&self, param0: *mut DIJOYUSERVALUES, param1: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetUserValues)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn AddNewHardware(&self, param0: P0, param1: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddNewHardware)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn AddNewHardware(&self, param0: super::super::Foundation::HWND, param1: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddNewHardware)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn OpenTypeKey(&self, param0: P0, param1: u32, param2: *mut super::super::System::Registry::HKEY) -> windows_core::Result<()> @@ -6925,17 +6717,11 @@ impl IDirectInputW { pub unsafe fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } - pub unsafe fn RunControlPanel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunControlPanel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn Initialize(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } } #[repr(C)] 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 65deb77b24..178fd47df2 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs @@ -690,7 +690,7 @@ impl IWiaDataTransfer { (windows_core::Interface::vtable(self).idtGetBandedData)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).idtQueryGetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfe.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn idtEnumWIA_FORMAT_INFO(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -775,24 +775,17 @@ impl IWiaDevMgr { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SelectDeviceDlg(&self, hwndparent: P0, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR, ppitemroot: *mut Option) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SelectDeviceDlg)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(pbstrdeviceid), core::mem::transmute(ppitemroot)).ok() + pub unsafe fn SelectDeviceDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR, ppitemroot: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectDeviceDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(pbstrdeviceid), core::mem::transmute(ppitemroot)).ok() } - pub unsafe fn SelectDeviceDlgID(&self, hwndparent: P0, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SelectDeviceDlgID)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(pbstrdeviceid)).ok() + pub unsafe fn SelectDeviceDlgID(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectDeviceDlgID)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(pbstrdeviceid)).ok() } - pub unsafe fn GetImageDlg(&self, hwndparent: P0, ldevicetype: i32, lflags: i32, lintent: i32, pitemroot: P4, bstrfilename: &windows_core::BSTR, pguidformat: *mut windows_core::GUID) -> windows_core::Result<()> + pub unsafe fn GetImageDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, lintent: i32, pitemroot: P4, bstrfilename: &windows_core::BSTR, pguidformat: *mut windows_core::GUID) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).GetImageDlg)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(lintent), pitemroot.param().abi(), core::mem::transmute_copy(bstrfilename), core::mem::transmute(pguidformat)).ok() + (windows_core::Interface::vtable(self).GetImageDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(lintent), pitemroot.param().abi(), core::mem::transmute_copy(bstrfilename), core::mem::transmute(pguidformat)).ok() } pub unsafe fn RegisterEventCallbackProgram(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, bstrcommandline: &windows_core::BSTR, bstrname: &windows_core::BSTR, bstrdescription: &windows_core::BSTR, bstricon: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RegisterEventCallbackProgram)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute(peventguid), core::mem::transmute_copy(bstrcommandline), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrdescription), core::mem::transmute_copy(bstricon)).ok() @@ -807,11 +800,8 @@ impl IWiaDevMgr { pub unsafe fn RegisterEventCallbackCLSID(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, pclsid: *const windows_core::GUID, bstrname: &windows_core::BSTR, bstrdescription: &windows_core::BSTR, bstricon: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RegisterEventCallbackCLSID)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute(peventguid), core::mem::transmute(pclsid), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrdescription), core::mem::transmute_copy(bstricon)).ok() } - pub unsafe fn AddDeviceDlg(&self, hwndparent: P0, lflags: i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddDeviceDlg)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(lflags)).ok() + pub unsafe fn AddDeviceDlg(&self, hwndparent: super::super::Foundation::HWND, lflags: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddDeviceDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(lflags)).ok() } } #[repr(C)] @@ -923,17 +913,11 @@ impl IWiaDevMgr2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute_copy(bstrdeviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SelectDeviceDlg(&self, hwndparent: P0, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR, ppitemroot: *mut Option) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SelectDeviceDlg)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(pbstrdeviceid), core::mem::transmute(ppitemroot)).ok() + pub unsafe fn SelectDeviceDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR, ppitemroot: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectDeviceDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(pbstrdeviceid), core::mem::transmute(ppitemroot)).ok() } - pub unsafe fn SelectDeviceDlgID(&self, hwndparent: P0, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SelectDeviceDlgID)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(pbstrdeviceid)).ok() + pub unsafe fn SelectDeviceDlgID(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectDeviceDlgID)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(ldevicetype), core::mem::transmute(lflags), core::mem::transmute(pbstrdeviceid)).ok() } pub unsafe fn RegisterEventCallbackInterface(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, piwiaeventcallback: P3) -> windows_core::Result where @@ -948,11 +932,8 @@ impl IWiaDevMgr2 { pub unsafe fn RegisterEventCallbackCLSID(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, pclsid: *const windows_core::GUID, bstrname: &windows_core::BSTR, bstrdescription: &windows_core::BSTR, bstricon: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RegisterEventCallbackCLSID)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute(peventguid), core::mem::transmute(pclsid), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrdescription), core::mem::transmute_copy(bstricon)).ok() } - pub unsafe fn GetImageDlg(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, hwndparent: P2, bstrfoldername: &windows_core::BSTR, bstrfilename: &windows_core::BSTR, plnumfiles: *mut i32, ppbstrfilepaths: *mut *mut windows_core::BSTR, ppitem: *mut Option) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetImageDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute_copy(bstrdeviceid), hwndparent.param().abi(), core::mem::transmute_copy(bstrfoldername), core::mem::transmute_copy(bstrfilename), core::mem::transmute(plnumfiles), core::mem::transmute(ppbstrfilepaths), core::mem::transmute(ppitem)).ok() + pub unsafe fn GetImageDlg(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstrfoldername: &windows_core::BSTR, bstrfilename: &windows_core::BSTR, plnumfiles: *mut i32, ppbstrfilepaths: *mut *mut windows_core::BSTR, ppitem: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetImageDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute_copy(bstrdeviceid), core::mem::transmute(hwndparent), core::mem::transmute_copy(bstrfoldername), core::mem::transmute_copy(bstrfilename), core::mem::transmute(plnumfiles), core::mem::transmute(ppbstrfilepaths), core::mem::transmute(ppitem)).ok() } } #[repr(C)] @@ -1273,12 +1254,11 @@ impl windows_core::RuntimeName for IWiaDrvItem {} windows_core::imp::define_interface!(IWiaErrorHandler, IWiaErrorHandler_Vtbl, 0x0e4a51b1_bc1f_443d_a835_72e890759ef3); windows_core::imp::interface_hierarchy!(IWiaErrorHandler, windows_core::IUnknown); impl IWiaErrorHandler { - pub unsafe fn ReportStatus(&self, lflags: i32, hwndparent: P1, pwiaitem2: P2, hrstatus: windows_core::HRESULT, lpercentcomplete: i32) -> windows_core::Result<()> + pub unsafe fn ReportStatus(&self, lflags: i32, hwndparent: super::super::Foundation::HWND, pwiaitem2: P2, hrstatus: windows_core::HRESULT, lpercentcomplete: i32) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ReportStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), hwndparent.param().abi(), pwiaitem2.param().abi(), core::mem::transmute(hrstatus), core::mem::transmute(lpercentcomplete)).ok() + (windows_core::Interface::vtable(self).ReportStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute(hwndparent), pwiaitem2.param().abi(), core::mem::transmute(hrstatus), core::mem::transmute(lpercentcomplete)).ok() } pub unsafe fn GetStatusDescription(&self, lflags: i32, pwiaitem2: P1, hrstatus: windows_core::HRESULT) -> windows_core::Result where @@ -1464,11 +1444,8 @@ impl IWiaItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FindItemByName)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute_copy(bstrfullitemname), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn DeviceDlg(&self, hwndparent: P0, lflags: i32, lintent: i32, plitemcount: *mut i32, ppiwiaitem: *mut *mut Option) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(lflags), core::mem::transmute(lintent), core::mem::transmute(plitemcount), core::mem::transmute(ppiwiaitem)).ok() + pub unsafe fn DeviceDlg(&self, hwndparent: super::super::Foundation::HWND, lflags: i32, lintent: i32, plitemcount: *mut i32, ppiwiaitem: *mut *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(lflags), core::mem::transmute(lintent), core::mem::transmute(plitemcount), core::mem::transmute(ppiwiaitem)).ok() } pub unsafe fn DeviceCommand(&self, lflags: i32, pcmdguid: *const windows_core::GUID, piwiaitem: *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeviceCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute(pcmdguid), core::mem::transmute(piwiaitem)).ok() @@ -1691,7 +1668,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(core::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::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn FindItemByName(&self, lflags: i32, bstrfullitemname: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1705,11 +1682,8 @@ impl IWiaItem2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetItemType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn DeviceDlg(&self, lflags: i32, hwndparent: P1, bstrfoldername: &windows_core::BSTR, bstrfilename: &windows_core::BSTR, plnumfiles: *mut i32, ppbstrfilepaths: *mut *mut windows_core::BSTR, ppitem: Option<*mut Option>) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), hwndparent.param().abi(), core::mem::transmute_copy(bstrfoldername), core::mem::transmute_copy(bstrfilename), core::mem::transmute(plnumfiles), core::mem::transmute(ppbstrfilepaths), core::mem::transmute(ppitem.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn DeviceDlg(&self, lflags: i32, hwndparent: super::super::Foundation::HWND, bstrfoldername: &windows_core::BSTR, bstrfilename: &windows_core::BSTR, plnumfiles: *mut i32, ppbstrfilepaths: *mut *mut windows_core::BSTR, ppitem: Option<*mut Option>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), core::mem::transmute(lflags), core::mem::transmute(hwndparent), core::mem::transmute_copy(bstrfoldername), core::mem::transmute_copy(bstrfilename), core::mem::transmute(plnumfiles), core::mem::transmute(ppbstrfilepaths), core::mem::transmute(ppitem.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lflags), core::mem::transmute(pcmdguid), core::mem::transmute(ppiwiaitem2)).ok() @@ -3120,29 +3094,26 @@ impl IWiaVideo { pub unsafe fn SetImagesDirectory(&self, bstrimagedirectory: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetImagesDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrimagedirectory)).ok() } - pub unsafe fn CreateVideoByWiaDevID(&self, bstrwiadeviceid: &windows_core::BSTR, hwndparent: P1, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> + pub unsafe fn CreateVideoByWiaDevID(&self, bstrwiadeviceid: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateVideoByWiaDevID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrwiadeviceid), hwndparent.param().abi(), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() + (windows_core::Interface::vtable(self).CreateVideoByWiaDevID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrwiadeviceid), core::mem::transmute(hwndparent), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() } - pub unsafe fn CreateVideoByDevNum(&self, uidevicenumber: u32, hwndparent: P1, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> + pub unsafe fn CreateVideoByDevNum(&self, uidevicenumber: u32, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateVideoByDevNum)(windows_core::Interface::as_raw(self), core::mem::transmute(uidevicenumber), hwndparent.param().abi(), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() + (windows_core::Interface::vtable(self).CreateVideoByDevNum)(windows_core::Interface::as_raw(self), core::mem::transmute(uidevicenumber), core::mem::transmute(hwndparent), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() } - pub unsafe fn CreateVideoByName(&self, bstrfriendlyname: &windows_core::BSTR, hwndparent: P1, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> + pub unsafe fn CreateVideoByName(&self, bstrfriendlyname: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateVideoByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfriendlyname), hwndparent.param().abi(), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() + (windows_core::Interface::vtable(self).CreateVideoByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfriendlyname), core::mem::transmute(hwndparent), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() } pub unsafe fn DestroyVideo(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DestroyVideo)(windows_core::Interface::as_raw(self)).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 f146da9680..6e3a17ccb8 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs @@ -2602,7 +2602,7 @@ windows_core::imp::define_interface!(IPortableDeviceUnitsStream, IPortableDevice 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), core::mem::transmute(dlibmove), core::mem::transmute(units), core::mem::transmute(dworigin), core::mem::transmute(plibnewposition.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SeekInUnits)(windows_core::Interface::as_raw(self), core::mem::transmute(dlibmove), core::mem::transmute(units), core::mem::transmute(dworigin), core::mem::transmute(plibnewposition.unwrap_or(core::mem::zeroed()))).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 367152327f..94ebad86ce 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs @@ -210,7 +210,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 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(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()))) + PropVariantGetInformation(core::mem::transmute(propvariantvalue), core::mem::transmute(propvariantoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(propvariantsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(propvariantpointer.unwrap_or(core::mem::zeroed())), core::mem::transmute(remappedtype.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PropertiesListCopy(target: *mut SENSOR_PROPERTY_LIST, source: *const SENSOR_PROPERTY_LIST) -> super::super::Foundation::NTSTATUS { @@ -226,7 +226,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::Foundation::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::Foundation:: PROPERTYKEY, pvalue : *mut super::super::System::Com::StructuredStorage:: PROPVARIANT) -> super::super::Foundation:: NTSTATUS); - SensorCollectionGetAt(core::mem::transmute(index), core::mem::transmute(psensorslist), core::mem::transmute(pkey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))) + SensorCollectionGetAt(core::mem::transmute(index), core::mem::transmute(psensorslist), core::mem::transmute(pkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SerializationBufferAllocate(sizeinbytes: u32, pbuffer: *mut *mut u8) -> super::super::Foundation::NTSTATUS { @@ -236,7 +236,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(core::ptr::null()))) + SerializationBufferFree(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -935,13 +935,12 @@ impl ISensorManager { { (windows_core::Interface::vtable(self).SetEventSink)(windows_core::Interface::as_raw(self), pevents.param().abi()).ok() } - pub unsafe fn RequestPermissions(&self, hparent: P0, psensors: P1, fmodal: P2) -> windows_core::Result<()> + pub unsafe fn RequestPermissions(&self, hparent: super::super::Foundation::HWND, psensors: P1, fmodal: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), hparent.param().abi(), psensors.param().abi(), fmodal.param().abi()).ok() + (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent), psensors.param().abi(), fmodal.param().abi()).ok() } } #[repr(C)] 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 a37e9af988..f0d22d9e9f 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs @@ -1,35 +1,25 @@ #[inline] -pub unsafe fn ComDBClaimNextFreePort(hcomdb: P0, comnumber: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ComDBClaimNextFreePort(hcomdb: HCOMDB, comnumber: *mut u32) -> i32 { windows_targets::link!("msports.dll" "system" fn ComDBClaimNextFreePort(hcomdb : HCOMDB, comnumber : *mut u32) -> i32); - ComDBClaimNextFreePort(hcomdb.param().abi(), core::mem::transmute(comnumber)) + ComDBClaimNextFreePort(core::mem::transmute(hcomdb), core::mem::transmute(comnumber)) } #[inline] -pub unsafe fn ComDBClaimPort(hcomdb: P0, comnumber: u32, forceclaim: P2, forced: Option<*mut super::super::Foundation::BOOL>) -> i32 +pub unsafe fn ComDBClaimPort(hcomdb: HCOMDB, comnumber: u32, forceclaim: P2, forced: Option<*mut super::super::Foundation::BOOL>) -> i32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(comnumber), forceclaim.param().abi(), core::mem::transmute(forced.unwrap_or(core::ptr::null_mut()))) + ComDBClaimPort(core::mem::transmute(hcomdb), core::mem::transmute(comnumber), forceclaim.param().abi(), core::mem::transmute(forced.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ComDBClose(hcomdb: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ComDBClose(hcomdb: HCOMDB) -> i32 { windows_targets::link!("msports.dll" "system" fn ComDBClose(hcomdb : HCOMDB) -> i32); - ComDBClose(hcomdb.param().abi()) + ComDBClose(core::mem::transmute(hcomdb)) } #[inline] -pub unsafe fn ComDBGetCurrentPortUsage(hcomdb: P0, buffer: Option<&mut [u8]>, reporttype: u32, maxportsreported: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ComDBGetCurrentPortUsage(hcomdb: HCOMDB, buffer: Option<&mut [u8]>, reporttype: u32, maxportsreported: Option<*mut u32>) -> i32 { 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()), core::mem::transmute(reporttype), core::mem::transmute(maxportsreported.unwrap_or(core::ptr::null_mut()))) + ComDBGetCurrentPortUsage(core::mem::transmute(hcomdb), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(reporttype), core::mem::transmute(maxportsreported.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ComDBOpen(phcomdb: *mut HCOMDB) -> i32 { @@ -37,20 +27,14 @@ pub unsafe fn ComDBOpen(phcomdb: *mut HCOMDB) -> i32 { ComDBOpen(core::mem::transmute(phcomdb)) } #[inline] -pub unsafe fn ComDBReleasePort(hcomdb: P0, comnumber: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ComDBReleasePort(hcomdb: HCOMDB, comnumber: u32) -> i32 { windows_targets::link!("msports.dll" "system" fn ComDBReleasePort(hcomdb : HCOMDB, comnumber : u32) -> i32); - ComDBReleasePort(hcomdb.param().abi(), core::mem::transmute(comnumber)) + ComDBReleasePort(core::mem::transmute(hcomdb), core::mem::transmute(comnumber)) } #[inline] -pub unsafe fn ComDBResizeDatabase(hcomdb: P0, newsize: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ComDBResizeDatabase(hcomdb: HCOMDB, newsize: u32) -> i32 { windows_targets::link!("msports.dll" "system" fn ComDBResizeDatabase(hcomdb : HCOMDB, newsize : u32) -> i32); - ComDBResizeDatabase(hcomdb.param().abi(), core::mem::transmute(newsize)) + ComDBResizeDatabase(core::mem::transmute(hcomdb), core::mem::transmute(newsize)) } pub const CDB_REPORT_BITS: u32 = 0u32; pub const CDB_REPORT_BYTES: u32 = 1u32; 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 29b9c1a410..c780d5c501 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs @@ -37,31 +37,28 @@ where lineAccept(core::mem::transmute(hcall), lpsuseruserinfo.param().abi(), core::mem::transmute(dwsize)) } #[inline] -pub unsafe fn lineAddProvider(lpszproviderfilename: P0, hwndowner: P1, lpdwpermanentproviderid: *mut u32) -> i32 +pub unsafe fn lineAddProvider(lpszproviderfilename: P0, hwndowner: super::super::Foundation::HWND, lpdwpermanentproviderid: *mut u32) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineAddProvider(lpszproviderfilename : windows_core::PCSTR, hwndowner : super::super::Foundation:: HWND, lpdwpermanentproviderid : *mut u32) -> i32); - lineAddProvider(lpszproviderfilename.param().abi(), hwndowner.param().abi(), core::mem::transmute(lpdwpermanentproviderid)) + lineAddProvider(lpszproviderfilename.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(lpdwpermanentproviderid)) } #[inline] -pub unsafe fn lineAddProviderA(lpszproviderfilename: P0, hwndowner: P1, lpdwpermanentproviderid: *mut u32) -> i32 +pub unsafe fn lineAddProviderA(lpszproviderfilename: P0, hwndowner: super::super::Foundation::HWND, lpdwpermanentproviderid: *mut u32) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineAddProviderA(lpszproviderfilename : windows_core::PCSTR, hwndowner : super::super::Foundation:: HWND, lpdwpermanentproviderid : *mut u32) -> i32); - lineAddProviderA(lpszproviderfilename.param().abi(), hwndowner.param().abi(), core::mem::transmute(lpdwpermanentproviderid)) + lineAddProviderA(lpszproviderfilename.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(lpdwpermanentproviderid)) } #[inline] -pub unsafe fn lineAddProviderW(lpszproviderfilename: P0, hwndowner: P1, lpdwpermanentproviderid: *mut u32) -> i32 +pub unsafe fn lineAddProviderW(lpszproviderfilename: P0, hwndowner: super::super::Foundation::HWND, lpdwpermanentproviderid: *mut u32) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineAddProviderW(lpszproviderfilename : windows_core::PCWSTR, hwndowner : super::super::Foundation:: HWND, lpdwpermanentproviderid : *mut u32) -> i32); - lineAddProviderW(lpszproviderfilename.param().abi(), hwndowner.param().abi(), core::mem::transmute(lpdwpermanentproviderid)) + lineAddProviderW(lpszproviderfilename.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(lpdwpermanentproviderid)) } #[inline] pub unsafe fn lineAddToConference(hconfcall: u32, hconsultcall: u32) -> i32 { @@ -121,66 +118,57 @@ pub unsafe fn lineCompleteTransfer(hcall: u32, hconsultcall: u32, lphconfcall: * lineCompleteTransfer(core::mem::transmute(hcall), core::mem::transmute(hconsultcall), core::mem::transmute(lphconfcall), core::mem::transmute(dwtransfermode)) } #[inline] -pub unsafe fn lineConfigDialog(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2) -> i32 +pub unsafe fn lineConfigDialog(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineConfigDialog(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCSTR) -> i32); - lineConfigDialog(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi()) + lineConfigDialog(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi()) } #[inline] -pub unsafe fn lineConfigDialogA(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2) -> i32 +pub unsafe fn lineConfigDialogA(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineConfigDialogA(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCSTR) -> i32); - lineConfigDialogA(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi()) + lineConfigDialogA(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi()) } #[inline] -pub unsafe fn lineConfigDialogEdit(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2, lpdeviceconfigin: *const core::ffi::c_void, dwsize: u32, lpdeviceconfigout: *mut VARSTRING) -> i32 +pub unsafe fn lineConfigDialogEdit(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2, lpdeviceconfigin: *const core::ffi::c_void, dwsize: u32, lpdeviceconfigout: *mut VARSTRING) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineConfigDialogEdit(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCSTR, lpdeviceconfigin : *const core::ffi::c_void, dwsize : u32, lpdeviceconfigout : *mut VARSTRING) -> i32); - lineConfigDialogEdit(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi(), core::mem::transmute(lpdeviceconfigin), core::mem::transmute(dwsize), core::mem::transmute(lpdeviceconfigout)) + lineConfigDialogEdit(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi(), core::mem::transmute(lpdeviceconfigin), core::mem::transmute(dwsize), core::mem::transmute(lpdeviceconfigout)) } #[inline] -pub unsafe fn lineConfigDialogEditA(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2, lpdeviceconfigin: *const core::ffi::c_void, dwsize: u32, lpdeviceconfigout: *mut VARSTRING) -> i32 +pub unsafe fn lineConfigDialogEditA(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2, lpdeviceconfigin: *const core::ffi::c_void, dwsize: u32, lpdeviceconfigout: *mut VARSTRING) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineConfigDialogEditA(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCSTR, lpdeviceconfigin : *const core::ffi::c_void, dwsize : u32, lpdeviceconfigout : *mut VARSTRING) -> i32); - lineConfigDialogEditA(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi(), core::mem::transmute(lpdeviceconfigin), core::mem::transmute(dwsize), core::mem::transmute(lpdeviceconfigout)) + lineConfigDialogEditA(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi(), core::mem::transmute(lpdeviceconfigin), core::mem::transmute(dwsize), core::mem::transmute(lpdeviceconfigout)) } #[inline] -pub unsafe fn lineConfigDialogEditW(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2, lpdeviceconfigin: *const core::ffi::c_void, dwsize: u32, lpdeviceconfigout: *mut VARSTRING) -> i32 +pub unsafe fn lineConfigDialogEditW(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2, lpdeviceconfigin: *const core::ffi::c_void, dwsize: u32, lpdeviceconfigout: *mut VARSTRING) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineConfigDialogEditW(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCWSTR, lpdeviceconfigin : *const core::ffi::c_void, dwsize : u32, lpdeviceconfigout : *mut VARSTRING) -> i32); - lineConfigDialogEditW(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi(), core::mem::transmute(lpdeviceconfigin), core::mem::transmute(dwsize), core::mem::transmute(lpdeviceconfigout)) + lineConfigDialogEditW(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi(), core::mem::transmute(lpdeviceconfigin), core::mem::transmute(dwsize), core::mem::transmute(lpdeviceconfigout)) } #[inline] -pub unsafe fn lineConfigDialogW(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2) -> i32 +pub unsafe fn lineConfigDialogW(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineConfigDialogW(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCWSTR) -> i32); - lineConfigDialogW(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi()) + lineConfigDialogW(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi()) } #[inline] -pub unsafe fn lineConfigProvider(hwndowner: P0, dwpermanentproviderid: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn lineConfigProvider(hwndowner: super::super::Foundation::HWND, dwpermanentproviderid: u32) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineConfigProvider(hwndowner : super::super::Foundation:: HWND, dwpermanentproviderid : u32) -> i32); - lineConfigProvider(hwndowner.param().abi(), core::mem::transmute(dwpermanentproviderid)) + lineConfigProvider(core::mem::transmute(hwndowner), core::mem::transmute(dwpermanentproviderid)) } #[inline] pub unsafe fn lineCreateAgentA(hline: u32, lpszagentid: P1, lpszagentpin: P2, lphagent: *mut u32) -> i32 @@ -736,31 +724,28 @@ pub unsafe fn lineHold(hcall: u32) -> i32 { lineHold(core::mem::transmute(hcall)) } #[inline] -pub unsafe fn lineInitialize(lphlineapp: *mut u32, hinstance: P1, lpfncallback: LINECALLBACK, lpszappname: P3, lpdwnumdevs: *mut u32) -> i32 +pub unsafe fn lineInitialize(lphlineapp: *mut u32, hinstance: super::super::Foundation::HINSTANCE, lpfncallback: LINECALLBACK, lpszappname: P3, lpdwnumdevs: *mut u32) -> i32 where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineInitialize(lphlineapp : *mut u32, hinstance : super::super::Foundation:: HINSTANCE, lpfncallback : LINECALLBACK, lpszappname : windows_core::PCSTR, lpdwnumdevs : *mut u32) -> i32); - lineInitialize(core::mem::transmute(lphlineapp), hinstance.param().abi(), core::mem::transmute(lpfncallback), lpszappname.param().abi(), core::mem::transmute(lpdwnumdevs)) + lineInitialize(core::mem::transmute(lphlineapp), core::mem::transmute(hinstance), core::mem::transmute(lpfncallback), lpszappname.param().abi(), core::mem::transmute(lpdwnumdevs)) } #[inline] -pub unsafe fn lineInitializeExA(lphlineapp: *mut u32, hinstance: P1, lpfncallback: LINECALLBACK, lpszfriendlyappname: P3, lpdwnumdevs: *mut u32, lpdwapiversion: *mut u32, lplineinitializeexparams: *mut LINEINITIALIZEEXPARAMS) -> i32 +pub unsafe fn lineInitializeExA(lphlineapp: *mut u32, hinstance: super::super::Foundation::HINSTANCE, lpfncallback: LINECALLBACK, lpszfriendlyappname: P3, lpdwnumdevs: *mut u32, lpdwapiversion: *mut u32, lplineinitializeexparams: *mut LINEINITIALIZEEXPARAMS) -> i32 where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineInitializeExA(lphlineapp : *mut u32, hinstance : super::super::Foundation:: HINSTANCE, lpfncallback : LINECALLBACK, lpszfriendlyappname : windows_core::PCSTR, lpdwnumdevs : *mut u32, lpdwapiversion : *mut u32, lplineinitializeexparams : *mut LINEINITIALIZEEXPARAMS) -> i32); - lineInitializeExA(core::mem::transmute(lphlineapp), hinstance.param().abi(), core::mem::transmute(lpfncallback), lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lplineinitializeexparams)) + lineInitializeExA(core::mem::transmute(lphlineapp), core::mem::transmute(hinstance), core::mem::transmute(lpfncallback), lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lplineinitializeexparams)) } #[inline] -pub unsafe fn lineInitializeExW(lphlineapp: *mut u32, hinstance: P1, lpfncallback: LINECALLBACK, lpszfriendlyappname: P3, lpdwnumdevs: *mut u32, lpdwapiversion: *mut u32, lplineinitializeexparams: *mut LINEINITIALIZEEXPARAMS) -> i32 +pub unsafe fn lineInitializeExW(lphlineapp: *mut u32, hinstance: super::super::Foundation::HINSTANCE, lpfncallback: LINECALLBACK, lpszfriendlyappname: P3, lpdwnumdevs: *mut u32, lpdwapiversion: *mut u32, lplineinitializeexparams: *mut LINEINITIALIZEEXPARAMS) -> i32 where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineInitializeExW(lphlineapp : *mut u32, hinstance : super::super::Foundation:: HINSTANCE, lpfncallback : LINECALLBACK, lpszfriendlyappname : windows_core::PCWSTR, lpdwnumdevs : *mut u32, lpdwapiversion : *mut u32, lplineinitializeexparams : *mut LINEINITIALIZEEXPARAMS) -> i32); - lineInitializeExW(core::mem::transmute(lphlineapp), hinstance.param().abi(), core::mem::transmute(lpfncallback), lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lplineinitializeexparams)) + lineInitializeExW(core::mem::transmute(lphlineapp), core::mem::transmute(hinstance), core::mem::transmute(lpfncallback), lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lplineinitializeexparams)) } #[inline] pub unsafe fn lineMakeCall(hline: u32, lphcall: *mut u32, lpszdestaddress: P2, dwcountrycode: u32, lpcallparams: *const LINECALLPARAMS) -> i32 @@ -943,12 +928,9 @@ pub unsafe fn lineRemoveFromConference(hcall: u32) -> i32 { lineRemoveFromConference(core::mem::transmute(hcall)) } #[inline] -pub unsafe fn lineRemoveProvider(dwpermanentproviderid: u32, hwndowner: P1) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn lineRemoveProvider(dwpermanentproviderid: u32, hwndowner: super::super::Foundation::HWND) -> i32 { windows_targets::link!("tapi32.dll" "system" fn lineRemoveProvider(dwpermanentproviderid : u32, hwndowner : super::super::Foundation:: HWND) -> i32); - lineRemoveProvider(core::mem::transmute(dwpermanentproviderid), hwndowner.param().abi()) + lineRemoveProvider(core::mem::transmute(dwpermanentproviderid), core::mem::transmute(hwndowner)) } #[inline] pub unsafe fn lineSecureCall(hcall: u32) -> i32 { @@ -1203,31 +1185,28 @@ where lineTranslateAddressW(core::mem::transmute(hlineapp), core::mem::transmute(dwdeviceid), core::mem::transmute(dwapiversion), lpszaddressin.param().abi(), core::mem::transmute(dwcard), core::mem::transmute(dwtranslateoptions), core::mem::transmute(lptranslateoutput)) } #[inline] -pub unsafe fn lineTranslateDialog(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, hwndowner: P3, lpszaddressin: P4) -> i32 +pub unsafe fn lineTranslateDialog(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, hwndowner: super::super::Foundation::HWND, lpszaddressin: P4) -> i32 where - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineTranslateDialog(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, hwndowner : super::super::Foundation:: HWND, lpszaddressin : windows_core::PCSTR) -> i32); - lineTranslateDialog(core::mem::transmute(hlineapp), core::mem::transmute(dwdeviceid), core::mem::transmute(dwapiversion), hwndowner.param().abi(), lpszaddressin.param().abi()) + lineTranslateDialog(core::mem::transmute(hlineapp), core::mem::transmute(dwdeviceid), core::mem::transmute(dwapiversion), core::mem::transmute(hwndowner), lpszaddressin.param().abi()) } #[inline] -pub unsafe fn lineTranslateDialogA(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, hwndowner: P3, lpszaddressin: P4) -> i32 +pub unsafe fn lineTranslateDialogA(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, hwndowner: super::super::Foundation::HWND, lpszaddressin: P4) -> i32 where - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineTranslateDialogA(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, hwndowner : super::super::Foundation:: HWND, lpszaddressin : windows_core::PCSTR) -> i32); - lineTranslateDialogA(core::mem::transmute(hlineapp), core::mem::transmute(dwdeviceid), core::mem::transmute(dwapiversion), hwndowner.param().abi(), lpszaddressin.param().abi()) + lineTranslateDialogA(core::mem::transmute(hlineapp), core::mem::transmute(dwdeviceid), core::mem::transmute(dwapiversion), core::mem::transmute(hwndowner), lpszaddressin.param().abi()) } #[inline] -pub unsafe fn lineTranslateDialogW(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, hwndowner: P3, lpszaddressin: P4) -> i32 +pub unsafe fn lineTranslateDialogW(hlineapp: u32, dwdeviceid: u32, dwapiversion: u32, hwndowner: super::super::Foundation::HWND, lpszaddressin: P4) -> i32 where - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn lineTranslateDialogW(hlineapp : u32, dwdeviceid : u32, dwapiversion : u32, hwndowner : super::super::Foundation:: HWND, lpszaddressin : windows_core::PCWSTR) -> i32); - lineTranslateDialogW(core::mem::transmute(hlineapp), core::mem::transmute(dwdeviceid), core::mem::transmute(dwapiversion), hwndowner.param().abi(), lpszaddressin.param().abi()) + lineTranslateDialogW(core::mem::transmute(hlineapp), core::mem::transmute(dwdeviceid), core::mem::transmute(dwapiversion), core::mem::transmute(hwndowner), lpszaddressin.param().abi()) } #[inline] pub unsafe fn lineUncompleteCall(hline: u32, dwcompletionid: u32) -> i32 { @@ -1269,31 +1248,28 @@ pub unsafe fn phoneClose(hphone: u32) -> i32 { phoneClose(core::mem::transmute(hphone)) } #[inline] -pub unsafe fn phoneConfigDialog(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2) -> i32 +pub unsafe fn phoneConfigDialog(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneConfigDialog(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCSTR) -> i32); - phoneConfigDialog(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi()) + phoneConfigDialog(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi()) } #[inline] -pub unsafe fn phoneConfigDialogA(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2) -> i32 +pub unsafe fn phoneConfigDialogA(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneConfigDialogA(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCSTR) -> i32); - phoneConfigDialogA(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi()) + phoneConfigDialogA(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi()) } #[inline] -pub unsafe fn phoneConfigDialogW(dwdeviceid: u32, hwndowner: P1, lpszdeviceclass: P2) -> i32 +pub unsafe fn phoneConfigDialogW(dwdeviceid: u32, hwndowner: super::super::Foundation::HWND, lpszdeviceclass: P2) -> i32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneConfigDialogW(dwdeviceid : u32, hwndowner : super::super::Foundation:: HWND, lpszdeviceclass : windows_core::PCWSTR) -> i32); - phoneConfigDialogW(core::mem::transmute(dwdeviceid), hwndowner.param().abi(), lpszdeviceclass.param().abi()) + phoneConfigDialogW(core::mem::transmute(dwdeviceid), core::mem::transmute(hwndowner), lpszdeviceclass.param().abi()) } #[inline] pub unsafe fn phoneDevSpecific(hphone: u32, lpparams: *mut core::ffi::c_void, dwsize: u32) -> i32 { @@ -1442,31 +1418,28 @@ pub unsafe fn phoneGetVolume(hphone: u32, dwhookswitchdev: u32, lpdwvolume: *mut phoneGetVolume(core::mem::transmute(hphone), core::mem::transmute(dwhookswitchdev), core::mem::transmute(lpdwvolume)) } #[inline] -pub unsafe fn phoneInitialize(lphphoneapp: *mut u32, hinstance: P1, lpfncallback: PHONECALLBACK, lpszappname: P3, lpdwnumdevs: *mut u32) -> i32 +pub unsafe fn phoneInitialize(lphphoneapp: *mut u32, hinstance: super::super::Foundation::HINSTANCE, lpfncallback: PHONECALLBACK, lpszappname: P3, lpdwnumdevs: *mut u32) -> i32 where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneInitialize(lphphoneapp : *mut u32, hinstance : super::super::Foundation:: HINSTANCE, lpfncallback : PHONECALLBACK, lpszappname : windows_core::PCSTR, lpdwnumdevs : *mut u32) -> i32); - phoneInitialize(core::mem::transmute(lphphoneapp), hinstance.param().abi(), core::mem::transmute(lpfncallback), lpszappname.param().abi(), core::mem::transmute(lpdwnumdevs)) + phoneInitialize(core::mem::transmute(lphphoneapp), core::mem::transmute(hinstance), core::mem::transmute(lpfncallback), lpszappname.param().abi(), core::mem::transmute(lpdwnumdevs)) } #[inline] -pub unsafe fn phoneInitializeExA(lphphoneapp: *mut u32, hinstance: P1, lpfncallback: PHONECALLBACK, lpszfriendlyappname: P3, lpdwnumdevs: *mut u32, lpdwapiversion: *mut u32, lpphoneinitializeexparams: *mut PHONEINITIALIZEEXPARAMS) -> i32 +pub unsafe fn phoneInitializeExA(lphphoneapp: *mut u32, hinstance: super::super::Foundation::HINSTANCE, lpfncallback: PHONECALLBACK, lpszfriendlyappname: P3, lpdwnumdevs: *mut u32, lpdwapiversion: *mut u32, lpphoneinitializeexparams: *mut PHONEINITIALIZEEXPARAMS) -> i32 where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneInitializeExA(lphphoneapp : *mut u32, hinstance : super::super::Foundation:: HINSTANCE, lpfncallback : PHONECALLBACK, lpszfriendlyappname : windows_core::PCSTR, lpdwnumdevs : *mut u32, lpdwapiversion : *mut u32, lpphoneinitializeexparams : *mut PHONEINITIALIZEEXPARAMS) -> i32); - phoneInitializeExA(core::mem::transmute(lphphoneapp), hinstance.param().abi(), core::mem::transmute(lpfncallback), lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lpphoneinitializeexparams)) + phoneInitializeExA(core::mem::transmute(lphphoneapp), core::mem::transmute(hinstance), core::mem::transmute(lpfncallback), lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lpphoneinitializeexparams)) } #[inline] -pub unsafe fn phoneInitializeExW(lphphoneapp: *mut u32, hinstance: P1, lpfncallback: PHONECALLBACK, lpszfriendlyappname: P3, lpdwnumdevs: *mut u32, lpdwapiversion: *mut u32, lpphoneinitializeexparams: *mut PHONEINITIALIZEEXPARAMS) -> i32 +pub unsafe fn phoneInitializeExW(lphphoneapp: *mut u32, hinstance: super::super::Foundation::HINSTANCE, lpfncallback: PHONECALLBACK, lpszfriendlyappname: P3, lpdwnumdevs: *mut u32, lpdwapiversion: *mut u32, lpphoneinitializeexparams: *mut PHONEINITIALIZEEXPARAMS) -> i32 where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn phoneInitializeExW(lphphoneapp : *mut u32, hinstance : super::super::Foundation:: HINSTANCE, lpfncallback : PHONECALLBACK, lpszfriendlyappname : windows_core::PCWSTR, lpdwnumdevs : *mut u32, lpdwapiversion : *mut u32, lpphoneinitializeexparams : *mut PHONEINITIALIZEEXPARAMS) -> i32); - phoneInitializeExW(core::mem::transmute(lphphoneapp), hinstance.param().abi(), core::mem::transmute(lpfncallback), lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lpphoneinitializeexparams)) + phoneInitializeExW(core::mem::transmute(lphphoneapp), core::mem::transmute(hinstance), core::mem::transmute(lpfncallback), lpszfriendlyappname.param().abi(), core::mem::transmute(lpdwnumdevs), core::mem::transmute(lpdwapiversion), core::mem::transmute(lpphoneinitializeexparams)) } #[inline] pub unsafe fn phoneNegotiateAPIVersion(hphoneapp: u32, dwdeviceid: u32, dwapilowversion: u32, dwapihighversion: u32, lpdwapiversion: *mut u32, lpextensionid: *mut PHONEEXTENSIONID) -> i32 { @@ -1562,13 +1535,9 @@ pub unsafe fn tapiGetLocationInfoW(lpszcountrycodew: &mut [u16; 8], lpszcitycode tapiGetLocationInfoW(core::mem::transmute(lpszcountrycodew.as_ptr()), core::mem::transmute(lpszcitycodew.as_ptr())) } #[inline] -pub unsafe fn tapiRequestDrop(hwnd: P0, wrequestid: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn tapiRequestDrop(hwnd: super::super::Foundation::HWND, wrequestid: super::super::Foundation::WPARAM) -> i32 { windows_targets::link!("tapi32.dll" "system" fn tapiRequestDrop(hwnd : super::super::Foundation:: HWND, wrequestid : super::super::Foundation:: WPARAM) -> i32); - tapiRequestDrop(hwnd.param().abi(), wrequestid.param().abi()) + tapiRequestDrop(core::mem::transmute(hwnd), core::mem::transmute(wrequestid)) } #[inline] pub unsafe fn tapiRequestMakeCall(lpszdestaddress: P0, lpszappname: P1, lpszcalledparty: P2, lpszcomment: P3) -> i32 @@ -1604,10 +1573,8 @@ where tapiRequestMakeCallW(lpszdestaddress.param().abi(), lpszappname.param().abi(), lpszcalledparty.param().abi(), lpszcomment.param().abi()) } #[inline] -pub unsafe fn tapiRequestMediaCall(hwnd: P0, wrequestid: P1, lpszdeviceclass: P2, lpdeviceid: P3, dwsize: u32, dwsecure: u32, lpszdestaddress: P6, lpszappname: P7, lpszcalledparty: P8, lpszcomment: P9) -> i32 +pub unsafe fn tapiRequestMediaCall(hwnd: super::super::Foundation::HWND, wrequestid: super::super::Foundation::WPARAM, lpszdeviceclass: P2, lpdeviceid: P3, dwsize: u32, dwsecure: u32, lpszdestaddress: P6, lpszappname: P7, lpszcalledparty: P8, lpszcomment: P9) -> i32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P6: windows_core::Param, @@ -1616,13 +1583,11 @@ where P9: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn tapiRequestMediaCall(hwnd : super::super::Foundation:: HWND, wrequestid : super::super::Foundation:: WPARAM, lpszdeviceclass : windows_core::PCSTR, lpdeviceid : windows_core::PCSTR, dwsize : u32, dwsecure : u32, lpszdestaddress : windows_core::PCSTR, lpszappname : windows_core::PCSTR, lpszcalledparty : windows_core::PCSTR, lpszcomment : windows_core::PCSTR) -> i32); - tapiRequestMediaCall(hwnd.param().abi(), wrequestid.param().abi(), lpszdeviceclass.param().abi(), lpdeviceid.param().abi(), core::mem::transmute(dwsize), core::mem::transmute(dwsecure), lpszdestaddress.param().abi(), lpszappname.param().abi(), lpszcalledparty.param().abi(), lpszcomment.param().abi()) + tapiRequestMediaCall(core::mem::transmute(hwnd), core::mem::transmute(wrequestid), lpszdeviceclass.param().abi(), lpdeviceid.param().abi(), core::mem::transmute(dwsize), core::mem::transmute(dwsecure), lpszdestaddress.param().abi(), lpszappname.param().abi(), lpszcalledparty.param().abi(), lpszcomment.param().abi()) } #[inline] -pub unsafe fn tapiRequestMediaCallA(hwnd: P0, wrequestid: P1, lpszdeviceclass: P2, lpdeviceid: P3, dwsize: u32, dwsecure: u32, lpszdestaddress: P6, lpszappname: P7, lpszcalledparty: P8, lpszcomment: P9) -> i32 +pub unsafe fn tapiRequestMediaCallA(hwnd: super::super::Foundation::HWND, wrequestid: super::super::Foundation::WPARAM, lpszdeviceclass: P2, lpdeviceid: P3, dwsize: u32, dwsecure: u32, lpszdestaddress: P6, lpszappname: P7, lpszcalledparty: P8, lpszcomment: P9) -> i32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P6: windows_core::Param, @@ -1631,13 +1596,11 @@ where P9: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn tapiRequestMediaCallA(hwnd : super::super::Foundation:: HWND, wrequestid : super::super::Foundation:: WPARAM, lpszdeviceclass : windows_core::PCSTR, lpdeviceid : windows_core::PCSTR, dwsize : u32, dwsecure : u32, lpszdestaddress : windows_core::PCSTR, lpszappname : windows_core::PCSTR, lpszcalledparty : windows_core::PCSTR, lpszcomment : windows_core::PCSTR) -> i32); - tapiRequestMediaCallA(hwnd.param().abi(), wrequestid.param().abi(), lpszdeviceclass.param().abi(), lpdeviceid.param().abi(), core::mem::transmute(dwsize), core::mem::transmute(dwsecure), lpszdestaddress.param().abi(), lpszappname.param().abi(), lpszcalledparty.param().abi(), lpszcomment.param().abi()) + tapiRequestMediaCallA(core::mem::transmute(hwnd), core::mem::transmute(wrequestid), lpszdeviceclass.param().abi(), lpdeviceid.param().abi(), core::mem::transmute(dwsize), core::mem::transmute(dwsecure), lpszdestaddress.param().abi(), lpszappname.param().abi(), lpszcalledparty.param().abi(), lpszcomment.param().abi()) } #[inline] -pub unsafe fn tapiRequestMediaCallW(hwnd: P0, wrequestid: P1, lpszdeviceclass: P2, lpdeviceid: P3, dwsize: u32, dwsecure: u32, lpszdestaddress: P6, lpszappname: P7, lpszcalledparty: P8, lpszcomment: P9) -> i32 +pub unsafe fn tapiRequestMediaCallW(hwnd: super::super::Foundation::HWND, wrequestid: super::super::Foundation::WPARAM, lpszdeviceclass: P2, lpdeviceid: P3, dwsize: u32, dwsecure: u32, lpszdestaddress: P6, lpszappname: P7, lpszcalledparty: P8, lpszcomment: P9) -> i32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P6: windows_core::Param, @@ -1646,7 +1609,7 @@ where P9: windows_core::Param, { windows_targets::link!("tapi32.dll" "system" fn tapiRequestMediaCallW(hwnd : super::super::Foundation:: HWND, wrequestid : super::super::Foundation:: WPARAM, lpszdeviceclass : windows_core::PCWSTR, lpdeviceid : windows_core::PCWSTR, dwsize : u32, dwsecure : u32, lpszdestaddress : windows_core::PCWSTR, lpszappname : windows_core::PCWSTR, lpszcalledparty : windows_core::PCWSTR, lpszcomment : windows_core::PCWSTR) -> i32); - tapiRequestMediaCallW(hwnd.param().abi(), wrequestid.param().abi(), lpszdeviceclass.param().abi(), lpdeviceid.param().abi(), core::mem::transmute(dwsize), core::mem::transmute(dwsecure), lpszdestaddress.param().abi(), lpszappname.param().abi(), lpszcalledparty.param().abi(), lpszcomment.param().abi()) + tapiRequestMediaCallW(core::mem::transmute(hwnd), core::mem::transmute(wrequestid), lpszdeviceclass.param().abi(), lpdeviceid.param().abi(), core::mem::transmute(dwsize), core::mem::transmute(dwsecure), lpszdestaddress.param().abi(), lpszappname.param().abi(), lpszcalledparty.param().abi(), lpszcomment.param().abi()) } pub const ACDGE_GROUP_REMOVED: ACDGROUP_EVENT = ACDGROUP_EVENT(1i32); pub const ACDGE_NEW_GROUP: ACDGROUP_EVENT = ACDGROUP_EVENT(0i32); @@ -2265,7 +2228,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2564,7 +2527,7 @@ windows_core::imp::define_interface!(IEnumBstr, IEnumBstr_Vtbl, 0x35372049_0bc6_ 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2633,7 +2596,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), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2708,7 +2671,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2783,7 +2746,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), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2857,7 +2820,7 @@ windows_core::imp::define_interface!(IEnumDialableAddrs, IEnumDialableAddrs_Vtbl 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2926,7 +2889,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3001,7 +2964,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3076,7 +3039,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), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3151,7 +3114,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), core::mem::transmute(celt), core::mem::transmute(ppscopes), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(ppscopes), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3226,7 +3189,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3301,7 +3264,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3376,7 +3339,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3526,7 +3489,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), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3601,7 +3564,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), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3676,7 +3639,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), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3750,7 +3713,7 @@ windows_core::imp::define_interface!(IEnumTerminalClass, IEnumTerminalClass_Vtbl 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -4660,21 +4623,15 @@ impl ITAddress { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CurrentForwardInfo)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetMessageWaiting(&self, fmessagewaiting: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMessageWaiting)(windows_core::Interface::as_raw(self), fmessagewaiting.param().abi()).ok() + pub unsafe fn SetMessageWaiting(&self, fmessagewaiting: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMessageWaiting)(windows_core::Interface::as_raw(self), core::mem::transmute(fmessagewaiting)).ok() } pub unsafe fn MessageWaiting(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MessageWaiting)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDoNotDisturb(&self, fdonotdisturb: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDoNotDisturb)(windows_core::Interface::as_raw(self), fdonotdisturb.param().abi()).ok() + pub unsafe fn SetDoNotDisturb(&self, fdonotdisturb: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDoNotDisturb)(windows_core::Interface::as_raw(self), core::mem::transmute(fdonotdisturb)).ok() } pub unsafe fn DoNotDisturb(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4924,11 +4881,8 @@ impl ITAddress2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_EventFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(tapievent), core::mem::transmute(lsubevent), &mut result__).map(|| result__) } - pub unsafe fn put_EventFilter(&self, tapievent: TAPI_EVENT, lsubevent: i32, benable: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).put_EventFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(tapievent), core::mem::transmute(lsubevent), benable.param().abi()).ok() + pub unsafe fn put_EventFilter(&self, tapievent: TAPI_EVENT, lsubevent: i32, benable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).put_EventFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(tapievent), core::mem::transmute(lsubevent), core::mem::transmute(benable)).ok() } pub unsafe fn DeviceSpecific(&self, pcall: P0, pparams: *const u8, dwsize: u32) -> windows_core::Result<()> where @@ -6898,11 +6852,8 @@ impl ITAutomatedPhoneControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Ringer)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPhoneHandlingEnabled(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPhoneHandlingEnabled)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetPhoneHandlingEnabled(&self, fenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPhoneHandlingEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(fenabled)).ok() } pub unsafe fn PhoneHandlingEnabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6915,41 +6866,29 @@ impl ITAutomatedPhoneControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoEndOfNumberTimeout)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoDialtone(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoDialtone)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetAutoDialtone(&self, fenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoDialtone)(windows_core::Interface::as_raw(self), core::mem::transmute(fenabled)).ok() } pub unsafe fn AutoDialtone(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoDialtone)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoStopTonesOnOnHook(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoStopTonesOnOnHook)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetAutoStopTonesOnOnHook(&self, fenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoStopTonesOnOnHook)(windows_core::Interface::as_raw(self), core::mem::transmute(fenabled)).ok() } pub unsafe fn AutoStopTonesOnOnHook(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoStopTonesOnOnHook)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoStopRingOnOffHook(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoStopRingOnOffHook)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetAutoStopRingOnOffHook(&self, fenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoStopRingOnOffHook)(windows_core::Interface::as_raw(self), core::mem::transmute(fenabled)).ok() } pub unsafe fn AutoStopRingOnOffHook(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoStopRingOnOffHook)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoKeypadTones(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoKeypadTones)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetAutoKeypadTones(&self, fenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoKeypadTones)(windows_core::Interface::as_raw(self), core::mem::transmute(fenabled)).ok() } pub unsafe fn AutoKeypadTones(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6962,11 +6901,8 @@ impl ITAutomatedPhoneControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoKeypadTonesMinimumDuration)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoVolumeControl(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoVolumeControl)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetAutoVolumeControl(&self, fenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoVolumeControl)(windows_core::Interface::as_raw(self), core::mem::transmute(fenabled)).ok() } pub unsafe fn AutoVolumeControl(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6993,12 +6929,11 @@ impl ITAutomatedPhoneControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoVolumeControlRepeatPeriod)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SelectCall(&self, pcall: P0, fselectdefaultterminals: P1) -> windows_core::Result<()> + pub unsafe fn SelectCall(&self, pcall: P0, fselectdefaultterminals: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SelectCall)(windows_core::Interface::as_raw(self), pcall.param().abi(), fselectdefaultterminals.param().abi()).ok() + (windows_core::Interface::vtable(self).SelectCall)(windows_core::Interface::as_raw(self), pcall.param().abi(), core::mem::transmute(fselectdefaultterminals)).ok() } pub unsafe fn UnselectCall(&self, pcall: P0) -> windows_core::Result<()> where @@ -7456,11 +7391,8 @@ impl core::ops::Deref for ITBasicCallControl { windows_core::imp::interface_hierarchy!(ITBasicCallControl, windows_core::IUnknown, super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl ITBasicCallControl { - pub unsafe fn Connect(&self, fsync: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), fsync.param().abi()).ok() + pub unsafe fn Connect(&self, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), core::mem::transmute(fsync)).ok() } pub unsafe fn Answer(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Answer)(windows_core::Interface::as_raw(self)).ok() @@ -7468,11 +7400,8 @@ impl ITBasicCallControl { pub unsafe fn Disconnect(&self, code: DISCONNECT_CODE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self), core::mem::transmute(code)).ok() } - pub unsafe fn Hold(&self, fhold: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Hold)(windows_core::Interface::as_raw(self), fhold.param().abi()).ok() + pub unsafe fn Hold(&self, fhold: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Hold)(windows_core::Interface::as_raw(self), core::mem::transmute(fhold)).ok() } pub unsafe fn HandoffDirect(&self, papplicationname: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HandoffDirect)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(papplicationname)).ok() @@ -7480,19 +7409,17 @@ impl ITBasicCallControl { pub unsafe fn HandoffIndirect(&self, lmediatype: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HandoffIndirect)(windows_core::Interface::as_raw(self), core::mem::transmute(lmediatype)).ok() } - pub unsafe fn Conference(&self, pcall: P0, fsync: P1) -> windows_core::Result<()> + pub unsafe fn Conference(&self, pcall: P0, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Conference)(windows_core::Interface::as_raw(self), pcall.param().abi(), fsync.param().abi()).ok() + (windows_core::Interface::vtable(self).Conference)(windows_core::Interface::as_raw(self), pcall.param().abi(), core::mem::transmute(fsync)).ok() } - pub unsafe fn Transfer(&self, pcall: P0, fsync: P1) -> windows_core::Result<()> + pub unsafe fn Transfer(&self, pcall: P0, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Transfer)(windows_core::Interface::as_raw(self), pcall.param().abi(), fsync.param().abi()).ok() + (windows_core::Interface::vtable(self).Transfer)(windows_core::Interface::as_raw(self), pcall.param().abi(), core::mem::transmute(fsync)).ok() } pub unsafe fn BlindTransfer(&self, pdestaddress: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BlindTransfer)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdestaddress)).ok() @@ -8202,11 +8129,8 @@ impl ITCallInfo2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_EventFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(tapievent), core::mem::transmute(lsubevent), &mut result__).map(|| result__) } - pub unsafe fn put_EventFilter(&self, tapievent: TAPI_EVENT, lsubevent: i32, benable: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).put_EventFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(tapievent), core::mem::transmute(lsubevent), benable.param().abi()).ok() + pub unsafe fn put_EventFilter(&self, tapievent: TAPI_EVENT, lsubevent: i32, benable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).put_EventFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(tapievent), core::mem::transmute(lsubevent), core::mem::transmute(benable)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -9595,17 +9519,11 @@ impl ITDirectory { pub unsafe fn SetDefaultObjectTTL(&self, ttl: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDefaultObjectTTL)(windows_core::Interface::as_raw(self), core::mem::transmute(ttl)).ok() } - pub unsafe fn EnableAutoRefresh(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableAutoRefresh)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableAutoRefresh(&self, fenable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableAutoRefresh)(windows_core::Interface::as_raw(self), core::mem::transmute(fenable)).ok() } - pub unsafe fn Connect(&self, fsecure: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), fsecure.param().abi()).ok() + pub unsafe fn Connect(&self, fsecure: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), core::mem::transmute(fsecure)).ok() } pub unsafe fn Bind(&self, pdomainname: &windows_core::BSTR, pusername: &windows_core::BSTR, ppassword: &windows_core::BSTR, lflags: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pdomainname), core::mem::transmute_copy(pusername), core::mem::transmute_copy(ppassword), core::mem::transmute(lflags)).ok() @@ -9998,11 +9916,8 @@ impl ITDirectoryObjectConference { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsEncrypted)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsEncrypted(&self, fencrypted: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsEncrypted)(windows_core::Interface::as_raw(self), fencrypted.param().abi()).ok() + pub unsafe fn SetIsEncrypted(&self, fencrypted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsEncrypted)(windows_core::Interface::as_raw(self), core::mem::transmute(fencrypted)).ok() } pub unsafe fn StartTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10915,17 +10830,11 @@ impl core::ops::Deref for ITLegacyAddressMediaControl2 { } windows_core::imp::interface_hierarchy!(ITLegacyAddressMediaControl2, windows_core::IUnknown, ITLegacyAddressMediaControl); impl ITLegacyAddressMediaControl2 { - pub unsafe fn ConfigDialog(&self, hwndowner: P0, pdeviceclass: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ConfigDialog)(windows_core::Interface::as_raw(self), hwndowner.param().abi(), core::mem::transmute_copy(pdeviceclass)).ok() + pub unsafe fn ConfigDialog(&self, hwndowner: super::super::Foundation::HWND, pdeviceclass: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ConfigDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner), core::mem::transmute_copy(pdeviceclass)).ok() } - pub unsafe fn ConfigDialogEdit(&self, hwndowner: P0, pdeviceclass: &windows_core::BSTR, pdeviceconfigin: &[u8], pdwsizeout: *mut u32, ppdeviceconfigout: *mut *mut u8) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ConfigDialogEdit)(windows_core::Interface::as_raw(self), hwndowner.param().abi(), core::mem::transmute_copy(pdeviceclass), pdeviceconfigin.len().try_into().unwrap(), core::mem::transmute(pdeviceconfigin.as_ptr()), core::mem::transmute(pdwsizeout), core::mem::transmute(ppdeviceconfigout)).ok() + pub unsafe fn ConfigDialogEdit(&self, hwndowner: super::super::Foundation::HWND, pdeviceclass: &windows_core::BSTR, pdeviceconfigin: &[u8], pdwsizeout: *mut u32, ppdeviceconfigout: *mut *mut u8) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ConfigDialogEdit)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner), core::mem::transmute_copy(pdeviceclass), pdeviceconfigin.len().try_into().unwrap(), core::mem::transmute(pdeviceconfigin.as_ptr()), core::mem::transmute(pdwsizeout), core::mem::transmute(ppdeviceconfigout)).ok() } } #[repr(C)] @@ -14713,14 +14622,12 @@ impl ITTAPI { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumerateAddresses)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterCallNotifications(&self, paddress: P0, fmonitor: P1, fowner: P2, lmediatypes: i32, lcallbackinstance: i32) -> windows_core::Result + pub unsafe fn RegisterCallNotifications(&self, paddress: P0, fmonitor: super::super::Foundation::VARIANT_BOOL, fowner: super::super::Foundation::VARIANT_BOOL, lmediatypes: i32, lcallbackinstance: i32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterCallNotifications)(windows_core::Interface::as_raw(self), paddress.param().abi(), fmonitor.param().abi(), fowner.param().abi(), core::mem::transmute(lmediatypes), core::mem::transmute(lcallbackinstance), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterCallNotifications)(windows_core::Interface::as_raw(self), paddress.param().abi(), core::mem::transmute(fmonitor), core::mem::transmute(fowner), core::mem::transmute(lmediatypes), core::mem::transmute(lcallbackinstance), &mut result__).map(|| result__) } pub unsafe fn UnregisterNotifications(&self, lregister: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnregisterNotifications)(windows_core::Interface::as_raw(self), core::mem::transmute(lregister)).ok() @@ -14735,11 +14642,8 @@ impl ITTAPI { (windows_core::Interface::vtable(self).EnumerateCallHubs)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn SetCallHubTracking(&self, paddresses: &super::super::System::Variant::VARIANT, btracking: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCallHubTracking)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(paddresses), btracking.param().abi()).ok() + pub unsafe fn SetCallHubTracking(&self, paddresses: &super::super::System::Variant::VARIANT, btracking: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCallHubTracking)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(paddresses), core::mem::transmute(btracking)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumeratePrivateTAPIObjects(&self) -> windows_core::Result { @@ -14751,23 +14655,14 @@ impl ITTAPI { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).PrivateTAPIObjects)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn RegisterRequestRecipient(&self, lregistrationinstance: i32, lrequestmode: i32, fenable: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterRequestRecipient)(windows_core::Interface::as_raw(self), core::mem::transmute(lregistrationinstance), core::mem::transmute(lrequestmode), fenable.param().abi()).ok() + pub unsafe fn RegisterRequestRecipient(&self, lregistrationinstance: i32, lrequestmode: i32, fenable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterRequestRecipient)(windows_core::Interface::as_raw(self), core::mem::transmute(lregistrationinstance), core::mem::transmute(lrequestmode), core::mem::transmute(fenable)).ok() } - pub unsafe fn SetAssistedTelephonyPriority(&self, pappfilename: &windows_core::BSTR, fpriority: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAssistedTelephonyPriority)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pappfilename), fpriority.param().abi()).ok() + pub unsafe fn SetAssistedTelephonyPriority(&self, pappfilename: &windows_core::BSTR, fpriority: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAssistedTelephonyPriority)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pappfilename), core::mem::transmute(fpriority)).ok() } - pub unsafe fn SetApplicationPriority(&self, pappfilename: &windows_core::BSTR, lmediatype: i32, fpriority: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetApplicationPriority)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pappfilename), core::mem::transmute(lmediatype), fpriority.param().abi()).ok() + pub unsafe fn SetApplicationPriority(&self, pappfilename: &windows_core::BSTR, lmediatype: i32, fpriority: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetApplicationPriority)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pappfilename), core::mem::transmute(lmediatype), core::mem::transmute(fpriority)).ok() } pub unsafe fn SetEventFilter(&self, lfiltermask: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetEventFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(lfiltermask)).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 f44dfaf5a2..dc7cb9bc40 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs @@ -1,35 +1,23 @@ #[inline] -pub unsafe fn WinUsb_AbortPipe(interfacehandle: P0, pipeid: u8) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_AbortPipe(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_AbortPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8) -> super::super::Foundation:: BOOL); - WinUsb_AbortPipe(interfacehandle.param().abi(), core::mem::transmute(pipeid)).ok() + WinUsb_AbortPipe(core::mem::transmute(interfacehandle), core::mem::transmute(pipeid)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WinUsb_ControlTransfer(interfacehandle: P0, setuppacket: WINUSB_SETUP_PACKET, buffer: Option<&mut [u8]>, lengthtransferred: Option<*mut u32>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_ControlTransfer(interfacehandle: WINUSB_INTERFACE_HANDLE, setuppacket: WINUSB_SETUP_PACKET, buffer: Option<&mut [u8]>, lengthtransferred: Option<*mut u32>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() + WinUsb_ControlTransfer(core::mem::transmute(interfacehandle), 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::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WinUsb_FlushPipe(interfacehandle: P0, pipeid: u8) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_FlushPipe(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_FlushPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8) -> super::super::Foundation:: BOOL); - WinUsb_FlushPipe(interfacehandle.param().abi(), core::mem::transmute(pipeid)).ok() + WinUsb_FlushPipe(core::mem::transmute(interfacehandle), core::mem::transmute(pipeid)).ok() } #[inline] -pub unsafe fn WinUsb_Free(interfacehandle: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_Free(interfacehandle: WINUSB_INTERFACE_HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("winusb.dll" "system" fn WinUsb_Free(interfacehandle : WINUSB_INTERFACE_HANDLE) -> super::super::Foundation:: BOOL); - WinUsb_Free(interfacehandle.param().abi()) + WinUsb_Free(core::mem::transmute(interfacehandle)) } #[inline] pub unsafe fn WinUsb_GetAdjustedFrameNumber(currentframenumber: *mut u32, timestamp: i64) -> windows_core::Result<()> { @@ -37,78 +25,53 @@ pub unsafe fn WinUsb_GetAdjustedFrameNumber(currentframenumber: *mut u32, timest WinUsb_GetAdjustedFrameNumber(core::mem::transmute(currentframenumber), core::mem::transmute(timestamp)).ok() } #[inline] -pub unsafe fn WinUsb_GetAssociatedInterface(interfacehandle: P0, associatedinterfaceindex: u8, associatedinterfacehandle: *mut WINUSB_INTERFACE_HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_GetAssociatedInterface(interfacehandle: WINUSB_INTERFACE_HANDLE, associatedinterfaceindex: u8, associatedinterfacehandle: *mut WINUSB_INTERFACE_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetAssociatedInterface(interfacehandle : WINUSB_INTERFACE_HANDLE, associatedinterfaceindex : u8, associatedinterfacehandle : *mut WINUSB_INTERFACE_HANDLE) -> super::super::Foundation:: BOOL); - WinUsb_GetAssociatedInterface(interfacehandle.param().abi(), core::mem::transmute(associatedinterfaceindex), core::mem::transmute(associatedinterfacehandle)).ok() + WinUsb_GetAssociatedInterface(core::mem::transmute(interfacehandle), core::mem::transmute(associatedinterfaceindex), core::mem::transmute(associatedinterfacehandle)).ok() } #[inline] -pub unsafe fn WinUsb_GetCurrentAlternateSetting(interfacehandle: P0, settingnumber: *mut u8) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_GetCurrentAlternateSetting(interfacehandle: WINUSB_INTERFACE_HANDLE, settingnumber: *mut u8) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetCurrentAlternateSetting(interfacehandle : WINUSB_INTERFACE_HANDLE, settingnumber : *mut u8) -> super::super::Foundation:: BOOL); - WinUsb_GetCurrentAlternateSetting(interfacehandle.param().abi(), core::mem::transmute(settingnumber)).ok() + WinUsb_GetCurrentAlternateSetting(core::mem::transmute(interfacehandle), core::mem::transmute(settingnumber)).ok() } #[inline] -pub unsafe fn WinUsb_GetCurrentFrameNumber(interfacehandle: P0, currentframenumber: *mut u32, timestamp: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_GetCurrentFrameNumber(interfacehandle: WINUSB_INTERFACE_HANDLE, currentframenumber: *mut u32, timestamp: *mut i64) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetCurrentFrameNumber(interfacehandle : WINUSB_INTERFACE_HANDLE, currentframenumber : *mut u32, timestamp : *mut i64) -> super::super::Foundation:: BOOL); - WinUsb_GetCurrentFrameNumber(interfacehandle.param().abi(), core::mem::transmute(currentframenumber), core::mem::transmute(timestamp)).ok() + WinUsb_GetCurrentFrameNumber(core::mem::transmute(interfacehandle), core::mem::transmute(currentframenumber), core::mem::transmute(timestamp)).ok() } #[inline] -pub unsafe fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle: P0, frameqpcinfo: *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle: WINUSB_INTERFACE_HANDLE, frameqpcinfo: *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle : WINUSB_INTERFACE_HANDLE, frameqpcinfo : *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation:: BOOL); - WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle.param().abi(), core::mem::transmute(frameqpcinfo)).ok() + WinUsb_GetCurrentFrameNumberAndQpc(core::mem::transmute(interfacehandle), core::mem::transmute(frameqpcinfo)).ok() } #[inline] -pub unsafe fn WinUsb_GetDescriptor(interfacehandle: P0, descriptortype: u8, index: u8, languageid: u16, buffer: Option<&mut [u8]>, lengthtransferred: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_GetDescriptor(interfacehandle: WINUSB_INTERFACE_HANDLE, descriptortype: u8, index: u8, languageid: u16, buffer: Option<&mut [u8]>, lengthtransferred: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetDescriptor(interfacehandle : WINUSB_INTERFACE_HANDLE, descriptortype : u8, index : u8, languageid : u16, buffer : *mut u8, bufferlength : u32, lengthtransferred : *mut u32) -> super::super::Foundation:: BOOL); - WinUsb_GetDescriptor(interfacehandle.param().abi(), core::mem::transmute(descriptortype), core::mem::transmute(index), core::mem::transmute(languageid), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lengthtransferred)).ok() + WinUsb_GetDescriptor(core::mem::transmute(interfacehandle), core::mem::transmute(descriptortype), core::mem::transmute(index), core::mem::transmute(languageid), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lengthtransferred)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WinUsb_GetOverlappedResult(interfacehandle: P0, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P3) -> windows_core::Result<()> +pub unsafe fn WinUsb_GetOverlappedResult(interfacehandle: WINUSB_INTERFACE_HANDLE, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetOverlappedResult(interfacehandle : WINUSB_INTERFACE_HANDLE, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpnumberofbytestransferred : *mut u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WinUsb_GetOverlappedResult(interfacehandle.param().abi(), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.param().abi()).ok() + WinUsb_GetOverlappedResult(core::mem::transmute(interfacehandle), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.param().abi()).ok() } #[inline] -pub unsafe fn WinUsb_GetPipePolicy(interfacehandle: P0, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: *mut u32, value: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_GetPipePolicy(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: *mut u32, value: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetPipePolicy(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, policytype : WINUSB_PIPE_POLICY, valuelength : *mut u32, value : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_GetPipePolicy(interfacehandle.param().abi(), core::mem::transmute(pipeid), core::mem::transmute(policytype), core::mem::transmute(valuelength), core::mem::transmute(value)).ok() + WinUsb_GetPipePolicy(core::mem::transmute(interfacehandle), core::mem::transmute(pipeid), core::mem::transmute(policytype), core::mem::transmute(valuelength), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn WinUsb_GetPowerPolicy(interfacehandle: P0, policytype: WINUSB_POWER_POLICY, valuelength: *mut u32, value: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_GetPowerPolicy(interfacehandle: WINUSB_INTERFACE_HANDLE, policytype: WINUSB_POWER_POLICY, valuelength: *mut u32, value: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetPowerPolicy(interfacehandle : WINUSB_INTERFACE_HANDLE, policytype : WINUSB_POWER_POLICY, valuelength : *mut u32, value : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_GetPowerPolicy(interfacehandle.param().abi(), core::mem::transmute(policytype), core::mem::transmute(valuelength), core::mem::transmute(value)).ok() + WinUsb_GetPowerPolicy(core::mem::transmute(interfacehandle), core::mem::transmute(policytype), core::mem::transmute(valuelength), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn WinUsb_Initialize(devicehandle: P0, interfacehandle: *mut WINUSB_INTERFACE_HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_Initialize(devicehandle: super::super::Foundation::HANDLE, interfacehandle: *mut WINUSB_INTERFACE_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_Initialize(devicehandle : super::super::Foundation:: HANDLE, interfacehandle : *mut WINUSB_INTERFACE_HANDLE) -> super::super::Foundation:: BOOL); - WinUsb_Initialize(devicehandle.param().abi(), core::mem::transmute(interfacehandle)).ok() + WinUsb_Initialize(core::mem::transmute(devicehandle), core::mem::transmute(interfacehandle)).ok() } #[inline] pub unsafe fn WinUsb_ParseConfigurationDescriptor(configurationdescriptor: *const USB_CONFIGURATION_DESCRIPTOR, startposition: *const core::ffi::c_void, interfacenumber: i32, alternatesetting: i32, interfaceclass: i32, interfacesubclass: i32, interfaceprotocol: i32) -> *mut USB_INTERFACE_DESCRIPTOR { @@ -121,42 +84,30 @@ pub unsafe fn WinUsb_ParseDescriptors(descriptorbuffer: *const core::ffi::c_void WinUsb_ParseDescriptors(core::mem::transmute(descriptorbuffer), core::mem::transmute(totallength), core::mem::transmute(startposition), core::mem::transmute(descriptortype)) } #[inline] -pub unsafe fn WinUsb_QueryDeviceInformation(interfacehandle: P0, informationtype: u32, bufferlength: *mut u32, buffer: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_QueryDeviceInformation(interfacehandle: WINUSB_INTERFACE_HANDLE, informationtype: u32, bufferlength: *mut u32, buffer: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_QueryDeviceInformation(interfacehandle : WINUSB_INTERFACE_HANDLE, informationtype : u32, bufferlength : *mut u32, buffer : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_QueryDeviceInformation(interfacehandle.param().abi(), core::mem::transmute(informationtype), core::mem::transmute(bufferlength), core::mem::transmute(buffer)).ok() + WinUsb_QueryDeviceInformation(core::mem::transmute(interfacehandle), core::mem::transmute(informationtype), core::mem::transmute(bufferlength), core::mem::transmute(buffer)).ok() } #[inline] -pub unsafe fn WinUsb_QueryInterfaceSettings(interfacehandle: P0, alternateinterfacenumber: u8, usbaltinterfacedescriptor: *mut USB_INTERFACE_DESCRIPTOR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_QueryInterfaceSettings(interfacehandle: WINUSB_INTERFACE_HANDLE, alternateinterfacenumber: u8, usbaltinterfacedescriptor: *mut USB_INTERFACE_DESCRIPTOR) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_QueryInterfaceSettings(interfacehandle : WINUSB_INTERFACE_HANDLE, alternateinterfacenumber : u8, usbaltinterfacedescriptor : *mut USB_INTERFACE_DESCRIPTOR) -> super::super::Foundation:: BOOL); - WinUsb_QueryInterfaceSettings(interfacehandle.param().abi(), core::mem::transmute(alternateinterfacenumber), core::mem::transmute(usbaltinterfacedescriptor)).ok() + WinUsb_QueryInterfaceSettings(core::mem::transmute(interfacehandle), core::mem::transmute(alternateinterfacenumber), core::mem::transmute(usbaltinterfacedescriptor)).ok() } #[inline] -pub unsafe fn WinUsb_QueryPipe(interfacehandle: P0, alternateinterfacenumber: u8, pipeindex: u8, pipeinformation: *mut WINUSB_PIPE_INFORMATION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_QueryPipe(interfacehandle: WINUSB_INTERFACE_HANDLE, alternateinterfacenumber: u8, pipeindex: u8, pipeinformation: *mut WINUSB_PIPE_INFORMATION) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_QueryPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, alternateinterfacenumber : u8, pipeindex : u8, pipeinformation : *mut WINUSB_PIPE_INFORMATION) -> super::super::Foundation:: BOOL); - WinUsb_QueryPipe(interfacehandle.param().abi(), core::mem::transmute(alternateinterfacenumber), core::mem::transmute(pipeindex), core::mem::transmute(pipeinformation)).ok() + WinUsb_QueryPipe(core::mem::transmute(interfacehandle), core::mem::transmute(alternateinterfacenumber), core::mem::transmute(pipeindex), core::mem::transmute(pipeinformation)).ok() } #[inline] -pub unsafe fn WinUsb_QueryPipeEx(interfacehandle: P0, alternatesettingnumber: u8, pipeindex: u8, pipeinformationex: *mut WINUSB_PIPE_INFORMATION_EX) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_QueryPipeEx(interfacehandle: WINUSB_INTERFACE_HANDLE, alternatesettingnumber: u8, pipeindex: u8, pipeinformationex: *mut WINUSB_PIPE_INFORMATION_EX) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_QueryPipeEx(interfacehandle : WINUSB_INTERFACE_HANDLE, alternatesettingnumber : u8, pipeindex : u8, pipeinformationex : *mut WINUSB_PIPE_INFORMATION_EX) -> super::super::Foundation:: BOOL); - WinUsb_QueryPipeEx(interfacehandle.param().abi(), core::mem::transmute(alternatesettingnumber), core::mem::transmute(pipeindex), core::mem::transmute(pipeinformationex)).ok() + WinUsb_QueryPipeEx(core::mem::transmute(interfacehandle), core::mem::transmute(alternatesettingnumber), core::mem::transmute(pipeindex), core::mem::transmute(pipeinformationex)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn WinUsb_ReadIsochPipe(bufferhandle: *const core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, isopacketdescriptors: &mut [USBD_ISO_PACKET_DESCRIPTOR], overlapped: 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(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(framenumber), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() + WinUsb_ReadIsochPipe(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(framenumber), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -165,72 +116,48 @@ where P3: 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(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(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() + WinUsb_ReadIsochPipeAsap(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), continuestream.param().abi(), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WinUsb_ReadPipe(interfacehandle: P0, pipeid: u8, buffer: Option<&mut [u8]>, lengthtransferred: Option<*mut u32>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_ReadPipe(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8, buffer: Option<&mut [u8]>, lengthtransferred: Option<*mut u32>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(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() + WinUsb_ReadPipe(core::mem::transmute(interfacehandle), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WinUsb_RegisterIsochBuffer(interfacehandle: P0, pipeid: u8, buffer: &mut [u8], isochbufferhandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_RegisterIsochBuffer(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8, buffer: &mut [u8], isochbufferhandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_RegisterIsochBuffer(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, buffer : *mut u8, bufferlength : u32, isochbufferhandle : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_RegisterIsochBuffer(interfacehandle.param().abi(), core::mem::transmute(pipeid), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(isochbufferhandle)).ok() + WinUsb_RegisterIsochBuffer(core::mem::transmute(interfacehandle), core::mem::transmute(pipeid), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(isochbufferhandle)).ok() } #[inline] -pub unsafe fn WinUsb_ResetPipe(interfacehandle: P0, pipeid: u8) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_ResetPipe(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_ResetPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8) -> super::super::Foundation:: BOOL); - WinUsb_ResetPipe(interfacehandle.param().abi(), core::mem::transmute(pipeid)).ok() + WinUsb_ResetPipe(core::mem::transmute(interfacehandle), core::mem::transmute(pipeid)).ok() } #[inline] -pub unsafe fn WinUsb_SetCurrentAlternateSetting(interfacehandle: P0, settingnumber: u8) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_SetCurrentAlternateSetting(interfacehandle: WINUSB_INTERFACE_HANDLE, settingnumber: u8) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_SetCurrentAlternateSetting(interfacehandle : WINUSB_INTERFACE_HANDLE, settingnumber : u8) -> super::super::Foundation:: BOOL); - WinUsb_SetCurrentAlternateSetting(interfacehandle.param().abi(), core::mem::transmute(settingnumber)).ok() + WinUsb_SetCurrentAlternateSetting(core::mem::transmute(interfacehandle), core::mem::transmute(settingnumber)).ok() } #[inline] -pub unsafe fn WinUsb_SetPipePolicy(interfacehandle: P0, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: u32, value: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_SetPipePolicy(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: u32, value: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_SetPipePolicy(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, policytype : WINUSB_PIPE_POLICY, valuelength : u32, value : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_SetPipePolicy(interfacehandle.param().abi(), core::mem::transmute(pipeid), core::mem::transmute(policytype), core::mem::transmute(valuelength), core::mem::transmute(value)).ok() + WinUsb_SetPipePolicy(core::mem::transmute(interfacehandle), core::mem::transmute(pipeid), core::mem::transmute(policytype), core::mem::transmute(valuelength), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn WinUsb_SetPowerPolicy(interfacehandle: P0, policytype: WINUSB_POWER_POLICY, valuelength: u32, value: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_SetPowerPolicy(interfacehandle: WINUSB_INTERFACE_HANDLE, policytype: WINUSB_POWER_POLICY, valuelength: u32, value: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_SetPowerPolicy(interfacehandle : WINUSB_INTERFACE_HANDLE, policytype : WINUSB_POWER_POLICY, valuelength : u32, value : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_SetPowerPolicy(interfacehandle.param().abi(), core::mem::transmute(policytype), core::mem::transmute(valuelength), core::mem::transmute(value)).ok() + WinUsb_SetPowerPolicy(core::mem::transmute(interfacehandle), core::mem::transmute(policytype), core::mem::transmute(valuelength), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn WinUsb_StartTrackingForTimeSync(interfacehandle: P0, starttrackinginfo: *const USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_StartTrackingForTimeSync(interfacehandle: WINUSB_INTERFACE_HANDLE, starttrackinginfo: *const USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_StartTrackingForTimeSync(interfacehandle : WINUSB_INTERFACE_HANDLE, starttrackinginfo : *const USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation:: BOOL); - WinUsb_StartTrackingForTimeSync(interfacehandle.param().abi(), core::mem::transmute(starttrackinginfo)).ok() + WinUsb_StartTrackingForTimeSync(core::mem::transmute(interfacehandle), core::mem::transmute(starttrackinginfo)).ok() } #[inline] -pub unsafe fn WinUsb_StopTrackingForTimeSync(interfacehandle: P0, stoptrackinginfo: *const USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_StopTrackingForTimeSync(interfacehandle: WINUSB_INTERFACE_HANDLE, stoptrackinginfo: *const USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_StopTrackingForTimeSync(interfacehandle : WINUSB_INTERFACE_HANDLE, stoptrackinginfo : *const USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation:: BOOL); - WinUsb_StopTrackingForTimeSync(interfacehandle.param().abi(), core::mem::transmute(stoptrackinginfo)).ok() + WinUsb_StopTrackingForTimeSync(core::mem::transmute(interfacehandle), core::mem::transmute(stoptrackinginfo)).ok() } #[inline] pub unsafe fn WinUsb_UnregisterIsochBuffer(isochbufferhandle: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -241,7 +168,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(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(framenumber), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() + WinUsb_WriteIsochPipe(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(framenumber), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -250,16 +177,13 @@ where P3: 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(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), continuestream.param().abi(), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() + WinUsb_WriteIsochPipeAsap(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), continuestream.param().abi(), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WinUsb_WritePipe(interfacehandle: P0, pipeid: u8, buffer: &[u8], lengthtransferred: Option<*mut u32>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WinUsb_WritePipe(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8, buffer: &[u8], lengthtransferred: Option<*mut u32>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(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() + WinUsb_WritePipe(core::mem::transmute(interfacehandle), core::mem::transmute(pipeid), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(lengthtransferred.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).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 06d2ce8a44..36b7f6c541 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(core::mem::transmute(pcode), core::mem::transmute(psubcode.unwrap_or(core::ptr::null())), core::mem::transmute(preasons), pszdetail.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WSDGenerateFaultEx(core::mem::transmute(pcode), core::mem::transmute(psubcode.unwrap_or(core::mem::zeroed())), core::mem::transmute(preasons), pszdetail.param().abi(), &mut result__).map(|| core::mem::transmute(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(), core::mem::transmute(destout), core::mem::transmute(cchdestout.unwrap_or(core::ptr::null_mut()))).ok() + WSDUriDecode(core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), core::mem::transmute(destout), core::mem::transmute(cchdestout.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(destout), core::mem::transmute(cchdestout.unwrap_or(core::ptr::null_mut()))).ok() + WSDUriEncode(core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), core::mem::transmute(destout), core::mem::transmute(cchdestout.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WSDXMLAddChild(pparent: *mut WSDXML_ELEMENT, pchild: *mut WSDXML_ELEMENT) -> windows_core::Result<()> { @@ -331,11 +331,8 @@ impl IWSDAsyncResult { { (windows_core::Interface::vtable(self).SetCallback)(windows_core::Interface::as_raw(self), pcallback.param().abi(), pasyncstate.param().abi()).ok() } - pub unsafe fn SetWaitHandle(&self, hwaithandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWaitHandle)(windows_core::Interface::as_raw(self), hwaithandle.param().abi()).ok() + pub unsafe fn SetWaitHandle(&self, hwaithandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWaitHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hwaithandle)).ok() } pub unsafe fn HasCompleted(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HasCompleted)(windows_core::Interface::as_raw(self)).ok() @@ -475,7 +472,7 @@ impl IWSDDeviceHost { (windows_core::Interface::vtable(self).RegisterPortType)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(pthismodelmetadata), core::mem::transmute(pthisdevicemetadata), core::mem::transmute(phostmetadata.unwrap_or(core::ptr::null())), core::mem::transmute(pcustommetadata.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetMetadata)(windows_core::Interface::as_raw(self), core::mem::transmute(pthismodelmetadata), core::mem::transmute(pthisdevicemetadata), core::mem::transmute(phostmetadata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcustommetadata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn RegisterService(&self, pszserviceid: P0, pservice: P1) -> windows_core::Result<()> where @@ -496,7 +493,7 @@ impl IWSDDeviceHost { P1: windows_core::Param, P5: 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(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() + (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::mem::zeroed())), core::mem::transmute(pportname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pany.unwrap_or(core::mem::zeroed())), pservice.param().abi()).ok() } pub unsafe fn RemoveDynamicService(&self, pszserviceid: P0) -> windows_core::Result<()> where @@ -515,7 +512,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(core::ptr::null())), core::mem::transmute(poperation)).ok() + (windows_core::Interface::vtable(self).SignalEvent)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), core::mem::transmute(pbody.unwrap_or(core::mem::zeroed())), core::mem::transmute(poperation)).ok() } } #[repr(C)] @@ -854,7 +851,7 @@ impl IWSDEndpointProxy { (windows_core::Interface::vtable(self).SendOneWayRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pbody), core::mem::transmute(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), core::mem::transmute(pbody), core::mem::transmute(poperation), core::mem::transmute(presponsecontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SendTwoWayRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pbody), core::mem::transmute(poperation), core::mem::transmute(presponsecontext.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SendTwoWayRequestAsync(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pasyncstate: P2, pcallback: P3) -> windows_core::Result where @@ -1686,13 +1683,13 @@ impl IWSDServiceMessaging { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SendResponse)(windows_core::Interface::as_raw(self), core::mem::transmute(pbody.unwrap_or(core::ptr::null())), core::mem::transmute(poperation), pmessageparameters.param().abi()).ok() + (windows_core::Interface::vtable(self).SendResponse)(windows_core::Interface::as_raw(self), core::mem::transmute(pbody.unwrap_or(core::mem::zeroed())), core::mem::transmute(poperation), pmessageparameters.param().abi()).ok() } pub unsafe fn FaultRequest(&self, prequestheader: *const WSD_SOAP_HEADER, pmessageparameters: P1, pfault: Option<*const WSD_SOAP_FAULT>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FaultRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(prequestheader), pmessageparameters.param().abi(), core::mem::transmute(pfault.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).FaultRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(prequestheader), pmessageparameters.param().abi(), core::mem::transmute(pfault.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -1754,7 +1751,7 @@ impl IWSDServiceProxy { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SubscribeToOperation)(windows_core::Interface::as_raw(self), core::mem::transmute(poperation), punknown.param().abi(), core::mem::transmute(pany), core::mem::transmute(ppany.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SubscribeToOperation)(windows_core::Interface::as_raw(self), core::mem::transmute(poperation), punknown.param().abi(), core::mem::transmute(pany), core::mem::transmute(ppany.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(poperation)).ok() @@ -1873,7 +1870,7 @@ impl IWSDServiceProxyEventing { where P2: 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(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() + (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::mem::zeroed())), core::mem::transmute(pany.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppexpires.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppany.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn BeginSubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], punknown: P2, pexpires: Option<*const WSD_EVENTING_EXPIRES>, pany: Option<*const WSDXML_ELEMENT>, pasyncstate: P5, pasynccallback: P6) -> windows_core::Result where @@ -1882,13 +1879,13 @@ impl IWSDServiceProxyEventing { P6: 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(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__)) + (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::mem::zeroed())), core::mem::transmute(pany.unwrap_or(core::mem::zeroed())), 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: P2, ppexpires: Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: Option<*mut *mut WSDXML_ELEMENT>) -> windows_core::Result<()> where P2: 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(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppany.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(pany)).ok() @@ -1899,7 +1896,7 @@ impl IWSDServiceProxyEventing { P4: 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(core::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::mem::zeroed())), 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: P2) -> windows_core::Result<()> where @@ -1908,7 +1905,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(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() + (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::mem::zeroed())), core::mem::transmute(pany.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppexpires.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppany.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn BeginRenewMultipleOperations(&self, poperations: &[WSD_OPERATION], pexpires: Option<*const WSD_EVENTING_EXPIRES>, pany: Option<*const WSDXML_ELEMENT>, pasyncstate: P4, pasynccallback: P5) -> windows_core::Result where @@ -1916,16 +1913,16 @@ impl IWSDServiceProxyEventing { P5: 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(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__)) + (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::mem::zeroed())), core::mem::transmute(pany.unwrap_or(core::mem::zeroed())), 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: P2, ppexpires: Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: Option<*mut *mut WSDXML_ELEMENT>) -> windows_core::Result<()> where P2: 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(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppany.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(ppexpires.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppexpires.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppany.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn BeginGetStatusForMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: Option<*const WSDXML_ELEMENT>, pasyncstate: P3, pasynccallback: P4) -> windows_core::Result where @@ -1933,13 +1930,13 @@ impl IWSDServiceProxyEventing { P4: 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(core::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::mem::zeroed())), 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: P2, ppexpires: Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: Option<*mut *mut WSDXML_ELEMENT>) -> windows_core::Result<()> where P2: 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(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppany.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -2079,13 +2076,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(core::ptr::null_mut())), core::mem::transmute(pdwkeyinfosize)).ok() + (windows_core::Interface::vtable(self).GetKeyInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbkeyinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pdwsignaturesize)).ok() + (windows_core::Interface::vtable(self).GetSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsignature.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pdwhashsize)).ok() + (windows_core::Interface::vtable(self).GetSignedInfoHash)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsignedinfohash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwhashsize)).ok() } } #[repr(C)] @@ -2473,14 +2470,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(core::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::mem::zeroed()))).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(core::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::mem::zeroed()))).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(), core::mem::transmute(blayernumber)).ok() @@ -2769,7 +2766,7 @@ impl IWSDiscoveryProvider { P2: windows_core::Param, P3: windows_core::Param, { - (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() + (windows_core::Interface::vtable(self).SearchByType)(windows_core::Interface::as_raw(self), core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), pszmatchby.param().abi(), psztag.param().abi()).ok() } pub unsafe fn GetXMLContext(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2944,14 +2941,14 @@ impl IWSDiscoveryPublisher { P0: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Publish)(windows_core::Interface::as_raw(self), pszid.param().abi(), core::mem::transmute(ullmetadataversion), core::mem::transmute(ullinstanceid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).Publish)(windows_core::Interface::as_raw(self), pszid.param().abi(), core::mem::transmute(ullmetadataversion), core::mem::transmute(ullinstanceid), core::mem::transmute(ullmessagenumber), pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn UnPublish(&self, pszid: P0, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: P3, pany: Option<*const WSDXML_ELEMENT>) -> windows_core::Result<()> where P0: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).UnPublish)(windows_core::Interface::as_raw(self), pszid.param().abi(), core::mem::transmute(ullinstanceid), core::mem::transmute(ullmessagenumber), pszsessionid.param().abi(), core::mem::transmute(pany.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).UnPublish)(windows_core::Interface::as_raw(self), pszid.param().abi(), core::mem::transmute(ullinstanceid), core::mem::transmute(ullmessagenumber), pszsessionid.param().abi(), core::mem::transmute(pany.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn MatchProbe(&self, pprobemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: P1, pszid: P2, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: P6, ptypeslist: Option<*const WSD_NAME_LIST>, pscopeslist: Option<*const WSD_URI_LIST>, pxaddrslist: Option<*const WSD_URI_LIST>) -> windows_core::Result<()> where @@ -2959,7 +2956,7 @@ impl IWSDiscoveryPublisher { P2: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).MatchProbe)(windows_core::Interface::as_raw(self), core::mem::transmute(pprobemessage), pmessageparameters.param().abi(), pszid.param().abi(), core::mem::transmute(ullmetadataversion), core::mem::transmute(ullinstanceid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).MatchProbe)(windows_core::Interface::as_raw(self), core::mem::transmute(pprobemessage), pmessageparameters.param().abi(), pszid.param().abi(), core::mem::transmute(ullmetadataversion), core::mem::transmute(ullinstanceid), core::mem::transmute(ullmessagenumber), pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn MatchResolve(&self, presolvemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: P1, pszid: P2, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: P6, ptypeslist: Option<*const WSD_NAME_LIST>, pscopeslist: Option<*const WSD_URI_LIST>, pxaddrslist: Option<*const WSD_URI_LIST>) -> windows_core::Result<()> where @@ -2967,7 +2964,7 @@ impl IWSDiscoveryPublisher { P2: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).MatchResolve)(windows_core::Interface::as_raw(self), core::mem::transmute(presolvemessage), pmessageparameters.param().abi(), pszid.param().abi(), core::mem::transmute(ullmetadataversion), core::mem::transmute(ullinstanceid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).MatchResolve)(windows_core::Interface::as_raw(self), core::mem::transmute(presolvemessage), pmessageparameters.param().abi(), pszid.param().abi(), core::mem::transmute(ullmetadataversion), core::mem::transmute(ullinstanceid), core::mem::transmute(ullmessagenumber), pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn PublishEx(&self, pszid: P0, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: P4, 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 @@ -2981,14 +2978,14 @@ impl IWSDiscoveryPublisher { core::mem::transmute(ullinstanceid), core::mem::transmute(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())), - 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())), + core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pheaderany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(preferenceparameterany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppolicyany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pendpointreferenceany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pany.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -3007,14 +3004,14 @@ impl IWSDiscoveryPublisher { core::mem::transmute(ullinstanceid), core::mem::transmute(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())), - 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())), + core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pheaderany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(preferenceparameterany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppolicyany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pendpointreferenceany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pany.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -3033,14 +3030,14 @@ impl IWSDiscoveryPublisher { core::mem::transmute(ullinstanceid), core::mem::transmute(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())), - 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())), + core::mem::transmute(ptypeslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pscopeslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pxaddrslist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pheaderany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(preferenceparameterany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppolicyany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pendpointreferenceany.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pany.unwrap_or(core::mem::zeroed())), ) .ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs index 43921d7a1d..0f227b18cd 100644 --- a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs @@ -1,46 +1,30 @@ #[inline] -pub unsafe fn CloseHandle(hobject: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseHandle(hobject: HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CloseHandle(hobject : HANDLE) -> BOOL); - CloseHandle(hobject.param().abi()).ok() + CloseHandle(core::mem::transmute(hobject)).ok() } #[inline] -pub unsafe fn CompareObjectHandles(hfirstobjecthandle: P0, hsecondobjecthandle: P1) -> BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CompareObjectHandles(hfirstobjecthandle: HANDLE, hsecondobjecthandle: HANDLE) -> BOOL { windows_targets::link!("api-ms-win-core-handle-l1-1-0.dll" "system" fn CompareObjectHandles(hfirstobjecthandle : HANDLE, hsecondobjecthandle : HANDLE) -> BOOL); - CompareObjectHandles(hfirstobjecthandle.param().abi(), hsecondobjecthandle.param().abi()) + CompareObjectHandles(core::mem::transmute(hfirstobjecthandle), core::mem::transmute(hsecondobjecthandle)) } #[inline] -pub unsafe fn DuplicateHandle(hsourceprocesshandle: P0, hsourcehandle: P1, htargetprocesshandle: P2, lptargethandle: *mut HANDLE, dwdesiredaccess: u32, binherithandle: P5, dwoptions: DUPLICATE_HANDLE_OPTIONS) -> windows_core::Result<()> +pub unsafe fn DuplicateHandle(hsourceprocesshandle: HANDLE, hsourcehandle: HANDLE, htargetprocesshandle: HANDLE, lptargethandle: *mut HANDLE, dwdesiredaccess: u32, binherithandle: P5, dwoptions: DUPLICATE_HANDLE_OPTIONS) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn DuplicateHandle(hsourceprocesshandle : HANDLE, hsourcehandle : HANDLE, htargetprocesshandle : HANDLE, lptargethandle : *mut HANDLE, dwdesiredaccess : u32, binherithandle : BOOL, dwoptions : DUPLICATE_HANDLE_OPTIONS) -> BOOL); - DuplicateHandle(hsourceprocesshandle.param().abi(), hsourcehandle.param().abi(), htargetprocesshandle.param().abi(), core::mem::transmute(lptargethandle), core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), core::mem::transmute(dwoptions)).ok() + DuplicateHandle(core::mem::transmute(hsourceprocesshandle), core::mem::transmute(hsourcehandle), core::mem::transmute(htargetprocesshandle), core::mem::transmute(lptargethandle), core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), core::mem::transmute(dwoptions)).ok() } #[inline] -pub unsafe fn FreeLibrary(hlibmodule: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FreeLibrary(hlibmodule: HMODULE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FreeLibrary(hlibmodule : HMODULE) -> BOOL); - FreeLibrary(hlibmodule.param().abi()).ok() + FreeLibrary(core::mem::transmute(hlibmodule)).ok() } #[inline] -pub unsafe fn GetHandleInformation(hobject: P0, lpdwflags: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetHandleInformation(hobject: HANDLE, lpdwflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetHandleInformation(hobject : HANDLE, lpdwflags : *mut u32) -> BOOL); - GetHandleInformation(hobject.param().abi(), core::mem::transmute(lpdwflags)).ok() + GetHandleInformation(core::mem::transmute(hobject), core::mem::transmute(lpdwflags)).ok() } #[inline] pub unsafe fn GetLastError() -> WIN32_ERROR { @@ -48,37 +32,25 @@ pub unsafe fn GetLastError() -> WIN32_ERROR { GetLastError() } #[inline] -pub unsafe fn GlobalFree(hmem: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalFree(hmem: Option) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn GlobalFree(hmem : HGLOBAL) -> HGLOBAL); - let result__ = GlobalFree(hmem.param().abi()); + let result__ = GlobalFree(core::mem::transmute(hmem.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LocalFree(hmem: P0) -> HLOCAL -where - P0: windows_core::Param, -{ +pub unsafe fn LocalFree(hmem: Option) -> HLOCAL { windows_targets::link!("kernel32.dll" "system" fn LocalFree(hmem : HLOCAL) -> HLOCAL); - LocalFree(hmem.param().abi()) + LocalFree(core::mem::transmute(hmem.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RtlNtStatusToDosError(status: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RtlNtStatusToDosError(status: NTSTATUS) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlNtStatusToDosError(status : NTSTATUS) -> u32); - RtlNtStatusToDosError(status.param().abi()) + RtlNtStatusToDosError(core::mem::transmute(status)) } #[inline] -pub unsafe fn SetHandleInformation(hobject: P0, dwmask: u32, dwflags: HANDLE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetHandleInformation(hobject: HANDLE, dwmask: u32, dwflags: HANDLE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetHandleInformation(hobject : HANDLE, dwmask : u32, dwflags : HANDLE_FLAGS) -> BOOL); - SetHandleInformation(hobject.param().abi(), core::mem::transmute(dwmask), core::mem::transmute(dwflags)).ok() + SetHandleInformation(core::mem::transmute(hobject), core::mem::transmute(dwmask), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn SetLastError(dwerrcode: WIN32_ERROR) { diff --git a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs index 1445208dbc..7b3f91ec04 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 : * mut core::ffi::c_void, policy : * mut core::ffi::c_void, friendlymessage : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - CheckGamingPrivilegeWithUI(core::mem::transmute(privilegeid), core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + CheckGamingPrivilegeWithUI(core::mem::transmute(privilegeid), core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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 : * mut core::ffi::c_void, policy : * mut core::ffi::c_void, friendlymessage : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - CheckGamingPrivilegeWithUIForUser(user.param().abi(), core::mem::transmute(privilegeid), core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + CheckGamingPrivilegeWithUIForUser(user.param().abi(), core::mem::transmute(privilegeid), core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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 : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowChangeFriendRelationshipUI(core::mem::transmute_copy(targetuserxuid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowChangeFriendRelationshipUI(core::mem::transmute_copy(targetuserxuid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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 : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowChangeFriendRelationshipUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowChangeFriendRelationshipUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowCustomizeUserProfileUI(core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowCustomizeUserProfileUIForUser(user.param().abi(), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowFindFriendsUI(core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowFindFriendsUIForUser(user.param().abi(), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(titleid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowGameInfoUI(core::mem::transmute(titleid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(titleid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowGameInfoUIForUser(user.param().abi(), core::mem::transmute(titleid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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 : * mut core::ffi::c_void, sessiontemplatename : * mut core::ffi::c_void, sessionid : * mut core::ffi::c_void, invitationdisplaytext : * mut core::ffi::c_void, 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), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowGameInviteUI(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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 : * mut core::ffi::c_void, sessiontemplatename : * mut core::ffi::c_void, sessionid : * mut core::ffi::c_void, invitationdisplaytext : * mut core::ffi::c_void, 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), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::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), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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 : * mut core::ffi::c_void, sessiontemplatename : * mut core::ffi::c_void, sessionid : * mut core::ffi::c_void, invitationdisplaytext : * mut core::ffi::c_void, customactivationcontext : * mut core::ffi::c_void, 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), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::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), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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,23 @@ 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 : * mut core::ffi::c_void, sessiontemplatename : * mut core::ffi::c_void, sessionid : * mut core::ffi::c_void, invitationdisplaytext : * mut core::ffi::c_void, customactivationcontext : * mut core::ffi::c_void, 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), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::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), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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 : * mut core::ffi::c_void, xuids : *const * mut core::ffi::c_void, xuidscount : usize, preselectedxuids : *const * mut core::ffi::c_void, 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()), core::mem::transmute(minselectioncount), core::mem::transmute(maxselectioncount), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::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()), + core::mem::transmute(minselectioncount), + core::mem::transmute(maxselectioncount), + core::mem::transmute(completionroutine), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), + ) + .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<()> @@ -156,14 +167,14 @@ where core::mem::transmute(minselectioncount), core::mem::transmute(maxselectioncount), core::mem::transmute(completionroutine), - core::mem::transmute(context.unwrap_or(core::ptr::null())), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), ) .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 : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowProfileCardUI(core::mem::transmute_copy(targetuserxuid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowProfileCardUI(core::mem::transmute_copy(targetuserxuid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ShowProfileCardUIForUser(user: P0, targetuserxuid: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -171,12 +182,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 : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowProfileCardUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowProfileCardUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(titleid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowTitleAchievementsUI(core::mem::transmute(titleid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ShowTitleAchievementsUIForUser(user: P0, titleid: u32, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -184,12 +195,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(), core::mem::transmute(titleid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowTitleAchievementsUIForUser(user.param().abi(), core::mem::transmute(titleid), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowUserSettingsUI(core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ShowUserSettingsUIForUser(user: P0, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -197,7 +208,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(), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + ShowUserSettingsUIForUser(user.param().abi(), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn TryCancelPendingGameUI() -> super::Foundation::BOOL { @@ -425,7 +436,7 @@ impl IGameStatistics { (windows_core::Interface::vtable(self).GetCategoryTitle)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(categoryindex), core::mem::transmute(statindex), core::mem::transmute(pname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatistic)(windows_core::Interface::as_raw(self), core::mem::transmute(categoryindex), core::mem::transmute(statindex), core::mem::transmute(pname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetStatistic(&self, categoryindex: u16, statindex: u16, name: P2, value: P3) -> 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 b89bb2b5b8..baf7999ca4 100644 --- a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs @@ -9,13 +9,12 @@ pub unsafe fn CompareStringA(locale: u32, dwcmpflags: u32, lpstring1: &[i8], lps CompareStringA(core::mem::transmute(locale), core::mem::transmute(dwcmpflags), core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap()) } #[inline] -pub unsafe fn CompareStringEx(lplocalename: P0, dwcmpflags: COMPARE_STRING_FLAGS, lpstring1: &[u16], lpstring2: &[u16], lpversioninformation: Option<*const NLSVERSIONINFO>, lpreserved: Option<*const core::ffi::c_void>, lparam: P8) -> COMPARESTRING_RESULT +pub unsafe fn CompareStringEx(lplocalename: P0, dwcmpflags: COMPARE_STRING_FLAGS, lpstring1: &[u16], lpstring2: &[u16], lpversioninformation: Option<*const NLSVERSIONINFO>, lpreserved: Option<*const core::ffi::c_void>, lparam: Option) -> COMPARESTRING_RESULT where P0: windows_core::Param, - P8: 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(), core::mem::transmute(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()) + CompareStringEx(lplocalename.param().abi(), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CompareStringOrdinal(lpstring1: &[u16], lpstring2: &[u16], bignorecase: P4) -> COMPARESTRING_RESULT @@ -56,14 +55,13 @@ pub unsafe fn EnumCalendarInfoExA(lpcalinfoenumprocex: CALINFO_ENUMPROCEXA, loca EnumCalendarInfoExA(core::mem::transmute(lpcalinfoenumprocex), core::mem::transmute(locale), core::mem::transmute(calendar), core::mem::transmute(caltype)).ok() } #[inline] -pub unsafe fn EnumCalendarInfoExEx(pcalinfoenumprocexex: CALINFO_ENUMPROCEXEX, lplocalename: P1, calendar: u32, lpreserved: P3, caltype: u32, lparam: P5) -> windows_core::Result<()> +pub unsafe fn EnumCalendarInfoExEx(pcalinfoenumprocexex: CALINFO_ENUMPROCEXEX, lplocalename: P1, calendar: u32, lpreserved: P3, caltype: u32, lparam: super::Foundation::LPARAM) -> windows_core::Result<()> where P1: windows_core::Param, P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumCalendarInfoExEx(pcalinfoenumprocexex : CALINFO_ENUMPROCEXEX, lplocalename : windows_core::PCWSTR, calendar : u32, lpreserved : windows_core::PCWSTR, caltype : u32, lparam : super::Foundation:: LPARAM) -> super::Foundation:: BOOL); - EnumCalendarInfoExEx(core::mem::transmute(pcalinfoenumprocexex), lplocalename.param().abi(), core::mem::transmute(calendar), lpreserved.param().abi(), core::mem::transmute(caltype), lparam.param().abi()).ok() + EnumCalendarInfoExEx(core::mem::transmute(pcalinfoenumprocexex), lplocalename.param().abi(), core::mem::transmute(calendar), lpreserved.param().abi(), core::mem::transmute(caltype), core::mem::transmute(lparam)).ok() } #[inline] pub unsafe fn EnumCalendarInfoExW(lpcalinfoenumprocex: CALINFO_ENUMPROCEXW, locale: u32, calendar: u32, caltype: u32) -> windows_core::Result<()> { @@ -86,13 +84,12 @@ pub unsafe fn EnumDateFormatsExA(lpdatefmtenumprocex: DATEFMT_ENUMPROCEXA, local EnumDateFormatsExA(core::mem::transmute(lpdatefmtenumprocex), core::mem::transmute(locale), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn EnumDateFormatsExEx(lpdatefmtenumprocexex: DATEFMT_ENUMPROCEXEX, lplocalename: P1, dwflags: ENUM_DATE_FORMATS_FLAGS, lparam: P3) -> windows_core::Result<()> +pub unsafe fn EnumDateFormatsExEx(lpdatefmtenumprocexex: DATEFMT_ENUMPROCEXEX, lplocalename: P1, dwflags: ENUM_DATE_FORMATS_FLAGS, lparam: super::Foundation::LPARAM) -> windows_core::Result<()> where P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumDateFormatsExEx(lpdatefmtenumprocexex : DATEFMT_ENUMPROCEXEX, lplocalename : windows_core::PCWSTR, dwflags : ENUM_DATE_FORMATS_FLAGS, lparam : super::Foundation:: LPARAM) -> super::Foundation:: BOOL); - EnumDateFormatsExEx(core::mem::transmute(lpdatefmtenumprocexex), lplocalename.param().abi(), core::mem::transmute(dwflags), lparam.param().abi()).ok() + EnumDateFormatsExEx(core::mem::transmute(lpdatefmtenumprocexex), lplocalename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lparam)).ok() } #[inline] pub unsafe fn EnumDateFormatsExW(lpdatefmtenumprocex: DATEFMT_ENUMPROCEXW, locale: u32, dwflags: u32) -> windows_core::Result<()> { @@ -130,12 +127,9 @@ pub unsafe fn EnumSystemGeoID(geoclass: u32, parentgeoid: i32, lpgeoenumproc: GE EnumSystemGeoID(core::mem::transmute(geoclass), core::mem::transmute(parentgeoid), core::mem::transmute(lpgeoenumproc)).ok() } #[inline] -pub unsafe fn EnumSystemGeoNames(geoclass: u32, geoenumproc: GEO_ENUMNAMEPROC, data: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn EnumSystemGeoNames(geoclass: u32, geoenumproc: GEO_ENUMNAMEPROC, data: super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn EnumSystemGeoNames(geoclass : u32, geoenumproc : GEO_ENUMNAMEPROC, data : super::Foundation:: LPARAM) -> super::Foundation:: BOOL); - EnumSystemGeoNames(core::mem::transmute(geoclass), core::mem::transmute(geoenumproc), data.param().abi()).ok() + EnumSystemGeoNames(core::mem::transmute(geoclass), core::mem::transmute(geoenumproc), core::mem::transmute(data)).ok() } #[inline] pub unsafe fn EnumSystemLanguageGroupsA(lplanguagegroupenumproc: LANGUAGEGROUP_ENUMPROCA, dwflags: ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam: isize) -> windows_core::Result<()> { @@ -153,12 +147,9 @@ pub unsafe fn EnumSystemLocalesA(lplocaleenumproc: LOCALE_ENUMPROCA, dwflags: u3 EnumSystemLocalesA(core::mem::transmute(lplocaleenumproc), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn EnumSystemLocalesEx(lplocaleenumprocex: LOCALE_ENUMPROCEX, dwflags: u32, lparam: P2, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn EnumSystemLocalesEx(lplocaleenumprocex: LOCALE_ENUMPROCEX, dwflags: u32, lparam: super::Foundation::LPARAM, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(core::mem::transmute(lplocaleenumprocex), core::mem::transmute(dwflags), lparam.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + EnumSystemLocalesEx(core::mem::transmute(lplocaleenumprocex), core::mem::transmute(dwflags), core::mem::transmute(lparam), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn EnumSystemLocalesW(lplocaleenumproc: LOCALE_ENUMPROCW, dwflags: u32) -> windows_core::Result<()> { @@ -171,13 +162,12 @@ pub unsafe fn EnumTimeFormatsA(lptimefmtenumproc: TIMEFMT_ENUMPROCA, locale: u32 EnumTimeFormatsA(core::mem::transmute(lptimefmtenumproc), core::mem::transmute(locale), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn EnumTimeFormatsEx(lptimefmtenumprocex: TIMEFMT_ENUMPROCEX, lplocalename: P1, dwflags: u32, lparam: P3) -> windows_core::Result<()> +pub unsafe fn EnumTimeFormatsEx(lptimefmtenumprocex: TIMEFMT_ENUMPROCEX, lplocalename: P1, dwflags: u32, lparam: super::Foundation::LPARAM) -> windows_core::Result<()> where P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumTimeFormatsEx(lptimefmtenumprocex : TIMEFMT_ENUMPROCEX, lplocalename : windows_core::PCWSTR, dwflags : u32, lparam : super::Foundation:: LPARAM) -> super::Foundation:: BOOL); - EnumTimeFormatsEx(core::mem::transmute(lptimefmtenumprocex), lplocalename.param().abi(), core::mem::transmute(dwflags), lparam.param().abi()).ok() + EnumTimeFormatsEx(core::mem::transmute(lptimefmtenumprocex), lplocalename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lparam)).ok() } #[inline] pub unsafe fn EnumTimeFormatsW(lptimefmtenumproc: TIMEFMT_ENUMPROCW, locale: u32, dwflags: TIME_FORMAT_FLAGS) -> windows_core::Result<()> { @@ -197,16 +187,26 @@ 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(core::mem::transmute(locale), core::mem::transmute(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()))) + FindNLSString(core::mem::transmute(locale), core::mem::transmute(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::mem::zeroed()))) } #[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: P9) -> i32 +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: super::Foundation::LPARAM) -> i32 where P0: windows_core::Param, - P9: 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(), core::mem::transmute(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()) + FindNLSStringEx( + lplocalename.param().abi(), + core::mem::transmute(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::mem::zeroed())), + core::mem::transmute(lpversioninformation.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sorthandle), + ) } #[inline] pub unsafe fn FindStringOrdinal(dwfindstringordinalflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], bignorecase: P5) -> 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(core::mem::transmute(locale), core::mem::transmute(calendar), core::mem::transmute(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()))) + GetCalendarInfoA(core::mem::transmute(locale), core::mem::transmute(calendar), core::mem::transmute(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::mem::zeroed()))) } #[inline] pub unsafe fn GetCalendarInfoEx(lplocalename: P0, calendar: u32, lpreserved: P2, caltype: u32, lpcaldata: Option<&mut [u16]>, lpvalue: Option<*mut u32>) -> i32 @@ -267,12 +267,12 @@ where P2: 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(), core::mem::transmute(calendar), lpreserved.param().abi(), core::mem::transmute(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()))) + GetCalendarInfoEx(lplocalename.param().abi(), core::mem::transmute(calendar), lpreserved.param().abi(), core::mem::transmute(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::mem::zeroed()))) } #[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(core::mem::transmute(locale), core::mem::transmute(calendar), core::mem::transmute(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()))) + GetCalendarInfoW(core::mem::transmute(locale), core::mem::transmute(calendar), core::mem::transmute(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::mem::zeroed()))) } #[inline] pub unsafe fn GetCalendarSupportedDateRange(calendar: u32, lpcalmindatetime: *mut CALDATETIME, lpcalmaxdatetime: *mut CALDATETIME) -> super::Foundation::BOOL { @@ -285,7 +285,7 @@ where P2: 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(core::mem::transmute(locale), core::mem::transmute(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())) + GetCurrencyFormatA(core::mem::transmute(locale), core::mem::transmute(dwflags), lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), 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: P2, lpformat: Option<*const CURRENCYFMTW>, lpcurrencystr: Option<&mut [u16]>) -> i32 @@ -294,7 +294,7 @@ where P2: 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(), core::mem::transmute(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())) + GetCurrencyFormatEx(lplocalename.param().abi(), core::mem::transmute(dwflags), lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), 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: P2, lpformat: Option<*const CURRENCYFMTW>, lpcurrencystr: Option<&mut [u16]>) -> i32 @@ -302,7 +302,7 @@ where P2: 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(core::mem::transmute(locale), core::mem::transmute(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())) + GetCurrencyFormatW(core::mem::transmute(locale), core::mem::transmute(dwflags), lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), 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: P3, lpdatestr: Option<&mut [u8]>) -> i32 @@ -310,7 +310,7 @@ where P3: 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(core::mem::transmute(locale), core::mem::transmute(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())) + GetDateFormatA(core::mem::transmute(locale), core::mem::transmute(dwflags), core::mem::transmute(lpdate.unwrap_or(core::mem::zeroed())), 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: P3, lpdatestr: Option<&mut [u16]>, lpcalendar: P6) -> i32 @@ -320,7 +320,7 @@ where P6: 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(), core::mem::transmute(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()) + GetDateFormatEx(lplocalename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpdate.unwrap_or(core::mem::zeroed())), 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: P3, lpdatestr: Option<&mut [u16]>) -> i32 @@ -328,7 +328,7 @@ where P3: 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(core::mem::transmute(locale), core::mem::transmute(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())) + GetDateFormatW(core::mem::transmute(locale), core::mem::transmute(dwflags), core::mem::transmute(lpdate.unwrap_or(core::mem::zeroed())), 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 P4: 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(core::mem::transmute(locale), core::mem::transmute(dwflags), core::mem::transmute(lpduration.unwrap_or(core::ptr::null())), core::mem::transmute(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(core::mem::transmute(locale), core::mem::transmute(dwflags), core::mem::transmute(lpduration.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P4, lpdurationstr: Option<&mut [u16]>) -> i32 @@ -355,7 +355,7 @@ where P4: 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(), core::mem::transmute(dwflags), core::mem::transmute(lpduration.unwrap_or(core::ptr::null())), core::mem::transmute(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(), core::mem::transmute(dwflags), core::mem::transmute(lpduration.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P1, pfilemuiinfo: Option<*mut FILEMUIINFO>, pcbfilemuiinfo: *mut u32) -> windows_core::Result<()> @@ -363,15 +363,15 @@ where P1: 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(core::mem::transmute(dwflags), pcwszfilepath.param().abi(), core::mem::transmute(pfilemuiinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbfilemuiinfo)).ok() + GetFileMUIInfo(core::mem::transmute(dwflags), pcwszfilepath.param().abi(), core::mem::transmute(pfilemuiinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbfilemuiinfo)).ok() } #[inline] -pub unsafe fn GetFileMUIPath(dwflags: u32, pcwszfilepath: P1, pwszlanguage: windows_core::PWSTR, pcchlanguage: *mut u32, pwszfilemuipath: windows_core::PWSTR, pcchfilemuipath: *mut u32, pululenumerator: *mut u64) -> windows_core::Result<()> +pub unsafe fn GetFileMUIPath(dwflags: u32, pcwszfilepath: P1, pwszlanguage: Option, pcchlanguage: *mut u32, pwszfilemuipath: Option, pcchfilemuipath: *mut u32, pululenumerator: *mut u64) -> windows_core::Result<()> where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFileMUIPath(dwflags : u32, pcwszfilepath : windows_core::PCWSTR, pwszlanguage : windows_core::PWSTR, pcchlanguage : *mut u32, pwszfilemuipath : windows_core::PWSTR, pcchfilemuipath : *mut u32, pululenumerator : *mut u64) -> super::Foundation:: BOOL); - GetFileMUIPath(core::mem::transmute(dwflags), pcwszfilepath.param().abi(), core::mem::transmute(pwszlanguage), core::mem::transmute(pcchlanguage), core::mem::transmute(pwszfilemuipath), core::mem::transmute(pcchfilemuipath), core::mem::transmute(pululenumerator)).ok() + GetFileMUIPath(core::mem::transmute(dwflags), pcwszfilepath.param().abi(), core::mem::transmute(pwszlanguage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguage), core::mem::transmute(pwszfilemuipath.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchfilemuipath), core::mem::transmute(pululenumerator)).ok() } #[inline] pub unsafe fn GetGeoInfoA(location: i32, geotype: SYSGEOTYPE, lpgeodata: Option<&mut [u8]>, langid: u16) -> i32 { @@ -428,7 +428,7 @@ where P2: 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(core::mem::transmute(locale), core::mem::transmute(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())) + GetNumberFormatA(core::mem::transmute(locale), core::mem::transmute(dwflags), lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), 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: P2, lpformat: Option<*const NUMBERFMTW>, lpnumberstr: Option<&mut [u16]>) -> i32 @@ -437,7 +437,7 @@ where P2: 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(), core::mem::transmute(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())) + GetNumberFormatEx(lplocalename.param().abi(), core::mem::transmute(dwflags), lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), 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: P2, lpformat: Option<*const NUMBERFMTW>, lpnumberstr: Option<&mut [u16]>) -> i32 @@ -445,7 +445,7 @@ where P2: 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(core::mem::transmute(locale), core::mem::transmute(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())) + GetNumberFormatW(core::mem::transmute(locale), core::mem::transmute(dwflags), lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), 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 { @@ -453,9 +453,9 @@ pub unsafe fn GetOEMCP() -> u32 { GetOEMCP() } #[inline] -pub unsafe fn GetProcessPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetProcessPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: Option, pcchlanguagesbuffer: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : windows_core::PWSTR, pcchlanguagesbuffer : *mut u32) -> super::Foundation:: BOOL); - GetProcessPreferredUILanguages(core::mem::transmute(dwflags), core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer), core::mem::transmute(pcchlanguagesbuffer)).ok() + GetProcessPreferredUILanguages(core::mem::transmute(dwflags), core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguagesbuffer)).ok() } #[inline] pub unsafe fn GetStringScripts(dwflags: u32, lpstring: P1, cchstring: i32, lpscripts: Option<&mut [u16]>) -> i32 @@ -512,27 +512,21 @@ pub unsafe fn GetSystemDefaultUILanguage() -> u16 { GetSystemDefaultUILanguage() } #[inline] -pub unsafe fn GetSystemPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetSystemPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: Option, pcchlanguagesbuffer: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetSystemPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : windows_core::PWSTR, pcchlanguagesbuffer : *mut u32) -> super::Foundation:: BOOL); - GetSystemPreferredUILanguages(core::mem::transmute(dwflags), core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer), core::mem::transmute(pcchlanguagesbuffer)).ok() + GetSystemPreferredUILanguages(core::mem::transmute(dwflags), core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguagesbuffer)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetTextCharset(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextCharset(hdc: super::Graphics::Gdi::HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetTextCharset(hdc : super::Graphics::Gdi:: HDC) -> i32); - GetTextCharset(hdc.param().abi()) + GetTextCharset(core::mem::transmute(hdc)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetTextCharsetInfo(hdc: P0, lpsig: Option<*mut FONTSIGNATURE>, dwflags: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextCharsetInfo(hdc: super::Graphics::Gdi::HDC, lpsig: Option<*mut FONTSIGNATURE>, dwflags: u32) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(dwflags)) + GetTextCharsetInfo(core::mem::transmute(hdc), core::mem::transmute(lpsig.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn GetThreadLocale() -> u32 { @@ -540,9 +534,9 @@ pub unsafe fn GetThreadLocale() -> u32 { GetThreadLocale() } #[inline] -pub unsafe fn GetThreadPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetThreadPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: Option, pcchlanguagesbuffer: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetThreadPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : windows_core::PWSTR, pcchlanguagesbuffer : *mut u32) -> super::Foundation:: BOOL); - GetThreadPreferredUILanguages(core::mem::transmute(dwflags), core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer), core::mem::transmute(pcchlanguagesbuffer)).ok() + GetThreadPreferredUILanguages(core::mem::transmute(dwflags), core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguagesbuffer)).ok() } #[inline] pub unsafe fn GetThreadUILanguage() -> u16 { @@ -555,7 +549,7 @@ where P3: 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(core::mem::transmute(locale), core::mem::transmute(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())) + GetTimeFormatA(core::mem::transmute(locale), core::mem::transmute(dwflags), core::mem::transmute(lptime.unwrap_or(core::mem::zeroed())), 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: P3, lptimestr: Option<&mut [u16]>) -> i32 @@ -564,7 +558,7 @@ where P3: 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(), core::mem::transmute(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())) + GetTimeFormatEx(lplocalename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lptime.unwrap_or(core::mem::zeroed())), 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: P3, lptimestr: Option<&mut [u16]>) -> i32 @@ -572,15 +566,15 @@ where P3: 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(core::mem::transmute(locale), core::mem::transmute(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())) + GetTimeFormatW(core::mem::transmute(locale), core::mem::transmute(dwflags), core::mem::transmute(lptime.unwrap_or(core::mem::zeroed())), 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: P1, pwszfallbacklanguages: windows_core::PWSTR, pcchfallbacklanguages: Option<*mut u32>, pattributes: *mut u32) -> windows_core::Result<()> +pub unsafe fn GetUILanguageInfo(dwflags: u32, pwmszlanguage: P1, pwszfallbacklanguages: Option, pcchfallbacklanguages: Option<*mut u32>, pattributes: *mut u32) -> windows_core::Result<()> where P1: 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(core::mem::transmute(dwflags), pwmszlanguage.param().abi(), core::mem::transmute(pwszfallbacklanguages), core::mem::transmute(pcchfallbacklanguages.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pattributes)).ok() + GetUILanguageInfo(core::mem::transmute(dwflags), pwmszlanguage.param().abi(), core::mem::transmute(pwszfallbacklanguages.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchfallbacklanguages.unwrap_or(core::mem::zeroed())), core::mem::transmute(pattributes)).ok() } #[inline] pub unsafe fn GetUserDefaultGeoName(geoname: &mut [u16]) -> i32 { @@ -613,9 +607,9 @@ pub unsafe fn GetUserGeoID(geoclass: SYSGEOCLASS) -> i32 { GetUserGeoID(core::mem::transmute(geoclass)) } #[inline] -pub unsafe fn GetUserPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetUserPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: Option, pcchlanguagesbuffer: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetUserPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : windows_core::PWSTR, pcchlanguagesbuffer : *mut u32) -> super::Foundation:: BOOL); - GetUserPreferredUILanguages(core::mem::transmute(dwflags), core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer), core::mem::transmute(pcchlanguagesbuffer)).ok() + GetUserPreferredUILanguages(core::mem::transmute(dwflags), core::mem::transmute(pulnumlanguages), core::mem::transmute(pwszlanguagesbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlanguagesbuffer)).ok() } #[inline] pub unsafe fn IdnToAscii(dwflags: u32, lpunicodecharstr: &[u16], lpasciicharstr: Option<&mut [u16]>) -> i32 { @@ -660,7 +654,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(core::mem::transmute(lpv), core::mem::transmute(isize), core::mem::transmute(lpiresult.unwrap_or(core::ptr::null_mut()))) + IsTextUnicode(core::mem::transmute(lpv), core::mem::transmute(isize), core::mem::transmute(lpiresult.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn IsValidCodePage(codepage: u32) -> super::Foundation::BOOL { @@ -707,23 +701,22 @@ pub unsafe fn LCIDToLocaleName(locale: u32, lpname: Option<&mut [u16]>, dwflags: LCIDToLocaleName(core::mem::transmute(locale), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn LCMapStringA(locale: u32, dwmapflags: u32, lpsrcstr: &[u8], lpdeststr: windows_core::PSTR, cchdest: i32) -> i32 { +pub unsafe fn LCMapStringA(locale: u32, dwmapflags: u32, lpsrcstr: &[u8], lpdeststr: Option, cchdest: i32) -> i32 { windows_targets::link!("kernel32.dll" "system" fn LCMapStringA(locale : u32, dwmapflags : u32, lpsrcstr : windows_core::PCSTR, cchsrc : i32, lpdeststr : windows_core::PSTR, cchdest : i32) -> i32); - LCMapStringA(core::mem::transmute(locale), core::mem::transmute(dwmapflags), core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr), core::mem::transmute(cchdest)) + LCMapStringA(core::mem::transmute(locale), core::mem::transmute(dwmapflags), core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchdest)) } #[inline] -pub unsafe fn LCMapStringEx(lplocalename: P0, dwmapflags: u32, lpsrcstr: &[u16], lpdeststr: Option<&mut [u16]>, lpversioninformation: Option<*const NLSVERSIONINFO>, lpreserved: Option<*const core::ffi::c_void>, sorthandle: P8) -> i32 +pub unsafe fn LCMapStringEx(lplocalename: P0, dwmapflags: u32, lpsrcstr: &[u16], lpdeststr: Option<&mut [u16]>, lpversioninformation: Option<*const NLSVERSIONINFO>, lpreserved: Option<*const core::ffi::c_void>, sorthandle: super::Foundation::LPARAM) -> i32 where P0: windows_core::Param, - P8: 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(), core::mem::transmute(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()) + LCMapStringEx(lplocalename.param().abi(), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(sorthandle)) } #[inline] -pub unsafe fn LCMapStringW(locale: u32, dwmapflags: u32, lpsrcstr: &[u16], lpdeststr: windows_core::PWSTR, cchdest: i32) -> i32 { +pub unsafe fn LCMapStringW(locale: u32, dwmapflags: u32, lpsrcstr: &[u16], lpdeststr: Option, cchdest: i32) -> i32 { windows_targets::link!("kernel32.dll" "system" fn LCMapStringW(locale : u32, dwmapflags : u32, lpsrcstr : windows_core::PCWSTR, cchsrc : i32, lpdeststr : windows_core::PWSTR, cchdest : i32) -> i32); - LCMapStringW(core::mem::transmute(locale), core::mem::transmute(dwmapflags), core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr), core::mem::transmute(cchdest)) + LCMapStringW(core::mem::transmute(locale), core::mem::transmute(dwmapflags), core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchdest)) } #[inline] pub unsafe fn LocaleNameToLCID(lpname: P0, dwflags: u32) -> u32 @@ -754,12 +747,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(core::ptr::null())), core::mem::transmute(prgservices), core::mem::transmute(pdwservicescount)).ok() + MappingGetServices(core::mem::transmute(poptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(prgservices), core::mem::transmute(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(core::mem::transmute(pserviceinfo), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(dwindex), core::mem::transmute(poptions.unwrap_or(core::ptr::null())), core::mem::transmute(pbag)).ok() + MappingRecognizeText(core::mem::transmute(pserviceinfo), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(dwindex), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbag)).ok() } #[inline] pub unsafe fn MultiByteToWideChar(codepage: u32, dwflags: MULTI_BYTE_TO_WIDE_CHAR_FLAGS, lpmultibytestr: &[u8], lpwidecharstr: Option<&mut [u16]>) -> i32 { @@ -772,13 +765,13 @@ pub unsafe fn NormalizeString(normform: NORM_FORM, lpsrcstring: &[u16], lpdststr NormalizeString(core::mem::transmute(normform), core::mem::transmute(lpsrcstring.as_ptr()), lpsrcstring.len().try_into().unwrap(), core::mem::transmute(lpdststring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdststring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn NotifyUILanguageChange(dwflags: u32, pcwstrnewlanguage: P1, pcwstrpreviouslanguage: P2, dwreserved: u32, pdwstatusrtrn: Option<*mut u32>) -> super::Foundation::BOOL +pub unsafe fn NotifyUILanguageChange(dwflags: u32, pcwstrnewlanguage: P1, pcwstrpreviouslanguage: P2, dwreserved: Option, pdwstatusrtrn: Option<*mut u32>) -> super::Foundation::BOOL where P1: windows_core::Param, P2: 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(core::mem::transmute(dwflags), pcwstrnewlanguage.param().abi(), pcwstrpreviouslanguage.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(pdwstatusrtrn.unwrap_or(core::ptr::null_mut()))) + NotifyUILanguageChange(core::mem::transmute(dwflags), pcwstrnewlanguage.param().abi(), pcwstrpreviouslanguage.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwstatusrtrn.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ResolveLocaleName(lpnametoresolve: P0, lplocalename: Option<&mut [u16]>) -> i32 @@ -789,12 +782,9 @@ where ResolveLocaleName(lpnametoresolve.param().abi(), core::mem::transmute(lplocalename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lplocalename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn RestoreThreadPreferredUILanguages(snapshot: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn RestoreThreadPreferredUILanguages(snapshot: HSAVEDUILANGUAGES) { windows_targets::link!("kernel32.dll" "system" fn RestoreThreadPreferredUILanguages(snapshot : HSAVEDUILANGUAGES)); - RestoreThreadPreferredUILanguages(snapshot.param().abi()) + RestoreThreadPreferredUILanguages(core::mem::transmute(snapshot)) } #[inline] pub unsafe fn ScriptApplyDigitSubstitution(psds: *const SCRIPT_DIGITSUBSTITUTE, psc: *mut SCRIPT_CONTROL, pss: *mut SCRIPT_STATE) -> windows_core::Result<()> { @@ -805,7 +795,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(core::mem::transmute(pidx), core::mem::transmute(cchars), core::mem::transmute(cglyphs), core::mem::transmute(pwlogclust), core::mem::transmute(psva), core::mem::transmute(piadvance), core::mem::transmute(psa), core::mem::transmute(pabc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pijustify)).ok() + ScriptApplyLogicalWidth(core::mem::transmute(pidx), core::mem::transmute(cchars), core::mem::transmute(cglyphs), core::mem::transmute(pwlogclust), core::mem::transmute(psva), core::mem::transmute(piadvance), core::mem::transmute(psa), core::mem::transmute(pabc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pijustify)).ok() } #[inline] pub unsafe fn ScriptBreak(pwcchars: P0, cchars: i32, psa: *const SCRIPT_ANALYSIS) -> windows_core::Result @@ -826,12 +816,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptCacheGetHeight(hdc: P0, psc: *mut *mut core::ffi::c_void, tmheight: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptCacheGetHeight(hdc: super::Graphics::Gdi::HDC, psc: *mut *mut core::ffi::c_void, tmheight: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptCacheGetHeight(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, tmheight : *mut i32) -> windows_core::HRESULT); - ScriptCacheGetHeight(hdc.param().abi(), core::mem::transmute(psc), core::mem::transmute(tmheight)).ok() + ScriptCacheGetHeight(core::mem::transmute(hdc), core::mem::transmute(psc), core::mem::transmute(tmheight)).ok() } #[inline] pub unsafe fn ScriptFreeCache(psc: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -840,67 +827,48 @@ pub unsafe fn ScriptFreeCache(psc: *mut *mut core::ffi::c_void) -> windows_core: } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptGetCMap(hdc: P0, psc: *mut *mut core::ffi::c_void, pwcinchars: P2, cchars: i32, dwflags: u32, pwoutglyphs: *mut u16) -> windows_core::Result<()> +pub unsafe fn ScriptGetCMap(hdc: super::Graphics::Gdi::HDC, psc: *mut *mut core::ffi::c_void, pwcinchars: P2, cchars: i32, dwflags: u32, pwoutglyphs: *mut u16) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptGetCMap(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, pwcinchars : windows_core::PCWSTR, cchars : i32, dwflags : u32, pwoutglyphs : *mut u16) -> windows_core::HRESULT); - ScriptGetCMap(hdc.param().abi(), core::mem::transmute(psc), pwcinchars.param().abi(), core::mem::transmute(cchars), core::mem::transmute(dwflags), core::mem::transmute(pwoutglyphs)).ok() + ScriptGetCMap(core::mem::transmute(hdc), core::mem::transmute(psc), pwcinchars.param().abi(), core::mem::transmute(cchars), core::mem::transmute(dwflags), core::mem::transmute(pwoutglyphs)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptGetFontAlternateGlyphs(hdc: P0, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, tagscript: u32, taglangsys: u32, tagfeature: u32, wglyphid: u16, palternateglyphs: &mut [u16], pcalternates: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptGetFontAlternateGlyphs(hdc: Option, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, tagscript: u32, taglangsys: u32, tagfeature: u32, wglyphid: u16, palternateglyphs: &mut [u16], pcalternates: *mut i32) -> windows_core::Result<()> { 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(), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::ptr::null())), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), core::mem::transmute(tagfeature), core::mem::transmute(wglyphid), palternateglyphs.len().try_into().unwrap(), core::mem::transmute(palternateglyphs.as_ptr()), core::mem::transmute(pcalternates)).ok() + ScriptGetFontAlternateGlyphs(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), core::mem::transmute(tagfeature), core::mem::transmute(wglyphid), palternateglyphs.len().try_into().unwrap(), core::mem::transmute(palternateglyphs.as_ptr()), core::mem::transmute(pcalternates)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptGetFontFeatureTags(hdc: P0, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, tagscript: u32, taglangsys: u32, pfeaturetags: &mut [u32], pctags: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptGetFontFeatureTags(hdc: Option, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, tagscript: u32, taglangsys: u32, pfeaturetags: &mut [u32], pctags: *mut i32) -> windows_core::Result<()> { 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(), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::ptr::null())), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), pfeaturetags.len().try_into().unwrap(), core::mem::transmute(pfeaturetags.as_ptr()), core::mem::transmute(pctags)).ok() + ScriptGetFontFeatureTags(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), pfeaturetags.len().try_into().unwrap(), core::mem::transmute(pfeaturetags.as_ptr()), core::mem::transmute(pctags)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptGetFontLanguageTags(hdc: P0, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, tagscript: u32, plangsystags: &mut [u32], pctags: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptGetFontLanguageTags(hdc: Option, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, tagscript: u32, plangsystags: &mut [u32], pctags: *mut i32) -> windows_core::Result<()> { 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(), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::ptr::null())), core::mem::transmute(tagscript), plangsystags.len().try_into().unwrap(), core::mem::transmute(plangsystags.as_ptr()), core::mem::transmute(pctags)).ok() + ScriptGetFontLanguageTags(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), core::mem::transmute(tagscript), plangsystags.len().try_into().unwrap(), core::mem::transmute(plangsystags.as_ptr()), core::mem::transmute(pctags)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptGetFontProperties(hdc: P0, psc: *mut *mut core::ffi::c_void, sfp: *mut SCRIPT_FONTPROPERTIES) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptGetFontProperties(hdc: super::Graphics::Gdi::HDC, psc: *mut *mut core::ffi::c_void, sfp: *mut SCRIPT_FONTPROPERTIES) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptGetFontProperties(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, sfp : *mut SCRIPT_FONTPROPERTIES) -> windows_core::HRESULT); - ScriptGetFontProperties(hdc.param().abi(), core::mem::transmute(psc), core::mem::transmute(sfp)).ok() + ScriptGetFontProperties(core::mem::transmute(hdc), core::mem::transmute(psc), core::mem::transmute(sfp)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptGetFontScriptTags(hdc: P0, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, pscripttags: &mut [u32], pctags: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptGetFontScriptTags(hdc: Option, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, pscripttags: &mut [u32], pctags: *mut i32) -> windows_core::Result<()> { 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(), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::ptr::null())), pscripttags.len().try_into().unwrap(), core::mem::transmute(pscripttags.as_ptr()), core::mem::transmute(pctags)).ok() + ScriptGetFontScriptTags(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), pscripttags.len().try_into().unwrap(), core::mem::transmute(pscripttags.as_ptr()), core::mem::transmute(pctags)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptGetGlyphABCWidth(hdc: P0, psc: *mut *mut core::ffi::c_void, wglyph: u16, pabc: *mut super::Graphics::Gdi::ABC) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptGetGlyphABCWidth(hdc: super::Graphics::Gdi::HDC, psc: *mut *mut core::ffi::c_void, wglyph: u16, pabc: *mut super::Graphics::Gdi::ABC) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptGetGlyphABCWidth(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, wglyph : u16, pabc : *mut super::Graphics::Gdi:: ABC) -> windows_core::HRESULT); - ScriptGetGlyphABCWidth(hdc.param().abi(), core::mem::transmute(psc), core::mem::transmute(wglyph), core::mem::transmute(pabc)).ok() + ScriptGetGlyphABCWidth(core::mem::transmute(hdc), core::mem::transmute(psc), core::mem::transmute(wglyph), core::mem::transmute(pabc)).ok() } #[inline] pub unsafe fn ScriptGetLogicalWidths(psa: *const SCRIPT_ANALYSIS, cchars: i32, cglyphs: i32, piglyphwidth: *const i32, pwlogclust: *const u16, psva: *const SCRIPT_VISATTR, pidx: *const i32) -> windows_core::Result<()> { @@ -920,12 +888,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(core::ptr::null())), core::mem::transmute(psstate.unwrap_or(core::ptr::null())), core::mem::transmute(pitems.as_ptr()), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(psstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(pitems.as_ptr()), core::mem::transmute(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(), core::mem::transmute(cmaxitems), core::mem::transmute(pscontrol.unwrap_or(core::ptr::null())), core::mem::transmute(psstate.unwrap_or(core::ptr::null())), core::mem::transmute(pitems), core::mem::transmute(pscripttags), core::mem::transmute(pcitems)).ok() + ScriptItemizeOpenType(core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), core::mem::transmute(cmaxitems), core::mem::transmute(pscontrol.unwrap_or(core::mem::zeroed())), core::mem::transmute(psstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(pitems), core::mem::transmute(pscripttags), core::mem::transmute(pcitems)).ok() } #[inline] pub unsafe fn ScriptJustify(psva: *const SCRIPT_VISATTR, piadvance: *const i32, cglyphs: i32, idx: i32, iminkashida: i32) -> windows_core::Result { @@ -936,33 +904,29 @@ 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(core::mem::transmute(cruns), core::mem::transmute(pblevel), core::mem::transmute(pivisualtological.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pilogicaltovisual.unwrap_or(core::ptr::null_mut()))).ok() + ScriptLayout(core::mem::transmute(cruns), core::mem::transmute(pblevel), core::mem::transmute(pivisualtological.unwrap_or(core::mem::zeroed())), core::mem::transmute(pilogicaltovisual.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptPlace(hdc: P0, psc: *mut *mut core::ffi::c_void, pwglyphs: *const u16, cglyphs: i32, psva: *const SCRIPT_VISATTR, psa: *mut SCRIPT_ANALYSIS, piadvance: *mut i32, pgoffset: Option<*mut GOFFSET>, pabc: *mut super::Graphics::Gdi::ABC) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut GOFFSET>, pabc: *mut super::Graphics::Gdi::ABC) -> windows_core::Result<()> { 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(), core::mem::transmute(psc), core::mem::transmute(pwglyphs), core::mem::transmute(cglyphs), core::mem::transmute(psva), core::mem::transmute(psa), core::mem::transmute(piadvance), core::mem::transmute(pgoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pabc)).ok() + ScriptPlace(core::mem::transmute(hdc), core::mem::transmute(psc), core::mem::transmute(pwglyphs), core::mem::transmute(cglyphs), core::mem::transmute(psva), core::mem::transmute(psa), core::mem::transmute(piadvance), core::mem::transmute(pgoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(pabc)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptPlaceOpenType(hdc: P0, psc: *mut *mut core::ffi::c_void, psa: *mut SCRIPT_ANALYSIS, tagscript: u32, taglangsys: u32, rcrangechars: Option<*const i32>, rprangeproperties: Option<*const *const TEXTRANGE_PROPERTIES>, cranges: i32, pwcchars: P8, 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: Option<*mut super::Graphics::Gdi::ABC>) -> windows_core::Result<()> +pub unsafe fn ScriptPlaceOpenType(hdc: Option, psc: *mut *mut core::ffi::c_void, psa: *mut SCRIPT_ANALYSIS, tagscript: u32, taglangsys: u32, rcrangechars: Option<*const i32>, rprangeproperties: Option<*const *const TEXTRANGE_PROPERTIES>, cranges: i32, pwcchars: P8, 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: Option<*mut super::Graphics::Gdi::ABC>) -> windows_core::Result<()> where - P0: windows_core::Param, P8: 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(), + core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), - core::mem::transmute(rcrangechars.unwrap_or(core::ptr::null())), - core::mem::transmute(rprangeproperties.unwrap_or(core::ptr::null())), + core::mem::transmute(rcrangechars.unwrap_or(core::mem::zeroed())), + core::mem::transmute(rprangeproperties.unwrap_or(core::mem::zeroed())), core::mem::transmute(cranges), pwcchars.param().abi(), core::mem::transmute(pwlogclust), @@ -973,18 +937,15 @@ where core::mem::transmute(cglyphs), core::mem::transmute(piadvance), core::mem::transmute(pgoffset), - core::mem::transmute(pabc.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pabc.unwrap_or(core::mem::zeroed())), ) .ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptPositionSingleGlyph(hdc: P0, psc: *mut *mut core::ffi::c_void, psa: Option<*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::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptPositionSingleGlyph(hdc: Option, psc: *mut *mut core::ffi::c_void, psa: Option<*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::Result<()> { 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(), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::ptr::null())), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), core::mem::transmute(tagfeature), core::mem::transmute(lparameter), core::mem::transmute(wglyphid), core::mem::transmute(iadvance), core::mem::transmute(goffset), core::mem::transmute(pioutadvance), core::mem::transmute(poutgoffset)).ok() + ScriptPositionSingleGlyph(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), core::mem::transmute(tagfeature), core::mem::transmute(lparameter), core::mem::transmute(wglyphid), core::mem::transmute(iadvance), core::mem::transmute(goffset), core::mem::transmute(pioutadvance), core::mem::transmute(poutgoffset)).ok() } #[inline] pub unsafe fn ScriptRecordDigitSubstitution(locale: u32) -> windows_core::Result { @@ -994,30 +955,28 @@ pub unsafe fn ScriptRecordDigitSubstitution(locale: u32) -> windows_core::Result } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptShape(hdc: P0, psc: *mut *mut core::ffi::c_void, pwcchars: P2, cchars: i32, cmaxglyphs: i32, psa: *mut SCRIPT_ANALYSIS, pwoutglyphs: *mut u16, pwlogclust: *mut u16, psva: *mut SCRIPT_VISATTR, pcglyphs: *mut i32) -> windows_core::Result<()> +pub unsafe fn ScriptShape(hdc: super::Graphics::Gdi::HDC, psc: *mut *mut core::ffi::c_void, pwcchars: P2, cchars: i32, cmaxglyphs: i32, psa: *mut SCRIPT_ANALYSIS, pwoutglyphs: *mut u16, pwlogclust: *mut u16, psva: *mut SCRIPT_VISATTR, pcglyphs: *mut i32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptShape(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, pwcchars : windows_core::PCWSTR, cchars : i32, cmaxglyphs : i32, psa : *mut SCRIPT_ANALYSIS, pwoutglyphs : *mut u16, pwlogclust : *mut u16, psva : *mut SCRIPT_VISATTR, pcglyphs : *mut i32) -> windows_core::HRESULT); - ScriptShape(hdc.param().abi(), core::mem::transmute(psc), pwcchars.param().abi(), core::mem::transmute(cchars), core::mem::transmute(cmaxglyphs), core::mem::transmute(psa), core::mem::transmute(pwoutglyphs), core::mem::transmute(pwlogclust), core::mem::transmute(psva), core::mem::transmute(pcglyphs)).ok() + ScriptShape(core::mem::transmute(hdc), core::mem::transmute(psc), pwcchars.param().abi(), core::mem::transmute(cchars), core::mem::transmute(cmaxglyphs), core::mem::transmute(psa), core::mem::transmute(pwoutglyphs), core::mem::transmute(pwlogclust), core::mem::transmute(psva), core::mem::transmute(pcglyphs)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptShapeOpenType(hdc: P0, psc: *mut *mut core::ffi::c_void, psa: *mut SCRIPT_ANALYSIS, tagscript: u32, taglangsys: u32, rcrangechars: Option<*const i32>, rprangeproperties: Option<*const *const TEXTRANGE_PROPERTIES>, cranges: i32, pwcchars: P8, cchars: i32, cmaxglyphs: i32, pwlogclust: *mut u16, pcharprops: *mut SCRIPT_CHARPROP, pwoutglyphs: *mut u16, poutglyphprops: *mut SCRIPT_GLYPHPROP, pcglyphs: *mut i32) -> windows_core::Result<()> +pub unsafe fn ScriptShapeOpenType(hdc: Option, psc: *mut *mut core::ffi::c_void, psa: *mut SCRIPT_ANALYSIS, tagscript: u32, taglangsys: u32, rcrangechars: Option<*const i32>, rprangeproperties: Option<*const *const TEXTRANGE_PROPERTIES>, cranges: i32, pwcchars: P8, cchars: i32, cmaxglyphs: i32, pwlogclust: *mut u16, pcharprops: *mut SCRIPT_CHARPROP, pwoutglyphs: *mut u16, poutglyphprops: *mut SCRIPT_GLYPHPROP, pcglyphs: *mut i32) -> windows_core::Result<()> where - P0: windows_core::Param, P8: 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(), + core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), - core::mem::transmute(rcrangechars.unwrap_or(core::ptr::null())), - core::mem::transmute(rprangeproperties.unwrap_or(core::ptr::null())), + core::mem::transmute(rcrangechars.unwrap_or(core::mem::zeroed())), + core::mem::transmute(rprangeproperties.unwrap_or(core::mem::zeroed())), core::mem::transmute(cranges), pwcchars.param().abi(), core::mem::transmute(cchars), @@ -1032,23 +991,20 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptStringAnalyse(hdc: P0, pstring: *const core::ffi::c_void, cstring: i32, cglyphs: i32, icharset: i32, dwflags: u32, ireqwidth: i32, pscontrol: Option<*const SCRIPT_CONTROL>, psstate: Option<*const SCRIPT_STATE>, pidx: Option<*const i32>, ptabdef: Option<*const SCRIPT_TABDEF>, pbinclass: *const u8, pssa: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptStringAnalyse(hdc: super::Graphics::Gdi::HDC, pstring: *const core::ffi::c_void, cstring: i32, cglyphs: i32, icharset: i32, dwflags: u32, ireqwidth: i32, pscontrol: Option<*const SCRIPT_CONTROL>, psstate: Option<*const SCRIPT_STATE>, pidx: Option<*const i32>, ptabdef: Option<*const SCRIPT_TABDEF>, pbinclass: *const u8, pssa: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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(), + core::mem::transmute(hdc), core::mem::transmute(pstring), core::mem::transmute(cstring), core::mem::transmute(cglyphs), core::mem::transmute(icharset), core::mem::transmute(dwflags), core::mem::transmute(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())), + core::mem::transmute(pscontrol.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psstate.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pidx.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ptabdef.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbinclass), core::mem::transmute(pssa), ) @@ -1085,7 +1041,7 @@ where P7: 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(core::mem::transmute(ssa), core::mem::transmute(ix), core::mem::transmute(iy), core::mem::transmute(uoptions), core::mem::transmute(prc.unwrap_or(core::ptr::null())), core::mem::transmute(iminsel), core::mem::transmute(imaxsel), fdisabled.param().abi()).ok() + ScriptStringOut(core::mem::transmute(ssa), core::mem::transmute(ix), core::mem::transmute(iy), core::mem::transmute(uoptions), core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), core::mem::transmute(iminsel), core::mem::transmute(imaxsel), fdisabled.param().abi()).ok() } #[inline] pub unsafe fn ScriptStringValidate(ssa: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1114,22 +1070,34 @@ pub unsafe fn ScriptString_pcOutChars(ssa: *const core::ffi::c_void) -> *mut i32 } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptSubstituteSingleGlyph(hdc: P0, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, tagscript: u32, taglangsys: u32, tagfeature: u32, lparameter: i32, wglyphid: u16, pwoutglyphid: *mut u16) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScriptSubstituteSingleGlyph(hdc: Option, psc: *mut *mut core::ffi::c_void, psa: Option<*const SCRIPT_ANALYSIS>, tagscript: u32, taglangsys: u32, tagfeature: u32, lparameter: i32, wglyphid: u16, pwoutglyphid: *mut u16) -> windows_core::Result<()> { 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(), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::ptr::null())), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), core::mem::transmute(tagfeature), core::mem::transmute(lparameter), core::mem::transmute(wglyphid), core::mem::transmute(pwoutglyphid)).ok() + ScriptSubstituteSingleGlyph(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(psc), core::mem::transmute(psa.unwrap_or(core::mem::zeroed())), core::mem::transmute(tagscript), core::mem::transmute(taglangsys), core::mem::transmute(tagfeature), core::mem::transmute(lparameter), core::mem::transmute(wglyphid), core::mem::transmute(pwoutglyphid)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptTextOut(hdc: P0, psc: *mut *mut core::ffi::c_void, x: i32, y: i32, fuoptions: u32, lprc: Option<*const super::Foundation::RECT>, psa: *const SCRIPT_ANALYSIS, pwcreserved: P7, ireserved: i32, pwglyphs: *const u16, cglyphs: i32, piadvance: *const i32, pijustify: Option<*const i32>, pgoffset: *const GOFFSET) -> windows_core::Result<()> +pub unsafe fn ScriptTextOut(hdc: super::Graphics::Gdi::HDC, psc: *mut *mut core::ffi::c_void, x: i32, y: i32, fuoptions: u32, lprc: Option<*const super::Foundation::RECT>, psa: *const SCRIPT_ANALYSIS, pwcreserved: P7, ireserved: Option, pwglyphs: *const u16, cglyphs: i32, piadvance: *const i32, pijustify: Option<*const i32>, pgoffset: *const GOFFSET) -> windows_core::Result<()> where - P0: windows_core::Param, P7: 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(), core::mem::transmute(psc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(fuoptions), core::mem::transmute(lprc.unwrap_or(core::ptr::null())), core::mem::transmute(psa), pwcreserved.param().abi(), core::mem::transmute(ireserved), core::mem::transmute(pwglyphs), core::mem::transmute(cglyphs), core::mem::transmute(piadvance), core::mem::transmute(pijustify.unwrap_or(core::ptr::null())), core::mem::transmute(pgoffset)).ok() + ScriptTextOut( + core::mem::transmute(hdc), + core::mem::transmute(psc), + core::mem::transmute(x), + core::mem::transmute(y), + core::mem::transmute(fuoptions), + core::mem::transmute(lprc.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psa), + pwcreserved.param().abi(), + core::mem::transmute(ireserved.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pwglyphs), + core::mem::transmute(cglyphs), + core::mem::transmute(piadvance), + core::mem::transmute(pijustify.unwrap_or(core::mem::zeroed())), + core::mem::transmute(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<()> { @@ -1174,7 +1142,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetProcessPreferredUILanguages(dwflags : u32, pwszlanguagesbuffer : windows_core::PCWSTR, pulnumlanguages : *mut u32) -> super::Foundation:: BOOL); - SetProcessPreferredUILanguages(core::mem::transmute(dwflags), pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(core::ptr::null_mut()))).ok() + SetProcessPreferredUILanguages(core::mem::transmute(dwflags), pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetThreadLocale(locale: u32) -> super::Foundation::BOOL { @@ -1187,7 +1155,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadPreferredUILanguages(dwflags : u32, pwszlanguagesbuffer : windows_core::PCWSTR, pulnumlanguages : *mut u32) -> super::Foundation:: BOOL); - SetThreadPreferredUILanguages(core::mem::transmute(dwflags), pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(core::ptr::null_mut()))) + SetThreadPreferredUILanguages(core::mem::transmute(dwflags), pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetThreadPreferredUILanguages2(flags: u32, languages: P1, numlanguagesset: Option<*mut u32>, snapshot: Option<*mut HSAVEDUILANGUAGES>) -> super::Foundation::BOOL @@ -1195,7 +1163,7 @@ where P1: 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(core::mem::transmute(flags), languages.param().abi(), core::mem::transmute(numlanguagesset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(snapshot.unwrap_or(core::ptr::null_mut()))) + SetThreadPreferredUILanguages2(core::mem::transmute(flags), languages.param().abi(), core::mem::transmute(numlanguagesset.unwrap_or(core::mem::zeroed())), core::mem::transmute(snapshot.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetThreadUILanguage(langid: u16) -> u16 { @@ -1292,7 +1260,7 @@ where P6: 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(core::mem::transmute(codepage), core::mem::transmute(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()))) + WideCharToMultiByte(core::mem::transmute(codepage), core::mem::transmute(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::mem::zeroed()))) } #[inline] pub unsafe fn lstrcatA(lpstring1: windows_core::PSTR, lpstring2: P1) -> windows_core::PSTR @@ -7813,10 +7781,10 @@ windows_core::imp::define_interface!(IEnumCodePage, IEnumCodePage_Vtbl, 0x275c23 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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(celt), core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -7874,10 +7842,10 @@ windows_core::imp::define_interface!(IEnumRfc1766, IEnumRfc1766_Vtbl, 0x3dc39d1d 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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(celt), core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -7935,10 +7903,10 @@ windows_core::imp::define_interface!(IEnumScript, IEnumScript_Vtbl, 0xae5f1430_3 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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(celt), core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(rgelt), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -8028,7 +7996,7 @@ impl IMLangCodePages { (windows_core::Interface::vtable(self).GetCharCodePages)(windows_core::Interface::as_raw(self), core::mem::transmute(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(), core::mem::transmute(dwprioritycodepages), core::mem::transmute(pdwcodepages.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchcodepages.unwrap_or(core::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(), core::mem::transmute(dwprioritycodepages), core::mem::transmute(pdwcodepages.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcodepages.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn CodePageToCodePages(&self, ucodepage: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8121,19 +8089,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), core::mem::transmute(psrcstr), 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() + (windows_core::Interface::vtable(self).DoConversion)(windows_core::Interface::as_raw(self), core::mem::transmute(psrcstr), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8230,27 +8198,16 @@ impl core::ops::Deref for IMLangFontLink { windows_core::imp::interface_hierarchy!(IMLangFontLink, windows_core::IUnknown, IMLangCodePages); impl IMLangFontLink { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetFontCodePages(&self, hdc: P0, hfont: P1, pdwcodepages: Option<*mut u32>) -> windows_core::Result<()> - where - 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(core::ptr::null_mut()))).ok() + pub unsafe fn GetFontCodePages(&self, hdc: super::Graphics::Gdi::HDC, hfont: super::Graphics::Gdi::HFONT, pdwcodepages: Option<*mut u32>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(hfont), core::mem::transmute(pdwcodepages.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn MapFont(&self, hdc: P0, dwcodepages: u32, hsrcfont: P2, phdestfont: Option<*mut super::Graphics::Gdi::HFONT>) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(dwcodepages), hsrcfont.param().abi(), core::mem::transmute(phdestfont.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn MapFont(&self, hdc: super::Graphics::Gdi::HDC, dwcodepages: u32, hsrcfont: super::Graphics::Gdi::HFONT, phdestfont: Option<*mut super::Graphics::Gdi::HFONT>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(dwcodepages), core::mem::transmute(hsrcfont), core::mem::transmute(phdestfont.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseFont(&self, hfont: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseFont)(windows_core::Interface::as_raw(self), hfont.param().abi()).ok() + pub unsafe fn ReleaseFont(&self, hfont: super::Graphics::Gdi::HFONT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseFont)(windows_core::Interface::as_raw(self), core::mem::transmute(hfont)).ok() } pub unsafe fn ResetFontMapping(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetFontMapping)(windows_core::Interface::as_raw(self)).ok() @@ -8323,39 +8280,26 @@ impl core::ops::Deref for IMLangFontLink2 { windows_core::imp::interface_hierarchy!(IMLangFontLink2, windows_core::IUnknown, IMLangCodePages); impl IMLangFontLink2 { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetFontCodePages(&self, hdc: P0, hfont: P1, pdwcodepages: Option<*mut u32>) -> windows_core::Result<()> - where - 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(core::ptr::null_mut()))).ok() + pub unsafe fn GetFontCodePages(&self, hdc: super::Graphics::Gdi::HDC, hfont: super::Graphics::Gdi::HFONT, pdwcodepages: Option<*mut u32>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(hfont), core::mem::transmute(pdwcodepages.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseFont(&self, hfont: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseFont)(windows_core::Interface::as_raw(self), hfont.param().abi()).ok() + pub unsafe fn ReleaseFont(&self, hfont: super::Graphics::Gdi::HFONT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseFont)(windows_core::Interface::as_raw(self), core::mem::transmute(hfont)).ok() } pub unsafe fn ResetFontMapping(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetFontMapping)(windows_core::Interface::as_raw(self)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn MapFont(&self, hdc: P0, dwcodepages: u32, chsrc: u16, pfont: Option<*mut super::Graphics::Gdi::HFONT>) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(dwcodepages), core::mem::transmute(chsrc), core::mem::transmute(pfont.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn MapFont(&self, hdc: super::Graphics::Gdi::HDC, dwcodepages: u32, chsrc: u16, pfont: Option<*mut super::Graphics::Gdi::HFONT>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(dwcodepages), core::mem::transmute(chsrc), core::mem::transmute(pfont.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(puiranges), core::mem::transmute(puranges.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn GetFontUnicodeRanges(&self, hdc: super::Graphics::Gdi::HDC, puiranges: *const u32, puranges: Option<*mut UNICODERANGE>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetFontUnicodeRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(puiranges), core::mem::transmute(puranges.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(sid), core::mem::transmute(dwflags), core::mem::transmute(puifonts), core::mem::transmute(pscriptfont.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetScriptFontInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(sid), core::mem::transmute(dwflags), core::mem::transmute(puifonts), core::mem::transmute(pscriptfont.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn CodePageToScriptID(&self, uicodepage: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8456,13 +8400,13 @@ impl IMLangLineBreakConsole { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BreakLineML)(windows_core::Interface::as_raw(self), psrcmlstr.param().abi(), core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), core::mem::transmute(cmincolumns), core::mem::transmute(cmaxcolumns), core::mem::transmute(pllinelen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plskiplen.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BreakLineML)(windows_core::Interface::as_raw(self), psrcmlstr.param().abi(), core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), core::mem::transmute(cmincolumns), core::mem::transmute(cmaxcolumns), core::mem::transmute(pllinelen.unwrap_or(core::mem::zeroed())), core::mem::transmute(plskiplen.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(locale), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(cmaxcolumns), core::mem::transmute(pcchline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchskip.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BreakLineW)(windows_core::Interface::as_raw(self), core::mem::transmute(locale), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(cmaxcolumns), core::mem::transmute(pcchline.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchskip.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(locale), core::mem::transmute(ucodepage), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(cmaxcolumns), core::mem::transmute(pcchline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchskip.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BreakLineA)(windows_core::Interface::as_raw(self), core::mem::transmute(locale), core::mem::transmute(ucodepage), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(cmaxcolumns), core::mem::transmute(pcchline.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchskip.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8513,7 +8457,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), core::mem::transmute(pllen.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetMLStr(&self, ldestpos: i32, ldestlen: i32, psrcmlstr: P2, lsrcpos: i32, lsrclen: i32) -> windows_core::Result<()> where @@ -8525,7 +8469,7 @@ impl IMLangString { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetMLStr)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), punkouter.param().abi(), core::mem::transmute(dwclscontext), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetMLStr)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), punkouter.param().abi(), core::mem::transmute(dwclscontext), core::mem::transmute(piid), core::mem::transmute(ppdestmlstr), core::mem::transmute(pldestpos.unwrap_or(core::mem::zeroed())), core::mem::transmute(pldestlen.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8583,13 +8527,13 @@ 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), core::mem::transmute(ldestpos), core::mem::transmute(ldestlen), core::mem::transmute(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() + (windows_core::Interface::vtable(self).SetAStr)(windows_core::Interface::as_raw(self), core::mem::transmute(ldestpos), core::mem::transmute(ldestlen), core::mem::transmute(ucodepage), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetStrBufA(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, psrcbuf: P3, pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> where P3: windows_core::Param, { - (windows_core::Interface::vtable(self).SetStrBufA)(windows_core::Interface::as_raw(self), core::mem::transmute(ldestpos), core::mem::transmute(ldestlen), core::mem::transmute(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() + (windows_core::Interface::vtable(self).SetStrBufA)(windows_core::Interface::as_raw(self), core::mem::transmute(ldestpos), core::mem::transmute(ldestlen), core::mem::transmute(ucodepage), psrcbuf.param().abi(), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).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)( @@ -8597,28 +8541,28 @@ impl IMLangStringAStr { core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), core::mem::transmute(ucodepagein), - core::mem::transmute(pucodepageout.unwrap_or(core::ptr::null())), + core::mem::transmute(pucodepageout.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(lsrcpos), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetStrBufA)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(lsrcmaxlen), core::mem::transmute(pudestcodepage.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), core::mem::transmute(lflags), core::mem::transmute(ucodepagein), core::mem::transmute(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() + (windows_core::Interface::vtable(self).LockAStr)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), core::mem::transmute(lflags), core::mem::transmute(ucodepagein), core::mem::transmute(cchrequest), core::mem::transmute(pucodepageout.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppszdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pldestlen.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ldestpos), core::mem::transmute(ldestlen), core::mem::transmute(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), core::mem::transmute(lsrcpos), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(lsrcmaxlen), core::mem::transmute(plocale.unwrap_or(core::mem::zeroed())), core::mem::transmute(pllocalepos.unwrap_or(core::mem::zeroed())), core::mem::transmute(pllocalelen.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8698,10 +8642,10 @@ windows_core::imp::define_interface!(IMLangStringBufA, IMLangStringBufA_Vtbl, 0x 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(core::ptr::null_mut())), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(plflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(cchoffset), core::mem::transmute(cchmaxlock), core::mem::transmute(ppszbuf), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), core::mem::transmute(cchoffset), core::mem::transmute(cchmaxlock), core::mem::transmute(ppszbuf), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn UnlockBuf(&self, pszbuf: P0, cchoffset: i32, cchwrite: i32) -> windows_core::Result<()> where @@ -8710,7 +8654,7 @@ impl IMLangStringBufA { (windows_core::Interface::vtable(self).UnlockBuf)(windows_core::Interface::as_raw(self), pszbuf.param().abi(), core::mem::transmute(cchoffset), core::mem::transmute(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), core::mem::transmute(cchoffset), core::mem::transmute(cchmaxinsert), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), core::mem::transmute(cchoffset), core::mem::transmute(cchmaxinsert), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(cchoffset), core::mem::transmute(cchdelete)).ok() @@ -8772,10 +8716,10 @@ windows_core::imp::define_interface!(IMLangStringBufW, IMLangStringBufW_Vtbl, 0x 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(core::ptr::null_mut())), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(plflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(cchoffset), core::mem::transmute(cchmaxlock), core::mem::transmute(ppszbuf), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), core::mem::transmute(cchoffset), core::mem::transmute(cchmaxlock), core::mem::transmute(ppszbuf), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn UnlockBuf(&self, pszbuf: P0, cchoffset: i32, cchwrite: i32) -> windows_core::Result<()> where @@ -8784,7 +8728,7 @@ impl IMLangStringBufW { (windows_core::Interface::vtable(self).UnlockBuf)(windows_core::Interface::as_raw(self), pszbuf.param().abi(), core::mem::transmute(cchoffset), core::mem::transmute(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), core::mem::transmute(cchoffset), core::mem::transmute(cchmaxinsert), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), core::mem::transmute(cchoffset), core::mem::transmute(cchmaxinsert), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(cchoffset), core::mem::transmute(cchdelete)).ok() @@ -8852,31 +8796,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), core::mem::transmute(ldestpos), core::mem::transmute(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() + (windows_core::Interface::vtable(self).SetWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(ldestpos), core::mem::transmute(ldestlen), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetStrBufW(&self, ldestpos: i32, ldestlen: i32, psrcbuf: P2, pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetStrBufW)(windows_core::Interface::as_raw(self), core::mem::transmute(ldestpos), core::mem::transmute(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() + (windows_core::Interface::vtable(self).SetStrBufW)(windows_core::Interface::as_raw(self), core::mem::transmute(ldestpos), core::mem::transmute(ldestlen), psrcbuf.param().abi(), core::mem::transmute(pcchactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lsrcpos), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lsrcpos), core::mem::transmute(lsrcmaxlen), core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStrBufW)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(lsrcmaxlen), core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), core::mem::transmute(lflags), core::mem::transmute(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() + (windows_core::Interface::vtable(self).LockWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(lsrclen), core::mem::transmute(lflags), core::mem::transmute(cchrequest), core::mem::transmute(ppszdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pldestlen.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(plactuallen.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ldestpos), core::mem::transmute(ldestlen), core::mem::transmute(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), core::mem::transmute(lsrcpos), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), core::mem::transmute(lsrcpos), core::mem::transmute(lsrcmaxlen), core::mem::transmute(plocale.unwrap_or(core::mem::zeroed())), core::mem::transmute(pllocalepos.unwrap_or(core::mem::zeroed())), core::mem::transmute(pllocalelen.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8977,19 +8921,19 @@ impl IMultiLanguage { (windows_core::Interface::vtable(self).IsConvertible)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsrcencoding), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(dwsrcencoding), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsrcencoding), core::mem::transmute(dwdstencoding), core::mem::transmute(psrcstr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn ConvertStringToUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PWSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> + pub unsafe fn ConvertStringToUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: Option, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencoding), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn ConvertStringFromUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> + pub unsafe fn ConvertStringFromUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: Option, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencoding), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConvertStringReset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertStringReset)(windows_core::Interface::as_raw(self)).ok() @@ -9196,19 +9140,19 @@ impl IMultiLanguage2 { (windows_core::Interface::vtable(self).IsConvertible)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsrcencoding), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(dwsrcencoding), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsrcencoding), core::mem::transmute(dwdstencoding), core::mem::transmute(psrcstr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn ConvertStringToUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PWSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> + pub unsafe fn ConvertStringToUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: Option, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencoding), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn ConvertStringFromUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> + pub unsafe fn ConvertStringFromUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: Option, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencoding), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConvertStringReset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertStringReset)(windows_core::Interface::as_raw(self)).ok() @@ -9238,21 +9182,21 @@ impl IMultiLanguage2 { P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringInIStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflag), lpfallback.param().abi(), core::mem::transmute(dwsrcencoding), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(dwflag), lpfallback.param().abi(), core::mem::transmute(dwsrcencoding), core::mem::transmute(dwdstencoding), pstmin.param().abi(), pstmout.param().abi()).ok() } pub unsafe fn ConvertStringToUnicodeEx(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PWSTR, pcdstsize: Option<*mut u32>, dwflag: u32, lpfallback: P7) -> windows_core::Result<()> where P2: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringToUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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())), core::mem::transmute(dwflag), lpfallback.param().abi()).ok() + (windows_core::Interface::vtable(self).ConvertStringToUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencoding), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflag), lpfallback.param().abi()).ok() } pub unsafe fn ConvertStringFromUnicodeEx(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P2, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PSTR, pcdstsize: Option<*mut u32>, dwflag: u32, lpfallback: P7) -> windows_core::Result<()> where P2: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringFromUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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())), core::mem::transmute(dwflag), lpfallback.param().abi()).ok() + (windows_core::Interface::vtable(self).ConvertStringFromUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencoding), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflag), lpfallback.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn DetectCodepageInIStream(&self, dwflag: u32, dwprefwincodepage: u32, pstmin: P2, lpencoding: *mut DetectEncodingInfo, pnscores: *mut i32) -> windows_core::Result<()> @@ -9267,11 +9211,8 @@ impl IMultiLanguage2 { { (windows_core::Interface::vtable(self).DetectInputCodepage)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflag), core::mem::transmute(dwprefwincodepage), psrcstr.param().abi(), core::mem::transmute(pcsrcsize), core::mem::transmute(lpencoding), core::mem::transmute(pnscores)).ok() } - pub unsafe fn ValidateCodePage(&self, uicodepage: u32, hwnd: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ValidateCodePage)(windows_core::Interface::as_raw(self), core::mem::transmute(uicodepage), hwnd.param().abi()).ok() + pub unsafe fn ValidateCodePage(&self, uicodepage: u32, hwnd: super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ValidateCodePage)(windows_core::Interface::as_raw(self), core::mem::transmute(uicodepage), core::mem::transmute(hwnd)).ok() } pub unsafe fn GetCodePageDescription(&self, uicodepage: u32, lcid: u32, lpwidecharstr: &mut [u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetCodePageDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(uicodepage), core::mem::transmute(lcid), core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap()).ok() @@ -9290,11 +9231,8 @@ impl IMultiLanguage2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumScripts)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), core::mem::transmute(langid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ValidateCodePageEx(&self, uicodepage: u32, hwnd: P1, dwfiodcontrol: u32) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ValidateCodePageEx)(windows_core::Interface::as_raw(self), core::mem::transmute(uicodepage), hwnd.param().abi(), core::mem::transmute(dwfiodcontrol)).ok() + pub unsafe fn ValidateCodePageEx(&self, uicodepage: u32, hwnd: super::Foundation::HWND, dwfiodcontrol: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ValidateCodePageEx)(windows_core::Interface::as_raw(self), core::mem::transmute(uicodepage), core::mem::transmute(hwnd), core::mem::transmute(dwfiodcontrol)).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs index 342146dcdb..4c35405234 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs @@ -423,12 +423,9 @@ impl IPresentationManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AddBufferFromResource)(windows_core::Interface::as_raw(self), resource.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreatePresentationSurface(&self, compositionsurfacehandle: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreatePresentationSurface(&self, compositionsurfacehandle: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePresentationSurface)(windows_core::Interface::as_raw(self), compositionsurfacehandle.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePresentationSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(compositionsurfacehandle), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetNextPresentId(&self) -> u64 { (windows_core::Interface::vtable(self).GetNextPresentId)(windows_core::Interface::as_raw(self)) 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 054067c32a..8251c7ef30 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs @@ -127,13 +127,13 @@ impl IDXCoreAdapter { (windows_core::Interface::vtable(self).IsQueryStateSupported)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(state), core::mem::transmute(inputstatedetailssize), core::mem::transmute(inputstatedetails.unwrap_or(core::ptr::null())), core::mem::transmute(outputbuffersize), core::mem::transmute(outputbuffer)).ok() + (windows_core::Interface::vtable(self).QueryState)(windows_core::Interface::as_raw(self), core::mem::transmute(state), core::mem::transmute(inputstatedetailssize), core::mem::transmute(inputstatedetails.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbuffersize), core::mem::transmute(outputbuffer)).ok() } pub unsafe fn IsSetStateSupported(&self, property: DXCoreAdapterState) -> bool { (windows_core::Interface::vtable(self).IsSetStateSupported)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(state), core::mem::transmute(inputstatedetailssize), core::mem::transmute(inputstatedetails.unwrap_or(core::ptr::null())), core::mem::transmute(inputdatasize), core::mem::transmute(inputdata)).ok() + (windows_core::Interface::vtable(self).SetState)(windows_core::Interface::as_raw(self), core::mem::transmute(state), core::mem::transmute(inputstatedetailssize), core::mem::transmute(inputstatedetails.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputdatasize), core::mem::transmute(inputdata)).ok() } pub unsafe fn GetFactory(&self) -> windows_core::Result where @@ -261,7 +261,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(), core::mem::transmute(notificationtype), core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterEventNotification)(windows_core::Interface::as_raw(self), dxcoreobject.param().abi(), core::mem::transmute(notificationtype), core::mem::transmute(callbackfunction), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(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 53a83167ad..c34c2998bf 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(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D2D1CreateDevice(dxgidevice.param().abi(), core::mem::transmute(creationproperties.unwrap_or(core::mem::zeroed())), &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(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D2D1CreateDeviceContext(dxgisurface.param().abi(), core::mem::transmute(creationproperties.unwrap_or(core::mem::zeroed())), &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(core::mem::transmute(factorytype), &T::IID, core::mem::transmute(pfactoryoptions.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D2D1CreateFactory(core::mem::transmute(factorytype), &T::IID, core::mem::transmute(pfactoryoptions.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] #[inline] @@ -2811,18 +2811,18 @@ impl ID2D1Bitmap { where P1: windows_core::Param, { - (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() + (windows_core::Interface::vtable(self).CopyFromBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(destpoint.unwrap_or(core::mem::zeroed())), bitmap.param().abi(), core::mem::transmute(srcrect.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CopyFromRenderTarget(&self, destpoint: Option<*const Common::D2D_POINT_2U>, rendertarget: P1, srcrect: Option<*const Common::D2D_RECT_U>) -> windows_core::Result<()> where P1: windows_core::Param, { - (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() + (windows_core::Interface::vtable(self).CopyFromRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(destpoint.unwrap_or(core::mem::zeroed())), rendertarget.param().abi(), core::mem::transmute(srcrect.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(srcdata), core::mem::transmute(pitch)).ok() + (windows_core::Interface::vtable(self).CopyFromMemory)(windows_core::Interface::as_raw(self), core::mem::transmute(dstrect.unwrap_or(core::mem::zeroed())), core::mem::transmute(srcdata), core::mem::transmute(pitch)).ok() } } #[repr(C)] @@ -3708,14 +3708,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), core::mem::transmute(color.unwrap_or(core::mem::zeroed()))).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: P3, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) -> windows_core::Result<()> where P3: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), foregroundbrush.param().abi(), core::mem::transmute(measuringmode)).ok() + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::mem::zeroed())), foregroundbrush.param().abi(), core::mem::transmute(measuringmode)).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawLine(&self, point0: Common::D2D_POINT_2F, point1: Common::D2D_POINT_2F, brush: P2, strokewidth: f32, strokestyle: P4) -> windows_core::Result<()> @@ -3746,21 +3746,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(core::ptr::null())), core::mem::transmute(opacity), core::mem::transmute(interpolationmode), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null())), core::mem::transmute(perspectivetransform.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(opacity), core::mem::transmute(interpolationmode), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(perspectivetransform.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(core::ptr::null())), core::mem::transmute(interpolationmode), core::mem::transmute(compositemode)).ok() + (windows_core::Interface::vtable(self).DrawImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(targetoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(imagerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(interpolationmode), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn FillMesh(&self, mesh: P0, brush: P1) -> windows_core::Result<()> where @@ -3775,7 +3775,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(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FillGeometry(&self, geometry: P0, brush: P1, opacitybrush: P2) -> windows_core::Result<()> where @@ -4117,7 +4117,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(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -4268,7 +4268,7 @@ impl ID2D1CommandSink5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(blendmode), core::mem::transmute(targetoffset.unwrap_or(core::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(core::ptr::null())), core::mem::transmute(interpolationmode)).ok() + (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(blendmode), core::mem::transmute(targetoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(imagerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(interpolationmode)).ok() } } #[repr(C)] @@ -4478,11 +4478,8 @@ impl core::ops::Deref for ID2D1DCRenderTarget { windows_core::imp::interface_hierarchy!(ID2D1DCRenderTarget, windows_core::IUnknown, ID2D1Resource, ID2D1RenderTarget); impl ID2D1DCRenderTarget { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn BindDC(&self, hdc: P0, psubrect: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).BindDC)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(psubrect)).ok() + pub unsafe fn BindDC(&self, hdc: super::Gdi::HDC, psubrect: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).BindDC)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(psubrect)).ok() } } #[repr(C)] @@ -4536,7 +4533,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(core::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::mem::zeroed())), &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), core::mem::transmute(maximuminbytes)) @@ -5053,7 +5050,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(core::ptr::null())), core::mem::transmute(pitch), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(pitch), core::mem::transmute(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 @@ -5061,7 +5058,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(core::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::mem::zeroed())), &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(); @@ -5088,7 +5085,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(core::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::mem::zeroed())), &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(); @@ -5105,7 +5102,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(), core::mem::transmute(imagebrushproperties), core::mem::transmute(brushproperties.unwrap_or(core::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(), core::mem::transmute(imagebrushproperties), core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), &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 @@ -5113,7 +5110,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(core::ptr::null())), core::mem::transmute(brushproperties.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateCommandList(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5190,28 +5187,28 @@ impl ID2D1DeviceContext { where P3: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), foregroundbrush.param().abi(), core::mem::transmute(measuringmode)) + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::mem::zeroed())), foregroundbrush.param().abi(), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(core::ptr::null())), core::mem::transmute(interpolationmode), core::mem::transmute(compositemode)) + (windows_core::Interface::vtable(self).DrawImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(targetoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(imagerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(interpolationmode), core::mem::transmute(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(core::ptr::null()))) + (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(targetoffset.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(opacity), core::mem::transmute(interpolationmode), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null())), core::mem::transmute(perspectivetransform.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(opacity), core::mem::transmute(interpolationmode), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(perspectivetransform.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS1, layer: P1) @@ -5246,7 +5243,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(core::ptr::null())), core::mem::transmute(inputdescriptions), core::mem::transmute(requiredinputrects), core::mem::transmute(inputcount)).ok() + (windows_core::Interface::vtable(self).GetEffectRequiredInputRectangles)(windows_core::Interface::as_raw(self), rendereffect.param().abi(), core::mem::transmute(renderimagerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputdescriptions), core::mem::transmute(requiredinputrects), core::mem::transmute(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>) @@ -5254,7 +5251,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(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -5787,7 +5784,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(core::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::mem::zeroed())), &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 { @@ -5838,7 +5835,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(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))) } pub unsafe fn CreateTransformedImageSource(&self, imagesource: P0, properties: *const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES) -> windows_core::Result where @@ -6129,7 +6126,7 @@ impl ID2D1DeviceContext4 { P2: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).GetColorBitmapGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphimageformat), core::mem::transmute(glyphorigin), fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(glyphindex), issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(glyphtransform), core::mem::transmute(glyphimage)).ok() + (windows_core::Interface::vtable(self).GetColorBitmapGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphimageformat), core::mem::transmute(glyphorigin), fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(glyphindex), issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(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: P1, fontemsize: f32, glyphindex: u16, issideways: P4, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, defaultfillbrush: P6, svgglyphstyle: P7, colorpaletteindex: u32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut Option) -> windows_core::Result<()> @@ -6139,7 +6136,7 @@ impl ID2D1DeviceContext4 { P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSvgGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorigin), fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(glyphindex), issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(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(), core::mem::transmute(fontemsize), core::mem::transmute(glyphindex), issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(glyphtransform), core::mem::transmute(glyphimage)).ok() } } #[repr(C)] @@ -6366,7 +6363,7 @@ impl ID2D1DeviceContext6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(blendmode), core::mem::transmute(targetoffset.unwrap_or(core::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(core::ptr::null())), core::mem::transmute(interpolationmode)) + (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(blendmode), core::mem::transmute(targetoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(imagerectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(interpolationmode)) } } #[repr(C)] @@ -6426,7 +6423,7 @@ impl ID2D1DeviceContext7 { P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), foregroundbrush.param().abi(), svgglyphstyle.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(measuringmode), core::mem::transmute(bitmapsnapoption)) + (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::mem::zeroed())), foregroundbrush.param().abi(), svgglyphstyle.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(measuringmode), core::mem::transmute(bitmapsnapoption)) } } #[repr(C)] @@ -6511,7 +6508,7 @@ impl ID2D1DrawInfo { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetVertexProcessing)(windows_core::Interface::as_raw(self), vertexbuffer.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).SetVertexProcessing)(windows_core::Interface::as_raw(self), vertexbuffer.param().abi(), core::mem::transmute(vertexoptions), core::mem::transmute(blenddescription.unwrap_or(core::mem::zeroed())), core::mem::transmute(vertexrange.unwrap_or(core::mem::zeroed())), core::mem::transmute(vertexshader.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -6903,7 +6900,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(core::ptr::null())), core::mem::transmute(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__)) + (windows_core::Interface::vtable(self).CreateResourceTexture)(windows_core::Interface::as_raw(self), core::mem::transmute(resourceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(resourcetextureproperties), core::mem::transmute(data.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(strides.unwrap_or(core::mem::zeroed())), 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(); @@ -6912,7 +6909,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), core::mem::transmute(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__)) + (windows_core::Interface::vtable(self).CreateVertexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(vertexbufferproperties), core::mem::transmute(resourceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(customvertexbufferproperties.unwrap_or(core::mem::zeroed())), &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(); @@ -7490,7 +7487,7 @@ impl ID2D1Factory { P1: 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(core::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::mem::zeroed())), 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 @@ -7774,7 +7771,7 @@ impl ID2D1Factory1 { P1: 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(core::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::mem::zeroed())), 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 @@ -7801,7 +7798,7 @@ impl ID2D1Factory1 { (windows_core::Interface::vtable(self).UnregisterEffect)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(effectsregistered.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(effectsregistered.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8344,7 +8341,7 @@ impl ID2D1GdiInteropRenderTarget { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(update.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8523,7 +8520,7 @@ windows_core::imp::define_interface!(ID2D1GdiMetafileSink, 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), core::mem::transmute(recordtype), core::mem::transmute(recorddata.unwrap_or(core::ptr::null())), core::mem::transmute(recorddatasize)).ok() + (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), core::mem::transmute(recordtype), core::mem::transmute(recorddata.unwrap_or(core::mem::zeroed())), core::mem::transmute(recorddatasize)).ok() } } #[repr(C)] @@ -8559,7 +8556,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), core::mem::transmute(recordtype), core::mem::transmute(recorddata.unwrap_or(core::ptr::null())), core::mem::transmute(recorddatasize), core::mem::transmute(flags)).ok() + (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), core::mem::transmute(recordtype), core::mem::transmute(recorddata.unwrap_or(core::mem::zeroed())), core::mem::transmute(recorddatasize), core::mem::transmute(flags)).ok() } } #[repr(C)] @@ -8597,7 +8594,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(core::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::mem::zeroed())), &mut result__).map(|| result__) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn GetWidenedBounds(&self, strokewidth: f32, strokestyle: P1, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32) -> windows_core::Result @@ -8605,7 +8602,7 @@ impl ID2D1Geometry { P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetWidenedBounds)(windows_core::Interface::as_raw(self), core::mem::transmute(strokewidth), strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetWidenedBounds)(windows_core::Interface::as_raw(self), core::mem::transmute(strokewidth), strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P2, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32) -> windows_core::Result @@ -8613,12 +8610,12 @@ impl ID2D1Geometry { P2: 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), core::mem::transmute(strokewidth), strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).StrokeContainsPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(point), core::mem::transmute(strokewidth), strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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 @@ -8626,21 +8623,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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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: P3) -> windows_core::Result<()> where P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Simplify)(windows_core::Interface::as_raw(self), core::mem::transmute(simplificationoption), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).Simplify)(windows_core::Interface::as_raw(self), core::mem::transmute(simplificationoption), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Tessellate)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), tessellationsink.param().abi()).ok() + (windows_core::Interface::vtable(self).Tessellate)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P4) -> windows_core::Result<()> @@ -8648,28 +8645,28 @@ impl ID2D1Geometry { P0: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).CombineWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), core::mem::transmute(combinemode), core::mem::transmute(inputgeometrytransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).CombineWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), core::mem::transmute(combinemode), core::mem::transmute(inputgeometrytransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Outline)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).Outline)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(flatteningtolerance), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeArea)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(flatteningtolerance), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeLength)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(length), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), core::mem::transmute(point.unwrap_or(core::ptr::null_mut())), core::mem::transmute(unittangentvector.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ComputePointAtLength)(windows_core::Interface::as_raw(self), core::mem::transmute(length), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(flatteningtolerance), core::mem::transmute(point.unwrap_or(core::mem::zeroed())), core::mem::transmute(unittangentvector.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn Widen(&self, strokewidth: f32, strokestyle: P1, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32, geometrysink: P4) -> windows_core::Result<()> @@ -8677,7 +8674,7 @@ impl ID2D1Geometry { P1: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Widen)(windows_core::Interface::as_raw(self), core::mem::transmute(strokewidth), strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).Widen)(windows_core::Interface::as_raw(self), core::mem::transmute(strokewidth), strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(flatteningtolerance), geometrysink.param().abi()).ok() } } #[repr(C)] @@ -9609,11 +9606,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).EnsureCached)(windows_core::Interface::as_raw(self), core::mem::transmute(rectangletofill.unwrap_or(core::mem::zeroed()))).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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).TrimCache)(windows_core::Interface::as_raw(self), core::mem::transmute(rectangletopreserve.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Imaging")] pub unsafe fn GetSource(&self) -> windows_core::Result { @@ -9717,7 +9714,7 @@ impl ID2D1Ink { P0: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).StreamAsGeometry)(windows_core::Interface::as_raw(self), inkstyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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 @@ -9725,7 +9722,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(core::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::mem::zeroed())), &mut result__).map(|| result__) } } #[repr(C)] @@ -10353,7 +10350,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), core::mem::transmute(length), core::mem::transmute(startsegment), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), core::mem::transmute(flatteningtolerance), core::mem::transmute(pointdescription)).ok() + (windows_core::Interface::vtable(self).ComputePointAndSegmentAtLength)(windows_core::Interface::as_raw(self), core::mem::transmute(length), core::mem::transmute(startsegment), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(flatteningtolerance), core::mem::transmute(pointdescription)).ok() } } #[repr(C)] @@ -10396,7 +10393,7 @@ impl ID2D1PrintControl { P0: windows_core::Param, P2: 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(core::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(tag2.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -10859,7 +10856,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(core::ptr::null())), core::mem::transmute(pitch), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(pitch), core::mem::transmute(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 @@ -10867,11 +10864,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(core::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::mem::zeroed())), &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), core::mem::transmute(riid), core::mem::transmute(data), core::mem::transmute(bitmapproperties.unwrap_or(core::ptr::null())), core::mem::transmute(bitmap)).ok() + (windows_core::Interface::vtable(self).CreateSharedBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(riid), core::mem::transmute(data), core::mem::transmute(bitmapproperties.unwrap_or(core::mem::zeroed())), 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 @@ -10879,12 +10876,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(core::ptr::null())), core::mem::transmute(brushproperties.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(color), core::mem::transmute(brushproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSolidColorBrush)(windows_core::Interface::as_raw(self), core::mem::transmute(color), core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), &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 { @@ -10897,7 +10894,7 @@ impl ID2D1RenderTarget { P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateLinearGradientBrush)(windows_core::Interface::as_raw(self), core::mem::transmute(lineargradientbrushproperties), core::mem::transmute(brushproperties.unwrap_or(core::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), core::mem::transmute(lineargradientbrushproperties), core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), 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: P2) -> windows_core::Result @@ -10905,17 +10902,17 @@ impl ID2D1RenderTarget { P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateRadialGradientBrush)(windows_core::Interface::as_raw(self), core::mem::transmute(radialgradientbrushproperties), core::mem::transmute(brushproperties.unwrap_or(core::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), core::mem::transmute(radialgradientbrushproperties), core::mem::transmute(brushproperties.unwrap_or(core::mem::zeroed())), 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(core::ptr::null())), core::mem::transmute(desiredpixelsize.unwrap_or(core::ptr::null())), core::mem::transmute(desiredformat.unwrap_or(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(desiredpixelsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::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::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateMesh(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11003,14 +11000,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(), core::mem::transmute(content), core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), core::mem::transmute(content), core::mem::transmute(destinationrectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(opacity), core::mem::transmute(interpolationmode), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(opacity), core::mem::transmute(interpolationmode), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] pub unsafe fn DrawText(&self, string: &[u16], textformat: P2, layoutrect: *const Common::D2D_RECT_F, defaultfillbrush: P4, options: D2D1_DRAW_TEXT_OPTIONS, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) @@ -11072,7 +11069,7 @@ impl ID2D1RenderTarget { (windows_core::Interface::vtable(self).SetTags)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetTags)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(core::mem::zeroed())), core::mem::transmute(tag2.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS, layer: P1) @@ -11085,7 +11082,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(core::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(core::mem::zeroed())), core::mem::transmute(tag2.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SaveDrawingState(&self, drawingstateblock: P0) where @@ -11108,13 +11105,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(core::ptr::null()))) + (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), core::mem::transmute(clearcolor.unwrap_or(core::mem::zeroed()))) } 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(core::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(core::mem::zeroed())), core::mem::transmute(tag2.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetPixelFormat(&self) -> Common::D2D1_PIXEL_FORMAT { @@ -11738,7 +11735,7 @@ windows_core::imp::define_interface!(ID2D1ResourceTexture, 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(core::ptr::null())), core::mem::transmute(maximimumextents.unwrap_or(core::ptr::null())), core::mem::transmute(strides.unwrap_or(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(maximimumextents.unwrap_or(core::mem::zeroed())), core::mem::transmute(strides.unwrap_or(core::mem::zeroed())), core::mem::transmute(dimensions), core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } } #[repr(C)] @@ -11944,9 +11941,9 @@ impl ID2D1SpriteBatch { windows_core::Interface::as_raw(self), core::mem::transmute(spritecount), core::mem::transmute(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())), + core::mem::transmute(sourcerectangles.unwrap_or(core::mem::zeroed())), + core::mem::transmute(colors.unwrap_or(core::mem::zeroed())), + core::mem::transmute(transforms.unwrap_or(core::mem::zeroed())), core::mem::transmute(destinationrectanglesstride), core::mem::transmute(sourcerectanglesstride), core::mem::transmute(colorsstride), @@ -11960,10 +11957,10 @@ impl ID2D1SpriteBatch { windows_core::Interface::as_raw(self), core::mem::transmute(startindex), core::mem::transmute(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())), + core::mem::transmute(destinationrectangles.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sourcerectangles.unwrap_or(core::mem::zeroed())), + core::mem::transmute(colors.unwrap_or(core::mem::zeroed())), + core::mem::transmute(transforms.unwrap_or(core::mem::zeroed())), core::mem::transmute(destinationrectanglesstride), core::mem::transmute(sourcerectanglesstride), core::mem::transmute(colorsstride), @@ -11973,7 +11970,7 @@ impl ID2D1SpriteBatch { } #[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), core::mem::transmute(startindex), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSprites)(windows_core::Interface::as_raw(self), core::mem::transmute(startindex), core::mem::transmute(spritecount), core::mem::transmute(destinationrectangles.unwrap_or(core::mem::zeroed())), core::mem::transmute(sourcerectangles.unwrap_or(core::mem::zeroed())), core::mem::transmute(colors.unwrap_or(core::mem::zeroed())), core::mem::transmute(transforms.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSpriteCount(&self) -> u32 { (windows_core::Interface::vtable(self).GetSpriteCount)(windows_core::Interface::as_raw(self)) @@ -12318,7 +12315,7 @@ impl ID2D1SvgDocument { P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePaint)(windows_core::Interface::as_raw(self), core::mem::transmute(painttype), core::mem::transmute(color.unwrap_or(core::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), core::mem::transmute(painttype), core::mem::transmute(color.unwrap_or(core::mem::zeroed())), 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(); @@ -12581,16 +12578,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(core::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::mem::zeroed()))) } 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), core::mem::transmute(index), core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap(), core::mem::transmute(inherited.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecifiedAttributeName)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap(), core::mem::transmute(inherited.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(namelength), core::mem::transmute(inherited.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecifiedAttributeNameLength)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(namelength), core::mem::transmute(inherited.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn RemoveAttribute(&self, name: P0) -> windows_core::Result<()> where @@ -12938,7 +12935,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(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()))) + (windows_core::Interface::vtable(self).GetStroke)(windows_core::Interface::as_raw(self), core::mem::transmute(brush.unwrap_or(core::mem::zeroed())), core::mem::transmute(strokewidth.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))) } } #[repr(C)] 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 ee66c9c360..c33467c4fb 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 @@ -463,8 +463,8 @@ impl IDxcCompiler2 { pdefines.len().try_into().unwrap(), pincludehandler.param().abi(), core::mem::transmute(ppresult), - core::mem::transmute(ppdebugblobname.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(ppdebugblob.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppdebugblobname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppdebugblob.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -822,7 +822,7 @@ impl IDxcExtraOutputs { where T: windows_core::Interface, { - (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(uindex), &T::IID, result__ as *mut _ as *mut _, core::mem::transmute(ppoutputtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoutputname.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -916,7 +916,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(core::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::mem::zeroed())), &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(); @@ -1257,7 +1257,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -1923,7 +1923,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(core::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::mem::zeroed())), &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 @@ -2202,7 +2202,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(), core::mem::transmute(flags), core::mem::transmute(poptdebugbitcode.unwrap_or(core::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(), core::mem::transmute(flags), core::mem::transmute(poptdebugbitcode.unwrap_or(core::mem::zeroed())), &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 2b776190ae..263d8d6740 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 P6: 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(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), core::mem::transmute(flags1), core::mem::transmute(flags2), core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut()))).ok() + D3DCompile(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), core::mem::transmute(flags1), core::mem::transmute(flags2), core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn D3DCompile2(psrcdata: *const core::ffi::c_void, srcdatasize: usize, psourcename: P2, pdefines: Option<*const super::D3D_SHADER_MACRO>, pinclude: P4, pentrypoint: P5, ptarget: P6, 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<()> @@ -22,17 +22,17 @@ where core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), psourcename.param().abi(), - core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), + core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), core::mem::transmute(flags1), core::mem::transmute(flags2), core::mem::transmute(secondarydataflags), - core::mem::transmute(psecondarydata.unwrap_or(core::ptr::null())), + core::mem::transmute(psecondarydata.unwrap_or(core::mem::zeroed())), core::mem::transmute(secondarydatasize), core::mem::transmute(ppcode), - core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -45,7 +45,7 @@ where P4: 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(core::ptr::null())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), core::mem::transmute(flags1), core::mem::transmute(flags2), core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut()))).ok() + D3DCompileFromFile(pfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), core::mem::transmute(flags1), core::mem::transmute(flags2), core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn D3DCompressShaders(pshaderdata: &[D3D_SHADER_DATA], uflags: u32) -> windows_core::Result { @@ -76,7 +76,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(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), core::mem::transmute(unumshaders), core::mem::transmute(ustartindex), core::mem::transmute(pindices.unwrap_or(core::ptr::null())), core::mem::transmute(uflags), core::mem::transmute(ppshaders), core::mem::transmute(ptotalshaders.unwrap_or(core::ptr::null_mut()))).ok() + D3DDecompressShaders(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), core::mem::transmute(unumshaders), core::mem::transmute(ustartindex), core::mem::transmute(pindices.unwrap_or(core::mem::zeroed())), core::mem::transmute(uflags), core::mem::transmute(ppshaders), core::mem::transmute(ptotalshaders.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn D3DDisassemble(psrcdata: *const core::ffi::c_void, srcdatasize: usize, flags: u32, szcomments: P3) -> windows_core::Result @@ -103,7 +103,7 @@ where P3: 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(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), core::mem::transmute(flags), szcomments.param().abi(), core::mem::transmute(startbyteoffset), core::mem::transmute(numinsts), core::mem::transmute(pfinishbyteoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdisassembly)).ok() + D3DDisassembleRegion(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), core::mem::transmute(flags), szcomments.param().abi(), core::mem::transmute(startbyteoffset), core::mem::transmute(numinsts), core::mem::transmute(pfinishbyteoffset.unwrap_or(core::mem::zeroed())), 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 { @@ -138,7 +138,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(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), core::mem::transmute(flags), core::mem::transmute(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() + D3DGetTraceInstructionOffsets(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), core::mem::transmute(flags), core::mem::transmute(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::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D11")] #[inline] @@ -154,7 +154,7 @@ where P4: 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(core::mem::transmute(psrcdata), core::mem::transmute(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() + D3DPreprocess(core::mem::transmute(psrcdata), core::mem::transmute(srcdatasize), psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), core::mem::transmute(ppcodetext), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn D3DReadFileToBlob(pfilename: P0) -> windows_core::Result 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 d37c186a77..6f94b1b39e 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 P4: 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(core::mem::transmute(pdata), core::mem::transmute(datalength), psrcfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), core::mem::transmute(hlslflags), core::mem::transmute(fxflags), core::mem::transmute(ppcompiledeffect), core::mem::transmute(pperrors.unwrap_or(core::ptr::null_mut()))).ok() + D3D10CompileEffectFromMemory(core::mem::transmute(pdata), core::mem::transmute(datalength), psrcfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::mem::zeroed())), pinclude.param().abi(), core::mem::transmute(hlslflags), core::mem::transmute(fxflags), core::mem::transmute(ppcompiledeffect), core::mem::transmute(pperrors.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] #[inline] @@ -18,7 +18,7 @@ where P6: 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(core::ptr::null())), pinclude.param().abi(), pfunctionname.param().abi(), pprofile.param().abi(), core::mem::transmute(flags), core::mem::transmute(ppshader), core::mem::transmute(pperrormsgs.unwrap_or(core::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::mem::zeroed())), pinclude.param().abi(), pfunctionname.param().abi(), pprofile.param().abi(), core::mem::transmute(flags), core::mem::transmute(ppshader), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] #[inline] @@ -29,43 +29,39 @@ pub unsafe fn D3D10CreateBlob(numbytes: usize) -> windows_core::Result(padapter: P0, drivertype: D3D10_DRIVER_TYPE, software: P2, flags: u32, sdkversion: u32, ppdevice: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn D3D10CreateDevice(padapter: P0, drivertype: D3D10_DRIVER_TYPE, software: super::super::Foundation::HMODULE, flags: u32, sdkversion: u32, ppdevice: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: 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(), core::mem::transmute(drivertype), software.param().abi(), core::mem::transmute(flags), core::mem::transmute(sdkversion), core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut()))).ok() + D3D10CreateDevice(padapter.param().abi(), core::mem::transmute(drivertype), core::mem::transmute(software), core::mem::transmute(flags), core::mem::transmute(sdkversion), core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi")] #[inline] -pub unsafe fn D3D10CreateDevice1(padapter: P0, drivertype: D3D10_DRIVER_TYPE, software: P2, flags: u32, hardwarelevel: D3D10_FEATURE_LEVEL1, sdkversion: u32, ppdevice: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn D3D10CreateDevice1(padapter: P0, drivertype: D3D10_DRIVER_TYPE, software: super::super::Foundation::HMODULE, flags: u32, hardwarelevel: D3D10_FEATURE_LEVEL1, sdkversion: u32, ppdevice: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: 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(), core::mem::transmute(drivertype), software.param().abi(), core::mem::transmute(flags), core::mem::transmute(hardwarelevel), core::mem::transmute(sdkversion), core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut()))).ok() + D3D10CreateDevice1(padapter.param().abi(), core::mem::transmute(drivertype), core::mem::transmute(software), core::mem::transmute(flags), core::mem::transmute(hardwarelevel), core::mem::transmute(sdkversion), core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] #[inline] -pub unsafe fn D3D10CreateDeviceAndSwapChain(padapter: P0, drivertype: D3D10_DRIVER_TYPE, software: P2, flags: u32, sdkversion: u32, pswapchaindesc: Option<*const super::Dxgi::DXGI_SWAP_CHAIN_DESC>, ppswapchain: Option<*mut Option>, ppdevice: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn D3D10CreateDeviceAndSwapChain(padapter: P0, drivertype: D3D10_DRIVER_TYPE, software: super::super::Foundation::HMODULE, flags: u32, sdkversion: u32, pswapchaindesc: Option<*const super::Dxgi::DXGI_SWAP_CHAIN_DESC>, ppswapchain: Option<*mut Option>, ppdevice: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: 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(), core::mem::transmute(drivertype), software.param().abi(), core::mem::transmute(flags), core::mem::transmute(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() + D3D10CreateDeviceAndSwapChain(padapter.param().abi(), core::mem::transmute(drivertype), core::mem::transmute(software), core::mem::transmute(flags), core::mem::transmute(sdkversion), core::mem::transmute(pswapchaindesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppswapchain.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] #[inline] -pub unsafe fn D3D10CreateDeviceAndSwapChain1(padapter: P0, drivertype: D3D10_DRIVER_TYPE, software: P2, flags: u32, hardwarelevel: D3D10_FEATURE_LEVEL1, sdkversion: u32, pswapchaindesc: Option<*const super::Dxgi::DXGI_SWAP_CHAIN_DESC>, ppswapchain: Option<*mut Option>, ppdevice: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn D3D10CreateDeviceAndSwapChain1(padapter: P0, drivertype: D3D10_DRIVER_TYPE, software: super::super::Foundation::HMODULE, flags: u32, hardwarelevel: D3D10_FEATURE_LEVEL1, sdkversion: u32, pswapchaindesc: Option<*const super::Dxgi::DXGI_SWAP_CHAIN_DESC>, ppswapchain: Option<*mut Option>, ppdevice: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: 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(), core::mem::transmute(drivertype), software.param().abi(), core::mem::transmute(flags), core::mem::transmute(hardwarelevel), core::mem::transmute(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() + D3D10CreateDeviceAndSwapChain1(padapter.param().abi(), core::mem::transmute(drivertype), core::mem::transmute(software), core::mem::transmute(flags), core::mem::transmute(hardwarelevel), core::mem::transmute(sdkversion), core::mem::transmute(pswapchaindesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppswapchain.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn D3D10CreateEffectFromMemory(pdata: *const core::ffi::c_void, datalength: usize, fxflags: u32, pdevice: P3, peffectpool: P4) -> windows_core::Result @@ -177,7 +173,7 @@ where P4: 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(core::ptr::null())), pinclude.param().abi(), core::mem::transmute(ppshadertext), core::mem::transmute(pperrormsgs.unwrap_or(core::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::mem::zeroed())), pinclude.param().abi(), core::mem::transmute(ppshadertext), core::mem::transmute(pperrormsgs.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn D3D10ReflectShader(pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize) -> windows_core::Result { @@ -3011,7 +3007,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(core::ptr::null_mut())), core::mem::transmute(datasize), core::mem::transmute(getdataflags)).ok() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(datasize), core::mem::transmute(getdataflags)).ok() } pub unsafe fn GetDataSize(&self) -> u32 { (windows_core::Interface::vtable(self).GetDataSize)(windows_core::Interface::as_raw(self)) @@ -3470,7 +3466,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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppvertexbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstrides.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IASetIndexBuffer(&self, pindexbuffer: P0, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32) @@ -3536,7 +3532,7 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).OMSetDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencilstate.param().abi(), core::mem::transmute(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), core::mem::transmute(numbuffers), core::mem::transmute(ppsotargets.unwrap_or(core::ptr::null())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), core::mem::transmute(numbuffers), core::mem::transmute(ppsotargets.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } pub unsafe fn DrawAuto(&self) { (windows_core::Interface::vtable(self).DrawAuto)(windows_core::Interface::as_raw(self)) @@ -3558,7 +3554,7 @@ impl ID3D10Device { P0: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(dstx), core::mem::transmute(dsty), core::mem::transmute(dstz), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(dstx), core::mem::transmute(dsty), core::mem::transmute(dstz), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))) } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -3571,7 +3567,7 @@ impl ID3D10Device { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch)) + (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch)) } pub unsafe fn ClearRenderTargetView(&self, prendertargetview: P0, colorrgba: &[f32; 4]) where @@ -3627,11 +3623,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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppvertexbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstrides.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(format.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IAGetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pindexbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(format.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).GSGetConstantBuffers)(windows_core::Interface::as_raw(self), core::mem::transmute(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()))) @@ -3654,7 +3650,7 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).VSGetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(ppredicatevalue.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetPredication)(windows_core::Interface::as_raw(self), core::mem::transmute(pppredicate.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppredicatevalue.unwrap_or(core::mem::zeroed()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).GSGetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(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()))) @@ -3663,16 +3659,16 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).GSGetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))) } 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(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()))) + (windows_core::Interface::vtable(self).OMGetBlendState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(blendfactor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(psamplemask.unwrap_or(core::mem::zeroed()))) } 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(core::ptr::null_mut())), core::mem::transmute(pstencilref.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).OMGetDepthStencilState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdepthstencilstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstencilref.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(numbuffers), core::mem::transmute(ppsotargets.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).SOGetTargets)(windows_core::Interface::as_raw(self), core::mem::transmute(numbuffers), core::mem::transmute(ppsotargets.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } pub unsafe fn RSGetState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3680,10 +3676,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), core::mem::transmute(numviewports), core::mem::transmute(pviewports.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).RSGetViewports)(windows_core::Interface::as_raw(self), core::mem::transmute(numviewports), core::mem::transmute(pviewports.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(numrects), core::mem::transmute(prects.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).RSGetScissorRects)(windows_core::Interface::as_raw(self), core::mem::transmute(numrects), core::mem::transmute(prects.unwrap_or(core::mem::zeroed()))) } pub unsafe fn GetDeviceRemovedReason(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceRemovedReason)(windows_core::Interface::as_raw(self)).ok() @@ -3695,10 +3691,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), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -3713,80 +3709,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), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), &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(core::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppsrview.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(pprtview.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pprtview.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(ppdepthstencilview.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppdepthstencilview.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed()))).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(core::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::mem::zeroed()))).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(core::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::mem::zeroed()))).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()), core::mem::transmute(outputstreamstride), core::mem::transmute(ppgeometryshader.unwrap_or(core::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()), core::mem::transmute(outputstreamstride), core::mem::transmute(ppgeometryshader.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed()))).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), core::mem::transmute(pblendstatedesc), core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), core::mem::transmute(pblendstatedesc), core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdepthstencildesc), core::mem::transmute(ppdepthstencilstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), core::mem::transmute(pdepthstencildesc), core::mem::transmute(ppdepthstencilstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(prasterizerdesc), core::mem::transmute(pprasterizerstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), core::mem::transmute(prasterizerdesc), core::mem::transmute(pprasterizerstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(psamplerdesc), core::mem::transmute(ppsamplerstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), core::mem::transmute(psamplerdesc), core::mem::transmute(ppsamplerstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pquerydesc), core::mem::transmute(ppquery.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), core::mem::transmute(pquerydesc), core::mem::transmute(ppquery.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ppredicatedesc), core::mem::transmute(pppredicate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), core::mem::transmute(ppredicatedesc), core::mem::transmute(pppredicate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pcounterdesc), core::mem::transmute(ppcounter.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), core::mem::transmute(pcounterdesc), core::mem::transmute(ppcounter.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CheckFormatSupport(&self, format: super::Dxgi::Common::DXGI_FORMAT) -> windows_core::Result { @@ -3803,23 +3799,32 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).CheckCounterInfo)(windows_core::Interface::as_raw(self), &mut result__); 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), core::mem::transmute(pdesc), core::mem::transmute(ptype), core::mem::transmute(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 CheckCounter(&self, pdesc: *const D3D10_COUNTER_DESC, ptype: *mut D3D10_COUNTER_TYPE, pactivecounters: *mut u32, szname: Option, pnamelength: Option<*mut u32>, szunits: Option, punitslength: Option<*mut u32>, szdescription: Option, pdescriptionlength: Option<*mut u32>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CheckCounter)( + windows_core::Interface::as_raw(self), + core::mem::transmute(pdesc), + core::mem::transmute(ptype), + core::mem::transmute(pactivecounters), + core::mem::transmute(szname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pnamelength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(szunits.unwrap_or(core::mem::zeroed())), + core::mem::transmute(punitslength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(szdescription.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdescriptionlength.unwrap_or(core::mem::zeroed())), + ) + .ok() } pub unsafe fn GetCreationFlags(&self) -> u32 { (windows_core::Interface::vtable(self).GetCreationFlags)(windows_core::Interface::as_raw(self)) } - pub unsafe fn OpenSharedResource(&self, hresource: P0, returnedinterface: *const windows_core::GUID, ppresource: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OpenSharedResource)(windows_core::Interface::as_raw(self), hresource.param().abi(), core::mem::transmute(returnedinterface), core::mem::transmute(ppresource.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn OpenSharedResource(&self, hresource: super::super::Foundation::HANDLE, returnedinterface: *const windows_core::GUID, ppresource: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OpenSharedResource)(windows_core::Interface::as_raw(self), core::mem::transmute(hresource), core::mem::transmute(returnedinterface), core::mem::transmute(ppresource.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetTextFilterSize(&self, width: u32, height: u32) { (windows_core::Interface::vtable(self).SetTextFilterSize)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pheight.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetTextFilterSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth.unwrap_or(core::mem::zeroed())), core::mem::transmute(pheight.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -4597,10 +4602,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(core::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppsrview.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pblendstatedesc), core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), core::mem::transmute(pblendstatedesc), core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetFeatureLevel(&self) -> D3D10_FEATURE_LEVEL1 { (windows_core::Interface::vtable(self).GetFeatureLevel)(windows_core::Interface::as_raw(self)) @@ -4663,10 +4668,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), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -6934,7 +6939,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), core::mem::transmute(messageindex), core::mem::transmute(pmessage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pmessagebytelength)).ok() + (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(messageindex), core::mem::transmute(pmessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmessagebytelength)).ok() } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) @@ -6958,7 +6963,7 @@ impl ID3D10InfoQueue { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pfilterbytelength)).ok() + (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterbytelength)).ok() } pub unsafe fn ClearStorageFilter(&self) { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) @@ -6982,7 +6987,7 @@ impl ID3D10InfoQueue { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pfilterbytelength)).ok() + (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(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/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs index fe154714c0..efa2fee6e9 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs @@ -1,46 +1,44 @@ #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi"))] #[inline] -pub unsafe fn D3D11CreateDevice(padapter: P0, drivertype: super::Direct3D::D3D_DRIVER_TYPE, software: P2, flags: D3D11_CREATE_DEVICE_FLAG, pfeaturelevels: Option<&[super::Direct3D::D3D_FEATURE_LEVEL]>, sdkversion: u32, ppdevice: Option<*mut Option>, pfeaturelevel: Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppimmediatecontext: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn D3D11CreateDevice(padapter: P0, drivertype: super::Direct3D::D3D_DRIVER_TYPE, software: super::super::Foundation::HMODULE, flags: D3D11_CREATE_DEVICE_FLAG, pfeaturelevels: Option<&[super::Direct3D::D3D_FEATURE_LEVEL]>, sdkversion: u32, ppdevice: Option<*mut Option>, pfeaturelevel: Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppimmediatecontext: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: 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(), core::mem::transmute(drivertype), - software.param().abi(), + core::mem::transmute(software), core::mem::transmute(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()), core::mem::transmute(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())), + core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfeaturelevel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppimmediatecontext.unwrap_or(core::mem::zeroed())), ) .ok() } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] #[inline] -pub unsafe fn D3D11CreateDeviceAndSwapChain(padapter: P0, drivertype: super::Direct3D::D3D_DRIVER_TYPE, software: P2, flags: D3D11_CREATE_DEVICE_FLAG, pfeaturelevels: Option<&[super::Direct3D::D3D_FEATURE_LEVEL]>, sdkversion: u32, pswapchaindesc: Option<*const super::Dxgi::DXGI_SWAP_CHAIN_DESC>, ppswapchain: Option<*mut Option>, ppdevice: Option<*mut Option>, pfeaturelevel: Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppimmediatecontext: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn D3D11CreateDeviceAndSwapChain(padapter: P0, drivertype: super::Direct3D::D3D_DRIVER_TYPE, software: super::super::Foundation::HMODULE, flags: D3D11_CREATE_DEVICE_FLAG, pfeaturelevels: Option<&[super::Direct3D::D3D_FEATURE_LEVEL]>, sdkversion: u32, pswapchaindesc: Option<*const super::Dxgi::DXGI_SWAP_CHAIN_DESC>, ppswapchain: Option<*mut Option>, ppdevice: Option<*mut Option>, pfeaturelevel: Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppimmediatecontext: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("d3d11.dll" "system" fn D3D11CreateDeviceAndSwapChain(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, pswapchaindesc : *const super::Dxgi:: DXGI_SWAP_CHAIN_DESC, ppswapchain : *mut * mut core::ffi::c_void, ppdevice : *mut * mut core::ffi::c_void, pfeaturelevel : *mut super::Direct3D:: D3D_FEATURE_LEVEL, ppimmediatecontext : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); D3D11CreateDeviceAndSwapChain( padapter.param().abi(), core::mem::transmute(drivertype), - software.param().abi(), + core::mem::transmute(software), core::mem::transmute(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()), core::mem::transmute(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())), - core::mem::transmute(pfeaturelevel.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(ppimmediatecontext.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pswapchaindesc.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppswapchain.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfeaturelevel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppimmediatecontext.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -6961,11 +6959,11 @@ impl ID3D11ClassInstance { pub unsafe fn GetDesc(&self, pdesc: *mut D3D11_CLASS_INSTANCE_DESC) { (windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc)) } - pub unsafe fn GetInstanceName(&self, pinstancename: windows_core::PSTR, pbufferlength: *mut usize) { - (windows_core::Interface::vtable(self).GetInstanceName)(windows_core::Interface::as_raw(self), core::mem::transmute(pinstancename), core::mem::transmute(pbufferlength)) + pub unsafe fn GetInstanceName(&self, pinstancename: Option, pbufferlength: *mut usize) { + (windows_core::Interface::vtable(self).GetInstanceName)(windows_core::Interface::as_raw(self), core::mem::transmute(pinstancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbufferlength)) } - pub unsafe fn GetTypeName(&self, ptypename: windows_core::PSTR, pbufferlength: *mut usize) { - (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), core::mem::transmute(ptypename), core::mem::transmute(pbufferlength)) + pub unsafe fn GetTypeName(&self, ptypename: Option, pbufferlength: *mut usize) { + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), core::mem::transmute(ptypename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbufferlength)) } } #[repr(C)] @@ -7501,63 +7499,63 @@ windows_core::imp::define_interface!(ID3D11Device, ID3D11Device_Vtbl, 0xdb6f6ddb 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), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture1d.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture1d.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture2d.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture2d.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture3d.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture3d.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppsrview.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(ppuaview.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppuaview.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(pprtview.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pprtview.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(ppdepthstencilview.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppdepthstencilview.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, ppvertexshader: Option<*mut Option>) -> windows_core::Result<()> where P2: 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(core::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::mem::zeroed()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> where P2: 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(core::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::mem::zeroed()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: Option<&[D3D11_SO_DECLARATION_ENTRY]>, pbufferstrides: Option<&[u32]>, rasterizedstream: u32, pclasslinkage: P7, ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> where @@ -7573,7 +7571,7 @@ impl ID3D11Device { pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rasterizedstream), pclasslinkage.param().abi(), - core::mem::transmute(ppgeometryshader.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppgeometryshader.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -7581,60 +7579,59 @@ impl ID3D11Device { where P2: 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(core::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::mem::zeroed()))).ok() } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, pphullshader: Option<*mut Option>) -> windows_core::Result<()> where P2: 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(core::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::mem::zeroed()))).ok() } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, ppdomainshader: Option<*mut Option>) -> windows_core::Result<()> where P2: 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(core::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::mem::zeroed()))).ok() } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P2, ppcomputeshader: Option<*mut Option>) -> windows_core::Result<()> where P2: 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(core::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::mem::zeroed()))).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), core::mem::transmute(pblendstatedesc), core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), core::mem::transmute(pblendstatedesc), core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdepthstencildesc), core::mem::transmute(ppdepthstencilstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), core::mem::transmute(pdepthstencildesc), core::mem::transmute(ppdepthstencilstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(prasterizerdesc), core::mem::transmute(pprasterizerstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), core::mem::transmute(prasterizerdesc), core::mem::transmute(pprasterizerstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(psamplerdesc), core::mem::transmute(ppsamplerstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), core::mem::transmute(psamplerdesc), core::mem::transmute(ppsamplerstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pquerydesc), core::mem::transmute(ppquery.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), core::mem::transmute(pquerydesc), core::mem::transmute(ppquery.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ppredicatedesc), core::mem::transmute(pppredicate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), core::mem::transmute(ppredicatedesc), core::mem::transmute(pppredicate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pcounterdesc), core::mem::transmute(ppcounter.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), core::mem::transmute(pcounterdesc), core::mem::transmute(ppcounter.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(contextflags), core::mem::transmute(ppdeferredcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeferredContext)(windows_core::Interface::as_raw(self), core::mem::transmute(contextflags), core::mem::transmute(ppdeferredcontext.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn OpenSharedResource(&self, hresource: P0, result__: *mut Option) -> windows_core::Result<()> + pub unsafe fn OpenSharedResource(&self, hresource: super::super::Foundation::HANDLE, result__: *mut Option) -> windows_core::Result<()> where - P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).OpenSharedResource)(windows_core::Interface::as_raw(self), hresource.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).OpenSharedResource)(windows_core::Interface::as_raw(self), core::mem::transmute(hresource), &T::IID, result__ as *mut _ as *mut _).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CheckFormatSupport(&self, format: super::Dxgi::Common::DXGI_FORMAT) -> windows_core::Result { @@ -7651,17 +7648,29 @@ impl ID3D11Device { (windows_core::Interface::vtable(self).CheckCounterInfo)(windows_core::Interface::as_raw(self), &mut result__); 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), core::mem::transmute(pdesc), core::mem::transmute(ptype), core::mem::transmute(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 CheckCounter(&self, pdesc: *const D3D11_COUNTER_DESC, ptype: *mut D3D11_COUNTER_TYPE, pactivecounters: *mut u32, szname: Option, pnamelength: Option<*mut u32>, szunits: Option, punitslength: Option<*mut u32>, szdescription: Option, pdescriptionlength: Option<*mut u32>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CheckCounter)( + windows_core::Interface::as_raw(self), + core::mem::transmute(pdesc), + core::mem::transmute(ptype), + core::mem::transmute(pactivecounters), + core::mem::transmute(szname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pnamelength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(szunits.unwrap_or(core::mem::zeroed())), + core::mem::transmute(punitslength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(szdescription.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdescriptionlength.unwrap_or(core::mem::zeroed())), + ) + .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), core::mem::transmute(feature), core::mem::transmute(pfeaturesupportdata), core::mem::transmute(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), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -8061,25 +8070,24 @@ 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), core::mem::transmute(contextflags), core::mem::transmute(ppdeferredcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeferredContext1)(windows_core::Interface::as_raw(self), core::mem::transmute(contextflags), core::mem::transmute(ppdeferredcontext.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pblendstatedesc), core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), core::mem::transmute(pblendstatedesc), core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(prasterizerdesc), core::mem::transmute(pprasterizerstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRasterizerState1)(windows_core::Interface::as_raw(self), core::mem::transmute(prasterizerdesc), core::mem::transmute(pprasterizerstate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(flags), core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), core::mem::transmute(sdkversion), core::mem::transmute(emulatedinterface), core::mem::transmute(pchosenfeaturelevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppcontextstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeviceContextState)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), core::mem::transmute(sdkversion), core::mem::transmute(emulatedinterface), core::mem::transmute(pchosenfeaturelevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcontextstate.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn OpenSharedResource1(&self, hresource: P0) -> windows_core::Result + pub unsafe fn OpenSharedResource1(&self, hresource: super::super::Foundation::HANDLE) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).OpenSharedResource1)(windows_core::Interface::as_raw(self), hresource.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenSharedResource1)(windows_core::Interface::as_raw(self), core::mem::transmute(hresource), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn OpenSharedResourceByName(&self, lpname: P0, dwdesiredaccess: u32) -> windows_core::Result where @@ -8181,7 +8189,7 @@ 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), core::mem::transmute(contextflags), core::mem::transmute(ppdeferredcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeferredContext2)(windows_core::Interface::as_raw(self), core::mem::transmute(contextflags), core::mem::transmute(ppdeferredcontext.unwrap_or(core::mem::zeroed()))).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 @@ -8190,10 +8198,10 @@ impl ID3D11Device2 { (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())), + core::mem::transmute(pnumtilesforentireresource.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppackedmipdesc.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pstandardtileshapefornonpackedmips.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pnumsubresourcetilings.unwrap_or(core::mem::zeroed())), core::mem::transmute(firstsubresourcetilingtoget), core::mem::transmute(psubresourcetilingsfornonpackedmips), ) @@ -8276,38 +8284,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), core::mem::transmute(pdesc1), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture2d.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture2D1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc1), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture2d.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdesc1), core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture3d.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture3D1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc1), core::mem::transmute(pinitialdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptexture3d.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(prasterizerdesc), core::mem::transmute(pprasterizerstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRasterizerState2)(windows_core::Interface::as_raw(self), core::mem::transmute(prasterizerdesc), core::mem::transmute(pprasterizerstate.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(ppsrview1.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppsrview1.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(ppuaview1.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ppuaview1.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(pprtview1.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pprtview1.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pquerydesc1), core::mem::transmute(ppquery1.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateQuery1)(windows_core::Interface::as_raw(self), core::mem::transmute(pquerydesc1), core::mem::transmute(ppquery1.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetImmediateContext3(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8315,19 +8323,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), core::mem::transmute(contextflags), core::mem::transmute(ppdeferredcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeferredContext3)(windows_core::Interface::as_raw(self), core::mem::transmute(contextflags), core::mem::transmute(ppdeferredcontext.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch)) + (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch)) } pub unsafe fn ReadFromSubresource(&self, pdstdata: *mut core::ffi::c_void, dstrowpitch: u32, dstdepthpitch: u32, psrcresource: P3, srcsubresource: u32, psrcbox: Option<*const D3D11_BOX>) where P3: windows_core::Param, { - (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstdata), core::mem::transmute(dstrowpitch), core::mem::transmute(dstdepthpitch), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstdata), core::mem::transmute(dstrowpitch), core::mem::transmute(dstdepthpitch), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -8455,12 +8463,9 @@ impl core::ops::Deref for ID3D11Device4 { } windows_core::imp::interface_hierarchy!(ID3D11Device4, windows_core::IUnknown, ID3D11Device, ID3D11Device1, ID3D11Device2, ID3D11Device3); impl ID3D11Device4 { - pub unsafe fn RegisterDeviceRemovedEvent(&self, hevent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RegisterDeviceRemovedEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterDeviceRemovedEvent)(windows_core::Interface::as_raw(self), hevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterDeviceRemovedEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), &mut result__).map(|| result__) } pub unsafe fn UnregisterDeviceRemoved(&self, dwcookie: u32) { (windows_core::Interface::vtable(self).UnregisterDeviceRemoved)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)) @@ -8519,12 +8524,11 @@ impl core::ops::Deref for ID3D11Device5 { } windows_core::imp::interface_hierarchy!(ID3D11Device5, windows_core::IUnknown, ID3D11Device, ID3D11Device1, ID3D11Device2, ID3D11Device3, ID3D11Device4); impl ID3D11Device5 { - pub unsafe fn OpenSharedFence(&self, hfence: P0, result__: *mut Option) -> windows_core::Result<()> + pub unsafe fn OpenSharedFence(&self, hfence: super::super::Foundation::HANDLE, result__: *mut Option) -> windows_core::Result<()> where - P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).OpenSharedFence)(windows_core::Interface::as_raw(self), hfence.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).OpenSharedFence)(windows_core::Interface::as_raw(self), core::mem::transmute(hfence), &T::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D11_FENCE_FLAG, result__: *mut Option) -> windows_core::Result<()> where @@ -8580,10 +8584,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), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -8679,7 +8683,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(subresource), core::mem::transmute(maptype), core::mem::transmute(mapflags), core::mem::transmute(pmappedresource.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(subresource), core::mem::transmute(maptype), core::mem::transmute(mapflags), core::mem::transmute(pmappedresource.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Unmap(&self, presource: P0, subresource: u32) where @@ -8697,7 +8701,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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppvertexbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstrides.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IASetIndexBuffer(&self, pindexbuffer: P0, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32) @@ -8747,7 +8751,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(core::ptr::null_mut())), core::mem::transmute(datasize), core::mem::transmute(getdataflags)).ok() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pasync.param().abi(), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(datasize), core::mem::transmute(getdataflags)).ok() } pub unsafe fn SetPredication(&self, ppredicate: P0, predicatevalue: P1) where @@ -8772,7 +8776,7 @@ impl ID3D11DeviceContext { where P2: 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(), core::mem::transmute(uavstartslot), core::mem::transmute(numuavs), core::mem::transmute(ppunorderedaccessviews.unwrap_or(core::ptr::null())), core::mem::transmute(puavinitialcounts.unwrap_or(core::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(), core::mem::transmute(uavstartslot), core::mem::transmute(numuavs), core::mem::transmute(ppunorderedaccessviews.unwrap_or(core::mem::zeroed())), core::mem::transmute(puavinitialcounts.unwrap_or(core::mem::zeroed()))) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: Option<&[f32; 4]>, samplemask: u32) where @@ -8787,7 +8791,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).OMSetDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencilstate.param().abi(), core::mem::transmute(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), core::mem::transmute(numbuffers), core::mem::transmute(ppsotargets.unwrap_or(core::ptr::null())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), core::mem::transmute(numbuffers), core::mem::transmute(ppsotargets.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } pub unsafe fn DrawAuto(&self) { (windows_core::Interface::vtable(self).DrawAuto)(windows_core::Interface::as_raw(self)) @@ -8830,7 +8834,7 @@ impl ID3D11DeviceContext { P0: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(dstx), core::mem::transmute(dsty), core::mem::transmute(dstz), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(dstx), core::mem::transmute(dsty), core::mem::transmute(dstz), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))) } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -8843,7 +8847,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch)) + (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch)) } pub unsafe fn CopyStructureCount(&self, pdstbuffer: P0, dstalignedbyteoffset: u32, psrcview: P2) where @@ -8943,7 +8947,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).CSSetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(startslot), core::mem::transmute(numuavs), core::mem::transmute(ppunorderedaccessviews.unwrap_or(core::ptr::null())), core::mem::transmute(puavinitialcounts.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).CSSetUnorderedAccessViews)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numuavs), core::mem::transmute(ppunorderedaccessviews.unwrap_or(core::mem::zeroed())), core::mem::transmute(puavinitialcounts.unwrap_or(core::mem::zeroed()))) } pub unsafe fn CSSetShader(&self, pcomputeshader: P0, ppclassinstances: Option<&[Option]>) where @@ -8964,13 +8968,13 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).PSGetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pnumclassinstances.unwrap_or(core::mem::zeroed()))) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).PSGetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pnumclassinstances.unwrap_or(core::mem::zeroed()))) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).PSGetConstantBuffers)(windows_core::Interface::as_raw(self), core::mem::transmute(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()))) @@ -8981,17 +8985,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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppvertexbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstrides.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffsets.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(format.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IAGetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pindexbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(format.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).GSGetConstantBuffers)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pnumclassinstances.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn IAGetPrimitiveTopology(&self) -> super::Direct3D::D3D_PRIMITIVE_TOPOLOGY { @@ -9006,7 +9010,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).VSGetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(ppredicatevalue.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetPredication)(windows_core::Interface::as_raw(self), core::mem::transmute(pppredicate.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppredicatevalue.unwrap_or(core::mem::zeroed()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).GSGetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(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()))) @@ -9015,24 +9019,24 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).GSGetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))) } 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(core::ptr::null_mut())), + core::mem::transmute(ppdepthstencilview.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(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()))) + (windows_core::Interface::vtable(self).OMGetBlendState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppblendstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(blendfactor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(psamplemask.unwrap_or(core::mem::zeroed()))) } 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(core::ptr::null_mut())), core::mem::transmute(pstencilref.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).OMGetDepthStencilState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdepthstencilstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstencilref.unwrap_or(core::mem::zeroed()))) } 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()))) @@ -9043,16 +9047,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), core::mem::transmute(pnumviewports), core::mem::transmute(pviewports.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).RSGetViewports)(windows_core::Interface::as_raw(self), core::mem::transmute(pnumviewports), core::mem::transmute(pviewports.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(pnumrects), core::mem::transmute(prects.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).RSGetScissorRects)(windows_core::Interface::as_raw(self), core::mem::transmute(pnumrects), core::mem::transmute(prects.unwrap_or(core::mem::zeroed()))) } pub unsafe fn HSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).HSGetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pnumclassinstances.unwrap_or(core::mem::zeroed()))) } pub unsafe fn HSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).HSGetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(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()))) @@ -9064,7 +9068,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).DSGetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pnumclassinstances.unwrap_or(core::mem::zeroed()))) } pub unsafe fn DSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).DSGetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(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()))) @@ -9079,7 +9083,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).CSGetUnorderedAccessViews)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pnumclassinstances.unwrap_or(core::mem::zeroed()))) } pub unsafe fn CSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).CSGetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(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()))) @@ -9103,7 +9107,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -9915,13 +9919,13 @@ impl ID3D11DeviceContext1 { P0: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).CopySubresourceRegion1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(dstx), core::mem::transmute(dsty), core::mem::transmute(dstz), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::ptr::null())), core::mem::transmute(copyflags)) + (windows_core::Interface::vtable(self).CopySubresourceRegion1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(dstx), core::mem::transmute(dsty), core::mem::transmute(dstz), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch), core::mem::transmute(copyflags)) + (windows_core::Interface::vtable(self).UpdateSubresource1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch), core::mem::transmute(copyflags)) } pub unsafe fn DiscardResource(&self, presource: P0) where @@ -9936,46 +9940,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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).VSSetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).HSSetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).DSSetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).GSSetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).PSSetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).CSSetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).VSGetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).HSGetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).DSGetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).GSGetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).PSGetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(startslot), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).CSGetConstantBuffers1)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), core::mem::transmute(numbuffers), core::mem::transmute(ppconstantbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfirstconstant.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumconstants.unwrap_or(core::mem::zeroed()))) } 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(core::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::mem::zeroed()))) } pub unsafe fn ClearView(&self, pview: P0, color: &[f32; 4], prect: Option<&[super::super::Foundation::RECT]>) where @@ -10165,13 +10169,13 @@ impl ID3D11DeviceContext2 { windows_core::Interface::as_raw(self), ptiledresource.param().abi(), core::mem::transmute(numtiledresourceregions), - core::mem::transmute(ptiledresourceregionstartcoordinates.unwrap_or(core::ptr::null())), - core::mem::transmute(ptiledresourceregionsizes.unwrap_or(core::ptr::null())), + core::mem::transmute(ptiledresourceregionstartcoordinates.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ptiledresourceregionsizes.unwrap_or(core::mem::zeroed())), ptilepool.param().abi(), core::mem::transmute(numranges), - 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())), + core::mem::transmute(prangeflags.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ptilepoolstartoffsets.unwrap_or(core::mem::zeroed())), + core::mem::transmute(prangetilecounts.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), ) .ok() @@ -10344,11 +10348,8 @@ impl core::ops::Deref for ID3D11DeviceContext3 { } windows_core::imp::interface_hierarchy!(ID3D11DeviceContext3, windows_core::IUnknown, ID3D11DeviceChild, ID3D11DeviceContext, ID3D11DeviceContext1, ID3D11DeviceContext2); impl ID3D11DeviceContext3 { - pub unsafe fn Flush1(&self, contexttype: D3D11_CONTEXT_TYPE, hevent: P1) - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Flush1)(windows_core::Interface::as_raw(self), core::mem::transmute(contexttype), hevent.param().abi()) + pub unsafe fn Flush1(&self, contexttype: D3D11_CONTEXT_TYPE, hevent: Option) { + (windows_core::Interface::vtable(self).Flush1)(windows_core::Interface::as_raw(self), core::mem::transmute(contexttype), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed()))) } pub unsafe fn SetHardwareProtectionState(&self, hwprotectionenable: P0) where @@ -10502,16 +10503,13 @@ impl ID3D11Fence { P2: 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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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)) } - pub unsafe fn SetEventOnCompletion(&self, value: u64, hevent: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventOnCompletion)(windows_core::Interface::as_raw(self), core::mem::transmute(value), hevent.param().abi()).ok() + pub unsafe fn SetEventOnCompletion(&self, value: u64, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventOnCompletion)(windows_core::Interface::as_raw(self), core::mem::transmute(value), core::mem::transmute(hevent)).ok() } } #[repr(C)] @@ -10573,7 +10571,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(core::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::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn SetInputSignature(&self, pinputparameters: &[D3D11_PARAMETER_DESC]) -> windows_core::Result { @@ -10612,7 +10610,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), core::mem::transmute(pperrorbuffer.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GenerateHlsl(&self, uflags: u32) -> windows_core::Result { @@ -10976,7 +10974,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), core::mem::transmute(messageindex), core::mem::transmute(pmessage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pmessagebytelength)).ok() + (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(messageindex), core::mem::transmute(pmessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmessagebytelength)).ok() } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) @@ -11000,7 +10998,7 @@ impl ID3D11InfoQueue { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pfilterbytelength)).ok() + (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterbytelength)).ok() } pub unsafe fn ClearStorageFilter(&self) { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) @@ -11024,7 +11022,7 @@ impl ID3D11InfoQueue { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pfilterbytelength)).ok() + (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterbytelength)).ok() } pub unsafe fn ClearRetrievalFilter(&self) { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self)) @@ -11441,7 +11439,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(), core::mem::transmute(uflags), core::mem::transmute(ppshaderblob), core::mem::transmute(pperrorbuffer.unwrap_or(core::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(), core::mem::transmute(uflags), core::mem::transmute(ppshaderblob), core::mem::transmute(pperrorbuffer.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn UseLibrary(&self, plibrarymi: P0) -> windows_core::Result<()> where @@ -12315,7 +12313,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(core::ptr::null_mut())), core::mem::transmute(psizey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(psizez.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetThreadGroupSize)(windows_core::Interface::as_raw(self), core::mem::transmute(psizex.unwrap_or(core::mem::zeroed())), core::mem::transmute(psizey.unwrap_or(core::mem::zeroed())), core::mem::transmute(psizez.unwrap_or(core::mem::zeroed()))) } pub unsafe fn GetRequiresFlags(&self) -> u64 { (windows_core::Interface::vtable(self).GetRequiresFlags)(windows_core::Interface::as_raw(self)) @@ -12909,7 +12907,7 @@ windows_core::imp::define_interface!(ID3D11ShaderTrace, ID3D11ShaderTrace_Vtbl, 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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).TraceReady)(windows_core::Interface::as_raw(self), core::mem::transmute(ptestcount.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ResetTrace(&self) { (windows_core::Interface::vtable(self).ResetTrace)(windows_core::Interface::as_raw(self)) @@ -13505,7 +13503,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(), core::mem::transmute(contentkeysize), core::mem::transmute(pcontentkey.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DecoderBeginFrame)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), core::mem::transmute(contentkeysize), core::mem::transmute(pcontentkey.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn DecoderEndFrame(&self, pdecoder: P0) -> windows_core::Result<()> where @@ -13530,7 +13528,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(core::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::mem::zeroed()))) } pub unsafe fn VideoProcessorSetOutputBackgroundColor(&self, pvideoprocessor: P0, ycbcr: P1, pcolor: *const D3D11_VIDEO_COLOR) where @@ -13635,21 +13633,21 @@ impl ID3D11VideoContext { P0: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(outputrate), repeatframe.param().abi(), core::mem::transmute(pcustomrate.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(outputrate), repeatframe.param().abi(), core::mem::transmute(pcustomrate.unwrap_or(core::mem::zeroed()))) } pub unsafe fn VideoProcessorSetStreamSourceRect(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) } pub unsafe fn VideoProcessorSetStreamDestRect(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) } pub unsafe fn VideoProcessorSetStreamAlpha(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, alpha: f32) where @@ -13670,7 +13668,7 @@ impl ID3D11VideoContext { P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(psourceaspectratio.unwrap_or(core::ptr::null())), core::mem::transmute(pdestinationaspectratio.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(psourceaspectratio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdestinationaspectratio.unwrap_or(core::mem::zeroed()))) } pub unsafe fn VideoProcessorSetStreamLumaKey(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, lower: f32, upper: f32) where @@ -13813,7 +13811,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(), core::mem::transmute(ivsize), core::mem::transmute(piv.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).EncryptionBlt)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), psrcsurface.param().abi(), pdstsurface.param().abi(), core::mem::transmute(ivsize), core::mem::transmute(piv.unwrap_or(core::mem::zeroed()))) } 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 @@ -13821,7 +13819,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(core::ptr::null())), core::mem::transmute(contentkeysize), core::mem::transmute(pcontentkey.unwrap_or(core::ptr::null())), core::mem::transmute(ivsize), core::mem::transmute(piv.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(contentkeysize), core::mem::transmute(pcontentkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(ivsize), core::mem::transmute(piv.unwrap_or(core::mem::zeroed()))) } pub unsafe fn StartSessionKeyRefresh(&self, pcryptosession: P0, randomnumbersize: u32, prandomnumber: *mut core::ffi::c_void) where @@ -14604,28 +14602,28 @@ impl ID3D11VideoContext2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(phdrmetadata.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(phdrmetadata.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(ptype), core::mem::transmute(size), core::mem::transmute(pmetadata.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).VideoProcessorGetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(ptype), core::mem::transmute(size), core::mem::transmute(pmetadata.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(streamindex), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(phdrmetadata.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(phdrmetadata.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(streamindex), core::mem::transmute(ptype), core::mem::transmute(size), core::mem::transmute(pmetadata.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).VideoProcessorGetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(ptype), core::mem::transmute(size), core::mem::transmute(pmetadata.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -14706,7 +14704,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(), core::mem::transmute(contentkeysize), core::mem::transmute(pcontentkey.unwrap_or(core::ptr::null())), core::mem::transmute(numcomponenthistograms), core::mem::transmute(phistogramoffsets.unwrap_or(core::ptr::null())), core::mem::transmute(pphistogrambuffers.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DecoderBeginFrame1)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), core::mem::transmute(contentkeysize), core::mem::transmute(pcontentkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(numcomponenthistograms), core::mem::transmute(phistogramoffsets.unwrap_or(core::mem::zeroed())), core::mem::transmute(pphistogrambuffers.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SubmitDecoderBuffers2(&self, pdecoder: P0, pbufferdesc: &[D3D11_VIDEO_DECODER_BUFFER_DESC2]) -> windows_core::Result<()> where @@ -14875,27 +14873,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), core::mem::transmute(pcryptotype), core::mem::transmute(pdecoderprofile.unwrap_or(core::ptr::null())), core::mem::transmute(pkeyexchangetype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateCryptoSession)(windows_core::Interface::as_raw(self), core::mem::transmute(pcryptotype), core::mem::transmute(pdecoderprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(pdesc), core::mem::transmute(ppvdovview.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVideoDecoderOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc), core::mem::transmute(ppvdovview.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(pdesc), core::mem::transmute(ppvpiview.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVideoProcessorInputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), core::mem::transmute(pdesc), core::mem::transmute(ppvpiview.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(pdesc), core::mem::transmute(ppvpoview.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVideoProcessorOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), core::mem::transmute(pdesc), core::mem::transmute(ppvpoview.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateVideoProcessorEnumerator(&self, pdesc: *const D3D11_VIDEO_PROCESSOR_CONTENT_DESC) -> windows_core::Result { @@ -14924,14 +14922,14 @@ impl ID3D11VideoDevice { (windows_core::Interface::vtable(self).GetVideoDecoderConfig)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(index), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(pdecoderprofile.unwrap_or(core::ptr::null())), core::mem::transmute(pcaps)).ok() + (windows_core::Interface::vtable(self).GetContentProtectionCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcryptotype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdecoderprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(pcryptotype), core::mem::transmute(pdecoderprofile.unwrap_or(core::ptr::null())), core::mem::transmute(index), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CheckCryptoKeyExchange)(windows_core::Interface::as_raw(self), core::mem::transmute(pcryptotype), core::mem::transmute(pdecoderprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -15162,12 +15160,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), core::mem::transmute(pcryptotype), core::mem::transmute(pdecoderprofile.unwrap_or(core::ptr::null())), core::mem::transmute(pkeyexchangetype), core::mem::transmute(pprivateinputsize), core::mem::transmute(pprivateoutputsize)).ok() + (windows_core::Interface::vtable(self).GetCryptoSessionPrivateDataSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcryptotype), core::mem::transmute(pdecoderprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pkeyexchangetype), core::mem::transmute(pprivateinputsize), core::mem::transmute(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), core::mem::transmute(pdecoderprofile), core::mem::transmute(samplewidth), core::mem::transmute(sampleheight), core::mem::transmute(pframerate), core::mem::transmute(bitrate), core::mem::transmute(pcryptotype.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVideoDecoderCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pdecoderprofile), core::mem::transmute(samplewidth), core::mem::transmute(sampleheight), core::mem::transmute(pframerate), core::mem::transmute(bitrate), core::mem::transmute(pcryptotype.unwrap_or(core::mem::zeroed())), &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 671953bbbb..ae2183c30b 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()), core::mem::transmute(nodemask), - 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())), + core::mem::transmute(ppdevice.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppimmediatecontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pchosenfeaturelevel.unwrap_or(core::mem::zeroed())), ) .ok() } 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 5a3ff6aa04..5aa3f4e5ef 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(core::mem::transmute(numfeatures), core::mem::transmute(piids), core::mem::transmute(pconfigurationstructs.unwrap_or(core::ptr::null())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(core::ptr::null()))).ok() + D3D12EnableExperimentalFeatures(core::mem::transmute(numfeatures), core::mem::transmute(piids), core::mem::transmute(pconfigurationstructs.unwrap_or(core::mem::zeroed())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(prootsignature), core::mem::transmute(version), core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(core::ptr::null_mut()))).ok() + D3D12SerializeRootSignature(core::mem::transmute(prootsignature), core::mem::transmute(version), core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(prootsignature), core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(core::ptr::null_mut()))).ok() + D3D12SerializeVersionedRootSignature(core::mem::transmute(prootsignature), core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(core::mem::zeroed()))).ok() } pub const CLSID_D3D12Debug: windows_core::GUID = windows_core::GUID::from_u128(0xf2352aeb_dd84_49fe_b97b_a9dcfdcc1b4f); pub const CLSID_D3D12DeviceFactory: windows_core::GUID = windows_core::GUID::from_u128(0x114863bf_c386_4aee_b39d_8f0bbb062955); @@ -10233,13 +10233,13 @@ impl ID3D12CommandQueue { windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(numresourceregions), - core::mem::transmute(presourceregionstartcoordinates.unwrap_or(core::ptr::null())), - core::mem::transmute(presourceregionsizes.unwrap_or(core::ptr::null())), + core::mem::transmute(presourceregionstartcoordinates.unwrap_or(core::mem::zeroed())), + core::mem::transmute(presourceregionsizes.unwrap_or(core::mem::zeroed())), pheap.param().abi(), core::mem::transmute(numranges), - 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())), + core::mem::transmute(prangeflags.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pheaprangestartoffsets.unwrap_or(core::mem::zeroed())), + core::mem::transmute(prangetilecounts.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), ) } @@ -10254,10 +10254,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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -11306,14 +11306,14 @@ impl ID3D12Device { (windows_core::Interface::vtable(self).CreateRootSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed())), 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(core::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::mem::zeroed())), 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) @@ -11321,27 +11321,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(core::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::mem::zeroed())), 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(core::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::mem::zeroed())), 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(core::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::mem::zeroed())), 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), core::mem::transmute(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), core::mem::transmute(numdestdescriptorranges), core::mem::transmute(pdestdescriptorrangestarts), core::mem::transmute(pdestdescriptorrangesizes.unwrap_or(core::ptr::null())), core::mem::transmute(numsrcdescriptorranges), core::mem::transmute(psrcdescriptorrangestarts), core::mem::transmute(psrcdescriptorrangesizes.unwrap_or(core::ptr::null())), core::mem::transmute(descriptorheapstype)) + (windows_core::Interface::vtable(self).CopyDescriptors)(windows_core::Interface::as_raw(self), core::mem::transmute(numdestdescriptorranges), core::mem::transmute(pdestdescriptorrangestarts), core::mem::transmute(pdestdescriptorrangesizes.unwrap_or(core::mem::zeroed())), core::mem::transmute(numsrcdescriptorranges), core::mem::transmute(psrcdescriptorrangestarts), core::mem::transmute(psrcdescriptorrangesizes.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(numdescriptors), core::mem::transmute(destdescriptorrangestart), core::mem::transmute(srcdescriptorrangestart), core::mem::transmute(descriptorheapstype)) @@ -11362,7 +11362,7 @@ impl ID3D12Device { where T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateCommittedResource)(windows_core::Interface::as_raw(self), core::mem::transmute(pheapproperties), core::mem::transmute(heapflags), core::mem::transmute(pdesc), core::mem::transmute(initialresourcestate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateCommittedResource)(windows_core::Interface::as_raw(self), core::mem::transmute(pheapproperties), core::mem::transmute(heapflags), core::mem::transmute(pdesc), core::mem::transmute(initialresourcestate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), &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 @@ -11376,14 +11376,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(), core::mem::transmute(heapoffset), core::mem::transmute(pdesc), core::mem::transmute(initialstate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::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(), core::mem::transmute(heapoffset), core::mem::transmute(pdesc), core::mem::transmute(initialstate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(pdesc), core::mem::transmute(initialstate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateReservedResource)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(initialstate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), &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: P3) -> windows_core::Result @@ -11392,14 +11392,13 @@ impl ID3D12Device { P3: 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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(access), name.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn OpenSharedHandle(&self, nthandle: P0, result__: *mut Option) -> windows_core::Result<()> + pub unsafe fn OpenSharedHandle(&self, nthandle: super::super::Foundation::HANDLE, result__: *mut Option) -> windows_core::Result<()> where - P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).OpenSharedHandle)(windows_core::Interface::as_raw(self), nthandle.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).OpenSharedHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(nthandle), &T::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn OpenSharedHandleByName(&self, name: P0, access: u32) -> windows_core::Result where @@ -11426,7 +11425,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), core::mem::transmute(presourcedesc), core::mem::transmute(firstsubresource), core::mem::transmute(numsubresources), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).GetCopyableFootprints)(windows_core::Interface::as_raw(self), core::mem::transmute(presourcedesc), core::mem::transmute(firstsubresource), core::mem::transmute(numsubresources), core::mem::transmute(baseoffset), core::mem::transmute(playouts.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumrows.unwrap_or(core::mem::zeroed())), core::mem::transmute(prowsizeinbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptotalbytes.unwrap_or(core::mem::zeroed()))) } pub unsafe fn CreateQueryHeap(&self, pdesc: *const D3D12_QUERY_HEAP_DESC, result__: *mut Option) -> windows_core::Result<()> where @@ -11454,10 +11453,10 @@ impl ID3D12Device { (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())), + core::mem::transmute(pnumtilesforentireresource.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppackedmipdesc.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pstandardtileshapefornonpackedmips.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pnumsubresourcetilings.unwrap_or(core::mem::zeroed())), core::mem::transmute(firstsubresourcetilingtoget), core::mem::transmute(psubresourcetilingsfornonpackedmips), ) @@ -11812,11 +11811,8 @@ impl ID3D12Device1 { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).CreatePipelineLibrary)(windows_core::Interface::as_raw(self), core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetEventOnMultipleFenceCompletion(&self, ppfences: *const Option, pfencevalues: *const u64, numfences: u32, flags: D3D12_MULTIPLE_FENCE_WAIT_FLAGS, hevent: P4) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventOnMultipleFenceCompletion)(windows_core::Interface::as_raw(self), core::mem::transmute(ppfences), core::mem::transmute(pfencevalues), core::mem::transmute(numfences), core::mem::transmute(flags), hevent.param().abi()).ok() + pub unsafe fn SetEventOnMultipleFenceCompletion(&self, ppfences: *const Option, pfencevalues: *const u64, numfences: u32, flags: D3D12_MULTIPLE_FENCE_WAIT_FLAGS, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventOnMultipleFenceCompletion)(windows_core::Interface::as_raw(self), core::mem::transmute(ppfences), core::mem::transmute(pfencevalues), core::mem::transmute(numfences), core::mem::transmute(flags), core::mem::transmute(hevent)).ok() } pub unsafe fn SetResidencyPriority(&self, numobjects: u32, ppobjects: *const Option, ppriorities: *const D3D12_RESIDENCY_PRIORITY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetResidencyPriority)(windows_core::Interface::as_raw(self), core::mem::transmute(numobjects), core::mem::transmute(ppobjects), core::mem::transmute(ppriorities)).ok() @@ -11888,7 +11884,7 @@ impl ID3D12Device10 { core::mem::transmute(heapflags), core::mem::transmute(pdesc), core::mem::transmute(initiallayout), - core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), + core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), 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())), @@ -11903,7 +11899,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(), core::mem::transmute(heapoffset), core::mem::transmute(pdesc), core::mem::transmute(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() + (windows_core::Interface::vtable(self).CreatePlacedResource2)(windows_core::Interface::as_raw(self), pheap.param().abi(), core::mem::transmute(heapoffset), core::mem::transmute(pdesc), core::mem::transmute(initiallayout), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), 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: P3, pcastableformats: Option<&[super::Dxgi::Common::DXGI_FORMAT]>, result__: *mut Option) -> windows_core::Result<()> @@ -11911,7 +11907,7 @@ impl ID3D12Device10 { P3: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateReservedResource2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(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() + (windows_core::Interface::vtable(self).CreateReservedResource2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(initiallayout), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), 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() } } #[repr(C)] @@ -12021,7 +12017,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__, core::mem::transmute(visiblemask), core::mem::transmute(numresourcedescs), core::mem::transmute(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()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo3)(windows_core::Interface::as_raw(self), &mut result__, core::mem::transmute(visiblemask), core::mem::transmute(numresourcedescs), core::mem::transmute(presourcedescs), core::mem::transmute(pnumcastableformats.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcastableformats.unwrap_or(core::mem::zeroed())), core::mem::transmute(presourceallocationinfo1.unwrap_or(core::mem::zeroed()))); result__ } } @@ -12253,13 +12249,12 @@ impl ID3D12Device3 { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).OpenExistingHeapFromAddress)(windows_core::Interface::as_raw(self), core::mem::transmute(paddress), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn OpenExistingHeapFromFileMapping(&self, hfilemapping: P0) -> windows_core::Result + pub unsafe fn OpenExistingHeapFromFileMapping(&self, hfilemapping: super::super::Foundation::HANDLE) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).OpenExistingHeapFromFileMapping)(windows_core::Interface::as_raw(self), hfilemapping.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenExistingHeapFromFileMapping)(windows_core::Interface::as_raw(self), core::mem::transmute(hfilemapping), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EnqueueMakeResident(&self, flags: D3D12_RESIDENCY_FLAGS, ppobjects: &[Option], pfencetosignal: P3, fencevaluetosignal: u64) -> windows_core::Result<()> where @@ -12342,7 +12337,7 @@ impl ID3D12Device4 { P5: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateCommittedResource1)(windows_core::Interface::as_raw(self), core::mem::transmute(pheapproperties), core::mem::transmute(heapflags), core::mem::transmute(pdesc), core::mem::transmute(initialresourcestate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::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), core::mem::transmute(pheapproperties), core::mem::transmute(heapflags), core::mem::transmute(pdesc), core::mem::transmute(initialresourcestate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn CreateHeap1(&self, pdesc: *const D3D12_HEAP_DESC, pprotectedsession: P1, result__: *mut Option) -> windows_core::Result<()> where @@ -12357,12 +12352,12 @@ impl ID3D12Device4 { P3: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateReservedResource1)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(initialstate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::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), core::mem::transmute(pdesc), core::mem::transmute(initialstate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), 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__, core::mem::transmute(visiblemask), core::mem::transmute(numresourcedescs), core::mem::transmute(presourcedescs), core::mem::transmute(presourceallocationinfo1.unwrap_or(core::ptr::null_mut()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo1)(windows_core::Interface::as_raw(self), &mut result__, core::mem::transmute(visiblemask), core::mem::transmute(numresourcedescs), core::mem::transmute(presourcedescs), core::mem::transmute(presourceallocationinfo1.unwrap_or(core::mem::zeroed()))); result__ } } @@ -12462,17 +12457,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), core::mem::transmute(pnummetacommands), core::mem::transmute(pdescs.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumerateMetaCommands)(windows_core::Interface::as_raw(self), core::mem::transmute(pnummetacommands), core::mem::transmute(pdescs.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(commandid), core::mem::transmute(stage), core::mem::transmute(ptotalstructuresizeinbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pparametercount), core::mem::transmute(pparameterdescs.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumerateMetaCommandParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(stage), core::mem::transmute(ptotalstructuresizeinbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pparametercount), core::mem::transmute(pparameterdescs.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(commandid), core::mem::transmute(nodemask), core::mem::transmute(pcreationparametersdata.unwrap_or(core::ptr::null())), core::mem::transmute(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), core::mem::transmute(commandid), core::mem::transmute(nodemask), core::mem::transmute(pcreationparametersdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 @@ -12581,11 +12576,8 @@ impl core::ops::Deref for ID3D12Device6 { } windows_core::imp::interface_hierarchy!(ID3D12Device6, windows_core::IUnknown, ID3D12Object, ID3D12Device, ID3D12Device1, ID3D12Device2, ID3D12Device3, ID3D12Device4, ID3D12Device5); impl ID3D12Device6 { - pub unsafe fn SetBackgroundProcessingMode(&self, mode: D3D12_BACKGROUND_PROCESSING_MODE, measurementsaction: D3D12_MEASUREMENTS_ACTION, heventtosignaluponcompletion: P2, pbfurthermeasurementsdesired: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBackgroundProcessingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(mode), core::mem::transmute(measurementsaction), heventtosignaluponcompletion.param().abi(), core::mem::transmute(pbfurthermeasurementsdesired.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn SetBackgroundProcessingMode(&self, mode: D3D12_BACKGROUND_PROCESSING_MODE, measurementsaction: D3D12_MEASUREMENTS_ACTION, heventtosignaluponcompletion: Option, pbfurthermeasurementsdesired: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBackgroundProcessingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(mode), core::mem::transmute(measurementsaction), core::mem::transmute(heventtosignaluponcompletion.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbfurthermeasurementsdesired.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -12691,7 +12683,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__, core::mem::transmute(visiblemask), core::mem::transmute(numresourcedescs), core::mem::transmute(presourcedescs), core::mem::transmute(presourceallocationinfo1.unwrap_or(core::ptr::null_mut()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo2)(windows_core::Interface::as_raw(self), &mut result__, core::mem::transmute(visiblemask), core::mem::transmute(numresourcedescs), core::mem::transmute(presourcedescs), core::mem::transmute(presourceallocationinfo1.unwrap_or(core::mem::zeroed()))); result__ } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -12700,7 +12692,7 @@ impl ID3D12Device8 { P5: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateCommittedResource2)(windows_core::Interface::as_raw(self), core::mem::transmute(pheapproperties), core::mem::transmute(heapflags), core::mem::transmute(pdesc), core::mem::transmute(initialresourcestate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::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), core::mem::transmute(pheapproperties), core::mem::transmute(heapflags), core::mem::transmute(pdesc), core::mem::transmute(initialresourcestate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), 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<()> @@ -12708,7 +12700,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(), core::mem::transmute(heapoffset), core::mem::transmute(pdesc), core::mem::transmute(initialstate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::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(), core::mem::transmute(heapoffset), core::mem::transmute(pdesc), core::mem::transmute(initialstate), core::mem::transmute(poptimizedclearvalue.unwrap_or(core::mem::zeroed())), &T::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn CreateSamplerFeedbackUnorderedAccessView(&self, ptargetedresource: P0, pfeedbackresource: P1, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) where @@ -12719,7 +12711,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), core::mem::transmute(presourcedesc), core::mem::transmute(firstsubresource), core::mem::transmute(numsubresources), core::mem::transmute(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()))) + (windows_core::Interface::vtable(self).GetCopyableFootprints1)(windows_core::Interface::as_raw(self), core::mem::transmute(presourcedesc), core::mem::transmute(firstsubresource), core::mem::transmute(numsubresources), core::mem::transmute(baseoffset), core::mem::transmute(playouts.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumrows.unwrap_or(core::mem::zeroed())), core::mem::transmute(prowsizeinbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptotalbytes.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -12916,7 +12908,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), core::mem::transmute(pdesc), core::mem::transmute(ppresult), core::mem::transmute(pperror.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SerializeVersionedRootSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), core::mem::transmute(ppresult), core::mem::transmute(pperror.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn CreateVersionedRootSignatureDeserializer(&self, pblob: *const core::ffi::c_void, size: usize) -> windows_core::Result where @@ -13053,7 +13045,7 @@ impl ID3D12DeviceFactory { (windows_core::Interface::vtable(self).GetConfigurationInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(numfeatures), core::mem::transmute(piids), core::mem::transmute(pconfigurationstructs.unwrap_or(core::ptr::null())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).EnableExperimentalFeatures)(windows_core::Interface::as_raw(self), core::mem::transmute(numfeatures), core::mem::transmute(piids), core::mem::transmute(pconfigurationstructs.unwrap_or(core::mem::zeroed())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(core::mem::zeroed()))).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<()> @@ -13455,11 +13447,8 @@ impl ID3D12Fence { pub unsafe fn GetCompletedValue(&self) -> u64 { (windows_core::Interface::vtable(self).GetCompletedValue)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetEventOnCompletion(&self, value: u64, hevent: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventOnCompletion)(windows_core::Interface::as_raw(self), core::mem::transmute(value), hevent.param().abi()).ok() + pub unsafe fn SetEventOnCompletion(&self, value: u64, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventOnCompletion)(windows_core::Interface::as_raw(self), core::mem::transmute(value), core::mem::transmute(hevent)).ok() } pub unsafe fn Signal(&self, value: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Signal)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() @@ -13748,7 +13737,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(core::ptr::null())), core::mem::transmute(presourcehash.unwrap_or(core::ptr::null())), core::mem::transmute(psubresourcestatesbyteoffset.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(presourcehash.unwrap_or(core::mem::zeroed())), core::mem::transmute(psubresourcestatesbyteoffset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GBVReserved0(&self) { (windows_core::Interface::vtable(self).GBVReserved0)(windows_core::Interface::as_raw(self)) @@ -13881,7 +13870,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), core::mem::transmute(pdst), core::mem::transmute(dstx), core::mem::transmute(dsty), core::mem::transmute(dstz), core::mem::transmute(psrc), core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).CopyTextureRegion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdst), core::mem::transmute(dstx), core::mem::transmute(dsty), core::mem::transmute(dstz), core::mem::transmute(psrc), core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))) } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -13989,7 +13978,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(core::ptr::null()))) + (windows_core::Interface::vtable(self).IASetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pview.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(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()))) @@ -14001,7 +13990,7 @@ impl ID3D12GraphicsCommandList { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).OMSetRenderTargets)(windows_core::Interface::as_raw(self), core::mem::transmute(numrendertargetdescriptors), core::mem::transmute(prendertargetdescriptors.unwrap_or(core::ptr::null())), rtssinglehandletodescriptorrange.param().abi(), core::mem::transmute(pdepthstencildescriptor.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).OMSetRenderTargets)(windows_core::Interface::as_raw(self), core::mem::transmute(numrendertargetdescriptors), core::mem::transmute(prendertargetdescriptors.unwrap_or(core::mem::zeroed())), rtssinglehandletodescriptorrange.param().abi(), core::mem::transmute(pdepthstencildescriptor.unwrap_or(core::mem::zeroed()))) } pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: Option<&[super::super::Foundation::RECT]>) { (windows_core::Interface::vtable(self).ClearDepthStencilView)(windows_core::Interface::as_raw(self), core::mem::transmute(depthstencilview), core::mem::transmute(clearflags), core::mem::transmute(depth), core::mem::transmute(stencil), prects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prects.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -14025,7 +14014,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(core::ptr::null()))) + (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::mem::zeroed()))) } pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: D3D12_QUERY_TYPE, index: u32) where @@ -14053,10 +14042,10 @@ impl ID3D12GraphicsCommandList { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), core::mem::transmute(alignedbufferoffset), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -14498,7 +14487,7 @@ impl ID3D12GraphicsCommandList1 { P0: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).ResolveSubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(dstx), core::mem::transmute(dsty), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcrect.unwrap_or(core::ptr::null())), core::mem::transmute(format), core::mem::transmute(resolvemode)) + (windows_core::Interface::vtable(self).ResolveSubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), core::mem::transmute(dstx), core::mem::transmute(dsty), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(psrcrect.unwrap_or(core::mem::zeroed())), core::mem::transmute(format), core::mem::transmute(resolvemode)) } pub unsafe fn SetViewInstanceMask(&self, mask: u32) { (windows_core::Interface::vtable(self).SetViewInstanceMask)(windows_core::Interface::as_raw(self), core::mem::transmute(mask)) @@ -14650,7 +14639,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), core::mem::transmute(count), core::mem::transmute(pparams), core::mem::transmute(pmodes.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(pparams), core::mem::transmute(pmodes.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -14736,7 +14725,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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)) } pub unsafe fn EndRenderPass(&self) { (windows_core::Interface::vtable(self).EndRenderPass)(windows_core::Interface::as_raw(self)) @@ -14745,13 +14734,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(core::ptr::null())), core::mem::transmute(initializationparametersdatasizeinbytes)) + (windows_core::Interface::vtable(self).InitializeMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), core::mem::transmute(pinitializationparametersdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(executionparametersdatasizeinbytes)) + (windows_core::Interface::vtable(self).ExecuteMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), core::mem::transmute(pexecutionparametersdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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]>) { @@ -14876,7 +14865,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), core::mem::transmute(baseshadingrate), core::mem::transmute(combiners.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).RSSetShadingRate)(windows_core::Interface::as_raw(self), core::mem::transmute(baseshadingrate), core::mem::transmute(combiners.unwrap_or(core::mem::zeroed()))) } pub unsafe fn RSSetShadingRateImage(&self, shadingrateimage: P0) where @@ -15210,7 +15199,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), core::mem::transmute(messageindex), core::mem::transmute(pmessage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pmessagebytelength)).ok() + (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(messageindex), core::mem::transmute(pmessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmessagebytelength)).ok() } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) @@ -15234,7 +15223,7 @@ impl ID3D12InfoQueue { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pfilterbytelength)).ok() + (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterbytelength)).ok() } pub unsafe fn ClearStorageFilter(&self) { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) @@ -15258,7 +15247,7 @@ impl ID3D12InfoQueue { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pfilterbytelength)).ok() + (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterbytelength)).ok() } pub unsafe fn ClearRetrievalFilter(&self) { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self)) @@ -15763,7 +15752,7 @@ windows_core::imp::define_interface!(ID3D12ManualWriteTrackingResource, ID3D12Ma 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), core::mem::transmute(subresource), core::mem::transmute(pwrittenrange.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).TrackWrite)(windows_core::Interface::as_raw(self), core::mem::transmute(subresource), core::mem::transmute(pwrittenrange.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -15829,10 +15818,10 @@ windows_core::imp::define_interface!(ID3D12Object, ID3D12Object_Vtbl, 0xc4fec28f 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), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(pdatasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P1) -> windows_core::Result<()> where @@ -16280,10 +16269,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), core::mem::transmute(subresource), core::mem::transmute(preadrange.unwrap_or(core::ptr::null())), core::mem::transmute(ppdata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), core::mem::transmute(subresource), core::mem::transmute(preadrange.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdata.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(subresource), core::mem::transmute(pwrittenrange.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self), core::mem::transmute(subresource), core::mem::transmute(pwrittenrange.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self) -> D3D12_RESOURCE_DESC { @@ -16295,13 +16284,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), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(srcdepthpitch)).ok() + (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), core::mem::transmute(dstsubresource), core::mem::transmute(pdstbox.unwrap_or(core::mem::zeroed())), core::mem::transmute(psrcdata), core::mem::transmute(srcrowpitch), core::mem::transmute(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), core::mem::transmute(pdstdata), core::mem::transmute(dstrowpitch), core::mem::transmute(dstdepthpitch), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstdata), core::mem::transmute(dstrowpitch), core::mem::transmute(dstdepthpitch), core::mem::transmute(srcsubresource), core::mem::transmute(psrcbox.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(pheapflags.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetHeapProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pheapproperties.unwrap_or(core::mem::zeroed())), core::mem::transmute(pheapflags.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -16756,7 +16745,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(core::ptr::null_mut())), core::mem::transmute(psizey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(psizez.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetThreadGroupSize)(windows_core::Interface::as_raw(self), core::mem::transmute(psizex.unwrap_or(core::mem::zeroed())), core::mem::transmute(psizey.unwrap_or(core::mem::zeroed())), core::mem::transmute(psizez.unwrap_or(core::mem::zeroed()))) } pub unsafe fn GetRequiresFlags(&self) -> u64 { (windows_core::Interface::vtable(self).GetRequiresFlags)(windows_core::Interface::as_raw(self)) @@ -17259,12 +17248,11 @@ unsafe impl Sync for ID3D12ShaderReflectionVariable {} windows_core::imp::define_interface!(ID3D12SharingContract, ID3D12SharingContract_Vtbl, 0x0adf7d52_929c_4e61_addb_ffed30de66ef); windows_core::imp::interface_hierarchy!(ID3D12SharingContract, windows_core::IUnknown); impl ID3D12SharingContract { - pub unsafe fn Present(&self, presource: P0, subresource: u32, window: P2) + pub unsafe fn Present(&self, presource: P0, subresource: u32, window: super::super::Foundation::HWND) where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Present)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(subresource), window.param().abi()) + (windows_core::Interface::vtable(self).Present)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(subresource), core::mem::transmute(window)) } pub unsafe fn SharedFenceSignal(&self, pfence: P0, fencevalue: u64) where diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs index fbf58ee42a..d7e1b194e6 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs @@ -4425,11 +4425,8 @@ impl IDirect3D9 { pub unsafe fn GetAdapterMonitor(&self, adapter: u32) -> super::Gdi::HMONITOR { (windows_core::Interface::vtable(self).GetAdapterMonitor)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter)) } - pub unsafe fn CreateDevice(&self, adapter: u32, devicetype: D3DDEVTYPE, hfocuswindow: P2, behaviorflags: u32, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, ppreturneddeviceinterface: *mut Option) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devicetype), hfocuswindow.param().abi(), core::mem::transmute(behaviorflags), core::mem::transmute(ppresentationparameters), core::mem::transmute(ppreturneddeviceinterface)).ok() + pub unsafe fn CreateDevice(&self, adapter: u32, devicetype: D3DDEVTYPE, hfocuswindow: super::super::Foundation::HWND, behaviorflags: u32, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, ppreturneddeviceinterface: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devicetype), core::mem::transmute(hfocuswindow), core::mem::transmute(behaviorflags), core::mem::transmute(ppresentationparameters), core::mem::transmute(ppreturneddeviceinterface)).ok() } } #[repr(C)] @@ -4571,11 +4568,8 @@ impl IDirect3D9Ex { pub unsafe fn GetAdapterDisplayModeEx(&self, adapter: u32, pmode: *mut D3DDISPLAYMODEEX, protation: *mut D3DDISPLAYROTATION) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAdapterDisplayModeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(pmode), core::mem::transmute(protation)).ok() } - pub unsafe fn CreateDeviceEx(&self, adapter: u32, devicetype: D3DDEVTYPE, hfocuswindow: P2, behaviorflags: u32, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pfullscreendisplaymode: *mut D3DDISPLAYMODEEX, ppreturneddeviceinterface: *mut Option) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateDeviceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devicetype), hfocuswindow.param().abi(), core::mem::transmute(behaviorflags), core::mem::transmute(ppresentationparameters), core::mem::transmute(pfullscreendisplaymode), core::mem::transmute(ppreturneddeviceinterface)).ok() + pub unsafe fn CreateDeviceEx(&self, adapter: u32, devicetype: D3DDEVTYPE, hfocuswindow: super::super::Foundation::HWND, behaviorflags: u32, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pfullscreendisplaymode: *mut D3DDISPLAYMODEEX, ppreturneddeviceinterface: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateDeviceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devicetype), core::mem::transmute(hfocuswindow), core::mem::transmute(behaviorflags), core::mem::transmute(ppresentationparameters), core::mem::transmute(pfullscreendisplaymode), core::mem::transmute(ppreturneddeviceinterface)).ok() } pub unsafe fn GetAdapterLUID(&self, adapter: u32, pluid: *mut super::super::Foundation::LUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAdapterLUID)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(pluid)).ok() @@ -4861,11 +4855,8 @@ impl IDirect3DDevice9 { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresentationparameters)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Present(&self, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: P2, pdirtyregion: *const super::Gdi::RGNDATA) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Present)(windows_core::Interface::as_raw(self), core::mem::transmute(psourcerect), core::mem::transmute(pdestrect), hdestwindowoverride.param().abi(), core::mem::transmute(pdirtyregion)).ok() + pub unsafe fn Present(&self, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: super::super::Foundation::HWND, pdirtyregion: *const super::Gdi::RGNDATA) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Present)(windows_core::Interface::as_raw(self), core::mem::transmute(psourcerect), core::mem::transmute(pdestrect), core::mem::transmute(hdestwindowoverride), core::mem::transmute(pdirtyregion)).ok() } pub unsafe fn GetBackBuffer(&self, iswapchain: u32, ibackbuffer: u32, r#type: D3DBACKBUFFER_TYPE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6231,11 +6222,8 @@ impl IDirect3DDevice9Ex { (windows_core::Interface::vtable(self).ComposeRects)(windows_core::Interface::as_raw(self), psrc.param().abi(), pdst.param().abi(), psrcrectdescs.param().abi(), core::mem::transmute(numrects), pdstrectdescs.param().abi(), core::mem::transmute(operation), core::mem::transmute(xoffset), core::mem::transmute(yoffset)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn PresentEx(&self, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: P2, pdirtyregion: *const super::Gdi::RGNDATA, dwflags: u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).PresentEx)(windows_core::Interface::as_raw(self), core::mem::transmute(psourcerect), core::mem::transmute(pdestrect), hdestwindowoverride.param().abi(), core::mem::transmute(pdirtyregion), core::mem::transmute(dwflags)).ok() + pub unsafe fn PresentEx(&self, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: super::super::Foundation::HWND, pdirtyregion: *const super::Gdi::RGNDATA, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PresentEx)(windows_core::Interface::as_raw(self), core::mem::transmute(psourcerect), core::mem::transmute(pdestrect), core::mem::transmute(hdestwindowoverride), core::mem::transmute(pdirtyregion), core::mem::transmute(dwflags)).ok() } pub unsafe fn GetGPUThreadPriority(&self, ppriority: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetGPUThreadPriority)(windows_core::Interface::as_raw(self), core::mem::transmute(ppriority)).ok() @@ -6255,11 +6243,8 @@ impl IDirect3DDevice9Ex { pub unsafe fn GetMaximumFrameLatency(&self, pmaxlatency: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetMaximumFrameLatency)(windows_core::Interface::as_raw(self), core::mem::transmute(pmaxlatency)).ok() } - pub unsafe fn CheckDeviceState(&self, hdestinationwindow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CheckDeviceState)(windows_core::Interface::as_raw(self), hdestinationwindow.param().abi()).ok() + pub unsafe fn CheckDeviceState(&self, hdestinationwindow: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CheckDeviceState)(windows_core::Interface::as_raw(self), core::mem::transmute(hdestinationwindow)).ok() } pub unsafe fn CreateRenderTargetEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: P5, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> where @@ -6786,11 +6771,8 @@ impl IDirect3DSurface9 { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(phdc)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseDC(&self, hdc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), hdc.param().abi()).ok() + pub unsafe fn ReleaseDC(&self, hdc: super::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc)).ok() } } #[repr(C)] @@ -6865,11 +6847,8 @@ windows_core::imp::define_interface!(IDirect3DSwapChain9, IDirect3DSwapChain9_Vt windows_core::imp::interface_hierarchy!(IDirect3DSwapChain9, windows_core::IUnknown); impl IDirect3DSwapChain9 { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Present(&self, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: P2, pdirtyregion: *const super::Gdi::RGNDATA, dwflags: u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Present)(windows_core::Interface::as_raw(self), core::mem::transmute(psourcerect), core::mem::transmute(pdestrect), hdestwindowoverride.param().abi(), core::mem::transmute(pdirtyregion), core::mem::transmute(dwflags)).ok() + pub unsafe fn Present(&self, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: super::super::Foundation::HWND, pdirtyregion: *const super::Gdi::RGNDATA, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Present)(windows_core::Interface::as_raw(self), core::mem::transmute(psourcerect), core::mem::transmute(pdestrect), core::mem::transmute(hdestwindowoverride), core::mem::transmute(pdirtyregion), core::mem::transmute(dwflags)).ok() } pub unsafe fn GetFrontBufferData(&self, pdestsurface: P0) -> windows_core::Result<()> where 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 0509e716e4..c040800e12 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs @@ -1,22 +1,20 @@ #[inline] -pub unsafe fn DCompositionAttachMouseDragToHwnd(visual: P0, hwnd: P1, enable: P2) -> windows_core::Result<()> +pub unsafe fn DCompositionAttachMouseDragToHwnd(visual: P0, hwnd: super::super::Foundation::HWND, enable: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dcomp.dll" "system" fn DCompositionAttachMouseDragToHwnd(visual : * mut core::ffi::c_void, hwnd : super::super::Foundation:: HWND, enable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DCompositionAttachMouseDragToHwnd(visual.param().abi(), hwnd.param().abi(), enable.param().abi()).ok() + DCompositionAttachMouseDragToHwnd(visual.param().abi(), core::mem::transmute(hwnd), enable.param().abi()).ok() } #[inline] -pub unsafe fn DCompositionAttachMouseWheelToHwnd(visual: P0, hwnd: P1, enable: P2) -> windows_core::Result<()> +pub unsafe fn DCompositionAttachMouseWheelToHwnd(visual: P0, hwnd: super::super::Foundation::HWND, enable: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dcomp.dll" "system" fn DCompositionAttachMouseWheelToHwnd(visual : * mut core::ffi::c_void, hwnd : super::super::Foundation:: HWND, enable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DCompositionAttachMouseWheelToHwnd(visual.param().abi(), hwnd.param().abi(), enable.param().abi()).ok() + DCompositionAttachMouseWheelToHwnd(visual.param().abi(), core::mem::transmute(hwnd), enable.param().abi()).ok() } #[inline] pub unsafe fn DCompositionBoostCompositorClock(enable: P0) -> windows_core::Result<()> @@ -62,7 +60,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(core::mem::transmute(desiredaccess), core::mem::transmute(securityattributes.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + DCompositionCreateSurfaceHandle(core::mem::transmute(desiredaccess), core::mem::transmute(securityattributes.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn DCompositionGetFrameId(frameidtype: COMPOSITION_FRAME_ID_TYPE) -> windows_core::Result { @@ -73,7 +71,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(core::mem::transmute(frameid), core::mem::transmute(framestats), core::mem::transmute(targetidcount), core::mem::transmute(targetids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(actualtargetidcount.unwrap_or(core::ptr::null_mut()))).ok() + DCompositionGetStatistics(core::mem::transmute(frameid), core::mem::transmute(framestats), core::mem::transmute(targetidcount), core::mem::transmute(targetids.unwrap_or(core::mem::zeroed())), core::mem::transmute(actualtargetidcount.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DCompositionGetTargetStatistics(frameid: u64, targetid: *const COMPOSITION_TARGET_ID) -> windows_core::Result { @@ -1015,27 +1013,20 @@ impl core::ops::Deref for IDCompositionDesktopDevice { } windows_core::imp::interface_hierarchy!(IDCompositionDesktopDevice, windows_core::IUnknown, IDCompositionDevice2); impl IDCompositionDesktopDevice { - pub unsafe fn CreateTargetForHwnd(&self, hwnd: P0, topmost: P1) -> windows_core::Result + pub unsafe fn CreateTargetForHwnd(&self, hwnd: super::super::Foundation::HWND, topmost: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTargetForHwnd)(windows_core::Interface::as_raw(self), hwnd.param().abi(), topmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTargetForHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), topmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateSurfaceFromHandle(&self, handle: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateSurfaceFromHandle(&self, handle: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSurfaceFromHandle)(windows_core::Interface::as_raw(self), handle.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSurfaceFromHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(handle), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateSurfaceFromHwnd(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateSurfaceFromHwnd(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSurfaceFromHwnd)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSurfaceFromHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1111,13 +1102,12 @@ impl IDCompositionDevice { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetFrameStatistics)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn CreateTargetForHwnd(&self, hwnd: P0, topmost: P1) -> windows_core::Result + pub unsafe fn CreateTargetForHwnd(&self, hwnd: super::super::Foundation::HWND, topmost: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTargetForHwnd)(windows_core::Interface::as_raw(self), hwnd.param().abi(), topmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTargetForHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), topmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateVisual(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1133,19 +1123,13 @@ impl IDCompositionDevice { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateVirtualSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(initialwidth), core::mem::transmute(initialheight), core::mem::transmute(pixelformat), core::mem::transmute(alphamode), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateSurfaceFromHandle(&self, handle: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateSurfaceFromHandle(&self, handle: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSurfaceFromHandle)(windows_core::Interface::as_raw(self), handle.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSurfaceFromHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(handle), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateSurfaceFromHwnd(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateSurfaceFromHwnd(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSurfaceFromHwnd)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSurfaceFromHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateTranslateTransform(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4189,7 +4173,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(core::ptr::null())), &T::IID, &mut result__, core::mem::transmute(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::mem::zeroed())), &T::IID, &mut result__, core::mem::transmute(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() @@ -4201,7 +4185,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(core::ptr::null())), core::mem::transmute(cliprect.unwrap_or(core::ptr::null())), core::mem::transmute(offsetx), core::mem::transmute(offsety)).ok() + (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), core::mem::transmute(scrollrect.unwrap_or(core::mem::zeroed())), core::mem::transmute(cliprect.unwrap_or(core::mem::zeroed())), core::mem::transmute(offsetx), core::mem::transmute(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 e125f0e891..7f7469dee5 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs @@ -7070,7 +7070,7 @@ impl IDDVideoPortContainer { (windows_core::Interface::vtable(self).EnumVideoPorts)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(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), core::mem::transmute(param0), core::mem::transmute(pcinfo), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVideoPortConnectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(pcinfo), core::mem::transmute(param2.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(param0), core::mem::transmute(param1)).ok() @@ -7190,20 +7190,14 @@ impl IDirectDraw { pub unsafe fn RestoreDisplayMode(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestoreDisplayMode)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn SetDisplayMode(&self, param0: u32, param1: u32, param2: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } - pub unsafe fn WaitForVerticalBlank(&self, param0: u32, param1: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi()).ok() + pub unsafe fn WaitForVerticalBlank(&self, param0: u32, param1: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } } #[repr(C)] @@ -7450,20 +7444,14 @@ impl IDirectDraw2 { pub unsafe fn RestoreDisplayMode(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestoreDisplayMode)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn SetDisplayMode(&self, param0: u32, param1: u32, param2: u32, param3: u32, param4: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)).ok() } - pub unsafe fn WaitForVerticalBlank(&self, param0: u32, param1: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi()).ok() + pub unsafe fn WaitForVerticalBlank(&self, param0: u32, param1: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn GetAvailableVidMem(&self, param0: *mut DDSCAPS, param1: *mut u32, param2: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAvailableVidMem)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() @@ -7720,31 +7708,22 @@ impl IDirectDraw4 { pub unsafe fn RestoreDisplayMode(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestoreDisplayMode)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn SetDisplayMode(&self, param0: u32, param1: u32, param2: u32, param3: u32, param4: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)).ok() } - pub unsafe fn WaitForVerticalBlank(&self, param0: u32, param1: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi()).ok() + pub unsafe fn WaitForVerticalBlank(&self, param0: u32, param1: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn GetAvailableVidMem(&self, param0: *mut DDSCAPS2, param1: *mut u32, param2: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAvailableVidMem)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetSurfaceFromDC(&self, param0: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSurfaceFromDC(&self, param0: super::Gdi::HDC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSurfaceFromDC)(windows_core::Interface::as_raw(self), param0.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSurfaceFromDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn RestoreAllSurfaces(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestoreAllSurfaces)(windows_core::Interface::as_raw(self)).ok() @@ -8044,31 +8023,22 @@ impl IDirectDraw7 { pub unsafe fn RestoreDisplayMode(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestoreDisplayMode)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetCooperativeLevel(&self, param0: P0, param1: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), param0.param().abi(), core::mem::transmute(param1)).ok() + pub unsafe fn SetCooperativeLevel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn SetDisplayMode(&self, param0: u32, param1: u32, param2: u32, param3: u32, param4: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)).ok() } - pub unsafe fn WaitForVerticalBlank(&self, param0: u32, param1: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi()).ok() + pub unsafe fn WaitForVerticalBlank(&self, param0: u32, param1: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).WaitForVerticalBlank)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } pub unsafe fn GetAvailableVidMem(&self, param0: *mut DDSCAPS2, param1: *mut u32, param2: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAvailableVidMem)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetSurfaceFromDC(&self, param0: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSurfaceFromDC(&self, param0: super::Gdi::HDC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSurfaceFromDC)(windows_core::Interface::as_raw(self), param0.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSurfaceFromDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn RestoreAllSurfaces(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestoreAllSurfaces)(windows_core::Interface::as_raw(self)).ok() @@ -8342,11 +8312,8 @@ impl IDirectDrawClipper { pub unsafe fn SetClipList(&self, param0: *mut super::Gdi::RGNDATA, param1: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetClipList)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn SetHWnd(&self, param0: u32, param1: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHWnd)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi()).ok() + pub unsafe fn SetHWnd(&self, param0: u32, param1: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHWnd)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } } #[repr(C)] @@ -8719,18 +8686,12 @@ impl IDirectDrawSurface { pub unsafe fn IsLost(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsLost)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() + pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseDC(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } pub unsafe fn Restore(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self)).ok() @@ -9131,18 +9092,12 @@ impl IDirectDrawSurface2 { pub unsafe fn IsLost(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsLost)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() + pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseDC(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } pub unsafe fn Restore(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self)).ok() @@ -9573,18 +9528,12 @@ impl IDirectDrawSurface3 { pub unsafe fn IsLost(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsLost)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() + pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseDC(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } pub unsafe fn Restore(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self)).ok() @@ -10025,18 +9974,12 @@ impl IDirectDrawSurface4 { pub unsafe fn IsLost(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsLost)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC2, param2: u32, param3: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() + pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC2, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseDC(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } pub unsafe fn Restore(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self)).ok() @@ -10527,18 +10470,12 @@ impl IDirectDrawSurface7 { pub unsafe fn IsLost(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsLost)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC2, param2: u32, param3: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()).ok() + pub unsafe fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC2, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseDC(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } pub unsafe fn Restore(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self)).ok() @@ -11036,10 +10973,10 @@ impl IDirectDrawVideoPort { (windows_core::Interface::vtable(self).GetColorControls)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(lpnumformats), core::mem::transmute(param1.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param2)).ok() + (windows_core::Interface::vtable(self).GetInputFormats)(windows_core::Interface::as_raw(self), core::mem::transmute(lpnumformats), core::mem::transmute(param1.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(param0), core::mem::transmute(lpnumformats), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param3)).ok() + (windows_core::Interface::vtable(self).GetOutputFormats)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(lpnumformats), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(param0)).ok() @@ -11193,11 +11130,8 @@ impl IDirectDrawVideoPortNotify { pub unsafe fn AcquireNotification(&self, param0: *mut super::super::Foundation::HANDLE, param1: *mut DDVIDEOPORTNOTIFY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AcquireNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() } - pub unsafe fn ReleaseNotification(&self, param0: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseNotification)(windows_core::Interface::as_raw(self), param0.param().abi()).ok() + pub unsafe fn ReleaseNotification(&self, param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } } #[repr(C)] 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 8092bf2c20..1f0fe8241c 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs @@ -596,7 +596,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetTag(&self, object: P0, id: u32) -> windows_core::Result<()> where @@ -885,24 +885,14 @@ impl windows_core::RuntimeName for IDirectManipulationInteractionEventHandler {} windows_core::imp::define_interface!(IDirectManipulationManager, IDirectManipulationManager_Vtbl, 0xfbf5d3b4_70c7_4163_9322_5a6f660d6fbc); windows_core::imp::interface_hierarchy!(IDirectManipulationManager, windows_core::IUnknown); impl IDirectManipulationManager { - pub unsafe fn Activate(&self, window: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), window.param().abi()).ok() + pub unsafe fn Activate(&self, window: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(window)).ok() } - pub unsafe fn Deactivate(&self, window: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self), window.param().abi()).ok() + pub unsafe fn Deactivate(&self, window: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self), core::mem::transmute(window)).ok() } - pub unsafe fn RegisterHitTestTarget(&self, window: P0, hittestwindow: P1, r#type: DIRECTMANIPULATION_HITTEST_TYPE) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterHitTestTarget)(windows_core::Interface::as_raw(self), window.param().abi(), hittestwindow.param().abi(), core::mem::transmute(r#type)).ok() + pub unsafe fn RegisterHitTestTarget(&self, window: super::super::Foundation::HWND, hittestwindow: Option, r#type: DIRECTMANIPULATION_HITTEST_TYPE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterHitTestTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(window), core::mem::transmute(hittestwindow.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn ProcessInput(&self, message: *const super::super::UI::WindowsAndMessaging::MSG) -> windows_core::Result { @@ -916,14 +906,13 @@ impl IDirectManipulationManager { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).GetUpdateManager)(windows_core::Interface::as_raw(self), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateViewport(&self, frameinfo: P0, window: P1) -> windows_core::Result + pub unsafe fn CreateViewport(&self, frameinfo: P0, window: super::super::Foundation::HWND) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateViewport)(windows_core::Interface::as_raw(self), frameinfo.param().abi(), window.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateViewport)(windows_core::Interface::as_raw(self), frameinfo.param().abi(), core::mem::transmute(window), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateContent(&self, frameinfo: P0, clsid: *const windows_core::GUID) -> windows_core::Result where @@ -1236,13 +1225,12 @@ impl windows_core::RuntimeName for IDirectManipulationUpdateHandler {} windows_core::imp::define_interface!(IDirectManipulationUpdateManager, IDirectManipulationUpdateManager_Vtbl, 0xb0ae62fd_be34_46e7_9caa_d361facbb9cc); windows_core::imp::interface_hierarchy!(IDirectManipulationUpdateManager, windows_core::IUnknown); impl IDirectManipulationUpdateManager { - pub unsafe fn RegisterWaitHandleCallback(&self, handle: P0, eventhandler: P1) -> windows_core::Result + pub unsafe fn RegisterWaitHandleCallback(&self, handle: super::super::Foundation::HANDLE, eventhandler: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterWaitHandleCallback)(windows_core::Interface::as_raw(self), handle.param().abi(), eventhandler.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterWaitHandleCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(handle), eventhandler.param().abi(), &mut result__).map(|| result__) } pub unsafe fn UnregisterWaitHandleCallback(&self, cookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnregisterWaitHandleCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(cookie)).ok() @@ -1324,7 +1312,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetTag(&self, object: P0, id: u32) -> windows_core::Result<()> where @@ -1388,13 +1376,12 @@ impl IDirectManipulationViewport { pub unsafe fn SetChaining(&self, enabledtypes: DIRECTMANIPULATION_MOTION_TYPES) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetChaining)(windows_core::Interface::as_raw(self), core::mem::transmute(enabledtypes)).ok() } - pub unsafe fn AddEventHandler(&self, window: P0, eventhandler: P1) -> windows_core::Result + pub unsafe fn AddEventHandler(&self, window: Option, eventhandler: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddEventHandler)(windows_core::Interface::as_raw(self), window.param().abi(), eventhandler.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AddEventHandler)(windows_core::Interface::as_raw(self), core::mem::transmute(window.unwrap_or(core::mem::zeroed())), eventhandler.param().abi(), &mut result__).map(|| result__) } pub unsafe fn RemoveEventHandler(&self, cookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemoveEventHandler)(windows_core::Interface::as_raw(self), core::mem::transmute(cookie)).ok() 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 69a7bf58b8..3b72496a4d 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs @@ -2062,12 +2062,11 @@ unsafe impl Sync for IDWriteAsyncResult {} windows_core::imp::define_interface!(IDWriteBitmapRenderTarget, IDWriteBitmapRenderTarget_Vtbl, 0x5e5a32a3_8dff_4773_9ff6_0696eab77267); windows_core::imp::interface_hierarchy!(IDWriteBitmapRenderTarget, windows_core::IUnknown); impl IDWriteBitmapRenderTarget { - pub unsafe fn DrawGlyphRun(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: P4, textcolor: P5, blackboxrect: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> + pub unsafe fn DrawGlyphRun(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: P4, textcolor: super::super::Foundation::COLORREF, blackboxrect: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> where P4: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), renderingparams.param().abi(), textcolor.param().abi(), core::mem::transmute(blackboxrect.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), renderingparams.param().abi(), core::mem::transmute(textcolor), core::mem::transmute(blackboxrect.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetMemoryDC(&self) -> super::Gdi::HDC { @@ -2083,7 +2082,7 @@ impl IDWriteBitmapRenderTarget { (windows_core::Interface::vtable(self).GetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSize(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2296,18 +2295,14 @@ impl IDWriteBitmapRenderTarget3 { pub unsafe fn GetPaintFeatureLevel(&self) -> DWRITE_PAINT_FEATURE_LEVEL { (windows_core::Interface::vtable(self).GetPaintFeatureLevel)(windows_core::Interface::as_raw(self)) } - pub unsafe fn DrawPaintGlyphRun(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphimageformat: DWRITE_GLYPH_IMAGE_FORMATS, textcolor: P5, colorpaletteindex: u32, blackboxrect: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> - where - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).DrawPaintGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), core::mem::transmute(glyphimageformat), textcolor.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(blackboxrect.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn DrawPaintGlyphRun(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphimageformat: DWRITE_GLYPH_IMAGE_FORMATS, textcolor: super::super::Foundation::COLORREF, colorpaletteindex: u32, blackboxrect: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DrawPaintGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), core::mem::transmute(glyphimageformat), core::mem::transmute(textcolor), core::mem::transmute(colorpaletteindex), core::mem::transmute(blackboxrect.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn DrawGlyphRunWithColorSupport(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: P4, textcolor: P5, colorpaletteindex: u32, blackboxrect: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> + pub unsafe fn DrawGlyphRunWithColorSupport(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: P4, textcolor: super::super::Foundation::COLORREF, colorpaletteindex: u32, blackboxrect: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> where P4: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), renderingparams.param().abi(), textcolor.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(blackboxrect.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), renderingparams.param().abi(), core::mem::transmute(textcolor), core::mem::transmute(colorpaletteindex), core::mem::transmute(blackboxrect.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -2488,7 +2483,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(core::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::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateCustomFontFileReference(&self, fontfilereferencekey: *const core::ffi::c_void, fontfilereferencekeysize: u32, fontfileloader: P2) -> windows_core::Result where @@ -2506,12 +2501,9 @@ impl IDWriteFactory { (windows_core::Interface::vtable(self).CreateRenderingParams)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn CreateMonitorRenderingParams(&self, monitor: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateMonitorRenderingParams(&self, monitor: super::Gdi::HMONITOR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateMonitorRenderingParams)(windows_core::Interface::as_raw(self), monitor.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateMonitorRenderingParams)(windows_core::Interface::as_raw(self), core::mem::transmute(monitor), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateCustomRenderingParams(&self, gamma: f32, enhancedcontrast: f32, cleartypelevel: f32, pixelgeometry: DWRITE_PIXEL_GEOMETRY, renderingmode: DWRITE_RENDERING_MODE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2559,7 +2551,7 @@ impl IDWriteFactory { P7: 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(), core::mem::transmute(layoutwidth), core::mem::transmute(layoutheight), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::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(), core::mem::transmute(layoutwidth), core::mem::transmute(layoutheight), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> windows_core::Result where @@ -2582,7 +2574,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), core::mem::transmute(glyphrun), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::ptr::null())), core::mem::transmute(renderingmode), core::mem::transmute(measuringmode), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), core::mem::transmute(renderingmode), core::mem::transmute(measuringmode), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2938,7 +2930,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), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), core::mem::transmute(measuringmode), core::mem::transmute(worldtodevicetransform.unwrap_or(core::ptr::null())), core::mem::transmute(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(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::mem::zeroed())), core::mem::transmute(measuringmode), core::mem::transmute(worldtodevicetransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(); @@ -2946,7 +2938,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), core::mem::transmute(glyphrun), core::mem::transmute(transform.unwrap_or(core::ptr::null())), core::mem::transmute(renderingmode), core::mem::transmute(measuringmode), core::mem::transmute(gridfitmode), core::mem::transmute(antialiasmode), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), core::mem::transmute(renderingmode), core::mem::transmute(measuringmode), core::mem::transmute(gridfitmode), core::mem::transmute(antialiasmode), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -3049,7 +3041,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), core::mem::transmute(glyphrun), core::mem::transmute(transform.unwrap_or(core::ptr::null())), core::mem::transmute(renderingmode), core::mem::transmute(measuringmode), core::mem::transmute(gridfitmode), core::mem::transmute(antialiasmode), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), core::mem::transmute(renderingmode), core::mem::transmute(measuringmode), core::mem::transmute(gridfitmode), core::mem::transmute(antialiasmode), core::mem::transmute(baselineoriginx), core::mem::transmute(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(); @@ -3067,7 +3059,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(core::ptr::null())), core::mem::transmute(faceindex), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(faceindex), core::mem::transmute(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(); @@ -3243,7 +3235,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), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), core::mem::transmute(desiredglyphimageformats), core::mem::transmute(measuringmode), core::mem::transmute(worldanddpitransform.unwrap_or(core::ptr::null())), core::mem::transmute(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), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredglyphimageformats), core::mem::transmute(measuringmode), core::mem::transmute(worldanddpitransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 { @@ -3253,7 +3245,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), core::mem::transmute(glyphrun), core::mem::transmute(measuringmode), core::mem::transmute(baselineorigin), core::mem::transmute(worldanddpitransform.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeGlyphOrigins2)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphrun), core::mem::transmute(measuringmode), core::mem::transmute(baselineorigin), core::mem::transmute(worldanddpitransform.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) } } #[repr(C)] @@ -3703,7 +3695,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), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), core::mem::transmute(desiredglyphimageformats), core::mem::transmute(paintfeaturelevel), core::mem::transmute(measuringmode), core::mem::transmute(worldanddpitransform.unwrap_or(core::ptr::null())), core::mem::transmute(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), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredglyphimageformats), core::mem::transmute(paintfeaturelevel), core::mem::transmute(measuringmode), core::mem::transmute(worldanddpitransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(colorpaletteindex), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -4559,7 +4551,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), core::mem::transmute(numberoffiles), core::mem::transmute(fontfiles.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFiles)(windows_core::Interface::as_raw(self), core::mem::transmute(numberoffiles), core::mem::transmute(fontfiles.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetIndex(&self) -> u32 { (windows_core::Interface::vtable(self).GetIndex)(windows_core::Interface::as_raw(self)) @@ -4599,7 +4591,7 @@ impl IDWriteFontFace { P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGlyphRunOutline)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(glyphindices), core::mem::transmute(glyphadvances.unwrap_or(core::ptr::null())), core::mem::transmute(glyphoffsets.unwrap_or(core::ptr::null())), core::mem::transmute(glyphcount), issideways.param().abi(), isrighttoleft.param().abi(), geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).GetGlyphRunOutline)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(glyphindices), core::mem::transmute(glyphadvances.unwrap_or(core::mem::zeroed())), core::mem::transmute(glyphoffsets.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P3) -> windows_core::Result where @@ -4609,14 +4601,14 @@ impl IDWriteFontFace { (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(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), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::ptr::null())), core::mem::transmute(fontfacemetrics)).ok() + (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), core::mem::transmute(fontfacemetrics)).ok() } pub unsafe fn GetGdiCompatibleGlyphMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: P3, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: P7) -> windows_core::Result<()> where P3: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::ptr::null())), usegdinatural.param().abi(), core::mem::transmute(glyphindices), core::mem::transmute(glyphcount), core::mem::transmute(glyphmetrics), issideways.param().abi()).ok() + (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.param().abi(), core::mem::transmute(glyphindices), core::mem::transmute(glyphcount), core::mem::transmute(glyphmetrics), issideways.param().abi()).ok() } } #[repr(C)] @@ -4776,7 +4768,7 @@ impl IDWriteFontFace1 { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::ptr::null())), core::mem::transmute(fontmetrics)).ok() + (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), core::mem::transmute(fontmetrics)).ok() } pub unsafe fn GetCaretMetrics(&self) -> DWRITE_CARET_METRICS { let mut result__ = core::mem::zeroed(); @@ -4801,7 +4793,7 @@ impl IDWriteFontFace1 { P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphAdvances)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::ptr::null())), usegdinatural.param().abi(), issideways.param().abi(), core::mem::transmute(glyphcount), core::mem::transmute(glyphindices), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphAdvances)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.param().abi(), issideways.param().abi(), core::mem::transmute(glyphcount), core::mem::transmute(glyphindices), &mut result__).map(|| result__) } pub unsafe fn GetKerningPairAdjustments(&self, glyphcount: u32, glyphindices: *const u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4815,7 +4807,7 @@ impl IDWriteFontFace1 { P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::ptr::null())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), &mut result__).map(|| result__) } pub unsafe fn GetVerticalGlyphVariants(&self, glyphcount: u32, nominalglyphindices: *const u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4983,7 +4975,7 @@ impl IDWriteFontFace2 { P4: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::ptr::null())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() } } #[repr(C)] @@ -5091,7 +5083,7 @@ impl IDWriteFontFace3 { P4: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::ptr::null())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(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), core::mem::transmute(unicodevalue)) @@ -6205,7 +6197,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), core::mem::transmute(issupportedfonttype), core::mem::transmute(fontfiletype), core::mem::transmute(fontfacetype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(numberoffaces)).ok() + (windows_core::Interface::vtable(self).Analyze)(windows_core::Interface::as_raw(self), core::mem::transmute(issupportedfonttype), core::mem::transmute(fontfiletype), core::mem::transmute(fontfacetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(numberoffaces)).ok() } } #[repr(C)] @@ -6967,7 +6959,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(core::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::mem::zeroed())), 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(); @@ -7533,20 +7525,14 @@ impl IDWriteGdiInterop { (windows_core::Interface::vtable(self).ConvertFontFaceToLOGFONT)(windows_core::Interface::as_raw(self), font.param().abi(), core::mem::transmute(logfont)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn CreateFontFaceFromHdc(&self, hdc: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateFontFaceFromHdc(&self, hdc: super::Gdi::HDC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateFontFaceFromHdc)(windows_core::Interface::as_raw(self), hdc.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFontFaceFromHdc)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn CreateBitmapRenderTarget(&self, hdc: P0, width: u32, height: u32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateBitmapRenderTarget(&self, hdc: Option, width: u32, height: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapRenderTarget)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(width), core::mem::transmute(height), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(width), core::mem::transmute(height), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -7890,7 +7876,7 @@ impl IDWriteInlineObject { P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), renderer.param().abi(), core::mem::transmute(originx), core::mem::transmute(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::mem::zeroed())), renderer.param().abi(), core::mem::transmute(originx), core::mem::transmute(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(); @@ -8159,7 +8145,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), core::mem::transmute(glyphindex), core::mem::transmute(paintelement), core::mem::transmute(structsize), core::mem::transmute(clipbox), core::mem::transmute(glyphattributes.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetCurrentGlyph)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphindex), core::mem::transmute(paintelement), core::mem::transmute(structsize), core::mem::transmute(clipbox), core::mem::transmute(glyphattributes.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(textcolor)).ok() @@ -8293,14 +8279,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(core::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::mem::zeroed())), &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(core::ptr::null())), core::mem::transmute(transform)).ok() + (windows_core::Interface::vtable(self).GetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::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::mem::zeroed())), &mut result__).map(|| result__) } } #[repr(C)] @@ -9056,8 +9042,8 @@ impl IDWriteTextAnalyzer { core::mem::transmute(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())), + core::mem::transmute(features.unwrap_or(core::mem::zeroed())), + core::mem::transmute(featurerangelengths.unwrap_or(core::mem::zeroed())), core::mem::transmute(featureranges), core::mem::transmute(maxglyphcount), core::mem::transmute(clustermap), @@ -9091,8 +9077,8 @@ impl IDWriteTextAnalyzer { isrighttoleft.param().abi(), core::mem::transmute(scriptanalysis), localename.param().abi(), - core::mem::transmute(features.unwrap_or(core::ptr::null())), - core::mem::transmute(featurerangelengths.unwrap_or(core::ptr::null())), + core::mem::transmute(features.unwrap_or(core::mem::zeroed())), + core::mem::transmute(featurerangelengths.unwrap_or(core::mem::zeroed())), core::mem::transmute(featureranges), core::mem::transmute(glyphadvances), core::mem::transmute(glyphoffsets), @@ -9120,14 +9106,14 @@ impl IDWriteTextAnalyzer { fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(pixelsperdip), - core::mem::transmute(transform.unwrap_or(core::ptr::null())), + core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), core::mem::transmute(scriptanalysis), localename.param().abi(), - core::mem::transmute(features.unwrap_or(core::ptr::null())), - core::mem::transmute(featurerangelengths.unwrap_or(core::ptr::null())), + core::mem::transmute(features.unwrap_or(core::mem::zeroed())), + core::mem::transmute(featurerangelengths.unwrap_or(core::mem::zeroed())), core::mem::transmute(featureranges), core::mem::transmute(glyphadvances), core::mem::transmute(glyphoffsets), @@ -9333,7 +9319,7 @@ impl IDWriteTextAnalyzer1 { P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetTextComplexity)(windows_core::Interface::as_raw(self), textstring.param().abi(), core::mem::transmute(textlength), fontface.param().abi(), core::mem::transmute(istextsimple), core::mem::transmute(textlengthread), core::mem::transmute(glyphindices.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextComplexity)(windows_core::Interface::as_raw(self), textstring.param().abi(), core::mem::transmute(textlength), fontface.param().abi(), core::mem::transmute(istextsimple), core::mem::transmute(textlengthread), core::mem::transmute(glyphindices.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetJustificationOpportunities(&self, fontface: P0, fontemsize: f32, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, textstring: P5, clustermap: *const u16, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES) -> windows_core::Result where @@ -9344,7 +9330,7 @@ impl IDWriteTextAnalyzer1 { (windows_core::Interface::vtable(self).GetJustificationOpportunities)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(scriptanalysis), core::mem::transmute(textlength), core::mem::transmute(glyphcount), textstring.param().abi(), core::mem::transmute(clustermap), core::mem::transmute(glyphproperties), &mut result__).map(|| result__) } 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), core::mem::transmute(linewidth), core::mem::transmute(glyphcount), core::mem::transmute(justificationopportunities), core::mem::transmute(glyphadvances), core::mem::transmute(glyphoffsets), core::mem::transmute(justifiedglyphadvances), core::mem::transmute(justifiedglyphoffsets.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).JustifyGlyphAdvances)(windows_core::Interface::as_raw(self), core::mem::transmute(linewidth), core::mem::transmute(glyphcount), core::mem::transmute(justificationopportunities), core::mem::transmute(glyphadvances), core::mem::transmute(glyphoffsets), core::mem::transmute(justifiedglyphadvances), core::mem::transmute(justifiedglyphoffsets.unwrap_or(core::mem::zeroed()))).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 @@ -9358,14 +9344,14 @@ impl IDWriteTextAnalyzer1 { core::mem::transmute(textlength), core::mem::transmute(glyphcount), core::mem::transmute(maxglyphcount), - core::mem::transmute(clustermap.unwrap_or(core::ptr::null())), + core::mem::transmute(clustermap.unwrap_or(core::mem::zeroed())), core::mem::transmute(glyphindices), core::mem::transmute(glyphadvances), core::mem::transmute(justifiedglyphadvances), core::mem::transmute(justifiedglyphoffsets), core::mem::transmute(glyphproperties), core::mem::transmute(actualglyphcount), - core::mem::transmute(modifiedclustermap.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(modifiedclustermap.unwrap_or(core::mem::zeroed())), core::mem::transmute(modifiedglyphindices), core::mem::transmute(modifiedglyphadvances), core::mem::transmute(modifiedglyphoffsets), @@ -10187,52 +10173,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), core::mem::transmute(currentposition), core::mem::transmute(fontcollection), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontCollection)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(fontcollection), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(namelength), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontFamilyNameLength)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(namelength), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontFamilyName)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(fontweight), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontWeight)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(fontweight), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(fontstyle), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontStyle)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(fontstyle), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(fontstretch), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontStretch)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(fontstretch), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(fontsize), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontSize)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(fontsize), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(hasunderline), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(hasunderline), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(hasstrikethrough), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(hasstrikethrough), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(drawingeffect), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDrawingEffect)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(drawingeffect), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(inlineobject), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(inlineobject), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(typography), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypography)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(typography), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(namelength), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocaleNameLength)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(namelength), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(currentposition), core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocaleName)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Draw(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, renderer: P1, originx: f32, originy: f32) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), renderer.param().abi(), core::mem::transmute(originx), core::mem::transmute(originy)).ok() + (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), renderer.param().abi(), core::mem::transmute(originx), core::mem::transmute(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()), core::mem::transmute(actuallinecount)).ok() @@ -10584,13 +10570,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), core::mem::transmute(currentposition), core::mem::transmute(ispairkerningenabled), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPairKerning)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(ispairkerningenabled), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(leadingspacing), core::mem::transmute(trailingspacing), core::mem::transmute(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), core::mem::transmute(currentposition), core::mem::transmute(leadingspacing), core::mem::transmute(trailingspacing), core::mem::transmute(minimumadvancewidth), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCharacterSpacing)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(leadingspacing), core::mem::transmute(trailingspacing), core::mem::transmute(minimumadvancewidth), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -10857,7 +10843,7 @@ impl IDWriteTextLayout4 { (windows_core::Interface::vtable(self).GetFontAxisValueCount)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(currentposition), core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontAxisValues)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetAutomaticFontAxes(&self) -> DWRITE_AUTOMATIC_FONT_AXES { (windows_core::Interface::vtable(self).GetAutomaticFontAxes)(windows_core::Interface::as_raw(self)) @@ -10933,19 +10919,19 @@ impl IDWriteTextRenderer { where P6: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), core::mem::transmute(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: P4) -> windows_core::Result<()> where P4: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(underline), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(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: P4) -> windows_core::Result<()> where P4: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(strikethrough), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(strikethrough), clientdrawingeffect.param().abi()).ok() } pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, inlineobject: P3, issideways: P4, isrighttoleft: P5, clientdrawingeffect: P6) -> windows_core::Result<()> where @@ -10954,7 +10940,7 @@ impl IDWriteTextRenderer { P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), core::mem::transmute(originx), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(originx), core::mem::transmute(originy), inlineobject.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() } } #[repr(C)] @@ -11017,19 +11003,19 @@ impl IDWriteTextRenderer1 { where P7: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(orientationangle), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), core::mem::transmute(glyphrundescription), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(orientationangle), core::mem::transmute(measuringmode), core::mem::transmute(glyphrun), core::mem::transmute(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: P5) -> windows_core::Result<()> where P5: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(orientationangle), core::mem::transmute(underline), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(orientationangle), core::mem::transmute(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: P5) -> windows_core::Result<()> where P5: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(orientationangle), core::mem::transmute(strikethrough), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(orientationangle), core::mem::transmute(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: P4, issideways: P5, isrighttoleft: P6, clientdrawingeffect: P7) -> windows_core::Result<()> where @@ -11038,7 +11024,7 @@ impl IDWriteTextRenderer1 { P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), core::mem::transmute(originx), core::mem::transmute(originy), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(originx), core::mem::transmute(originy), core::mem::transmute(orientationangle), inlineobject.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() } } #[repr(C)] 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 385146bffd..12a0220216 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs @@ -1,37 +1,23 @@ #[inline] -pub unsafe fn DwmAttachMilContent(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmAttachMilContent(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmAttachMilContent(hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - DwmAttachMilContent(hwnd.param().abi()).ok() + DwmAttachMilContent(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn DwmDefWindowProc(hwnd: P0, msg: u32, wparam: P2, lparam: P3, plresult: *mut super::super::Foundation::LRESULT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DwmDefWindowProc(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plresult: *mut super::super::Foundation::LRESULT) -> super::super::Foundation::BOOL { windows_targets::link!("dwmapi.dll" "system" fn DwmDefWindowProc(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, plresult : *mut super::super::Foundation:: LRESULT) -> super::super::Foundation:: BOOL); - DwmDefWindowProc(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(plresult)) + DwmDefWindowProc(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(plresult)) } #[inline] -pub unsafe fn DwmDetachMilContent(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmDetachMilContent(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmDetachMilContent(hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - DwmDetachMilContent(hwnd.param().abi()).ok() + DwmDetachMilContent(core::mem::transmute(hwnd)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DwmEnableBlurBehindWindow(hwnd: P0, pblurbehind: *const DWM_BLURBEHIND) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmEnableBlurBehindWindow(hwnd: super::super::Foundation::HWND, pblurbehind: *const DWM_BLURBEHIND) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmEnableBlurBehindWindow(hwnd : super::super::Foundation:: HWND, pblurbehind : *const DWM_BLURBEHIND) -> windows_core::HRESULT); - DwmEnableBlurBehindWindow(hwnd.param().abi(), core::mem::transmute(pblurbehind)).ok() + DwmEnableBlurBehindWindow(core::mem::transmute(hwnd), core::mem::transmute(pblurbehind)).ok() } #[inline] pub unsafe fn DwmEnableComposition(ucompositionaction: u32) -> windows_core::Result<()> { @@ -48,12 +34,9 @@ where } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn DwmExtendFrameIntoClientArea(hwnd: P0, pmarinset: *const super::super::UI::Controls::MARGINS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmExtendFrameIntoClientArea(hwnd: super::super::Foundation::HWND, pmarinset: *const super::super::UI::Controls::MARGINS) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmExtendFrameIntoClientArea(hwnd : super::super::Foundation:: HWND, pmarinset : *const super::super::UI::Controls:: MARGINS) -> windows_core::HRESULT); - DwmExtendFrameIntoClientArea(hwnd.param().abi(), core::mem::transmute(pmarinset)).ok() + DwmExtendFrameIntoClientArea(core::mem::transmute(hwnd), core::mem::transmute(pmarinset)).ok() } #[inline] pub unsafe fn DwmFlush() -> windows_core::Result<()> { @@ -66,12 +49,9 @@ pub unsafe fn DwmGetColorizationColor(pcrcolorization: *mut u32, pfopaqueblend: DwmGetColorizationColor(core::mem::transmute(pcrcolorization), core::mem::transmute(pfopaqueblend)).ok() } #[inline] -pub unsafe fn DwmGetCompositionTimingInfo(hwnd: P0, ptiminginfo: *mut DWM_TIMING_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmGetCompositionTimingInfo(hwnd: super::super::Foundation::HWND, ptiminginfo: *mut DWM_TIMING_INFO) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmGetCompositionTimingInfo(hwnd : super::super::Foundation:: HWND, ptiminginfo : *mut DWM_TIMING_INFO) -> windows_core::HRESULT); - DwmGetCompositionTimingInfo(hwnd.param().abi(), core::mem::transmute(ptiminginfo)).ok() + DwmGetCompositionTimingInfo(core::mem::transmute(hwnd), core::mem::transmute(ptiminginfo)).ok() } #[inline] pub unsafe fn DwmGetGraphicsStreamClient(uindex: u32) -> windows_core::Result { @@ -90,29 +70,20 @@ pub unsafe fn DwmGetTransportAttributes(pfisremoting: *mut super::super::Foundat DwmGetTransportAttributes(core::mem::transmute(pfisremoting), core::mem::transmute(pfisconnected), core::mem::transmute(pdwgeneration)).ok() } #[inline] -pub unsafe fn DwmGetUnmetTabRequirements(appwindow: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DwmGetUnmetTabRequirements(appwindow: Option) -> windows_core::Result { windows_targets::link!("dwmapi.dll" "system" fn DwmGetUnmetTabRequirements(appwindow : super::super::Foundation:: HWND, value : *mut DWM_TAB_WINDOW_REQUIREMENTS) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DwmGetUnmetTabRequirements(appwindow.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DwmGetUnmetTabRequirements(core::mem::transmute(appwindow.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DwmGetWindowAttribute(hwnd: P0, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *mut core::ffi::c_void, cbattribute: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmGetWindowAttribute(hwnd: super::super::Foundation::HWND, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *mut core::ffi::c_void, cbattribute: u32) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmGetWindowAttribute(hwnd : super::super::Foundation:: HWND, dwattribute : u32, pvattribute : *mut core::ffi::c_void, cbattribute : u32) -> windows_core::HRESULT); - DwmGetWindowAttribute(hwnd.param().abi(), dwattribute.0 as _, core::mem::transmute(pvattribute), core::mem::transmute(cbattribute)).ok() + DwmGetWindowAttribute(core::mem::transmute(hwnd), dwattribute.0 as _, core::mem::transmute(pvattribute), core::mem::transmute(cbattribute)).ok() } #[inline] -pub unsafe fn DwmInvalidateIconicBitmaps(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmInvalidateIconicBitmaps(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmInvalidateIconicBitmaps(hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - DwmInvalidateIconicBitmaps(hwnd.param().abi()).ok() + DwmInvalidateIconicBitmaps(core::mem::transmute(hwnd)).ok() } #[inline] pub unsafe fn DwmIsCompositionEnabled() -> windows_core::Result { @@ -121,13 +92,12 @@ pub unsafe fn DwmIsCompositionEnabled() -> windows_core::Result(hwnd: P0, crefreshes: i32, frelative: P2) -> windows_core::Result<()> +pub unsafe fn DwmModifyPreviousDxFrameDuration(hwnd: super::super::Foundation::HWND, crefreshes: i32, frelative: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dwmapi.dll" "system" fn DwmModifyPreviousDxFrameDuration(hwnd : super::super::Foundation:: HWND, crefreshes : i32, frelative : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DwmModifyPreviousDxFrameDuration(hwnd.param().abi(), core::mem::transmute(crefreshes), frelative.param().abi()).ok() + DwmModifyPreviousDxFrameDuration(core::mem::transmute(hwnd), core::mem::transmute(crefreshes), frelative.param().abi()).ok() } #[inline] pub unsafe fn DwmQueryThumbnailSourceSize(hthumbnail: isize) -> windows_core::Result { @@ -136,14 +106,10 @@ pub unsafe fn DwmQueryThumbnailSourceSize(hthumbnail: isize) -> windows_core::Re DwmQueryThumbnailSourceSize(core::mem::transmute(hthumbnail), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DwmRegisterThumbnail(hwnddestination: P0, hwndsource: P1) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DwmRegisterThumbnail(hwnddestination: super::super::Foundation::HWND, hwndsource: super::super::Foundation::HWND) -> windows_core::Result { windows_targets::link!("dwmapi.dll" "system" fn DwmRegisterThumbnail(hwnddestination : super::super::Foundation:: HWND, hwndsource : super::super::Foundation:: HWND, phthumbnailid : *mut isize) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DwmRegisterThumbnail(hwnddestination.param().abi(), hwndsource.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DwmRegisterThumbnail(core::mem::transmute(hwnddestination), core::mem::transmute(hwndsource), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn DwmRenderGesture(gt: GESTURE_TYPE, ccontacts: u32, pdwpointerid: *const u32, ppoints: *const super::super::Foundation::POINT) -> windows_core::Result<()> { @@ -151,48 +117,31 @@ pub unsafe fn DwmRenderGesture(gt: GESTURE_TYPE, ccontacts: u32, pdwpointerid: * DwmRenderGesture(core::mem::transmute(gt), core::mem::transmute(ccontacts), core::mem::transmute(pdwpointerid), core::mem::transmute(ppoints)).ok() } #[inline] -pub unsafe fn DwmSetDxFrameDuration(hwnd: P0, crefreshes: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmSetDxFrameDuration(hwnd: super::super::Foundation::HWND, crefreshes: i32) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmSetDxFrameDuration(hwnd : super::super::Foundation:: HWND, crefreshes : i32) -> windows_core::HRESULT); - DwmSetDxFrameDuration(hwnd.param().abi(), core::mem::transmute(crefreshes)).ok() + DwmSetDxFrameDuration(core::mem::transmute(hwnd), core::mem::transmute(crefreshes)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DwmSetIconicLivePreviewBitmap(hwnd: P0, hbmp: P1, pptclient: Option<*const super::super::Foundation::POINT>, dwsitflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DwmSetIconicLivePreviewBitmap(hwnd: super::super::Foundation::HWND, hbmp: super::Gdi::HBITMAP, pptclient: Option<*const super::super::Foundation::POINT>, dwsitflags: u32) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(dwsitflags)).ok() + DwmSetIconicLivePreviewBitmap(core::mem::transmute(hwnd), core::mem::transmute(hbmp), core::mem::transmute(pptclient.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsitflags)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DwmSetIconicThumbnail(hwnd: P0, hbmp: P1, dwsitflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DwmSetIconicThumbnail(hwnd: super::super::Foundation::HWND, hbmp: super::Gdi::HBITMAP, dwsitflags: u32) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmSetIconicThumbnail(hwnd : super::super::Foundation:: HWND, hbmp : super::Gdi:: HBITMAP, dwsitflags : u32) -> windows_core::HRESULT); - DwmSetIconicThumbnail(hwnd.param().abi(), hbmp.param().abi(), core::mem::transmute(dwsitflags)).ok() + DwmSetIconicThumbnail(core::mem::transmute(hwnd), core::mem::transmute(hbmp), core::mem::transmute(dwsitflags)).ok() } #[inline] -pub unsafe fn DwmSetPresentParameters(hwnd: P0, ppresentparams: *mut DWM_PRESENT_PARAMETERS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmSetPresentParameters(hwnd: super::super::Foundation::HWND, ppresentparams: *mut DWM_PRESENT_PARAMETERS) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmSetPresentParameters(hwnd : super::super::Foundation:: HWND, ppresentparams : *mut DWM_PRESENT_PARAMETERS) -> windows_core::HRESULT); - DwmSetPresentParameters(hwnd.param().abi(), core::mem::transmute(ppresentparams)).ok() + DwmSetPresentParameters(core::mem::transmute(hwnd), core::mem::transmute(ppresentparams)).ok() } #[inline] -pub unsafe fn DwmSetWindowAttribute(hwnd: P0, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *const core::ffi::c_void, cbattribute: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmSetWindowAttribute(hwnd: super::super::Foundation::HWND, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *const core::ffi::c_void, cbattribute: u32) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmSetWindowAttribute(hwnd : super::super::Foundation:: HWND, dwattribute : u32, pvattribute : *const core::ffi::c_void, cbattribute : u32) -> windows_core::HRESULT); - DwmSetWindowAttribute(hwnd.param().abi(), dwattribute.0 as _, core::mem::transmute(pvattribute), core::mem::transmute(cbattribute)).ok() + DwmSetWindowAttribute(core::mem::transmute(hwnd), dwattribute.0 as _, core::mem::transmute(pvattribute), core::mem::transmute(cbattribute)).ok() } #[inline] pub unsafe fn DwmShowContact(dwpointerid: u32, eshowcontact: DWM_SHOWCONTACT) -> windows_core::Result<()> { @@ -208,12 +157,9 @@ where DwmTetherContact(core::mem::transmute(dwpointerid), fenable.param().abi(), core::mem::transmute(pttether)).ok() } #[inline] -pub unsafe fn DwmTransitionOwnedWindow(hwnd: P0, target: DWMTRANSITION_OWNEDWINDOW_TARGET) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmTransitionOwnedWindow(hwnd: super::super::Foundation::HWND, target: DWMTRANSITION_OWNEDWINDOW_TARGET) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmTransitionOwnedWindow(hwnd : super::super::Foundation:: HWND, target : DWMTRANSITION_OWNEDWINDOW_TARGET) -> windows_core::HRESULT); - DwmTransitionOwnedWindow(hwnd.param().abi(), core::mem::transmute(target)).ok() + DwmTransitionOwnedWindow(core::mem::transmute(hwnd), core::mem::transmute(target)).ok() } #[inline] pub unsafe fn DwmUnregisterThumbnail(hthumbnailid: isize) -> windows_core::Result<()> { 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 8bd63ce881..06d7e40f15 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs @@ -1996,12 +1996,9 @@ impl core::ops::Deref for IDXGIAdapter3 { } windows_core::imp::interface_hierarchy!(IDXGIAdapter3, windows_core::IUnknown, IDXGIObject, IDXGIAdapter, IDXGIAdapter1, IDXGIAdapter2); impl IDXGIAdapter3 { - pub unsafe fn RegisterHardwareContentProtectionTeardownStatusEvent(&self, hevent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RegisterHardwareContentProtectionTeardownStatusEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterHardwareContentProtectionTeardownStatusEvent)(windows_core::Interface::as_raw(self), hevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterHardwareContentProtectionTeardownStatusEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), &mut result__).map(|| result__) } pub unsafe fn UnregisterHardwareContentProtectionTeardownStatus(&self, dwcookie: u32) { (windows_core::Interface::vtable(self).UnregisterHardwareContentProtectionTeardownStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)) @@ -2012,12 +2009,9 @@ impl IDXGIAdapter3 { pub unsafe fn SetVideoMemoryReservation(&self, nodeindex: u32, memorysegmentgroup: DXGI_MEMORY_SEGMENT_GROUP, reservation: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetVideoMemoryReservation)(windows_core::Interface::as_raw(self), core::mem::transmute(nodeindex), core::mem::transmute(memorysegmentgroup), core::mem::transmute(reservation)).ok() } - pub unsafe fn RegisterVideoMemoryBudgetChangeNotificationEvent(&self, hevent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RegisterVideoMemoryBudgetChangeNotificationEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterVideoMemoryBudgetChangeNotificationEvent)(windows_core::Interface::as_raw(self), hevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterVideoMemoryBudgetChangeNotificationEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), &mut result__).map(|| result__) } pub unsafe fn UnregisterVideoMemoryBudgetChangeNotification(&self, dwcookie: u32) { (windows_core::Interface::vtable(self).UnregisterVideoMemoryBudgetChangeNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)) @@ -2370,7 +2364,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), core::mem::transmute(pdesc), ppsurface.len().try_into().unwrap(), core::mem::transmute(usage), core::mem::transmute(psharedresource.unwrap_or(core::ptr::null())), core::mem::transmute(ppsurface.as_ptr())).ok() + (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), ppsurface.len().try_into().unwrap(), core::mem::transmute(usage), core::mem::transmute(psharedresource.unwrap_or(core::mem::zeroed())), 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), core::mem::transmute(presidencystatus), core::mem::transmute(numresources)).ok() @@ -2531,13 +2525,10 @@ 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()), core::mem::transmute(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), core::mem::transmute(numresources), core::mem::transmute(ppresources), core::mem::transmute(pdiscarded.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReclaimResources)(windows_core::Interface::as_raw(self), core::mem::transmute(numresources), core::mem::transmute(ppresources), core::mem::transmute(pdiscarded.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn EnqueueSetEvent(&self, hevent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnqueueSetEvent)(windows_core::Interface::as_raw(self), hevent.param().abi()).ok() + pub unsafe fn EnqueueSetEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnqueueSetEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent)).ok() } } #[repr(C)] @@ -2786,11 +2777,8 @@ impl IDXGIFactory { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumAdapters)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn MakeWindowAssociation(&self, windowhandle: P0, flags: DXGI_MWA_FLAGS) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).MakeWindowAssociation)(windows_core::Interface::as_raw(self), windowhandle.param().abi(), core::mem::transmute(flags)).ok() + pub unsafe fn MakeWindowAssociation(&self, windowhandle: super::super::Foundation::HWND, flags: DXGI_MWA_FLAGS) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).MakeWindowAssociation)(windows_core::Interface::as_raw(self), core::mem::transmute(windowhandle), core::mem::transmute(flags)).ok() } pub unsafe fn GetWindowAssociation(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2803,12 +2791,9 @@ impl IDXGIFactory { { (windows_core::Interface::vtable(self).CreateSwapChain)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(pdesc), core::mem::transmute(ppswapchain)) } - pub unsafe fn CreateSoftwareAdapter(&self, module: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateSoftwareAdapter(&self, module: super::super::Foundation::HMODULE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSoftwareAdapter)(windows_core::Interface::as_raw(self), module.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSoftwareAdapter)(windows_core::Interface::as_raw(self), core::mem::transmute(module), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2961,14 +2946,13 @@ impl IDXGIFactory2 { (windows_core::Interface::vtable(self).IsWindowedStereoEnabled)(windows_core::Interface::as_raw(self)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] - pub unsafe fn CreateSwapChainForHwnd(&self, pdevice: P0, hwnd: P1, pdesc: *const DXGI_SWAP_CHAIN_DESC1, pfullscreendesc: Option<*const DXGI_SWAP_CHAIN_FULLSCREEN_DESC>, prestricttooutput: P4) -> windows_core::Result + pub unsafe fn CreateSwapChainForHwnd(&self, pdevice: P0, hwnd: super::super::Foundation::HWND, pdesc: *const DXGI_SWAP_CHAIN_DESC1, pfullscreendesc: Option<*const DXGI_SWAP_CHAIN_FULLSCREEN_DESC>, prestricttooutput: P4) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, P4: 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(), core::mem::transmute(pdesc), core::mem::transmute(pfullscreendesc.unwrap_or(core::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(), core::mem::transmute(hwnd), core::mem::transmute(pdesc), core::mem::transmute(pfullscreendesc.unwrap_or(core::mem::zeroed())), 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: P3) -> windows_core::Result @@ -2980,43 +2964,28 @@ impl IDXGIFactory2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateSwapChainForCoreWindow)(windows_core::Interface::as_raw(self), pdevice.param().abi(), pwindow.param().abi(), core::mem::transmute(pdesc), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetSharedResourceAdapterLuid(&self, hresource: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSharedResourceAdapterLuid(&self, hresource: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSharedResourceAdapterLuid)(windows_core::Interface::as_raw(self), hresource.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetSharedResourceAdapterLuid)(windows_core::Interface::as_raw(self), core::mem::transmute(hresource), &mut result__).map(|| result__) } - pub unsafe fn RegisterStereoStatusWindow(&self, windowhandle: P0, wmsg: u32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RegisterStereoStatusWindow(&self, windowhandle: super::super::Foundation::HWND, wmsg: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterStereoStatusWindow)(windows_core::Interface::as_raw(self), windowhandle.param().abi(), core::mem::transmute(wmsg), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterStereoStatusWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(windowhandle), core::mem::transmute(wmsg), &mut result__).map(|| result__) } - pub unsafe fn RegisterStereoStatusEvent(&self, hevent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RegisterStereoStatusEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterStereoStatusEvent)(windows_core::Interface::as_raw(self), hevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterStereoStatusEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), &mut result__).map(|| result__) } pub unsafe fn UnregisterStereoStatus(&self, dwcookie: u32) { (windows_core::Interface::vtable(self).UnregisterStereoStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)) } - pub unsafe fn RegisterOcclusionStatusWindow(&self, windowhandle: P0, wmsg: u32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RegisterOcclusionStatusWindow(&self, windowhandle: super::super::Foundation::HWND, wmsg: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterOcclusionStatusWindow)(windows_core::Interface::as_raw(self), windowhandle.param().abi(), core::mem::transmute(wmsg), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterOcclusionStatusWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(windowhandle), core::mem::transmute(wmsg), &mut result__).map(|| result__) } - pub unsafe fn RegisterOcclusionStatusEvent(&self, hevent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RegisterOcclusionStatusEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterOcclusionStatusEvent)(windows_core::Interface::as_raw(self), hevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterOcclusionStatusEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), &mut result__).map(|| result__) } pub unsafe fn UnregisterOcclusionStatus(&self, dwcookie: u32) { (windows_core::Interface::vtable(self).UnregisterOcclusionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)) @@ -3387,12 +3356,9 @@ impl core::ops::Deref for IDXGIFactory7 { } windows_core::imp::interface_hierarchy!(IDXGIFactory7, windows_core::IUnknown, IDXGIObject, IDXGIFactory, IDXGIFactory1, IDXGIFactory2, IDXGIFactory3, IDXGIFactory4, IDXGIFactory5, IDXGIFactory6); impl IDXGIFactory7 { - pub unsafe fn RegisterAdaptersChangedEvent(&self, hevent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RegisterAdaptersChangedEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterAdaptersChangedEvent)(windows_core::Interface::as_raw(self), hevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterAdaptersChangedEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), &mut result__).map(|| result__) } pub unsafe fn UnregisterAdaptersChangedEvent(&self, dwcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnregisterAdaptersChangedEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)).ok() @@ -3446,24 +3412,22 @@ windows_core::imp::define_interface!(IDXGIFactoryMedia, IDXGIFactoryMedia_Vtbl, windows_core::imp::interface_hierarchy!(IDXGIFactoryMedia, windows_core::IUnknown); impl IDXGIFactoryMedia { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] - pub unsafe fn CreateSwapChainForCompositionSurfaceHandle(&self, pdevice: P0, hsurface: P1, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: P3) -> windows_core::Result + pub unsafe fn CreateSwapChainForCompositionSurfaceHandle(&self, pdevice: P0, hsurface: Option, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: P3) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSwapChainForCompositionSurfaceHandle)(windows_core::Interface::as_raw(self), pdevice.param().abi(), hsurface.param().abi(), core::mem::transmute(pdesc), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSwapChainForCompositionSurfaceHandle)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(hsurface.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdesc), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateDecodeSwapChainForCompositionSurfaceHandle(&self, pdevice: P0, hsurface: P1, pdesc: *const DXGI_DECODE_SWAP_CHAIN_DESC, pyuvdecodebuffers: P3, prestricttooutput: P4) -> windows_core::Result + pub unsafe fn CreateDecodeSwapChainForCompositionSurfaceHandle(&self, pdevice: P0, hsurface: Option, pdesc: *const DXGI_DECODE_SWAP_CHAIN_DESC, pyuvdecodebuffers: P3, prestricttooutput: P4) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateDecodeSwapChainForCompositionSurfaceHandle)(windows_core::Interface::as_raw(self), pdevice.param().abi(), hsurface.param().abi(), core::mem::transmute(pdesc), pyuvdecodebuffers.param().abi(), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateDecodeSwapChainForCompositionSurfaceHandle)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(hsurface.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdesc), pyuvdecodebuffers.param().abi(), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -3529,7 +3493,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), core::mem::transmute(messageindex), core::mem::transmute(pmessage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pmessagebytelength)).ok() + (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(messageindex), core::mem::transmute(pmessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(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)) @@ -3553,7 +3517,7 @@ impl IDXGIInfoQueue { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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)) @@ -3580,7 +3544,7 @@ impl IDXGIInfoQueue { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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)) @@ -4065,7 +4029,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), core::mem::transmute(enumformat), core::mem::transmute(flags), core::mem::transmute(pnummodes), core::mem::transmute(pdesc.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDisplayModeList)(windows_core::Interface::as_raw(self), core::mem::transmute(enumformat), core::mem::transmute(flags), core::mem::transmute(pnummodes), core::mem::transmute(pdesc.unwrap_or(core::mem::zeroed()))).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: P2) -> windows_core::Result<()> @@ -4258,7 +4222,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), core::mem::transmute(enumformat), core::mem::transmute(flags), core::mem::transmute(pnummodes), core::mem::transmute(pdesc.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDisplayModeList1)(windows_core::Interface::as_raw(self), core::mem::transmute(enumformat), core::mem::transmute(flags), core::mem::transmute(pnummodes), core::mem::transmute(pdesc.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn FindClosestMatchingMode1(&self, pmodetomatch: *const DXGI_MODE_DESC1, pclosestmatch: *mut DXGI_MODE_DESC1, pconcerneddevice: P2) -> windows_core::Result<()> @@ -4859,7 +4823,7 @@ impl IDXGIResource1 { P2: 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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(dwaccess), lpname.param().abi(), &mut result__).map(|| result__) } } #[repr(C)] @@ -5008,7 +4972,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(pdirtyrect.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5126,7 +5090,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(core::ptr::null_mut())), core::mem::transmute(pptarget.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFullscreenState)(windows_core::Interface::as_raw(self), core::mem::transmute(pfullscreen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptarget.unwrap_or(core::mem::zeroed()))).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 7160d88d9c..cec3b8f433 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs @@ -1,15 +1,12 @@ #[inline] -pub unsafe fn AbortPath(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn AbortPath(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn AbortPath(hdc : HDC) -> super::super::Foundation:: BOOL); - AbortPath(hdc.param().abi()) + AbortPath(core::mem::transmute(hdc)) } #[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(core::mem::transmute(pfileview), core::mem::transmute(cjsize), core::mem::transmute(pvresrved.unwrap_or(core::ptr::null())), core::mem::transmute(pnumfonts)) + AddFontMemResourceEx(core::mem::transmute(pfileview), core::mem::transmute(cjsize), core::mem::transmute(pvresrved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumfonts)) } #[inline] pub unsafe fn AddFontResourceA(param0: P0) -> i32 @@ -25,7 +22,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(), core::mem::transmute(fl), core::mem::transmute(res.unwrap_or(core::ptr::null()))) + AddFontResourceExA(name.param().abi(), core::mem::transmute(fl), core::mem::transmute(res.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn AddFontResourceExW(name: P0, fl: FONT_RESOURCE_CHARACTERISTICS, res: Option<*const core::ffi::c_void>) -> i32 @@ -33,7 +30,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(), core::mem::transmute(fl), core::mem::transmute(res.unwrap_or(core::ptr::null()))) + AddFontResourceExW(name.param().abi(), core::mem::transmute(fl), core::mem::transmute(res.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn AddFontResourceW(param0: P0) -> i32 @@ -44,156 +41,105 @@ where AddFontResourceW(param0.param().abi()) } #[inline] -pub unsafe fn AlphaBlend(hdcdest: P0, xorigindest: i32, yorigindest: i32, wdest: i32, hdest: i32, hdcsrc: P5, xoriginsrc: i32, yoriginsrc: i32, wsrc: i32, hsrc: i32, ftn: BLENDFUNCTION) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn AlphaBlend(hdcdest: HDC, xorigindest: i32, yorigindest: i32, wdest: i32, hdest: i32, hdcsrc: HDC, xoriginsrc: i32, yoriginsrc: i32, wsrc: i32, hsrc: i32, ftn: BLENDFUNCTION) -> super::super::Foundation::BOOL { windows_targets::link!("msimg32.dll" "system" fn AlphaBlend(hdcdest : HDC, xorigindest : i32, yorigindest : i32, wdest : i32, hdest : i32, hdcsrc : HDC, xoriginsrc : i32, yoriginsrc : i32, wsrc : i32, hsrc : i32, ftn : BLENDFUNCTION) -> super::super::Foundation:: BOOL); - AlphaBlend(hdcdest.param().abi(), core::mem::transmute(xorigindest), core::mem::transmute(yorigindest), core::mem::transmute(wdest), core::mem::transmute(hdest), hdcsrc.param().abi(), core::mem::transmute(xoriginsrc), core::mem::transmute(yoriginsrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(ftn)) + AlphaBlend(core::mem::transmute(hdcdest), core::mem::transmute(xorigindest), core::mem::transmute(yorigindest), core::mem::transmute(wdest), core::mem::transmute(hdest), core::mem::transmute(hdcsrc), core::mem::transmute(xoriginsrc), core::mem::transmute(yoriginsrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(ftn)) } #[inline] -pub unsafe fn AngleArc(hdc: P0, x: i32, y: i32, r: u32, startangle: f32, sweepangle: f32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn AngleArc(hdc: HDC, x: i32, y: i32, r: u32, startangle: f32, sweepangle: f32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn AngleArc(hdc : HDC, x : i32, y : i32, r : u32, startangle : f32, sweepangle : f32) -> super::super::Foundation:: BOOL); - AngleArc(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(r), core::mem::transmute(startangle), core::mem::transmute(sweepangle)) + AngleArc(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(r), core::mem::transmute(startangle), core::mem::transmute(sweepangle)) } #[inline] -pub unsafe fn AnimatePalette(hpal: P0, istartindex: u32, ppe: &[PALETTEENTRY]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn AnimatePalette(hpal: HPALETTE, istartindex: u32, ppe: &[PALETTEENTRY]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn AnimatePalette(hpal : HPALETTE, istartindex : u32, centries : u32, ppe : *const PALETTEENTRY) -> super::super::Foundation:: BOOL); - AnimatePalette(hpal.param().abi(), core::mem::transmute(istartindex), ppe.len().try_into().unwrap(), core::mem::transmute(ppe.as_ptr())) + AnimatePalette(core::mem::transmute(hpal), core::mem::transmute(istartindex), ppe.len().try_into().unwrap(), core::mem::transmute(ppe.as_ptr())) } #[inline] -pub unsafe fn Arc(hdc: P0, x1: i32, y1: i32, x2: i32, y2: i32, x3: i32, y3: i32, x4: i32, y4: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn Arc(hdc: HDC, x1: i32, y1: i32, x2: i32, y2: i32, x3: i32, y3: i32, x4: i32, y4: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn Arc(hdc : HDC, x1 : i32, y1 : i32, x2 : i32, y2 : i32, x3 : i32, y3 : i32, x4 : i32, y4 : i32) -> super::super::Foundation:: BOOL); - Arc(hdc.param().abi(), core::mem::transmute(x1), core::mem::transmute(y1), core::mem::transmute(x2), core::mem::transmute(y2), core::mem::transmute(x3), core::mem::transmute(y3), core::mem::transmute(x4), core::mem::transmute(y4)) + Arc(core::mem::transmute(hdc), core::mem::transmute(x1), core::mem::transmute(y1), core::mem::transmute(x2), core::mem::transmute(y2), core::mem::transmute(x3), core::mem::transmute(y3), core::mem::transmute(x4), core::mem::transmute(y4)) } #[inline] -pub unsafe fn ArcTo(hdc: P0, left: i32, top: i32, right: i32, bottom: i32, xr1: i32, yr1: i32, xr2: i32, yr2: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ArcTo(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32, xr1: i32, yr1: i32, xr2: i32, yr2: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn ArcTo(hdc : HDC, left : i32, top : i32, right : i32, bottom : i32, xr1 : i32, yr1 : i32, xr2 : i32, yr2 : i32) -> super::super::Foundation:: BOOL); - ArcTo(hdc.param().abi(), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom), core::mem::transmute(xr1), core::mem::transmute(yr1), core::mem::transmute(xr2), core::mem::transmute(yr2)) + ArcTo(core::mem::transmute(hdc), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom), core::mem::transmute(xr1), core::mem::transmute(yr1), core::mem::transmute(xr2), core::mem::transmute(yr2)) } #[inline] -pub unsafe fn BeginPaint(hwnd: P0, lppaint: *mut PAINTSTRUCT) -> HDC -where - P0: windows_core::Param, -{ +pub unsafe fn BeginPaint(hwnd: super::super::Foundation::HWND, lppaint: *mut PAINTSTRUCT) -> HDC { windows_targets::link!("user32.dll" "system" fn BeginPaint(hwnd : super::super::Foundation:: HWND, lppaint : *mut PAINTSTRUCT) -> HDC); - BeginPaint(hwnd.param().abi(), core::mem::transmute(lppaint)) + BeginPaint(core::mem::transmute(hwnd), core::mem::transmute(lppaint)) } #[inline] -pub unsafe fn BeginPath(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn BeginPath(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn BeginPath(hdc : HDC) -> super::super::Foundation:: BOOL); - BeginPath(hdc.param().abi()) + BeginPath(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn BitBlt(hdc: P0, x: i32, y: i32, cx: i32, cy: i32, hdcsrc: P5, x1: i32, y1: i32, rop: ROP_CODE) -> windows_core::Result<()> -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn BitBlt(hdc: HDC, x: i32, y: i32, cx: i32, cy: i32, hdcsrc: Option, x1: i32, y1: i32, rop: ROP_CODE) -> windows_core::Result<()> { windows_targets::link!("gdi32.dll" "system" fn BitBlt(hdc : HDC, x : i32, y : i32, cx : i32, cy : i32, hdcsrc : HDC, x1 : i32, y1 : i32, rop : ROP_CODE) -> super::super::Foundation:: BOOL); - BitBlt(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), hdcsrc.param().abi(), core::mem::transmute(x1), core::mem::transmute(y1), core::mem::transmute(rop)).ok() + BitBlt(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(hdcsrc.unwrap_or(core::mem::zeroed())), core::mem::transmute(x1), core::mem::transmute(y1), core::mem::transmute(rop)).ok() } #[inline] -pub unsafe fn CancelDC(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CancelDC(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn CancelDC(hdc : HDC) -> super::super::Foundation:: BOOL); - CancelDC(hdc.param().abi()) + CancelDC(core::mem::transmute(hdc)) } #[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(core::ptr::null())), core::mem::transmute(dwflags)) + ChangeDisplaySettingsA(core::mem::transmute(lpdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn ChangeDisplaySettingsExA(lpszdevicename: P0, lpdevmode: Option<*const DEVMODEA>, hwnd: P2, dwflags: CDS_TYPE, lparam: Option<*const core::ffi::c_void>) -> DISP_CHANGE +pub unsafe fn ChangeDisplaySettingsExA(lpszdevicename: P0, lpdevmode: Option<*const DEVMODEA>, hwnd: Option, dwflags: CDS_TYPE, lparam: Option<*const core::ffi::c_void>) -> DISP_CHANGE where P0: windows_core::Param, - P2: 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(core::ptr::null())), hwnd.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lparam.unwrap_or(core::ptr::null()))) + ChangeDisplaySettingsExA(lpszdevicename.param().abi(), core::mem::transmute(lpdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ChangeDisplaySettingsExW(lpszdevicename: P0, lpdevmode: Option<*const DEVMODEW>, hwnd: P2, dwflags: CDS_TYPE, lparam: Option<*const core::ffi::c_void>) -> DISP_CHANGE +pub unsafe fn ChangeDisplaySettingsExW(lpszdevicename: P0, lpdevmode: Option<*const DEVMODEW>, hwnd: Option, dwflags: CDS_TYPE, lparam: Option<*const core::ffi::c_void>) -> DISP_CHANGE where P0: windows_core::Param, - P2: 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(core::ptr::null())), hwnd.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lparam.unwrap_or(core::ptr::null()))) + ChangeDisplaySettingsExW(lpszdevicename.param().abi(), core::mem::transmute(lpdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(dwflags)) + ChangeDisplaySettingsW(core::mem::transmute(lpdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn Chord(hdc: HDC, x1: i32, y1: i32, x2: i32, y2: i32, x3: i32, y3: i32, x4: i32, y4: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn Chord(hdc : HDC, x1 : i32, y1 : i32, x2 : i32, y2 : i32, x3 : i32, y3 : i32, x4 : i32, y4 : i32) -> super::super::Foundation:: BOOL); - Chord(hdc.param().abi(), core::mem::transmute(x1), core::mem::transmute(y1), core::mem::transmute(x2), core::mem::transmute(y2), core::mem::transmute(x3), core::mem::transmute(y3), core::mem::transmute(x4), core::mem::transmute(y4)) + Chord(core::mem::transmute(hdc), core::mem::transmute(x1), core::mem::transmute(y1), core::mem::transmute(x2), core::mem::transmute(y2), core::mem::transmute(x3), core::mem::transmute(y3), core::mem::transmute(x4), core::mem::transmute(y4)) } #[inline] -pub unsafe fn ClientToScreen(hwnd: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ClientToScreen(hwnd: super::super::Foundation::HWND, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn ClientToScreen(hwnd : super::super::Foundation:: HWND, lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - ClientToScreen(hwnd.param().abi(), core::mem::transmute(lppoint)) + ClientToScreen(core::mem::transmute(hwnd), core::mem::transmute(lppoint)) } #[inline] -pub unsafe fn CloseEnhMetaFile(hdc: P0) -> HENHMETAFILE -where - P0: windows_core::Param, -{ +pub unsafe fn CloseEnhMetaFile(hdc: HDC) -> HENHMETAFILE { windows_targets::link!("gdi32.dll" "system" fn CloseEnhMetaFile(hdc : HDC) -> HENHMETAFILE); - CloseEnhMetaFile(hdc.param().abi()) + CloseEnhMetaFile(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn CloseFigure(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CloseFigure(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn CloseFigure(hdc : HDC) -> super::super::Foundation:: BOOL); - CloseFigure(hdc.param().abi()) + CloseFigure(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn CloseMetaFile(hdc: P0) -> HMETAFILE -where - P0: windows_core::Param, -{ +pub unsafe fn CloseMetaFile(hdc: HDC) -> HMETAFILE { windows_targets::link!("gdi32.dll" "system" fn CloseMetaFile(hdc : HDC) -> HMETAFILE); - CloseMetaFile(hdc.param().abi()) + CloseMetaFile(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn CombineRgn(hrgndst: P0, hrgnsrc1: P1, hrgnsrc2: P2, imode: RGN_COMBINE_MODE) -> GDI_REGION_TYPE -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn CombineRgn(hrgndst: Option, hrgnsrc1: Option, hrgnsrc2: Option, imode: RGN_COMBINE_MODE) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn CombineRgn(hrgndst : HRGN, hrgnsrc1 : HRGN, hrgnsrc2 : HRGN, imode : RGN_COMBINE_MODE) -> GDI_REGION_TYPE); - CombineRgn(hrgndst.param().abi(), hrgnsrc1.param().abi(), hrgnsrc2.param().abi(), core::mem::transmute(imode)) + CombineRgn(core::mem::transmute(hrgndst.unwrap_or(core::mem::zeroed())), core::mem::transmute(hrgnsrc1.unwrap_or(core::mem::zeroed())), core::mem::transmute(hrgnsrc2.unwrap_or(core::mem::zeroed())), core::mem::transmute(imode)) } #[inline] pub unsafe fn CombineTransform(lpxfout: *mut XFORM, lpxf1: *const XFORM, lpxf2: *const XFORM) -> super::super::Foundation::BOOL { @@ -201,40 +147,36 @@ pub unsafe fn CombineTransform(lpxfout: *mut XFORM, lpxf1: *const XFORM, lpxf2: CombineTransform(core::mem::transmute(lpxfout), core::mem::transmute(lpxf1), core::mem::transmute(lpxf2)) } #[inline] -pub unsafe fn CopyEnhMetaFileA(henh: P0, lpfilename: P1) -> HENHMETAFILE +pub unsafe fn CopyEnhMetaFileA(henh: HENHMETAFILE, lpfilename: P1) -> HENHMETAFILE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CopyEnhMetaFileA(henh : HENHMETAFILE, lpfilename : windows_core::PCSTR) -> HENHMETAFILE); - CopyEnhMetaFileA(henh.param().abi(), lpfilename.param().abi()) + CopyEnhMetaFileA(core::mem::transmute(henh), lpfilename.param().abi()) } #[inline] -pub unsafe fn CopyEnhMetaFileW(henh: P0, lpfilename: P1) -> HENHMETAFILE +pub unsafe fn CopyEnhMetaFileW(henh: HENHMETAFILE, lpfilename: P1) -> HENHMETAFILE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CopyEnhMetaFileW(henh : HENHMETAFILE, lpfilename : windows_core::PCWSTR) -> HENHMETAFILE); - CopyEnhMetaFileW(henh.param().abi(), lpfilename.param().abi()) + CopyEnhMetaFileW(core::mem::transmute(henh), lpfilename.param().abi()) } #[inline] -pub unsafe fn CopyMetaFileA(param0: P0, param1: P1) -> HMETAFILE +pub unsafe fn CopyMetaFileA(param0: HMETAFILE, param1: P1) -> HMETAFILE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CopyMetaFileA(param0 : HMETAFILE, param1 : windows_core::PCSTR) -> HMETAFILE); - CopyMetaFileA(param0.param().abi(), param1.param().abi()) + CopyMetaFileA(core::mem::transmute(param0), param1.param().abi()) } #[inline] -pub unsafe fn CopyMetaFileW(param0: P0, param1: P1) -> HMETAFILE +pub unsafe fn CopyMetaFileW(param0: HMETAFILE, param1: P1) -> HMETAFILE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CopyMetaFileW(param0 : HMETAFILE, param1 : windows_core::PCWSTR) -> HMETAFILE); - CopyMetaFileW(param0.param().abi(), param1.param().abi()) + CopyMetaFileW(core::mem::transmute(param0), param1.param().abi()) } #[inline] pub unsafe fn CopyRect(lprcdst: *mut super::super::Foundation::RECT, lprcsrc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -244,7 +186,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(core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(nplanes), core::mem::transmute(nbitcount), core::mem::transmute(lpbits.unwrap_or(core::ptr::null()))) + CreateBitmap(core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(nplanes), core::mem::transmute(nbitcount), core::mem::transmute(lpbits.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CreateBitmapIndirect(pbm: *const BITMAP) -> HBITMAP { @@ -257,20 +199,14 @@ pub unsafe fn CreateBrushIndirect(plbrush: *const LOGBRUSH) -> HBRUSH { CreateBrushIndirect(core::mem::transmute(plbrush)) } #[inline] -pub unsafe fn CreateCompatibleBitmap(hdc: P0, cx: i32, cy: i32) -> HBITMAP -where - P0: windows_core::Param, -{ +pub unsafe fn CreateCompatibleBitmap(hdc: HDC, cx: i32, cy: i32) -> HBITMAP { windows_targets::link!("gdi32.dll" "system" fn CreateCompatibleBitmap(hdc : HDC, cx : i32, cy : i32) -> HBITMAP); - CreateCompatibleBitmap(hdc.param().abi(), core::mem::transmute(cx), core::mem::transmute(cy)) + CreateCompatibleBitmap(core::mem::transmute(hdc), core::mem::transmute(cx), core::mem::transmute(cy)) } #[inline] -pub unsafe fn CreateCompatibleDC(hdc: P0) -> HDC -where - P0: windows_core::Param, -{ +pub unsafe fn CreateCompatibleDC(hdc: Option) -> HDC { windows_targets::link!("gdi32.dll" "system" fn CreateCompatibleDC(hdc : HDC) -> HDC); - CreateCompatibleDC(hdc.param().abi()) + CreateCompatibleDC(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CreateDCA(pwszdriver: P0, pwszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEA>) -> HDC @@ -280,7 +216,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(core::ptr::null()))) + CreateDCA(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CreateDCW(pwszdriver: P0, pwszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEW>) -> HDC @@ -290,15 +226,12 @@ 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(core::ptr::null()))) + CreateDCW(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreateDIBPatternBrush(h: P0, iusage: DIB_USAGE) -> HBRUSH -where - P0: windows_core::Param, -{ +pub unsafe fn CreateDIBPatternBrush(h: super::super::Foundation::HGLOBAL, iusage: DIB_USAGE) -> HBRUSH { windows_targets::link!("gdi32.dll" "system" fn CreateDIBPatternBrush(h : super::super::Foundation:: HGLOBAL, iusage : DIB_USAGE) -> HBRUSH); - CreateDIBPatternBrush(h.param().abi(), core::mem::transmute(iusage)) + CreateDIBPatternBrush(core::mem::transmute(h), core::mem::transmute(iusage)) } #[inline] pub unsafe fn CreateDIBPatternBrushPt(lppackeddib: *const core::ffi::c_void, iusage: DIB_USAGE) -> HBRUSH { @@ -306,30 +239,20 @@ pub unsafe fn CreateDIBPatternBrushPt(lppackeddib: *const core::ffi::c_void, ius CreateDIBPatternBrushPt(core::mem::transmute(lppackeddib), core::mem::transmute(iusage)) } #[inline] -pub unsafe fn CreateDIBSection(hdc: P0, pbmi: *const BITMAPINFO, usage: DIB_USAGE, ppvbits: *mut *mut core::ffi::c_void, hsection: P4, offset: u32) -> windows_core::Result -where - P0: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn CreateDIBSection(hdc: Option, pbmi: *const BITMAPINFO, usage: DIB_USAGE, ppvbits: *mut *mut core::ffi::c_void, hsection: Option, offset: u32) -> windows_core::Result { windows_targets::link!("gdi32.dll" "system" fn CreateDIBSection(hdc : HDC, pbmi : *const BITMAPINFO, usage : DIB_USAGE, ppvbits : *mut *mut core::ffi::c_void, hsection : super::super::Foundation:: HANDLE, offset : u32) -> HBITMAP); - let result__ = CreateDIBSection(hdc.param().abi(), core::mem::transmute(pbmi), core::mem::transmute(usage), core::mem::transmute(ppvbits), hsection.param().abi(), core::mem::transmute(offset)); + let result__ = CreateDIBSection(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbmi), core::mem::transmute(usage), core::mem::transmute(ppvbits), core::mem::transmute(hsection.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateDIBitmap(hdc: P0, pbmih: Option<*const BITMAPINFOHEADER>, flinit: u32, pjbits: Option<*const core::ffi::c_void>, pbmi: Option<*const BITMAPINFO>, iusage: DIB_USAGE) -> HBITMAP -where - P0: windows_core::Param, -{ +pub unsafe fn CreateDIBitmap(hdc: HDC, pbmih: Option<*const BITMAPINFOHEADER>, flinit: u32, pjbits: Option<*const core::ffi::c_void>, pbmi: Option<*const BITMAPINFO>, iusage: DIB_USAGE) -> HBITMAP { 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(core::ptr::null())), core::mem::transmute(flinit), core::mem::transmute(pjbits.unwrap_or(core::ptr::null())), core::mem::transmute(pbmi.unwrap_or(core::ptr::null())), core::mem::transmute(iusage)) + CreateDIBitmap(core::mem::transmute(hdc), core::mem::transmute(pbmih.unwrap_or(core::mem::zeroed())), core::mem::transmute(flinit), core::mem::transmute(pjbits.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbmi.unwrap_or(core::mem::zeroed())), core::mem::transmute(iusage)) } #[inline] -pub unsafe fn CreateDiscardableBitmap(hdc: P0, cx: i32, cy: i32) -> HBITMAP -where - P0: windows_core::Param, -{ +pub unsafe fn CreateDiscardableBitmap(hdc: HDC, cx: i32, cy: i32) -> HBITMAP { windows_targets::link!("gdi32.dll" "system" fn CreateDiscardableBitmap(hdc : HDC, cx : i32, cy : i32) -> HBITMAP); - CreateDiscardableBitmap(hdc.param().abi(), core::mem::transmute(cx), core::mem::transmute(cy)) + CreateDiscardableBitmap(core::mem::transmute(hdc), core::mem::transmute(cx), core::mem::transmute(cy)) } #[inline] pub unsafe fn CreateEllipticRgn(x1: i32, y1: i32, x2: i32, y2: i32) -> HRGN { @@ -342,24 +265,22 @@ pub unsafe fn CreateEllipticRgnIndirect(lprect: *const super::super::Foundation: CreateEllipticRgnIndirect(core::mem::transmute(lprect)) } #[inline] -pub unsafe fn CreateEnhMetaFileA(hdc: P0, lpfilename: P1, lprc: Option<*const super::super::Foundation::RECT>, lpdesc: P3) -> HDC +pub unsafe fn CreateEnhMetaFileA(hdc: Option, lpfilename: P1, lprc: Option<*const super::super::Foundation::RECT>, lpdesc: P3) -> HDC where - P0: windows_core::Param, P1: windows_core::Param, P3: 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(core::ptr::null())), lpdesc.param().abi()) + CreateEnhMetaFileA(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), lpfilename.param().abi(), core::mem::transmute(lprc.unwrap_or(core::mem::zeroed())), lpdesc.param().abi()) } #[inline] -pub unsafe fn CreateEnhMetaFileW(hdc: P0, lpfilename: P1, lprc: Option<*const super::super::Foundation::RECT>, lpdesc: P3) -> HDC +pub unsafe fn CreateEnhMetaFileW(hdc: Option, lpfilename: P1, lprc: Option<*const super::super::Foundation::RECT>, lpdesc: P3) -> HDC where - P0: windows_core::Param, P1: windows_core::Param, P3: 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(core::ptr::null())), lpdesc.param().abi()) + CreateEnhMetaFileW(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), lpfilename.param().abi(), core::mem::transmute(lprc.unwrap_or(core::mem::zeroed())), 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: FONT_CHARSET, ioutprecision: FONT_OUTPUT_PRECISION, iclipprecision: FONT_CLIP_PRECISION, iquality: FONT_QUALITY, ipitchandfamily: u32, pszfacename: P13) -> HFONT @@ -421,20 +342,14 @@ where CreateFontW(core::mem::transmute(cheight), core::mem::transmute(cwidth), core::mem::transmute(cescapement), core::mem::transmute(corientation), core::mem::transmute(cweight), core::mem::transmute(bitalic), core::mem::transmute(bunderline), core::mem::transmute(bstrikeout), icharset.0 as _, ioutprecision.0 as _, iclipprecision.0 as _, iquality.0 as _, core::mem::transmute(ipitchandfamily), pszfacename.param().abi()) } #[inline] -pub unsafe fn CreateHalftonePalette(hdc: P0) -> HPALETTE -where - P0: windows_core::Param, -{ +pub unsafe fn CreateHalftonePalette(hdc: Option) -> HPALETTE { windows_targets::link!("gdi32.dll" "system" fn CreateHalftonePalette(hdc : HDC) -> HPALETTE); - CreateHalftonePalette(hdc.param().abi()) + CreateHalftonePalette(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreateHatchBrush(ihatch: HATCH_BRUSH_STYLE, color: P1) -> HBRUSH -where - P1: windows_core::Param, -{ +pub unsafe fn CreateHatchBrush(ihatch: HATCH_BRUSH_STYLE, color: super::super::Foundation::COLORREF) -> HBRUSH { windows_targets::link!("gdi32.dll" "system" fn CreateHatchBrush(ihatch : HATCH_BRUSH_STYLE, color : super::super::Foundation:: COLORREF) -> HBRUSH); - CreateHatchBrush(core::mem::transmute(ihatch), color.param().abi()) + CreateHatchBrush(core::mem::transmute(ihatch), core::mem::transmute(color)) } #[inline] pub unsafe fn CreateICA(pszdriver: P0, pszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEA>) -> HDC @@ -444,7 +359,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(core::ptr::null()))) + CreateICA(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CreateICW(pszdriver: P0, pszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEW>) -> HDC @@ -454,7 +369,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(core::ptr::null()))) + CreateICW(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CreateMetaFileA(pszfile: P0) -> HDC @@ -478,20 +393,14 @@ pub unsafe fn CreatePalette(plpal: *const LOGPALETTE) -> HPALETTE { CreatePalette(core::mem::transmute(plpal)) } #[inline] -pub unsafe fn CreatePatternBrush(hbm: P0) -> HBRUSH -where - P0: windows_core::Param, -{ +pub unsafe fn CreatePatternBrush(hbm: HBITMAP) -> HBRUSH { windows_targets::link!("gdi32.dll" "system" fn CreatePatternBrush(hbm : HBITMAP) -> HBRUSH); - CreatePatternBrush(hbm.param().abi()) + CreatePatternBrush(core::mem::transmute(hbm)) } #[inline] -pub unsafe fn CreatePen(istyle: PEN_STYLE, cwidth: i32, color: P2) -> HPEN -where - P2: windows_core::Param, -{ +pub unsafe fn CreatePen(istyle: PEN_STYLE, cwidth: i32, color: super::super::Foundation::COLORREF) -> HPEN { windows_targets::link!("gdi32.dll" "system" fn CreatePen(istyle : PEN_STYLE, cwidth : i32, color : super::super::Foundation:: COLORREF) -> HPEN); - CreatePen(core::mem::transmute(istyle), core::mem::transmute(cwidth), color.param().abi()) + CreatePen(core::mem::transmute(istyle), core::mem::transmute(cwidth), core::mem::transmute(color)) } #[inline] pub unsafe fn CreatePenIndirect(plpen: *const LOGPEN) -> HPEN { @@ -544,179 +453,109 @@ where CreateScalableFontResourceW(core::mem::transmute(fdwhidden), lpszfont.param().abi(), lpszfile.param().abi(), lpszpath.param().abi()).ok() } #[inline] -pub unsafe fn CreateSolidBrush(color: P0) -> HBRUSH -where - P0: windows_core::Param, -{ +pub unsafe fn CreateSolidBrush(color: super::super::Foundation::COLORREF) -> HBRUSH { windows_targets::link!("gdi32.dll" "system" fn CreateSolidBrush(color : super::super::Foundation:: COLORREF) -> HBRUSH); - CreateSolidBrush(color.param().abi()) + CreateSolidBrush(core::mem::transmute(color)) } #[inline] -pub unsafe fn DPtoLP(hdc: P0, lppt: &mut [super::super::Foundation::POINT]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DPtoLP(hdc: HDC, lppt: &mut [super::super::Foundation::POINT]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn DPtoLP(hdc : HDC, lppt : *mut super::super::Foundation:: POINT, c : i32) -> super::super::Foundation:: BOOL); - DPtoLP(hdc.param().abi(), core::mem::transmute(lppt.as_ptr()), lppt.len().try_into().unwrap()) + DPtoLP(core::mem::transmute(hdc), core::mem::transmute(lppt.as_ptr()), lppt.len().try_into().unwrap()) } #[inline] -pub unsafe fn DeleteDC(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteDC(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn DeleteDC(hdc : HDC) -> super::super::Foundation:: BOOL); - DeleteDC(hdc.param().abi()) + DeleteDC(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn DeleteEnhMetaFile(hmf: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteEnhMetaFile(hmf: Option) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn DeleteEnhMetaFile(hmf : HENHMETAFILE) -> super::super::Foundation:: BOOL); - DeleteEnhMetaFile(hmf.param().abi()) + DeleteEnhMetaFile(core::mem::transmute(hmf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DeleteMetaFile(hmf: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteMetaFile(hmf: HMETAFILE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn DeleteMetaFile(hmf : HMETAFILE) -> super::super::Foundation:: BOOL); - DeleteMetaFile(hmf.param().abi()) + DeleteMetaFile(core::mem::transmute(hmf)) } #[inline] -pub unsafe fn DeleteObject(ho: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteObject(ho: HGDIOBJ) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn DeleteObject(ho : HGDIOBJ) -> super::super::Foundation:: BOOL); - DeleteObject(ho.param().abi()) + DeleteObject(core::mem::transmute(ho)) } #[inline] -pub unsafe fn DrawAnimatedRects(hwnd: P0, idani: i32, lprcfrom: *const super::super::Foundation::RECT, lprcto: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DrawAnimatedRects(hwnd: Option, idani: i32, lprcfrom: *const super::super::Foundation::RECT, lprcto: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DrawAnimatedRects(hwnd : super::super::Foundation:: HWND, idani : i32, lprcfrom : *const super::super::Foundation:: RECT, lprcto : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - DrawAnimatedRects(hwnd.param().abi(), core::mem::transmute(idani), core::mem::transmute(lprcfrom), core::mem::transmute(lprcto)) + DrawAnimatedRects(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(idani), core::mem::transmute(lprcfrom), core::mem::transmute(lprcto)) } #[inline] -pub unsafe fn DrawCaption(hwnd: P0, hdc: P1, lprect: *const super::super::Foundation::RECT, flags: DRAW_CAPTION_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DrawCaption(hwnd: super::super::Foundation::HWND, hdc: HDC, lprect: *const super::super::Foundation::RECT, flags: DRAW_CAPTION_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DrawCaption(hwnd : super::super::Foundation:: HWND, hdc : HDC, lprect : *const super::super::Foundation:: RECT, flags : DRAW_CAPTION_FLAGS) -> super::super::Foundation:: BOOL); - DrawCaption(hwnd.param().abi(), hdc.param().abi(), core::mem::transmute(lprect), core::mem::transmute(flags)) + DrawCaption(core::mem::transmute(hwnd), core::mem::transmute(hdc), core::mem::transmute(lprect), core::mem::transmute(flags)) } #[inline] -pub unsafe fn DrawEdge(hdc: P0, qrc: *mut super::super::Foundation::RECT, edge: DRAWEDGE_FLAGS, grfflags: DRAW_EDGE_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DrawEdge(hdc: HDC, qrc: *mut super::super::Foundation::RECT, edge: DRAWEDGE_FLAGS, grfflags: DRAW_EDGE_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DrawEdge(hdc : HDC, qrc : *mut super::super::Foundation:: RECT, edge : DRAWEDGE_FLAGS, grfflags : DRAW_EDGE_FLAGS) -> super::super::Foundation:: BOOL); - DrawEdge(hdc.param().abi(), core::mem::transmute(qrc), core::mem::transmute(edge), core::mem::transmute(grfflags)) + DrawEdge(core::mem::transmute(hdc), core::mem::transmute(qrc), core::mem::transmute(edge), core::mem::transmute(grfflags)) } #[inline] -pub unsafe fn DrawEscape(hdc: P0, iescape: i32, lpin: Option<&[u8]>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DrawEscape(hdc: HDC, iescape: i32, lpin: Option<&[u8]>) -> i32 { windows_targets::link!("gdi32.dll" "system" fn DrawEscape(hdc : HDC, iescape : i32, cjin : i32, lpin : windows_core::PCSTR) -> i32); - DrawEscape(hdc.param().abi(), core::mem::transmute(iescape), lpin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpin.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + DrawEscape(core::mem::transmute(hdc), core::mem::transmute(iescape), lpin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpin.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn DrawFocusRect(hdc: P0, lprc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DrawFocusRect(hdc: HDC, lprc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DrawFocusRect(hdc : HDC, lprc : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - DrawFocusRect(hdc.param().abi(), core::mem::transmute(lprc)) + DrawFocusRect(core::mem::transmute(hdc), core::mem::transmute(lprc)) } #[inline] -pub unsafe fn DrawFrameControl(param0: P0, param1: *mut super::super::Foundation::RECT, param2: DFC_TYPE, param3: DFCS_STATE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DrawFrameControl(param0: HDC, param1: *mut super::super::Foundation::RECT, param2: DFC_TYPE, param3: DFCS_STATE) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DrawFrameControl(param0 : HDC, param1 : *mut super::super::Foundation:: RECT, param2 : DFC_TYPE, param3 : DFCS_STATE) -> super::super::Foundation:: BOOL); - DrawFrameControl(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) + DrawFrameControl(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] -pub unsafe fn DrawStateA(hdc: P0, hbrfore: P1, qfncallback: DRAWSTATEPROC, ldata: P3, wdata: P4, x: i32, y: i32, cx: i32, cy: i32, uflags: DRAWSTATE_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DrawStateA(hdc: HDC, hbrfore: Option, qfncallback: Option, ldata: super::super::Foundation::LPARAM, wdata: super::super::Foundation::WPARAM, x: i32, y: i32, cx: i32, cy: i32, uflags: DRAWSTATE_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DrawStateA(hdc : HDC, hbrfore : HBRUSH, qfncallback : DRAWSTATEPROC, ldata : super::super::Foundation:: LPARAM, wdata : super::super::Foundation:: WPARAM, x : i32, y : i32, cx : i32, cy : i32, uflags : DRAWSTATE_FLAGS) -> super::super::Foundation:: BOOL); - DrawStateA(hdc.param().abi(), hbrfore.param().abi(), core::mem::transmute(qfncallback), ldata.param().abi(), wdata.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(uflags)) + DrawStateA(core::mem::transmute(hdc), core::mem::transmute(hbrfore.unwrap_or(core::mem::zeroed())), core::mem::transmute(qfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(ldata), core::mem::transmute(wdata), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(uflags)) } #[inline] -pub unsafe fn DrawStateW(hdc: P0, hbrfore: P1, qfncallback: DRAWSTATEPROC, ldata: P3, wdata: P4, x: i32, y: i32, cx: i32, cy: i32, uflags: DRAWSTATE_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DrawStateW(hdc: HDC, hbrfore: Option, qfncallback: Option, ldata: super::super::Foundation::LPARAM, wdata: super::super::Foundation::WPARAM, x: i32, y: i32, cx: i32, cy: i32, uflags: DRAWSTATE_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DrawStateW(hdc : HDC, hbrfore : HBRUSH, qfncallback : DRAWSTATEPROC, ldata : super::super::Foundation:: LPARAM, wdata : super::super::Foundation:: WPARAM, x : i32, y : i32, cx : i32, cy : i32, uflags : DRAWSTATE_FLAGS) -> super::super::Foundation:: BOOL); - DrawStateW(hdc.param().abi(), hbrfore.param().abi(), core::mem::transmute(qfncallback), ldata.param().abi(), wdata.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(uflags)) + DrawStateW(core::mem::transmute(hdc), core::mem::transmute(hbrfore.unwrap_or(core::mem::zeroed())), core::mem::transmute(qfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(ldata), core::mem::transmute(wdata), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(uflags)) } #[inline] -pub unsafe fn DrawTextA(hdc: P0, lpchtext: &mut [u8], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DrawTextA(hdc: HDC, lpchtext: &mut [u8], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT) -> i32 { windows_targets::link!("user32.dll" "system" fn DrawTextA(hdc : HDC, lpchtext : windows_core::PCSTR, cchtext : i32, lprc : *mut super::super::Foundation:: RECT, format : DRAW_TEXT_FORMAT) -> i32); - DrawTextA(hdc.param().abi(), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), core::mem::transmute(format)) + DrawTextA(core::mem::transmute(hdc), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), core::mem::transmute(format)) } #[inline] -pub unsafe fn DrawTextExA(hdc: P0, lpchtext: &mut [u8], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT, lpdtp: Option<*const DRAWTEXTPARAMS>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DrawTextExA(hdc: HDC, lpchtext: &mut [u8], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT, lpdtp: Option<*const DRAWTEXTPARAMS>) -> i32 { 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(), core::mem::transmute(lprc), core::mem::transmute(format), core::mem::transmute(lpdtp.unwrap_or(core::ptr::null()))) + DrawTextExA(core::mem::transmute(hdc), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), core::mem::transmute(format), core::mem::transmute(lpdtp.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn DrawTextExW(hdc: HDC, lpchtext: &mut [u16], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT, lpdtp: Option<*const DRAWTEXTPARAMS>) -> i32 { 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(), core::mem::transmute(lprc), core::mem::transmute(format), core::mem::transmute(lpdtp.unwrap_or(core::ptr::null()))) + DrawTextExW(core::mem::transmute(hdc), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), core::mem::transmute(format), core::mem::transmute(lpdtp.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DrawTextW(hdc: P0, lpchtext: &mut [u16], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DrawTextW(hdc: HDC, lpchtext: &mut [u16], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT) -> i32 { windows_targets::link!("user32.dll" "system" fn DrawTextW(hdc : HDC, lpchtext : windows_core::PCWSTR, cchtext : i32, lprc : *mut super::super::Foundation:: RECT, format : DRAW_TEXT_FORMAT) -> i32); - DrawTextW(hdc.param().abi(), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), core::mem::transmute(format)) + DrawTextW(core::mem::transmute(hdc), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), core::mem::transmute(lprc), core::mem::transmute(format)) } #[inline] -pub unsafe fn Ellipse(hdc: P0, left: i32, top: i32, right: i32, bottom: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn Ellipse(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn Ellipse(hdc : HDC, left : i32, top : i32, right : i32, bottom : i32) -> super::super::Foundation:: BOOL); - Ellipse(hdc.param().abi(), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) + Ellipse(core::mem::transmute(hdc), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) } #[inline] -pub unsafe fn EndPaint(hwnd: P0, lppaint: *const PAINTSTRUCT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn EndPaint(hwnd: super::super::Foundation::HWND, lppaint: *const PAINTSTRUCT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn EndPaint(hwnd : super::super::Foundation:: HWND, lppaint : *const PAINTSTRUCT) -> super::super::Foundation:: BOOL); - EndPaint(hwnd.param().abi(), core::mem::transmute(lppaint)) + EndPaint(core::mem::transmute(hwnd), core::mem::transmute(lppaint)) } #[inline] -pub unsafe fn EndPath(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn EndPath(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EndPath(hdc : HDC) -> super::super::Foundation:: BOOL); - EndPath(hdc.param().abi()) + EndPath(core::mem::transmute(hdc)) } #[inline] pub unsafe fn EnumDisplayDevicesA(lpdevice: P0, idevnum: u32, lpdisplaydevice: *mut DISPLAY_DEVICEA, dwflags: u32) -> super::super::Foundation::BOOL @@ -735,13 +574,9 @@ where EnumDisplayDevicesW(lpdevice.param().abi(), core::mem::transmute(idevnum), core::mem::transmute(lpdisplaydevice), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn EnumDisplayMonitors(hdc: P0, lprcclip: Option<*const super::super::Foundation::RECT>, lpfnenum: MONITORENUMPROC, dwdata: P3) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn EnumDisplayMonitors(hdc: Option, lprcclip: Option<*const super::super::Foundation::RECT>, lpfnenum: MONITORENUMPROC, dwdata: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { 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(core::ptr::null())), core::mem::transmute(lpfnenum), dwdata.param().abi()) + EnumDisplayMonitors(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprcclip.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfnenum), core::mem::transmute(dwdata)) } #[inline] pub unsafe fn EnumDisplaySettingsA(lpszdevicename: P0, imodenum: ENUM_DISPLAY_SETTINGS_MODE, lpdevmode: *mut DEVMODEA) -> super::super::Foundation::BOOL @@ -776,90 +611,61 @@ where EnumDisplaySettingsW(lpszdevicename.param().abi(), core::mem::transmute(imodenum), core::mem::transmute(lpdevmode)) } #[inline] -pub unsafe fn EnumEnhMetaFile(hdc: P0, hmf: P1, proc: ENHMFENUMPROC, param3: Option<*const core::ffi::c_void>, lprect: Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EnumEnhMetaFile(hdc: Option, hmf: HENHMETAFILE, proc: ENHMFENUMPROC, param3: Option<*const core::ffi::c_void>, lprect: Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(proc), core::mem::transmute(param3.unwrap_or(core::ptr::null())), core::mem::transmute(lprect.unwrap_or(core::ptr::null()))) + EnumEnhMetaFile(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmf), core::mem::transmute(proc), core::mem::transmute(param3.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn EnumFontFamiliesA(hdc: P0, lplogfont: P1, lpproc: FONTENUMPROCA, lparam: P3) -> i32 +pub unsafe fn EnumFontFamiliesA(hdc: HDC, lplogfont: P1, lpproc: FONTENUMPROCA, lparam: super::super::Foundation::LPARAM) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn EnumFontFamiliesA(hdc : HDC, lplogfont : windows_core::PCSTR, lpproc : FONTENUMPROCA, lparam : super::super::Foundation:: LPARAM) -> i32); - EnumFontFamiliesA(hdc.param().abi(), lplogfont.param().abi(), core::mem::transmute(lpproc), lparam.param().abi()) + EnumFontFamiliesA(core::mem::transmute(hdc), lplogfont.param().abi(), core::mem::transmute(lpproc), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumFontFamiliesExA(hdc: P0, lplogfont: *const LOGFONTA, lpproc: FONTENUMPROCA, lparam: P3, dwflags: u32) -> i32 -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn EnumFontFamiliesExA(hdc: HDC, lplogfont: *const LOGFONTA, lpproc: FONTENUMPROCA, lparam: super::super::Foundation::LPARAM, dwflags: u32) -> i32 { windows_targets::link!("gdi32.dll" "system" fn EnumFontFamiliesExA(hdc : HDC, lplogfont : *const LOGFONTA, lpproc : FONTENUMPROCA, lparam : super::super::Foundation:: LPARAM, dwflags : u32) -> i32); - EnumFontFamiliesExA(hdc.param().abi(), core::mem::transmute(lplogfont), core::mem::transmute(lpproc), lparam.param().abi(), core::mem::transmute(dwflags)) + EnumFontFamiliesExA(core::mem::transmute(hdc), core::mem::transmute(lplogfont), core::mem::transmute(lpproc), core::mem::transmute(lparam), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn EnumFontFamiliesExW(hdc: P0, lplogfont: *const LOGFONTW, lpproc: FONTENUMPROCW, lparam: P3, dwflags: u32) -> i32 -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn EnumFontFamiliesExW(hdc: HDC, lplogfont: *const LOGFONTW, lpproc: FONTENUMPROCW, lparam: super::super::Foundation::LPARAM, dwflags: u32) -> i32 { windows_targets::link!("gdi32.dll" "system" fn EnumFontFamiliesExW(hdc : HDC, lplogfont : *const LOGFONTW, lpproc : FONTENUMPROCW, lparam : super::super::Foundation:: LPARAM, dwflags : u32) -> i32); - EnumFontFamiliesExW(hdc.param().abi(), core::mem::transmute(lplogfont), core::mem::transmute(lpproc), lparam.param().abi(), core::mem::transmute(dwflags)) + EnumFontFamiliesExW(core::mem::transmute(hdc), core::mem::transmute(lplogfont), core::mem::transmute(lpproc), core::mem::transmute(lparam), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn EnumFontFamiliesW(hdc: P0, lplogfont: P1, lpproc: FONTENUMPROCW, lparam: P3) -> i32 +pub unsafe fn EnumFontFamiliesW(hdc: HDC, lplogfont: P1, lpproc: FONTENUMPROCW, lparam: super::super::Foundation::LPARAM) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn EnumFontFamiliesW(hdc : HDC, lplogfont : windows_core::PCWSTR, lpproc : FONTENUMPROCW, lparam : super::super::Foundation:: LPARAM) -> i32); - EnumFontFamiliesW(hdc.param().abi(), lplogfont.param().abi(), core::mem::transmute(lpproc), lparam.param().abi()) + EnumFontFamiliesW(core::mem::transmute(hdc), lplogfont.param().abi(), core::mem::transmute(lpproc), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumFontsA(hdc: P0, lplogfont: P1, lpproc: FONTENUMPROCA, lparam: P3) -> i32 +pub unsafe fn EnumFontsA(hdc: HDC, lplogfont: P1, lpproc: FONTENUMPROCA, lparam: super::super::Foundation::LPARAM) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn EnumFontsA(hdc : HDC, lplogfont : windows_core::PCSTR, lpproc : FONTENUMPROCA, lparam : super::super::Foundation:: LPARAM) -> i32); - EnumFontsA(hdc.param().abi(), lplogfont.param().abi(), core::mem::transmute(lpproc), lparam.param().abi()) + EnumFontsA(core::mem::transmute(hdc), lplogfont.param().abi(), core::mem::transmute(lpproc), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumFontsW(hdc: P0, lplogfont: P1, lpproc: FONTENUMPROCW, lparam: P3) -> i32 +pub unsafe fn EnumFontsW(hdc: HDC, lplogfont: P1, lpproc: FONTENUMPROCW, lparam: super::super::Foundation::LPARAM) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn EnumFontsW(hdc : HDC, lplogfont : windows_core::PCWSTR, lpproc : FONTENUMPROCW, lparam : super::super::Foundation:: LPARAM) -> i32); - EnumFontsW(hdc.param().abi(), lplogfont.param().abi(), core::mem::transmute(lpproc), lparam.param().abi()) + EnumFontsW(core::mem::transmute(hdc), lplogfont.param().abi(), core::mem::transmute(lpproc), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumMetaFile(hdc: P0, hmf: P1, proc: MFENUMPROC, param3: P3) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn EnumMetaFile(hdc: HDC, hmf: HMETAFILE, proc: MFENUMPROC, param3: Option) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EnumMetaFile(hdc : HDC, hmf : HMETAFILE, proc : MFENUMPROC, param3 : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumMetaFile(hdc.param().abi(), hmf.param().abi(), core::mem::transmute(proc), param3.param().abi()) + EnumMetaFile(core::mem::transmute(hdc), core::mem::transmute(hmf), core::mem::transmute(proc), core::mem::transmute(param3.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn EnumObjects(hdc: P0, ntype: OBJ_TYPE, lpfunc: GOBJENUMPROC, lparam: P3) -> i32 -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn EnumObjects(hdc: HDC, ntype: OBJ_TYPE, lpfunc: GOBJENUMPROC, lparam: super::super::Foundation::LPARAM) -> i32 { windows_targets::link!("gdi32.dll" "system" fn EnumObjects(hdc : HDC, ntype : OBJ_TYPE, lpfunc : GOBJENUMPROC, lparam : super::super::Foundation:: LPARAM) -> i32); - EnumObjects(hdc.param().abi(), core::mem::transmute(ntype), core::mem::transmute(lpfunc), lparam.param().abi()) + EnumObjects(core::mem::transmute(hdc), core::mem::transmute(ntype), core::mem::transmute(lpfunc), core::mem::transmute(lparam)) } #[inline] pub unsafe fn EqualRect(lprc1: *const super::super::Foundation::RECT, lprc2: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -867,30 +673,19 @@ pub unsafe fn EqualRect(lprc1: *const super::super::Foundation::RECT, lprc2: *co EqualRect(core::mem::transmute(lprc1), core::mem::transmute(lprc2)) } #[inline] -pub unsafe fn EqualRgn(hrgn1: P0, hrgn2: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EqualRgn(hrgn1: HRGN, hrgn2: HRGN) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EqualRgn(hrgn1 : HRGN, hrgn2 : HRGN) -> super::super::Foundation:: BOOL); - EqualRgn(hrgn1.param().abi(), hrgn2.param().abi()) + EqualRgn(core::mem::transmute(hrgn1), core::mem::transmute(hrgn2)) } #[inline] -pub unsafe fn ExcludeClipRect(hdc: P0, left: i32, top: i32, right: i32, bottom: i32) -> GDI_REGION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn ExcludeClipRect(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn ExcludeClipRect(hdc : HDC, left : i32, top : i32, right : i32, bottom : i32) -> GDI_REGION_TYPE); - ExcludeClipRect(hdc.param().abi(), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) + ExcludeClipRect(core::mem::transmute(hdc), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) } #[inline] -pub unsafe fn ExcludeUpdateRgn(hdc: P0, hwnd: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ExcludeUpdateRgn(hdc: HDC, hwnd: super::super::Foundation::HWND) -> i32 { windows_targets::link!("user32.dll" "system" fn ExcludeUpdateRgn(hdc : HDC, hwnd : super::super::Foundation:: HWND) -> i32); - ExcludeUpdateRgn(hdc.param().abi(), hwnd.param().abi()) + ExcludeUpdateRgn(core::mem::transmute(hdc), core::mem::transmute(hwnd)) } #[inline] pub unsafe fn ExtCreatePen(ipenstyle: PEN_STYLE, cwidth: u32, plbrush: *const LOGBRUSH, pstyle: Option<&[u32]>) -> HPEN { @@ -900,131 +695,83 @@ 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(core::ptr::null())), core::mem::transmute(ncount), core::mem::transmute(lpdata)) + ExtCreateRegion(core::mem::transmute(lpx.unwrap_or(core::mem::zeroed())), core::mem::transmute(ncount), core::mem::transmute(lpdata)) } #[inline] -pub unsafe fn ExtFloodFill(hdc: P0, x: i32, y: i32, color: P3, r#type: EXT_FLOOD_FILL_TYPE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn ExtFloodFill(hdc: HDC, x: i32, y: i32, color: super::super::Foundation::COLORREF, r#type: EXT_FLOOD_FILL_TYPE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn ExtFloodFill(hdc : HDC, x : i32, y : i32, color : super::super::Foundation:: COLORREF, r#type : EXT_FLOOD_FILL_TYPE) -> super::super::Foundation:: BOOL); - ExtFloodFill(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), color.param().abi(), core::mem::transmute(r#type)) + ExtFloodFill(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(color), core::mem::transmute(r#type)) } #[inline] -pub unsafe fn ExtSelectClipRgn(hdc: P0, hrgn: P1, mode: RGN_COMBINE_MODE) -> GDI_REGION_TYPE -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ExtSelectClipRgn(hdc: HDC, hrgn: Option, mode: RGN_COMBINE_MODE) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn ExtSelectClipRgn(hdc : HDC, hrgn : HRGN, mode : RGN_COMBINE_MODE) -> GDI_REGION_TYPE); - ExtSelectClipRgn(hdc.param().abi(), hrgn.param().abi(), core::mem::transmute(mode)) + ExtSelectClipRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), core::mem::transmute(mode)) } #[inline] -pub unsafe fn ExtTextOutA(hdc: P0, x: i32, y: i32, options: ETO_OPTIONS, lprect: Option<*const super::super::Foundation::RECT>, lpstring: P5, c: u32, lpdx: Option<*const i32>) -> super::super::Foundation::BOOL +pub unsafe fn ExtTextOutA(hdc: HDC, x: i32, y: i32, options: ETO_OPTIONS, lprect: Option<*const super::super::Foundation::RECT>, lpstring: P5, c: u32, lpdx: Option<*const i32>) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P5: 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(options), core::mem::transmute(lprect.unwrap_or(core::ptr::null())), lpstring.param().abi(), core::mem::transmute(c), core::mem::transmute(lpdx.unwrap_or(core::ptr::null()))) + ExtTextOutA(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(options), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), lpstring.param().abi(), core::mem::transmute(c), core::mem::transmute(lpdx.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ExtTextOutW(hdc: P0, x: i32, y: i32, options: ETO_OPTIONS, lprect: Option<*const super::super::Foundation::RECT>, lpstring: P5, c: u32, lpdx: Option<*const i32>) -> super::super::Foundation::BOOL +pub unsafe fn ExtTextOutW(hdc: HDC, x: i32, y: i32, options: ETO_OPTIONS, lprect: Option<*const super::super::Foundation::RECT>, lpstring: P5, c: u32, lpdx: Option<*const i32>) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P5: 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(options), core::mem::transmute(lprect.unwrap_or(core::ptr::null())), lpstring.param().abi(), core::mem::transmute(c), core::mem::transmute(lpdx.unwrap_or(core::ptr::null()))) + ExtTextOutW(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(options), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), lpstring.param().abi(), core::mem::transmute(c), core::mem::transmute(lpdx.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FillPath(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FillPath(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn FillPath(hdc : HDC) -> super::super::Foundation:: BOOL); - FillPath(hdc.param().abi()) + FillPath(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn FillRect(hdc: P0, lprc: *const super::super::Foundation::RECT, hbr: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FillRect(hdc: HDC, lprc: *const super::super::Foundation::RECT, hbr: HBRUSH) -> i32 { windows_targets::link!("user32.dll" "system" fn FillRect(hdc : HDC, lprc : *const super::super::Foundation:: RECT, hbr : HBRUSH) -> i32); - FillRect(hdc.param().abi(), core::mem::transmute(lprc), hbr.param().abi()) + FillRect(core::mem::transmute(hdc), core::mem::transmute(lprc), core::mem::transmute(hbr)) } #[inline] -pub unsafe fn FillRgn(hdc: P0, hrgn: P1, hbr: P2) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FillRgn(hdc: HDC, hrgn: HRGN, hbr: HBRUSH) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn FillRgn(hdc : HDC, hrgn : HRGN, hbr : HBRUSH) -> super::super::Foundation:: BOOL); - FillRgn(hdc.param().abi(), hrgn.param().abi(), hbr.param().abi()) + FillRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn), core::mem::transmute(hbr)) } #[inline] -pub unsafe fn FixBrushOrgEx(hdc: P0, x: i32, y: i32, ptl: Option<*const super::super::Foundation::POINT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FixBrushOrgEx(hdc: HDC, x: i32, y: i32, ptl: Option<*const super::super::Foundation::POINT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(ptl.unwrap_or(core::ptr::null()))) + FixBrushOrgEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(ptl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FlattenPath(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FlattenPath(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn FlattenPath(hdc : HDC) -> super::super::Foundation:: BOOL); - FlattenPath(hdc.param().abi()) + FlattenPath(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn FloodFill(hdc: P0, x: i32, y: i32, color: P3) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FloodFill(hdc: HDC, x: i32, y: i32, color: super::super::Foundation::COLORREF) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn FloodFill(hdc : HDC, x : i32, y : i32, color : super::super::Foundation:: COLORREF) -> super::super::Foundation:: BOOL); - FloodFill(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), color.param().abi()) + FloodFill(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(color)) } #[inline] -pub unsafe fn FrameRect(hdc: P0, lprc: *const super::super::Foundation::RECT, hbr: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FrameRect(hdc: HDC, lprc: *const super::super::Foundation::RECT, hbr: HBRUSH) -> i32 { windows_targets::link!("user32.dll" "system" fn FrameRect(hdc : HDC, lprc : *const super::super::Foundation:: RECT, hbr : HBRUSH) -> i32); - FrameRect(hdc.param().abi(), core::mem::transmute(lprc), hbr.param().abi()) + FrameRect(core::mem::transmute(hdc), core::mem::transmute(lprc), core::mem::transmute(hbr)) } #[inline] -pub unsafe fn FrameRgn(hdc: P0, hrgn: P1, hbr: P2, w: i32, h: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FrameRgn(hdc: HDC, hrgn: HRGN, hbr: HBRUSH, w: i32, h: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn FrameRgn(hdc : HDC, hrgn : HRGN, hbr : HBRUSH, w : i32, h : i32) -> super::super::Foundation:: BOOL); - FrameRgn(hdc.param().abi(), hrgn.param().abi(), hbr.param().abi(), core::mem::transmute(w), core::mem::transmute(h)) + FrameRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn), core::mem::transmute(hbr), core::mem::transmute(w), core::mem::transmute(h)) } #[inline] -pub unsafe fn GdiAlphaBlend(hdcdest: P0, xorigindest: i32, yorigindest: i32, wdest: i32, hdest: i32, hdcsrc: P5, xoriginsrc: i32, yoriginsrc: i32, wsrc: i32, hsrc: i32, ftn: BLENDFUNCTION) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn GdiAlphaBlend(hdcdest: HDC, xorigindest: i32, yorigindest: i32, wdest: i32, hdest: i32, hdcsrc: HDC, xoriginsrc: i32, yoriginsrc: i32, wsrc: i32, hsrc: i32, ftn: BLENDFUNCTION) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiAlphaBlend(hdcdest : HDC, xorigindest : i32, yorigindest : i32, wdest : i32, hdest : i32, hdcsrc : HDC, xoriginsrc : i32, yoriginsrc : i32, wsrc : i32, hsrc : i32, ftn : BLENDFUNCTION) -> super::super::Foundation:: BOOL); - GdiAlphaBlend(hdcdest.param().abi(), core::mem::transmute(xorigindest), core::mem::transmute(yorigindest), core::mem::transmute(wdest), core::mem::transmute(hdest), hdcsrc.param().abi(), core::mem::transmute(xoriginsrc), core::mem::transmute(yoriginsrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(ftn)) + GdiAlphaBlend(core::mem::transmute(hdcdest), core::mem::transmute(xorigindest), core::mem::transmute(yorigindest), core::mem::transmute(wdest), core::mem::transmute(hdest), core::mem::transmute(hdcsrc), core::mem::transmute(xoriginsrc), core::mem::transmute(yoriginsrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(ftn)) } #[inline] -pub unsafe fn GdiComment(hdc: P0, lpdata: &[u8]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiComment(hdc: HDC, lpdata: &[u8]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiComment(hdc : HDC, nsize : u32, lpdata : *const u8) -> super::super::Foundation:: BOOL); - GdiComment(hdc.param().abi(), lpdata.len().try_into().unwrap(), core::mem::transmute(lpdata.as_ptr())) + GdiComment(core::mem::transmute(hdc), lpdata.len().try_into().unwrap(), core::mem::transmute(lpdata.as_ptr())) } #[inline] pub unsafe fn GdiFlush() -> super::super::Foundation::BOOL { @@ -1037,12 +784,9 @@ pub unsafe fn GdiGetBatchLimit() -> u32 { GdiGetBatchLimit() } #[inline] -pub unsafe fn GdiGradientFill(hdc: P0, pvertex: &[TRIVERTEX], pmesh: *const core::ffi::c_void, ncount: u32, ulmode: GRADIENT_FILL) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiGradientFill(hdc: HDC, pvertex: &[TRIVERTEX], pmesh: *const core::ffi::c_void, ncount: u32, ulmode: GRADIENT_FILL) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiGradientFill(hdc : HDC, pvertex : *const TRIVERTEX, nvertex : u32, pmesh : *const core::ffi::c_void, ncount : u32, ulmode : GRADIENT_FILL) -> super::super::Foundation:: BOOL); - GdiGradientFill(hdc.param().abi(), core::mem::transmute(pvertex.as_ptr()), pvertex.len().try_into().unwrap(), core::mem::transmute(pmesh), core::mem::transmute(ncount), core::mem::transmute(ulmode)) + GdiGradientFill(core::mem::transmute(hdc), core::mem::transmute(pvertex.as_ptr()), pvertex.len().try_into().unwrap(), core::mem::transmute(pmesh), core::mem::transmute(ncount), core::mem::transmute(ulmode)) } #[inline] pub unsafe fn GdiSetBatchLimit(dw: u32) -> u32 { @@ -1050,296 +794,184 @@ pub unsafe fn GdiSetBatchLimit(dw: u32) -> u32 { GdiSetBatchLimit(core::mem::transmute(dw)) } #[inline] -pub unsafe fn GdiTransparentBlt(hdcdest: P0, xorigindest: i32, yorigindest: i32, wdest: i32, hdest: i32, hdcsrc: P5, xoriginsrc: i32, yoriginsrc: i32, wsrc: i32, hsrc: i32, crtransparent: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn GdiTransparentBlt(hdcdest: HDC, xorigindest: i32, yorigindest: i32, wdest: i32, hdest: i32, hdcsrc: HDC, xoriginsrc: i32, yoriginsrc: i32, wsrc: i32, hsrc: i32, crtransparent: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiTransparentBlt(hdcdest : HDC, xorigindest : i32, yorigindest : i32, wdest : i32, hdest : i32, hdcsrc : HDC, xoriginsrc : i32, yoriginsrc : i32, wsrc : i32, hsrc : i32, crtransparent : u32) -> super::super::Foundation:: BOOL); - GdiTransparentBlt(hdcdest.param().abi(), core::mem::transmute(xorigindest), core::mem::transmute(yorigindest), core::mem::transmute(wdest), core::mem::transmute(hdest), hdcsrc.param().abi(), core::mem::transmute(xoriginsrc), core::mem::transmute(yoriginsrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(crtransparent)) + GdiTransparentBlt(core::mem::transmute(hdcdest), core::mem::transmute(xorigindest), core::mem::transmute(yorigindest), core::mem::transmute(wdest), core::mem::transmute(hdest), core::mem::transmute(hdcsrc), core::mem::transmute(xoriginsrc), core::mem::transmute(yoriginsrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(crtransparent)) } #[inline] -pub unsafe fn GetArcDirection(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetArcDirection(hdc: HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetArcDirection(hdc : HDC) -> i32); - GetArcDirection(hdc.param().abi()) + GetArcDirection(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetAspectRatioFilterEx(hdc: P0, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetAspectRatioFilterEx(hdc: HDC, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetAspectRatioFilterEx(hdc : HDC, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetAspectRatioFilterEx(hdc.param().abi(), core::mem::transmute(lpsize)) + GetAspectRatioFilterEx(core::mem::transmute(hdc), core::mem::transmute(lpsize)) } #[inline] -pub unsafe fn GetBitmapBits(hbit: P0, cb: i32, lpvbits: *mut core::ffi::c_void) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetBitmapBits(hbit: HBITMAP, cb: i32, lpvbits: *mut core::ffi::c_void) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetBitmapBits(hbit : HBITMAP, cb : i32, lpvbits : *mut core::ffi::c_void) -> i32); - GetBitmapBits(hbit.param().abi(), core::mem::transmute(cb), core::mem::transmute(lpvbits)) + GetBitmapBits(core::mem::transmute(hbit), core::mem::transmute(cb), core::mem::transmute(lpvbits)) } #[inline] -pub unsafe fn GetBitmapDimensionEx(hbit: P0, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetBitmapDimensionEx(hbit: HBITMAP, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetBitmapDimensionEx(hbit : HBITMAP, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetBitmapDimensionEx(hbit.param().abi(), core::mem::transmute(lpsize)) + GetBitmapDimensionEx(core::mem::transmute(hbit), core::mem::transmute(lpsize)) } #[inline] -pub unsafe fn GetBkColor(hdc: P0) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, -{ +pub unsafe fn GetBkColor(hdc: HDC) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn GetBkColor(hdc : HDC) -> super::super::Foundation:: COLORREF); - GetBkColor(hdc.param().abi()) + GetBkColor(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetBkMode(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetBkMode(hdc: HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetBkMode(hdc : HDC) -> i32); - GetBkMode(hdc.param().abi()) + GetBkMode(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetBoundsRect(hdc: P0, lprect: *mut super::super::Foundation::RECT, flags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetBoundsRect(hdc: HDC, lprect: *mut super::super::Foundation::RECT, flags: u32) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetBoundsRect(hdc : HDC, lprect : *mut super::super::Foundation:: RECT, flags : u32) -> u32); - GetBoundsRect(hdc.param().abi(), core::mem::transmute(lprect), core::mem::transmute(flags)) + GetBoundsRect(core::mem::transmute(hdc), core::mem::transmute(lprect), core::mem::transmute(flags)) } #[inline] -pub unsafe fn GetBrushOrgEx(hdc: P0, lppt: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetBrushOrgEx(hdc: HDC, lppt: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetBrushOrgEx(hdc : HDC, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - GetBrushOrgEx(hdc.param().abi(), core::mem::transmute(lppt)) + GetBrushOrgEx(core::mem::transmute(hdc), core::mem::transmute(lppt)) } #[inline] -pub unsafe fn GetCharABCWidthsA(hdc: P0, wfirst: u32, wlast: u32, lpabc: *mut ABC) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharABCWidthsA(hdc: HDC, wfirst: u32, wlast: u32, lpabc: *mut ABC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharABCWidthsA(hdc : HDC, wfirst : u32, wlast : u32, lpabc : *mut ABC) -> super::super::Foundation:: BOOL); - GetCharABCWidthsA(hdc.param().abi(), core::mem::transmute(wfirst), core::mem::transmute(wlast), core::mem::transmute(lpabc)) + GetCharABCWidthsA(core::mem::transmute(hdc), core::mem::transmute(wfirst), core::mem::transmute(wlast), core::mem::transmute(lpabc)) } #[inline] -pub unsafe fn GetCharABCWidthsFloatA(hdc: P0, ifirst: u32, ilast: u32, lpabc: *mut ABCFLOAT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharABCWidthsFloatA(hdc: HDC, ifirst: u32, ilast: u32, lpabc: *mut ABCFLOAT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharABCWidthsFloatA(hdc : HDC, ifirst : u32, ilast : u32, lpabc : *mut ABCFLOAT) -> super::super::Foundation:: BOOL); - GetCharABCWidthsFloatA(hdc.param().abi(), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpabc)) + GetCharABCWidthsFloatA(core::mem::transmute(hdc), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpabc)) } #[inline] -pub unsafe fn GetCharABCWidthsFloatW(hdc: P0, ifirst: u32, ilast: u32, lpabc: *mut ABCFLOAT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharABCWidthsFloatW(hdc: HDC, ifirst: u32, ilast: u32, lpabc: *mut ABCFLOAT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharABCWidthsFloatW(hdc : HDC, ifirst : u32, ilast : u32, lpabc : *mut ABCFLOAT) -> super::super::Foundation:: BOOL); - GetCharABCWidthsFloatW(hdc.param().abi(), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpabc)) + GetCharABCWidthsFloatW(core::mem::transmute(hdc), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpabc)) } #[inline] -pub unsafe fn GetCharABCWidthsI(hdc: P0, gifirst: u32, cgi: u32, pgi: Option<*const u16>, pabc: *mut ABC) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharABCWidthsI(hdc: HDC, gifirst: u32, cgi: u32, pgi: Option<*const u16>, pabc: *mut ABC) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(gifirst), core::mem::transmute(cgi), core::mem::transmute(pgi.unwrap_or(core::ptr::null())), core::mem::transmute(pabc)) + GetCharABCWidthsI(core::mem::transmute(hdc), core::mem::transmute(gifirst), core::mem::transmute(cgi), core::mem::transmute(pgi.unwrap_or(core::mem::zeroed())), core::mem::transmute(pabc)) } #[inline] -pub unsafe fn GetCharABCWidthsW(hdc: P0, wfirst: u32, wlast: u32, lpabc: *mut ABC) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharABCWidthsW(hdc: HDC, wfirst: u32, wlast: u32, lpabc: *mut ABC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharABCWidthsW(hdc : HDC, wfirst : u32, wlast : u32, lpabc : *mut ABC) -> super::super::Foundation:: BOOL); - GetCharABCWidthsW(hdc.param().abi(), core::mem::transmute(wfirst), core::mem::transmute(wlast), core::mem::transmute(lpabc)) + GetCharABCWidthsW(core::mem::transmute(hdc), core::mem::transmute(wfirst), core::mem::transmute(wlast), core::mem::transmute(lpabc)) } #[inline] -pub unsafe fn GetCharWidth32A(hdc: P0, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharWidth32A(hdc: HDC, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharWidth32A(hdc : HDC, ifirst : u32, ilast : u32, lpbuffer : *mut i32) -> super::super::Foundation:: BOOL); - GetCharWidth32A(hdc.param().abi(), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) + GetCharWidth32A(core::mem::transmute(hdc), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) } #[inline] -pub unsafe fn GetCharWidth32W(hdc: P0, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharWidth32W(hdc: HDC, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharWidth32W(hdc : HDC, ifirst : u32, ilast : u32, lpbuffer : *mut i32) -> super::super::Foundation:: BOOL); - GetCharWidth32W(hdc.param().abi(), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) + GetCharWidth32W(core::mem::transmute(hdc), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) } #[inline] -pub unsafe fn GetCharWidthA(hdc: P0, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharWidthA(hdc: HDC, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharWidthA(hdc : HDC, ifirst : u32, ilast : u32, lpbuffer : *mut i32) -> super::super::Foundation:: BOOL); - GetCharWidthA(hdc.param().abi(), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) + GetCharWidthA(core::mem::transmute(hdc), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) } #[inline] -pub unsafe fn GetCharWidthFloatA(hdc: P0, ifirst: u32, ilast: u32, lpbuffer: *mut f32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharWidthFloatA(hdc: HDC, ifirst: u32, ilast: u32, lpbuffer: *mut f32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharWidthFloatA(hdc : HDC, ifirst : u32, ilast : u32, lpbuffer : *mut f32) -> super::super::Foundation:: BOOL); - GetCharWidthFloatA(hdc.param().abi(), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) + GetCharWidthFloatA(core::mem::transmute(hdc), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) } #[inline] -pub unsafe fn GetCharWidthFloatW(hdc: P0, ifirst: u32, ilast: u32, lpbuffer: *mut f32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharWidthFloatW(hdc: HDC, ifirst: u32, ilast: u32, lpbuffer: *mut f32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharWidthFloatW(hdc : HDC, ifirst : u32, ilast : u32, lpbuffer : *mut f32) -> super::super::Foundation:: BOOL); - GetCharWidthFloatW(hdc.param().abi(), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) + GetCharWidthFloatW(core::mem::transmute(hdc), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) } #[inline] -pub unsafe fn GetCharWidthI(hdc: P0, gifirst: u32, cgi: u32, pgi: Option<*const u16>, piwidths: *mut i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharWidthI(hdc: HDC, gifirst: u32, cgi: u32, pgi: Option<*const u16>, piwidths: *mut i32) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(gifirst), core::mem::transmute(cgi), core::mem::transmute(pgi.unwrap_or(core::ptr::null())), core::mem::transmute(piwidths)) + GetCharWidthI(core::mem::transmute(hdc), core::mem::transmute(gifirst), core::mem::transmute(cgi), core::mem::transmute(pgi.unwrap_or(core::mem::zeroed())), core::mem::transmute(piwidths)) } #[inline] -pub unsafe fn GetCharWidthW(hdc: P0, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharWidthW(hdc: HDC, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCharWidthW(hdc : HDC, ifirst : u32, ilast : u32, lpbuffer : *mut i32) -> super::super::Foundation:: BOOL); - GetCharWidthW(hdc.param().abi(), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) + GetCharWidthW(core::mem::transmute(hdc), core::mem::transmute(ifirst), core::mem::transmute(ilast), core::mem::transmute(lpbuffer)) } #[inline] -pub unsafe fn GetCharacterPlacementA(hdc: P0, lpstring: &[u8], nmexextent: i32, lpresults: *mut GCP_RESULTSA, dwflags: GET_CHARACTER_PLACEMENT_FLAGS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharacterPlacementA(hdc: HDC, lpstring: &[u8], nmexextent: i32, lpresults: *mut GCP_RESULTSA, dwflags: GET_CHARACTER_PLACEMENT_FLAGS) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetCharacterPlacementA(hdc : HDC, lpstring : windows_core::PCSTR, ncount : i32, nmexextent : i32, lpresults : *mut GCP_RESULTSA, dwflags : GET_CHARACTER_PLACEMENT_FLAGS) -> u32); - GetCharacterPlacementA(hdc.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(nmexextent), core::mem::transmute(lpresults), core::mem::transmute(dwflags)) + GetCharacterPlacementA(core::mem::transmute(hdc), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(nmexextent), core::mem::transmute(lpresults), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn GetCharacterPlacementW(hdc: P0, lpstring: &[u16], nmexextent: i32, lpresults: *mut GCP_RESULTSW, dwflags: GET_CHARACTER_PLACEMENT_FLAGS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetCharacterPlacementW(hdc: HDC, lpstring: &[u16], nmexextent: i32, lpresults: *mut GCP_RESULTSW, dwflags: GET_CHARACTER_PLACEMENT_FLAGS) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetCharacterPlacementW(hdc : HDC, lpstring : windows_core::PCWSTR, ncount : i32, nmexextent : i32, lpresults : *mut GCP_RESULTSW, dwflags : GET_CHARACTER_PLACEMENT_FLAGS) -> u32); - GetCharacterPlacementW(hdc.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(nmexextent), core::mem::transmute(lpresults), core::mem::transmute(dwflags)) + GetCharacterPlacementW(core::mem::transmute(hdc), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(nmexextent), core::mem::transmute(lpresults), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn GetClipBox(hdc: P0, lprect: *mut super::super::Foundation::RECT) -> GDI_REGION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn GetClipBox(hdc: HDC, lprect: *mut super::super::Foundation::RECT) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn GetClipBox(hdc : HDC, lprect : *mut super::super::Foundation:: RECT) -> GDI_REGION_TYPE); - GetClipBox(hdc.param().abi(), core::mem::transmute(lprect)) + GetClipBox(core::mem::transmute(hdc), core::mem::transmute(lprect)) } #[inline] -pub unsafe fn GetClipRgn(hdc: P0, hrgn: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetClipRgn(hdc: HDC, hrgn: HRGN) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetClipRgn(hdc : HDC, hrgn : HRGN) -> i32); - GetClipRgn(hdc.param().abi(), hrgn.param().abi()) + GetClipRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn)) } #[inline] -pub unsafe fn GetColorAdjustment(hdc: P0, lpca: *mut COLORADJUSTMENT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetColorAdjustment(hdc: HDC, lpca: *mut COLORADJUSTMENT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetColorAdjustment(hdc : HDC, lpca : *mut COLORADJUSTMENT) -> super::super::Foundation:: BOOL); - GetColorAdjustment(hdc.param().abi(), core::mem::transmute(lpca)) + GetColorAdjustment(core::mem::transmute(hdc), core::mem::transmute(lpca)) } #[inline] -pub unsafe fn GetCurrentObject(hdc: P0, r#type: OBJ_TYPE) -> HGDIOBJ -where - P0: windows_core::Param, -{ +pub unsafe fn GetCurrentObject(hdc: HDC, r#type: OBJ_TYPE) -> HGDIOBJ { windows_targets::link!("gdi32.dll" "system" fn GetCurrentObject(hdc : HDC, r#type : u32) -> HGDIOBJ); - GetCurrentObject(hdc.param().abi(), r#type.0 as _) + GetCurrentObject(core::mem::transmute(hdc), r#type.0 as _) } #[inline] -pub unsafe fn GetCurrentPositionEx(hdc: P0, lppt: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetCurrentPositionEx(hdc: HDC, lppt: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetCurrentPositionEx(hdc : HDC, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - GetCurrentPositionEx(hdc.param().abi(), core::mem::transmute(lppt)) + GetCurrentPositionEx(core::mem::transmute(hdc), core::mem::transmute(lppt)) } #[inline] -pub unsafe fn GetDC(hwnd: P0) -> HDC -where - P0: windows_core::Param, -{ +pub unsafe fn GetDC(hwnd: Option) -> HDC { windows_targets::link!("user32.dll" "system" fn GetDC(hwnd : super::super::Foundation:: HWND) -> HDC); - GetDC(hwnd.param().abi()) + GetDC(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetDCBrushColor(hdc: P0) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, -{ +pub unsafe fn GetDCBrushColor(hdc: HDC) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn GetDCBrushColor(hdc : HDC) -> super::super::Foundation:: COLORREF); - GetDCBrushColor(hdc.param().abi()) + GetDCBrushColor(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetDCEx(hwnd: P0, hrgnclip: P1, flags: GET_DCX_FLAGS) -> HDC -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetDCEx(hwnd: Option, hrgnclip: Option, flags: GET_DCX_FLAGS) -> HDC { windows_targets::link!("user32.dll" "system" fn GetDCEx(hwnd : super::super::Foundation:: HWND, hrgnclip : HRGN, flags : GET_DCX_FLAGS) -> HDC); - GetDCEx(hwnd.param().abi(), hrgnclip.param().abi(), core::mem::transmute(flags)) + GetDCEx(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hrgnclip.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn GetDCOrgEx(hdc: P0, lppt: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetDCOrgEx(hdc: HDC, lppt: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetDCOrgEx(hdc : HDC, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - GetDCOrgEx(hdc.param().abi(), core::mem::transmute(lppt)) + GetDCOrgEx(core::mem::transmute(hdc), core::mem::transmute(lppt)) } #[inline] -pub unsafe fn GetDCPenColor(hdc: P0) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, -{ +pub unsafe fn GetDCPenColor(hdc: HDC) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn GetDCPenColor(hdc : HDC) -> super::super::Foundation:: COLORREF); - GetDCPenColor(hdc.param().abi()) + GetDCPenColor(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetDIBColorTable(hdc: P0, istart: u32, prgbq: &mut [RGBQUAD]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetDIBColorTable(hdc: HDC, istart: u32, prgbq: &mut [RGBQUAD]) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetDIBColorTable(hdc : HDC, istart : u32, centries : u32, prgbq : *mut RGBQUAD) -> u32); - GetDIBColorTable(hdc.param().abi(), core::mem::transmute(istart), prgbq.len().try_into().unwrap(), core::mem::transmute(prgbq.as_ptr())) + GetDIBColorTable(core::mem::transmute(hdc), core::mem::transmute(istart), prgbq.len().try_into().unwrap(), core::mem::transmute(prgbq.as_ptr())) } #[inline] -pub unsafe fn GetDIBits(hdc: P0, hbm: P1, start: u32, clines: u32, lpvbits: Option<*mut core::ffi::c_void>, lpbmi: *mut BITMAPINFO, usage: DIB_USAGE) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetDIBits(hdc: HDC, hbm: HBITMAP, start: u32, clines: u32, lpvbits: Option<*mut core::ffi::c_void>, lpbmi: *mut BITMAPINFO, usage: DIB_USAGE) -> i32 { 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(), core::mem::transmute(start), core::mem::transmute(clines), core::mem::transmute(lpvbits.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpbmi), core::mem::transmute(usage)) + GetDIBits(core::mem::transmute(hdc), core::mem::transmute(hbm), core::mem::transmute(start), core::mem::transmute(clines), core::mem::transmute(lpvbits.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbmi), core::mem::transmute(usage)) } #[inline] -pub unsafe fn GetDeviceCaps(hdc: P0, index: GET_DEVICE_CAPS_INDEX) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetDeviceCaps(hdc: Option, index: GET_DEVICE_CAPS_INDEX) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetDeviceCaps(hdc : HDC, index : i32) -> i32); - GetDeviceCaps(hdc.param().abi(), index.0 as _) + GetDeviceCaps(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), index.0 as _) } #[inline] pub unsafe fn GetEnhMetaFileA(lpname: P0) -> HENHMETAFILE @@ -1350,44 +982,29 @@ where GetEnhMetaFileA(lpname.param().abi()) } #[inline] -pub unsafe fn GetEnhMetaFileBits(hemf: P0, lpdata: Option<&mut [u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetEnhMetaFileBits(hemf: HENHMETAFILE, lpdata: Option<&mut [u8]>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFileBits(hemf : HENHMETAFILE, nsize : u32, lpdata : *mut u8) -> u32); - GetEnhMetaFileBits(hemf.param().abi(), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetEnhMetaFileBits(core::mem::transmute(hemf), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetEnhMetaFileDescriptionA(hemf: P0, lpdescription: Option<&mut [u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetEnhMetaFileDescriptionA(hemf: HENHMETAFILE, lpdescription: Option<&mut [u8]>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFileDescriptionA(hemf : HENHMETAFILE, cchbuffer : u32, lpdescription : windows_core::PSTR) -> u32); - GetEnhMetaFileDescriptionA(hemf.param().abi(), lpdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetEnhMetaFileDescriptionA(core::mem::transmute(hemf), lpdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetEnhMetaFileDescriptionW(hemf: P0, lpdescription: Option<&mut [u16]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetEnhMetaFileDescriptionW(hemf: HENHMETAFILE, lpdescription: Option<&mut [u16]>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFileDescriptionW(hemf : HENHMETAFILE, cchbuffer : u32, lpdescription : windows_core::PWSTR) -> u32); - GetEnhMetaFileDescriptionW(hemf.param().abi(), lpdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetEnhMetaFileDescriptionW(core::mem::transmute(hemf), lpdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetEnhMetaFileHeader(hemf: P0, nsize: u32, lpenhmetaheader: Option<*mut ENHMETAHEADER>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetEnhMetaFileHeader(hemf: HENHMETAFILE, nsize: u32, lpenhmetaheader: Option<*mut ENHMETAHEADER>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFileHeader(hemf : HENHMETAFILE, nsize : u32, lpenhmetaheader : *mut ENHMETAHEADER) -> u32); - GetEnhMetaFileHeader(hemf.param().abi(), core::mem::transmute(nsize), core::mem::transmute(lpenhmetaheader.unwrap_or(core::ptr::null_mut()))) + GetEnhMetaFileHeader(core::mem::transmute(hemf), core::mem::transmute(nsize), core::mem::transmute(lpenhmetaheader.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetEnhMetaFilePaletteEntries(hemf: P0, lppaletteentries: Option<&mut [PALETTEENTRY]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetEnhMetaFilePaletteEntries(hemf: HENHMETAFILE, lppaletteentries: Option<&mut [PALETTEENTRY]>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFilePaletteEntries(hemf : HENHMETAFILE, nnumentries : u32, lppaletteentries : *mut PALETTEENTRY) -> u32); - GetEnhMetaFilePaletteEntries(hemf.param().abi(), lppaletteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lppaletteentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetEnhMetaFilePaletteEntries(core::mem::transmute(hemf), lppaletteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lppaletteentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetEnhMetaFileW(lpname: P0) -> HENHMETAFILE @@ -1398,102 +1015,70 @@ where GetEnhMetaFileW(lpname.param().abi()) } #[inline] -pub unsafe fn GetFontData(hdc: P0, dwtable: u32, dwoffset: u32, pvbuffer: Option<*mut core::ffi::c_void>, cjbuffer: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetFontData(hdc: HDC, dwtable: u32, dwoffset: u32, pvbuffer: Option<*mut core::ffi::c_void>, cjbuffer: u32) -> u32 { 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(), core::mem::transmute(dwtable), core::mem::transmute(dwoffset), core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cjbuffer)) + GetFontData(core::mem::transmute(hdc), core::mem::transmute(dwtable), core::mem::transmute(dwoffset), core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cjbuffer)) } #[inline] -pub unsafe fn GetFontLanguageInfo(hdc: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetFontLanguageInfo(hdc: HDC) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetFontLanguageInfo(hdc : HDC) -> u32); - GetFontLanguageInfo(hdc.param().abi()) + GetFontLanguageInfo(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetFontUnicodeRanges(hdc: P0, lpgs: Option<*mut GLYPHSET>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetFontUnicodeRanges(hdc: HDC, lpgs: Option<*mut GLYPHSET>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetFontUnicodeRanges(hdc : HDC, lpgs : *mut GLYPHSET) -> u32); - GetFontUnicodeRanges(hdc.param().abi(), core::mem::transmute(lpgs.unwrap_or(core::ptr::null_mut()))) + GetFontUnicodeRanges(core::mem::transmute(hdc), core::mem::transmute(lpgs.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetGlyphIndicesA(hdc: P0, lpstr: P1, c: i32, pgi: *mut u16, fl: u32) -> u32 +pub unsafe fn GetGlyphIndicesA(hdc: HDC, lpstr: P1, c: i32, pgi: *mut u16, fl: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetGlyphIndicesA(hdc : HDC, lpstr : windows_core::PCSTR, c : i32, pgi : *mut u16, fl : u32) -> u32); - GetGlyphIndicesA(hdc.param().abi(), lpstr.param().abi(), core::mem::transmute(c), core::mem::transmute(pgi), core::mem::transmute(fl)) + GetGlyphIndicesA(core::mem::transmute(hdc), lpstr.param().abi(), core::mem::transmute(c), core::mem::transmute(pgi), core::mem::transmute(fl)) } #[inline] -pub unsafe fn GetGlyphIndicesW(hdc: P0, lpstr: P1, c: i32, pgi: *mut u16, fl: u32) -> u32 +pub unsafe fn GetGlyphIndicesW(hdc: HDC, lpstr: P1, c: i32, pgi: *mut u16, fl: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetGlyphIndicesW(hdc : HDC, lpstr : windows_core::PCWSTR, c : i32, pgi : *mut u16, fl : u32) -> u32); - GetGlyphIndicesW(hdc.param().abi(), lpstr.param().abi(), core::mem::transmute(c), core::mem::transmute(pgi), core::mem::transmute(fl)) + GetGlyphIndicesW(core::mem::transmute(hdc), lpstr.param().abi(), core::mem::transmute(c), core::mem::transmute(pgi), core::mem::transmute(fl)) } #[inline] -pub unsafe fn GetGlyphOutlineA(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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetGlyphOutlineA(hdc: HDC, uchar: u32, fuformat: GET_GLYPH_OUTLINE_FORMAT, lpgm: *mut GLYPHMETRICS, cjbuffer: u32, pvbuffer: Option<*mut core::ffi::c_void>, lpmat2: *const MAT2) -> u32 { 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(), core::mem::transmute(uchar), core::mem::transmute(fuformat), core::mem::transmute(lpgm), core::mem::transmute(cjbuffer), core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpmat2)) + GetGlyphOutlineA(core::mem::transmute(hdc), core::mem::transmute(uchar), core::mem::transmute(fuformat), core::mem::transmute(lpgm), core::mem::transmute(cjbuffer), core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetGlyphOutlineW(hdc: HDC, uchar: u32, fuformat: GET_GLYPH_OUTLINE_FORMAT, lpgm: *mut GLYPHMETRICS, cjbuffer: u32, pvbuffer: Option<*mut core::ffi::c_void>, lpmat2: *const MAT2) -> u32 { 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(), core::mem::transmute(uchar), core::mem::transmute(fuformat), core::mem::transmute(lpgm), core::mem::transmute(cjbuffer), core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpmat2)) + GetGlyphOutlineW(core::mem::transmute(hdc), core::mem::transmute(uchar), core::mem::transmute(fuformat), core::mem::transmute(lpgm), core::mem::transmute(cjbuffer), core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpmat2)) } #[inline] -pub unsafe fn GetGraphicsMode(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetGraphicsMode(hdc: HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetGraphicsMode(hdc : HDC) -> i32); - GetGraphicsMode(hdc.param().abi()) + GetGraphicsMode(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetKerningPairsA(hdc: P0, lpkernpair: Option<&mut [KERNINGPAIR]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetKerningPairsA(hdc: HDC, lpkernpair: Option<&mut [KERNINGPAIR]>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetKerningPairsA(hdc : HDC, npairs : u32, lpkernpair : *mut KERNINGPAIR) -> u32); - GetKerningPairsA(hdc.param().abi(), lpkernpair.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpkernpair.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetKerningPairsA(core::mem::transmute(hdc), lpkernpair.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpkernpair.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetKerningPairsW(hdc: P0, lpkernpair: Option<&mut [KERNINGPAIR]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetKerningPairsW(hdc: HDC, lpkernpair: Option<&mut [KERNINGPAIR]>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetKerningPairsW(hdc : HDC, npairs : u32, lpkernpair : *mut KERNINGPAIR) -> u32); - GetKerningPairsW(hdc.param().abi(), lpkernpair.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpkernpair.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetKerningPairsW(core::mem::transmute(hdc), lpkernpair.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpkernpair.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetLayout(hdc: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetLayout(hdc: HDC) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetLayout(hdc : HDC) -> u32); - GetLayout(hdc.param().abi()) + GetLayout(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetMapMode(hdc: P0) -> HDC_MAP_MODE -where - P0: windows_core::Param, -{ +pub unsafe fn GetMapMode(hdc: HDC) -> HDC_MAP_MODE { windows_targets::link!("gdi32.dll" "system" fn GetMapMode(hdc : HDC) -> HDC_MAP_MODE); - GetMapMode(hdc.param().abi()) + GetMapMode(core::mem::transmute(hdc)) } #[inline] pub unsafe fn GetMetaFileA(lpname: P0) -> HMETAFILE @@ -1504,12 +1089,9 @@ where GetMetaFileA(lpname.param().abi()) } #[inline] -pub unsafe fn GetMetaFileBitsEx(hmf: P0, cbbuffer: u32, lpdata: Option<*mut core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMetaFileBitsEx(hmf: HMETAFILE, cbbuffer: u32, lpdata: Option<*mut core::ffi::c_void>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetMetaFileBitsEx(hmf : HMETAFILE, cbbuffer : u32, lpdata : *mut core::ffi::c_void) -> u32); - GetMetaFileBitsEx(hmf.param().abi(), core::mem::transmute(cbbuffer), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut()))) + GetMetaFileBitsEx(core::mem::transmute(hmf), core::mem::transmute(cbbuffer), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetMetaFileW(lpname: P0) -> HMETAFILE @@ -1520,144 +1102,89 @@ where GetMetaFileW(lpname.param().abi()) } #[inline] -pub unsafe fn GetMetaRgn(hdc: P0, hrgn: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetMetaRgn(hdc: HDC, hrgn: HRGN) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetMetaRgn(hdc : HDC, hrgn : HRGN) -> i32); - GetMetaRgn(hdc.param().abi(), hrgn.param().abi()) + GetMetaRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn)) } #[inline] -pub unsafe fn GetMiterLimit(hdc: P0, plimit: *mut f32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetMiterLimit(hdc: HDC, plimit: *mut f32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetMiterLimit(hdc : HDC, plimit : *mut f32) -> super::super::Foundation:: BOOL); - GetMiterLimit(hdc.param().abi(), core::mem::transmute(plimit)) + GetMiterLimit(core::mem::transmute(hdc), core::mem::transmute(plimit)) } #[inline] -pub unsafe fn GetMonitorInfoA(hmonitor: P0, lpmi: *mut MONITORINFO) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorInfoA(hmonitor: HMONITOR, lpmi: *mut MONITORINFO) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetMonitorInfoA(hmonitor : HMONITOR, lpmi : *mut MONITORINFO) -> super::super::Foundation:: BOOL); - GetMonitorInfoA(hmonitor.param().abi(), core::mem::transmute(lpmi)) + GetMonitorInfoA(core::mem::transmute(hmonitor), core::mem::transmute(lpmi)) } #[inline] -pub unsafe fn GetMonitorInfoW(hmonitor: P0, lpmi: *mut MONITORINFO) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetMonitorInfoW(hmonitor: HMONITOR, lpmi: *mut MONITORINFO) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetMonitorInfoW(hmonitor : HMONITOR, lpmi : *mut MONITORINFO) -> super::super::Foundation:: BOOL); - GetMonitorInfoW(hmonitor.param().abi(), core::mem::transmute(lpmi)) + GetMonitorInfoW(core::mem::transmute(hmonitor), core::mem::transmute(lpmi)) } #[inline] -pub unsafe fn GetNearestColor(hdc: P0, color: P1) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetNearestColor(hdc: HDC, color: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn GetNearestColor(hdc : HDC, color : super::super::Foundation:: COLORREF) -> super::super::Foundation:: COLORREF); - GetNearestColor(hdc.param().abi(), color.param().abi()) + GetNearestColor(core::mem::transmute(hdc), core::mem::transmute(color)) } #[inline] -pub unsafe fn GetNearestPaletteIndex(h: P0, color: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetNearestPaletteIndex(h: HPALETTE, color: super::super::Foundation::COLORREF) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetNearestPaletteIndex(h : HPALETTE, color : super::super::Foundation:: COLORREF) -> u32); - GetNearestPaletteIndex(h.param().abi(), color.param().abi()) + GetNearestPaletteIndex(core::mem::transmute(h), core::mem::transmute(color)) } #[inline] -pub unsafe fn GetObjectA(h: P0, c: i32, pv: Option<*mut core::ffi::c_void>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetObjectA(h: HGDIOBJ, c: i32, pv: Option<*mut core::ffi::c_void>) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetObjectA(h : HGDIOBJ, c : i32, pv : *mut core::ffi::c_void) -> i32); - GetObjectA(h.param().abi(), core::mem::transmute(c), core::mem::transmute(pv.unwrap_or(core::ptr::null_mut()))) + GetObjectA(core::mem::transmute(h), core::mem::transmute(c), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetObjectType(h: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetObjectType(h: HGDIOBJ) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetObjectType(h : HGDIOBJ) -> u32); - GetObjectType(h.param().abi()) + GetObjectType(core::mem::transmute(h)) } #[inline] -pub unsafe fn GetObjectW(h: P0, c: i32, pv: Option<*mut core::ffi::c_void>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetObjectW(h: HGDIOBJ, c: i32, pv: Option<*mut core::ffi::c_void>) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetObjectW(h : HGDIOBJ, c : i32, pv : *mut core::ffi::c_void) -> i32); - GetObjectW(h.param().abi(), core::mem::transmute(c), core::mem::transmute(pv.unwrap_or(core::ptr::null_mut()))) + GetObjectW(core::mem::transmute(h), core::mem::transmute(c), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetOutlineTextMetricsA(hdc: P0, cjcopy: u32, potm: Option<*mut OUTLINETEXTMETRICA>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetOutlineTextMetricsA(hdc: HDC, cjcopy: u32, potm: Option<*mut OUTLINETEXTMETRICA>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetOutlineTextMetricsA(hdc : HDC, cjcopy : u32, potm : *mut OUTLINETEXTMETRICA) -> u32); - GetOutlineTextMetricsA(hdc.param().abi(), core::mem::transmute(cjcopy), core::mem::transmute(potm.unwrap_or(core::ptr::null_mut()))) + GetOutlineTextMetricsA(core::mem::transmute(hdc), core::mem::transmute(cjcopy), core::mem::transmute(potm.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetOutlineTextMetricsW(hdc: P0, cjcopy: u32, potm: Option<*mut OUTLINETEXTMETRICW>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetOutlineTextMetricsW(hdc: HDC, cjcopy: u32, potm: Option<*mut OUTLINETEXTMETRICW>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetOutlineTextMetricsW(hdc : HDC, cjcopy : u32, potm : *mut OUTLINETEXTMETRICW) -> u32); - GetOutlineTextMetricsW(hdc.param().abi(), core::mem::transmute(cjcopy), core::mem::transmute(potm.unwrap_or(core::ptr::null_mut()))) + GetOutlineTextMetricsW(core::mem::transmute(hdc), core::mem::transmute(cjcopy), core::mem::transmute(potm.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPaletteEntries(hpal: P0, istart: u32, ppalentries: Option<&mut [PALETTEENTRY]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetPaletteEntries(hpal: HPALETTE, istart: u32, ppalentries: Option<&mut [PALETTEENTRY]>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetPaletteEntries(hpal : HPALETTE, istart : u32, centries : u32, ppalentries : *mut PALETTEENTRY) -> u32); - GetPaletteEntries(hpal.param().abi(), core::mem::transmute(istart), ppalentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppalentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetPaletteEntries(core::mem::transmute(hpal), core::mem::transmute(istart), ppalentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppalentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetPath(hdc: P0, apt: Option<*mut super::super::Foundation::POINT>, aj: Option<*mut u8>, cpt: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetPath(hdc: HDC, apt: Option<*mut super::super::Foundation::POINT>, aj: Option<*mut u8>, cpt: i32) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(aj.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cpt)) + GetPath(core::mem::transmute(hdc), core::mem::transmute(apt.unwrap_or(core::mem::zeroed())), core::mem::transmute(aj.unwrap_or(core::mem::zeroed())), core::mem::transmute(cpt)) } #[inline] -pub unsafe fn GetPixel(hdc: P0, x: i32, y: i32) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, -{ +pub unsafe fn GetPixel(hdc: HDC, x: i32, y: i32) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn GetPixel(hdc : HDC, x : i32, y : i32) -> super::super::Foundation:: COLORREF); - GetPixel(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y)) + GetPixel(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y)) } #[inline] -pub unsafe fn GetPolyFillMode(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetPolyFillMode(hdc: HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetPolyFillMode(hdc : HDC) -> i32); - GetPolyFillMode(hdc.param().abi()) + GetPolyFillMode(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetROP2(hdc: P0) -> R2_MODE -where - P0: windows_core::Param, -{ +pub unsafe fn GetROP2(hdc: HDC) -> R2_MODE { windows_targets::link!("gdi32.dll" "system" fn GetROP2(hdc : HDC) -> R2_MODE); - GetROP2(hdc.param().abi()) + GetROP2(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetRandomRgn(hdc: P0, hrgn: P1, i: i32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetRandomRgn(hdc: HDC, hrgn: HRGN, i: i32) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetRandomRgn(hdc : HDC, hrgn : HRGN, i : i32) -> i32); - GetRandomRgn(hdc.param().abi(), hrgn.param().abi(), core::mem::transmute(i)) + GetRandomRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn), core::mem::transmute(i)) } #[inline] pub unsafe fn GetRasterizerCaps(lpraststat: *mut RASTERIZER_STATUS, cjbytes: u32) -> super::super::Foundation::BOOL { @@ -1665,20 +1192,14 @@ pub unsafe fn GetRasterizerCaps(lpraststat: *mut RASTERIZER_STATUS, cjbytes: u32 GetRasterizerCaps(core::mem::transmute(lpraststat), core::mem::transmute(cjbytes)) } #[inline] -pub unsafe fn GetRegionData(hrgn: P0, ncount: u32, lprgndata: Option<*mut RGNDATA>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetRegionData(hrgn: HRGN, ncount: u32, lprgndata: Option<*mut RGNDATA>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetRegionData(hrgn : HRGN, ncount : u32, lprgndata : *mut RGNDATA) -> u32); - GetRegionData(hrgn.param().abi(), core::mem::transmute(ncount), core::mem::transmute(lprgndata.unwrap_or(core::ptr::null_mut()))) + GetRegionData(core::mem::transmute(hrgn), core::mem::transmute(ncount), core::mem::transmute(lprgndata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetRgnBox(hrgn: P0, lprc: *mut super::super::Foundation::RECT) -> GDI_REGION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn GetRgnBox(hrgn: HRGN, lprc: *mut super::super::Foundation::RECT) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn GetRgnBox(hrgn : HRGN, lprc : *mut super::super::Foundation:: RECT) -> GDI_REGION_TYPE); - GetRgnBox(hrgn.param().abi(), core::mem::transmute(lprc)) + GetRgnBox(core::mem::transmute(hrgn), core::mem::transmute(lprc)) } #[inline] pub unsafe fn GetStockObject(i: GET_STOCK_OBJECT_FLAGS) -> HGDIOBJ { @@ -1686,12 +1207,9 @@ pub unsafe fn GetStockObject(i: GET_STOCK_OBJECT_FLAGS) -> HGDIOBJ { GetStockObject(core::mem::transmute(i)) } #[inline] -pub unsafe fn GetStretchBltMode(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetStretchBltMode(hdc: HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetStretchBltMode(hdc : HDC) -> i32); - GetStretchBltMode(hdc.param().abi()) + GetStretchBltMode(core::mem::transmute(hdc)) } #[inline] pub unsafe fn GetSysColor(nindex: SYS_COLOR_INDEX) -> u32 { @@ -1704,279 +1222,181 @@ pub unsafe fn GetSysColorBrush(nindex: SYS_COLOR_INDEX) -> HBRUSH { GetSysColorBrush(core::mem::transmute(nindex)) } #[inline] -pub unsafe fn GetSystemPaletteEntries(hdc: P0, istart: u32, ppalentries: Option<&mut [PALETTEENTRY]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSystemPaletteEntries(hdc: HDC, istart: u32, ppalentries: Option<&mut [PALETTEENTRY]>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetSystemPaletteEntries(hdc : HDC, istart : u32, centries : u32, ppalentries : *mut PALETTEENTRY) -> u32); - GetSystemPaletteEntries(hdc.param().abi(), core::mem::transmute(istart), ppalentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppalentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetSystemPaletteEntries(core::mem::transmute(hdc), core::mem::transmute(istart), ppalentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppalentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetSystemPaletteUse(hdc: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSystemPaletteUse(hdc: HDC) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetSystemPaletteUse(hdc : HDC) -> u32); - GetSystemPaletteUse(hdc.param().abi()) + GetSystemPaletteUse(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetTabbedTextExtentA(hdc: P0, lpstring: &[u8], lpntabstoppositions: Option<&[i32]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTabbedTextExtentA(hdc: HDC, lpstring: &[u8], lpntabstoppositions: Option<&[i32]>) -> u32 { windows_targets::link!("user32.dll" "system" fn GetTabbedTextExtentA(hdc : HDC, lpstring : windows_core::PCSTR, chcount : i32, ntabpositions : i32, lpntabstoppositions : *const i32) -> u32); - GetTabbedTextExtentA(hdc.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpntabstoppositions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetTabbedTextExtentA(core::mem::transmute(hdc), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpntabstoppositions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetTabbedTextExtentW(hdc: P0, lpstring: &[u16], lpntabstoppositions: Option<&[i32]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTabbedTextExtentW(hdc: HDC, lpstring: &[u16], lpntabstoppositions: Option<&[i32]>) -> u32 { windows_targets::link!("user32.dll" "system" fn GetTabbedTextExtentW(hdc : HDC, lpstring : windows_core::PCWSTR, chcount : i32, ntabpositions : i32, lpntabstoppositions : *const i32) -> u32); - GetTabbedTextExtentW(hdc.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpntabstoppositions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetTabbedTextExtentW(core::mem::transmute(hdc), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpntabstoppositions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetTextAlign(hdc: P0) -> TEXT_ALIGN_OPTIONS -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextAlign(hdc: HDC) -> TEXT_ALIGN_OPTIONS { windows_targets::link!("gdi32.dll" "system" fn GetTextAlign(hdc : HDC) -> TEXT_ALIGN_OPTIONS); - GetTextAlign(hdc.param().abi()) + GetTextAlign(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetTextCharacterExtra(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextCharacterExtra(hdc: HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetTextCharacterExtra(hdc : HDC) -> i32); - GetTextCharacterExtra(hdc.param().abi()) + GetTextCharacterExtra(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetTextColor(hdc: P0) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextColor(hdc: HDC) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn GetTextColor(hdc : HDC) -> super::super::Foundation:: COLORREF); - GetTextColor(hdc.param().abi()) + GetTextColor(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn GetTextExtentExPointA(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 +pub unsafe fn GetTextExtentExPointA(hdc: HDC, lpszstring: P1, cchstring: i32, nmaxextent: i32, lpnfit: Option<*mut i32>, lpndx: Option<*mut i32>, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL where - P0: windows_core::Param, 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(), core::mem::transmute(cchstring), core::mem::transmute(nmaxextent), core::mem::transmute(lpnfit.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpsize)) + GetTextExtentExPointA(core::mem::transmute(hdc), lpszstring.param().abi(), core::mem::transmute(cchstring), core::mem::transmute(nmaxextent), core::mem::transmute(lpnfit.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpndx.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextExtentExPointI(hdc: HDC, 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 { 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(), core::mem::transmute(lpwszstring), core::mem::transmute(cwchstring), core::mem::transmute(nmaxextent), core::mem::transmute(lpnfit.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpsize)) + GetTextExtentExPointI(core::mem::transmute(hdc), core::mem::transmute(lpwszstring), core::mem::transmute(cwchstring), core::mem::transmute(nmaxextent), core::mem::transmute(lpnfit.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpndx.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +pub unsafe fn GetTextExtentExPointW(hdc: HDC, lpszstring: P1, cchstring: i32, nmaxextent: i32, lpnfit: Option<*mut i32>, lpndx: Option<*mut i32>, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL where - P0: windows_core::Param, 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(), core::mem::transmute(cchstring), core::mem::transmute(nmaxextent), core::mem::transmute(lpnfit.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpsize)) + GetTextExtentExPointW(core::mem::transmute(hdc), lpszstring.param().abi(), core::mem::transmute(cchstring), core::mem::transmute(nmaxextent), core::mem::transmute(lpnfit.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpndx.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)) } #[inline] -pub unsafe fn GetTextExtentPoint32A(hdc: P0, lpstring: &[u8], psizl: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextExtentPoint32A(hdc: HDC, lpstring: &[u8], psizl: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPoint32A(hdc : HDC, lpstring : windows_core::PCSTR, c : i32, psizl : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPoint32A(hdc.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(psizl)) + GetTextExtentPoint32A(core::mem::transmute(hdc), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(psizl)) } #[inline] -pub unsafe fn GetTextExtentPoint32W(hdc: P0, lpstring: &[u16], psizl: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextExtentPoint32W(hdc: HDC, lpstring: &[u16], psizl: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPoint32W(hdc : HDC, lpstring : windows_core::PCWSTR, c : i32, psizl : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPoint32W(hdc.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(psizl)) + GetTextExtentPoint32W(core::mem::transmute(hdc), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(psizl)) } #[inline] -pub unsafe fn GetTextExtentPointA(hdc: P0, lpstring: &[u8], lpsz: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextExtentPointA(hdc: HDC, lpstring: &[u8], lpsz: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPointA(hdc : HDC, lpstring : windows_core::PCSTR, c : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPointA(hdc.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(lpsz)) + GetTextExtentPointA(core::mem::transmute(hdc), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(lpsz)) } #[inline] -pub unsafe fn GetTextExtentPointI(hdc: P0, pgiin: &[u16], psize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextExtentPointI(hdc: HDC, pgiin: &[u16], psize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPointI(hdc : HDC, pgiin : *const u16, cgi : i32, psize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPointI(hdc.param().abi(), core::mem::transmute(pgiin.as_ptr()), pgiin.len().try_into().unwrap(), core::mem::transmute(psize)) + GetTextExtentPointI(core::mem::transmute(hdc), core::mem::transmute(pgiin.as_ptr()), pgiin.len().try_into().unwrap(), core::mem::transmute(psize)) } #[inline] -pub unsafe fn GetTextExtentPointW(hdc: P0, lpstring: &[u16], lpsz: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextExtentPointW(hdc: HDC, lpstring: &[u16], lpsz: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPointW(hdc : HDC, lpstring : windows_core::PCWSTR, c : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPointW(hdc.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(lpsz)) + GetTextExtentPointW(core::mem::transmute(hdc), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(lpsz)) } #[inline] -pub unsafe fn GetTextFaceA(hdc: P0, lpname: Option<&mut [u8]>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextFaceA(hdc: HDC, lpname: Option<&mut [u8]>) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetTextFaceA(hdc : HDC, c : i32, lpname : windows_core::PSTR) -> i32); - GetTextFaceA(hdc.param().abi(), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetTextFaceA(core::mem::transmute(hdc), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetTextFaceW(hdc: P0, lpname: Option<&mut [u16]>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextFaceW(hdc: HDC, lpname: Option<&mut [u16]>) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetTextFaceW(hdc : HDC, c : i32, lpname : windows_core::PWSTR) -> i32); - GetTextFaceW(hdc.param().abi(), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + GetTextFaceW(core::mem::transmute(hdc), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn GetTextMetricsA(hdc: P0, lptm: *mut TEXTMETRICA) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextMetricsA(hdc: HDC, lptm: *mut TEXTMETRICA) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetTextMetricsA(hdc : HDC, lptm : *mut TEXTMETRICA) -> super::super::Foundation:: BOOL); - GetTextMetricsA(hdc.param().abi(), core::mem::transmute(lptm)) + GetTextMetricsA(core::mem::transmute(hdc), core::mem::transmute(lptm)) } #[inline] -pub unsafe fn GetTextMetricsW(hdc: P0, lptm: *mut TEXTMETRICW) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetTextMetricsW(hdc: HDC, lptm: *mut TEXTMETRICW) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetTextMetricsW(hdc : HDC, lptm : *mut TEXTMETRICW) -> super::super::Foundation:: BOOL); - GetTextMetricsW(hdc.param().abi(), core::mem::transmute(lptm)) + GetTextMetricsW(core::mem::transmute(hdc), core::mem::transmute(lptm)) } #[inline] -pub unsafe fn GetUpdateRect(hwnd: P0, lprect: Option<*mut super::super::Foundation::RECT>, berase: P2) -> super::super::Foundation::BOOL +pub unsafe fn GetUpdateRect(hwnd: super::super::Foundation::HWND, lprect: Option<*mut super::super::Foundation::RECT>, berase: P2) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: 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(core::ptr::null_mut())), berase.param().abi()) + GetUpdateRect(core::mem::transmute(hwnd), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), berase.param().abi()) } #[inline] -pub unsafe fn GetUpdateRgn(hwnd: P0, hrgn: P1, berase: P2) -> GDI_REGION_TYPE +pub unsafe fn GetUpdateRgn(hwnd: super::super::Foundation::HWND, hrgn: HRGN, berase: P2) -> GDI_REGION_TYPE where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetUpdateRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN, berase : super::super::Foundation:: BOOL) -> GDI_REGION_TYPE); - GetUpdateRgn(hwnd.param().abi(), hrgn.param().abi(), berase.param().abi()) + GetUpdateRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn), berase.param().abi()) } #[inline] -pub unsafe fn GetViewportExtEx(hdc: P0, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetViewportExtEx(hdc: HDC, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetViewportExtEx(hdc : HDC, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetViewportExtEx(hdc.param().abi(), core::mem::transmute(lpsize)) + GetViewportExtEx(core::mem::transmute(hdc), core::mem::transmute(lpsize)) } #[inline] -pub unsafe fn GetViewportOrgEx(hdc: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetViewportOrgEx(hdc: HDC, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetViewportOrgEx(hdc : HDC, lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - GetViewportOrgEx(hdc.param().abi(), core::mem::transmute(lppoint)) + GetViewportOrgEx(core::mem::transmute(hdc), core::mem::transmute(lppoint)) } #[inline] -pub unsafe fn GetWinMetaFileBits(hemf: P0, pdata16: Option<&mut [u8]>, imapmode: i32, hdcref: P4) -> u32 -where - P0: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn GetWinMetaFileBits(hemf: HENHMETAFILE, pdata16: Option<&mut [u8]>, imapmode: i32, hdcref: HDC) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetWinMetaFileBits(hemf : HENHMETAFILE, cbdata16 : u32, pdata16 : *mut u8, imapmode : i32, hdcref : HDC) -> u32); - GetWinMetaFileBits(hemf.param().abi(), pdata16.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pdata16.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(imapmode), hdcref.param().abi()) + GetWinMetaFileBits(core::mem::transmute(hemf), pdata16.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pdata16.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(imapmode), core::mem::transmute(hdcref)) } #[inline] -pub unsafe fn GetWindowDC(hwnd: P0) -> HDC -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowDC(hwnd: Option) -> HDC { windows_targets::link!("user32.dll" "system" fn GetWindowDC(hwnd : super::super::Foundation:: HWND) -> HDC); - GetWindowDC(hwnd.param().abi()) + GetWindowDC(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetWindowExtEx(hdc: P0, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowExtEx(hdc: HDC, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetWindowExtEx(hdc : HDC, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetWindowExtEx(hdc.param().abi(), core::mem::transmute(lpsize)) + GetWindowExtEx(core::mem::transmute(hdc), core::mem::transmute(lpsize)) } #[inline] -pub unsafe fn GetWindowOrgEx(hdc: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowOrgEx(hdc: HDC, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetWindowOrgEx(hdc : HDC, lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - GetWindowOrgEx(hdc.param().abi(), core::mem::transmute(lppoint)) + GetWindowOrgEx(core::mem::transmute(hdc), core::mem::transmute(lppoint)) } #[inline] -pub unsafe fn GetWindowRgn(hwnd: P0, hrgn: P1) -> GDI_REGION_TYPE -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetWindowRgn(hwnd: super::super::Foundation::HWND, hrgn: HRGN) -> GDI_REGION_TYPE { windows_targets::link!("user32.dll" "system" fn GetWindowRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN) -> GDI_REGION_TYPE); - GetWindowRgn(hwnd.param().abi(), hrgn.param().abi()) + GetWindowRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn)) } #[inline] -pub unsafe fn GetWindowRgnBox(hwnd: P0, lprc: *mut super::super::Foundation::RECT) -> GDI_REGION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowRgnBox(hwnd: super::super::Foundation::HWND, lprc: *mut super::super::Foundation::RECT) -> GDI_REGION_TYPE { windows_targets::link!("user32.dll" "system" fn GetWindowRgnBox(hwnd : super::super::Foundation:: HWND, lprc : *mut super::super::Foundation:: RECT) -> GDI_REGION_TYPE); - GetWindowRgnBox(hwnd.param().abi(), core::mem::transmute(lprc)) + GetWindowRgnBox(core::mem::transmute(hwnd), core::mem::transmute(lprc)) } #[inline] -pub unsafe fn GetWorldTransform(hdc: P0, lpxf: *mut XFORM) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetWorldTransform(hdc: HDC, lpxf: *mut XFORM) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetWorldTransform(hdc : HDC, lpxf : *mut XFORM) -> super::super::Foundation:: BOOL); - GetWorldTransform(hdc.param().abi(), core::mem::transmute(lpxf)) + GetWorldTransform(core::mem::transmute(hdc), core::mem::transmute(lpxf)) } #[inline] -pub unsafe fn GradientFill(hdc: P0, pvertex: &[TRIVERTEX], pmesh: *const core::ffi::c_void, nmesh: u32, ulmode: GRADIENT_FILL) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GradientFill(hdc: HDC, pvertex: &[TRIVERTEX], pmesh: *const core::ffi::c_void, nmesh: u32, ulmode: GRADIENT_FILL) -> super::super::Foundation::BOOL { windows_targets::link!("msimg32.dll" "system" fn GradientFill(hdc : HDC, pvertex : *const TRIVERTEX, nvertex : u32, pmesh : *const core::ffi::c_void, nmesh : u32, ulmode : GRADIENT_FILL) -> super::super::Foundation:: BOOL); - GradientFill(hdc.param().abi(), core::mem::transmute(pvertex.as_ptr()), pvertex.len().try_into().unwrap(), core::mem::transmute(pmesh), core::mem::transmute(nmesh), core::mem::transmute(ulmode)) + GradientFill(core::mem::transmute(hdc), core::mem::transmute(pvertex.as_ptr()), pvertex.len().try_into().unwrap(), core::mem::transmute(pmesh), core::mem::transmute(nmesh), core::mem::transmute(ulmode)) } #[inline] -pub unsafe fn GrayStringA(hdc: P0, hbrush: P1, lpoutputfunc: GRAYSTRINGPROC, lpdata: P3, ncount: i32, x: i32, y: i32, nwidth: i32, nheight: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn GrayStringA(hdc: HDC, hbrush: Option, lpoutputfunc: Option, lpdata: super::super::Foundation::LPARAM, ncount: i32, x: i32, y: i32, nwidth: i32, nheight: i32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GrayStringA(hdc : HDC, hbrush : HBRUSH, lpoutputfunc : GRAYSTRINGPROC, lpdata : super::super::Foundation:: LPARAM, ncount : i32, x : i32, y : i32, nwidth : i32, nheight : i32) -> super::super::Foundation:: BOOL); - GrayStringA(hdc.param().abi(), hbrush.param().abi(), core::mem::transmute(lpoutputfunc), lpdata.param().abi(), core::mem::transmute(ncount), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight)) + GrayStringA(core::mem::transmute(hdc), core::mem::transmute(hbrush.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoutputfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata), core::mem::transmute(ncount), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight)) } #[inline] -pub unsafe fn GrayStringW(hdc: P0, hbrush: P1, lpoutputfunc: GRAYSTRINGPROC, lpdata: P3, ncount: i32, x: i32, y: i32, nwidth: i32, nheight: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn GrayStringW(hdc: HDC, hbrush: Option, lpoutputfunc: Option, lpdata: super::super::Foundation::LPARAM, ncount: i32, x: i32, y: i32, nwidth: i32, nheight: i32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GrayStringW(hdc : HDC, hbrush : HBRUSH, lpoutputfunc : GRAYSTRINGPROC, lpdata : super::super::Foundation:: LPARAM, ncount : i32, x : i32, y : i32, nwidth : i32, nheight : i32) -> super::super::Foundation:: BOOL); - GrayStringW(hdc.param().abi(), hbrush.param().abi(), core::mem::transmute(lpoutputfunc), lpdata.param().abi(), core::mem::transmute(ncount), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight)) + GrayStringW(core::mem::transmute(hdc), core::mem::transmute(hbrush.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoutputfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata), core::mem::transmute(ncount), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight)) } #[inline] pub unsafe fn InflateRect(lprc: *mut super::super::Foundation::RECT, dx: i32, dy: i32) -> super::super::Foundation::BOOL { @@ -1984,12 +1404,9 @@ pub unsafe fn InflateRect(lprc: *mut super::super::Foundation::RECT, dx: i32, dy InflateRect(core::mem::transmute(lprc), core::mem::transmute(dx), core::mem::transmute(dy)) } #[inline] -pub unsafe fn IntersectClipRect(hdc: P0, left: i32, top: i32, right: i32, bottom: i32) -> GDI_REGION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn IntersectClipRect(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn IntersectClipRect(hdc : HDC, left : i32, top : i32, right : i32, bottom : i32) -> GDI_REGION_TYPE); - IntersectClipRect(hdc.param().abi(), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) + IntersectClipRect(core::mem::transmute(hdc), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) } #[inline] pub unsafe fn IntersectRect(lprcdst: *mut super::super::Foundation::RECT, lprcsrc1: *const super::super::Foundation::RECT, lprcsrc2: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -1997,40 +1414,30 @@ pub unsafe fn IntersectRect(lprcdst: *mut super::super::Foundation::RECT, lprcsr IntersectRect(core::mem::transmute(lprcdst), core::mem::transmute(lprcsrc1), core::mem::transmute(lprcsrc2)) } #[inline] -pub unsafe fn InvalidateRect(hwnd: P0, lprect: Option<*const super::super::Foundation::RECT>, berase: P2) -> super::super::Foundation::BOOL +pub unsafe fn InvalidateRect(hwnd: Option, lprect: Option<*const super::super::Foundation::RECT>, berase: P2) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: 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(core::ptr::null())), berase.param().abi()) + InvalidateRect(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), berase.param().abi()) } #[inline] -pub unsafe fn InvalidateRgn(hwnd: P0, hrgn: P1, berase: P2) -> super::super::Foundation::BOOL +pub unsafe fn InvalidateRgn(hwnd: super::super::Foundation::HWND, hrgn: Option, berase: P2) -> super::super::Foundation::BOOL where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn InvalidateRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN, berase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - InvalidateRgn(hwnd.param().abi(), hrgn.param().abi(), berase.param().abi()) + InvalidateRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), berase.param().abi()) } #[inline] -pub unsafe fn InvertRect(hdc: P0, lprc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn InvertRect(hdc: HDC, lprc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn InvertRect(hdc : HDC, lprc : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - InvertRect(hdc.param().abi(), core::mem::transmute(lprc)) + InvertRect(core::mem::transmute(hdc), core::mem::transmute(lprc)) } #[inline] -pub unsafe fn InvertRgn(hdc: P0, hrgn: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn InvertRgn(hdc: HDC, hrgn: HRGN) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn InvertRgn(hdc : HDC, hrgn : HRGN) -> super::super::Foundation:: BOOL); - InvertRgn(hdc.param().abi(), hrgn.param().abi()) + InvertRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn)) } #[inline] pub unsafe fn IsRectEmpty(lprc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -2038,73 +1445,50 @@ pub unsafe fn IsRectEmpty(lprc: *const super::super::Foundation::RECT) -> super: IsRectEmpty(core::mem::transmute(lprc)) } #[inline] -pub unsafe fn LPtoDP(hdc: P0, lppt: &mut [super::super::Foundation::POINT]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn LPtoDP(hdc: HDC, lppt: &mut [super::super::Foundation::POINT]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn LPtoDP(hdc : HDC, lppt : *mut super::super::Foundation:: POINT, c : i32) -> super::super::Foundation:: BOOL); - LPtoDP(hdc.param().abi(), core::mem::transmute(lppt.as_ptr()), lppt.len().try_into().unwrap()) + LPtoDP(core::mem::transmute(hdc), core::mem::transmute(lppt.as_ptr()), lppt.len().try_into().unwrap()) } #[inline] -pub unsafe fn LineDDA(xstart: i32, ystart: i32, xend: i32, yend: i32, lpproc: LINEDDAPROC, data: P5) -> super::super::Foundation::BOOL -where - P5: windows_core::Param, -{ +pub unsafe fn LineDDA(xstart: i32, ystart: i32, xend: i32, yend: i32, lpproc: LINEDDAPROC, data: Option) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn LineDDA(xstart : i32, ystart : i32, xend : i32, yend : i32, lpproc : LINEDDAPROC, data : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - LineDDA(core::mem::transmute(xstart), core::mem::transmute(ystart), core::mem::transmute(xend), core::mem::transmute(yend), core::mem::transmute(lpproc), data.param().abi()) + LineDDA(core::mem::transmute(xstart), core::mem::transmute(ystart), core::mem::transmute(xend), core::mem::transmute(yend), core::mem::transmute(lpproc), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn LineTo(hdc: P0, x: i32, y: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn LineTo(hdc: HDC, x: i32, y: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn LineTo(hdc : HDC, x : i32, y : i32) -> super::super::Foundation:: BOOL); - LineTo(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y)) + LineTo(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y)) } #[inline] -pub unsafe fn LoadBitmapA(hinstance: P0, lpbitmapname: P1) -> HBITMAP +pub unsafe fn LoadBitmapA(hinstance: Option, lpbitmapname: P1) -> HBITMAP where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadBitmapA(hinstance : super::super::Foundation:: HINSTANCE, lpbitmapname : windows_core::PCSTR) -> HBITMAP); - LoadBitmapA(hinstance.param().abi(), lpbitmapname.param().abi()) + LoadBitmapA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpbitmapname.param().abi()) } #[inline] -pub unsafe fn LoadBitmapW(hinstance: P0, lpbitmapname: P1) -> HBITMAP +pub unsafe fn LoadBitmapW(hinstance: Option, lpbitmapname: P1) -> HBITMAP where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadBitmapW(hinstance : super::super::Foundation:: HINSTANCE, lpbitmapname : windows_core::PCWSTR) -> HBITMAP); - LoadBitmapW(hinstance.param().abi(), lpbitmapname.param().abi()) + LoadBitmapW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpbitmapname.param().abi()) } #[inline] -pub unsafe fn LockWindowUpdate(hwndlock: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn LockWindowUpdate(hwndlock: Option) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn LockWindowUpdate(hwndlock : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - LockWindowUpdate(hwndlock.param().abi()) + LockWindowUpdate(core::mem::transmute(hwndlock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MapWindowPoints(hwndfrom: P0, hwndto: P1, lppoints: &mut [super::super::Foundation::POINT]) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MapWindowPoints(hwndfrom: Option, hwndto: Option, lppoints: &mut [super::super::Foundation::POINT]) -> i32 { windows_targets::link!("user32.dll" "system" fn MapWindowPoints(hwndfrom : super::super::Foundation:: HWND, hwndto : super::super::Foundation:: HWND, lppoints : *mut super::super::Foundation:: POINT, cpoints : u32) -> i32); - MapWindowPoints(hwndfrom.param().abi(), hwndto.param().abi(), core::mem::transmute(lppoints.as_ptr()), lppoints.len().try_into().unwrap()) + MapWindowPoints(core::mem::transmute(hwndfrom.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwndto.unwrap_or(core::mem::zeroed())), core::mem::transmute(lppoints.as_ptr()), lppoints.len().try_into().unwrap()) } #[inline] -pub unsafe fn MaskBlt(hdcdest: P0, xdest: i32, ydest: i32, width: i32, height: i32, hdcsrc: P5, xsrc: i32, ysrc: i32, hbmmask: P8, xmask: i32, ymask: i32, rop: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P5: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn MaskBlt(hdcdest: HDC, xdest: i32, ydest: i32, width: i32, height: i32, hdcsrc: HDC, xsrc: i32, ysrc: i32, hbmmask: HBITMAP, xmask: i32, ymask: i32, rop: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn MaskBlt(hdcdest : HDC, xdest : i32, ydest : i32, width : i32, height : i32, hdcsrc : HDC, xsrc : i32, ysrc : i32, hbmmask : HBITMAP, xmask : i32, ymask : i32, rop : u32) -> super::super::Foundation:: BOOL); - MaskBlt(hdcdest.param().abi(), core::mem::transmute(xdest), core::mem::transmute(ydest), core::mem::transmute(width), core::mem::transmute(height), hdcsrc.param().abi(), core::mem::transmute(xsrc), core::mem::transmute(ysrc), hbmmask.param().abi(), core::mem::transmute(xmask), core::mem::transmute(ymask), core::mem::transmute(rop)) + MaskBlt(core::mem::transmute(hdcdest), core::mem::transmute(xdest), core::mem::transmute(ydest), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(hdcsrc), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(hbmmask), core::mem::transmute(xmask), core::mem::transmute(ymask), core::mem::transmute(rop)) } #[inline] pub unsafe fn MergeFontPackage(puchmergefontbuffer: *const u8, ulmergefontbuffersize: u32, puchfontpackagebuffer: *const u8, ulfontpackagebuffersize: u32, ppuchdestbuffer: *mut *mut u8, puldestbuffersize: *mut u32, pulbyteswritten: *mut u32, usmode: u16, lpfnallocate: CFP_ALLOCPROC, lpfnreallocate: CFP_REALLOCPROC, lpfnfree: CFP_FREEPROC, lpvreserved: *mut core::ffi::c_void) -> u32 { @@ -2112,12 +1496,9 @@ pub unsafe fn MergeFontPackage(puchmergefontbuffer: *const u8, ulmergefontbuffer MergeFontPackage(core::mem::transmute(puchmergefontbuffer), core::mem::transmute(ulmergefontbuffersize), core::mem::transmute(puchfontpackagebuffer), core::mem::transmute(ulfontpackagebuffersize), core::mem::transmute(ppuchdestbuffer), core::mem::transmute(puldestbuffersize), core::mem::transmute(pulbyteswritten), core::mem::transmute(usmode), core::mem::transmute(lpfnallocate), core::mem::transmute(lpfnreallocate), core::mem::transmute(lpfnfree), core::mem::transmute(lpvreserved)) } #[inline] -pub unsafe fn ModifyWorldTransform(hdc: P0, lpxf: Option<*const XFORM>, mode: MODIFY_WORLD_TRANSFORM_MODE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ModifyWorldTransform(hdc: HDC, lpxf: Option<*const XFORM>, mode: MODIFY_WORLD_TRANSFORM_MODE) -> super::super::Foundation::BOOL { 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(core::ptr::null())), core::mem::transmute(mode)) + ModifyWorldTransform(core::mem::transmute(hdc), core::mem::transmute(lpxf.unwrap_or(core::mem::zeroed())), core::mem::transmute(mode)) } #[inline] pub unsafe fn MonitorFromPoint(pt: super::super::Foundation::POINT, dwflags: MONITOR_FROM_FLAGS) -> HMONITOR { @@ -2130,28 +1511,19 @@ pub unsafe fn MonitorFromRect(lprc: *const super::super::Foundation::RECT, dwfla MonitorFromRect(core::mem::transmute(lprc), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn MonitorFromWindow(hwnd: P0, dwflags: MONITOR_FROM_FLAGS) -> HMONITOR -where - P0: windows_core::Param, -{ +pub unsafe fn MonitorFromWindow(hwnd: super::super::Foundation::HWND, dwflags: MONITOR_FROM_FLAGS) -> HMONITOR { windows_targets::link!("user32.dll" "system" fn MonitorFromWindow(hwnd : super::super::Foundation:: HWND, dwflags : MONITOR_FROM_FLAGS) -> HMONITOR); - MonitorFromWindow(hwnd.param().abi(), core::mem::transmute(dwflags)) + MonitorFromWindow(core::mem::transmute(hwnd), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn MoveToEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MoveToEx(hdc: HDC, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) + MoveToEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OffsetClipRgn(hdc: P0, x: i32, y: i32) -> GDI_REGION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn OffsetClipRgn(hdc: HDC, x: i32, y: i32) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn OffsetClipRgn(hdc : HDC, x : i32, y : i32) -> GDI_REGION_TYPE); - OffsetClipRgn(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y)) + OffsetClipRgn(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y)) } #[inline] pub unsafe fn OffsetRect(lprc: *mut super::super::Foundation::RECT, dx: i32, dy: i32) -> super::super::Foundation::BOOL { @@ -2159,193 +1531,119 @@ pub unsafe fn OffsetRect(lprc: *mut super::super::Foundation::RECT, dx: i32, dy: OffsetRect(core::mem::transmute(lprc), core::mem::transmute(dx), core::mem::transmute(dy)) } #[inline] -pub unsafe fn OffsetRgn(hrgn: P0, x: i32, y: i32) -> GDI_REGION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn OffsetRgn(hrgn: HRGN, x: i32, y: i32) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn OffsetRgn(hrgn : HRGN, x : i32, y : i32) -> GDI_REGION_TYPE); - OffsetRgn(hrgn.param().abi(), core::mem::transmute(x), core::mem::transmute(y)) + OffsetRgn(core::mem::transmute(hrgn), core::mem::transmute(x), core::mem::transmute(y)) } #[inline] -pub unsafe fn OffsetViewportOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn OffsetViewportOrgEx(hdc: HDC, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) + OffsetViewportOrgEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OffsetWindowOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn OffsetWindowOrgEx(hdc: HDC, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) + OffsetWindowOrgEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PaintDesktop(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PaintDesktop(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn PaintDesktop(hdc : HDC) -> super::super::Foundation:: BOOL); - PaintDesktop(hdc.param().abi()) + PaintDesktop(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn PaintRgn(hdc: P0, hrgn: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PaintRgn(hdc: HDC, hrgn: HRGN) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PaintRgn(hdc : HDC, hrgn : HRGN) -> super::super::Foundation:: BOOL); - PaintRgn(hdc.param().abi(), hrgn.param().abi()) + PaintRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn)) } #[inline] -pub unsafe fn PatBlt(hdc: P0, x: i32, y: i32, w: i32, h: i32, rop: ROP_CODE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PatBlt(hdc: HDC, x: i32, y: i32, w: i32, h: i32, rop: ROP_CODE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PatBlt(hdc : HDC, x : i32, y : i32, w : i32, h : i32, rop : ROP_CODE) -> super::super::Foundation:: BOOL); - PatBlt(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(w), core::mem::transmute(h), core::mem::transmute(rop)) + PatBlt(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(w), core::mem::transmute(h), core::mem::transmute(rop)) } #[inline] -pub unsafe fn PathToRegion(hdc: P0) -> HRGN -where - P0: windows_core::Param, -{ +pub unsafe fn PathToRegion(hdc: HDC) -> HRGN { windows_targets::link!("gdi32.dll" "system" fn PathToRegion(hdc : HDC) -> HRGN); - PathToRegion(hdc.param().abi()) + PathToRegion(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn Pie(hdc: P0, left: i32, top: i32, right: i32, bottom: i32, xr1: i32, yr1: i32, xr2: i32, yr2: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn Pie(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32, xr1: i32, yr1: i32, xr2: i32, yr2: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn Pie(hdc : HDC, left : i32, top : i32, right : i32, bottom : i32, xr1 : i32, yr1 : i32, xr2 : i32, yr2 : i32) -> super::super::Foundation:: BOOL); - Pie(hdc.param().abi(), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom), core::mem::transmute(xr1), core::mem::transmute(yr1), core::mem::transmute(xr2), core::mem::transmute(yr2)) + Pie(core::mem::transmute(hdc), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom), core::mem::transmute(xr1), core::mem::transmute(yr1), core::mem::transmute(xr2), core::mem::transmute(yr2)) } #[inline] -pub unsafe fn PlayEnhMetaFile(hdc: P0, hmf: P1, lprect: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PlayEnhMetaFile(hdc: HDC, hmf: HENHMETAFILE, lprect: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PlayEnhMetaFile(hdc : HDC, hmf : HENHMETAFILE, lprect : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - PlayEnhMetaFile(hdc.param().abi(), hmf.param().abi(), core::mem::transmute(lprect)) + PlayEnhMetaFile(core::mem::transmute(hdc), core::mem::transmute(hmf), core::mem::transmute(lprect)) } #[inline] -pub unsafe fn PlayEnhMetaFileRecord(hdc: P0, pht: &[HANDLETABLE], pmr: *const ENHMETARECORD) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PlayEnhMetaFileRecord(hdc: HDC, pht: &[HANDLETABLE], pmr: *const ENHMETARECORD) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PlayEnhMetaFileRecord(hdc : HDC, pht : *const HANDLETABLE, pmr : *const ENHMETARECORD, cht : u32) -> super::super::Foundation:: BOOL); - PlayEnhMetaFileRecord(hdc.param().abi(), core::mem::transmute(pht.as_ptr()), core::mem::transmute(pmr), pht.len().try_into().unwrap()) + PlayEnhMetaFileRecord(core::mem::transmute(hdc), core::mem::transmute(pht.as_ptr()), core::mem::transmute(pmr), pht.len().try_into().unwrap()) } #[inline] -pub unsafe fn PlayMetaFile(hdc: P0, hmf: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PlayMetaFile(hdc: HDC, hmf: HMETAFILE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PlayMetaFile(hdc : HDC, hmf : HMETAFILE) -> super::super::Foundation:: BOOL); - PlayMetaFile(hdc.param().abi(), hmf.param().abi()) + PlayMetaFile(core::mem::transmute(hdc), core::mem::transmute(hmf)) } #[inline] -pub unsafe fn PlayMetaFileRecord(hdc: P0, lphandletable: &[HANDLETABLE], lpmr: *const METARECORD) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PlayMetaFileRecord(hdc: HDC, lphandletable: &[HANDLETABLE], lpmr: *const METARECORD) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PlayMetaFileRecord(hdc : HDC, lphandletable : *const HANDLETABLE, lpmr : *const METARECORD, noobjs : u32) -> super::super::Foundation:: BOOL); - PlayMetaFileRecord(hdc.param().abi(), core::mem::transmute(lphandletable.as_ptr()), core::mem::transmute(lpmr), lphandletable.len().try_into().unwrap()) + PlayMetaFileRecord(core::mem::transmute(hdc), core::mem::transmute(lphandletable.as_ptr()), core::mem::transmute(lpmr), lphandletable.len().try_into().unwrap()) } #[inline] -pub unsafe fn PlgBlt(hdcdest: P0, lppoint: &[super::super::Foundation::POINT; 3], hdcsrc: P2, xsrc: i32, ysrc: i32, width: i32, height: i32, hbmmask: P7, xmask: i32, ymask: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn PlgBlt(hdcdest: HDC, lppoint: &[super::super::Foundation::POINT; 3], hdcsrc: HDC, xsrc: i32, ysrc: i32, width: i32, height: i32, hbmmask: Option, xmask: i32, ymask: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PlgBlt(hdcdest : HDC, lppoint : *const super::super::Foundation:: POINT, hdcsrc : HDC, xsrc : i32, ysrc : i32, width : i32, height : i32, hbmmask : HBITMAP, xmask : i32, ymask : i32) -> super::super::Foundation:: BOOL); - PlgBlt(hdcdest.param().abi(), core::mem::transmute(lppoint.as_ptr()), hdcsrc.param().abi(), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(width), core::mem::transmute(height), hbmmask.param().abi(), core::mem::transmute(xmask), core::mem::transmute(ymask)) + PlgBlt(core::mem::transmute(hdcdest), core::mem::transmute(lppoint.as_ptr()), core::mem::transmute(hdcsrc), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed())), core::mem::transmute(xmask), core::mem::transmute(ymask)) } #[inline] -pub unsafe fn PolyBezier(hdc: P0, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PolyBezier(hdc: HDC, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PolyBezier(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : u32) -> super::super::Foundation:: BOOL); - PolyBezier(hdc.param().abi(), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) + PolyBezier(core::mem::transmute(hdc), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[inline] -pub unsafe fn PolyBezierTo(hdc: P0, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PolyBezierTo(hdc: HDC, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PolyBezierTo(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : u32) -> super::super::Foundation:: BOOL); - PolyBezierTo(hdc.param().abi(), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) + PolyBezierTo(core::mem::transmute(hdc), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[inline] -pub unsafe fn PolyDraw(hdc: P0, apt: *const super::super::Foundation::POINT, aj: *const u8, cpt: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PolyDraw(hdc: HDC, apt: *const super::super::Foundation::POINT, aj: *const u8, cpt: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PolyDraw(hdc : HDC, apt : *const super::super::Foundation:: POINT, aj : *const u8, cpt : i32) -> super::super::Foundation:: BOOL); - PolyDraw(hdc.param().abi(), core::mem::transmute(apt), core::mem::transmute(aj), core::mem::transmute(cpt)) + PolyDraw(core::mem::transmute(hdc), core::mem::transmute(apt), core::mem::transmute(aj), core::mem::transmute(cpt)) } #[inline] -pub unsafe fn PolyPolygon(hdc: P0, apt: *const super::super::Foundation::POINT, asz: &[i32]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PolyPolygon(hdc: HDC, apt: *const super::super::Foundation::POINT, asz: &[i32]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PolyPolygon(hdc : HDC, apt : *const super::super::Foundation:: POINT, asz : *const i32, csz : i32) -> super::super::Foundation:: BOOL); - PolyPolygon(hdc.param().abi(), core::mem::transmute(apt), core::mem::transmute(asz.as_ptr()), asz.len().try_into().unwrap()) + PolyPolygon(core::mem::transmute(hdc), core::mem::transmute(apt), core::mem::transmute(asz.as_ptr()), asz.len().try_into().unwrap()) } #[inline] -pub unsafe fn PolyPolyline(hdc: P0, apt: *const super::super::Foundation::POINT, asz: &[u32]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PolyPolyline(hdc: HDC, apt: *const super::super::Foundation::POINT, asz: &[u32]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PolyPolyline(hdc : HDC, apt : *const super::super::Foundation:: POINT, asz : *const u32, csz : u32) -> super::super::Foundation:: BOOL); - PolyPolyline(hdc.param().abi(), core::mem::transmute(apt), core::mem::transmute(asz.as_ptr()), asz.len().try_into().unwrap()) + PolyPolyline(core::mem::transmute(hdc), core::mem::transmute(apt), core::mem::transmute(asz.as_ptr()), asz.len().try_into().unwrap()) } #[inline] -pub unsafe fn PolyTextOutA(hdc: P0, ppt: &[POLYTEXTA]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PolyTextOutA(hdc: HDC, ppt: &[POLYTEXTA]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PolyTextOutA(hdc : HDC, ppt : *const POLYTEXTA, nstrings : i32) -> super::super::Foundation:: BOOL); - PolyTextOutA(hdc.param().abi(), core::mem::transmute(ppt.as_ptr()), ppt.len().try_into().unwrap()) + PolyTextOutA(core::mem::transmute(hdc), core::mem::transmute(ppt.as_ptr()), ppt.len().try_into().unwrap()) } #[inline] -pub unsafe fn PolyTextOutW(hdc: P0, ppt: &[POLYTEXTW]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PolyTextOutW(hdc: HDC, ppt: &[POLYTEXTW]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PolyTextOutW(hdc : HDC, ppt : *const POLYTEXTW, nstrings : i32) -> super::super::Foundation:: BOOL); - PolyTextOutW(hdc.param().abi(), core::mem::transmute(ppt.as_ptr()), ppt.len().try_into().unwrap()) + PolyTextOutW(core::mem::transmute(hdc), core::mem::transmute(ppt.as_ptr()), ppt.len().try_into().unwrap()) } #[inline] -pub unsafe fn Polygon(hdc: P0, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn Polygon(hdc: HDC, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn Polygon(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : i32) -> super::super::Foundation:: BOOL); - Polygon(hdc.param().abi(), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) + Polygon(core::mem::transmute(hdc), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[inline] -pub unsafe fn Polyline(hdc: P0, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn Polyline(hdc: HDC, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn Polyline(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : i32) -> super::super::Foundation:: BOOL); - Polyline(hdc.param().abi(), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) + Polyline(core::mem::transmute(hdc), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[inline] -pub unsafe fn PolylineTo(hdc: P0, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PolylineTo(hdc: HDC, apt: &[super::super::Foundation::POINT]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PolylineTo(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : u32) -> super::super::Foundation:: BOOL); - PolylineTo(hdc.param().abi(), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) + PolylineTo(core::mem::transmute(hdc), core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[inline] pub unsafe fn PtInRect(lprc: *const super::super::Foundation::RECT, pt: super::super::Foundation::POINT) -> super::super::Foundation::BOOL { @@ -2353,78 +1651,49 @@ pub unsafe fn PtInRect(lprc: *const super::super::Foundation::RECT, pt: super::s PtInRect(core::mem::transmute(lprc), core::mem::transmute(pt)) } #[inline] -pub unsafe fn PtInRegion(hrgn: P0, x: i32, y: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PtInRegion(hrgn: HRGN, x: i32, y: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PtInRegion(hrgn : HRGN, x : i32, y : i32) -> super::super::Foundation:: BOOL); - PtInRegion(hrgn.param().abi(), core::mem::transmute(x), core::mem::transmute(y)) + PtInRegion(core::mem::transmute(hrgn), core::mem::transmute(x), core::mem::transmute(y)) } #[inline] -pub unsafe fn PtVisible(hdc: P0, x: i32, y: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PtVisible(hdc: HDC, x: i32, y: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn PtVisible(hdc : HDC, x : i32, y : i32) -> super::super::Foundation:: BOOL); - PtVisible(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y)) + PtVisible(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y)) } #[inline] -pub unsafe fn RealizePalette(hdc: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RealizePalette(hdc: HDC) -> u32 { windows_targets::link!("gdi32.dll" "system" fn RealizePalette(hdc : HDC) -> u32); - RealizePalette(hdc.param().abi()) + RealizePalette(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn RectInRegion(hrgn: P0, lprect: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RectInRegion(hrgn: HRGN, lprect: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn RectInRegion(hrgn : HRGN, lprect : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - RectInRegion(hrgn.param().abi(), core::mem::transmute(lprect)) + RectInRegion(core::mem::transmute(hrgn), core::mem::transmute(lprect)) } #[inline] -pub unsafe fn RectVisible(hdc: P0, lprect: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RectVisible(hdc: HDC, lprect: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn RectVisible(hdc : HDC, lprect : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - RectVisible(hdc.param().abi(), core::mem::transmute(lprect)) + RectVisible(core::mem::transmute(hdc), core::mem::transmute(lprect)) } #[inline] -pub unsafe fn Rectangle(hdc: P0, left: i32, top: i32, right: i32, bottom: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn Rectangle(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn Rectangle(hdc : HDC, left : i32, top : i32, right : i32, bottom : i32) -> super::super::Foundation:: BOOL); - Rectangle(hdc.param().abi(), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) + Rectangle(core::mem::transmute(hdc), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) } #[inline] -pub unsafe fn RedrawWindow(hwnd: P0, lprcupdate: Option<*const super::super::Foundation::RECT>, hrgnupdate: P2, flags: REDRAW_WINDOW_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn RedrawWindow(hwnd: Option, lprcupdate: Option<*const super::super::Foundation::RECT>, hrgnupdate: Option, flags: REDRAW_WINDOW_FLAGS) -> super::super::Foundation::BOOL { 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(core::ptr::null())), hrgnupdate.param().abi(), core::mem::transmute(flags)) + RedrawWindow(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprcupdate.unwrap_or(core::mem::zeroed())), core::mem::transmute(hrgnupdate.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn ReleaseDC(hwnd: P0, hdc: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ReleaseDC(hwnd: Option, hdc: HDC) -> i32 { windows_targets::link!("user32.dll" "system" fn ReleaseDC(hwnd : super::super::Foundation:: HWND, hdc : HDC) -> i32); - ReleaseDC(hwnd.param().abi(), hdc.param().abi()) + ReleaseDC(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hdc)) } #[inline] -pub unsafe fn RemoveFontMemResourceEx(h: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RemoveFontMemResourceEx(h: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn RemoveFontMemResourceEx(h : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RemoveFontMemResourceEx(h.param().abi()) + RemoveFontMemResourceEx(core::mem::transmute(h)) } #[inline] pub unsafe fn RemoveFontResourceA(lpfilename: P0) -> super::super::Foundation::BOOL @@ -2440,7 +1709,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(), core::mem::transmute(fl), core::mem::transmute(pdv.unwrap_or(core::ptr::null()))) + RemoveFontResourceExA(name.param().abi(), core::mem::transmute(fl), core::mem::transmute(pdv.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RemoveFontResourceExW(name: P0, fl: u32, pdv: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -2448,7 +1717,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(), core::mem::transmute(fl), core::mem::transmute(pdv.unwrap_or(core::ptr::null()))) + RemoveFontResourceExW(name.param().abi(), core::mem::transmute(fl), core::mem::transmute(pdv.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RemoveFontResourceW(lpfilename: P0) -> super::super::Foundation::BOOL @@ -2459,220 +1728,137 @@ where RemoveFontResourceW(lpfilename.param().abi()) } #[inline] -pub unsafe fn ResetDCA(hdc: P0, lpdm: *const DEVMODEA) -> HDC -where - P0: windows_core::Param, -{ +pub unsafe fn ResetDCA(hdc: HDC, lpdm: *const DEVMODEA) -> HDC { windows_targets::link!("gdi32.dll" "system" fn ResetDCA(hdc : HDC, lpdm : *const DEVMODEA) -> HDC); - ResetDCA(hdc.param().abi(), core::mem::transmute(lpdm)) + ResetDCA(core::mem::transmute(hdc), core::mem::transmute(lpdm)) } #[inline] -pub unsafe fn ResetDCW(hdc: P0, lpdm: *const DEVMODEW) -> HDC -where - P0: windows_core::Param, -{ +pub unsafe fn ResetDCW(hdc: HDC, lpdm: *const DEVMODEW) -> HDC { windows_targets::link!("gdi32.dll" "system" fn ResetDCW(hdc : HDC, lpdm : *const DEVMODEW) -> HDC); - ResetDCW(hdc.param().abi(), core::mem::transmute(lpdm)) + ResetDCW(core::mem::transmute(hdc), core::mem::transmute(lpdm)) } #[inline] -pub unsafe fn ResizePalette(hpal: P0, n: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ResizePalette(hpal: HPALETTE, n: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn ResizePalette(hpal : HPALETTE, n : u32) -> super::super::Foundation:: BOOL); - ResizePalette(hpal.param().abi(), core::mem::transmute(n)) + ResizePalette(core::mem::transmute(hpal), core::mem::transmute(n)) } #[inline] -pub unsafe fn RestoreDC(hdc: P0, nsaveddc: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RestoreDC(hdc: HDC, nsaveddc: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn RestoreDC(hdc : HDC, nsaveddc : i32) -> super::super::Foundation:: BOOL); - RestoreDC(hdc.param().abi(), core::mem::transmute(nsaveddc)) + RestoreDC(core::mem::transmute(hdc), core::mem::transmute(nsaveddc)) } #[inline] -pub unsafe fn RoundRect(hdc: P0, left: i32, top: i32, right: i32, bottom: i32, width: i32, height: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RoundRect(hdc: HDC, left: i32, top: i32, right: i32, bottom: i32, width: i32, height: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn RoundRect(hdc : HDC, left : i32, top : i32, right : i32, bottom : i32, width : i32, height : i32) -> super::super::Foundation:: BOOL); - RoundRect(hdc.param().abi(), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom), core::mem::transmute(width), core::mem::transmute(height)) + RoundRect(core::mem::transmute(hdc), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom), core::mem::transmute(width), core::mem::transmute(height)) } #[inline] -pub unsafe fn SaveDC(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SaveDC(hdc: HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SaveDC(hdc : HDC) -> i32); - SaveDC(hdc.param().abi()) + SaveDC(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn ScaleViewportExtEx(hdc: P0, xn: i32, dx: i32, yn: i32, yd: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ScaleViewportExtEx(hdc: HDC, xn: i32, dx: i32, yn: i32, yd: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(xn), core::mem::transmute(dx), core::mem::transmute(yn), core::mem::transmute(yd), core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) + ScaleViewportExtEx(core::mem::transmute(hdc), core::mem::transmute(xn), core::mem::transmute(dx), core::mem::transmute(yn), core::mem::transmute(yd), core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn ScaleWindowExtEx(hdc: HDC, xn: i32, xd: i32, yn: i32, yd: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(xn), core::mem::transmute(xd), core::mem::transmute(yn), core::mem::transmute(yd), core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) + ScaleWindowExtEx(core::mem::transmute(hdc), core::mem::transmute(xn), core::mem::transmute(xd), core::mem::transmute(yn), core::mem::transmute(yd), core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ScreenToClient(hwnd: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ScreenToClient(hwnd: super::super::Foundation::HWND, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn ScreenToClient(hwnd : super::super::Foundation:: HWND, lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - ScreenToClient(hwnd.param().abi(), core::mem::transmute(lppoint)) + ScreenToClient(core::mem::transmute(hwnd), core::mem::transmute(lppoint)) } #[inline] -pub unsafe fn SelectClipPath(hdc: P0, mode: RGN_COMBINE_MODE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SelectClipPath(hdc: HDC, mode: RGN_COMBINE_MODE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn SelectClipPath(hdc : HDC, mode : RGN_COMBINE_MODE) -> super::super::Foundation:: BOOL); - SelectClipPath(hdc.param().abi(), core::mem::transmute(mode)) + SelectClipPath(core::mem::transmute(hdc), core::mem::transmute(mode)) } #[inline] -pub unsafe fn SelectClipRgn(hdc: P0, hrgn: P1) -> GDI_REGION_TYPE -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SelectClipRgn(hdc: HDC, hrgn: Option) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn SelectClipRgn(hdc : HDC, hrgn : HRGN) -> GDI_REGION_TYPE); - SelectClipRgn(hdc.param().abi(), hrgn.param().abi()) + SelectClipRgn(core::mem::transmute(hdc), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SelectObject(hdc: P0, h: P1) -> HGDIOBJ -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SelectObject(hdc: HDC, h: HGDIOBJ) -> HGDIOBJ { windows_targets::link!("gdi32.dll" "system" fn SelectObject(hdc : HDC, h : HGDIOBJ) -> HGDIOBJ); - SelectObject(hdc.param().abi(), h.param().abi()) + SelectObject(core::mem::transmute(hdc), core::mem::transmute(h)) } #[inline] -pub unsafe fn SelectPalette(hdc: P0, hpal: P1, bforcebkgd: P2) -> HPALETTE +pub unsafe fn SelectPalette(hdc: HDC, hpal: HPALETTE, bforcebkgd: P2) -> HPALETTE where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SelectPalette(hdc : HDC, hpal : HPALETTE, bforcebkgd : super::super::Foundation:: BOOL) -> HPALETTE); - SelectPalette(hdc.param().abi(), hpal.param().abi(), bforcebkgd.param().abi()) + SelectPalette(core::mem::transmute(hdc), core::mem::transmute(hpal), bforcebkgd.param().abi()) } #[inline] -pub unsafe fn SetArcDirection(hdc: P0, dir: ARC_DIRECTION) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetArcDirection(hdc: HDC, dir: ARC_DIRECTION) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetArcDirection(hdc : HDC, dir : ARC_DIRECTION) -> i32); - SetArcDirection(hdc.param().abi(), core::mem::transmute(dir)) + SetArcDirection(core::mem::transmute(hdc), core::mem::transmute(dir)) } #[inline] -pub unsafe fn SetBitmapBits(hbm: P0, cb: u32, pvbits: *const core::ffi::c_void) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetBitmapBits(hbm: HBITMAP, cb: u32, pvbits: *const core::ffi::c_void) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetBitmapBits(hbm : HBITMAP, cb : u32, pvbits : *const core::ffi::c_void) -> i32); - SetBitmapBits(hbm.param().abi(), core::mem::transmute(cb), core::mem::transmute(pvbits)) + SetBitmapBits(core::mem::transmute(hbm), core::mem::transmute(cb), core::mem::transmute(pvbits)) } #[inline] -pub unsafe fn SetBitmapDimensionEx(hbm: P0, w: i32, h: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetBitmapDimensionEx(hbm: HBITMAP, w: i32, h: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(w), core::mem::transmute(h), core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) + SetBitmapDimensionEx(core::mem::transmute(hbm), core::mem::transmute(w), core::mem::transmute(h), core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetBkColor(hdc: P0, color: P1) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetBkColor(hdc: HDC, color: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn SetBkColor(hdc : HDC, color : super::super::Foundation:: COLORREF) -> super::super::Foundation:: COLORREF); - SetBkColor(hdc.param().abi(), color.param().abi()) + SetBkColor(core::mem::transmute(hdc), core::mem::transmute(color)) } #[inline] -pub unsafe fn SetBkMode(hdc: P0, mode: BACKGROUND_MODE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetBkMode(hdc: HDC, mode: BACKGROUND_MODE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetBkMode(hdc : HDC, mode : i32) -> i32); - SetBkMode(hdc.param().abi(), mode.0 as _) + SetBkMode(core::mem::transmute(hdc), mode.0 as _) } #[inline] -pub unsafe fn SetBoundsRect(hdc: P0, lprect: Option<*const super::super::Foundation::RECT>, flags: SET_BOUNDS_RECT_FLAGS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetBoundsRect(hdc: HDC, lprect: Option<*const super::super::Foundation::RECT>, flags: SET_BOUNDS_RECT_FLAGS) -> u32 { 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(core::ptr::null())), core::mem::transmute(flags)) + SetBoundsRect(core::mem::transmute(hdc), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SetBrushOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetBrushOrgEx(hdc: HDC, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) + SetBrushOrgEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetColorAdjustment(hdc: P0, lpca: *const COLORADJUSTMENT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetColorAdjustment(hdc: HDC, lpca: *const COLORADJUSTMENT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn SetColorAdjustment(hdc : HDC, lpca : *const COLORADJUSTMENT) -> super::super::Foundation:: BOOL); - SetColorAdjustment(hdc.param().abi(), core::mem::transmute(lpca)) + SetColorAdjustment(core::mem::transmute(hdc), core::mem::transmute(lpca)) } #[inline] -pub unsafe fn SetDCBrushColor(hdc: P0, color: P1) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetDCBrushColor(hdc: HDC, color: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn SetDCBrushColor(hdc : HDC, color : super::super::Foundation:: COLORREF) -> super::super::Foundation:: COLORREF); - SetDCBrushColor(hdc.param().abi(), color.param().abi()) + SetDCBrushColor(core::mem::transmute(hdc), core::mem::transmute(color)) } #[inline] -pub unsafe fn SetDCPenColor(hdc: P0, color: P1) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetDCPenColor(hdc: HDC, color: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn SetDCPenColor(hdc : HDC, color : super::super::Foundation:: COLORREF) -> super::super::Foundation:: COLORREF); - SetDCPenColor(hdc.param().abi(), color.param().abi()) + SetDCPenColor(core::mem::transmute(hdc), core::mem::transmute(color)) } #[inline] -pub unsafe fn SetDIBColorTable(hdc: P0, istart: u32, prgbq: &[RGBQUAD]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetDIBColorTable(hdc: HDC, istart: u32, prgbq: &[RGBQUAD]) -> u32 { windows_targets::link!("gdi32.dll" "system" fn SetDIBColorTable(hdc : HDC, istart : u32, centries : u32, prgbq : *const RGBQUAD) -> u32); - SetDIBColorTable(hdc.param().abi(), core::mem::transmute(istart), prgbq.len().try_into().unwrap(), core::mem::transmute(prgbq.as_ptr())) + SetDIBColorTable(core::mem::transmute(hdc), core::mem::transmute(istart), prgbq.len().try_into().unwrap(), core::mem::transmute(prgbq.as_ptr())) } #[inline] -pub unsafe fn SetDIBits(hdc: P0, hbm: P1, start: u32, clines: u32, lpbits: *const core::ffi::c_void, lpbmi: *const BITMAPINFO, coloruse: DIB_USAGE) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetDIBits(hdc: Option, hbm: HBITMAP, start: u32, clines: u32, lpbits: *const core::ffi::c_void, lpbmi: *const BITMAPINFO, coloruse: DIB_USAGE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetDIBits(hdc : HDC, hbm : HBITMAP, start : u32, clines : u32, lpbits : *const core::ffi::c_void, lpbmi : *const BITMAPINFO, coloruse : DIB_USAGE) -> i32); - SetDIBits(hdc.param().abi(), hbm.param().abi(), core::mem::transmute(start), core::mem::transmute(clines), core::mem::transmute(lpbits), core::mem::transmute(lpbmi), core::mem::transmute(coloruse)) + SetDIBits(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(hbm), core::mem::transmute(start), core::mem::transmute(clines), core::mem::transmute(lpbits), core::mem::transmute(lpbmi), core::mem::transmute(coloruse)) } #[inline] -pub unsafe fn SetDIBitsToDevice(hdc: P0, xdest: i32, ydest: i32, w: u32, h: u32, xsrc: i32, ysrc: i32, startscan: u32, clines: u32, lpvbits: *const core::ffi::c_void, lpbmi: *const BITMAPINFO, coloruse: DIB_USAGE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetDIBitsToDevice(hdc: HDC, xdest: i32, ydest: i32, w: u32, h: u32, xsrc: i32, ysrc: i32, startscan: u32, clines: u32, lpvbits: *const core::ffi::c_void, lpbmi: *const BITMAPINFO, coloruse: DIB_USAGE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetDIBitsToDevice(hdc : HDC, xdest : i32, ydest : i32, w : u32, h : u32, xsrc : i32, ysrc : i32, startscan : u32, clines : u32, lpvbits : *const core::ffi::c_void, lpbmi : *const BITMAPINFO, coloruse : DIB_USAGE) -> i32); - SetDIBitsToDevice(hdc.param().abi(), core::mem::transmute(xdest), core::mem::transmute(ydest), core::mem::transmute(w), core::mem::transmute(h), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(startscan), core::mem::transmute(clines), core::mem::transmute(lpvbits), core::mem::transmute(lpbmi), core::mem::transmute(coloruse)) + SetDIBitsToDevice(core::mem::transmute(hdc), core::mem::transmute(xdest), core::mem::transmute(ydest), core::mem::transmute(w), core::mem::transmute(h), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(startscan), core::mem::transmute(clines), core::mem::transmute(lpvbits), core::mem::transmute(lpbmi), core::mem::transmute(coloruse)) } #[inline] pub unsafe fn SetEnhMetaFileBits(pb: &[u8]) -> HENHMETAFILE { @@ -2680,36 +1866,24 @@ pub unsafe fn SetEnhMetaFileBits(pb: &[u8]) -> HENHMETAFILE { SetEnhMetaFileBits(pb.len().try_into().unwrap(), core::mem::transmute(pb.as_ptr())) } #[inline] -pub unsafe fn SetGraphicsMode(hdc: P0, imode: GRAPHICS_MODE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetGraphicsMode(hdc: HDC, imode: GRAPHICS_MODE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetGraphicsMode(hdc : HDC, imode : GRAPHICS_MODE) -> i32); - SetGraphicsMode(hdc.param().abi(), core::mem::transmute(imode)) + SetGraphicsMode(core::mem::transmute(hdc), core::mem::transmute(imode)) } #[inline] -pub unsafe fn SetLayout(hdc: P0, l: DC_LAYOUT) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetLayout(hdc: HDC, l: DC_LAYOUT) -> u32 { windows_targets::link!("gdi32.dll" "system" fn SetLayout(hdc : HDC, l : DC_LAYOUT) -> u32); - SetLayout(hdc.param().abi(), core::mem::transmute(l)) + SetLayout(core::mem::transmute(hdc), core::mem::transmute(l)) } #[inline] -pub unsafe fn SetMapMode(hdc: P0, imode: HDC_MAP_MODE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMapMode(hdc: HDC, imode: HDC_MAP_MODE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetMapMode(hdc : HDC, imode : HDC_MAP_MODE) -> i32); - SetMapMode(hdc.param().abi(), core::mem::transmute(imode)) + SetMapMode(core::mem::transmute(hdc), core::mem::transmute(imode)) } #[inline] -pub unsafe fn SetMapperFlags(hdc: P0, flags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetMapperFlags(hdc: HDC, flags: u32) -> u32 { windows_targets::link!("gdi32.dll" "system" fn SetMapperFlags(hdc : HDC, flags : u32) -> u32); - SetMapperFlags(hdc.param().abi(), core::mem::transmute(flags)) + SetMapperFlags(core::mem::transmute(hdc), core::mem::transmute(flags)) } #[inline] pub unsafe fn SetMetaFileBitsEx(lpdata: &[u8]) -> HMETAFILE { @@ -2717,62 +1891,39 @@ pub unsafe fn SetMetaFileBitsEx(lpdata: &[u8]) -> HMETAFILE { SetMetaFileBitsEx(lpdata.len().try_into().unwrap(), core::mem::transmute(lpdata.as_ptr())) } #[inline] -pub unsafe fn SetMetaRgn(hdc: P0) -> GDI_REGION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn SetMetaRgn(hdc: HDC) -> GDI_REGION_TYPE { windows_targets::link!("gdi32.dll" "system" fn SetMetaRgn(hdc : HDC) -> GDI_REGION_TYPE); - SetMetaRgn(hdc.param().abi()) + SetMetaRgn(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn SetMiterLimit(hdc: P0, limit: f32, old: Option<*mut f32>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetMiterLimit(hdc: HDC, limit: f32, old: Option<*mut f32>) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn SetMiterLimit(hdc : HDC, limit : f32, old : *mut f32) -> super::super::Foundation:: BOOL); - SetMiterLimit(hdc.param().abi(), core::mem::transmute(limit), core::mem::transmute(old.unwrap_or(core::ptr::null_mut()))) + SetMiterLimit(core::mem::transmute(hdc), core::mem::transmute(limit), core::mem::transmute(old.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetPaletteEntries(hpal: P0, istart: u32, ppalentries: &[PALETTEENTRY]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetPaletteEntries(hpal: HPALETTE, istart: u32, ppalentries: &[PALETTEENTRY]) -> u32 { windows_targets::link!("gdi32.dll" "system" fn SetPaletteEntries(hpal : HPALETTE, istart : u32, centries : u32, ppalentries : *const PALETTEENTRY) -> u32); - SetPaletteEntries(hpal.param().abi(), core::mem::transmute(istart), ppalentries.len().try_into().unwrap(), core::mem::transmute(ppalentries.as_ptr())) + SetPaletteEntries(core::mem::transmute(hpal), core::mem::transmute(istart), ppalentries.len().try_into().unwrap(), core::mem::transmute(ppalentries.as_ptr())) } #[inline] -pub unsafe fn SetPixel(hdc: P0, x: i32, y: i32, color: P3) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SetPixel(hdc: HDC, x: i32, y: i32, color: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn SetPixel(hdc : HDC, x : i32, y : i32, color : super::super::Foundation:: COLORREF) -> super::super::Foundation:: COLORREF); - SetPixel(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), color.param().abi()) + SetPixel(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(color)) } #[inline] -pub unsafe fn SetPixelV(hdc: P0, x: i32, y: i32, color: P3) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SetPixelV(hdc: HDC, x: i32, y: i32, color: super::super::Foundation::COLORREF) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn SetPixelV(hdc : HDC, x : i32, y : i32, color : super::super::Foundation:: COLORREF) -> super::super::Foundation:: BOOL); - SetPixelV(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), color.param().abi()) + SetPixelV(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(color)) } #[inline] -pub unsafe fn SetPolyFillMode(hdc: P0, mode: CREATE_POLYGON_RGN_MODE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetPolyFillMode(hdc: HDC, mode: CREATE_POLYGON_RGN_MODE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetPolyFillMode(hdc : HDC, mode : CREATE_POLYGON_RGN_MODE) -> i32); - SetPolyFillMode(hdc.param().abi(), core::mem::transmute(mode)) + SetPolyFillMode(core::mem::transmute(hdc), core::mem::transmute(mode)) } #[inline] -pub unsafe fn SetROP2(hdc: P0, rop2: R2_MODE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetROP2(hdc: HDC, rop2: R2_MODE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetROP2(hdc : HDC, rop2 : R2_MODE) -> i32); - SetROP2(hdc.param().abi(), core::mem::transmute(rop2)) + SetROP2(core::mem::transmute(hdc), core::mem::transmute(rop2)) } #[inline] pub unsafe fn SetRect(lprc: *mut super::super::Foundation::RECT, xleft: i32, ytop: i32, xright: i32, ybottom: i32) -> super::super::Foundation::BOOL { @@ -2785,20 +1936,14 @@ pub unsafe fn SetRectEmpty(lprc: *mut super::super::Foundation::RECT) -> super:: SetRectEmpty(core::mem::transmute(lprc)) } #[inline] -pub unsafe fn SetRectRgn(hrgn: P0, left: i32, top: i32, right: i32, bottom: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetRectRgn(hrgn: HRGN, left: i32, top: i32, right: i32, bottom: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn SetRectRgn(hrgn : HRGN, left : i32, top : i32, right : i32, bottom : i32) -> super::super::Foundation:: BOOL); - SetRectRgn(hrgn.param().abi(), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) + SetRectRgn(core::mem::transmute(hrgn), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom)) } #[inline] -pub unsafe fn SetStretchBltMode(hdc: P0, mode: STRETCH_BLT_MODE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetStretchBltMode(hdc: HDC, mode: STRETCH_BLT_MODE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetStretchBltMode(hdc : HDC, mode : STRETCH_BLT_MODE) -> i32); - SetStretchBltMode(hdc.param().abi(), core::mem::transmute(mode)) + SetStretchBltMode(core::mem::transmute(hdc), core::mem::transmute(mode)) } #[inline] pub unsafe fn SetSysColors(celements: i32, lpaelements: *const i32, lpargbvalues: *const super::super::Foundation::COLORREF) -> windows_core::Result<()> { @@ -2806,128 +1951,82 @@ pub unsafe fn SetSysColors(celements: i32, lpaelements: *const i32, lpargbvalues SetSysColors(core::mem::transmute(celements), core::mem::transmute(lpaelements), core::mem::transmute(lpargbvalues)).ok() } #[inline] -pub unsafe fn SetSystemPaletteUse(hdc: P0, r#use: SYSTEM_PALETTE_USE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetSystemPaletteUse(hdc: HDC, r#use: SYSTEM_PALETTE_USE) -> u32 { windows_targets::link!("gdi32.dll" "system" fn SetSystemPaletteUse(hdc : HDC, r#use : SYSTEM_PALETTE_USE) -> u32); - SetSystemPaletteUse(hdc.param().abi(), core::mem::transmute(r#use)) + SetSystemPaletteUse(core::mem::transmute(hdc), core::mem::transmute(r#use)) } #[inline] -pub unsafe fn SetTextAlign(hdc: P0, align: TEXT_ALIGN_OPTIONS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetTextAlign(hdc: HDC, align: TEXT_ALIGN_OPTIONS) -> u32 { windows_targets::link!("gdi32.dll" "system" fn SetTextAlign(hdc : HDC, align : TEXT_ALIGN_OPTIONS) -> u32); - SetTextAlign(hdc.param().abi(), core::mem::transmute(align)) + SetTextAlign(core::mem::transmute(hdc), core::mem::transmute(align)) } #[inline] -pub unsafe fn SetTextCharacterExtra(hdc: P0, extra: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetTextCharacterExtra(hdc: HDC, extra: i32) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetTextCharacterExtra(hdc : HDC, extra : i32) -> i32); - SetTextCharacterExtra(hdc.param().abi(), core::mem::transmute(extra)) + SetTextCharacterExtra(core::mem::transmute(hdc), core::mem::transmute(extra)) } #[inline] -pub unsafe fn SetTextColor(hdc: P0, color: P1) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetTextColor(hdc: HDC, color: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { windows_targets::link!("gdi32.dll" "system" fn SetTextColor(hdc : HDC, color : super::super::Foundation:: COLORREF) -> super::super::Foundation:: COLORREF); - SetTextColor(hdc.param().abi(), color.param().abi()) + SetTextColor(core::mem::transmute(hdc), core::mem::transmute(color)) } #[inline] -pub unsafe fn SetTextJustification(hdc: P0, extra: i32, count: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetTextJustification(hdc: HDC, extra: i32, count: i32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn SetTextJustification(hdc : HDC, extra : i32, count : i32) -> super::super::Foundation:: BOOL); - SetTextJustification(hdc.param().abi(), core::mem::transmute(extra), core::mem::transmute(count)) + SetTextJustification(core::mem::transmute(hdc), core::mem::transmute(extra), core::mem::transmute(count)) } #[inline] -pub unsafe fn SetViewportExtEx(hdc: P0, x: i32, y: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetViewportExtEx(hdc: HDC, x: i32, y: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) + SetViewportExtEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetViewportOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetViewportOrgEx(hdc: HDC, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) + SetViewportOrgEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetWindowExtEx(hdc: P0, x: i32, y: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowExtEx(hdc: HDC, x: i32, y: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) + SetWindowExtEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpsz.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetWindowOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowOrgEx(hdc: HDC, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) + SetWindowOrgEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetWindowRgn(hwnd: P0, hrgn: P1, bredraw: P2) -> i32 +pub unsafe fn SetWindowRgn(hwnd: super::super::Foundation::HWND, hrgn: Option, bredraw: P2) -> i32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetWindowRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN, bredraw : super::super::Foundation:: BOOL) -> i32); - SetWindowRgn(hwnd.param().abi(), hrgn.param().abi(), bredraw.param().abi()) + SetWindowRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), bredraw.param().abi()) } #[inline] -pub unsafe fn SetWorldTransform(hdc: P0, lpxf: *const XFORM) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetWorldTransform(hdc: HDC, lpxf: *const XFORM) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn SetWorldTransform(hdc : HDC, lpxf : *const XFORM) -> super::super::Foundation:: BOOL); - SetWorldTransform(hdc.param().abi(), core::mem::transmute(lpxf)) + SetWorldTransform(core::mem::transmute(hdc), core::mem::transmute(lpxf)) } #[inline] -pub unsafe fn StretchBlt(hdcdest: P0, xdest: i32, ydest: i32, wdest: i32, hdest: i32, hdcsrc: P5, xsrc: i32, ysrc: i32, wsrc: i32, hsrc: i32, rop: ROP_CODE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn StretchBlt(hdcdest: HDC, xdest: i32, ydest: i32, wdest: i32, hdest: i32, hdcsrc: Option, xsrc: i32, ysrc: i32, wsrc: i32, hsrc: i32, rop: ROP_CODE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn StretchBlt(hdcdest : HDC, xdest : i32, ydest : i32, wdest : i32, hdest : i32, hdcsrc : HDC, xsrc : i32, ysrc : i32, wsrc : i32, hsrc : i32, rop : ROP_CODE) -> super::super::Foundation:: BOOL); - StretchBlt(hdcdest.param().abi(), core::mem::transmute(xdest), core::mem::transmute(ydest), core::mem::transmute(wdest), core::mem::transmute(hdest), hdcsrc.param().abi(), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(rop)) + StretchBlt(core::mem::transmute(hdcdest), core::mem::transmute(xdest), core::mem::transmute(ydest), core::mem::transmute(wdest), core::mem::transmute(hdest), core::mem::transmute(hdcsrc.unwrap_or(core::mem::zeroed())), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(rop)) } #[inline] -pub unsafe fn StretchDIBits(hdc: P0, xdest: i32, ydest: i32, destwidth: i32, destheight: i32, xsrc: i32, ysrc: i32, srcwidth: i32, srcheight: i32, lpbits: Option<*const core::ffi::c_void>, lpbmi: *const BITMAPINFO, iusage: DIB_USAGE, rop: ROP_CODE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn StretchDIBits(hdc: HDC, xdest: i32, ydest: i32, destwidth: i32, destheight: i32, xsrc: i32, ysrc: i32, srcwidth: i32, srcheight: i32, lpbits: Option<*const core::ffi::c_void>, lpbmi: *const BITMAPINFO, iusage: DIB_USAGE, rop: ROP_CODE) -> i32 { 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(), core::mem::transmute(xdest), core::mem::transmute(ydest), core::mem::transmute(destwidth), core::mem::transmute(destheight), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(srcwidth), core::mem::transmute(srcheight), core::mem::transmute(lpbits.unwrap_or(core::ptr::null())), core::mem::transmute(lpbmi), core::mem::transmute(iusage), core::mem::transmute(rop)) + StretchDIBits(core::mem::transmute(hdc), core::mem::transmute(xdest), core::mem::transmute(ydest), core::mem::transmute(destwidth), core::mem::transmute(destheight), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(srcwidth), core::mem::transmute(srcheight), core::mem::transmute(lpbits.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbmi), core::mem::transmute(iusage), core::mem::transmute(rop)) } #[inline] -pub unsafe fn StrokeAndFillPath(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn StrokeAndFillPath(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn StrokeAndFillPath(hdc : HDC) -> super::super::Foundation:: BOOL); - StrokeAndFillPath(hdc.param().abi()) + StrokeAndFillPath(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn StrokePath(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn StrokePath(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn StrokePath(hdc : HDC) -> super::super::Foundation:: BOOL); - StrokePath(hdc.param().abi()) + StrokePath(core::mem::transmute(hdc)) } #[inline] pub unsafe fn SubtractRect(lprcdst: *mut super::super::Foundation::RECT, lprcsrc1: *const super::super::Foundation::RECT, lprcsrc2: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -2935,46 +2034,33 @@ pub unsafe fn SubtractRect(lprcdst: *mut super::super::Foundation::RECT, lprcsrc SubtractRect(core::mem::transmute(lprcdst), core::mem::transmute(lprcsrc1), core::mem::transmute(lprcsrc2)) } #[inline] -pub unsafe fn TTCharToUnicode(hdc: P0, puccharcodes: &[u8], pusshortcodes: &mut [u16], ulflags: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn TTCharToUnicode(hdc: HDC, puccharcodes: &[u8], pusshortcodes: &mut [u16], ulflags: u32) -> i32 { windows_targets::link!("t2embed.dll" "system" fn TTCharToUnicode(hdc : HDC, puccharcodes : *const u8, ulcharcodesize : u32, pusshortcodes : *mut u16, ulshortcodesize : u32, ulflags : u32) -> i32); - TTCharToUnicode(hdc.param().abi(), core::mem::transmute(puccharcodes.as_ptr()), puccharcodes.len().try_into().unwrap(), core::mem::transmute(pusshortcodes.as_ptr()), pusshortcodes.len().try_into().unwrap(), core::mem::transmute(ulflags)) + TTCharToUnicode(core::mem::transmute(hdc), core::mem::transmute(puccharcodes.as_ptr()), puccharcodes.len().try_into().unwrap(), core::mem::transmute(pusshortcodes.as_ptr()), pusshortcodes.len().try_into().unwrap(), core::mem::transmute(ulflags)) } #[inline] -pub unsafe fn TTDeleteEmbeddedFont(hfontreference: P0, ulflags: u32, pulstatus: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn TTDeleteEmbeddedFont(hfontreference: super::super::Foundation::HANDLE, ulflags: u32, pulstatus: *mut u32) -> i32 { windows_targets::link!("t2embed.dll" "system" fn TTDeleteEmbeddedFont(hfontreference : super::super::Foundation:: HANDLE, ulflags : u32, pulstatus : *mut u32) -> i32); - TTDeleteEmbeddedFont(hfontreference.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(pulstatus)) + TTDeleteEmbeddedFont(core::mem::transmute(hfontreference), core::mem::transmute(ulflags), core::mem::transmute(pulstatus)) } #[inline] -pub unsafe fn TTEmbedFont(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, puscharcodeset: &[u16], uslanguage: u16, pttembedinfo: Option<*const TTEMBEDINFO>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe 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: &[u16], uslanguage: u16, pttembedinfo: Option<*const TTEMBEDINFO>) -> i32 { 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(), core::mem::transmute(ulflags), core::mem::transmute(ulcharset), core::mem::transmute(pulprivstatus), core::mem::transmute(pulstatus), core::mem::transmute(lpfnwritetostream), core::mem::transmute(lpvwritestream), core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), core::mem::transmute(uslanguage), core::mem::transmute(pttembedinfo.unwrap_or(core::ptr::null()))) + TTEmbedFont(core::mem::transmute(hdc), core::mem::transmute(ulflags), core::mem::transmute(ulcharset), core::mem::transmute(pulprivstatus), core::mem::transmute(pulstatus), core::mem::transmute(lpfnwritetostream), core::mem::transmute(lpvwritestream), core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), core::mem::transmute(uslanguage), core::mem::transmute(pttembedinfo.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe 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: &[u32], uslanguage: u16, pttembedinfo: Option<*const TTEMBEDINFO>) -> i32 { 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(), core::mem::transmute(ulflags), core::mem::transmute(ulcharset), core::mem::transmute(pulprivstatus), core::mem::transmute(pulstatus), core::mem::transmute(lpfnwritetostream), core::mem::transmute(lpvwritestream), core::mem::transmute(pulcharcodeset.as_ptr()), pulcharcodeset.len().try_into().unwrap(), core::mem::transmute(uslanguage), core::mem::transmute(pttembedinfo.unwrap_or(core::ptr::null()))) + TTEmbedFontEx(core::mem::transmute(hdc), core::mem::transmute(ulflags), core::mem::transmute(ulcharset), core::mem::transmute(pulprivstatus), core::mem::transmute(pulstatus), core::mem::transmute(lpfnwritetostream), core::mem::transmute(lpvwritestream), core::mem::transmute(pulcharcodeset.as_ptr()), pulcharcodeset.len().try_into().unwrap(), core::mem::transmute(uslanguage), core::mem::transmute(pttembedinfo.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn TTEmbedFontFromFileA(hdc: HDC, 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 where - P0: windows_core::Param, 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(), + core::mem::transmute(hdc), szfontfilename.param().abi(), core::mem::transmute(usttcindex), core::mem::transmute(ulflags), @@ -2986,7 +2072,7 @@ where core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), core::mem::transmute(uslanguage), - core::mem::transmute(pttembedinfo.unwrap_or(core::ptr::null())), + core::mem::transmute(pttembedinfo.unwrap_or(core::mem::zeroed())), ) } #[inline] @@ -3001,15 +2087,12 @@ 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(core::mem::transmute(ulflags), core::mem::transmute(pulprivstatus), core::mem::transmute(ulprivs), core::mem::transmute(pulstatus), core::mem::transmute(lpfnreadfromstream), core::mem::transmute(lpvreadstream), core::mem::transmute(pttloadinfo.unwrap_or(core::ptr::null()))) + TTGetEmbeddedFontInfo(core::mem::transmute(ulflags), core::mem::transmute(pulprivstatus), core::mem::transmute(ulprivs), core::mem::transmute(pulstatus), core::mem::transmute(lpfnreadfromstream), core::mem::transmute(lpvreadstream), core::mem::transmute(pttloadinfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn TTGetEmbeddingType(hdc: P0, pulembedtype: *mut EMBEDDED_FONT_PRIV_STATUS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn TTGetEmbeddingType(hdc: HDC, pulembedtype: *mut EMBEDDED_FONT_PRIV_STATUS) -> i32 { windows_targets::link!("t2embed.dll" "system" fn TTGetEmbeddingType(hdc : HDC, pulembedtype : *mut EMBEDDED_FONT_PRIV_STATUS) -> i32); - TTGetEmbeddingType(hdc.param().abi(), core::mem::transmute(pulembedtype)) + TTGetEmbeddingType(core::mem::transmute(hdc), core::mem::transmute(pulembedtype)) } #[inline] pub unsafe fn TTGetNewFontName(phfontreference: *const super::super::Foundation::HANDLE, wzwinfamilyname: &mut [u16], szmacfamilyname: &mut [u8]) -> i32 { @@ -3017,12 +2100,9 @@ pub unsafe fn TTGetNewFontName(phfontreference: *const super::super::Foundation: TTGetNewFontName(core::mem::transmute(phfontreference), core::mem::transmute(wzwinfamilyname.as_ptr()), wzwinfamilyname.len().try_into().unwrap(), core::mem::transmute(szmacfamilyname.as_ptr()), szmacfamilyname.len().try_into().unwrap()) } #[inline] -pub unsafe fn TTIsEmbeddingEnabled(hdc: P0, pbenabled: *mut super::super::Foundation::BOOL) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn TTIsEmbeddingEnabled(hdc: HDC, pbenabled: *mut super::super::Foundation::BOOL) -> i32 { windows_targets::link!("t2embed.dll" "system" fn TTIsEmbeddingEnabled(hdc : HDC, pbenabled : *mut super::super::Foundation:: BOOL) -> i32); - TTIsEmbeddingEnabled(hdc.param().abi(), core::mem::transmute(pbenabled)) + TTIsEmbeddingEnabled(core::mem::transmute(hdc), core::mem::transmute(pbenabled)) } #[inline] pub unsafe fn TTIsEmbeddingEnabledForFacename(lpszfacename: P0, pbenabled: *mut super::super::Foundation::BOOL) -> i32 @@ -3039,64 +2119,42 @@ where P8: 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(core::mem::transmute(phfontreference), core::mem::transmute(ulflags), core::mem::transmute(pulprivstatus), core::mem::transmute(ulprivs), core::mem::transmute(pulstatus), core::mem::transmute(lpfnreadfromstream), core::mem::transmute(lpvreadstream), szwinfamilyname.param().abi(), szmacfamilyname.param().abi(), core::mem::transmute(pttloadinfo.unwrap_or(core::ptr::null()))) + TTLoadEmbeddedFont(core::mem::transmute(phfontreference), core::mem::transmute(ulflags), core::mem::transmute(pulprivstatus), core::mem::transmute(ulprivs), core::mem::transmute(pulstatus), core::mem::transmute(lpfnreadfromstream), core::mem::transmute(lpvreadstream), szwinfamilyname.param().abi(), szmacfamilyname.param().abi(), core::mem::transmute(pttloadinfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn TTRunValidationTests(hdc: P0, ptestparam: *const TTVALIDATIONTESTSPARAMS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn TTRunValidationTests(hdc: HDC, ptestparam: *const TTVALIDATIONTESTSPARAMS) -> i32 { windows_targets::link!("t2embed.dll" "system" fn TTRunValidationTests(hdc : HDC, ptestparam : *const TTVALIDATIONTESTSPARAMS) -> i32); - TTRunValidationTests(hdc.param().abi(), core::mem::transmute(ptestparam)) + TTRunValidationTests(core::mem::transmute(hdc), core::mem::transmute(ptestparam)) } #[inline] -pub unsafe fn TTRunValidationTestsEx(hdc: P0, ptestparam: *const TTVALIDATIONTESTSPARAMSEX) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn TTRunValidationTestsEx(hdc: HDC, ptestparam: *const TTVALIDATIONTESTSPARAMSEX) -> i32 { windows_targets::link!("t2embed.dll" "system" fn TTRunValidationTestsEx(hdc : HDC, ptestparam : *const TTVALIDATIONTESTSPARAMSEX) -> i32); - TTRunValidationTestsEx(hdc.param().abi(), core::mem::transmute(ptestparam)) + TTRunValidationTestsEx(core::mem::transmute(hdc), core::mem::transmute(ptestparam)) } #[inline] -pub unsafe fn TabbedTextOutA(hdc: P0, x: i32, y: i32, lpstring: &[u8], lpntabstoppositions: Option<&[i32]>, ntaborigin: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn TabbedTextOutA(hdc: HDC, x: i32, y: i32, lpstring: &[u8], lpntabstoppositions: Option<&[i32]>, ntaborigin: i32) -> i32 { windows_targets::link!("user32.dll" "system" fn TabbedTextOutA(hdc : HDC, x : i32, y : i32, lpstring : windows_core::PCSTR, chcount : i32, ntabpositions : i32, lpntabstoppositions : *const i32, ntaborigin : i32) -> i32); - TabbedTextOutA(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpntabstoppositions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ntaborigin)) + TabbedTextOutA(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpntabstoppositions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ntaborigin)) } #[inline] -pub unsafe fn TabbedTextOutW(hdc: P0, x: i32, y: i32, lpstring: &[u16], lpntabstoppositions: Option<&[i32]>, ntaborigin: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn TabbedTextOutW(hdc: HDC, x: i32, y: i32, lpstring: &[u16], lpntabstoppositions: Option<&[i32]>, ntaborigin: i32) -> i32 { windows_targets::link!("user32.dll" "system" fn TabbedTextOutW(hdc : HDC, x : i32, y : i32, lpstring : windows_core::PCWSTR, chcount : i32, ntabpositions : i32, lpntabstoppositions : *const i32, ntaborigin : i32) -> i32); - TabbedTextOutW(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpntabstoppositions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ntaborigin)) + TabbedTextOutW(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpntabstoppositions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ntaborigin)) } #[inline] -pub unsafe fn TextOutA(hdc: P0, x: i32, y: i32, lpstring: &[u8]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn TextOutA(hdc: HDC, x: i32, y: i32, lpstring: &[u8]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn TextOutA(hdc : HDC, x : i32, y : i32, lpstring : windows_core::PCSTR, c : i32) -> super::super::Foundation:: BOOL); - TextOutA(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) + TextOutA(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[inline] -pub unsafe fn TextOutW(hdc: P0, x: i32, y: i32, lpstring: &[u16]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn TextOutW(hdc: HDC, x: i32, y: i32, lpstring: &[u16]) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn TextOutW(hdc : HDC, x : i32, y : i32, lpstring : windows_core::PCWSTR, c : i32) -> super::super::Foundation:: BOOL); - TextOutW(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) + TextOutW(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[inline] -pub unsafe fn TransparentBlt(hdcdest: P0, xorigindest: i32, yorigindest: i32, wdest: i32, hdest: i32, hdcsrc: P5, xoriginsrc: i32, yoriginsrc: i32, wsrc: i32, hsrc: i32, crtransparent: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn TransparentBlt(hdcdest: HDC, xorigindest: i32, yorigindest: i32, wdest: i32, hdest: i32, hdcsrc: HDC, xoriginsrc: i32, yoriginsrc: i32, wsrc: i32, hsrc: i32, crtransparent: u32) -> super::super::Foundation::BOOL { windows_targets::link!("msimg32.dll" "system" fn TransparentBlt(hdcdest : HDC, xorigindest : i32, yorigindest : i32, wdest : i32, hdest : i32, hdcsrc : HDC, xoriginsrc : i32, yoriginsrc : i32, wsrc : i32, hsrc : i32, crtransparent : u32) -> super::super::Foundation:: BOOL); - TransparentBlt(hdcdest.param().abi(), core::mem::transmute(xorigindest), core::mem::transmute(yorigindest), core::mem::transmute(wdest), core::mem::transmute(hdest), hdcsrc.param().abi(), core::mem::transmute(xoriginsrc), core::mem::transmute(yoriginsrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(crtransparent)) + TransparentBlt(core::mem::transmute(hdcdest), core::mem::transmute(xorigindest), core::mem::transmute(yorigindest), core::mem::transmute(wdest), core::mem::transmute(hdest), core::mem::transmute(hdcsrc), core::mem::transmute(xoriginsrc), core::mem::transmute(yoriginsrc), core::mem::transmute(wsrc), core::mem::transmute(hsrc), core::mem::transmute(crtransparent)) } #[inline] pub unsafe fn UnionRect(lprcdst: *mut super::super::Foundation::RECT, lprcsrc1: *const super::super::Foundation::RECT, lprcsrc2: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -3104,61 +2162,39 @@ pub unsafe fn UnionRect(lprcdst: *mut super::super::Foundation::RECT, lprcsrc1: UnionRect(core::mem::transmute(lprcdst), core::mem::transmute(lprcsrc1), core::mem::transmute(lprcsrc2)) } #[inline] -pub unsafe fn UnrealizeObject(h: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UnrealizeObject(h: HGDIOBJ) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn UnrealizeObject(h : HGDIOBJ) -> super::super::Foundation:: BOOL); - UnrealizeObject(h.param().abi()) + UnrealizeObject(core::mem::transmute(h)) } #[inline] -pub unsafe fn UpdateColors(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UpdateColors(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn UpdateColors(hdc : HDC) -> super::super::Foundation:: BOOL); - UpdateColors(hdc.param().abi()) + UpdateColors(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn UpdateWindow(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UpdateWindow(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn UpdateWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - UpdateWindow(hwnd.param().abi()) + UpdateWindow(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn ValidateRect(hwnd: P0, lprect: Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ValidateRect(hwnd: Option, lprect: Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL { 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(core::ptr::null()))) + ValidateRect(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ValidateRgn(hwnd: P0, hrgn: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ValidateRgn(hwnd: super::super::Foundation::HWND, hrgn: Option) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn ValidateRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN) -> super::super::Foundation:: BOOL); - ValidateRgn(hwnd.param().abi(), hrgn.param().abi()) + ValidateRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WidenPath(hdc: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn WidenPath(hdc: HDC) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn WidenPath(hdc : HDC) -> super::super::Foundation:: BOOL); - WidenPath(hdc.param().abi()) + WidenPath(core::mem::transmute(hdc)) } #[inline] -pub unsafe fn WindowFromDC(hdc: P0) -> super::super::Foundation::HWND -where - P0: windows_core::Param, -{ +pub unsafe fn WindowFromDC(hdc: HDC) -> super::super::Foundation::HWND { windows_targets::link!("user32.dll" "system" fn WindowFromDC(hdc : HDC) -> super::super::Foundation:: HWND); - WindowFromDC(hdc.param().abi()) + WindowFromDC(core::mem::transmute(hdc)) } #[inline] pub unsafe fn wglSwapMultipleBuffers(param0: u32, param1: *const WGLSWAP) -> u32 { 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 3353dacf65..77eee04af6 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs @@ -426,36 +426,28 @@ pub unsafe fn GdipCreateBitmapFromGraphics(width: i32, height: i32, target: *mut } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateBitmapFromHBITMAP(hbm: P0, hpal: P1, bitmap: *mut *mut GpBitmap) -> Status -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GdipCreateBitmapFromHBITMAP(hbm: super::Gdi::HBITMAP, hpal: super::Gdi::HPALETTE, bitmap: *mut *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromHBITMAP(hbm : super::Gdi:: HBITMAP, hpal : super::Gdi:: HPALETTE, bitmap : *mut *mut GpBitmap) -> Status); - GdipCreateBitmapFromHBITMAP(hbm.param().abi(), hpal.param().abi(), core::mem::transmute(bitmap)) + GdipCreateBitmapFromHBITMAP(core::mem::transmute(hbm), core::mem::transmute(hpal), core::mem::transmute(bitmap)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn GdipCreateBitmapFromHICON(hicon: P0, bitmap: *mut *mut GpBitmap) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipCreateBitmapFromHICON(hicon: super::super::UI::WindowsAndMessaging::HICON, bitmap: *mut *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromHICON(hicon : super::super::UI::WindowsAndMessaging:: HICON, bitmap : *mut *mut GpBitmap) -> Status); - GdipCreateBitmapFromHICON(hicon.param().abi(), core::mem::transmute(bitmap)) + GdipCreateBitmapFromHICON(core::mem::transmute(hicon), core::mem::transmute(bitmap)) } #[inline] -pub unsafe fn GdipCreateBitmapFromResource(hinstance: P0, lpbitmapname: P1, bitmap: *mut *mut GpBitmap) -> Status +pub unsafe fn GdipCreateBitmapFromResource(hinstance: super::super::Foundation::HINSTANCE, lpbitmapname: P1, bitmap: *mut *mut GpBitmap) -> Status where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromResource(hinstance : super::super::Foundation:: HINSTANCE, lpbitmapname : windows_core::PCWSTR, bitmap : *mut *mut GpBitmap) -> Status); - GdipCreateBitmapFromResource(hinstance.param().abi(), lpbitmapname.param().abi(), core::mem::transmute(bitmap)) + GdipCreateBitmapFromResource(core::mem::transmute(hinstance), lpbitmapname.param().abi(), core::mem::transmute(bitmap)) } #[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(core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(stride), core::mem::transmute(format), core::mem::transmute(scan0.unwrap_or(core::ptr::null())), core::mem::transmute(bitmap)) + GdipCreateBitmapFromScan0(core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(stride), core::mem::transmute(format), core::mem::transmute(scan0.unwrap_or(core::mem::zeroed())), core::mem::transmute(bitmap)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -505,65 +497,43 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateFontFromDC(hdc: P0, font: *mut *mut GpFont) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipCreateFontFromDC(hdc: super::Gdi::HDC, font: *mut *mut GpFont) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFontFromDC(hdc : super::Gdi:: HDC, font : *mut *mut GpFont) -> Status); - GdipCreateFontFromDC(hdc.param().abi(), core::mem::transmute(font)) + GdipCreateFontFromDC(core::mem::transmute(hdc), core::mem::transmute(font)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateFontFromLogfontA(hdc: P0, logfont: *const super::Gdi::LOGFONTA, font: *mut *mut GpFont) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipCreateFontFromLogfontA(hdc: super::Gdi::HDC, logfont: *const super::Gdi::LOGFONTA, font: *mut *mut GpFont) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFontFromLogfontA(hdc : super::Gdi:: HDC, logfont : *const super::Gdi:: LOGFONTA, font : *mut *mut GpFont) -> Status); - GdipCreateFontFromLogfontA(hdc.param().abi(), core::mem::transmute(logfont), core::mem::transmute(font)) + GdipCreateFontFromLogfontA(core::mem::transmute(hdc), core::mem::transmute(logfont), core::mem::transmute(font)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateFontFromLogfontW(hdc: P0, logfont: *const super::Gdi::LOGFONTW, font: *mut *mut GpFont) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipCreateFontFromLogfontW(hdc: super::Gdi::HDC, logfont: *const super::Gdi::LOGFONTW, font: *mut *mut GpFont) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFontFromLogfontW(hdc : super::Gdi:: HDC, logfont : *const super::Gdi:: LOGFONTW, font : *mut *mut GpFont) -> Status); - GdipCreateFontFromLogfontW(hdc.param().abi(), core::mem::transmute(logfont), core::mem::transmute(font)) + GdipCreateFontFromLogfontW(core::mem::transmute(hdc), core::mem::transmute(logfont), core::mem::transmute(font)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateFromHDC(hdc: P0, graphics: *mut *mut GpGraphics) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipCreateFromHDC(hdc: super::Gdi::HDC, graphics: *mut *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFromHDC(hdc : super::Gdi:: HDC, graphics : *mut *mut GpGraphics) -> Status); - GdipCreateFromHDC(hdc.param().abi(), core::mem::transmute(graphics)) + GdipCreateFromHDC(core::mem::transmute(hdc), core::mem::transmute(graphics)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateFromHDC2(hdc: P0, hdevice: P1, graphics: *mut *mut GpGraphics) -> Status -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GdipCreateFromHDC2(hdc: super::Gdi::HDC, hdevice: super::super::Foundation::HANDLE, graphics: *mut *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFromHDC2(hdc : super::Gdi:: HDC, hdevice : super::super::Foundation:: HANDLE, graphics : *mut *mut GpGraphics) -> Status); - GdipCreateFromHDC2(hdc.param().abi(), hdevice.param().abi(), core::mem::transmute(graphics)) + GdipCreateFromHDC2(core::mem::transmute(hdc), core::mem::transmute(hdevice), core::mem::transmute(graphics)) } #[inline] -pub unsafe fn GdipCreateFromHWND(hwnd: P0, graphics: *mut *mut GpGraphics) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipCreateFromHWND(hwnd: super::super::Foundation::HWND, graphics: *mut *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFromHWND(hwnd : super::super::Foundation:: HWND, graphics : *mut *mut GpGraphics) -> Status); - GdipCreateFromHWND(hwnd.param().abi(), core::mem::transmute(graphics)) + GdipCreateFromHWND(core::mem::transmute(hwnd), core::mem::transmute(graphics)) } #[inline] -pub unsafe fn GdipCreateFromHWNDICM(hwnd: P0, graphics: *mut *mut GpGraphics) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipCreateFromHWNDICM(hwnd: super::super::Foundation::HWND, graphics: *mut *mut GpGraphics) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateFromHWNDICM(hwnd : super::super::Foundation:: HWND, graphics : *mut *mut GpGraphics) -> Status); - GdipCreateFromHWNDICM(hwnd.param().abi(), core::mem::transmute(graphics)) + GdipCreateFromHWNDICM(core::mem::transmute(hwnd), core::mem::transmute(graphics)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -651,13 +621,12 @@ pub unsafe fn GdipCreateMatrix3I(rect: *const Rect, dstplg: *const Point, matrix } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateMetafileFromEmf(hemf: P0, deleteemf: P1, metafile: *mut *mut GpMetafile) -> Status +pub unsafe fn GdipCreateMetafileFromEmf(hemf: super::Gdi::HENHMETAFILE, deleteemf: P1, metafile: *mut *mut GpMetafile) -> Status where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMetafileFromEmf(hemf : super::Gdi:: HENHMETAFILE, deleteemf : super::super::Foundation:: BOOL, metafile : *mut *mut GpMetafile) -> Status); - GdipCreateMetafileFromEmf(hemf.param().abi(), deleteemf.param().abi(), core::mem::transmute(metafile)) + GdipCreateMetafileFromEmf(core::mem::transmute(hemf), deleteemf.param().abi(), core::mem::transmute(metafile)) } #[inline] pub unsafe fn GdipCreateMetafileFromFile(file: P0, metafile: *mut *mut GpMetafile) -> Status @@ -678,13 +647,12 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateMetafileFromWmf(hwmf: P0, deletewmf: P1, wmfplaceablefileheader: *const WmfPlaceableFileHeader, metafile: *mut *mut GpMetafile) -> Status +pub unsafe fn GdipCreateMetafileFromWmf(hwmf: super::Gdi::HMETAFILE, deletewmf: P1, wmfplaceablefileheader: *const WmfPlaceableFileHeader, metafile: *mut *mut GpMetafile) -> Status where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMetafileFromWmf(hwmf : super::Gdi:: HMETAFILE, deletewmf : super::super::Foundation:: BOOL, wmfplaceablefileheader : *const WmfPlaceableFileHeader, metafile : *mut *mut GpMetafile) -> Status); - GdipCreateMetafileFromWmf(hwmf.param().abi(), deletewmf.param().abi(), core::mem::transmute(wmfplaceablefileheader), core::mem::transmute(metafile)) + GdipCreateMetafileFromWmf(core::mem::transmute(hwmf), deletewmf.param().abi(), core::mem::transmute(wmfplaceablefileheader), core::mem::transmute(metafile)) } #[inline] pub unsafe fn GdipCreateMetafileFromWmfFile(file: P0, wmfplaceablefileheader: *const WmfPlaceableFileHeader, metafile: *mut *mut GpMetafile) -> Status @@ -746,12 +714,9 @@ pub unsafe fn GdipCreateRegion(region: *mut *mut GpRegion) -> Status { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateRegionHrgn(hrgn: P0, region: *mut *mut GpRegion) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipCreateRegionHrgn(hrgn: super::Gdi::HRGN, region: *mut *mut GpRegion) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateRegionHrgn(hrgn : super::Gdi:: HRGN, region : *mut *mut GpRegion) -> Status); - GdipCreateRegionHrgn(hrgn.param().abi(), core::mem::transmute(region)) + GdipCreateRegionHrgn(core::mem::transmute(hrgn), core::mem::transmute(region)) } #[inline] pub unsafe fn GdipCreateRegionPath(path: *mut GpPath, region: *mut *mut GpRegion) -> Status { @@ -1137,12 +1102,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipEmfToWmfBits(hemf: P0, pdata16: Option<&mut [u8]>, imapmode: i32, eflags: i32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GdipEmfToWmfBits(hemf: super::Gdi::HENHMETAFILE, pdata16: Option<&mut [u8]>, imapmode: i32, eflags: i32) -> u32 { windows_targets::link!("gdiplus.dll" "system" fn GdipEmfToWmfBits(hemf : super::Gdi:: HENHMETAFILE, cbdata16 : u32, pdata16 : *mut u8, imapmode : i32, eflags : i32) -> u32); - GdipEmfToWmfBits(hemf.param().abi(), pdata16.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pdata16.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(imapmode), core::mem::transmute(eflags)) + GdipEmfToWmfBits(core::mem::transmute(hemf), pdata16.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pdata16.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(imapmode), core::mem::transmute(eflags)) } #[inline] pub unsafe fn GdipEndContainer(graphics: *mut GpGraphics, state: u32) -> Status { @@ -1725,12 +1687,9 @@ pub unsafe fn GdipGetMetafileDownLevelRasterizationLimit(metafile: *const GpMeta } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipGetMetafileHeaderFromEmf(hemf: P0, header: *mut MetafileHeader) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipGetMetafileHeaderFromEmf(hemf: super::Gdi::HENHMETAFILE, header: *mut MetafileHeader) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetMetafileHeaderFromEmf(hemf : super::Gdi:: HENHMETAFILE, header : *mut MetafileHeader) -> Status); - GdipGetMetafileHeaderFromEmf(hemf.param().abi(), core::mem::transmute(header)) + GdipGetMetafileHeaderFromEmf(core::mem::transmute(hemf), core::mem::transmute(header)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1758,12 +1717,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipGetMetafileHeaderFromWmf(hwmf: P0, wmfplaceablefileheader: *const WmfPlaceableFileHeader, header: *mut MetafileHeader) -> Status -where - P0: windows_core::Param, -{ +pub unsafe fn GdipGetMetafileHeaderFromWmf(hwmf: super::Gdi::HMETAFILE, wmfplaceablefileheader: *const WmfPlaceableFileHeader, header: *mut MetafileHeader) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetMetafileHeaderFromWmf(hwmf : super::Gdi:: HMETAFILE, wmfplaceablefileheader : *const WmfPlaceableFileHeader, header : *mut MetafileHeader) -> Status); - GdipGetMetafileHeaderFromWmf(hwmf.param().abi(), core::mem::transmute(wmfplaceablefileheader), core::mem::transmute(header)) + GdipGetMetafileHeaderFromWmf(core::mem::transmute(hwmf), core::mem::transmute(wmfplaceablefileheader), core::mem::transmute(header)) } #[inline] pub unsafe fn GdipGetNearestColor(graphics: *mut GpGraphics, argb: *mut u32) -> Status { @@ -2053,7 +2009,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(core::mem::transmute(region), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(sizefilled.unwrap_or(core::ptr::null_mut()))) + GdipGetRegionData(core::mem::transmute(region), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(sizefilled.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GdipGetRegionDataSize(region: *mut GpRegion, buffersize: *mut u32) -> Status { @@ -2525,76 +2481,67 @@ pub unsafe fn GdipPrivateAddMemoryFont(fontcollection: *mut GpFontCollection, me } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipRecordMetafile(referencehdc: P0, r#type: EmfType, framerect: *const RectF, frameunit: MetafileFrameUnit, description: P4, metafile: *mut *mut GpMetafile) -> Status +pub unsafe fn GdipRecordMetafile(referencehdc: super::Gdi::HDC, r#type: EmfType, framerect: *const RectF, frameunit: MetafileFrameUnit, description: P4, metafile: *mut *mut GpMetafile) -> Status where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipRecordMetafile(referencehdc : super::Gdi:: HDC, r#type : EmfType, framerect : *const RectF, frameunit : MetafileFrameUnit, description : windows_core::PCWSTR, metafile : *mut *mut GpMetafile) -> Status); - GdipRecordMetafile(referencehdc.param().abi(), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) + GdipRecordMetafile(core::mem::transmute(referencehdc), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipRecordMetafileFileName(filename: P0, referencehdc: P1, r#type: EmfType, framerect: *const RectF, frameunit: MetafileFrameUnit, description: P5, metafile: *mut *mut GpMetafile) -> Status +pub unsafe fn GdipRecordMetafileFileName(filename: P0, referencehdc: super::Gdi::HDC, r#type: EmfType, framerect: *const RectF, frameunit: MetafileFrameUnit, description: P5, metafile: *mut *mut GpMetafile) -> Status where P0: windows_core::Param, - P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipRecordMetafileFileName(filename : windows_core::PCWSTR, referencehdc : super::Gdi:: HDC, r#type : EmfType, framerect : *const RectF, frameunit : MetafileFrameUnit, description : windows_core::PCWSTR, metafile : *mut *mut GpMetafile) -> Status); - GdipRecordMetafileFileName(filename.param().abi(), referencehdc.param().abi(), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) + GdipRecordMetafileFileName(filename.param().abi(), core::mem::transmute(referencehdc), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipRecordMetafileFileNameI(filename: P0, referencehdc: P1, r#type: EmfType, framerect: *const Rect, frameunit: MetafileFrameUnit, description: P5, metafile: *mut *mut GpMetafile) -> Status +pub unsafe fn GdipRecordMetafileFileNameI(filename: P0, referencehdc: super::Gdi::HDC, r#type: EmfType, framerect: *const Rect, frameunit: MetafileFrameUnit, description: P5, metafile: *mut *mut GpMetafile) -> Status where P0: windows_core::Param, - P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipRecordMetafileFileNameI(filename : windows_core::PCWSTR, referencehdc : super::Gdi:: HDC, r#type : EmfType, framerect : *const Rect, frameunit : MetafileFrameUnit, description : windows_core::PCWSTR, metafile : *mut *mut GpMetafile) -> Status); - GdipRecordMetafileFileNameI(filename.param().abi(), referencehdc.param().abi(), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) + GdipRecordMetafileFileNameI(filename.param().abi(), core::mem::transmute(referencehdc), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipRecordMetafileI(referencehdc: P0, r#type: EmfType, framerect: *const Rect, frameunit: MetafileFrameUnit, description: P4, metafile: *mut *mut GpMetafile) -> Status +pub unsafe fn GdipRecordMetafileI(referencehdc: super::Gdi::HDC, r#type: EmfType, framerect: *const Rect, frameunit: MetafileFrameUnit, description: P4, metafile: *mut *mut GpMetafile) -> Status where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipRecordMetafileI(referencehdc : super::Gdi:: HDC, r#type : EmfType, framerect : *const Rect, frameunit : MetafileFrameUnit, description : windows_core::PCWSTR, metafile : *mut *mut GpMetafile) -> Status); - GdipRecordMetafileI(referencehdc.param().abi(), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) + GdipRecordMetafileI(core::mem::transmute(referencehdc), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] #[inline] -pub unsafe fn GdipRecordMetafileStream(stream: P0, referencehdc: P1, r#type: EmfType, framerect: *const RectF, frameunit: MetafileFrameUnit, description: P5, metafile: *mut *mut GpMetafile) -> Status +pub unsafe fn GdipRecordMetafileStream(stream: P0, referencehdc: super::Gdi::HDC, r#type: EmfType, framerect: *const RectF, frameunit: MetafileFrameUnit, description: P5, metafile: *mut *mut GpMetafile) -> Status where P0: windows_core::Param, - P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipRecordMetafileStream(stream : * mut core::ffi::c_void, referencehdc : super::Gdi:: HDC, r#type : EmfType, framerect : *const RectF, frameunit : MetafileFrameUnit, description : windows_core::PCWSTR, metafile : *mut *mut GpMetafile) -> Status); - GdipRecordMetafileStream(stream.param().abi(), referencehdc.param().abi(), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) + GdipRecordMetafileStream(stream.param().abi(), core::mem::transmute(referencehdc), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] #[inline] -pub unsafe fn GdipRecordMetafileStreamI(stream: P0, referencehdc: P1, r#type: EmfType, framerect: *const Rect, frameunit: MetafileFrameUnit, description: P5, metafile: *mut *mut GpMetafile) -> Status +pub unsafe fn GdipRecordMetafileStreamI(stream: P0, referencehdc: super::Gdi::HDC, r#type: EmfType, framerect: *const Rect, frameunit: MetafileFrameUnit, description: P5, metafile: *mut *mut GpMetafile) -> Status where P0: windows_core::Param, - P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipRecordMetafileStreamI(stream : * mut core::ffi::c_void, referencehdc : super::Gdi:: HDC, r#type : EmfType, framerect : *const Rect, frameunit : MetafileFrameUnit, description : windows_core::PCWSTR, metafile : *mut *mut GpMetafile) -> Status); - GdipRecordMetafileStreamI(stream.param().abi(), referencehdc.param().abi(), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) + GdipRecordMetafileStreamI(stream.param().abi(), core::mem::transmute(referencehdc), core::mem::transmute(r#type), core::mem::transmute(framerect), core::mem::transmute(frameunit), description.param().abi(), core::mem::transmute(metafile)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipReleaseDC(graphics: *mut GpGraphics, hdc: P1) -> Status -where - P1: windows_core::Param, -{ +pub unsafe fn GdipReleaseDC(graphics: *mut GpGraphics, hdc: super::Gdi::HDC) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipReleaseDC(graphics : *mut GpGraphics, hdc : super::Gdi:: HDC) -> Status); - GdipReleaseDC(core::mem::transmute(graphics), hdc.param().abi()) + GdipReleaseDC(core::mem::transmute(graphics), core::mem::transmute(hdc)) } #[inline] pub unsafe fn GdipRemovePropertyItem(image: *mut GpImage, propid: u32) -> Status { @@ -2778,12 +2725,9 @@ pub unsafe fn GdipSetClipGraphics(graphics: *mut GpGraphics, srcgraphics: *mut G } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipSetClipHrgn(graphics: *mut GpGraphics, hrgn: P1, combinemode: CombineMode) -> Status -where - P1: windows_core::Param, -{ +pub unsafe fn GdipSetClipHrgn(graphics: *mut GpGraphics, hrgn: super::Gdi::HRGN, combinemode: CombineMode) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetClipHrgn(graphics : *mut GpGraphics, hrgn : super::Gdi:: HRGN, combinemode : CombineMode) -> Status); - GdipSetClipHrgn(core::mem::transmute(graphics), hrgn.param().abi(), core::mem::transmute(combinemode)) + GdipSetClipHrgn(core::mem::transmute(graphics), core::mem::transmute(hrgn), core::mem::transmute(combinemode)) } #[inline] pub unsafe fn GdipSetClipPath(graphics: *mut GpGraphics, path: *mut GpPath, combinemode: CombineMode) -> 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 cf2ebb3f32..0f0473a53f 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs @@ -10,22 +10,16 @@ where WICConvertBitmapSource(core::mem::transmute(dstformat), pisrc.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn WICCreateBitmapFromSection(width: u32, height: u32, pixelformat: *const windows_core::GUID, hsection: P3, stride: u32, offset: u32) -> windows_core::Result -where - P3: windows_core::Param, -{ +pub unsafe fn WICCreateBitmapFromSection(width: u32, height: u32, pixelformat: *const windows_core::GUID, hsection: super::super::Foundation::HANDLE, stride: u32, offset: u32) -> windows_core::Result { windows_targets::link!("windowscodecs.dll" "system" fn WICCreateBitmapFromSection(width : u32, height : u32, pixelformat : *const windows_core::GUID, hsection : super::super::Foundation:: HANDLE, stride : u32, offset : u32, ppibitmap : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WICCreateBitmapFromSection(core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(pixelformat), hsection.param().abi(), core::mem::transmute(stride), core::mem::transmute(offset), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + WICCreateBitmapFromSection(core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(pixelformat), core::mem::transmute(hsection), core::mem::transmute(stride), core::mem::transmute(offset), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn WICCreateBitmapFromSectionEx(width: u32, height: u32, pixelformat: *const windows_core::GUID, hsection: P3, stride: u32, offset: u32, desiredaccesslevel: WICSectionAccessLevel) -> windows_core::Result -where - P3: windows_core::Param, -{ +pub unsafe fn WICCreateBitmapFromSectionEx(width: u32, height: u32, pixelformat: *const windows_core::GUID, hsection: super::super::Foundation::HANDLE, stride: u32, offset: u32, desiredaccesslevel: WICSectionAccessLevel) -> windows_core::Result { windows_targets::link!("windowscodecs.dll" "system" fn WICCreateBitmapFromSectionEx(width : u32, height : u32, pixelformat : *const windows_core::GUID, hsection : super::super::Foundation:: HANDLE, stride : u32, offset : u32, desiredaccesslevel : WICSectionAccessLevel, ppibitmap : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WICCreateBitmapFromSectionEx(core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(pixelformat), hsection.param().abi(), core::mem::transmute(stride), core::mem::transmute(offset), core::mem::transmute(desiredaccesslevel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + WICCreateBitmapFromSectionEx(core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(pixelformat), core::mem::transmute(hsection), core::mem::transmute(stride), core::mem::transmute(offset), core::mem::transmute(desiredaccesslevel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn WICGetMetadataContentSize(guidcontainerformat: *const windows_core::GUID, piwriter: P1) -> windows_core::Result @@ -66,7 +60,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(core::mem::transmute(guidcontainerformat), core::mem::transmute(pguidvendor.unwrap_or(core::ptr::null())), pistream.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WICMatchMetadataContent(core::mem::transmute(guidcontainerformat), core::mem::transmute(pguidvendor.unwrap_or(core::mem::zeroed())), pistream.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -643,8 +637,8 @@ impl windows_core::RuntimeName for IWICBitmapCodecInfo {} windows_core::imp::define_interface!(IWICBitmapCodecProgressNotification, IWICBitmapCodecProgressNotification_Vtbl, 0x64c1024e_c3cf_4462_8078_88c2b11c46d9); 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), core::mem::transmute(pfnprogressnotification), core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), core::mem::transmute(dwprogressflags)).ok() + pub unsafe fn RegisterProgressNotification(&self, pfnprogressnotification: Option, pvdata: Option<*const core::ffi::c_void>, dwprogressflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterProgressNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(pfnprogressnotification.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwprogressflags)).ok() } } #[repr(C)] @@ -885,7 +879,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), core::mem::transmute(cbsizepatterns), core::mem::transmute(ppatterns.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcpatterns.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbpatternsactual)).ok() + (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), core::mem::transmute(cbsizepatterns), core::mem::transmute(ppatterns.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpatterns.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbpatternsactual)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn MatchesPattern(&self, pistream: P0) -> windows_core::Result @@ -2414,7 +2408,7 @@ impl IWICDevelopRaw { (windows_core::Interface::vtable(self).SetToneCurve)(windows_core::Interface::as_raw(self), core::mem::transmute(cbtonecurvesize), core::mem::transmute(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), core::mem::transmute(cbtonecurvebuffersize), core::mem::transmute(ptonecurve.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbactualtonecurvebuffersize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetToneCurve)(windows_core::Interface::as_raw(self), core::mem::transmute(cbtonecurvebuffersize), core::mem::transmute(ptonecurve.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbactualtonecurvebuffersize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetRotation(&self, rotation: f64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), core::mem::transmute(rotation)).ok() @@ -3023,7 +3017,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(core::ptr::null())), core::mem::transmute(dwdesiredaccess), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(dwdesiredaccess), core::mem::transmute(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 @@ -3105,21 +3099,14 @@ impl IWICImagingFactory { (windows_core::Interface::vtable(self).CreateBitmapFromMemory)(windows_core::Interface::as_raw(self), core::mem::transmute(uiwidth), core::mem::transmute(uiheight), core::mem::transmute(pixelformat), core::mem::transmute(cbstride), pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr()), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn CreateBitmapFromHBITMAP(&self, hbitmap: P0, hpalette: P1, options: WICBitmapAlphaChannelOption) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn CreateBitmapFromHBITMAP(&self, hbitmap: super::Gdi::HBITMAP, hpalette: super::Gdi::HPALETTE, options: WICBitmapAlphaChannelOption) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapFromHBITMAP)(windows_core::Interface::as_raw(self), hbitmap.param().abi(), hpalette.param().abi(), core::mem::transmute(options), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapFromHBITMAP)(windows_core::Interface::as_raw(self), core::mem::transmute(hbitmap), core::mem::transmute(hpalette), core::mem::transmute(options), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn CreateBitmapFromHICON(&self, hicon: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateBitmapFromHICON(&self, hicon: super::super::UI::WindowsAndMessaging::HICON) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapFromHICON)(windows_core::Interface::as_raw(self), hicon.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapFromHICON)(windows_core::Interface::as_raw(self), core::mem::transmute(hicon), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateComponentEnumerator(&self, componenttypes: u32, options: u32) -> windows_core::Result { @@ -4327,7 +4314,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), core::mem::transmute(guidcontainerformat), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), core::mem::transmute(guidcontainerformat), core::mem::transmute(cbsize), core::mem::transmute(ppattern.unwrap_or(core::mem::zeroed())), core::mem::transmute(pccount.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn MatchesPattern(&self, guidcontainerformat: *const windows_core::GUID, pistream: P1) -> windows_core::Result @@ -4490,7 +4477,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), core::mem::transmute(guidcontainerformat), core::mem::transmute(cbsize), core::mem::transmute(pheader.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetHeader)(windows_core::Interface::as_raw(self), core::mem::transmute(guidcontainerformat), core::mem::transmute(cbsize), core::mem::transmute(pheader.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))).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 4b0c7f0c16..ac7885bdb9 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs @@ -1,56 +1,38 @@ #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ChoosePixelFormat(hdc: P0, ppfd: *const PIXELFORMATDESCRIPTOR) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ChoosePixelFormat(hdc: super::Gdi::HDC, ppfd: *const PIXELFORMATDESCRIPTOR) -> i32 { windows_targets::link!("gdi32.dll" "system" fn ChoosePixelFormat(hdc : super::Gdi:: HDC, ppfd : *const PIXELFORMATDESCRIPTOR) -> i32); - ChoosePixelFormat(hdc.param().abi(), core::mem::transmute(ppfd)) + ChoosePixelFormat(core::mem::transmute(hdc), core::mem::transmute(ppfd)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DescribePixelFormat(hdc: P0, ipixelformat: i32, nbytes: u32, ppfd: Option<*mut PIXELFORMATDESCRIPTOR>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DescribePixelFormat(hdc: super::Gdi::HDC, ipixelformat: i32, nbytes: u32, ppfd: Option<*mut PIXELFORMATDESCRIPTOR>) -> i32 { windows_targets::link!("gdi32.dll" "system" fn DescribePixelFormat(hdc : super::Gdi:: HDC, ipixelformat : i32, nbytes : u32, ppfd : *mut PIXELFORMATDESCRIPTOR) -> i32); - DescribePixelFormat(hdc.param().abi(), core::mem::transmute(ipixelformat), core::mem::transmute(nbytes), core::mem::transmute(ppfd.unwrap_or(core::ptr::null_mut()))) + DescribePixelFormat(core::mem::transmute(hdc), core::mem::transmute(ipixelformat), core::mem::transmute(nbytes), core::mem::transmute(ppfd.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetEnhMetaFilePixelFormat(hemf: P0, cbbuffer: u32, ppfd: Option<*mut PIXELFORMATDESCRIPTOR>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetEnhMetaFilePixelFormat(hemf: super::Gdi::HENHMETAFILE, cbbuffer: u32, ppfd: Option<*mut PIXELFORMATDESCRIPTOR>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFilePixelFormat(hemf : super::Gdi:: HENHMETAFILE, cbbuffer : u32, ppfd : *mut PIXELFORMATDESCRIPTOR) -> u32); - GetEnhMetaFilePixelFormat(hemf.param().abi(), core::mem::transmute(cbbuffer), core::mem::transmute(ppfd.unwrap_or(core::ptr::null_mut()))) + GetEnhMetaFilePixelFormat(core::mem::transmute(hemf), core::mem::transmute(cbbuffer), core::mem::transmute(ppfd.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetPixelFormat(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetPixelFormat(hdc: super::Gdi::HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn GetPixelFormat(hdc : super::Gdi:: HDC) -> i32); - GetPixelFormat(hdc.param().abi()) + GetPixelFormat(core::mem::transmute(hdc)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetPixelFormat(hdc: P0, format: i32, ppfd: *const PIXELFORMATDESCRIPTOR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetPixelFormat(hdc: super::Gdi::HDC, format: i32, ppfd: *const PIXELFORMATDESCRIPTOR) -> windows_core::Result<()> { windows_targets::link!("gdi32.dll" "system" fn SetPixelFormat(hdc : super::Gdi:: HDC, format : i32, ppfd : *const PIXELFORMATDESCRIPTOR) -> super::super::Foundation:: BOOL); - SetPixelFormat(hdc.param().abi(), core::mem::transmute(format), core::mem::transmute(ppfd)).ok() + SetPixelFormat(core::mem::transmute(hdc), core::mem::transmute(format), core::mem::transmute(ppfd)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SwapBuffers(param0: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SwapBuffers(param0: super::Gdi::HDC) -> windows_core::Result<()> { windows_targets::link!("gdi32.dll" "system" fn SwapBuffers(param0 : super::Gdi:: HDC) -> super::super::Foundation:: BOOL); - SwapBuffers(param0.param().abi()).ok() + SwapBuffers(core::mem::transmute(param0)).ok() } #[inline] pub unsafe fn glAccum(op: u32, value: f32) { @@ -1993,50 +1975,34 @@ pub unsafe fn gluUnProject(winx: f64, winy: f64, winz: f64, modelmatrix: *const gluUnProject(core::mem::transmute(winx), core::mem::transmute(winy), core::mem::transmute(winz), core::mem::transmute(modelmatrix), core::mem::transmute(projmatrix), core::mem::transmute(viewport), core::mem::transmute(objx), core::mem::transmute(objy), core::mem::transmute(objz)) } #[inline] -pub unsafe fn wglCopyContext(param0: P0, param1: P1, param2: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn wglCopyContext(param0: HGLRC, param1: HGLRC, param2: u32) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglCopyContext(param0 : HGLRC, param1 : HGLRC, param2 : u32) -> super::super::Foundation:: BOOL); - wglCopyContext(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2)).ok() + wglCopyContext(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglCreateContext(param0: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn wglCreateContext(param0: super::Gdi::HDC) -> windows_core::Result { windows_targets::link!("opengl32.dll" "system" fn wglCreateContext(param0 : super::Gdi:: HDC) -> HGLRC); - let result__ = wglCreateContext(param0.param().abi()); + let result__ = wglCreateContext(core::mem::transmute(param0)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglCreateLayerContext(param0: P0, param1: i32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn wglCreateLayerContext(param0: super::Gdi::HDC, param1: i32) -> windows_core::Result { windows_targets::link!("opengl32.dll" "system" fn wglCreateLayerContext(param0 : super::Gdi:: HDC, param1 : i32) -> HGLRC); - let result__ = wglCreateLayerContext(param0.param().abi(), core::mem::transmute(param1)); + let result__ = wglCreateLayerContext(core::mem::transmute(param0), core::mem::transmute(param1)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn wglDeleteContext(param0: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn wglDeleteContext(param0: HGLRC) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglDeleteContext(param0 : HGLRC) -> super::super::Foundation:: BOOL); - wglDeleteContext(param0.param().abi()).ok() + wglDeleteContext(core::mem::transmute(param0)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglDescribeLayerPlane(param0: P0, param1: i32, param2: i32, param3: u32, param4: *mut LAYERPLANEDESCRIPTOR) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn wglDescribeLayerPlane(param0: super::Gdi::HDC, param1: i32, param2: i32, param3: u32, param4: *mut LAYERPLANEDESCRIPTOR) -> super::super::Foundation::BOOL { windows_targets::link!("opengl32.dll" "system" fn wglDescribeLayerPlane(param0 : super::Gdi:: HDC, param1 : i32, param2 : i32, param3 : u32, param4 : *mut LAYERPLANEDESCRIPTOR) -> super::super::Foundation:: BOOL); - wglDescribeLayerPlane(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)) + wglDescribeLayerPlane(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] pub unsafe fn wglGetCurrentContext() -> HGLRC { @@ -2051,12 +2017,9 @@ pub unsafe fn wglGetCurrentDC() -> super::Gdi::HDC { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglGetLayerPaletteEntries(param0: P0, param1: i32, param2: i32, param3: i32, param4: *mut super::super::Foundation::COLORREF) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn wglGetLayerPaletteEntries(param0: super::Gdi::HDC, param1: i32, param2: i32, param3: i32, param4: *mut super::super::Foundation::COLORREF) -> i32 { windows_targets::link!("opengl32.dll" "system" fn wglGetLayerPaletteEntries(param0 : super::Gdi:: HDC, param1 : i32, param2 : i32, param3 : i32, param4 : *mut super::super::Foundation:: COLORREF) -> i32); - wglGetLayerPaletteEntries(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)) + wglGetLayerPaletteEntries(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] pub unsafe fn wglGetProcAddress(param0: P0) -> super::super::Foundation::PROC @@ -2068,86 +2031,59 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglMakeCurrent(param0: P0, param1: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn wglMakeCurrent(param0: super::Gdi::HDC, param1: HGLRC) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglMakeCurrent(param0 : super::Gdi:: HDC, param1 : HGLRC) -> super::super::Foundation:: BOOL); - wglMakeCurrent(param0.param().abi(), param1.param().abi()).ok() + wglMakeCurrent(core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglRealizeLayerPalette(param0: P0, param1: i32, param2: P2) -> windows_core::Result<()> +pub unsafe fn wglRealizeLayerPalette(param0: super::Gdi::HDC, param1: i32, param2: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("opengl32.dll" "system" fn wglRealizeLayerPalette(param0 : super::Gdi:: HDC, param1 : i32, param2 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - wglRealizeLayerPalette(param0.param().abi(), core::mem::transmute(param1), param2.param().abi()).ok() + wglRealizeLayerPalette(core::mem::transmute(param0), core::mem::transmute(param1), param2.param().abi()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglSetLayerPaletteEntries(param0: P0, param1: i32, param2: i32, param3: i32, param4: *const super::super::Foundation::COLORREF) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn wglSetLayerPaletteEntries(param0: super::Gdi::HDC, param1: i32, param2: i32, param3: i32, param4: *const super::super::Foundation::COLORREF) -> i32 { windows_targets::link!("opengl32.dll" "system" fn wglSetLayerPaletteEntries(param0 : super::Gdi:: HDC, param1 : i32, param2 : i32, param3 : i32, param4 : *const super::super::Foundation:: COLORREF) -> i32); - wglSetLayerPaletteEntries(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)) + wglSetLayerPaletteEntries(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] -pub unsafe fn wglShareLists(param0: P0, param1: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn wglShareLists(param0: HGLRC, param1: HGLRC) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglShareLists(param0 : HGLRC, param1 : HGLRC) -> super::super::Foundation:: BOOL); - wglShareLists(param0.param().abi(), param1.param().abi()).ok() + wglShareLists(core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglSwapLayerBuffers(param0: P0, param1: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn wglSwapLayerBuffers(param0: super::Gdi::HDC, param1: u32) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglSwapLayerBuffers(param0 : super::Gdi:: HDC, param1 : u32) -> super::super::Foundation:: BOOL); - wglSwapLayerBuffers(param0.param().abi(), core::mem::transmute(param1)).ok() + wglSwapLayerBuffers(core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglUseFontBitmapsA(param0: P0, param1: u32, param2: u32, param3: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn wglUseFontBitmapsA(param0: super::Gdi::HDC, param1: u32, param2: u32, param3: u32) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglUseFontBitmapsA(param0 : super::Gdi:: HDC, param1 : u32, param2 : u32, param3 : u32) -> super::super::Foundation:: BOOL); - wglUseFontBitmapsA(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() + wglUseFontBitmapsA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglUseFontBitmapsW(param0: P0, param1: u32, param2: u32, param3: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn wglUseFontBitmapsW(param0: super::Gdi::HDC, param1: u32, param2: u32, param3: u32) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglUseFontBitmapsW(param0 : super::Gdi:: HDC, param1 : u32, param2 : u32, param3 : u32) -> super::super::Foundation:: BOOL); - wglUseFontBitmapsW(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() + wglUseFontBitmapsW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglUseFontOutlinesA(param0: P0, param1: u32, param2: u32, param3: u32, param4: f32, param5: f32, param6: i32, param7: *mut GLYPHMETRICSFLOAT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn wglUseFontOutlinesA(param0: super::Gdi::HDC, param1: u32, param2: u32, param3: u32, param4: f32, param5: f32, param6: i32, param7: *mut GLYPHMETRICSFLOAT) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglUseFontOutlinesA(param0 : super::Gdi:: HDC, param1 : u32, param2 : u32, param3 : u32, param4 : f32, param5 : f32, param6 : i32, param7 : *mut GLYPHMETRICSFLOAT) -> super::super::Foundation:: BOOL); - wglUseFontOutlinesA(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4), core::mem::transmute(param5), core::mem::transmute(param6), core::mem::transmute(param7)).ok() + wglUseFontOutlinesA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4), core::mem::transmute(param5), core::mem::transmute(param6), core::mem::transmute(param7)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglUseFontOutlinesW(param0: P0, param1: u32, param2: u32, param3: u32, param4: f32, param5: f32, param6: i32, param7: *mut GLYPHMETRICSFLOAT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn wglUseFontOutlinesW(param0: super::Gdi::HDC, param1: u32, param2: u32, param3: u32, param4: f32, param5: f32, param6: i32, param7: *mut GLYPHMETRICSFLOAT) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglUseFontOutlinesW(param0 : super::Gdi:: HDC, param1 : u32, param2 : u32, param3 : u32, param4 : f32, param5 : f32, param6 : i32, param7 : *mut GLYPHMETRICSFLOAT) -> super::super::Foundation:: BOOL); - wglUseFontOutlinesW(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4), core::mem::transmute(param5), core::mem::transmute(param6), core::mem::transmute(param7)).ok() + wglUseFontOutlinesW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4), core::mem::transmute(param5), core::mem::transmute(param6), core::mem::transmute(param7)).ok() } #[repr(C)] #[cfg(feature = "Win32_Graphics_Gdi")] 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 68711dfedd..e69d6643ce 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 @@ -1,76 +1,67 @@ #[inline] -pub unsafe fn PTCloseProvider(hprovider: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PTCloseProvider(hprovider: HPTPROVIDER) -> windows_core::Result<()> { windows_targets::link!("prntvpt.dll" "system" fn PTCloseProvider(hprovider : HPTPROVIDER) -> windows_core::HRESULT); - PTCloseProvider(hprovider.param().abi()).ok() + PTCloseProvider(core::mem::transmute(hprovider)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] #[inline] -pub unsafe fn PTConvertDevModeToPrintTicket(hprovider: P0, cbdevmode: u32, pdevmode: *const super::super::Gdi::DEVMODEA, scope: EPrintTicketScope, pprintticket: P4) -> windows_core::Result<()> +pub unsafe fn PTConvertDevModeToPrintTicket(hprovider: HPTPROVIDER, cbdevmode: u32, pdevmode: *const super::super::Gdi::DEVMODEA, scope: EPrintTicketScope, pprintticket: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTConvertDevModeToPrintTicket(hprovider : HPTPROVIDER, cbdevmode : u32, pdevmode : *const super::super::Gdi:: DEVMODEA, scope : EPrintTicketScope, pprintticket : * mut core::ffi::c_void) -> windows_core::HRESULT); - PTConvertDevModeToPrintTicket(hprovider.param().abi(), core::mem::transmute(cbdevmode), core::mem::transmute(pdevmode), core::mem::transmute(scope), pprintticket.param().abi()).ok() + PTConvertDevModeToPrintTicket(core::mem::transmute(hprovider), core::mem::transmute(cbdevmode), core::mem::transmute(pdevmode), core::mem::transmute(scope), pprintticket.param().abi()).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] #[inline] -pub unsafe fn PTConvertPrintTicketToDevMode(hprovider: P0, pprintticket: P1, basedevmodetype: EDefaultDevmodeType, scope: EPrintTicketScope, pcbdevmode: *mut u32, ppdevmode: *mut *mut super::super::Gdi::DEVMODEA, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> +pub unsafe fn PTConvertPrintTicketToDevMode(hprovider: HPTPROVIDER, pprintticket: P1, basedevmodetype: EDefaultDevmodeType, scope: EPrintTicketScope, pcbdevmode: *mut u32, ppdevmode: *mut *mut super::super::Gdi::DEVMODEA, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> where - P0: windows_core::Param, 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 * mut core::ffi::c_void) -> windows_core::HRESULT); - PTConvertPrintTicketToDevMode(hprovider.param().abi(), pprintticket.param().abi(), core::mem::transmute(basedevmodetype), core::mem::transmute(scope), core::mem::transmute(pcbdevmode), core::mem::transmute(ppdevmode), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() + PTConvertPrintTicketToDevMode(core::mem::transmute(hprovider), pprintticket.param().abi(), core::mem::transmute(basedevmodetype), core::mem::transmute(scope), core::mem::transmute(pcbdevmode), core::mem::transmute(ppdevmode), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn PTGetPrintCapabilities(hprovider: P0, pprintticket: P1, pcapabilities: P2, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> +pub unsafe fn PTGetPrintCapabilities(hprovider: HPTPROVIDER, pprintticket: P1, pcapabilities: P2, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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 * mut core::ffi::c_void) -> windows_core::HRESULT); - PTGetPrintCapabilities(hprovider.param().abi(), pprintticket.param().abi(), pcapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() + PTGetPrintCapabilities(core::mem::transmute(hprovider), pprintticket.param().abi(), pcapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn PTGetPrintDeviceCapabilities(hprovider: P0, pprintticket: P1, pdevicecapabilities: P2, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> +pub unsafe fn PTGetPrintDeviceCapabilities(hprovider: HPTPROVIDER, pprintticket: P1, pdevicecapabilities: P2, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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 * mut core::ffi::c_void) -> windows_core::HRESULT); - PTGetPrintDeviceCapabilities(hprovider.param().abi(), pprintticket.param().abi(), pdevicecapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() + PTGetPrintDeviceCapabilities(core::mem::transmute(hprovider), pprintticket.param().abi(), pdevicecapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn PTGetPrintDeviceResources(hprovider: P0, pszlocalename: P1, pprintticket: P2, pdeviceresources: P3, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> +pub unsafe fn PTGetPrintDeviceResources(hprovider: HPTPROVIDER, pszlocalename: P1, pprintticket: P2, pdeviceresources: P3, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, 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 * mut core::ffi::c_void) -> windows_core::HRESULT); - PTGetPrintDeviceResources(hprovider.param().abi(), pszlocalename.param().abi(), pprintticket.param().abi(), pdeviceresources.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() + PTGetPrintDeviceResources(core::mem::transmute(hprovider), pszlocalename.param().abi(), pprintticket.param().abi(), pdeviceresources.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn PTMergeAndValidatePrintTicket(hprovider: P0, pbaseticket: P1, pdeltaticket: P2, scope: EPrintTicketScope, presultticket: P4, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> +pub unsafe fn PTMergeAndValidatePrintTicket(hprovider: HPTPROVIDER, pbaseticket: P1, pdeltaticket: P2, scope: EPrintTicketScope, presultticket: P4, pbstrerrormessage: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P4: 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 * mut core::ffi::c_void) -> windows_core::HRESULT); - PTMergeAndValidatePrintTicket(hprovider.param().abi(), pbaseticket.param().abi(), pdeltaticket.param().abi(), core::mem::transmute(scope), presultticket.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() + PTMergeAndValidatePrintTicket(core::mem::transmute(hprovider), pbaseticket.param().abi(), pdeltaticket.param().abi(), core::mem::transmute(scope), presultticket.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::mem::zeroed()))).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 ef2b1007ff..7a799a1588 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs @@ -31,7 +31,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(), core::mem::transmute(level), core::mem::transmute(pmonitors.unwrap_or(core::ptr::null()))).ok() + AddMonitorA(pname.param().abi(), core::mem::transmute(level), core::mem::transmute(pmonitors.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AddMonitorW(pname: P0, level: u32, pmonitors: Option<*const u8>) -> windows_core::Result<()> @@ -39,27 +39,25 @@ 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(), core::mem::transmute(level), core::mem::transmute(pmonitors.unwrap_or(core::ptr::null()))).ok() + AddMonitorW(pname.param().abi(), core::mem::transmute(level), core::mem::transmute(pmonitors.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn AddPortA(pname: P0, hwnd: P1, pmonitorname: P2) -> windows_core::Result<()> +pub unsafe fn AddPortA(pname: P0, hwnd: super::super::Foundation::HWND, pmonitorname: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AddPortA(pname : windows_core::PCSTR, hwnd : super::super::Foundation:: HWND, pmonitorname : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - AddPortA(pname.param().abi(), hwnd.param().abi(), pmonitorname.param().abi()).ok() + AddPortA(pname.param().abi(), core::mem::transmute(hwnd), pmonitorname.param().abi()).ok() } #[inline] -pub unsafe fn AddPortW(pname: P0, hwnd: P1, pmonitorname: P2) -> windows_core::Result<()> +pub unsafe fn AddPortW(pname: P0, hwnd: super::super::Foundation::HWND, pmonitorname: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AddPortW(pname : windows_core::PCWSTR, hwnd : super::super::Foundation:: HWND, pmonitorname : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AddPortW(pname.param().abi(), hwnd.param().abi(), pmonitorname.param().abi()).ok() + AddPortW(pname.param().abi(), core::mem::transmute(hwnd), pmonitorname.param().abi()).ok() } #[inline] pub unsafe fn AddPrintDeviceObject(hprinter: PRINTER_HANDLE) -> windows_core::Result { @@ -115,22 +113,20 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn AddPrinterConnection2A(hwnd: P0, pszname: P1, dwlevel: u32, pconnectioninfo: *const core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn AddPrinterConnection2A(hwnd: Option, pszname: P1, dwlevel: u32, pconnectioninfo: *const core::ffi::c_void) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AddPrinterConnection2A(hwnd : super::super::Foundation:: HWND, pszname : windows_core::PCSTR, dwlevel : u32, pconnectioninfo : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - AddPrinterConnection2A(hwnd.param().abi(), pszname.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(pconnectioninfo)) + AddPrinterConnection2A(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszname.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(pconnectioninfo)) } #[inline] -pub unsafe fn AddPrinterConnection2W(hwnd: P0, pszname: P1, dwlevel: u32, pconnectioninfo: *const core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn AddPrinterConnection2W(hwnd: Option, pszname: P1, dwlevel: u32, pconnectioninfo: *const core::ffi::c_void) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AddPrinterConnection2W(hwnd : super::super::Foundation:: HWND, pszname : windows_core::PCWSTR, dwlevel : u32, pconnectioninfo : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - AddPrinterConnection2W(hwnd.param().abi(), pszname.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(pconnectioninfo)) + AddPrinterConnection2W(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszname.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(pconnectioninfo)) } #[inline] pub unsafe fn AddPrinterConnectionA(pname: P0) -> super::super::Foundation::BOOL @@ -191,37 +187,31 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn AdvancedDocumentPropertiesA(hwnd: P0, hprinter: PRINTER_HANDLE, pdevicename: P2, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEA>, pdevmodeinput: Option<*const super::Gdi::DEVMODEA>) -> i32 +pub unsafe fn AdvancedDocumentPropertiesA(hwnd: super::super::Foundation::HWND, hprinter: PRINTER_HANDLE, pdevicename: P2, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEA>, pdevmodeinput: Option<*const super::Gdi::DEVMODEA>) -> i32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AdvancedDocumentPropertiesA(hwnd : super::super::Foundation:: HWND, hprinter : PRINTER_HANDLE, pdevicename : windows_core::PCSTR, pdevmodeoutput : *mut super::Gdi:: DEVMODEA, pdevmodeinput : *const super::Gdi:: DEVMODEA) -> i32); - AdvancedDocumentPropertiesA(hwnd.param().abi(), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null()))) + AdvancedDocumentPropertiesA(core::mem::transmute(hwnd), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmodeinput.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn AdvancedDocumentPropertiesW(hwnd: P0, hprinter: PRINTER_HANDLE, pdevicename: P2, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEW>, pdevmodeinput: Option<*const super::Gdi::DEVMODEW>) -> i32 +pub unsafe fn AdvancedDocumentPropertiesW(hwnd: super::super::Foundation::HWND, hprinter: PRINTER_HANDLE, pdevicename: P2, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEW>, pdevmodeinput: Option<*const super::Gdi::DEVMODEW>) -> i32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AdvancedDocumentPropertiesW(hwnd : super::super::Foundation:: HWND, hprinter : PRINTER_HANDLE, pdevicename : windows_core::PCWSTR, pdevmodeoutput : *mut super::Gdi:: DEVMODEW, pdevmodeinput : *const super::Gdi:: DEVMODEW) -> i32); - AdvancedDocumentPropertiesW(hwnd.param().abi(), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null()))) + AdvancedDocumentPropertiesW(core::mem::transmute(hwnd), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmodeinput.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(pinfodest), core::mem::transmute(pdatasrc.unwrap_or(core::ptr::null())), core::mem::transmute(fdwflags)) + AppendPrinterNotifyInfoData(core::mem::transmute(pinfodest), core::mem::transmute(pdatasrc.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwflags)) } #[inline] -pub unsafe fn CallRouterFindFirstPrinterChangeNotification(hprinterrpc: P0, fdwfilterflags: u32, fdwoptions: u32, hnotify: P3, pprinternotifyoptions: *const PRINTER_NOTIFY_OPTIONS) -> u32 -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn CallRouterFindFirstPrinterChangeNotification(hprinterrpc: super::super::Foundation::HANDLE, fdwfilterflags: u32, fdwoptions: u32, hnotify: super::super::Foundation::HANDLE, pprinternotifyoptions: *const PRINTER_NOTIFY_OPTIONS) -> u32 { windows_targets::link!("spoolss.dll" "system" fn CallRouterFindFirstPrinterChangeNotification(hprinterrpc : super::super::Foundation:: HANDLE, fdwfilterflags : u32, fdwoptions : u32, hnotify : super::super::Foundation:: HANDLE, pprinternotifyoptions : *const PRINTER_NOTIFY_OPTIONS) -> u32); - CallRouterFindFirstPrinterChangeNotification(hprinterrpc.param().abi(), core::mem::transmute(fdwfilterflags), core::mem::transmute(fdwoptions), hnotify.param().abi(), core::mem::transmute(pprinternotifyoptions)) + CallRouterFindFirstPrinterChangeNotification(core::mem::transmute(hprinterrpc), core::mem::transmute(fdwfilterflags), core::mem::transmute(fdwoptions), core::mem::transmute(hnotify), core::mem::transmute(pprinternotifyoptions)) } #[inline] pub unsafe fn ClosePrinter(hprinter: PRINTER_HANDLE) -> windows_core::Result<()> { @@ -229,66 +219,47 @@ pub unsafe fn ClosePrinter(hprinter: PRINTER_HANDLE) -> windows_core::Result<()> ClosePrinter(core::mem::transmute(hprinter)).ok() } #[inline] -pub unsafe fn CloseSpoolFileHandle(hprinter: PRINTER_HANDLE, hspoolfile: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn CloseSpoolFileHandle(hprinter: PRINTER_HANDLE, hspoolfile: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn CloseSpoolFileHandle(hprinter : PRINTER_HANDLE, hspoolfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CloseSpoolFileHandle(core::mem::transmute(hprinter), hspoolfile.param().abi()) + CloseSpoolFileHandle(core::mem::transmute(hprinter), core::mem::transmute(hspoolfile)) } #[inline] -pub unsafe fn CommitSpoolData(hprinter: PRINTER_HANDLE, hspoolfile: P1, cbcommit: u32) -> super::super::Foundation::HANDLE -where - P1: windows_core::Param, -{ +pub unsafe fn CommitSpoolData(hprinter: PRINTER_HANDLE, hspoolfile: super::super::Foundation::HANDLE, cbcommit: u32) -> super::super::Foundation::HANDLE { windows_targets::link!("winspool.drv" "system" fn CommitSpoolData(hprinter : PRINTER_HANDLE, hspoolfile : super::super::Foundation:: HANDLE, cbcommit : u32) -> super::super::Foundation:: HANDLE); - CommitSpoolData(core::mem::transmute(hprinter), hspoolfile.param().abi(), core::mem::transmute(cbcommit)) + CommitSpoolData(core::mem::transmute(hprinter), core::mem::transmute(hspoolfile), core::mem::transmute(cbcommit)) } #[inline] -pub unsafe fn CommonPropertySheetUIA(hwndowner: P0, pfnpropsheetui: PFNPROPSHEETUI, lparam: P2, presult: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn CommonPropertySheetUIA(hwndowner: super::super::Foundation::HWND, pfnpropsheetui: PFNPROPSHEETUI, lparam: super::super::Foundation::LPARAM, presult: Option<*mut u32>) -> i32 { 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(), core::mem::transmute(pfnpropsheetui), lparam.param().abi(), core::mem::transmute(presult.unwrap_or(core::ptr::null_mut()))) + CommonPropertySheetUIA(core::mem::transmute(hwndowner), core::mem::transmute(pfnpropsheetui), core::mem::transmute(lparam), core::mem::transmute(presult.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CommonPropertySheetUIW(hwndowner: P0, pfnpropsheetui: PFNPROPSHEETUI, lparam: P2, presult: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn CommonPropertySheetUIW(hwndowner: super::super::Foundation::HWND, pfnpropsheetui: PFNPROPSHEETUI, lparam: super::super::Foundation::LPARAM, presult: Option<*mut u32>) -> i32 { 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(), core::mem::transmute(pfnpropsheetui), lparam.param().abi(), core::mem::transmute(presult.unwrap_or(core::ptr::null_mut()))) + CommonPropertySheetUIW(core::mem::transmute(hwndowner), core::mem::transmute(pfnpropsheetui), core::mem::transmute(lparam), core::mem::transmute(presult.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ConfigurePortA(pname: P0, hwnd: P1, pportname: P2) -> super::super::Foundation::BOOL +pub unsafe fn ConfigurePortA(pname: P0, hwnd: super::super::Foundation::HWND, pportname: P2) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn ConfigurePortA(pname : windows_core::PCSTR, hwnd : super::super::Foundation:: HWND, pportname : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - ConfigurePortA(pname.param().abi(), hwnd.param().abi(), pportname.param().abi()) + ConfigurePortA(pname.param().abi(), core::mem::transmute(hwnd), pportname.param().abi()) } #[inline] -pub unsafe fn ConfigurePortW(pname: P0, hwnd: P1, pportname: P2) -> super::super::Foundation::BOOL +pub unsafe fn ConfigurePortW(pname: P0, hwnd: super::super::Foundation::HWND, pportname: P2) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn ConfigurePortW(pname : windows_core::PCWSTR, hwnd : super::super::Foundation:: HWND, pportname : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - ConfigurePortW(pname.param().abi(), hwnd.param().abi(), pportname.param().abi()) + ConfigurePortW(pname.param().abi(), core::mem::transmute(hwnd), pportname.param().abi()) } #[inline] -pub unsafe fn ConnectToPrinterDlg(hwnd: P0, flags: u32) -> super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn ConnectToPrinterDlg(hwnd: super::super::Foundation::HWND, flags: u32) -> super::super::Foundation::HANDLE { windows_targets::link!("winspool.drv" "system" fn ConnectToPrinterDlg(hwnd : super::super::Foundation:: HWND, flags : u32) -> super::super::Foundation:: HANDLE); - ConnectToPrinterDlg(hwnd.param().abi(), core::mem::transmute(flags)) + ConnectToPrinterDlg(core::mem::transmute(hwnd), core::mem::transmute(flags)) } #[inline] pub unsafe fn CorePrinterDriverInstalledA(pszserver: P0, pszenvironment: P1, coredriverguid: windows_core::GUID, ftdriverdate: super::super::Foundation::FILETIME, dwldriverversion: u64) -> windows_core::Result @@ -324,7 +295,7 @@ where #[inline] pub unsafe fn CreatePrinterIC(hprinter: PRINTER_HANDLE, pdevmode: Option<*const super::Gdi::DEVMODEW>) -> super::super::Foundation::HANDLE { windows_targets::link!("winspool.drv" "system" fn CreatePrinterIC(hprinter : PRINTER_HANDLE, pdevmode : *const super::Gdi:: DEVMODEW) -> super::super::Foundation:: HANDLE); - CreatePrinterIC(core::mem::transmute(hprinter), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null()))) + CreatePrinterIC(core::mem::transmute(hprinter), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DeleteFormA(hprinter: PRINTER_HANDLE, pformname: P1) -> super::super::Foundation::BOOL @@ -371,24 +342,22 @@ where DeleteMonitorW(pname.param().abi(), penvironment.param().abi(), pmonitorname.param().abi()).ok() } #[inline] -pub unsafe fn DeletePortA(pname: P0, hwnd: P1, pportname: P2) -> windows_core::Result<()> +pub unsafe fn DeletePortA(pname: P0, hwnd: super::super::Foundation::HWND, pportname: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DeletePortA(pname : windows_core::PCSTR, hwnd : super::super::Foundation:: HWND, pportname : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DeletePortA(pname.param().abi(), hwnd.param().abi(), pportname.param().abi()).ok() + DeletePortA(pname.param().abi(), core::mem::transmute(hwnd), pportname.param().abi()).ok() } #[inline] -pub unsafe fn DeletePortW(pname: P0, hwnd: P1, pportname: P2) -> windows_core::Result<()> +pub unsafe fn DeletePortW(pname: P0, hwnd: super::super::Foundation::HWND, pportname: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DeletePortW(pname : windows_core::PCWSTR, hwnd : super::super::Foundation:: HWND, pportname : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - DeletePortW(pname.param().abi(), hwnd.param().abi(), pportname.param().abi()).ok() + DeletePortW(pname.param().abi(), core::mem::transmute(hwnd), pportname.param().abi()).ok() } #[inline] pub unsafe fn DeletePrintProcessorA(pname: P0, penvironment: P1, pprintprocessorname: P2) -> super::super::Foundation::BOOL @@ -546,12 +515,9 @@ where DeletePrinterDriverW(pname.param().abi(), penvironment.param().abi(), pdrivername.param().abi()) } #[inline] -pub unsafe fn DeletePrinterIC(hprinteric: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DeletePrinterIC(hprinteric: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn DeletePrinterIC(hprinteric : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeletePrinterIC(hprinteric.param().abi()) + DeletePrinterIC(core::mem::transmute(hprinteric)) } #[inline] pub unsafe fn DeletePrinterKeyA(hprinter: PRINTER_HANDLE, pkeyname: P1) -> u32 @@ -583,23 +549,21 @@ pub unsafe fn DevQueryPrintEx(pdqpinfo: *mut DEVQUERYPRINT_INFO) -> super::super } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DocumentPropertiesA(hwnd: P0, hprinter: PRINTER_HANDLE, pdevicename: P2, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEA>, pdevmodeinput: Option<*const super::Gdi::DEVMODEA>, fmode: u32) -> i32 +pub unsafe fn DocumentPropertiesA(hwnd: Option, hprinter: PRINTER_HANDLE, pdevicename: P2, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEA>, pdevmodeinput: Option<*const super::Gdi::DEVMODEA>, fmode: u32) -> i32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DocumentPropertiesA(hwnd : super::super::Foundation:: HWND, hprinter : PRINTER_HANDLE, pdevicename : windows_core::PCSTR, pdevmodeoutput : *mut super::Gdi:: DEVMODEA, pdevmodeinput : *const super::Gdi:: DEVMODEA, fmode : u32) -> i32); - DocumentPropertiesA(hwnd.param().abi(), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null())), core::mem::transmute(fmode)) + DocumentPropertiesA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmodeinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(fmode)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DocumentPropertiesW(hwnd: P0, hprinter: PRINTER_HANDLE, pdevicename: P2, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEW>, pdevmodeinput: Option<*const super::Gdi::DEVMODEW>, fmode: u32) -> i32 +pub unsafe fn DocumentPropertiesW(hwnd: Option, hprinter: PRINTER_HANDLE, pdevicename: P2, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEW>, pdevmodeinput: Option<*const super::Gdi::DEVMODEW>, fmode: u32) -> i32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DocumentPropertiesW(hwnd : super::super::Foundation:: HWND, hprinter : PRINTER_HANDLE, pdevicename : windows_core::PCWSTR, pdevmodeoutput : *mut super::Gdi:: DEVMODEW, pdevmodeinput : *const super::Gdi:: DEVMODEW, fmode : u32) -> i32); - DocumentPropertiesW(hwnd.param().abi(), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null())), core::mem::transmute(fmode)) + DocumentPropertiesW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmodeinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(fmode)) } #[inline] pub unsafe fn EndDocPrinter(hprinter: PRINTER_HANDLE) -> super::super::Foundation::BOOL { @@ -707,7 +671,7 @@ where #[inline] pub unsafe fn EnumPrinterDataA(hprinter: PRINTER_HANDLE, dwindex: u32, pvaluename: &mut [u8], pcbvaluename: *mut u32, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbdata: Option<*mut u32>) -> u32 { windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataA(hprinter : PRINTER_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(core::mem::transmute(hprinter), core::mem::transmute(dwindex), core::mem::transmute(pvaluename.as_ptr()), pvaluename.len().try_into().unwrap(), core::mem::transmute(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()))) + EnumPrinterDataA(core::mem::transmute(hprinter), core::mem::transmute(dwindex), core::mem::transmute(pvaluename.as_ptr()), pvaluename.len().try_into().unwrap(), core::mem::transmute(pcbvaluename), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))) } #[inline] pub unsafe fn EnumPrinterDataExA(hprinter: PRINTER_HANDLE, pkeyname: P1, penumvalues: Option<&mut [u8]>, pcbenumvalues: *mut u32, pnenumvalues: *mut u32) -> u32 @@ -728,7 +692,7 @@ where #[inline] pub unsafe fn EnumPrinterDataW(hprinter: PRINTER_HANDLE, dwindex: u32, pvaluename: windows_core::PWSTR, cbvaluename: u32, pcbvaluename: *mut u32, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbdata: Option<*mut u32>) -> u32 { windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataW(hprinter : PRINTER_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(core::mem::transmute(hprinter), core::mem::transmute(dwindex), core::mem::transmute(pvaluename), core::mem::transmute(cbvaluename), core::mem::transmute(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()))) + EnumPrinterDataW(core::mem::transmute(hprinter), core::mem::transmute(dwindex), core::mem::transmute(pvaluename), core::mem::transmute(cbvaluename), core::mem::transmute(pcbvaluename), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))) } #[inline] pub unsafe fn EnumPrinterDriversA(pname: P0, penvironment: P1, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> @@ -757,12 +721,12 @@ where EnumPrinterKeyA(core::mem::transmute(hprinter), pkeyname.param().abi(), core::mem::transmute(psubkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psubkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbsubkey)) } #[inline] -pub unsafe fn EnumPrinterKeyW(hprinter: PRINTER_HANDLE, pkeyname: P1, psubkey: windows_core::PWSTR, cbsubkey: u32, pcbsubkey: *mut u32) -> u32 +pub unsafe fn EnumPrinterKeyW(hprinter: PRINTER_HANDLE, pkeyname: P1, psubkey: Option, cbsubkey: u32, pcbsubkey: *mut u32) -> u32 where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrinterKeyW(hprinter : PRINTER_HANDLE, pkeyname : windows_core::PCWSTR, psubkey : windows_core::PWSTR, cbsubkey : u32, pcbsubkey : *mut u32) -> u32); - EnumPrinterKeyW(core::mem::transmute(hprinter), pkeyname.param().abi(), core::mem::transmute(psubkey), core::mem::transmute(cbsubkey), core::mem::transmute(pcbsubkey)) + EnumPrinterKeyW(core::mem::transmute(hprinter), pkeyname.param().abi(), core::mem::transmute(psubkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsubkey), core::mem::transmute(pcbsubkey)) } #[inline] pub unsafe fn EnumPrintersA(flags: u32, name: P1, level: u32, pprinterenum: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> @@ -782,42 +746,34 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ExtDeviceMode(hwnd: P0, hinst: P1, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEA>, pdevicename: P3, pport: P4, pdevmodeinput: Option<*const super::Gdi::DEVMODEA>, pprofile: P6, fmode: u32) -> i32 +pub unsafe fn ExtDeviceMode(hwnd: Option, hinst: Option, pdevmodeoutput: Option<*mut super::Gdi::DEVMODEA>, pdevicename: P3, pport: P4, pdevmodeinput: Option<*const super::Gdi::DEVMODEA>, pprofile: P6, fmode: u32) -> i32 where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P6: 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(core::ptr::null_mut())), pdevicename.param().abi(), pport.param().abi(), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null())), pprofile.param().abi(), core::mem::transmute(fmode)) + ExtDeviceMode(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmodeoutput.unwrap_or(core::mem::zeroed())), pdevicename.param().abi(), pport.param().abi(), core::mem::transmute(pdevmodeinput.unwrap_or(core::mem::zeroed())), pprofile.param().abi(), core::mem::transmute(fmode)) } #[inline] -pub unsafe fn FindClosePrinterChangeNotification(hchange: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FindClosePrinterChangeNotification(hchange: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn FindClosePrinterChangeNotification(hchange : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FindClosePrinterChangeNotification(hchange.param().abi()) + FindClosePrinterChangeNotification(core::mem::transmute(hchange)) } #[inline] pub unsafe fn FindFirstPrinterChangeNotification(hprinter: PRINTER_HANDLE, fdwfilter: u32, fdwoptions: u32, pprinternotifyoptions: Option<*const core::ffi::c_void>) -> super::super::Foundation::HANDLE { windows_targets::link!("winspool.drv" "system" fn FindFirstPrinterChangeNotification(hprinter : PRINTER_HANDLE, fdwfilter : u32, fdwoptions : u32, pprinternotifyoptions : *const core::ffi::c_void) -> super::super::Foundation:: HANDLE); - FindFirstPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(fdwfilter), core::mem::transmute(fdwoptions), core::mem::transmute(pprinternotifyoptions.unwrap_or(core::ptr::null()))) + FindFirstPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(fdwfilter), core::mem::transmute(fdwoptions), core::mem::transmute(pprinternotifyoptions.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextPrinterChangeNotification(hchange: super::super::Foundation::HANDLE, pdwchange: Option<*mut u32>, pvreserved: Option<*const core::ffi::c_void>, ppprinternotifyinfo: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppprinternotifyinfo.unwrap_or(core::ptr::null_mut()))) + FindNextPrinterChangeNotification(core::mem::transmute(hchange), core::mem::transmute(pdwchange.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppprinternotifyinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FlushPrinter(hprinter: PRINTER_HANDLE, pbuf: Option<*const core::ffi::c_void>, cbbuf: u32, pcwritten: *mut u32, csleep: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn FlushPrinter(hprinter : PRINTER_HANDLE, pbuf : *const core::ffi::c_void, cbbuf : u32, pcwritten : *mut u32, csleep : u32) -> super::super::Foundation:: BOOL); - FlushPrinter(core::mem::transmute(hprinter), core::mem::transmute(pbuf.unwrap_or(core::ptr::null())), core::mem::transmute(cbbuf), core::mem::transmute(pcwritten), core::mem::transmute(csleep)) + FlushPrinter(core::mem::transmute(hprinter), core::mem::transmute(pbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbuf), core::mem::transmute(pcwritten), core::mem::transmute(csleep)) } #[inline] pub unsafe fn FreePrintNamedPropertyArray(ppproperties: Option<&mut [*mut PrintNamedProperty]>) { @@ -835,62 +791,41 @@ pub unsafe fn FreePrinterNotifyInfo(pprinternotifyinfo: *const PRINTER_NOTIFY_IN FreePrinterNotifyInfo(core::mem::transmute(pprinternotifyinfo)) } #[inline] -pub unsafe fn GdiDeleteSpoolFileHandle(spoolfilehandle: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiDeleteSpoolFileHandle(spoolfilehandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiDeleteSpoolFileHandle(spoolfilehandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GdiDeleteSpoolFileHandle(spoolfilehandle.param().abi()) + GdiDeleteSpoolFileHandle(core::mem::transmute(spoolfilehandle)) } #[inline] -pub unsafe fn GdiEndDocEMF(spoolfilehandle: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiEndDocEMF(spoolfilehandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiEndDocEMF(spoolfilehandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GdiEndDocEMF(spoolfilehandle.param().abi()) + GdiEndDocEMF(core::mem::transmute(spoolfilehandle)) } #[inline] -pub unsafe fn GdiEndPageEMF(spoolfilehandle: P0, dwoptimization: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiEndPageEMF(spoolfilehandle: super::super::Foundation::HANDLE, dwoptimization: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiEndPageEMF(spoolfilehandle : super::super::Foundation:: HANDLE, dwoptimization : u32) -> super::super::Foundation:: BOOL); - GdiEndPageEMF(spoolfilehandle.param().abi(), core::mem::transmute(dwoptimization)) + GdiEndPageEMF(core::mem::transmute(spoolfilehandle), core::mem::transmute(dwoptimization)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdiGetDC(spoolfilehandle: P0) -> super::Gdi::HDC -where - P0: windows_core::Param, -{ +pub unsafe fn GdiGetDC(spoolfilehandle: super::super::Foundation::HANDLE) -> super::Gdi::HDC { windows_targets::link!("gdi32.dll" "system" fn GdiGetDC(spoolfilehandle : super::super::Foundation:: HANDLE) -> super::Gdi:: HDC); - GdiGetDC(spoolfilehandle.param().abi()) + GdiGetDC(core::mem::transmute(spoolfilehandle)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdiGetDevmodeForPage(spoolfilehandle: P0, dwpagenumber: u32, pcurrdm: *mut *mut super::Gdi::DEVMODEW, plastdm: *mut *mut super::Gdi::DEVMODEW) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiGetDevmodeForPage(spoolfilehandle: super::super::Foundation::HANDLE, dwpagenumber: u32, pcurrdm: *mut *mut super::Gdi::DEVMODEW, plastdm: *mut *mut super::Gdi::DEVMODEW) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiGetDevmodeForPage(spoolfilehandle : super::super::Foundation:: HANDLE, dwpagenumber : u32, pcurrdm : *mut *mut super::Gdi:: DEVMODEW, plastdm : *mut *mut super::Gdi:: DEVMODEW) -> super::super::Foundation:: BOOL); - GdiGetDevmodeForPage(spoolfilehandle.param().abi(), core::mem::transmute(dwpagenumber), core::mem::transmute(pcurrdm), core::mem::transmute(plastdm)) + GdiGetDevmodeForPage(core::mem::transmute(spoolfilehandle), core::mem::transmute(dwpagenumber), core::mem::transmute(pcurrdm), core::mem::transmute(plastdm)) } #[inline] -pub unsafe fn GdiGetPageCount(spoolfilehandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GdiGetPageCount(spoolfilehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("gdi32.dll" "system" fn GdiGetPageCount(spoolfilehandle : super::super::Foundation:: HANDLE) -> u32); - GdiGetPageCount(spoolfilehandle.param().abi()) + GdiGetPageCount(core::mem::transmute(spoolfilehandle)) } #[inline] -pub unsafe fn GdiGetPageHandle(spoolfilehandle: P0, page: u32, pdwpagetype: *mut u32) -> super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn GdiGetPageHandle(spoolfilehandle: super::super::Foundation::HANDLE, page: u32, pdwpagetype: *mut u32) -> super::super::Foundation::HANDLE { windows_targets::link!("gdi32.dll" "system" fn GdiGetPageHandle(spoolfilehandle : super::super::Foundation:: HANDLE, page : u32, pdwpagetype : *mut u32) -> super::super::Foundation:: HANDLE); - GdiGetPageHandle(spoolfilehandle.param().abi(), core::mem::transmute(page), core::mem::transmute(pdwpagetype)) + GdiGetPageHandle(core::mem::transmute(spoolfilehandle), core::mem::transmute(page), core::mem::transmute(pdwpagetype)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -903,39 +838,26 @@ where GdiGetSpoolFileHandle(pwszprintername.param().abi(), core::mem::transmute(pdevmode), pwszdocname.param().abi()) } #[inline] -pub unsafe fn GdiPlayPageEMF(spoolfilehandle: P0, hemf: P1, prectdocument: *mut super::super::Foundation::RECT, prectborder: *mut super::super::Foundation::RECT, prectclip: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GdiPlayPageEMF(spoolfilehandle: super::super::Foundation::HANDLE, hemf: super::super::Foundation::HANDLE, prectdocument: *mut super::super::Foundation::RECT, prectborder: *mut super::super::Foundation::RECT, prectclip: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiPlayPageEMF(spoolfilehandle : super::super::Foundation:: HANDLE, hemf : super::super::Foundation:: HANDLE, prectdocument : *mut super::super::Foundation:: RECT, prectborder : *mut super::super::Foundation:: RECT, prectclip : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - GdiPlayPageEMF(spoolfilehandle.param().abi(), hemf.param().abi(), core::mem::transmute(prectdocument), core::mem::transmute(prectborder), core::mem::transmute(prectclip)) + GdiPlayPageEMF(core::mem::transmute(spoolfilehandle), core::mem::transmute(hemf), core::mem::transmute(prectdocument), core::mem::transmute(prectborder), core::mem::transmute(prectclip)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdiResetDCEMF(spoolfilehandle: P0, pcurrdm: *mut super::Gdi::DEVMODEW) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiResetDCEMF(spoolfilehandle: super::super::Foundation::HANDLE, pcurrdm: *mut super::Gdi::DEVMODEW) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiResetDCEMF(spoolfilehandle : super::super::Foundation:: HANDLE, pcurrdm : *mut super::Gdi:: DEVMODEW) -> super::super::Foundation:: BOOL); - GdiResetDCEMF(spoolfilehandle.param().abi(), core::mem::transmute(pcurrdm)) + GdiResetDCEMF(core::mem::transmute(spoolfilehandle), core::mem::transmute(pcurrdm)) } #[cfg(feature = "Win32_Storage_Xps")] #[inline] -pub unsafe fn GdiStartDocEMF(spoolfilehandle: P0, pdocinfo: *mut super::super::Storage::Xps::DOCINFOW) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiStartDocEMF(spoolfilehandle: super::super::Foundation::HANDLE, pdocinfo: *mut super::super::Storage::Xps::DOCINFOW) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiStartDocEMF(spoolfilehandle : super::super::Foundation:: HANDLE, pdocinfo : *mut super::super::Storage::Xps:: DOCINFOW) -> super::super::Foundation:: BOOL); - GdiStartDocEMF(spoolfilehandle.param().abi(), core::mem::transmute(pdocinfo)) + GdiStartDocEMF(core::mem::transmute(spoolfilehandle), core::mem::transmute(pdocinfo)) } #[inline] -pub unsafe fn GdiStartPageEMF(spoolfilehandle: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GdiStartPageEMF(spoolfilehandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GdiStartPageEMF(spoolfilehandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GdiStartPageEMF(spoolfilehandle.param().abi()) + GdiStartPageEMF(core::mem::transmute(spoolfilehandle)) } #[inline] pub unsafe fn GenerateCopyFilePaths(pszprintername: P0, pszdirectory: P1, psplclientinfo: *const u8, dwlevel: u32, pszsourcedir: windows_core::PWSTR, pcchsourcedirsize: *mut u32, psztargetdir: windows_core::PWSTR, pcchtargetdirsize: *mut u32, dwflags: u32) -> u32 @@ -947,12 +869,9 @@ where GenerateCopyFilePaths(pszprintername.param().abi(), pszdirectory.param().abi(), core::mem::transmute(psplclientinfo), core::mem::transmute(dwlevel), core::mem::transmute(pszsourcedir), core::mem::transmute(pcchsourcedirsize), core::mem::transmute(psztargetdir), core::mem::transmute(pcchtargetdirsize), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn GetCPSUIUserData(hdlg: P0) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn GetCPSUIUserData(hdlg: super::super::Foundation::HWND) -> usize { windows_targets::link!("compstui.dll" "system" fn GetCPSUIUserData(hdlg : super::super::Foundation:: HWND) -> usize); - GetCPSUIUserData(hdlg.param().abi()) + GetCPSUIUserData(core::mem::transmute(hdlg)) } #[inline] pub unsafe fn GetCorePrinterDriversA(pszserver: P0, pszenvironment: P1, pszzcoredriverdependencies: P2, pcoreprinterdrivers: &mut [CORE_PRINTER_DRIVERA]) -> windows_core::Result<()> @@ -975,14 +894,14 @@ where GetCorePrinterDriversW(pszserver.param().abi(), pszenvironment.param().abi(), pszzcoredriverdependencies.param().abi(), pcoreprinterdrivers.len().try_into().unwrap(), core::mem::transmute(pcoreprinterdrivers.as_ptr())).ok() } #[inline] -pub unsafe fn GetDefaultPrinterA(pszbuffer: windows_core::PSTR, pcchbuffer: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetDefaultPrinterA(pszbuffer: Option, pcchbuffer: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn GetDefaultPrinterA(pszbuffer : windows_core::PSTR, pcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetDefaultPrinterA(core::mem::transmute(pszbuffer), core::mem::transmute(pcchbuffer)) + GetDefaultPrinterA(core::mem::transmute(pszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffer)) } #[inline] -pub unsafe fn GetDefaultPrinterW(pszbuffer: windows_core::PWSTR, pcchbuffer: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetDefaultPrinterW(pszbuffer: Option, pcchbuffer: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn GetDefaultPrinterW(pszbuffer : windows_core::PWSTR, pcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetDefaultPrinterW(core::mem::transmute(pszbuffer), core::mem::transmute(pcchbuffer)) + GetDefaultPrinterW(core::mem::transmute(pszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffer)) } #[inline] pub unsafe fn GetFormA(hprinter: PRINTER_HANDLE, pformname: P1, level: u32, pform: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1042,13 +961,12 @@ pub unsafe fn GetPrintExecutionData(pdata: *mut PRINT_EXECUTION_DATA) -> super:: GetPrintExecutionData(core::mem::transmute(pdata)) } #[inline] -pub unsafe fn GetPrintOutputInfo(hwnd: P0, pszprinter: P1, phfile: *mut super::super::Foundation::HANDLE, ppszoutputfile: *mut windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn GetPrintOutputInfo(hwnd: super::super::Foundation::HWND, pszprinter: P1, phfile: *mut super::super::Foundation::HANDLE, ppszoutputfile: *mut windows_core::PWSTR) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrintOutputInfo(hwnd : super::super::Foundation:: HWND, pszprinter : windows_core::PCWSTR, phfile : *mut super::super::Foundation:: HANDLE, ppszoutputfile : *mut windows_core::PWSTR) -> windows_core::HRESULT); - GetPrintOutputInfo(hwnd.param().abi(), pszprinter.param().abi(), core::mem::transmute(phfile), core::mem::transmute(ppszoutputfile)).ok() + GetPrintOutputInfo(core::mem::transmute(hwnd), pszprinter.param().abi(), core::mem::transmute(phfile), core::mem::transmute(ppszoutputfile)).ok() } #[inline] pub unsafe fn GetPrintProcessorDirectoryA(pname: P0, penvironment: P1, level: u32, pprintprocessorinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1079,7 +997,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDataA(hprinter : PRINTER_HANDLE, pvaluename : windows_core::PCSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataA(core::mem::transmute(hprinter), 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()), core::mem::transmute(pcbneeded)) + GetPrinterDataA(core::mem::transmute(hprinter), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), 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(pcbneeded)) } #[inline] pub unsafe fn GetPrinterDataExA(hprinter: PRINTER_HANDLE, pkeyname: P1, pvaluename: P2, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1088,7 +1006,7 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDataExA(hprinter : PRINTER_HANDLE, pkeyname : windows_core::PCSTR, pvaluename : windows_core::PCSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataExA(core::mem::transmute(hprinter), 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()), core::mem::transmute(pcbneeded)) + GetPrinterDataExA(core::mem::transmute(hprinter), pkeyname.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), 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(pcbneeded)) } #[inline] pub unsafe fn GetPrinterDataExW(hprinter: PRINTER_HANDLE, pkeyname: P1, pvaluename: P2, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1097,7 +1015,7 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDataExW(hprinter : PRINTER_HANDLE, pkeyname : windows_core::PCWSTR, pvaluename : windows_core::PCWSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataExW(core::mem::transmute(hprinter), 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()), core::mem::transmute(pcbneeded)) + GetPrinterDataExW(core::mem::transmute(hprinter), pkeyname.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), 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(pcbneeded)) } #[inline] pub unsafe fn GetPrinterDataW(hprinter: PRINTER_HANDLE, pvaluename: P1, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1105,25 +1023,23 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDataW(hprinter : PRINTER_HANDLE, pvaluename : windows_core::PCWSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataW(core::mem::transmute(hprinter), 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()), core::mem::transmute(pcbneeded)) + GetPrinterDataW(core::mem::transmute(hprinter), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), 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(pcbneeded)) } #[inline] -pub unsafe fn GetPrinterDriver2A(hwnd: P0, hprinter: PRINTER_HANDLE, penvironment: P2, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetPrinterDriver2A(hwnd: Option, hprinter: PRINTER_HANDLE, penvironment: P2, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDriver2A(hwnd : super::super::Foundation:: HWND, hprinter : PRINTER_HANDLE, penvironment : windows_core::PCSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterDriver2A(hwnd.param().abi(), core::mem::transmute(hprinter), penvironment.param().abi(), core::mem::transmute(level), core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) + GetPrinterDriver2A(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hprinter), penvironment.param().abi(), core::mem::transmute(level), core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } #[inline] -pub unsafe fn GetPrinterDriver2W(hwnd: P0, hprinter: PRINTER_HANDLE, penvironment: P2, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetPrinterDriver2W(hwnd: Option, hprinter: PRINTER_HANDLE, penvironment: P2, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDriver2W(hwnd : super::super::Foundation:: HWND, hprinter : PRINTER_HANDLE, penvironment : windows_core::PCWSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterDriver2W(hwnd.param().abi(), core::mem::transmute(hprinter), penvironment.param().abi(), core::mem::transmute(level), core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) + GetPrinterDriver2W(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hprinter), penvironment.param().abi(), core::mem::transmute(level), core::mem::transmute(pdriverinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)) } #[inline] pub unsafe fn GetPrinterDriverA(hprinter: PRINTER_HANDLE, penvironment: P1, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1193,12 +1109,9 @@ pub unsafe fn GetSpoolFileHandle(hprinter: PRINTER_HANDLE) -> windows_core::Resu (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn ImpersonatePrinterClient(htoken: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImpersonatePrinterClient(htoken: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn ImpersonatePrinterClient(htoken : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ImpersonatePrinterClient(htoken.param().abi()) + ImpersonatePrinterClient(core::mem::transmute(htoken)) } #[inline] pub unsafe fn InstallPrinterDriverFromPackageA(pszserver: P0, pszinfpath: P1, pszdrivername: P2, pszenvironment: P3, dwflags: u32) -> windows_core::Result<()> @@ -1226,13 +1139,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(core::ptr::null())), core::mem::transmute(devmodesize)) + IsValidDevmodeA(core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(devmodesize)) + IsValidDevmodeW(core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(devmodesize)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1241,7 +1154,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn OpenPrinter2A(pprintername : windows_core::PCSTR, phprinter : *mut PRINTER_HANDLE, pdefault : *const PRINTER_DEFAULTSA, poptions : *const PRINTER_OPTIONSA) -> super::super::Foundation:: BOOL); - OpenPrinter2A(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::ptr::null())), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() + OpenPrinter2A(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed())), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1250,7 +1163,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn OpenPrinter2W(pprintername : windows_core::PCWSTR, phprinter : *mut PRINTER_HANDLE, pdefault : *const PRINTER_DEFAULTSW, poptions : *const PRINTER_OPTIONSW) -> super::super::Foundation:: BOOL); - OpenPrinter2W(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::ptr::null())), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() + OpenPrinter2W(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed())), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1259,7 +1172,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn OpenPrinterA(pprintername : windows_core::PCSTR, phprinter : *mut PRINTER_HANDLE, pdefault : *const PRINTER_DEFAULTSA) -> super::super::Foundation:: BOOL); - OpenPrinterA(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::ptr::null()))).ok() + OpenPrinterA(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1268,48 +1181,40 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn OpenPrinterW(pprintername : windows_core::PCWSTR, phprinter : *mut PRINTER_HANDLE, pdefault : *const PRINTER_DEFAULTSW) -> super::super::Foundation:: BOOL); - OpenPrinterW(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::ptr::null()))).ok() + OpenPrinterW(pprintername.param().abi(), core::mem::transmute(phprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn PartialReplyPrinterChangeNotification(hprinter: PRINTER_HANDLE, pdatasrc: Option<*const PRINTER_NOTIFY_INFO_DATA>) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn PartialReplyPrinterChangeNotification(hprinter : PRINTER_HANDLE, pdatasrc : *const PRINTER_NOTIFY_INFO_DATA) -> super::super::Foundation:: BOOL); - PartialReplyPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(pdatasrc.unwrap_or(core::ptr::null()))) + PartialReplyPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(pdatasrc.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PlayGdiScriptOnPrinterIC(hprinteric: P0, pin: &[u8], pout: &mut [u8], ul: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PlayGdiScriptOnPrinterIC(hprinteric: super::super::Foundation::HANDLE, pin: &[u8], pout: &mut [u8], ul: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn PlayGdiScriptOnPrinterIC(hprinteric : super::super::Foundation:: HANDLE, pin : *const u8, cin : u32, pout : *mut u8, cout : u32, ul : u32) -> super::super::Foundation:: BOOL); - PlayGdiScriptOnPrinterIC(hprinteric.param().abi(), core::mem::transmute(pin.as_ptr()), pin.len().try_into().unwrap(), core::mem::transmute(pout.as_ptr()), pout.len().try_into().unwrap(), core::mem::transmute(ul)) + PlayGdiScriptOnPrinterIC(core::mem::transmute(hprinteric), core::mem::transmute(pin.as_ptr()), pin.len().try_into().unwrap(), core::mem::transmute(pout.as_ptr()), pout.len().try_into().unwrap(), core::mem::transmute(ul)) } #[inline] -pub unsafe fn PrinterMessageBoxA(hprinter: PRINTER_HANDLE, error: u32, hwnd: P2, ptext: P3, pcaption: P4, dwtype: u32) -> u32 +pub unsafe fn PrinterMessageBoxA(hprinter: PRINTER_HANDLE, error: u32, hwnd: super::super::Foundation::HWND, ptext: P3, pcaption: P4, dwtype: u32) -> u32 where - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn PrinterMessageBoxA(hprinter : PRINTER_HANDLE, error : u32, hwnd : super::super::Foundation:: HWND, ptext : windows_core::PCSTR, pcaption : windows_core::PCSTR, dwtype : u32) -> u32); - PrinterMessageBoxA(core::mem::transmute(hprinter), core::mem::transmute(error), hwnd.param().abi(), ptext.param().abi(), pcaption.param().abi(), core::mem::transmute(dwtype)) + PrinterMessageBoxA(core::mem::transmute(hprinter), core::mem::transmute(error), core::mem::transmute(hwnd), ptext.param().abi(), pcaption.param().abi(), core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn PrinterMessageBoxW(hprinter: PRINTER_HANDLE, error: u32, hwnd: P2, ptext: P3, pcaption: P4, dwtype: u32) -> u32 +pub unsafe fn PrinterMessageBoxW(hprinter: PRINTER_HANDLE, error: u32, hwnd: super::super::Foundation::HWND, ptext: P3, pcaption: P4, dwtype: u32) -> u32 where - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn PrinterMessageBoxW(hprinter : PRINTER_HANDLE, error : u32, hwnd : super::super::Foundation:: HWND, ptext : windows_core::PCWSTR, pcaption : windows_core::PCWSTR, dwtype : u32) -> u32); - PrinterMessageBoxW(core::mem::transmute(hprinter), core::mem::transmute(error), hwnd.param().abi(), ptext.param().abi(), pcaption.param().abi(), core::mem::transmute(dwtype)) + PrinterMessageBoxW(core::mem::transmute(hprinter), core::mem::transmute(error), core::mem::transmute(hwnd), ptext.param().abi(), pcaption.param().abi(), core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn PrinterProperties(hwnd: P0, hprinter: PRINTER_HANDLE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PrinterProperties(hwnd: super::super::Foundation::HWND, hprinter: PRINTER_HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn PrinterProperties(hwnd : super::super::Foundation:: HWND, hprinter : PRINTER_HANDLE) -> super::super::Foundation:: BOOL); - PrinterProperties(hwnd.param().abi(), core::mem::transmute(hprinter)) + PrinterProperties(core::mem::transmute(hwnd), core::mem::transmute(hprinter)) } #[inline] pub unsafe fn ProvidorFindClosePrinterChangeNotification(hprinter: PRINTER_HANDLE) -> super::super::Foundation::BOOL { @@ -1317,12 +1222,9 @@ pub unsafe fn ProvidorFindClosePrinterChangeNotification(hprinter: PRINTER_HANDL ProvidorFindClosePrinterChangeNotification(core::mem::transmute(hprinter)) } #[inline] -pub unsafe fn ProvidorFindFirstPrinterChangeNotification(hprinter: PRINTER_HANDLE, fdwflags: u32, fdwoptions: u32, hnotify: P3, pprinternotifyoptions: Option<*const core::ffi::c_void>, pvreserved1: Option<*mut core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P3: windows_core::Param, -{ +pub unsafe fn ProvidorFindFirstPrinterChangeNotification(hprinter: PRINTER_HANDLE, fdwflags: u32, fdwoptions: u32, hnotify: super::super::Foundation::HANDLE, pprinternotifyoptions: Option<*const core::ffi::c_void>, pvreserved1: Option<*mut core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn ProvidorFindFirstPrinterChangeNotification(hprinter : PRINTER_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(core::mem::transmute(hprinter), core::mem::transmute(fdwflags), core::mem::transmute(fdwoptions), hnotify.param().abi(), core::mem::transmute(pprinternotifyoptions.unwrap_or(core::ptr::null())), core::mem::transmute(pvreserved1.unwrap_or(core::ptr::null_mut()))) + ProvidorFindFirstPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(fdwflags), core::mem::transmute(fdwoptions), core::mem::transmute(hnotify), core::mem::transmute(pprinternotifyoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved1.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ReadPrinter(hprinter: PRINTER_HANDLE, pbuf: *mut core::ffi::c_void, cbbuf: u32, pnobytesread: *mut u32) -> super::super::Foundation::BOOL { @@ -1340,45 +1242,36 @@ where RegisterForPrintAsyncNotifications(pszname.param().abi(), core::mem::transmute(pnotificationtype), core::mem::transmute(euserfilter), core::mem::transmute(econversationstyle), pcallback.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn RemovePrintDeviceObject(hdeviceobject: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RemovePrintDeviceObject(hdeviceobject: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("spoolss.dll" "system" fn RemovePrintDeviceObject(hdeviceobject : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - RemovePrintDeviceObject(hdeviceobject.param().abi()).ok() + RemovePrintDeviceObject(core::mem::transmute(hdeviceobject)).ok() } #[inline] pub unsafe fn ReplyPrinterChangeNotification(hprinter: PRINTER_HANDLE, fdwchangeflags: u32, pdwresult: Option<*mut u32>, pprinternotifyinfo: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn ReplyPrinterChangeNotification(hprinter : PRINTER_HANDLE, fdwchangeflags : u32, pdwresult : *mut u32, pprinternotifyinfo : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReplyPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(fdwchangeflags), core::mem::transmute(pdwresult.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pprinternotifyinfo.unwrap_or(core::ptr::null()))) + ReplyPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(fdwchangeflags), core::mem::transmute(pdwresult.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprinternotifyinfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReplyPrinterChangeNotificationEx(hnotify: P0, dwcolor: u32, fdwflags: u32, pdwresult: *mut u32, pprinternotifyinfo: *const core::ffi::c_void) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ReplyPrinterChangeNotificationEx(hnotify: super::super::Foundation::HANDLE, dwcolor: u32, fdwflags: u32, pdwresult: *mut u32, pprinternotifyinfo: *const core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn ReplyPrinterChangeNotificationEx(hnotify : super::super::Foundation:: HANDLE, dwcolor : u32, fdwflags : u32, pdwresult : *mut u32, pprinternotifyinfo : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReplyPrinterChangeNotificationEx(hnotify.param().abi(), core::mem::transmute(dwcolor), core::mem::transmute(fdwflags), core::mem::transmute(pdwresult), core::mem::transmute(pprinternotifyinfo)) + ReplyPrinterChangeNotificationEx(core::mem::transmute(hnotify), core::mem::transmute(dwcolor), core::mem::transmute(fdwflags), core::mem::transmute(pdwresult), core::mem::transmute(pprinternotifyinfo)) } #[inline] -pub unsafe fn ReportJobProcessingProgress(printerhandle: P0, jobid: u32, joboperation: EPrintXPSJobOperation, jobprogress: EPrintXPSJobProgress) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReportJobProcessingProgress(printerhandle: super::super::Foundation::HANDLE, jobid: u32, joboperation: EPrintXPSJobOperation, jobprogress: EPrintXPSJobProgress) -> windows_core::Result<()> { windows_targets::link!("winspool.drv" "system" fn ReportJobProcessingProgress(printerhandle : super::super::Foundation:: HANDLE, jobid : u32, joboperation : EPrintXPSJobOperation, jobprogress : EPrintXPSJobProgress) -> windows_core::HRESULT); - ReportJobProcessingProgress(printerhandle.param().abi(), core::mem::transmute(jobid), core::mem::transmute(joboperation), core::mem::transmute(jobprogress)).ok() + ReportJobProcessingProgress(core::mem::transmute(printerhandle), core::mem::transmute(jobid), core::mem::transmute(joboperation), core::mem::transmute(jobprogress)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn ResetPrinterA(hprinter: PRINTER_HANDLE, pdefault: Option<*const PRINTER_DEFAULTSA>) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn ResetPrinterA(hprinter : PRINTER_HANDLE, pdefault : *const PRINTER_DEFAULTSA) -> super::super::Foundation:: BOOL); - ResetPrinterA(core::mem::transmute(hprinter), core::mem::transmute(pdefault.unwrap_or(core::ptr::null()))) + ResetPrinterA(core::mem::transmute(hprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn ResetPrinterW(hprinter: PRINTER_HANDLE, pdefault: Option<*const PRINTER_DEFAULTSW>) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn ResetPrinterW(hprinter : PRINTER_HANDLE, pdefault : *const PRINTER_DEFAULTSW) -> super::super::Foundation:: BOOL); - ResetPrinterW(core::mem::transmute(hprinter), core::mem::transmute(pdefault.unwrap_or(core::ptr::null()))) + ResetPrinterW(core::mem::transmute(hprinter), core::mem::transmute(pdefault.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RevertToPrinterSelf() -> super::super::Foundation::HANDLE { @@ -1413,7 +1306,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(core::ptr::null()))) + RouterFreePrinterNotifyInfo(core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ScheduleJob(hprinter: PRINTER_HANDLE, jobid: u32) -> super::super::Foundation::BOOL { @@ -1421,12 +1314,9 @@ pub unsafe fn ScheduleJob(hprinter: PRINTER_HANDLE, jobid: u32) -> super::super: ScheduleJob(core::mem::transmute(hprinter), core::mem::transmute(jobid)) } #[inline] -pub unsafe fn SetCPSUIUserData(hdlg: P0, cpsuiuserdata: usize) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetCPSUIUserData(hdlg: super::super::Foundation::HWND, cpsuiuserdata: usize) -> super::super::Foundation::BOOL { windows_targets::link!("compstui.dll" "system" fn SetCPSUIUserData(hdlg : super::super::Foundation:: HWND, cpsuiuserdata : usize) -> super::super::Foundation:: BOOL); - SetCPSUIUserData(hdlg.param().abi(), core::mem::transmute(cpsuiuserdata)) + SetCPSUIUserData(core::mem::transmute(hdlg), core::mem::transmute(cpsuiuserdata)) } #[inline] pub unsafe fn SetDefaultPrinterA(pszprinter: P0) -> super::super::Foundation::BOOL @@ -1463,7 +1353,7 @@ where #[inline] pub unsafe fn SetJobA(hprinter: PRINTER_HANDLE, jobid: u32, level: u32, pjob: Option<*const u8>, command: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn SetJobA(hprinter : PRINTER_HANDLE, jobid : u32, level : u32, pjob : *const u8, command : u32) -> super::super::Foundation:: BOOL); - SetJobA(core::mem::transmute(hprinter), core::mem::transmute(jobid), core::mem::transmute(level), core::mem::transmute(pjob.unwrap_or(core::ptr::null())), core::mem::transmute(command)) + SetJobA(core::mem::transmute(hprinter), core::mem::transmute(jobid), core::mem::transmute(level), core::mem::transmute(pjob.unwrap_or(core::mem::zeroed())), core::mem::transmute(command)) } #[inline] pub unsafe fn SetJobNamedProperty(hprinter: PRINTER_HANDLE, jobid: u32, pproperty: *const PrintNamedProperty) -> u32 { @@ -1473,7 +1363,7 @@ pub unsafe fn SetJobNamedProperty(hprinter: PRINTER_HANDLE, jobid: u32, ppropert #[inline] pub unsafe fn SetJobW(hprinter: PRINTER_HANDLE, jobid: u32, level: u32, pjob: Option<*const u8>, command: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn SetJobW(hprinter : PRINTER_HANDLE, jobid : u32, level : u32, pjob : *const u8, command : u32) -> super::super::Foundation:: BOOL); - SetJobW(core::mem::transmute(hprinter), core::mem::transmute(jobid), core::mem::transmute(level), core::mem::transmute(pjob.unwrap_or(core::ptr::null())), core::mem::transmute(command)) + SetJobW(core::mem::transmute(hprinter), core::mem::transmute(jobid), core::mem::transmute(level), core::mem::transmute(pjob.unwrap_or(core::mem::zeroed())), core::mem::transmute(command)) } #[inline] pub unsafe fn SetPortA(pname: P0, pportname: P1, dwlevel: u32, pportinfo: *const u8) -> windows_core::Result<()> @@ -1496,7 +1386,7 @@ where #[inline] pub unsafe fn SetPrinterA(hprinter: PRINTER_HANDLE, level: u32, pprinter: Option<*const u8>, command: u32) -> windows_core::Result<()> { windows_targets::link!("winspool.drv" "system" fn SetPrinterA(hprinter : PRINTER_HANDLE, level : u32, pprinter : *const u8, command : u32) -> super::super::Foundation:: BOOL); - SetPrinterA(core::mem::transmute(hprinter), core::mem::transmute(level), core::mem::transmute(pprinter.unwrap_or(core::ptr::null())), core::mem::transmute(command)).ok() + SetPrinterA(core::mem::transmute(hprinter), core::mem::transmute(level), core::mem::transmute(pprinter.unwrap_or(core::mem::zeroed())), core::mem::transmute(command)).ok() } #[inline] pub unsafe fn SetPrinterDataA(hprinter: PRINTER_HANDLE, pvaluename: P1, r#type: u32, pdata: &[u8]) -> u32 @@ -1535,7 +1425,7 @@ where #[inline] pub unsafe fn SetPrinterW(hprinter: PRINTER_HANDLE, level: u32, pprinter: Option<*const u8>, command: u32) -> windows_core::Result<()> { windows_targets::link!("winspool.drv" "system" fn SetPrinterW(hprinter : PRINTER_HANDLE, level : u32, pprinter : *const u8, command : u32) -> super::super::Foundation:: BOOL); - SetPrinterW(core::mem::transmute(hprinter), core::mem::transmute(level), core::mem::transmute(pprinter.unwrap_or(core::ptr::null())), core::mem::transmute(command)).ok() + SetPrinterW(core::mem::transmute(hprinter), core::mem::transmute(level), core::mem::transmute(pprinter.unwrap_or(core::mem::zeroed())), core::mem::transmute(command)).ok() } #[inline] pub unsafe fn SplIsSessionZero(hprinter: PRINTER_HANDLE, jobid: u32, pissessionzero: *mut super::super::Foundation::BOOL) -> u32 { @@ -1564,12 +1454,12 @@ pub unsafe fn SpoolerFindClosePrinterChangeNotification(hprinter: PRINTER_HANDLE #[inline] pub unsafe fn SpoolerFindFirstPrinterChangeNotification(hprinter: PRINTER_HANDLE, fdwfilterflags: u32, fdwoptions: u32, pprinternotifyoptions: *const core::ffi::c_void, pvreserved: Option<*const core::ffi::c_void>, pnotificationconfig: *const core::ffi::c_void, phnotify: Option<*mut super::super::Foundation::HANDLE>, phevent: Option<*mut super::super::Foundation::HANDLE>) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn SpoolerFindFirstPrinterChangeNotification(hprinter : PRINTER_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(core::mem::transmute(hprinter), core::mem::transmute(fdwfilterflags), core::mem::transmute(fdwoptions), core::mem::transmute(pprinternotifyoptions), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pnotificationconfig), core::mem::transmute(phnotify.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phevent.unwrap_or(core::ptr::null_mut()))) + SpoolerFindFirstPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(fdwfilterflags), core::mem::transmute(fdwoptions), core::mem::transmute(pprinternotifyoptions), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnotificationconfig), core::mem::transmute(phnotify.unwrap_or(core::mem::zeroed())), core::mem::transmute(phevent.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SpoolerFindNextPrinterChangeNotification(hprinter: PRINTER_HANDLE, pfdwchange: *mut u32, pprinternotifyoptions: Option<*const core::ffi::c_void>, ppprinternotifyinfo: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn SpoolerFindNextPrinterChangeNotification(hprinter : PRINTER_HANDLE, pfdwchange : *mut u32, pprinternotifyoptions : *const core::ffi::c_void, ppprinternotifyinfo : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - SpoolerFindNextPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(pfdwchange), core::mem::transmute(pprinternotifyoptions.unwrap_or(core::ptr::null())), core::mem::transmute(ppprinternotifyinfo.unwrap_or(core::ptr::null_mut()))) + SpoolerFindNextPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(pfdwchange), core::mem::transmute(pprinternotifyoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppprinternotifyinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SpoolerFreePrinterNotifyInfo(pinfo: *const PRINTER_NOTIFY_INFO) { @@ -1579,7 +1469,7 @@ pub unsafe fn SpoolerFreePrinterNotifyInfo(pinfo: *const PRINTER_NOTIFY_INFO) { #[inline] pub unsafe fn SpoolerRefreshPrinterChangeNotification(hprinter: PRINTER_HANDLE, dwcolor: u32, poptions: *const PRINTER_NOTIFY_OPTIONS, ppinfo: Option<*mut *mut PRINTER_NOTIFY_INFO>) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn SpoolerRefreshPrinterChangeNotification(hprinter : PRINTER_HANDLE, dwcolor : u32, poptions : *const PRINTER_NOTIFY_OPTIONS, ppinfo : *mut *mut PRINTER_NOTIFY_INFO) -> super::super::Foundation:: BOOL); - SpoolerRefreshPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(dwcolor), core::mem::transmute(poptions), core::mem::transmute(ppinfo.unwrap_or(core::ptr::null_mut()))) + SpoolerRefreshPrinterChangeNotification(core::mem::transmute(hprinter), core::mem::transmute(dwcolor), core::mem::transmute(poptions), core::mem::transmute(ppinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn StartDocPrinterA(hprinter: PRINTER_HANDLE, level: u32, pdocinfo: *const DOC_INFO_1A) -> u32 { @@ -1597,42 +1487,34 @@ pub unsafe fn StartPagePrinter(hprinter: PRINTER_HANDLE) -> super::super::Founda StartPagePrinter(core::mem::transmute(hprinter)) } #[inline] -pub unsafe fn UnRegisterForPrintAsyncNotifications(param0: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnRegisterForPrintAsyncNotifications(param0: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("winspool.drv" "system" fn UnRegisterForPrintAsyncNotifications(param0 : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - UnRegisterForPrintAsyncNotifications(param0.param().abi()).ok() + UnRegisterForPrintAsyncNotifications(core::mem::transmute(param0)).ok() } #[inline] -pub unsafe fn UpdatePrintDeviceObject(hprinter: PRINTER_HANDLE, hdeviceobject: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn UpdatePrintDeviceObject(hprinter: PRINTER_HANDLE, hdeviceobject: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("spoolss.dll" "system" fn UpdatePrintDeviceObject(hprinter : PRINTER_HANDLE, hdeviceobject : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - UpdatePrintDeviceObject(core::mem::transmute(hprinter), hdeviceobject.param().abi()).ok() + UpdatePrintDeviceObject(core::mem::transmute(hprinter), core::mem::transmute(hdeviceobject)).ok() } #[inline] -pub unsafe fn UploadPrinterDriverPackageA(pszserver: P0, pszinfpath: P1, pszenvironment: P2, dwflags: u32, hwnd: P4, pszdestinfpath: windows_core::PSTR, pcchdestinfpath: *mut u32) -> windows_core::Result<()> +pub unsafe fn UploadPrinterDriverPackageA(pszserver: P0, pszinfpath: P1, pszenvironment: P2, dwflags: u32, hwnd: super::super::Foundation::HWND, pszdestinfpath: windows_core::PSTR, pcchdestinfpath: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn UploadPrinterDriverPackageA(pszserver : windows_core::PCSTR, pszinfpath : windows_core::PCSTR, pszenvironment : windows_core::PCSTR, dwflags : u32, hwnd : super::super::Foundation:: HWND, pszdestinfpath : windows_core::PSTR, pcchdestinfpath : *mut u32) -> windows_core::HRESULT); - UploadPrinterDriverPackageA(pszserver.param().abi(), pszinfpath.param().abi(), pszenvironment.param().abi(), core::mem::transmute(dwflags), hwnd.param().abi(), core::mem::transmute(pszdestinfpath), core::mem::transmute(pcchdestinfpath)).ok() + UploadPrinterDriverPackageA(pszserver.param().abi(), pszinfpath.param().abi(), pszenvironment.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(hwnd), core::mem::transmute(pszdestinfpath), core::mem::transmute(pcchdestinfpath)).ok() } #[inline] -pub unsafe fn UploadPrinterDriverPackageW(pszserver: P0, pszinfpath: P1, pszenvironment: P2, dwflags: u32, hwnd: P4, pszdestinfpath: windows_core::PWSTR, pcchdestinfpath: *mut u32) -> windows_core::Result<()> +pub unsafe fn UploadPrinterDriverPackageW(pszserver: P0, pszinfpath: P1, pszenvironment: P2, dwflags: u32, hwnd: super::super::Foundation::HWND, pszdestinfpath: windows_core::PWSTR, pcchdestinfpath: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn UploadPrinterDriverPackageW(pszserver : windows_core::PCWSTR, pszinfpath : windows_core::PCWSTR, pszenvironment : windows_core::PCWSTR, dwflags : u32, hwnd : super::super::Foundation:: HWND, pszdestinfpath : windows_core::PWSTR, pcchdestinfpath : *mut u32) -> windows_core::HRESULT); - UploadPrinterDriverPackageW(pszserver.param().abi(), pszinfpath.param().abi(), pszenvironment.param().abi(), core::mem::transmute(dwflags), hwnd.param().abi(), core::mem::transmute(pszdestinfpath), core::mem::transmute(pcchdestinfpath)).ok() + UploadPrinterDriverPackageW(pszserver.param().abi(), pszinfpath.param().abi(), pszenvironment.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(hwnd), core::mem::transmute(pszdestinfpath), core::mem::transmute(pcchdestinfpath)).ok() } #[inline] pub unsafe fn WaitForPrinterChange(hprinter: PRINTER_HANDLE, flags: u32) -> u32 { @@ -1645,21 +1527,20 @@ pub unsafe fn WritePrinter(hprinter: PRINTER_HANDLE, pbuf: *const core::ffi::c_v WritePrinter(core::mem::transmute(hprinter), core::mem::transmute(pbuf), core::mem::transmute(cbbuf), core::mem::transmute(pcwritten)) } #[inline] -pub unsafe fn XcvDataW(hxcv: P0, pszdataname: P1, pinputdata: Option<&[u8]>, poutputdata: Option<&mut [u8]>, pcboutputneeded: *mut u32, pdwstatus: Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn XcvDataW(hxcv: super::super::Foundation::HANDLE, pszdataname: P1, pinputdata: Option<&[u8]>, poutputdata: Option<&mut [u8]>, pcboutputneeded: *mut u32, pdwstatus: Option<*mut u32>) -> super::super::Foundation::BOOL where - P0: windows_core::Param, 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(), + core::mem::transmute(hxcv), 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()), core::mem::transmute(pcboutputneeded), - core::mem::transmute(pdwstatus.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdwstatus.unwrap_or(core::mem::zeroed())), ) } #[repr(C)] @@ -5592,7 +5473,7 @@ windows_core::imp::define_interface!(IPrintAsyncNotifyDataObject, IPrintAsyncNot 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(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() + (windows_core::Interface::vtable(self).AcquireData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnotificationdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(psize.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppschema.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReleaseData(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseData)(windows_core::Interface::as_raw(self)).ok() @@ -5811,7 +5692,7 @@ impl IPrintCoreHelper { P2: 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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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: P2, pfopairs: *const PRINT_FEATURE_OPTION, cpairs: u32, pcpairswritten: *mut u32, pdwresult: *mut u32) -> windows_core::Result<()> @@ -5833,7 +5714,7 @@ impl IPrintCoreHelper { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), core::mem::transmute(cbsize), pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), core::mem::transmute(ppfoconstraints), core::mem::transmute(pdwnumoptions)).ok() + (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), core::mem::transmute(ppfoconstraints), core::mem::transmute(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), core::mem::transmute(pfeaturelist), core::mem::transmute(pdwnumfeatures)).ok() @@ -6116,7 +5997,7 @@ impl IPrintCoreHelperUni2 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetNamedCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), core::mem::transmute(cbsize), pszcommandname.param().abi(), core::mem::transmute(ppcommandbytes), core::mem::transmute(pcbcommandsize)).ok() + (windows_core::Interface::vtable(self).GetNamedCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), pszcommandname.param().abi(), core::mem::transmute(ppcommandbytes), core::mem::transmute(pcbcommandsize)).ok() } } #[repr(C)] @@ -6155,11 +6036,11 @@ impl core::ops::Deref for IPrintCoreUI2 { } windows_core::imp::interface_hierarchy!(IPrintCoreUI2, windows_core::IUnknown, IPrintOemDriverUI); impl IPrintCoreUI2 { - pub unsafe fn GetOptions(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pmszfeaturesrequested: Option<&[u8]>, pmszfeatureoptionbuf: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { + pub unsafe fn GetOptions(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pmszfeaturesrequested: Option<&[u8]>, pmszfeatureoptionbuf: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetOptions)( windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), - core::mem::transmute(dwflags), + core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmszfeaturesrequested.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszfeaturesrequested.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pmszfeatureoptionbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -6172,54 +6053,51 @@ impl IPrintCoreUI2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SetOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags), core::mem::transmute(pmszfeatureoptionbuf.as_ptr()), pmszfeatureoptionbuf.len().try_into().unwrap(), &mut result__).map(|| result__) } - pub unsafe fn EnumConstrainedOptions(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pszfeaturekeyword: P2, pmszconstrainedoptionlist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> + pub unsafe fn EnumConstrainedOptions(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pszfeaturekeyword: P2, pmszconstrainedoptionlist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).EnumConstrainedOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags), pszfeaturekeyword.param().abi(), core::mem::transmute(pmszconstrainedoptionlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszconstrainedoptionlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() + (windows_core::Interface::vtable(self).EnumConstrainedOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), pszfeaturekeyword.param().abi(), core::mem::transmute(pmszconstrainedoptionlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszconstrainedoptionlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() } - pub unsafe fn WhyConstrained(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pszfeaturekeyword: P2, pszoptionkeyword: P3, pmszreasonlist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> + pub unsafe fn WhyConstrained(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pszfeaturekeyword: P2, pszoptionkeyword: P3, pmszreasonlist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags), pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), core::mem::transmute(pmszreasonlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszreasonlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() + (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), core::mem::transmute(pmszreasonlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszreasonlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() } - pub unsafe fn GetGlobalAttribute(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pszattribute: P2, pdwdatatype: *mut u32, pbdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetGlobalAttribute(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pszattribute: P2, pdwdatatype: *mut u32, pbdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGlobalAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), 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()), core::mem::transmute(pcbneeded)).ok() + (windows_core::Interface::vtable(self).GetGlobalAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), 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()), core::mem::transmute(pcbneeded)).ok() } - pub unsafe fn GetFeatureAttribute(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pszfeaturekeyword: P2, pszattribute: P3, pdwdatatype: *mut u32, pbdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetFeatureAttribute(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pszfeaturekeyword: P2, pszattribute: P3, pdwdatatype: *mut u32, pbdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFeatureAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags), pszfeaturekeyword.param().abi(), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), 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()), core::mem::transmute(pcbneeded)).ok() + (windows_core::Interface::vtable(self).GetFeatureAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), pszfeaturekeyword.param().abi(), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), 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()), core::mem::transmute(pcbneeded)).ok() } - pub unsafe fn GetOptionAttribute(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pszfeaturekeyword: P2, pszoptionkeyword: P3, pszattribute: P4, pdwdatatype: *mut u32, pbdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetOptionAttribute(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pszfeaturekeyword: P2, pszoptionkeyword: P3, pszattribute: P4, pdwdatatype: *mut u32, pbdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).GetOptionAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags), pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), 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()), core::mem::transmute(pcbneeded)).ok() + (windows_core::Interface::vtable(self).GetOptionAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), pszattribute.param().abi(), core::mem::transmute(pdwdatatype), 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()), core::mem::transmute(pcbneeded)).ok() } - pub unsafe fn EnumFeatures(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pmszfeaturelist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnumFeatures)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags), core::mem::transmute(pmszfeaturelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszfeaturelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() + pub unsafe fn EnumFeatures(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pmszfeaturelist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnumFeatures)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmszfeaturelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszfeaturelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() } - pub unsafe fn EnumOptions(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pszfeaturekeyword: P2, pmszoptionlist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> + pub unsafe fn EnumOptions(&self, poemuiobj: *const OEMUIOBJ, dwflags: Option, pszfeaturekeyword: P2, pmszoptionlist: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).EnumOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags), pszfeaturekeyword.param().abi(), core::mem::transmute(pmszoptionlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszoptionlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() + (windows_core::Interface::vtable(self).EnumOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), pszfeaturekeyword.param().abi(), core::mem::transmute(pmszoptionlist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pmszoptionlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() } - pub unsafe fn QuerySimulationSupport(&self, hprinter: P0, dwlevel: u32, pcaps: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).QuerySimulationSupport)(windows_core::Interface::as_raw(self), hprinter.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(pcaps.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcaps.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() + pub unsafe fn QuerySimulationSupport(&self, hprinter: super::super::Foundation::HANDLE, dwlevel: u32, pcaps: Option<&mut [u8]>, pcbneeded: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).QuerySimulationSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), core::mem::transmute(dwlevel), core::mem::transmute(pcaps.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcaps.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbneeded)).ok() } } #[repr(C)] @@ -6587,13 +6465,12 @@ impl IPrintOemDriverUI { { (windows_core::Interface::vtable(self).DrvGetDriverSetting)(windows_core::Interface::as_raw(self), core::mem::transmute(pci), feature.param().abi(), core::mem::transmute(poutput), core::mem::transmute(cbsize), core::mem::transmute(pcbneeded), core::mem::transmute(pdwoptionsreturned)).ok() } - pub unsafe fn DrvUpgradeRegistrySetting(&self, hprinter: P0, pfeature: P1, poption: P2) -> windows_core::Result<()> + pub unsafe fn DrvUpgradeRegistrySetting(&self, hprinter: super::super::Foundation::HANDLE, pfeature: P1, poption: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DrvUpgradeRegistrySetting)(windows_core::Interface::as_raw(self), hprinter.param().abi(), pfeature.param().abi(), poption.param().abi()).ok() + (windows_core::Interface::vtable(self).DrvUpgradeRegistrySetting)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), pfeature.param().abi(), poption.param().abi()).ok() } pub unsafe fn DrvUpdateUISetting(&self, pci: *mut core::ffi::c_void, poptitem: *mut core::ffi::c_void, dwpreviousselection: u32, dwmode: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DrvUpdateUISetting)(windows_core::Interface::as_raw(self), core::mem::transmute(pci), core::mem::transmute(poptitem), core::mem::transmute(dwpreviousselection), core::mem::transmute(dwmode)).ok() @@ -6656,64 +6533,47 @@ impl IPrintOemUI { pub unsafe fn CommonUIProp(&self, dwmode: u32, poemcuipparam: *const OEMCUIPPARAM) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CommonUIProp)(windows_core::Interface::as_raw(self), core::mem::transmute(dwmode), core::mem::transmute(poemcuipparam)).ok() } - pub unsafe fn DocumentPropertySheets(&self, ppsuiinfo: *mut PROPSHEETUI_INFO, lparam: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).DocumentPropertySheets)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsuiinfo), lparam.param().abi()).ok() + pub unsafe fn DocumentPropertySheets(&self, ppsuiinfo: *mut PROPSHEETUI_INFO, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DocumentPropertySheets)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsuiinfo), core::mem::transmute(lparam)).ok() } - pub unsafe fn DevicePropertySheets(&self, ppsuiinfo: *const PROPSHEETUI_INFO, lparam: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).DevicePropertySheets)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsuiinfo), lparam.param().abi()).ok() + pub unsafe fn DevicePropertySheets(&self, ppsuiinfo: *const PROPSHEETUI_INFO, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DevicePropertySheets)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsuiinfo), core::mem::transmute(lparam)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn DevQueryPrintEx(&self, poemuiobj: *const OEMUIOBJ, pdqpinfo: *const DEVQUERYPRINT_INFO, ppublicdm: *const super::Gdi::DEVMODEA, poemdm: *const core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DevQueryPrintEx)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(pdqpinfo), core::mem::transmute(ppublicdm), core::mem::transmute(poemdm)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn DeviceCapabilitiesA(&self, poemuiobj: *mut OEMUIOBJ, hprinter: P1, pdevicename: P2, wcapability: u16, poutput: *mut core::ffi::c_void, ppublicdm: *const super::Gdi::DEVMODEA, poemdm: *const core::ffi::c_void, dwold: u32, dwresult: *mut u32) -> windows_core::Result<()> + pub unsafe fn DeviceCapabilitiesA(&self, poemuiobj: *mut OEMUIOBJ, hprinter: super::super::Foundation::HANDLE, pdevicename: P2, wcapability: u16, poutput: *mut core::ffi::c_void, ppublicdm: *const super::Gdi::DEVMODEA, poemdm: *const core::ffi::c_void, dwold: u32, dwresult: *mut u32) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DeviceCapabilitiesA)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(wcapability), core::mem::transmute(poutput), core::mem::transmute(ppublicdm), core::mem::transmute(poemdm), core::mem::transmute(dwold), core::mem::transmute(dwresult)).ok() + (windows_core::Interface::vtable(self).DeviceCapabilitiesA)(windows_core::Interface::as_raw(self), core::mem::transmute(poemuiobj), core::mem::transmute(hprinter), pdevicename.param().abi(), core::mem::transmute(wcapability), core::mem::transmute(poutput), core::mem::transmute(ppublicdm), core::mem::transmute(poemdm), core::mem::transmute(dwold), core::mem::transmute(dwresult)).ok() } pub unsafe fn UpgradePrinter(&self, dwlevel: u32, pdriverupgradeinfo: *const u8) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpgradePrinter)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlevel), core::mem::transmute(pdriverupgradeinfo)).ok() } - pub unsafe fn PrinterEvent(&self, pprintername: P0, idriverevent: i32, dwflags: u32, lparam: P3) -> windows_core::Result<()> + pub unsafe fn PrinterEvent(&self, pprintername: P0, idriverevent: i32, dwflags: u32, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).PrinterEvent)(windows_core::Interface::as_raw(self), pprintername.param().abi(), core::mem::transmute(idriverevent), core::mem::transmute(dwflags), lparam.param().abi()).ok() + (windows_core::Interface::vtable(self).PrinterEvent)(windows_core::Interface::as_raw(self), pprintername.param().abi(), core::mem::transmute(idriverevent), core::mem::transmute(dwflags), core::mem::transmute(lparam)).ok() } - pub unsafe fn DriverEvent(&self, dwdriverevent: u32, dwlevel: u32, pdriverinfo: *const u8, lparam: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).DriverEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdriverevent), core::mem::transmute(dwlevel), core::mem::transmute(pdriverinfo), lparam.param().abi()).ok() + pub unsafe fn DriverEvent(&self, dwdriverevent: u32, dwlevel: u32, pdriverinfo: *const u8, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DriverEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdriverevent), core::mem::transmute(dwlevel), core::mem::transmute(pdriverinfo), core::mem::transmute(lparam)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn QueryColorProfile(&self, hprinter: PRINTER_HANDLE, poemuiobj: *const OEMUIOBJ, ppublicdm: *const super::Gdi::DEVMODEA, poemdm: *const core::ffi::c_void, ulquerymode: u32, pvprofiledata: *mut core::ffi::c_void, pcbprofiledata: *mut u32, pflprofiledata: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryColorProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), core::mem::transmute(poemuiobj), core::mem::transmute(ppublicdm), core::mem::transmute(poemdm), core::mem::transmute(ulquerymode), core::mem::transmute(pvprofiledata), core::mem::transmute(pcbprofiledata), core::mem::transmute(pflprofiledata)).ok() } - pub unsafe fn FontInstallerDlgProc(&self, hwnd: P0, usmsg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).FontInstallerDlgProc)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(usmsg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn FontInstallerDlgProc(&self, hwnd: super::super::Foundation::HWND, usmsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).FontInstallerDlgProc)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(usmsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn UpdateExternalFonts(&self, hprinter: PRINTER_HANDLE, hheap: P1, pwstrcartridges: P2) -> windows_core::Result<()> + pub unsafe fn UpdateExternalFonts(&self, hprinter: PRINTER_HANDLE, hheap: super::super::Foundation::HANDLE, pwstrcartridges: P2) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateExternalFonts)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), hheap.param().abi(), pwstrcartridges.param().abi()).ok() + (windows_core::Interface::vtable(self).UpdateExternalFonts)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), core::mem::transmute(hheap), pwstrcartridges.param().abi()).ok() } } #[repr(C)] @@ -6849,11 +6709,8 @@ impl IPrintOemUI2 { (windows_core::Interface::vtable(self).HideStandardUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dwmode)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn DocumentEvent(&self, hprinter: PRINTER_HANDLE, hdc: P1, iesc: i32, cbin: u32, pvin: *mut core::ffi::c_void, cbout: u32, pvout: *mut core::ffi::c_void, piresult: *mut i32) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).DocumentEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), hdc.param().abi(), core::mem::transmute(iesc), core::mem::transmute(cbin), core::mem::transmute(pvin), core::mem::transmute(cbout), core::mem::transmute(pvout), core::mem::transmute(piresult)).ok() + pub unsafe fn DocumentEvent(&self, hprinter: PRINTER_HANDLE, hdc: super::Gdi::HDC, iesc: i32, cbin: u32, pvin: *mut core::ffi::c_void, cbout: u32, pvout: *mut core::ffi::c_void, piresult: *mut i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DocumentEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hprinter), core::mem::transmute(hdc), core::mem::transmute(iesc), core::mem::transmute(cbin), core::mem::transmute(pvin), core::mem::transmute(cbout), core::mem::transmute(pvout), core::mem::transmute(piresult)).ok() } } #[repr(C)] @@ -7247,7 +7104,7 @@ windows_core::imp::define_interface!(IPrintReadStream, IPrintReadStream_Vtbl, 0x 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), core::mem::transmute(dlibmove), core::mem::transmute(dworigin), core::mem::transmute(plibnewposition.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), core::mem::transmute(dlibmove), core::mem::transmute(dworigin), core::mem::transmute(plibnewposition.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pvbuffer), core::mem::transmute(cbrequested), core::mem::transmute(pcbread), core::mem::transmute(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 436a93ef62..b8a5f1d9d1 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(core::ptr::null_mut()))).ok() + ApplyLocalManagementSyncML(syncmlrequest.param().abi(), core::mem::transmute(syncmlresult.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DiscoverManagementService(pszupn: P0) -> windows_core::Result<*mut MANAGEMENT_SERVICE_INFO> @@ -26,12 +26,12 @@ where DiscoverManagementServiceEx(pszupn.param().abi(), pszdiscoveryservicecandidate.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetDeviceManagementConfigInfo(providerid: P0, configstringbufferlength: *mut u32, configstring: windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn GetDeviceManagementConfigInfo(providerid: P0, configstringbufferlength: *mut u32, configstring: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("mdmregistration.dll" "system" fn GetDeviceManagementConfigInfo(providerid : windows_core::PCWSTR, configstringbufferlength : *mut u32, configstring : windows_core::PWSTR) -> windows_core::HRESULT); - GetDeviceManagementConfigInfo(providerid.param().abi(), core::mem::transmute(configstringbufferlength), core::mem::transmute(configstring)).ok() + GetDeviceManagementConfigInfo(providerid.param().abi(), core::mem::transmute(configstringbufferlength), core::mem::transmute(configstring.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn GetDeviceRegistrationInfo(deviceinformationclass: REGISTRATION_INFORMATION_CLASS, ppdeviceregistrationinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -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(core::ptr::null_mut()))).ok() + RegisterDeviceWithLocalManagement(core::mem::transmute(alreadyregistered.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RegisterDeviceWithManagement(pszupn: P0, ppszmdmserviceuri: P1, ppzsaccesstoken: P2) -> windows_core::Result<()> @@ -76,12 +76,9 @@ where RegisterDeviceWithManagement(pszupn.param().abi(), ppszmdmserviceuri.param().abi(), ppzsaccesstoken.param().abi()).ok() } #[inline] -pub unsafe fn RegisterDeviceWithManagementUsingAADCredentials(usertoken: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterDeviceWithManagementUsingAADCredentials(usertoken: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("mdmregistration.dll" "system" fn RegisterDeviceWithManagementUsingAADCredentials(usertoken : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - RegisterDeviceWithManagementUsingAADCredentials(usertoken.param().abi()).ok() + RegisterDeviceWithManagementUsingAADCredentials(core::mem::transmute(usertoken)).ok() } #[inline] pub unsafe fn RegisterDeviceWithManagementUsingAADDeviceCredentials() -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs index c0dcdb694b..ff33c1d514 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs @@ -1187,11 +1187,8 @@ impl core::ops::Deref for IAudioSystemEffects2 { } windows_core::imp::interface_hierarchy!(IAudioSystemEffects2, windows_core::IUnknown, IAudioSystemEffects); impl IAudioSystemEffects2 { - pub unsafe fn GetEffectsList(&self, ppeffectsids: *mut *mut windows_core::GUID, pceffects: *mut u32, event: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetEffectsList)(windows_core::Interface::as_raw(self), core::mem::transmute(ppeffectsids), core::mem::transmute(pceffects), event.param().abi()).ok() + pub unsafe fn GetEffectsList(&self, ppeffectsids: *mut *mut windows_core::GUID, pceffects: *mut u32, event: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetEffectsList)(windows_core::Interface::as_raw(self), core::mem::transmute(ppeffectsids), core::mem::transmute(pceffects), core::mem::transmute(event)).ok() } } #[repr(C)] @@ -1224,11 +1221,8 @@ impl core::ops::Deref for IAudioSystemEffects3 { } windows_core::imp::interface_hierarchy!(IAudioSystemEffects3, windows_core::IUnknown, IAudioSystemEffects, IAudioSystemEffects2); impl IAudioSystemEffects3 { - pub unsafe fn GetControllableSystemEffectsList(&self, effects: *mut *mut AUDIO_SYSTEMEFFECT, numeffects: *mut u32, event: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetControllableSystemEffectsList)(windows_core::Interface::as_raw(self), core::mem::transmute(effects), core::mem::transmute(numeffects), event.param().abi()).ok() + pub unsafe fn GetControllableSystemEffectsList(&self, effects: *mut *mut AUDIO_SYSTEMEFFECT, numeffects: *mut u32, event: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetControllableSystemEffectsList)(windows_core::Interface::as_raw(self), core::mem::transmute(effects), core::mem::transmute(numeffects), core::mem::transmute(event.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetAudioSystemEffectState(&self, effectid: windows_core::GUID, state: AUDIO_SYSTEMEFFECT_STATE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAudioSystemEffectState)(windows_core::Interface::as_raw(self), core::mem::transmute(effectid), core::mem::transmute(state)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs index 7f0980fa97..de4a0e0cb6 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs @@ -1001,12 +1001,11 @@ impl IDirectMusic { (windows_core::Interface::vtable(self).GetDefaultPort)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidport)).ok() } #[cfg(feature = "Win32_Media_Audio_DirectSound")] - pub unsafe fn SetDirectSound(&self, pdirectsound: P0, hwnd: P1) -> windows_core::Result<()> + pub unsafe fn SetDirectSound(&self, pdirectsound: P0, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetDirectSound)(windows_core::Interface::as_raw(self), pdirectsound.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).SetDirectSound)(windows_core::Interface::as_raw(self), pdirectsound.param().abi(), core::mem::transmute(hwnd)).ok() } } #[repr(C)] @@ -1427,11 +1426,8 @@ impl IDirectMusicPort { { (windows_core::Interface::vtable(self).PlayBuffer)(windows_core::Interface::as_raw(self), pbuffer.param().abi()).ok() } - pub unsafe fn SetReadNotificationHandle(&self, hevent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReadNotificationHandle)(windows_core::Interface::as_raw(self), hevent.param().abi()).ok() + pub unsafe fn SetReadNotificationHandle(&self, hevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReadNotificationHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent)).ok() } pub unsafe fn Read(&self, pbuffer: P0) -> windows_core::Result<()> where @@ -1765,12 +1761,8 @@ impl IDirectMusicSynth { pub unsafe fn Download(&self, phdownload: *mut super::super::super::Foundation::HANDLE, pvdata: *mut core::ffi::c_void, pbfree: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Download)(windows_core::Interface::as_raw(self), core::mem::transmute(phdownload), core::mem::transmute(pvdata), core::mem::transmute(pbfree)).ok() } - pub unsafe fn Unload(&self, hdownload: P0, lpfreehandle: isize, huserdata: P2) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Unload)(windows_core::Interface::as_raw(self), hdownload.param().abi(), core::mem::transmute(lpfreehandle), huserdata.param().abi()).ok() + pub unsafe fn Unload(&self, hdownload: super::super::super::Foundation::HANDLE, lpfreehandle: isize, huserdata: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Unload)(windows_core::Interface::as_raw(self), core::mem::transmute(hdownload), core::mem::transmute(lpfreehandle), core::mem::transmute(huserdata)).ok() } pub unsafe fn PlayBuffer(&self, rt: i64, pbbuffer: *mut u8, cbbuffer: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).PlayBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(rt), core::mem::transmute(pbbuffer), core::mem::transmute(cbbuffer)).ok() 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 041ae47dc0..3e76e703f9 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 P2: 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(core::ptr::null())), core::mem::transmute(ppdsc), punkouter.param().abi()).ok() + DirectSoundCaptureCreate(core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdsc), punkouter.param().abi()).ok() } #[inline] pub unsafe fn DirectSoundCaptureCreate8(pcguiddevice: Option<*const windows_core::GUID>, ppdsc8: *mut Option, punkouter: P2) -> windows_core::Result<()> @@ -12,17 +12,17 @@ where P2: 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(core::ptr::null())), core::mem::transmute(ppdsc8), punkouter.param().abi()).ok() + DirectSoundCaptureCreate8(core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(pdsenumcallback), core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))).ok() + DirectSoundCaptureEnumerateA(core::mem::transmute(pdsenumcallback), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pdsenumcallback), core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))).ok() + DirectSoundCaptureEnumerateW(core::mem::transmute(pdsenumcallback), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DirectSoundCreate(pcguiddevice: Option<*const windows_core::GUID>, ppds: *mut Option, punkouter: P2) -> windows_core::Result<()> @@ -30,7 +30,7 @@ where P2: 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(core::ptr::null())), core::mem::transmute(ppds), punkouter.param().abi()).ok() + DirectSoundCreate(core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppds), punkouter.param().abi()).ok() } #[inline] pub unsafe fn DirectSoundCreate8(pcguiddevice: Option<*const windows_core::GUID>, ppds8: *mut Option, punkouter: P2) -> windows_core::Result<()> @@ -38,32 +38,31 @@ where P2: 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(core::ptr::null())), core::mem::transmute(ppds8), punkouter.param().abi()).ok() + DirectSoundCreate8(core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(pdsenumcallback), core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))).ok() + DirectSoundEnumerateA(core::mem::transmute(pdsenumcallback), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pdsenumcallback), core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))).ok() + DirectSoundEnumerateW(core::mem::transmute(pdsenumcallback), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).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: P4, dwlevel: u32, ppdsfd: *mut Option, ppdscbuffer8: *mut Option, ppdsbuffer8: *mut Option, punkouter: P9) -> windows_core::Result<()> +pub unsafe fn DirectSoundFullDuplexCreate(pcguidcapturedevice: Option<*const windows_core::GUID>, pcguidrenderdevice: Option<*const windows_core::GUID>, pcdscbufferdesc: *const DSCBUFFERDESC, pcdsbufferdesc: *const DSBUFFERDESC, hwnd: super::super::super::Foundation::HWND, dwlevel: u32, ppdsfd: *mut Option, ppdscbuffer8: *mut Option, ppdsbuffer8: *mut Option, punkouter: P9) -> windows_core::Result<()> where - P4: windows_core::Param, P9: 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(core::ptr::null())), core::mem::transmute(pcguidrenderdevice.unwrap_or(core::ptr::null())), core::mem::transmute(pcdscbufferdesc), core::mem::transmute(pcdsbufferdesc), hwnd.param().abi(), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(pcguidrenderdevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdscbufferdesc), core::mem::transmute(pcdsbufferdesc), core::mem::transmute(hwnd), core::mem::transmute(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(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + GetDeviceID(core::mem::transmute(pguidsrc.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } pub const CLSID_DirectSound: windows_core::GUID = windows_core::GUID::from_u128(0x47d4d946_62e8_11cf_93bc_444553540000); pub const CLSID_DirectSound8: windows_core::GUID = windows_core::GUID::from_u128(0x3901cc3f_84b5_4fa4_ba35_aa8172b8a09b); @@ -846,11 +845,8 @@ impl IDirectSound { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DuplicateSoundBuffer)(windows_core::Interface::as_raw(self), pdsbufferoriginal.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetCooperativeLevel(&self, hwnd: P0, dwlevel: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(dwlevel)).ok() + pub unsafe fn SetCooperativeLevel(&self, hwnd: super::super::super::Foundation::HWND, dwlevel: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCooperativeLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(dwlevel)).ok() } pub unsafe fn Compact(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Compact)(windows_core::Interface::as_raw(self)).ok() @@ -863,7 +859,7 @@ impl IDirectSound { (windows_core::Interface::vtable(self).SetSpeakerConfig)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -1501,10 +1497,10 @@ impl IDirectSoundBuffer { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pdwcurrentwritecursor.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcurrentplaycursor.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwcurrentwritecursor.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(dwsizeallocated), core::mem::transmute(pdwsizewritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwfxformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsizeallocated), core::mem::transmute(pdwsizewritten.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetVolume(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1529,7 +1525,7 @@ impl IDirectSoundBuffer { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pdirectsound.param().abi(), core::mem::transmute(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), core::mem::transmute(dwoffset), core::mem::transmute(dwbytes), core::mem::transmute(ppvaudioptr1), core::mem::transmute(pdwaudiobytes1), core::mem::transmute(ppvaudioptr2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwaudiobytes2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoffset), core::mem::transmute(dwbytes), core::mem::transmute(ppvaudioptr1), core::mem::transmute(pdwaudiobytes1), core::mem::transmute(ppvaudioptr2.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwaudiobytes2.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(dwreserved1), core::mem::transmute(dwpriority), core::mem::transmute(dwflags)).ok() @@ -1553,7 +1549,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), core::mem::transmute(pvaudioptr1), core::mem::transmute(dwaudiobytes1), core::mem::transmute(pvaudioptr2.unwrap_or(core::ptr::null())), core::mem::transmute(dwaudiobytes2)).ok() + (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), core::mem::transmute(pvaudioptr1), core::mem::transmute(dwaudiobytes1), core::mem::transmute(pvaudioptr2.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwaudiobytes2)).ok() } pub unsafe fn Restore(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self)).ok() @@ -1736,7 +1732,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), core::mem::transmute(dweffectscount), core::mem::transmute(pdsfxdesc.unwrap_or(core::ptr::null())), core::mem::transmute(pdwresultcodes.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetFX)(windows_core::Interface::as_raw(self), core::mem::transmute(dweffectscount), core::mem::transmute(pdsfxdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwresultcodes.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwflags), pdwresultcodes.len().try_into().unwrap(), core::mem::transmute(pdwresultcodes.as_ptr())).ok() @@ -1797,7 +1793,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcguiddevice.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -1852,10 +1848,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(core::ptr::null_mut())), core::mem::transmute(pdwreadposition.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcaptureposition.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwreadposition.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(dwsizeallocated), core::mem::transmute(pdwsizewritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwfxformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsizeallocated), core::mem::transmute(pdwsizewritten.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1868,7 +1864,7 @@ impl IDirectSoundCaptureBuffer { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pdirectsoundcapture.param().abi(), core::mem::transmute(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), core::mem::transmute(dwoffset), core::mem::transmute(dwbytes), core::mem::transmute(ppvaudioptr1), core::mem::transmute(pdwaudiobytes1), core::mem::transmute(ppvaudioptr2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwaudiobytes2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoffset), core::mem::transmute(dwbytes), core::mem::transmute(ppvaudioptr1), core::mem::transmute(pdwaudiobytes1), core::mem::transmute(ppvaudioptr2.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwaudiobytes2.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } pub unsafe fn Start(&self, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags)).ok() @@ -1877,7 +1873,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), core::mem::transmute(pvaudioptr1), core::mem::transmute(dwaudiobytes1), core::mem::transmute(pvaudioptr2.unwrap_or(core::ptr::null())), core::mem::transmute(dwaudiobytes2)).ok() + (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), core::mem::transmute(pvaudioptr1), core::mem::transmute(dwaudiobytes1), core::mem::transmute(pvaudioptr2.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwaudiobytes2)).ok() } } #[repr(C)] @@ -2599,11 +2595,8 @@ impl windows_core::RuntimeName for IDirectSoundFXWavesReverb {} windows_core::imp::define_interface!(IDirectSoundFullDuplex, IDirectSoundFullDuplex_Vtbl, 0xedcb4c7a_daab_4216_a42e_6c50596ddc1d); windows_core::imp::interface_hierarchy!(IDirectSoundFullDuplex, windows_core::IUnknown); impl IDirectSoundFullDuplex { - pub unsafe fn Initialize(&self, pcaptureguid: *const windows_core::GUID, prenderguid: *const windows_core::GUID, lpdscbufferdesc: *const DSCBUFFERDESC, lpdsbufferdesc: *const DSBUFFERDESC, hwnd: P4, dwlevel: u32, lplpdirectsoundcapturebuffer8: *mut Option, lplpdirectsoundbuffer8: *mut Option) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaptureguid), core::mem::transmute(prenderguid), core::mem::transmute(lpdscbufferdesc), core::mem::transmute(lpdsbufferdesc), hwnd.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lplpdirectsoundcapturebuffer8), core::mem::transmute(lplpdirectsoundbuffer8)).ok() + pub unsafe fn Initialize(&self, pcaptureguid: *const windows_core::GUID, prenderguid: *const windows_core::GUID, lpdscbufferdesc: *const DSCBUFFERDESC, lpdsbufferdesc: *const DSBUFFERDESC, hwnd: super::super::super::Foundation::HWND, dwlevel: u32, lplpdirectsoundcapturebuffer8: *mut Option, lplpdirectsoundbuffer8: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcaptureguid), core::mem::transmute(prenderguid), core::mem::transmute(lpdscbufferdesc), core::mem::transmute(lpdsbufferdesc), core::mem::transmute(hwnd), core::mem::transmute(dwlevel), core::mem::transmute(lplpdirectsoundcapturebuffer8), core::mem::transmute(lplpdirectsoundbuffer8)).ok() } } #[repr(C)] 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 37aaf459f8..8fec5acb93 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(core::mem::transmute(clsid), core::mem::transmute(peffect), core::mem::transmute(pinitdat.unwrap_or(core::ptr::null())), core::mem::transmute(initdatabytesize)).ok() + CreateFX(core::mem::transmute(clsid), core::mem::transmute(peffect), core::mem::transmute(pinitdat.unwrap_or(core::mem::zeroed())), core::mem::transmute(initdatabytesize)).ok() } #[inline] pub unsafe fn CreateHrtfApo(init: *const HrtfApoInit) -> windows_core::Result { @@ -280,13 +280,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), core::mem::transmute(poutputformat), core::mem::transmute(prequestedinputformat), core::mem::transmute(ppsupportedinputformat.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsInputFormatSupported)(windows_core::Interface::as_raw(self), core::mem::transmute(poutputformat), core::mem::transmute(prequestedinputformat), core::mem::transmute(ppsupportedinputformat.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pinputformat), core::mem::transmute(prequestedoutputformat), core::mem::transmute(ppsupportedoutputformat.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsOutputFormatSupported)(windows_core::Interface::as_raw(self), core::mem::transmute(pinputformat), core::mem::transmute(prequestedoutputformat), core::mem::transmute(ppsupportedoutputformat.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(databytesize)).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(databytesize)).ok() } pub unsafe fn Reset(&self) { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)) @@ -524,16 +524,16 @@ impl IXAudio2 { where P4: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateSourceVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsourcevoice), core::mem::transmute(psourceformat), core::mem::transmute(flags), core::mem::transmute(maxfrequencyratio), pcallback.param().abi(), core::mem::transmute(psendlist.unwrap_or(core::ptr::null())), core::mem::transmute(peffectchain.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).CreateSourceVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsourcevoice), core::mem::transmute(psourceformat), core::mem::transmute(flags), core::mem::transmute(maxfrequencyratio), pcallback.param().abi(), core::mem::transmute(psendlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(peffectchain.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(inputchannels), core::mem::transmute(inputsamplerate), core::mem::transmute(flags), core::mem::transmute(processingstage), core::mem::transmute(psendlist.unwrap_or(core::ptr::null())), core::mem::transmute(peffectchain.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).CreateSubmixVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsubmixvoice), core::mem::transmute(inputchannels), core::mem::transmute(inputsamplerate), core::mem::transmute(flags), core::mem::transmute(processingstage), core::mem::transmute(psendlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(peffectchain.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn CreateMasteringVoice(&self, ppmasteringvoice: *mut Option, inputchannels: u32, inputsamplerate: u32, flags: u32, szdeviceid: P4, peffectchain: Option<*const XAUDIO2_EFFECT_CHAIN>, streamcategory: super::AUDIO_STREAM_CATEGORY) -> windows_core::Result<()> where P4: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateMasteringVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmasteringvoice), core::mem::transmute(inputchannels), core::mem::transmute(inputsamplerate), core::mem::transmute(flags), szdeviceid.param().abi(), core::mem::transmute(peffectchain.unwrap_or(core::ptr::null())), core::mem::transmute(streamcategory)).ok() + (windows_core::Interface::vtable(self).CreateMasteringVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmasteringvoice), core::mem::transmute(inputchannels), core::mem::transmute(inputsamplerate), core::mem::transmute(flags), szdeviceid.param().abi(), core::mem::transmute(peffectchain.unwrap_or(core::mem::zeroed())), core::mem::transmute(streamcategory)).ok() } pub unsafe fn StartEngine(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StartEngine)(windows_core::Interface::as_raw(self)).ok() @@ -548,7 +548,7 @@ impl IXAudio2 { (windows_core::Interface::vtable(self).GetPerformanceData)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).SetDebugConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute(pdebugconfiguration.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -802,7 +802,7 @@ impl IXAudio2SourceVoice { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), core::mem::transmute(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), core::mem::transmute(pbuffer), core::mem::transmute(pbufferwma.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SubmitSourceBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pbuffer), core::mem::transmute(pbufferwma.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FlushSourceBuffers(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FlushSourceBuffers)(windows_core::Interface::as_raw(self)).ok() @@ -969,10 +969,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetOutputVoices)(windows_core::Interface::as_raw(self), core::mem::transmute(psendlist.unwrap_or(core::mem::zeroed()))).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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetEffectChain)(windows_core::Interface::as_raw(self), core::mem::transmute(peffectchain.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(effectindex), core::mem::transmute(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 d640235a39..2732cd358a 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 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(), core::mem::transmute(riid), core::mem::transmute(activationparams.unwrap_or(core::ptr::null())), completionhandler.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + ActivateAudioInterfaceAsync(deviceinterfacepath.param().abi(), core::mem::transmute(riid), core::mem::transmute(activationparams.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut()))).ok() + CoRegisterMessageFilter(lpmessagefilter.param().abi(), core::mem::transmute(lplpmessagefilter.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CreateCaptureAudioStateMonitor() -> windows_core::Result { @@ -82,66 +82,47 @@ pub unsafe fn CreateRenderAudioStateMonitorForCategoryAndDeviceRole(category: AU CreateRenderAudioStateMonitorForCategoryAndDeviceRole(core::mem::transmute(category), core::mem::transmute(role), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn PlaySoundA(pszsound: P0, hmod: P1, fdwsound: SND_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn PlaySoundA(pszsound: P0, hmod: Option, fdwsound: SND_FLAGS) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn PlaySoundA(pszsound : windows_core::PCSTR, hmod : super::super::Foundation:: HMODULE, fdwsound : SND_FLAGS) -> super::super::Foundation:: BOOL); - PlaySoundA(pszsound.param().abi(), hmod.param().abi(), core::mem::transmute(fdwsound)) + PlaySoundA(pszsound.param().abi(), core::mem::transmute(hmod.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwsound)) } #[inline] -pub unsafe fn PlaySoundW(pszsound: P0, hmod: P1, fdwsound: SND_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn PlaySoundW(pszsound: P0, hmod: Option, fdwsound: SND_FLAGS) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn PlaySoundW(pszsound : windows_core::PCWSTR, hmod : super::super::Foundation:: HMODULE, fdwsound : SND_FLAGS) -> super::super::Foundation:: BOOL); - PlaySoundW(pszsound.param().abi(), hmod.param().abi(), core::mem::transmute(fdwsound)) + PlaySoundW(pszsound.param().abi(), core::mem::transmute(hmod.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwsound)) } #[inline] -pub unsafe fn acmDriverAddA(phadid: *mut HACMDRIVERID, hinstmodule: P1, lparam: P2, dwpriority: u32, fdwadd: u32) -> u32 -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn acmDriverAddA(phadid: *mut HACMDRIVERID, hinstmodule: super::super::Foundation::HINSTANCE, lparam: super::super::Foundation::LPARAM, dwpriority: u32, fdwadd: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverAddA(phadid : *mut HACMDRIVERID, hinstmodule : super::super::Foundation:: HINSTANCE, lparam : super::super::Foundation:: LPARAM, dwpriority : u32, fdwadd : u32) -> u32); - acmDriverAddA(core::mem::transmute(phadid), hinstmodule.param().abi(), lparam.param().abi(), core::mem::transmute(dwpriority), core::mem::transmute(fdwadd)) + acmDriverAddA(core::mem::transmute(phadid), core::mem::transmute(hinstmodule), core::mem::transmute(lparam), core::mem::transmute(dwpriority), core::mem::transmute(fdwadd)) } #[inline] -pub unsafe fn acmDriverAddW(phadid: *mut HACMDRIVERID, hinstmodule: P1, lparam: P2, dwpriority: u32, fdwadd: u32) -> u32 -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn acmDriverAddW(phadid: *mut HACMDRIVERID, hinstmodule: super::super::Foundation::HINSTANCE, lparam: super::super::Foundation::LPARAM, dwpriority: u32, fdwadd: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverAddW(phadid : *mut HACMDRIVERID, hinstmodule : super::super::Foundation:: HINSTANCE, lparam : super::super::Foundation:: LPARAM, dwpriority : u32, fdwadd : u32) -> u32); - acmDriverAddW(core::mem::transmute(phadid), hinstmodule.param().abi(), lparam.param().abi(), core::mem::transmute(dwpriority), core::mem::transmute(fdwadd)) + acmDriverAddW(core::mem::transmute(phadid), core::mem::transmute(hinstmodule), core::mem::transmute(lparam), core::mem::transmute(dwpriority), core::mem::transmute(fdwadd)) } #[inline] -pub unsafe fn acmDriverClose(had: P0, fdwclose: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmDriverClose(had: HACMDRIVER, fdwclose: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverClose(had : HACMDRIVER, fdwclose : u32) -> u32); - acmDriverClose(had.param().abi(), core::mem::transmute(fdwclose)) + acmDriverClose(core::mem::transmute(had), core::mem::transmute(fdwclose)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn acmDriverDetailsA(hadid: P0, padd: *mut ACMDRIVERDETAILSA, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmDriverDetailsA(hadid: HACMDRIVERID, padd: *mut ACMDRIVERDETAILSA, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverDetailsA(hadid : HACMDRIVERID, padd : *mut ACMDRIVERDETAILSA, fdwdetails : u32) -> u32); - acmDriverDetailsA(hadid.param().abi(), core::mem::transmute(padd), core::mem::transmute(fdwdetails)) + acmDriverDetailsA(core::mem::transmute(hadid), core::mem::transmute(padd), core::mem::transmute(fdwdetails)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn acmDriverDetailsW(hadid: P0, padd: *mut ACMDRIVERDETAILSW, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmDriverDetailsW(hadid: HACMDRIVERID, padd: *mut ACMDRIVERDETAILSW, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverDetailsW(hadid : HACMDRIVERID, padd : *mut ACMDRIVERDETAILSW, fdwdetails : u32) -> u32); - acmDriverDetailsW(hadid.param().abi(), core::mem::transmute(padd), core::mem::transmute(fdwdetails)) + acmDriverDetailsW(core::mem::transmute(hadid), core::mem::transmute(padd), core::mem::transmute(fdwdetails)) } #[inline] pub unsafe fn acmDriverEnum(fncallback: ACMDRIVERENUMCB, dwinstance: usize, fdwenum: u32) -> u32 { @@ -149,46 +130,29 @@ pub unsafe fn acmDriverEnum(fncallback: ACMDRIVERENUMCB, dwinstance: usize, fdwe acmDriverEnum(core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] -pub unsafe fn acmDriverID(hao: P0, phadid: *mut HACMDRIVERID, fdwdriverid: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmDriverID(hao: HACMOBJ, phadid: *mut HACMDRIVERID, fdwdriverid: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverID(hao : HACMOBJ, phadid : *mut HACMDRIVERID, fdwdriverid : u32) -> u32); - acmDriverID(hao.param().abi(), core::mem::transmute(phadid), core::mem::transmute(fdwdriverid)) + acmDriverID(core::mem::transmute(hao), core::mem::transmute(phadid), core::mem::transmute(fdwdriverid)) } #[inline] -pub unsafe fn acmDriverMessage(had: P0, umsg: u32, lparam1: P2, lparam2: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn acmDriverMessage(had: HACMDRIVER, umsg: u32, lparam1: super::super::Foundation::LPARAM, lparam2: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("msacm32.dll" "system" fn acmDriverMessage(had : HACMDRIVER, umsg : u32, lparam1 : super::super::Foundation:: LPARAM, lparam2 : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - acmDriverMessage(had.param().abi(), core::mem::transmute(umsg), lparam1.param().abi(), lparam2.param().abi()) + acmDriverMessage(core::mem::transmute(had), core::mem::transmute(umsg), core::mem::transmute(lparam1), core::mem::transmute(lparam2)) } #[inline] -pub unsafe fn acmDriverOpen(phad: *mut HACMDRIVER, hadid: P1, fdwopen: u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn acmDriverOpen(phad: *mut HACMDRIVER, hadid: HACMDRIVERID, fdwopen: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverOpen(phad : *mut HACMDRIVER, hadid : HACMDRIVERID, fdwopen : u32) -> u32); - acmDriverOpen(core::mem::transmute(phad), hadid.param().abi(), core::mem::transmute(fdwopen)) + acmDriverOpen(core::mem::transmute(phad), core::mem::transmute(hadid), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn acmDriverPriority(hadid: P0, dwpriority: u32, fdwpriority: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmDriverPriority(hadid: HACMDRIVERID, dwpriority: u32, fdwpriority: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverPriority(hadid : HACMDRIVERID, dwpriority : u32, fdwpriority : u32) -> u32); - acmDriverPriority(hadid.param().abi(), core::mem::transmute(dwpriority), core::mem::transmute(fdwpriority)) + acmDriverPriority(core::mem::transmute(hadid), core::mem::transmute(dwpriority), core::mem::transmute(fdwpriority)) } #[inline] -pub unsafe fn acmDriverRemove(hadid: P0, fdwremove: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmDriverRemove(hadid: HACMDRIVERID, fdwremove: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmDriverRemove(hadid : HACMDRIVERID, fdwremove : u32) -> u32); - acmDriverRemove(hadid.param().abi(), core::mem::transmute(fdwremove)) + acmDriverRemove(core::mem::transmute(hadid), core::mem::transmute(fdwremove)) } #[inline] pub unsafe fn acmFilterChooseA(pafltrc: *mut ACMFILTERCHOOSEA) -> u32 { @@ -201,68 +165,44 @@ pub unsafe fn acmFilterChooseW(pafltrc: *mut ACMFILTERCHOOSEW) -> u32 { acmFilterChooseW(core::mem::transmute(pafltrc)) } #[inline] -pub unsafe fn acmFilterDetailsA(had: P0, pafd: *mut ACMFILTERDETAILSA, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFilterDetailsA(had: HACMDRIVER, pafd: *mut ACMFILTERDETAILSA, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterDetailsA(had : HACMDRIVER, pafd : *mut ACMFILTERDETAILSA, fdwdetails : u32) -> u32); - acmFilterDetailsA(had.param().abi(), core::mem::transmute(pafd), core::mem::transmute(fdwdetails)) + acmFilterDetailsA(core::mem::transmute(had), core::mem::transmute(pafd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn acmFilterDetailsW(had: P0, pafd: *mut ACMFILTERDETAILSW, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFilterDetailsW(had: HACMDRIVER, pafd: *mut ACMFILTERDETAILSW, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterDetailsW(had : HACMDRIVER, pafd : *mut ACMFILTERDETAILSW, fdwdetails : u32) -> u32); - acmFilterDetailsW(had.param().abi(), core::mem::transmute(pafd), core::mem::transmute(fdwdetails)) + acmFilterDetailsW(core::mem::transmute(had), core::mem::transmute(pafd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn acmFilterEnumA(had: P0, pafd: *mut ACMFILTERDETAILSA, fncallback: ACMFILTERENUMCBA, dwinstance: usize, fdwenum: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFilterEnumA(had: HACMDRIVER, pafd: *mut ACMFILTERDETAILSA, fncallback: ACMFILTERENUMCBA, dwinstance: usize, fdwenum: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterEnumA(had : HACMDRIVER, pafd : *mut ACMFILTERDETAILSA, fncallback : ACMFILTERENUMCBA, dwinstance : usize, fdwenum : u32) -> u32); - acmFilterEnumA(had.param().abi(), core::mem::transmute(pafd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) + acmFilterEnumA(core::mem::transmute(had), core::mem::transmute(pafd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] -pub unsafe fn acmFilterEnumW(had: P0, pafd: *mut ACMFILTERDETAILSW, fncallback: ACMFILTERENUMCBW, dwinstance: usize, fdwenum: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFilterEnumW(had: HACMDRIVER, pafd: *mut ACMFILTERDETAILSW, fncallback: ACMFILTERENUMCBW, dwinstance: usize, fdwenum: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterEnumW(had : HACMDRIVER, pafd : *mut ACMFILTERDETAILSW, fncallback : ACMFILTERENUMCBW, dwinstance : usize, fdwenum : u32) -> u32); - acmFilterEnumW(had.param().abi(), core::mem::transmute(pafd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) + acmFilterEnumW(core::mem::transmute(had), core::mem::transmute(pafd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] -pub unsafe fn acmFilterTagDetailsA(had: P0, paftd: *mut ACMFILTERTAGDETAILSA, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFilterTagDetailsA(had: HACMDRIVER, paftd: *mut ACMFILTERTAGDETAILSA, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterTagDetailsA(had : HACMDRIVER, paftd : *mut ACMFILTERTAGDETAILSA, fdwdetails : u32) -> u32); - acmFilterTagDetailsA(had.param().abi(), core::mem::transmute(paftd), core::mem::transmute(fdwdetails)) + acmFilterTagDetailsA(core::mem::transmute(had), core::mem::transmute(paftd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn acmFilterTagDetailsW(had: P0, paftd: *mut ACMFILTERTAGDETAILSW, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFilterTagDetailsW(had: HACMDRIVER, paftd: *mut ACMFILTERTAGDETAILSW, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterTagDetailsW(had : HACMDRIVER, paftd : *mut ACMFILTERTAGDETAILSW, fdwdetails : u32) -> u32); - acmFilterTagDetailsW(had.param().abi(), core::mem::transmute(paftd), core::mem::transmute(fdwdetails)) + acmFilterTagDetailsW(core::mem::transmute(had), core::mem::transmute(paftd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn acmFilterTagEnumA(had: P0, paftd: *mut ACMFILTERTAGDETAILSA, fncallback: ACMFILTERTAGENUMCBA, dwinstance: usize, fdwenum: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFilterTagEnumA(had: HACMDRIVER, paftd: *mut ACMFILTERTAGDETAILSA, fncallback: ACMFILTERTAGENUMCBA, dwinstance: usize, fdwenum: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterTagEnumA(had : HACMDRIVER, paftd : *mut ACMFILTERTAGDETAILSA, fncallback : ACMFILTERTAGENUMCBA, dwinstance : usize, fdwenum : u32) -> u32); - acmFilterTagEnumA(had.param().abi(), core::mem::transmute(paftd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) + acmFilterTagEnumA(core::mem::transmute(had), core::mem::transmute(paftd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] -pub unsafe fn acmFilterTagEnumW(had: P0, paftd: *mut ACMFILTERTAGDETAILSW, fncallback: ACMFILTERTAGENUMCBW, dwinstance: usize, fdwenum: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFilterTagEnumW(had: HACMDRIVER, paftd: *mut ACMFILTERTAGDETAILSW, fncallback: ACMFILTERTAGENUMCBW, dwinstance: usize, fdwenum: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFilterTagEnumW(had : HACMDRIVER, paftd : *mut ACMFILTERTAGDETAILSW, fncallback : ACMFILTERTAGENUMCBW, dwinstance : usize, fdwenum : u32) -> u32); - acmFilterTagEnumW(had.param().abi(), core::mem::transmute(paftd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) + acmFilterTagEnumW(core::mem::transmute(had), core::mem::transmute(paftd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] pub unsafe fn acmFormatChooseA(pafmtc: *mut ACMFORMATCHOOSEA) -> u32 { @@ -275,76 +215,49 @@ pub unsafe fn acmFormatChooseW(pafmtc: *mut ACMFORMATCHOOSEW) -> u32 { acmFormatChooseW(core::mem::transmute(pafmtc)) } #[inline] -pub unsafe fn acmFormatDetailsA(had: P0, pafd: *mut ACMFORMATDETAILSA, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatDetailsA(had: HACMDRIVER, pafd: *mut ACMFORMATDETAILSA, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatDetailsA(had : HACMDRIVER, pafd : *mut ACMFORMATDETAILSA, fdwdetails : u32) -> u32); - acmFormatDetailsA(had.param().abi(), core::mem::transmute(pafd), core::mem::transmute(fdwdetails)) + acmFormatDetailsA(core::mem::transmute(had), core::mem::transmute(pafd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn acmFormatDetailsW(had: P0, pafd: *mut tACMFORMATDETAILSW, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatDetailsW(had: HACMDRIVER, pafd: *mut tACMFORMATDETAILSW, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatDetailsW(had : HACMDRIVER, pafd : *mut tACMFORMATDETAILSW, fdwdetails : u32) -> u32); - acmFormatDetailsW(had.param().abi(), core::mem::transmute(pafd), core::mem::transmute(fdwdetails)) + acmFormatDetailsW(core::mem::transmute(had), core::mem::transmute(pafd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn acmFormatEnumA(had: P0, pafd: *mut ACMFORMATDETAILSA, fncallback: ACMFORMATENUMCBA, dwinstance: usize, fdwenum: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatEnumA(had: HACMDRIVER, pafd: *mut ACMFORMATDETAILSA, fncallback: ACMFORMATENUMCBA, dwinstance: usize, fdwenum: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatEnumA(had : HACMDRIVER, pafd : *mut ACMFORMATDETAILSA, fncallback : ACMFORMATENUMCBA, dwinstance : usize, fdwenum : u32) -> u32); - acmFormatEnumA(had.param().abi(), core::mem::transmute(pafd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) + acmFormatEnumA(core::mem::transmute(had), core::mem::transmute(pafd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] -pub unsafe fn acmFormatEnumW(had: P0, pafd: *mut tACMFORMATDETAILSW, fncallback: ACMFORMATENUMCBW, dwinstance: usize, fdwenum: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatEnumW(had: HACMDRIVER, pafd: *mut tACMFORMATDETAILSW, fncallback: ACMFORMATENUMCBW, dwinstance: usize, fdwenum: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatEnumW(had : HACMDRIVER, pafd : *mut tACMFORMATDETAILSW, fncallback : ACMFORMATENUMCBW, dwinstance : usize, fdwenum : u32) -> u32); - acmFormatEnumW(had.param().abi(), core::mem::transmute(pafd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) + acmFormatEnumW(core::mem::transmute(had), core::mem::transmute(pafd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] -pub unsafe fn acmFormatSuggest(had: P0, pwfxsrc: *mut WAVEFORMATEX, pwfxdst: *mut WAVEFORMATEX, cbwfxdst: u32, fdwsuggest: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatSuggest(had: HACMDRIVER, pwfxsrc: *mut WAVEFORMATEX, pwfxdst: *mut WAVEFORMATEX, cbwfxdst: u32, fdwsuggest: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatSuggest(had : HACMDRIVER, pwfxsrc : *mut WAVEFORMATEX, pwfxdst : *mut WAVEFORMATEX, cbwfxdst : u32, fdwsuggest : u32) -> u32); - acmFormatSuggest(had.param().abi(), core::mem::transmute(pwfxsrc), core::mem::transmute(pwfxdst), core::mem::transmute(cbwfxdst), core::mem::transmute(fdwsuggest)) + acmFormatSuggest(core::mem::transmute(had), core::mem::transmute(pwfxsrc), core::mem::transmute(pwfxdst), core::mem::transmute(cbwfxdst), core::mem::transmute(fdwsuggest)) } #[inline] -pub unsafe fn acmFormatTagDetailsA(had: P0, paftd: *mut ACMFORMATTAGDETAILSA, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatTagDetailsA(had: HACMDRIVER, paftd: *mut ACMFORMATTAGDETAILSA, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatTagDetailsA(had : HACMDRIVER, paftd : *mut ACMFORMATTAGDETAILSA, fdwdetails : u32) -> u32); - acmFormatTagDetailsA(had.param().abi(), core::mem::transmute(paftd), core::mem::transmute(fdwdetails)) + acmFormatTagDetailsA(core::mem::transmute(had), core::mem::transmute(paftd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn acmFormatTagDetailsW(had: P0, paftd: *mut ACMFORMATTAGDETAILSW, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatTagDetailsW(had: HACMDRIVER, paftd: *mut ACMFORMATTAGDETAILSW, fdwdetails: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatTagDetailsW(had : HACMDRIVER, paftd : *mut ACMFORMATTAGDETAILSW, fdwdetails : u32) -> u32); - acmFormatTagDetailsW(had.param().abi(), core::mem::transmute(paftd), core::mem::transmute(fdwdetails)) + acmFormatTagDetailsW(core::mem::transmute(had), core::mem::transmute(paftd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn acmFormatTagEnumA(had: P0, paftd: *mut ACMFORMATTAGDETAILSA, fncallback: ACMFORMATTAGENUMCBA, dwinstance: usize, fdwenum: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatTagEnumA(had: HACMDRIVER, paftd: *mut ACMFORMATTAGDETAILSA, fncallback: ACMFORMATTAGENUMCBA, dwinstance: usize, fdwenum: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatTagEnumA(had : HACMDRIVER, paftd : *mut ACMFORMATTAGDETAILSA, fncallback : ACMFORMATTAGENUMCBA, dwinstance : usize, fdwenum : u32) -> u32); - acmFormatTagEnumA(had.param().abi(), core::mem::transmute(paftd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) + acmFormatTagEnumA(core::mem::transmute(had), core::mem::transmute(paftd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] -pub unsafe fn acmFormatTagEnumW(had: P0, paftd: *mut ACMFORMATTAGDETAILSW, fncallback: ACMFORMATTAGENUMCBW, dwinstance: usize, fdwenum: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmFormatTagEnumW(had: HACMDRIVER, paftd: *mut ACMFORMATTAGDETAILSW, fncallback: ACMFORMATTAGENUMCBW, dwinstance: usize, fdwenum: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmFormatTagEnumW(had : HACMDRIVER, paftd : *mut ACMFORMATTAGDETAILSW, fncallback : ACMFORMATTAGENUMCBW, dwinstance : usize, fdwenum : u32) -> u32); - acmFormatTagEnumW(had.param().abi(), core::mem::transmute(paftd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) + acmFormatTagEnumW(core::mem::transmute(had), core::mem::transmute(paftd), core::mem::transmute(fncallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwenum)) } #[inline] pub unsafe fn acmGetVersion() -> u32 { @@ -352,78 +265,49 @@ pub unsafe fn acmGetVersion() -> u32 { acmGetVersion() } #[inline] -pub unsafe fn acmMetrics(hao: P0, umetric: u32, pmetric: *mut core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmMetrics(hao: HACMOBJ, umetric: u32, pmetric: *mut core::ffi::c_void) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmMetrics(hao : HACMOBJ, umetric : u32, pmetric : *mut core::ffi::c_void) -> u32); - acmMetrics(hao.param().abi(), core::mem::transmute(umetric), core::mem::transmute(pmetric)) + acmMetrics(core::mem::transmute(hao), core::mem::transmute(umetric), core::mem::transmute(pmetric)) } #[inline] -pub unsafe fn acmStreamClose(has: P0, fdwclose: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmStreamClose(has: HACMSTREAM, fdwclose: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmStreamClose(has : HACMSTREAM, fdwclose : u32) -> u32); - acmStreamClose(has.param().abi(), core::mem::transmute(fdwclose)) + acmStreamClose(core::mem::transmute(has), core::mem::transmute(fdwclose)) } #[inline] -pub unsafe fn acmStreamConvert(has: P0, pash: *mut ACMSTREAMHEADER, fdwconvert: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmStreamConvert(has: HACMSTREAM, pash: *mut ACMSTREAMHEADER, fdwconvert: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmStreamConvert(has : HACMSTREAM, pash : *mut ACMSTREAMHEADER, fdwconvert : u32) -> u32); - acmStreamConvert(has.param().abi(), core::mem::transmute(pash), core::mem::transmute(fdwconvert)) + acmStreamConvert(core::mem::transmute(has), core::mem::transmute(pash), core::mem::transmute(fdwconvert)) } #[inline] -pub unsafe fn acmStreamMessage(has: P0, umsg: u32, lparam1: P2, lparam2: P3) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn acmStreamMessage(has: HACMSTREAM, umsg: u32, lparam1: super::super::Foundation::LPARAM, lparam2: super::super::Foundation::LPARAM) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmStreamMessage(has : HACMSTREAM, umsg : u32, lparam1 : super::super::Foundation:: LPARAM, lparam2 : super::super::Foundation:: LPARAM) -> u32); - acmStreamMessage(has.param().abi(), core::mem::transmute(umsg), lparam1.param().abi(), lparam2.param().abi()) + acmStreamMessage(core::mem::transmute(has), core::mem::transmute(umsg), core::mem::transmute(lparam1), core::mem::transmute(lparam2)) } #[inline] -pub unsafe fn acmStreamOpen(phas: *mut HACMSTREAM, had: P1, pwfxsrc: *mut WAVEFORMATEX, pwfxdst: *mut WAVEFORMATEX, pwfltr: *mut WAVEFILTER, dwcallback: usize, dwinstance: usize, fdwopen: u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn acmStreamOpen(phas: *mut HACMSTREAM, had: HACMDRIVER, pwfxsrc: *mut WAVEFORMATEX, pwfxdst: *mut WAVEFORMATEX, pwfltr: *mut WAVEFILTER, dwcallback: usize, dwinstance: usize, fdwopen: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmStreamOpen(phas : *mut HACMSTREAM, had : HACMDRIVER, pwfxsrc : *mut WAVEFORMATEX, pwfxdst : *mut WAVEFORMATEX, pwfltr : *mut WAVEFILTER, dwcallback : usize, dwinstance : usize, fdwopen : u32) -> u32); - acmStreamOpen(core::mem::transmute(phas), had.param().abi(), core::mem::transmute(pwfxsrc), core::mem::transmute(pwfxdst), core::mem::transmute(pwfltr), core::mem::transmute(dwcallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwopen)) + acmStreamOpen(core::mem::transmute(phas), core::mem::transmute(had), core::mem::transmute(pwfxsrc), core::mem::transmute(pwfxdst), core::mem::transmute(pwfltr), core::mem::transmute(dwcallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn acmStreamPrepareHeader(has: P0, pash: *mut ACMSTREAMHEADER, fdwprepare: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmStreamPrepareHeader(has: HACMSTREAM, pash: *mut ACMSTREAMHEADER, fdwprepare: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmStreamPrepareHeader(has : HACMSTREAM, pash : *mut ACMSTREAMHEADER, fdwprepare : u32) -> u32); - acmStreamPrepareHeader(has.param().abi(), core::mem::transmute(pash), core::mem::transmute(fdwprepare)) + acmStreamPrepareHeader(core::mem::transmute(has), core::mem::transmute(pash), core::mem::transmute(fdwprepare)) } #[inline] -pub unsafe fn acmStreamReset(has: P0, fdwreset: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmStreamReset(has: HACMSTREAM, fdwreset: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmStreamReset(has : HACMSTREAM, fdwreset : u32) -> u32); - acmStreamReset(has.param().abi(), core::mem::transmute(fdwreset)) + acmStreamReset(core::mem::transmute(has), core::mem::transmute(fdwreset)) } #[inline] -pub unsafe fn acmStreamSize(has: P0, cbinput: u32, pdwoutputbytes: *mut u32, fdwsize: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmStreamSize(has: HACMSTREAM, cbinput: u32, pdwoutputbytes: *mut u32, fdwsize: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmStreamSize(has : HACMSTREAM, cbinput : u32, pdwoutputbytes : *mut u32, fdwsize : u32) -> u32); - acmStreamSize(has.param().abi(), core::mem::transmute(cbinput), core::mem::transmute(pdwoutputbytes), core::mem::transmute(fdwsize)) + acmStreamSize(core::mem::transmute(has), core::mem::transmute(cbinput), core::mem::transmute(pdwoutputbytes), core::mem::transmute(fdwsize)) } #[inline] -pub unsafe fn acmStreamUnprepareHeader(has: P0, pash: *mut ACMSTREAMHEADER, fdwunprepare: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn acmStreamUnprepareHeader(has: HACMSTREAM, pash: *mut ACMSTREAMHEADER, fdwunprepare: u32) -> u32 { windows_targets::link!("msacm32.dll" "system" fn acmStreamUnprepareHeader(has : HACMSTREAM, pash : *mut ACMSTREAMHEADER, fdwunprepare : u32) -> u32); - acmStreamUnprepareHeader(has.param().abi(), core::mem::transmute(pash), core::mem::transmute(fdwunprepare)) + acmStreamUnprepareHeader(core::mem::transmute(has), core::mem::transmute(pash), core::mem::transmute(fdwunprepare)) } #[inline] pub unsafe fn auxGetDevCapsA(udeviceid: usize, pac: *mut AUXCAPSA, cbac: u32) -> u32 { @@ -446,9 +330,9 @@ pub unsafe fn auxGetVolume(udeviceid: u32, pdwvolume: *mut u32) -> u32 { auxGetVolume(core::mem::transmute(udeviceid), core::mem::transmute(pdwvolume)) } #[inline] -pub unsafe fn auxOutMessage(udeviceid: u32, umsg: u32, dw1: usize, dw2: usize) -> u32 { +pub unsafe fn auxOutMessage(udeviceid: u32, umsg: u32, dw1: Option, dw2: Option) -> u32 { windows_targets::link!("winmm.dll" "system" fn auxOutMessage(udeviceid : u32, umsg : u32, dw1 : usize, dw2 : usize) -> u32); - auxOutMessage(core::mem::transmute(udeviceid), core::mem::transmute(umsg), core::mem::transmute(dw1), core::mem::transmute(dw2)) + auxOutMessage(core::mem::transmute(udeviceid), core::mem::transmute(umsg), core::mem::transmute(dw1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dw2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn auxSetVolume(udeviceid: u32, dwvolume: u32) -> u32 { @@ -456,38 +340,24 @@ pub unsafe fn auxSetVolume(udeviceid: u32, dwvolume: u32) -> u32 { auxSetVolume(core::mem::transmute(udeviceid), core::mem::transmute(dwvolume)) } #[inline] -pub unsafe fn midiConnect(hmi: P0, hmo: P1, preserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn midiConnect(hmi: HMIDI, hmo: HMIDIOUT, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null()))) + midiConnect(core::mem::transmute(hmi), core::mem::transmute(hmo), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn midiDisconnect(hmi: P0, hmo: P1, preserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn midiDisconnect(hmi: HMIDI, hmo: HMIDIOUT, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null()))) + midiDisconnect(core::mem::transmute(hmi), core::mem::transmute(hmo), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn midiInAddBuffer(hmi: P0, pmh: *mut MIDIHDR, cbmh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInAddBuffer(hmi: HMIDIIN, pmh: *mut MIDIHDR, cbmh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInAddBuffer(hmi : HMIDIIN, pmh : *mut MIDIHDR, cbmh : u32) -> u32); - midiInAddBuffer(hmi.param().abi(), core::mem::transmute(pmh), core::mem::transmute(cbmh)) + midiInAddBuffer(core::mem::transmute(hmi), core::mem::transmute(pmh), core::mem::transmute(cbmh)) } #[inline] -pub unsafe fn midiInClose(hmi: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInClose(hmi: HMIDIIN) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInClose(hmi : HMIDIIN) -> u32); - midiInClose(hmi.param().abi()) + midiInClose(core::mem::transmute(hmi)) } #[inline] pub unsafe fn midiInGetDevCapsA(udeviceid: usize, pmic: *mut MIDIINCAPSA, cbmic: u32) -> u32 { @@ -510,12 +380,9 @@ pub unsafe fn midiInGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { midiInGetErrorTextW(core::mem::transmute(mmrerror), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] -pub unsafe fn midiInGetID(hmi: P0, pudeviceid: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInGetID(hmi: HMIDIIN, pudeviceid: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInGetID(hmi : HMIDIIN, pudeviceid : *mut u32) -> u32); - midiInGetID(hmi.param().abi(), core::mem::transmute(pudeviceid)) + midiInGetID(core::mem::transmute(hmi), core::mem::transmute(pudeviceid)) } #[inline] pub unsafe fn midiInGetNumDevs() -> u32 { @@ -523,81 +390,54 @@ pub unsafe fn midiInGetNumDevs() -> u32 { midiInGetNumDevs() } #[inline] -pub unsafe fn midiInMessage(hmi: P0, umsg: u32, dw1: usize, dw2: usize) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInMessage(hmi: Option, umsg: u32, dw1: Option, dw2: Option) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInMessage(hmi : HMIDIIN, umsg : u32, dw1 : usize, dw2 : usize) -> u32); - midiInMessage(hmi.param().abi(), core::mem::transmute(umsg), core::mem::transmute(dw1), core::mem::transmute(dw2)) + midiInMessage(core::mem::transmute(hmi.unwrap_or(core::mem::zeroed())), core::mem::transmute(umsg), core::mem::transmute(dw1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dw2.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn midiInOpen(phmi: *mut HMIDIIN, udeviceid: u32, dwcallback: usize, dwinstance: usize, fdwopen: MIDI_WAVE_OPEN_TYPE) -> u32 { +pub unsafe fn midiInOpen(phmi: *mut HMIDIIN, udeviceid: u32, dwcallback: Option, dwinstance: Option, fdwopen: MIDI_WAVE_OPEN_TYPE) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInOpen(phmi : *mut HMIDIIN, udeviceid : u32, dwcallback : usize, dwinstance : usize, fdwopen : MIDI_WAVE_OPEN_TYPE) -> u32); - midiInOpen(core::mem::transmute(phmi), core::mem::transmute(udeviceid), core::mem::transmute(dwcallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwopen)) + midiInOpen(core::mem::transmute(phmi), core::mem::transmute(udeviceid), core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn midiInPrepareHeader(hmi: P0, pmh: *mut MIDIHDR, cbmh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInPrepareHeader(hmi: HMIDIIN, pmh: *mut MIDIHDR, cbmh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInPrepareHeader(hmi : HMIDIIN, pmh : *mut MIDIHDR, cbmh : u32) -> u32); - midiInPrepareHeader(hmi.param().abi(), core::mem::transmute(pmh), core::mem::transmute(cbmh)) + midiInPrepareHeader(core::mem::transmute(hmi), core::mem::transmute(pmh), core::mem::transmute(cbmh)) } #[inline] -pub unsafe fn midiInReset(hmi: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInReset(hmi: HMIDIIN) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInReset(hmi : HMIDIIN) -> u32); - midiInReset(hmi.param().abi()) + midiInReset(core::mem::transmute(hmi)) } #[inline] -pub unsafe fn midiInStart(hmi: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInStart(hmi: HMIDIIN) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInStart(hmi : HMIDIIN) -> u32); - midiInStart(hmi.param().abi()) + midiInStart(core::mem::transmute(hmi)) } #[inline] -pub unsafe fn midiInStop(hmi: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInStop(hmi: HMIDIIN) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInStop(hmi : HMIDIIN) -> u32); - midiInStop(hmi.param().abi()) + midiInStop(core::mem::transmute(hmi)) } #[inline] -pub unsafe fn midiInUnprepareHeader(hmi: P0, pmh: *mut MIDIHDR, cbmh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiInUnprepareHeader(hmi: HMIDIIN, pmh: *mut MIDIHDR, cbmh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiInUnprepareHeader(hmi : HMIDIIN, pmh : *mut MIDIHDR, cbmh : u32) -> u32); - midiInUnprepareHeader(hmi.param().abi(), core::mem::transmute(pmh), core::mem::transmute(cbmh)) + midiInUnprepareHeader(core::mem::transmute(hmi), core::mem::transmute(pmh), core::mem::transmute(cbmh)) } #[inline] -pub unsafe fn midiOutCacheDrumPatches(hmo: P0, upatch: u32, pwkya: &[u16; 128], fucache: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutCacheDrumPatches(hmo: HMIDIOUT, upatch: u32, pwkya: &[u16; 128], fucache: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutCacheDrumPatches(hmo : HMIDIOUT, upatch : u32, pwkya : *const u16, fucache : u32) -> u32); - midiOutCacheDrumPatches(hmo.param().abi(), core::mem::transmute(upatch), core::mem::transmute(pwkya.as_ptr()), core::mem::transmute(fucache)) + midiOutCacheDrumPatches(core::mem::transmute(hmo), core::mem::transmute(upatch), core::mem::transmute(pwkya.as_ptr()), core::mem::transmute(fucache)) } #[inline] -pub unsafe fn midiOutCachePatches(hmo: P0, ubank: u32, pwpa: &[u16; 128], fucache: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutCachePatches(hmo: HMIDIOUT, ubank: u32, pwpa: &[u16; 128], fucache: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutCachePatches(hmo : HMIDIOUT, ubank : u32, pwpa : *const u16, fucache : u32) -> u32); - midiOutCachePatches(hmo.param().abi(), core::mem::transmute(ubank), core::mem::transmute(pwpa.as_ptr()), core::mem::transmute(fucache)) + midiOutCachePatches(core::mem::transmute(hmo), core::mem::transmute(ubank), core::mem::transmute(pwpa.as_ptr()), core::mem::transmute(fucache)) } #[inline] -pub unsafe fn midiOutClose(hmo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutClose(hmo: HMIDIOUT) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutClose(hmo : HMIDIOUT) -> u32); - midiOutClose(hmo.param().abi()) + midiOutClose(core::mem::transmute(hmo)) } #[inline] pub unsafe fn midiOutGetDevCapsA(udeviceid: usize, pmoc: *mut MIDIOUTCAPSA, cbmoc: u32) -> u32 { @@ -620,12 +460,9 @@ pub unsafe fn midiOutGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { midiOutGetErrorTextW(core::mem::transmute(mmrerror), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] -pub unsafe fn midiOutGetID(hmo: P0, pudeviceid: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutGetID(hmo: HMIDIOUT, pudeviceid: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutGetID(hmo : HMIDIOUT, pudeviceid : *mut u32) -> u32); - midiOutGetID(hmo.param().abi(), core::mem::transmute(pudeviceid)) + midiOutGetID(core::mem::transmute(hmo), core::mem::transmute(pudeviceid)) } #[inline] pub unsafe fn midiOutGetNumDevs() -> u32 { @@ -633,158 +470,104 @@ pub unsafe fn midiOutGetNumDevs() -> u32 { midiOutGetNumDevs() } #[inline] -pub unsafe fn midiOutGetVolume(hmo: P0, pdwvolume: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutGetVolume(hmo: Option, pdwvolume: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutGetVolume(hmo : HMIDIOUT, pdwvolume : *mut u32) -> u32); - midiOutGetVolume(hmo.param().abi(), core::mem::transmute(pdwvolume)) + midiOutGetVolume(core::mem::transmute(hmo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwvolume)) } #[inline] -pub unsafe fn midiOutLongMsg(hmo: P0, pmh: *const MIDIHDR, cbmh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutLongMsg(hmo: HMIDIOUT, pmh: *const MIDIHDR, cbmh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutLongMsg(hmo : HMIDIOUT, pmh : *const MIDIHDR, cbmh : u32) -> u32); - midiOutLongMsg(hmo.param().abi(), core::mem::transmute(pmh), core::mem::transmute(cbmh)) + midiOutLongMsg(core::mem::transmute(hmo), core::mem::transmute(pmh), core::mem::transmute(cbmh)) } #[inline] -pub unsafe fn midiOutMessage(hmo: P0, umsg: u32, dw1: usize, dw2: usize) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutMessage(hmo: Option, umsg: u32, dw1: Option, dw2: Option) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutMessage(hmo : HMIDIOUT, umsg : u32, dw1 : usize, dw2 : usize) -> u32); - midiOutMessage(hmo.param().abi(), core::mem::transmute(umsg), core::mem::transmute(dw1), core::mem::transmute(dw2)) + midiOutMessage(core::mem::transmute(hmo.unwrap_or(core::mem::zeroed())), core::mem::transmute(umsg), core::mem::transmute(dw1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dw2.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn midiOutOpen(phmo: *mut HMIDIOUT, udeviceid: u32, dwcallback: usize, dwinstance: usize, fdwopen: MIDI_WAVE_OPEN_TYPE) -> u32 { +pub unsafe fn midiOutOpen(phmo: *mut HMIDIOUT, udeviceid: u32, dwcallback: Option, dwinstance: Option, fdwopen: MIDI_WAVE_OPEN_TYPE) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutOpen(phmo : *mut HMIDIOUT, udeviceid : u32, dwcallback : usize, dwinstance : usize, fdwopen : MIDI_WAVE_OPEN_TYPE) -> u32); - midiOutOpen(core::mem::transmute(phmo), core::mem::transmute(udeviceid), core::mem::transmute(dwcallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwopen)) + midiOutOpen(core::mem::transmute(phmo), core::mem::transmute(udeviceid), core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn midiOutPrepareHeader(hmo: P0, pmh: *mut MIDIHDR, cbmh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutPrepareHeader(hmo: HMIDIOUT, pmh: *mut MIDIHDR, cbmh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutPrepareHeader(hmo : HMIDIOUT, pmh : *mut MIDIHDR, cbmh : u32) -> u32); - midiOutPrepareHeader(hmo.param().abi(), core::mem::transmute(pmh), core::mem::transmute(cbmh)) + midiOutPrepareHeader(core::mem::transmute(hmo), core::mem::transmute(pmh), core::mem::transmute(cbmh)) } #[inline] -pub unsafe fn midiOutReset(hmo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutReset(hmo: HMIDIOUT) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutReset(hmo : HMIDIOUT) -> u32); - midiOutReset(hmo.param().abi()) + midiOutReset(core::mem::transmute(hmo)) } #[inline] -pub unsafe fn midiOutSetVolume(hmo: P0, dwvolume: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutSetVolume(hmo: Option, dwvolume: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutSetVolume(hmo : HMIDIOUT, dwvolume : u32) -> u32); - midiOutSetVolume(hmo.param().abi(), core::mem::transmute(dwvolume)) + midiOutSetVolume(core::mem::transmute(hmo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwvolume)) } #[inline] -pub unsafe fn midiOutShortMsg(hmo: P0, dwmsg: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutShortMsg(hmo: HMIDIOUT, dwmsg: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutShortMsg(hmo : HMIDIOUT, dwmsg : u32) -> u32); - midiOutShortMsg(hmo.param().abi(), core::mem::transmute(dwmsg)) + midiOutShortMsg(core::mem::transmute(hmo), core::mem::transmute(dwmsg)) } #[inline] -pub unsafe fn midiOutUnprepareHeader(hmo: P0, pmh: *mut MIDIHDR, cbmh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiOutUnprepareHeader(hmo: HMIDIOUT, pmh: *mut MIDIHDR, cbmh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiOutUnprepareHeader(hmo : HMIDIOUT, pmh : *mut MIDIHDR, cbmh : u32) -> u32); - midiOutUnprepareHeader(hmo.param().abi(), core::mem::transmute(pmh), core::mem::transmute(cbmh)) + midiOutUnprepareHeader(core::mem::transmute(hmo), core::mem::transmute(pmh), core::mem::transmute(cbmh)) } #[inline] -pub unsafe fn midiStreamClose(hms: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiStreamClose(hms: HMIDISTRM) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiStreamClose(hms : HMIDISTRM) -> u32); - midiStreamClose(hms.param().abi()) + midiStreamClose(core::mem::transmute(hms)) } #[inline] -pub unsafe fn midiStreamOpen(phms: *mut HMIDISTRM, pudeviceid: &mut [u32], dwcallback: usize, dwinstance: usize, fdwopen: u32) -> u32 { +pub unsafe fn midiStreamOpen(phms: *mut HMIDISTRM, pudeviceid: &mut [u32], dwcallback: Option, dwinstance: Option, fdwopen: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiStreamOpen(phms : *mut HMIDISTRM, pudeviceid : *mut u32, cmidi : u32, dwcallback : usize, dwinstance : usize, fdwopen : u32) -> u32); - midiStreamOpen(core::mem::transmute(phms), core::mem::transmute(pudeviceid.as_ptr()), pudeviceid.len().try_into().unwrap(), core::mem::transmute(dwcallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwopen)) + midiStreamOpen(core::mem::transmute(phms), core::mem::transmute(pudeviceid.as_ptr()), pudeviceid.len().try_into().unwrap(), core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn midiStreamOut(hms: P0, pmh: *mut MIDIHDR, cbmh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiStreamOut(hms: HMIDISTRM, pmh: *mut MIDIHDR, cbmh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiStreamOut(hms : HMIDISTRM, pmh : *mut MIDIHDR, cbmh : u32) -> u32); - midiStreamOut(hms.param().abi(), core::mem::transmute(pmh), core::mem::transmute(cbmh)) + midiStreamOut(core::mem::transmute(hms), core::mem::transmute(pmh), core::mem::transmute(cbmh)) } #[inline] -pub unsafe fn midiStreamPause(hms: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiStreamPause(hms: HMIDISTRM) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiStreamPause(hms : HMIDISTRM) -> u32); - midiStreamPause(hms.param().abi()) + midiStreamPause(core::mem::transmute(hms)) } #[inline] -pub unsafe fn midiStreamPosition(hms: P0, lpmmt: *mut super::MMTIME, cbmmt: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiStreamPosition(hms: HMIDISTRM, lpmmt: *mut super::MMTIME, cbmmt: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiStreamPosition(hms : HMIDISTRM, lpmmt : *mut super:: MMTIME, cbmmt : u32) -> u32); - midiStreamPosition(hms.param().abi(), core::mem::transmute(lpmmt), core::mem::transmute(cbmmt)) + midiStreamPosition(core::mem::transmute(hms), core::mem::transmute(lpmmt), core::mem::transmute(cbmmt)) } #[inline] -pub unsafe fn midiStreamProperty(hms: P0, lppropdata: *mut u8, dwproperty: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiStreamProperty(hms: HMIDISTRM, lppropdata: *mut u8, dwproperty: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiStreamProperty(hms : HMIDISTRM, lppropdata : *mut u8, dwproperty : u32) -> u32); - midiStreamProperty(hms.param().abi(), core::mem::transmute(lppropdata), core::mem::transmute(dwproperty)) + midiStreamProperty(core::mem::transmute(hms), core::mem::transmute(lppropdata), core::mem::transmute(dwproperty)) } #[inline] -pub unsafe fn midiStreamRestart(hms: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiStreamRestart(hms: HMIDISTRM) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiStreamRestart(hms : HMIDISTRM) -> u32); - midiStreamRestart(hms.param().abi()) + midiStreamRestart(core::mem::transmute(hms)) } #[inline] -pub unsafe fn midiStreamStop(hms: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn midiStreamStop(hms: HMIDISTRM) -> u32 { windows_targets::link!("winmm.dll" "system" fn midiStreamStop(hms : HMIDISTRM) -> u32); - midiStreamStop(hms.param().abi()) + midiStreamStop(core::mem::transmute(hms)) } #[inline] -pub unsafe fn mixerClose(hmx: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerClose(hmx: HMIXER) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerClose(hmx : HMIXER) -> u32); - mixerClose(hmx.param().abi()) + mixerClose(core::mem::transmute(hmx)) } #[inline] -pub unsafe fn mixerGetControlDetailsA(hmxobj: P0, pmxcd: *mut MIXERCONTROLDETAILS, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerGetControlDetailsA(hmxobj: Option, pmxcd: *mut MIXERCONTROLDETAILS, fdwdetails: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetControlDetailsA(hmxobj : HMIXEROBJ, pmxcd : *mut MIXERCONTROLDETAILS, fdwdetails : u32) -> u32); - mixerGetControlDetailsA(hmxobj.param().abi(), core::mem::transmute(pmxcd), core::mem::transmute(fdwdetails)) + mixerGetControlDetailsA(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxcd), core::mem::transmute(fdwdetails)) } #[inline] -pub unsafe fn mixerGetControlDetailsW(hmxobj: P0, pmxcd: *mut MIXERCONTROLDETAILS, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerGetControlDetailsW(hmxobj: Option, pmxcd: *mut MIXERCONTROLDETAILS, fdwdetails: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetControlDetailsW(hmxobj : HMIXEROBJ, pmxcd : *mut MIXERCONTROLDETAILS, fdwdetails : u32) -> u32); - mixerGetControlDetailsW(hmxobj.param().abi(), core::mem::transmute(pmxcd), core::mem::transmute(fdwdetails)) + mixerGetControlDetailsW(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxcd), core::mem::transmute(fdwdetails)) } #[inline] pub unsafe fn mixerGetDevCapsA(umxid: usize, pmxcaps: *mut MIXERCAPSA, cbmxcaps: u32) -> u32 { @@ -797,44 +580,29 @@ pub unsafe fn mixerGetDevCapsW(umxid: usize, pmxcaps: *mut MIXERCAPSW, cbmxcaps: mixerGetDevCapsW(core::mem::transmute(umxid), core::mem::transmute(pmxcaps), core::mem::transmute(cbmxcaps)) } #[inline] -pub unsafe fn mixerGetID(hmxobj: P0, pumxid: *mut u32, fdwid: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerGetID(hmxobj: Option, pumxid: *mut u32, fdwid: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetID(hmxobj : HMIXEROBJ, pumxid : *mut u32, fdwid : u32) -> u32); - mixerGetID(hmxobj.param().abi(), core::mem::transmute(pumxid), core::mem::transmute(fdwid)) + mixerGetID(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pumxid), core::mem::transmute(fdwid)) } #[inline] -pub unsafe fn mixerGetLineControlsA(hmxobj: P0, pmxlc: *mut MIXERLINECONTROLSA, fdwcontrols: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerGetLineControlsA(hmxobj: Option, pmxlc: *mut MIXERLINECONTROLSA, fdwcontrols: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetLineControlsA(hmxobj : HMIXEROBJ, pmxlc : *mut MIXERLINECONTROLSA, fdwcontrols : u32) -> u32); - mixerGetLineControlsA(hmxobj.param().abi(), core::mem::transmute(pmxlc), core::mem::transmute(fdwcontrols)) + mixerGetLineControlsA(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxlc), core::mem::transmute(fdwcontrols)) } #[inline] -pub unsafe fn mixerGetLineControlsW(hmxobj: P0, pmxlc: *mut MIXERLINECONTROLSW, fdwcontrols: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerGetLineControlsW(hmxobj: Option, pmxlc: *mut MIXERLINECONTROLSW, fdwcontrols: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetLineControlsW(hmxobj : HMIXEROBJ, pmxlc : *mut MIXERLINECONTROLSW, fdwcontrols : u32) -> u32); - mixerGetLineControlsW(hmxobj.param().abi(), core::mem::transmute(pmxlc), core::mem::transmute(fdwcontrols)) + mixerGetLineControlsW(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxlc), core::mem::transmute(fdwcontrols)) } #[inline] -pub unsafe fn mixerGetLineInfoA(hmxobj: P0, pmxl: *mut MIXERLINEA, fdwinfo: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerGetLineInfoA(hmxobj: Option, pmxl: *mut MIXERLINEA, fdwinfo: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetLineInfoA(hmxobj : HMIXEROBJ, pmxl : *mut MIXERLINEA, fdwinfo : u32) -> u32); - mixerGetLineInfoA(hmxobj.param().abi(), core::mem::transmute(pmxl), core::mem::transmute(fdwinfo)) + mixerGetLineInfoA(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxl), core::mem::transmute(fdwinfo)) } #[inline] -pub unsafe fn mixerGetLineInfoW(hmxobj: P0, pmxl: *mut MIXERLINEW, fdwinfo: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerGetLineInfoW(hmxobj: Option, pmxl: *mut MIXERLINEW, fdwinfo: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerGetLineInfoW(hmxobj : HMIXEROBJ, pmxl : *mut MIXERLINEW, fdwinfo : u32) -> u32); - mixerGetLineInfoW(hmxobj.param().abi(), core::mem::transmute(pmxl), core::mem::transmute(fdwinfo)) + mixerGetLineInfoW(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxl), core::mem::transmute(fdwinfo)) } #[inline] pub unsafe fn mixerGetNumDevs() -> u32 { @@ -842,25 +610,19 @@ pub unsafe fn mixerGetNumDevs() -> u32 { mixerGetNumDevs() } #[inline] -pub unsafe fn mixerMessage(hmx: P0, umsg: u32, dwparam1: usize, dwparam2: usize) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerMessage(hmx: Option, umsg: u32, dwparam1: Option, dwparam2: Option) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerMessage(hmx : HMIXER, umsg : u32, dwparam1 : usize, dwparam2 : usize) -> u32); - mixerMessage(hmx.param().abi(), core::mem::transmute(umsg), core::mem::transmute(dwparam1), core::mem::transmute(dwparam2)) + mixerMessage(core::mem::transmute(hmx.unwrap_or(core::mem::zeroed())), core::mem::transmute(umsg), core::mem::transmute(dwparam1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwparam2.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn mixerOpen(phmx: Option<*mut HMIXER>, umxid: u32, dwcallback: usize, dwinstance: usize, fdwopen: u32) -> u32 { +pub unsafe fn mixerOpen(phmx: Option<*mut HMIXER>, umxid: u32, dwcallback: Option, dwinstance: Option, 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(core::ptr::null_mut())), core::mem::transmute(umxid), core::mem::transmute(dwcallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwopen)) + mixerOpen(core::mem::transmute(phmx.unwrap_or(core::mem::zeroed())), core::mem::transmute(umxid), core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn mixerSetControlDetails(hmxobj: P0, pmxcd: *const MIXERCONTROLDETAILS, fdwdetails: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mixerSetControlDetails(hmxobj: Option, pmxcd: *const MIXERCONTROLDETAILS, fdwdetails: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerSetControlDetails(hmxobj : HMIXEROBJ, pmxcd : *const MIXERCONTROLDETAILS, fdwdetails : u32) -> u32); - mixerSetControlDetails(hmxobj.param().abi(), core::mem::transmute(pmxcd), core::mem::transmute(fdwdetails)) + mixerSetControlDetails(core::mem::transmute(hmxobj.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmxcd), core::mem::transmute(fdwdetails)) } #[inline] pub unsafe fn sndPlaySoundA(pszsound: P0, fusound: u32) -> super::super::Foundation::BOOL @@ -879,20 +641,14 @@ where sndPlaySoundW(pszsound.param().abi(), core::mem::transmute(fusound)) } #[inline] -pub unsafe fn waveInAddBuffer(hwi: P0, pwh: *mut WAVEHDR, cbwh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInAddBuffer(hwi: HWAVEIN, pwh: *mut WAVEHDR, cbwh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInAddBuffer(hwi : HWAVEIN, pwh : *mut WAVEHDR, cbwh : u32) -> u32); - waveInAddBuffer(hwi.param().abi(), core::mem::transmute(pwh), core::mem::transmute(cbwh)) + waveInAddBuffer(core::mem::transmute(hwi), core::mem::transmute(pwh), core::mem::transmute(cbwh)) } #[inline] -pub unsafe fn waveInClose(hwi: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInClose(hwi: HWAVEIN) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInClose(hwi : HWAVEIN) -> u32); - waveInClose(hwi.param().abi()) + waveInClose(core::mem::transmute(hwi)) } #[inline] pub unsafe fn waveInGetDevCapsA(udeviceid: usize, pwic: *mut WAVEINCAPSA, cbwic: u32) -> u32 { @@ -915,12 +671,9 @@ pub unsafe fn waveInGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { waveInGetErrorTextW(core::mem::transmute(mmrerror), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] -pub unsafe fn waveInGetID(hwi: P0, pudeviceid: *const u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInGetID(hwi: HWAVEIN, pudeviceid: *const u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInGetID(hwi : HWAVEIN, pudeviceid : *const u32) -> u32); - waveInGetID(hwi.param().abi(), core::mem::transmute(pudeviceid)) + waveInGetID(core::mem::transmute(hwi), core::mem::transmute(pudeviceid)) } #[inline] pub unsafe fn waveInGetNumDevs() -> u32 { @@ -928,81 +681,54 @@ pub unsafe fn waveInGetNumDevs() -> u32 { waveInGetNumDevs() } #[inline] -pub unsafe fn waveInGetPosition(hwi: P0, pmmt: *mut super::MMTIME, cbmmt: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInGetPosition(hwi: HWAVEIN, pmmt: *mut super::MMTIME, cbmmt: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInGetPosition(hwi : HWAVEIN, pmmt : *mut super:: MMTIME, cbmmt : u32) -> u32); - waveInGetPosition(hwi.param().abi(), core::mem::transmute(pmmt), core::mem::transmute(cbmmt)) + waveInGetPosition(core::mem::transmute(hwi), core::mem::transmute(pmmt), core::mem::transmute(cbmmt)) } #[inline] -pub unsafe fn waveInMessage(hwi: P0, umsg: u32, dw1: usize, dw2: usize) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInMessage(hwi: Option, umsg: u32, dw1: Option, dw2: Option) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInMessage(hwi : HWAVEIN, umsg : u32, dw1 : usize, dw2 : usize) -> u32); - waveInMessage(hwi.param().abi(), core::mem::transmute(umsg), core::mem::transmute(dw1), core::mem::transmute(dw2)) + waveInMessage(core::mem::transmute(hwi.unwrap_or(core::mem::zeroed())), core::mem::transmute(umsg), core::mem::transmute(dw1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dw2.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn waveInOpen(phwi: Option<*mut HWAVEIN>, udeviceid: u32, pwfx: *const WAVEFORMATEX, dwcallback: usize, dwinstance: usize, fdwopen: MIDI_WAVE_OPEN_TYPE) -> u32 { +pub unsafe fn waveInOpen(phwi: Option<*mut HWAVEIN>, udeviceid: u32, pwfx: *const WAVEFORMATEX, dwcallback: Option, dwinstance: Option, 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(core::ptr::null_mut())), core::mem::transmute(udeviceid), core::mem::transmute(pwfx), core::mem::transmute(dwcallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwopen)) + waveInOpen(core::mem::transmute(phwi.unwrap_or(core::mem::zeroed())), core::mem::transmute(udeviceid), core::mem::transmute(pwfx), core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn waveInPrepareHeader(hwi: P0, pwh: *mut WAVEHDR, cbwh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInPrepareHeader(hwi: HWAVEIN, pwh: *mut WAVEHDR, cbwh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInPrepareHeader(hwi : HWAVEIN, pwh : *mut WAVEHDR, cbwh : u32) -> u32); - waveInPrepareHeader(hwi.param().abi(), core::mem::transmute(pwh), core::mem::transmute(cbwh)) + waveInPrepareHeader(core::mem::transmute(hwi), core::mem::transmute(pwh), core::mem::transmute(cbwh)) } #[inline] -pub unsafe fn waveInReset(hwi: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInReset(hwi: HWAVEIN) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInReset(hwi : HWAVEIN) -> u32); - waveInReset(hwi.param().abi()) + waveInReset(core::mem::transmute(hwi)) } #[inline] -pub unsafe fn waveInStart(hwi: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInStart(hwi: HWAVEIN) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInStart(hwi : HWAVEIN) -> u32); - waveInStart(hwi.param().abi()) + waveInStart(core::mem::transmute(hwi)) } #[inline] -pub unsafe fn waveInStop(hwi: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInStop(hwi: HWAVEIN) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInStop(hwi : HWAVEIN) -> u32); - waveInStop(hwi.param().abi()) + waveInStop(core::mem::transmute(hwi)) } #[inline] -pub unsafe fn waveInUnprepareHeader(hwi: P0, pwh: *mut WAVEHDR, cbwh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveInUnprepareHeader(hwi: HWAVEIN, pwh: *mut WAVEHDR, cbwh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInUnprepareHeader(hwi : HWAVEIN, pwh : *mut WAVEHDR, cbwh : u32) -> u32); - waveInUnprepareHeader(hwi.param().abi(), core::mem::transmute(pwh), core::mem::transmute(cbwh)) + waveInUnprepareHeader(core::mem::transmute(hwi), core::mem::transmute(pwh), core::mem::transmute(cbwh)) } #[inline] -pub unsafe fn waveOutBreakLoop(hwo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutBreakLoop(hwo: HWAVEOUT) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutBreakLoop(hwo : HWAVEOUT) -> u32); - waveOutBreakLoop(hwo.param().abi()) + waveOutBreakLoop(core::mem::transmute(hwo)) } #[inline] -pub unsafe fn waveOutClose(hwo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutClose(hwo: HWAVEOUT) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutClose(hwo : HWAVEOUT) -> u32); - waveOutClose(hwo.param().abi()) + waveOutClose(core::mem::transmute(hwo)) } #[inline] pub unsafe fn waveOutGetDevCapsA(udeviceid: usize, pwoc: *mut WAVEOUTCAPSA, cbwoc: u32) -> u32 { @@ -1025,12 +751,9 @@ pub unsafe fn waveOutGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { waveOutGetErrorTextW(core::mem::transmute(mmrerror), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] -pub unsafe fn waveOutGetID(hwo: P0, pudeviceid: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutGetID(hwo: HWAVEOUT, pudeviceid: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetID(hwo : HWAVEOUT, pudeviceid : *mut u32) -> u32); - waveOutGetID(hwo.param().abi(), core::mem::transmute(pudeviceid)) + waveOutGetID(core::mem::transmute(hwo), core::mem::transmute(pudeviceid)) } #[inline] pub unsafe fn waveOutGetNumDevs() -> u32 { @@ -1038,121 +761,79 @@ pub unsafe fn waveOutGetNumDevs() -> u32 { waveOutGetNumDevs() } #[inline] -pub unsafe fn waveOutGetPitch(hwo: P0, pdwpitch: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutGetPitch(hwo: HWAVEOUT, pdwpitch: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetPitch(hwo : HWAVEOUT, pdwpitch : *mut u32) -> u32); - waveOutGetPitch(hwo.param().abi(), core::mem::transmute(pdwpitch)) + waveOutGetPitch(core::mem::transmute(hwo), core::mem::transmute(pdwpitch)) } #[inline] -pub unsafe fn waveOutGetPlaybackRate(hwo: P0, pdwrate: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutGetPlaybackRate(hwo: HWAVEOUT, pdwrate: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetPlaybackRate(hwo : HWAVEOUT, pdwrate : *mut u32) -> u32); - waveOutGetPlaybackRate(hwo.param().abi(), core::mem::transmute(pdwrate)) + waveOutGetPlaybackRate(core::mem::transmute(hwo), core::mem::transmute(pdwrate)) } #[inline] -pub unsafe fn waveOutGetPosition(hwo: P0, pmmt: *mut super::MMTIME, cbmmt: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutGetPosition(hwo: HWAVEOUT, pmmt: *mut super::MMTIME, cbmmt: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetPosition(hwo : HWAVEOUT, pmmt : *mut super:: MMTIME, cbmmt : u32) -> u32); - waveOutGetPosition(hwo.param().abi(), core::mem::transmute(pmmt), core::mem::transmute(cbmmt)) + waveOutGetPosition(core::mem::transmute(hwo), core::mem::transmute(pmmt), core::mem::transmute(cbmmt)) } #[inline] -pub unsafe fn waveOutGetVolume(hwo: P0, pdwvolume: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutGetVolume(hwo: Option, pdwvolume: *mut u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutGetVolume(hwo : HWAVEOUT, pdwvolume : *mut u32) -> u32); - waveOutGetVolume(hwo.param().abi(), core::mem::transmute(pdwvolume)) + waveOutGetVolume(core::mem::transmute(hwo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwvolume)) } #[inline] -pub unsafe fn waveOutMessage(hwo: P0, umsg: u32, dw1: usize, dw2: usize) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutMessage(hwo: Option, umsg: u32, dw1: usize, dw2: usize) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutMessage(hwo : HWAVEOUT, umsg : u32, dw1 : usize, dw2 : usize) -> u32); - waveOutMessage(hwo.param().abi(), core::mem::transmute(umsg), core::mem::transmute(dw1), core::mem::transmute(dw2)) + waveOutMessage(core::mem::transmute(hwo.unwrap_or(core::mem::zeroed())), core::mem::transmute(umsg), core::mem::transmute(dw1), core::mem::transmute(dw2)) } #[inline] -pub unsafe fn waveOutOpen(phwo: Option<*mut HWAVEOUT>, udeviceid: u32, pwfx: *const WAVEFORMATEX, dwcallback: usize, dwinstance: usize, fdwopen: MIDI_WAVE_OPEN_TYPE) -> u32 { +pub unsafe fn waveOutOpen(phwo: Option<*mut HWAVEOUT>, udeviceid: u32, pwfx: *const WAVEFORMATEX, dwcallback: Option, dwinstance: Option, 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(core::ptr::null_mut())), core::mem::transmute(udeviceid), core::mem::transmute(pwfx), core::mem::transmute(dwcallback), core::mem::transmute(dwinstance), core::mem::transmute(fdwopen)) + waveOutOpen(core::mem::transmute(phwo.unwrap_or(core::mem::zeroed())), core::mem::transmute(udeviceid), core::mem::transmute(pwfx), core::mem::transmute(dwcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn waveOutPause(hwo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutPause(hwo: HWAVEOUT) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutPause(hwo : HWAVEOUT) -> u32); - waveOutPause(hwo.param().abi()) + waveOutPause(core::mem::transmute(hwo)) } #[inline] -pub unsafe fn waveOutPrepareHeader(hwo: P0, pwh: *mut WAVEHDR, cbwh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutPrepareHeader(hwo: HWAVEOUT, pwh: *mut WAVEHDR, cbwh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutPrepareHeader(hwo : HWAVEOUT, pwh : *mut WAVEHDR, cbwh : u32) -> u32); - waveOutPrepareHeader(hwo.param().abi(), core::mem::transmute(pwh), core::mem::transmute(cbwh)) + waveOutPrepareHeader(core::mem::transmute(hwo), core::mem::transmute(pwh), core::mem::transmute(cbwh)) } #[inline] -pub unsafe fn waveOutReset(hwo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutReset(hwo: HWAVEOUT) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutReset(hwo : HWAVEOUT) -> u32); - waveOutReset(hwo.param().abi()) + waveOutReset(core::mem::transmute(hwo)) } #[inline] -pub unsafe fn waveOutRestart(hwo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutRestart(hwo: HWAVEOUT) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutRestart(hwo : HWAVEOUT) -> u32); - waveOutRestart(hwo.param().abi()) + waveOutRestart(core::mem::transmute(hwo)) } #[inline] -pub unsafe fn waveOutSetPitch(hwo: P0, dwpitch: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutSetPitch(hwo: HWAVEOUT, dwpitch: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutSetPitch(hwo : HWAVEOUT, dwpitch : u32) -> u32); - waveOutSetPitch(hwo.param().abi(), core::mem::transmute(dwpitch)) + waveOutSetPitch(core::mem::transmute(hwo), core::mem::transmute(dwpitch)) } #[inline] -pub unsafe fn waveOutSetPlaybackRate(hwo: P0, dwrate: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutSetPlaybackRate(hwo: HWAVEOUT, dwrate: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutSetPlaybackRate(hwo : HWAVEOUT, dwrate : u32) -> u32); - waveOutSetPlaybackRate(hwo.param().abi(), core::mem::transmute(dwrate)) + waveOutSetPlaybackRate(core::mem::transmute(hwo), core::mem::transmute(dwrate)) } #[inline] -pub unsafe fn waveOutSetVolume(hwo: P0, dwvolume: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutSetVolume(hwo: Option, dwvolume: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutSetVolume(hwo : HWAVEOUT, dwvolume : u32) -> u32); - waveOutSetVolume(hwo.param().abi(), core::mem::transmute(dwvolume)) + waveOutSetVolume(core::mem::transmute(hwo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwvolume)) } #[inline] -pub unsafe fn waveOutUnprepareHeader(hwo: P0, pwh: *mut WAVEHDR, cbwh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutUnprepareHeader(hwo: HWAVEOUT, pwh: *mut WAVEHDR, cbwh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutUnprepareHeader(hwo : HWAVEOUT, pwh : *mut WAVEHDR, cbwh : u32) -> u32); - waveOutUnprepareHeader(hwo.param().abi(), core::mem::transmute(pwh), core::mem::transmute(cbwh)) + waveOutUnprepareHeader(core::mem::transmute(hwo), core::mem::transmute(pwh), core::mem::transmute(cbwh)) } #[inline] -pub unsafe fn waveOutWrite(hwo: P0, pwh: *mut WAVEHDR, cbwh: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn waveOutWrite(hwo: HWAVEOUT, pwh: *mut WAVEHDR, cbwh: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutWrite(hwo : HWAVEOUT, pwh : *mut WAVEHDR, cbwh : u32) -> u32); - waveOutWrite(hwo.param().abi(), core::mem::transmute(pwh), core::mem::transmute(cbwh)) + waveOutWrite(core::mem::transmute(hwo), core::mem::transmute(pwh), core::mem::transmute(cbwh)) } pub const ACMDM_DRIVER_ABOUT: u32 = 24587u32; pub const ACMDM_DRIVER_DETAILS: u32 = 24586u32; @@ -2833,7 +2514,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -2899,7 +2580,7 @@ windows_core::imp::define_interface!(IAudioCaptureClient, IAudioCaptureClient_Vt 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), core::mem::transmute(ppdata), core::mem::transmute(pnumframestoread), core::mem::transmute(pdwflags), core::mem::transmute(pu64deviceposition.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pu64qpcposition.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdata), core::mem::transmute(pnumframestoread), core::mem::transmute(pdwflags), core::mem::transmute(pu64deviceposition.unwrap_or(core::mem::zeroed())), core::mem::transmute(pu64qpcposition.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReleaseBuffer(&self, numframesread: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(numframesread)).ok() @@ -2957,7 +2638,7 @@ windows_core::imp::define_interface!(IAudioChannelConfig, IAudioChannelConfig_Vt 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), core::mem::transmute(dwconfig), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetChannelConfig)(windows_core::Interface::as_raw(self), core::mem::transmute(dwconfig), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetChannelConfig(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3005,7 +2686,7 @@ windows_core::imp::define_interface!(IAudioClient, IAudioClient_Vtbl, 0x1cb9ad4c 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), core::mem::transmute(sharemode), core::mem::transmute(streamflags), core::mem::transmute(hnsbufferduration), core::mem::transmute(hnsperiodicity), core::mem::transmute(pformat), core::mem::transmute(audiosessionguid.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(sharemode), core::mem::transmute(streamflags), core::mem::transmute(hnsbufferduration), core::mem::transmute(hnsperiodicity), core::mem::transmute(pformat), core::mem::transmute(audiosessionguid.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetBufferSize(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3020,14 +2701,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), core::mem::transmute(sharemode), core::mem::transmute(pformat), core::mem::transmute(ppclosestmatch.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), core::mem::transmute(sharemode), core::mem::transmute(pformat), core::mem::transmute(ppclosestmatch.unwrap_or(core::mem::zeroed()))) } 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(core::ptr::null_mut())), core::mem::transmute(phnsminimumdeviceperiod.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDevicePeriod)(windows_core::Interface::as_raw(self), core::mem::transmute(phnsdefaultdeviceperiod.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnsminimumdeviceperiod.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Start(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self)).ok() @@ -3038,11 +2719,8 @@ impl IAudioClient { pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetEventHandle(&self, eventhandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventHandle)(windows_core::Interface::as_raw(self), eventhandle.param().abi()).ok() + pub unsafe fn SetEventHandle(&self, eventhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(eventhandle)).ok() } pub unsafe fn GetService(&self) -> windows_core::Result where @@ -3260,7 +2938,7 @@ impl IAudioClient3 { (windows_core::Interface::vtable(self).GetCurrentSharedModeEnginePeriod)(windows_core::Interface::as_raw(self), core::mem::transmute(ppformat), core::mem::transmute(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), core::mem::transmute(streamflags), core::mem::transmute(periodinframes), core::mem::transmute(pformat), core::mem::transmute(audiosessionguid.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).InitializeSharedAudioStream)(windows_core::Interface::as_raw(self), core::mem::transmute(streamflags), core::mem::transmute(periodinframes), core::mem::transmute(pformat), core::mem::transmute(audiosessionguid.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3340,7 +3018,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), core::mem::transmute(pu64position), core::mem::transmute(pu64qpcposition.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pu64position), core::mem::transmute(pu64qpcposition.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCharacteristics(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3401,7 +3079,7 @@ windows_core::imp::define_interface!(IAudioClock2, IAudioClock2_Vtbl, 0x6f49ff73 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), core::mem::transmute(deviceposition), core::mem::transmute(qpcposition.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDevicePosition)(windows_core::Interface::as_raw(self), core::mem::transmute(deviceposition), core::mem::transmute(qpcposition.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3607,7 +3285,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), core::mem::transmute(nidselect), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(nidselect), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3658,7 +3336,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -3727,7 +3405,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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetMute(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3775,7 +3453,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), core::mem::transmute(nidselect), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(nidselect), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -4330,11 +4008,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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(streamflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -4513,7 +4191,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), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) } pub unsafe fn UnregisterCallback(&self, registration: i64) { (windows_core::Interface::vtable(self).UnregisterCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(registration)) @@ -4837,11 +4515,8 @@ impl windows_core::RuntimeName for IAudioTreble {} windows_core::imp::define_interface!(IAudioViewManagerService, IAudioViewManagerService_Vtbl, 0xa7a7ef10_1f49_45e0_ad35_612057cc8f74); windows_core::imp::interface_hierarchy!(IAudioViewManagerService, windows_core::IUnknown); impl IAudioViewManagerService { - pub unsafe fn SetAudioStreamWindow(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAudioStreamWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SetAudioStreamWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAudioStreamWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } } #[repr(C)] @@ -5169,7 +4844,7 @@ windows_core::imp::define_interface!(IControlChangeNotify, 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), core::mem::transmute(dwsenderprocessid), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsenderprocessid), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5255,7 +4930,7 @@ impl IDeviceSpecificProperty { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvvalue), core::mem::transmute(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), core::mem::transmute(pvvalue), core::mem::transmute(cbvalue), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvvalue), core::mem::transmute(cbvalue), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(plmin), core::mem::transmute(plmax), core::mem::transmute(plstepping)).ok() @@ -5466,7 +5141,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, core::mem::transmute(dwclsctx), core::mem::transmute(pactivationparams.unwrap_or(core::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, core::mem::transmute(dwclsctx), core::mem::transmute(pactivationparams.unwrap_or(core::mem::zeroed())), &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 { @@ -5562,7 +5237,7 @@ impl IMMDeviceActivator { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(iid), pdevice.param().abi(), core::mem::transmute(pactivationparams.unwrap_or(core::ptr::null())), core::mem::transmute(ppinterface)).ok() + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(iid), pdevice.param().abi(), core::mem::transmute(pactivationparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppinterface)).ok() } } #[repr(C)] @@ -5869,23 +5544,14 @@ windows_core::imp::define_interface!(IMessageFilter, IMessageFilter_Vtbl, 0x0000 windows_core::imp::interface_hierarchy!(IMessageFilter, windows_core::IUnknown); impl IMessageFilter { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn HandleInComingCall(&self, dwcalltype: u32, htaskcaller: P1, dwtickcount: u32, lpinterfaceinfo: Option<*const super::super::System::Com::INTERFACEINFO>) -> u32 - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).HandleInComingCall)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcalltype), htaskcaller.param().abi(), core::mem::transmute(dwtickcount), core::mem::transmute(lpinterfaceinfo.unwrap_or(core::ptr::null()))) + pub unsafe fn HandleInComingCall(&self, dwcalltype: u32, htaskcaller: super::HTASK, dwtickcount: u32, lpinterfaceinfo: Option<*const super::super::System::Com::INTERFACEINFO>) -> u32 { + (windows_core::Interface::vtable(self).HandleInComingCall)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcalltype), core::mem::transmute(htaskcaller), core::mem::transmute(dwtickcount), core::mem::transmute(lpinterfaceinfo.unwrap_or(core::mem::zeroed()))) } - pub unsafe fn RetryRejectedCall(&self, htaskcallee: P0, dwtickcount: u32, dwrejecttype: u32) -> u32 - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RetryRejectedCall)(windows_core::Interface::as_raw(self), htaskcallee.param().abi(), core::mem::transmute(dwtickcount), core::mem::transmute(dwrejecttype)) + pub unsafe fn RetryRejectedCall(&self, htaskcallee: super::HTASK, dwtickcount: u32, dwrejecttype: u32) -> u32 { + (windows_core::Interface::vtable(self).RetryRejectedCall)(windows_core::Interface::as_raw(self), core::mem::transmute(htaskcallee), core::mem::transmute(dwtickcount), core::mem::transmute(dwrejecttype)) } - pub unsafe fn MessagePending(&self, htaskcallee: P0, dwtickcount: u32, dwpendingtype: u32) -> u32 - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).MessagePending)(windows_core::Interface::as_raw(self), htaskcallee.param().abi(), core::mem::transmute(dwtickcount), core::mem::transmute(dwpendingtype)) + pub unsafe fn MessagePending(&self, htaskcallee: super::HTASK, dwtickcount: u32, dwpendingtype: u32) -> u32 { + (windows_core::Interface::vtable(self).MessagePending)(windows_core::Interface::as_raw(self), core::mem::transmute(htaskcallee), core::mem::transmute(dwtickcount), core::mem::transmute(dwpendingtype)) } } #[repr(C)] @@ -5976,7 +5642,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), core::mem::transmute(dwclscontext), core::mem::transmute(refiid), core::mem::transmute(ppvobject.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(dwclscontext), core::mem::transmute(refiid), core::mem::transmute(ppvobject.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn RegisterControlChangeCallback(&self, riid: *const windows_core::GUID, pnotify: P1) -> windows_core::Result<()> where @@ -6225,13 +5891,13 @@ impl IPerChannelDbLevel { (windows_core::Interface::vtable(self).GetLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(nchannel), core::mem::transmute(fleveldb), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(nchannel), core::mem::transmute(fleveldb), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(fleveldb), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetLevelUniform)(windows_core::Interface::as_raw(self), core::mem::transmute(fleveldb), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -6410,7 +6076,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), core::mem::transmute(streamuuid), core::mem::transmute(auxiliaryinfo.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).IsSpatialAudioStreamAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(streamuuid), core::mem::transmute(auxiliaryinfo.unwrap_or(core::mem::zeroed()))).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 @@ -6598,7 +6264,7 @@ windows_core::imp::define_interface!(ISpatialAudioMetadataClient, ISpatialAudioM 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), core::mem::transmute(maxitemcount), core::mem::transmute(framecount), core::mem::transmute(metadataitemsbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadataitems)).ok() + (windows_core::Interface::vtable(self).ActivateSpatialAudioMetadataItems)(windows_core::Interface::as_raw(self), core::mem::transmute(maxitemcount), core::mem::transmute(framecount), core::mem::transmute(metadataitemsbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(metadataitems)).ok() } pub unsafe fn GetSpatialAudioMetadataItemsBufferLength(&self, maxitemcount: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6991,7 +6657,7 @@ impl ISpatialAudioMetadataWriter { (windows_core::Interface::vtable(self).WriteNextItem)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(commandid), core::mem::transmute(valuebuffer.unwrap_or(core::ptr::null())), core::mem::transmute(valuebufferlength)).ok() + (windows_core::Interface::vtable(self).WriteNextItemCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(valuebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuebufferlength)).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -7261,7 +6927,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), core::mem::transmute(commandid), core::mem::transmute(valuebuffer.unwrap_or(core::ptr::null())), core::mem::transmute(valuebufferlength)).ok() + (windows_core::Interface::vtable(self).WriteNextMetadataCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(valuebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 c0cd89529c..6eeb3ab4d1 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs @@ -1060,7 +1060,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), core::mem::transmute(dwattributes), core::mem::transmute(pformat.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetStorageGlobals(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1068,7 +1068,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), core::mem::transmute(pdwattributes), core::mem::transmute(pformat.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwattributes), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).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() @@ -1089,7 +1089,7 @@ impl IMDSPStorage { P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateStorage)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(pformat.unwrap_or(core::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), core::mem::transmute(dwattributes), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed())), 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(); @@ -1244,15 +1244,15 @@ impl IMDSPStorage2 { P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateStorage2)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(dwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null())), pwszname.param().abi(), core::mem::transmute(qwfilesize), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateStorage2)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(dwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed())), pwszname.param().abi(), core::mem::transmute(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), core::mem::transmute(dwattributes), core::mem::transmute(dwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(dwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdwattributes), core::mem::transmute(pdwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAttributes2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwattributes), core::mem::transmute(pdwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -2108,7 +2108,7 @@ impl ISCPSecureQuery2 { core::mem::transmute(pszrevocationurl), core::mem::transmute(pdwrevocationurllen), core::mem::transmute(pdwrevocationbitflag), - core::mem::transmute(pqwfilesize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pqwfilesize.unwrap_or(core::mem::zeroed())), punknown.param().abi(), core::mem::transmute(ppexchange), core::mem::transmute(abmac.as_ptr()), @@ -2197,7 +2197,7 @@ impl ISCPSecureQuery3 { core::mem::transmute(pszrevocationurl), core::mem::transmute(pdwrevocationurllen), core::mem::transmute(pdwrevocationbitflag), - core::mem::transmute(pqwfilesize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pqwfilesize.unwrap_or(core::mem::zeroed())), punknown.param().abi(), core::mem::transmute(ppexchange), ) @@ -3393,11 +3393,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), core::mem::transmute(pdwattributes), core::mem::transmute(pformat.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetObjectAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwattributes), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwattributes), core::mem::transmute(pformat.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetObjectAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdwsize), core::mem::transmute(pdwsizehigh)).ok() @@ -3522,11 +3522,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), core::mem::transmute(dwattributes), core::mem::transmute(dwattributesex), core::mem::transmute(pformat.unwrap_or(core::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetObjectAttributes2)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(dwattributesex), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdwattributes), core::mem::transmute(pdwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetObjectAttributes2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwattributes), core::mem::transmute(pdwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3701,13 +3701,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), core::mem::transmute(dwestimatedticks), core::mem::transmute(pcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Begin3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), core::mem::transmute(dwestimatedticks), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwtranspiredticks), core::mem::transmute(pcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Progress3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), core::mem::transmute(dwtranspiredticks), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(hrcompletioncode), core::mem::transmute(pcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).End3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), core::mem::transmute(hrcompletioncode), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3781,7 +3781,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), core::mem::transmute(dwattributes), core::mem::transmute(pformat.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetStorageGlobals(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3789,7 +3789,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), core::mem::transmute(pdwattributes), core::mem::transmute(pformat.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwattributes), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed()))).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() @@ -3937,11 +3937,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), core::mem::transmute(dwattributes), core::mem::transmute(dwattributesex), core::mem::transmute(pformat.unwrap_or(core::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), core::mem::transmute(dwattributes), core::mem::transmute(dwattributesex), core::mem::transmute(pformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdwattributes), core::mem::transmute(pdwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAttributes2)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwattributes), core::mem::transmute(pdwattributesex), core::mem::transmute(paudioformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideoformat.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -4317,7 +4317,7 @@ impl IWMDMStorageControl2 { P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).Insert2)(windows_core::Interface::as_raw(self), core::mem::transmute(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() + (windows_core::Interface::vtable(self).Insert2)(windows_core::Interface::as_raw(self), core::mem::transmute(fumode), pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), punknown.param().abi(), core::mem::transmute(ppnewobject.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -4359,7 +4359,7 @@ impl IWMDMStorageControl3 { P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).Insert3)(windows_core::Interface::as_raw(self), core::mem::transmute(fumode), core::mem::transmute(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() + (windows_core::Interface::vtable(self).Insert3)(windows_core::Interface::as_raw(self), core::mem::transmute(fumode), core::mem::transmute(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::mem::zeroed()))).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 94207d0725..b68dffa31c 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 @@ -3713,21 +3713,15 @@ impl ICAT { pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(btag), core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self, dwtimeout: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(dwtimeout), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() @@ -5044,12 +5038,11 @@ windows_core::imp::define_interface!(ICreatePropBagOnRegKey, ICreatePropBagOnReg windows_core::imp::interface_hierarchy!(ICreatePropBagOnRegKey, windows_core::IUnknown); impl ICreatePropBagOnRegKey { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn Create(&self, hkey: P0, subkey: P1, uloptions: u32, samdesired: u32, iid: *const windows_core::GUID, ppbag: *mut *mut core::ffi::c_void) -> windows_core::Result<()> + pub unsafe fn Create(&self, hkey: super::super::super::System::Registry::HKEY, subkey: P1, uloptions: u32, samdesired: u32, iid: *const windows_core::GUID, ppbag: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hkey.param().abi(), subkey.param().abi(), core::mem::transmute(uloptions), core::mem::transmute(samdesired), core::mem::transmute(iid), core::mem::transmute(ppbag)).ok() + (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), core::mem::transmute(hkey), subkey.param().abi(), core::mem::transmute(uloptions), core::mem::transmute(samdesired), core::mem::transmute(iid), core::mem::transmute(ppbag)).ok() } } #[repr(C)] @@ -5498,11 +5491,8 @@ impl IDVBSLocator { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).WestPosition)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetWestPosition(&self, westlongitude: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWestPosition)(windows_core::Interface::as_raw(self), westlongitude.param().abi()).ok() + pub unsafe fn SetWestPosition(&self, westlongitude: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWestPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(westlongitude)).ok() } pub unsafe fn OrbitalPosition(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6100,11 +6090,8 @@ impl IDVBTLocator { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OtherFrequencyInUse)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOtherFrequencyInUse(&self, otherfrequencyinuseval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOtherFrequencyInUse)(windows_core::Interface::as_raw(self), otherfrequencyinuseval.param().abi()).ok() + pub unsafe fn SetOtherFrequencyInUse(&self, otherfrequencyinuseval: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOtherFrequencyInUse)(windows_core::Interface::as_raw(self), core::mem::transmute(otherfrequencyinuseval)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -6596,7 +6583,7 @@ impl IDVB_BAT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6619,23 +6606,17 @@ impl IDVB_BAT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() @@ -6942,23 +6923,17 @@ impl IDVB_EIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() @@ -7309,7 +7284,7 @@ impl IDVB_NIT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7332,23 +7307,17 @@ impl IDVB_NIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() @@ -7751,23 +7720,17 @@ impl IDVB_SDT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() @@ -8021,7 +7984,7 @@ impl IDVB_SIT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8044,23 +8007,17 @@ impl IDVB_SIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self, dwtimeout: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(dwtimeout), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() @@ -8383,7 +8340,7 @@ impl IDVB_TOT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } } #[repr(C)] @@ -11375,7 +11332,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), core::mem::transmute(pid), core::mem::transmute(pwprogramnumber.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetPMT)(windows_core::Interface::as_raw(self), core::mem::transmute(pid), core::mem::transmute(pwprogramnumber.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetTSDT(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11383,19 +11340,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), core::mem::transmute(tableid), core::mem::transmute(pwnetworkid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetNIT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pwnetworkid.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(tableid), core::mem::transmute(pwtransportstreamid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pwtransportstreamid.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(tableid), core::mem::transmute(pwserviceid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetEIT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pwserviceid.unwrap_or(core::mem::zeroed())), &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(core::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::mem::zeroed())), &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(); @@ -11639,7 +11596,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), core::mem::transmute(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__)) + (windows_core::Interface::vtable(self).GetEIT2)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pwserviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbsegment.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -14710,7 +14667,7 @@ impl IISDB_BIT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14729,7 +14686,7 @@ impl IISDB_BIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14943,7 +14900,7 @@ impl IISDB_CDT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetSizeOfDataModule(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15281,7 +15238,7 @@ impl IISDB_LDT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15495,7 +15452,7 @@ impl IISDB_NBIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15822,7 +15779,7 @@ impl IISDB_SDTT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(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), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrecordindex), core::mem::transmute(btag), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -18375,27 +18332,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), core::mem::transmute(tableid), core::mem::transmute(pwtransportstreamid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pwtransportstreamid.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(tableid), core::mem::transmute(pworiginalnetworkid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetBIT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pworiginalnetworkid.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(tableid), core::mem::transmute(pworiginalnetworkid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetNBIT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pworiginalnetworkid.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(tableid), core::mem::transmute(pworiginalserviceid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetLDT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pworiginalserviceid.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(tableid), core::mem::transmute(pwtableidext.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDTT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(pwtableidext.unwrap_or(core::mem::zeroed())), &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), core::mem::transmute(tableid), core::mem::transmute(bsectionnumber), core::mem::transmute(pwdownloaddataid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetCDT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), core::mem::transmute(bsectionnumber), core::mem::transmute(pwdownloaddataid.unwrap_or(core::mem::zeroed())), &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(); @@ -19636,11 +19593,8 @@ impl IMSVidAnalogTuner { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SAP)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSAP(&self, fsapon: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSAP)(windows_core::Interface::as_raw(self), fsapon.param().abi()).ok() + pub unsafe fn SetSAP(&self, fsapon: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSAP)(windows_core::Interface::as_raw(self), core::mem::transmute(fsapon)).ok() } pub unsafe fn ChannelAvailable(&self, nchannel: i32, signalstrength: *mut i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -20253,11 +20207,8 @@ impl IMSVidClosedCaptioning { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnable(&self, on: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnable)(windows_core::Interface::as_raw(self), on.param().abi()).ok() + pub unsafe fn SetEnable(&self, on: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnable)(windows_core::Interface::as_raw(self), core::mem::transmute(on)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -20504,11 +20455,8 @@ impl IMSVidCtl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoSize)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoSize(&self, vbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoSize)(windows_core::Interface::as_raw(self), vbool.param().abi()).ok() + pub unsafe fn SetAutoSize(&self, vbool: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(vbool)).ok() } pub unsafe fn BackColor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -20521,21 +20469,15 @@ impl IMSVidCtl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, vbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), vbool.param().abi()).ok() + pub unsafe fn SetEnabled(&self, vbool: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(vbool)).ok() } pub unsafe fn TabStop(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).TabStop)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetTabStop(&self, vbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTabStop)(windows_core::Interface::as_raw(self), vbool.param().abi()).ok() + pub unsafe fn SetTabStop(&self, vbool: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTabStop)(windows_core::Interface::as_raw(self), core::mem::transmute(vbool)).ok() } pub unsafe fn Window(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -20555,11 +20497,8 @@ impl IMSVidCtl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MaintainAspectRatio)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMaintainAspectRatio(&self, newvalue: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMaintainAspectRatio)(windows_core::Interface::as_raw(self), newvalue.param().abi()).ok() + pub unsafe fn SetMaintainAspectRatio(&self, newvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMaintainAspectRatio)(windows_core::Interface::as_raw(self), core::mem::transmute(newvalue)).ok() } pub unsafe fn ColorKey(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21213,11 +21152,8 @@ impl IMSVidDevice { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Status)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPower(&self, power: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPower)(windows_core::Interface::as_raw(self), power.param().abi()).ok() + pub unsafe fn SetPower(&self, power: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPower)(windows_core::Interface::as_raw(self), core::mem::transmute(power)).ok() } pub unsafe fn Power(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21484,11 +21420,8 @@ impl IMSVidEVR { { (windows_core::Interface::vtable(self).SetPresenter)(windows_core::Interface::as_raw(self), pallocpresent.param().abi()).ok() } - pub unsafe fn SetSuppressEffects(&self, bsuppress: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSuppressEffects)(windows_core::Interface::as_raw(self), bsuppress.param().abi()).ok() + pub unsafe fn SetSuppressEffects(&self, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSuppressEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(bsuppress)).ok() } pub unsafe fn SuppressEffects(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -23069,11 +23002,8 @@ impl IMSVidPlayback { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnableResetOnStop)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableResetOnStop(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableResetOnStop)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetEnableResetOnStop(&self, newval: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableResetOnStop)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn Run(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Run)(windows_core::Interface::as_raw(self)).ok() @@ -23084,12 +23014,9 @@ impl IMSVidPlayback { pub unsafe fn Stop(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn get_CanStep(&self, fbackwards: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn get_CanStep(&self, fbackwards: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).get_CanStep)(windows_core::Interface::as_raw(self), fbackwards.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).get_CanStep)(windows_core::Interface::as_raw(self), core::mem::transmute(fbackwards), &mut result__).map(|| result__) } pub unsafe fn Step(&self, lstep: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Step)(windows_core::Interface::as_raw(self), core::mem::transmute(lstep)).ok() @@ -23365,11 +23292,8 @@ impl IMSVidRect { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HWnd)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetHWnd(&self, hwndval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHWnd)(windows_core::Interface::as_raw(self), hwndval.param().abi()).ok() + pub unsafe fn SetHWnd(&self, hwndval: super::super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHWnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndval)).ok() } pub unsafe fn SetRect(&self, rectval: P0) -> windows_core::Result<()> where @@ -24358,11 +24282,8 @@ impl IMSVidStreamBufferSource { pub unsafe fn MaxRatingsLevel(&self, ensystem: EnTvRat_System, enrating: EnTvRat_GenericLevel, lbfenattr: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).MaxRatingsLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(ensystem), core::mem::transmute(enrating), core::mem::transmute(lbfenattr)).ok() } - pub unsafe fn SetBlockUnrated(&self, bblock: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBlockUnrated)(windows_core::Interface::as_raw(self), bblock.param().abi()).ok() + pub unsafe fn SetBlockUnrated(&self, bblock: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBlockUnrated)(windows_core::Interface::as_raw(self), core::mem::transmute(bblock)).ok() } pub unsafe fn SetUnratedDelay(&self, dwdelay: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetUnratedDelay)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdelay)).ok() @@ -25113,11 +25034,8 @@ impl IMSVidVMR9 { { (windows_core::Interface::vtable(self).SetAllocator)(windows_core::Interface::as_raw(self), allocpresent.param().abi(), core::mem::transmute(id)).ok() } - pub unsafe fn SetSuppressEffects(&self, bsuppress: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSuppressEffects)(windows_core::Interface::as_raw(self), bsuppress.param().abi()).ok() + pub unsafe fn SetSuppressEffects(&self, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSuppressEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(bsuppress)).ok() } pub unsafe fn SuppressEffects(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -25218,11 +25136,8 @@ impl IMSVidVRGraphSegment { pub unsafe fn Set_VMRendererMode(&self, dwmode: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Set_VMRendererMode)(windows_core::Interface::as_raw(self), core::mem::transmute(dwmode)).ok() } - pub unsafe fn SetOwner(&self, window: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOwner)(windows_core::Interface::as_raw(self), window.param().abi()).ok() + pub unsafe fn SetOwner(&self, window: super::super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOwner)(windows_core::Interface::as_raw(self), core::mem::transmute(window)).ok() } pub unsafe fn Owner(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -25232,21 +25147,15 @@ impl IMSVidVRGraphSegment { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseOverlay)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseOverlay(&self, useoverlayval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseOverlay)(windows_core::Interface::as_raw(self), useoverlayval.param().abi()).ok() + pub unsafe fn SetUseOverlay(&self, useoverlayval: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseOverlay)(windows_core::Interface::as_raw(self), core::mem::transmute(useoverlayval)).ok() } pub unsafe fn Visible(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Visible)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetVisible(&self, visible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), visible.param().abi()).ok() + pub unsafe fn SetVisible(&self, visible: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), core::mem::transmute(visible)).ok() } pub unsafe fn ColorKey(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -25283,11 +25192,8 @@ impl IMSVidVRGraphSegment { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MaintainAspectRatio)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMaintainAspectRatio(&self, fmaintain: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMaintainAspectRatio)(windows_core::Interface::as_raw(self), fmaintain.param().abi()).ok() + pub unsafe fn SetMaintainAspectRatio(&self, fmaintain: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMaintainAspectRatio)(windows_core::Interface::as_raw(self), core::mem::transmute(fmaintain)).ok() } pub unsafe fn Refresh(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self)).ok() @@ -25296,11 +25202,8 @@ impl IMSVidVRGraphSegment { (windows_core::Interface::vtable(self).DisplayChange)(windows_core::Interface::as_raw(self)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn RePaint(&self, hdc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RePaint)(windows_core::Interface::as_raw(self), hdc.param().abi()).ok() + pub unsafe fn RePaint(&self, hdc: super::super::super::Graphics::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RePaint)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -25673,11 +25576,8 @@ impl IMSVidVideoRenderer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UsingOverlay)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUsingOverlay(&self, useoverlayval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUsingOverlay)(windows_core::Interface::as_raw(self), useoverlayval.param().abi()).ok() + pub unsafe fn SetUsingOverlay(&self, useoverlayval: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUsingOverlay)(windows_core::Interface::as_raw(self), core::mem::transmute(useoverlayval)).ok() } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn Capture(&self) -> windows_core::Result { @@ -25692,11 +25592,8 @@ impl IMSVidVideoRenderer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DecimateInput)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDecimateInput(&self, pdeci: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDecimateInput)(windows_core::Interface::as_raw(self), pdeci.param().abi()).ok() + pub unsafe fn SetDecimateInput(&self, pdeci: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDecimateInput)(windows_core::Interface::as_raw(self), core::mem::transmute(pdeci)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -26084,11 +25981,8 @@ impl IMSVidVideoRenderer2 { { (windows_core::Interface::vtable(self)._SetAllocator2)(windows_core::Interface::as_raw(self), allocpresent.param().abi(), core::mem::transmute(id)).ok() } - pub unsafe fn SetSuppressEffects(&self, bsuppress: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSuppressEffects)(windows_core::Interface::as_raw(self), bsuppress.param().abi()).ok() + pub unsafe fn SetSuppressEffects(&self, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSuppressEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(bsuppress)).ok() } pub unsafe fn SuppressEffects(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -26443,12 +26337,9 @@ impl IMSVidWebDVD { pub unsafe fn StillOff(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StillOff)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn get_AudioLanguage(&self, lstream: i32, fformat: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn get_AudioLanguage(&self, lstream: i32, fformat: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).get_AudioLanguage)(windows_core::Interface::as_raw(self), core::mem::transmute(lstream), fformat.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).get_AudioLanguage)(windows_core::Interface::as_raw(self), core::mem::transmute(lstream), core::mem::transmute(fformat), &mut result__).map(|| core::mem::transmute(result__)) } pub unsafe fn ShowMenu(&self, menuid: DVDMenuIDConstants) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ShowMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(menuid)).ok() @@ -26595,27 +26486,18 @@ impl IMSVidWebDVD { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SubpictureOn)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSubpictureOn(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSubpictureOn)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetSubpictureOn(&self, newval: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSubpictureOn)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn DVDUniqueID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DVDUniqueID)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn AcceptParentalLevelChange(&self, faccept: P0, strusername: &windows_core::BSTR, strpassword: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AcceptParentalLevelChange)(windows_core::Interface::as_raw(self), faccept.param().abi(), core::mem::transmute_copy(strusername), core::mem::transmute_copy(strpassword)).ok() + pub unsafe fn AcceptParentalLevelChange(&self, faccept: super::super::super::Foundation::VARIANT_BOOL, strusername: &windows_core::BSTR, strpassword: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AcceptParentalLevelChange)(windows_core::Interface::as_raw(self), core::mem::transmute(faccept), core::mem::transmute_copy(strusername), core::mem::transmute_copy(strpassword)).ok() } - pub unsafe fn NotifyParentalLevelChange(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).NotifyParentalLevelChange)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn NotifyParentalLevelChange(&self, newval: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).NotifyParentalLevelChange)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn SelectParentalCountry(&self, lcountry: i32, strusername: &windows_core::BSTR, strpassword: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SelectParentalCountry)(windows_core::Interface::as_raw(self), core::mem::transmute(lcountry), core::mem::transmute_copy(strusername), core::mem::transmute_copy(strpassword)).ok() @@ -27865,11 +27747,8 @@ impl IMSVidWebDVDAdm { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).BookmarkOnStop)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBookmarkOnStop(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBookmarkOnStop)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetBookmarkOnStop(&self, newval: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBookmarkOnStop)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -28050,137 +27929,71 @@ impl IMSVidWebDVDEvent { pub unsafe fn DVDNotify(&self, leventcode: i32, lparam1: &super::super::super::System::Variant::VARIANT, lparam2: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DVDNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(leventcode), core::mem::transmute_copy(lparam1), core::mem::transmute_copy(lparam2)).ok() } - pub unsafe fn PlayForwards(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayForwards)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayForwards(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayForwards)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PlayBackwards(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayBackwards)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayBackwards(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayBackwards)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn ShowMenu(&self, menuid: DVDMenuIDConstants, benabled: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(menuid), benabled.param().abi()).ok() + pub unsafe fn ShowMenu(&self, menuid: DVDMenuIDConstants, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(menuid), core::mem::transmute(benabled)).ok() } - pub unsafe fn Resume(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Resume)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn Resume(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Resume)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn SelectOrActivateButton(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SelectOrActivateButton)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SelectOrActivateButton(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectOrActivateButton)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn StillOff(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).StillOff)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn StillOff(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).StillOff)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PauseOn(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PauseOn)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PauseOn(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PauseOn)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn ChangeCurrentAudioStream(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangeCurrentAudioStream)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn ChangeCurrentAudioStream(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangeCurrentAudioStream)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn ChangeCurrentSubpictureStream(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangeCurrentSubpictureStream)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn ChangeCurrentSubpictureStream(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangeCurrentSubpictureStream)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn ChangeCurrentAngle(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangeCurrentAngle)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn ChangeCurrentAngle(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangeCurrentAngle)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PlayAtTimeInTitle(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayAtTimeInTitle)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayAtTimeInTitle(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayAtTimeInTitle)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PlayAtTime(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayAtTime)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayAtTime(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayAtTime)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PlayChapterInTitle(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayChapterInTitle)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayChapterInTitle(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayChapterInTitle)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PlayChapter(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayChapter)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayChapter(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayChapter)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn ReplayChapter(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReplayChapter)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn ReplayChapter(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReplayChapter)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PlayNextChapter(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayNextChapter)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayNextChapter(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayNextChapter)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn Stop(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn Stop(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn ReturnFromSubmenu(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReturnFromSubmenu)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn ReturnFromSubmenu(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReturnFromSubmenu)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PlayTitle(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayTitle)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayTitle(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayTitle)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn PlayPrevChapter(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayPrevChapter)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn PlayPrevChapter(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayPrevChapter)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn ChangeKaraokePresMode(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangeKaraokePresMode)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn ChangeKaraokePresMode(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangeKaraokePresMode)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } - pub unsafe fn ChangeVideoPresMode(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangeVideoPresMode)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn ChangeVideoPresMode(&self, benabled: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangeVideoPresMode)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -28498,12 +28311,9 @@ impl IMpeg2Data { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetTable)(windows_core::Interface::as_raw(self), core::mem::transmute(pid), core::mem::transmute(tid), core::mem::transmute(pfilter), core::mem::transmute(dwtimeout), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetStreamOfSections(&self, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, hdatareadyevent: P3) -> windows_core::Result - where - P3: windows_core::Param, - { + pub unsafe fn GetStreamOfSections(&self, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, hdatareadyevent: super::super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetStreamOfSections)(windows_core::Interface::as_raw(self), core::mem::transmute(pid), core::mem::transmute(tid), core::mem::transmute(pfilter), hdatareadyevent.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetStreamOfSections)(windows_core::Interface::as_raw(self), core::mem::transmute(pid), core::mem::transmute(tid), core::mem::transmute(pfilter), core::mem::transmute(hdatareadyevent), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -28565,12 +28375,11 @@ impl windows_core::RuntimeName for IMpeg2Data {} windows_core::imp::define_interface!(IMpeg2Stream, IMpeg2Stream_Vtbl, 0x400cc286_32a0_4ce4_9041_39571125a635); windows_core::imp::interface_hierarchy!(IMpeg2Stream, windows_core::IUnknown); impl IMpeg2Stream { - pub unsafe fn Initialize(&self, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: P1, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, hdatareadyevent: P6) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: P1, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, hdatareadyevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> where P1: windows_core::Param, - P6: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(requesttype), pmpeg2data.param().abi(), core::mem::transmute(pcontext), core::mem::transmute(pid), core::mem::transmute(tid), core::mem::transmute(pfilter), hdatareadyevent.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(requesttype), pmpeg2data.param().abi(), core::mem::transmute(pcontext), core::mem::transmute(pid), core::mem::transmute(tid), core::mem::transmute(pfilter), core::mem::transmute(hdatareadyevent)).ok() } pub unsafe fn SupplyDataBuffer(&self, pstreambuffer: *const MPEG_STREAM_BUFFER) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SupplyDataBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pstreambuffer)).ok() @@ -28722,21 +28531,15 @@ impl IPAT { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FindRecordProgramMapPid)(windows_core::Interface::as_raw(self), core::mem::transmute(wprogramnumber), &mut result__).map(|| result__) } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() @@ -29397,21 +29200,15 @@ impl IPMT { pub unsafe fn QueryMPEInfo(&self, ppmpelist: *mut *mut MPE_ELEMENT, puicount: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryMPEInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmpelist), core::mem::transmute(puicount)).ok() } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() @@ -31035,11 +30832,8 @@ impl IScanningTunerEx { pub unsafe fn GetCurrentLocator(&self, pilocator: *const Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetCurrentLocator)(windows_core::Interface::as_raw(self), core::mem::transmute(pilocator)).ok() } - pub unsafe fn PerformExhaustiveScan(&self, dwlowerfreq: i32, dwhigherfreq: i32, bfinetune: P2, hevent: usize) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).PerformExhaustiveScan)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlowerfreq), core::mem::transmute(dwhigherfreq), bfinetune.param().abi(), core::mem::transmute(hevent)).ok() + pub unsafe fn PerformExhaustiveScan(&self, dwlowerfreq: i32, dwhigherfreq: i32, bfinetune: super::super::super::Foundation::VARIANT_BOOL, hevent: usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PerformExhaustiveScan)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlowerfreq), core::mem::transmute(dwhigherfreq), core::mem::transmute(bfinetune), core::mem::transmute(hevent)).ok() } pub unsafe fn TerminateCurrentScan(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -31149,12 +30943,11 @@ impl windows_core::RuntimeName for IScanningTunerEx {} windows_core::imp::define_interface!(ISectionList, ISectionList_Vtbl, 0xafec1eb5_2a64_46c6_bf4b_ae3ccb6afdb0); windows_core::imp::interface_hierarchy!(ISectionList, windows_core::IUnknown); impl ISectionList { - pub unsafe fn Initialize(&self, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: P1, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, timeout: u32, hdoneevent: P7) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: P1, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, timeout: u32, hdoneevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> where P1: windows_core::Param, - P7: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(requesttype), pmpeg2data.param().abi(), core::mem::transmute(pcontext), core::mem::transmute(pid), core::mem::transmute(tid), core::mem::transmute(pfilter), core::mem::transmute(timeout), hdoneevent.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(requesttype), pmpeg2data.param().abi(), core::mem::transmute(pcontext), core::mem::transmute(pid), core::mem::transmute(tid), core::mem::transmute(pfilter), core::mem::transmute(timeout), core::mem::transmute(hdoneevent)).ok() } pub unsafe fn InitializeWithRawSections(&self, pmplsections: *const MPEG_PACKET_LIST) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeWithRawSections)(windows_core::Interface::as_raw(self), core::mem::transmute(pmplsections)).ok() @@ -31647,11 +31440,8 @@ windows_core::imp::define_interface!(IStreamBufferInitialize, IStreamBufferIniti windows_core::imp::interface_hierarchy!(IStreamBufferInitialize, windows_core::IUnknown); impl IStreamBufferInitialize { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn SetHKEY(&self, hkeyroot: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHKEY)(windows_core::Interface::as_raw(self), hkeyroot.param().abi()).ok() + pub unsafe fn SetHKEY(&self, hkeyroot: super::super::super::System::Registry::HKEY) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHKEY)(windows_core::Interface::as_raw(self), core::mem::transmute(hkeyroot)).ok() } #[cfg(feature = "Win32_Security")] pub unsafe fn SetSIDs(&self, csids: u32, ppsid: *mut super::super::super::Security::PSID) -> windows_core::Result<()> { @@ -32178,21 +31968,15 @@ impl ITSDT { pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), core::mem::transmute(btag), core::mem::transmute(pdwcookie), core::mem::transmute(ppdescriptor)).ok() } - pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), hnexttableavailable.param().abi()).ok() + pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForNextTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableavailable)).ok() } pub unsafe fn GetNextTable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNextTable)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), hnexttableiscurrent.param().abi()).ok() + pub unsafe fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterForWhenCurrent)(windows_core::Interface::as_raw(self), core::mem::transmute(hnexttableiscurrent)).ok() } pub unsafe fn ConvertNextToCurrent(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertNextToCurrent)(windows_core::Interface::as_raw(self)).ok() 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 3d5cdbdd06..d8cb05f62b 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs @@ -5944,12 +5944,11 @@ impl IAMDirectSound { { (windows_core::Interface::vtable(self).ReleaseSecondaryBufferInterface)(windows_core::Interface::as_raw(self), lpdsb.param().abi()).ok() } - pub unsafe fn SetFocusWindow(&self, param0: P0, param1: P1) -> windows_core::Result<()> + pub unsafe fn SetFocusWindow(&self, param0: super::super::Foundation::HWND, param1: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetFocusWindow)(windows_core::Interface::as_raw(self), param0.param().abi(), param1.param().abi()).ok() + (windows_core::Interface::vtable(self).SetFocusWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi()).ok() } pub unsafe fn GetFocusWindow(&self, param0: *mut super::super::Foundation::HWND, param1: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFocusWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() @@ -8036,11 +8035,8 @@ impl IAMNetShowConfig { pub unsafe fn UseFixedUDPPort(&self, pusefixedudpport: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UseFixedUDPPort)(windows_core::Interface::as_raw(self), core::mem::transmute(pusefixedudpport)).ok() } - pub unsafe fn SetUseFixedUDPPort(&self, usefixedudpport: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseFixedUDPPort)(windows_core::Interface::as_raw(self), usefixedudpport.param().abi()).ok() + pub unsafe fn SetUseFixedUDPPort(&self, usefixedudpport: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseFixedUDPPort)(windows_core::Interface::as_raw(self), core::mem::transmute(usefixedudpport)).ok() } pub unsafe fn FixedUDPPort(&self, pfixedudpport: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FixedUDPPort)(windows_core::Interface::as_raw(self), core::mem::transmute(pfixedudpport)).ok() @@ -8051,20 +8047,14 @@ impl IAMNetShowConfig { pub unsafe fn UseHTTPProxy(&self, pusehttpproxy: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UseHTTPProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(pusehttpproxy)).ok() } - pub unsafe fn SetUseHTTPProxy(&self, usehttpproxy: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseHTTPProxy)(windows_core::Interface::as_raw(self), usehttpproxy.param().abi()).ok() + pub unsafe fn SetUseHTTPProxy(&self, usehttpproxy: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseHTTPProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(usehttpproxy)).ok() } pub unsafe fn EnableAutoProxy(&self, penableautoproxy: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableAutoProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(penableautoproxy)).ok() } - pub unsafe fn SetEnableAutoProxy(&self, enableautoproxy: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableAutoProxy)(windows_core::Interface::as_raw(self), enableautoproxy.param().abi()).ok() + pub unsafe fn SetEnableAutoProxy(&self, enableautoproxy: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableAutoProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(enableautoproxy)).ok() } pub unsafe fn HTTPProxyHost(&self, pbstrhttpproxyhost: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HTTPProxyHost)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrhttpproxyhost)).ok() @@ -8081,38 +8071,26 @@ impl IAMNetShowConfig { pub unsafe fn EnableMulticast(&self, penablemulticast: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableMulticast)(windows_core::Interface::as_raw(self), core::mem::transmute(penablemulticast)).ok() } - pub unsafe fn SetEnableMulticast(&self, enablemulticast: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableMulticast)(windows_core::Interface::as_raw(self), enablemulticast.param().abi()).ok() + pub unsafe fn SetEnableMulticast(&self, enablemulticast: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableMulticast)(windows_core::Interface::as_raw(self), core::mem::transmute(enablemulticast)).ok() } pub unsafe fn EnableUDP(&self, penableudp: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableUDP)(windows_core::Interface::as_raw(self), core::mem::transmute(penableudp)).ok() } - pub unsafe fn SetEnableUDP(&self, enableudp: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableUDP)(windows_core::Interface::as_raw(self), enableudp.param().abi()).ok() + pub unsafe fn SetEnableUDP(&self, enableudp: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableUDP)(windows_core::Interface::as_raw(self), core::mem::transmute(enableudp)).ok() } pub unsafe fn EnableTCP(&self, penabletcp: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableTCP)(windows_core::Interface::as_raw(self), core::mem::transmute(penabletcp)).ok() } - pub unsafe fn SetEnableTCP(&self, enabletcp: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableTCP)(windows_core::Interface::as_raw(self), enabletcp.param().abi()).ok() + pub unsafe fn SetEnableTCP(&self, enabletcp: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableTCP)(windows_core::Interface::as_raw(self), core::mem::transmute(enabletcp)).ok() } pub unsafe fn EnableHTTP(&self, penablehttp: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableHTTP)(windows_core::Interface::as_raw(self), core::mem::transmute(penablehttp)).ok() } - pub unsafe fn SetEnableHTTP(&self, enablehttp: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableHTTP)(windows_core::Interface::as_raw(self), enablehttp.param().abi()).ok() + pub unsafe fn SetEnableHTTP(&self, enablehttp: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableHTTP)(windows_core::Interface::as_raw(self), core::mem::transmute(enablehttp)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -8428,11 +8406,8 @@ impl core::ops::Deref for IAMNetShowPreroll { windows_core::imp::interface_hierarchy!(IAMNetShowPreroll, windows_core::IUnknown, super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl IAMNetShowPreroll { - pub unsafe fn SetPreroll(&self, fpreroll: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPreroll)(windows_core::Interface::as_raw(self), fpreroll.param().abi()).ok() + pub unsafe fn SetPreroll(&self, fpreroll: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPreroll)(windows_core::Interface::as_raw(self), core::mem::transmute(fpreroll)).ok() } pub unsafe fn Preroll(&self, pfpreroll: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Preroll)(windows_core::Interface::as_raw(self), core::mem::transmute(pfpreroll)).ok() @@ -9084,7 +9059,7 @@ impl IAMPluginControl { (windows_core::Interface::vtable(self).GetPreferredClsidByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(subtype), core::mem::transmute(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), core::mem::transmute(subtype), core::mem::transmute(clsid.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), core::mem::transmute(subtype), core::mem::transmute(clsid.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(clsid)).ok() @@ -9324,7 +9299,7 @@ windows_core::imp::define_interface!(IAMResourceControl, IAMResourceControl_Vtbl 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), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Reserve)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -9544,13 +9519,13 @@ windows_core::imp::define_interface!(IAMStreamControl, IAMStreamControl_Vtbl, 0x 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(core::ptr::null())), core::mem::transmute(dwcookie)).ok() + (windows_core::Interface::vtable(self).StartAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstart.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcookie)).ok() } pub unsafe fn StopAt(&self, ptstop: Option<*const i64>, bsendextra: P1, dwcookie: u32) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstop.unwrap_or(core::ptr::null())), bsendextra.param().abi(), core::mem::transmute(dwcookie)).ok() + (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstop.unwrap_or(core::mem::zeroed())), bsendextra.param().abi(), core::mem::transmute(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), core::mem::transmute(pinfo)).ok() @@ -9606,13 +9581,13 @@ impl IAMStreamSelect { (windows_core::Interface::vtable(self).Info)( windows_core::Interface::as_raw(self), core::mem::transmute(lindex), - 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())), + core::mem::transmute(ppmt.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plcid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwgroup.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppszname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppobject.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppunk.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -10280,11 +10255,8 @@ impl IAMTuner { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).TuningSpace)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Logon(&self, hcurrentuser: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Logon)(windows_core::Interface::as_raw(self), hcurrentuser.param().abi()).ok() + pub unsafe fn Logon(&self, hcurrentuser: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Logon)(windows_core::Interface::as_raw(self), core::mem::transmute(hcurrentuser)).ok() } pub unsafe fn Logout(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Logout)(windows_core::Interface::as_raw(self)).ok() @@ -10503,11 +10475,8 @@ impl IAMVfwCaptureDialogs { pub unsafe fn HasDialog(&self, idialog: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HasDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(idialog)).ok() } - pub unsafe fn ShowDialog(&self, idialog: i32, hwnd: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(idialog), hwnd.param().abi()).ok() + pub unsafe fn ShowDialog(&self, idialog: i32, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(idialog), core::mem::transmute(hwnd)).ok() } pub unsafe fn SendDriverMessage(&self, idialog: i32, umsg: i32, dw1: i32, dw2: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SendDriverMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(idialog), core::mem::transmute(umsg), core::mem::transmute(dw1), core::mem::transmute(dw2)).ok() @@ -10554,11 +10523,8 @@ impl windows_core::RuntimeName for IAMVfwCaptureDialogs {} windows_core::imp::define_interface!(IAMVfwCompressDialogs, IAMVfwCompressDialogs_Vtbl, 0xd8d715a3_6e5e_11d0_b3f0_00aa003761c5); windows_core::imp::interface_hierarchy!(IAMVfwCompressDialogs, windows_core::IUnknown); impl IAMVfwCompressDialogs { - pub unsafe fn ShowDialog(&self, idialog: i32, hwnd: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(idialog), hwnd.param().abi()).ok() + pub unsafe fn ShowDialog(&self, idialog: i32, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(idialog), core::mem::transmute(hwnd)).ok() } pub unsafe fn GetState(&self, pstate: *mut core::ffi::c_void, pcbstate: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), core::mem::transmute(pstate), core::mem::transmute(pcbstate)).ok() @@ -10619,11 +10585,11 @@ windows_core::imp::define_interface!(IAMVideoAccelerator, IAMVideoAccelerator_Vt 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), core::mem::transmute(pdwnumguidssupported), core::mem::transmute(pguidssupported.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVideoAcceleratorGUIDs)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwnumguidssupported), core::mem::transmute(pguidssupported.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pguid), core::mem::transmute(pdwnumformatssupported), core::mem::transmute(pformatssupported.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetUncompFormatsSupported)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid), core::mem::transmute(pdwnumformatssupported), core::mem::transmute(pformatssupported.unwrap_or(core::mem::zeroed()))).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<()> { @@ -10631,11 +10597,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), core::mem::transmute(pguid), core::mem::transmute(pamvauncompdatainfo), core::mem::transmute(pdwnumtypescompbuffers), core::mem::transmute(pamvacompbufferinfo.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCompBufferInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid), core::mem::transmute(pamvauncompdatainfo), core::mem::transmute(pdwnumtypescompbuffers), core::mem::transmute(pamvacompbufferinfo.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pdwnumtypescompbuffers), core::mem::transmute(pamvacompbufferinfo.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInternalCompBufferInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwnumtypescompbuffers), core::mem::transmute(pamvacompbufferinfo.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn BeginFrame(&self, amvabeginframeinfo: *const AMVABeginFrameInfo) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BeginFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(amvabeginframeinfo)).ok() @@ -10870,17 +10836,17 @@ impl IAMVideoCompression { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).WindowSize)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetInfo(&self, pszversion: windows_core::PWSTR, pcbversion: Option<*mut i32>, pszdescription: windows_core::PWSTR, pcbdescription: Option<*mut i32>, pdefaultkeyframerate: Option<*mut i32>, pdefaultpframesperkey: Option<*mut i32>, pdefaultquality: Option<*mut f64>, pcapabilities: Option<*mut i32>) -> windows_core::Result<()> { + pub unsafe fn GetInfo(&self, pszversion: Option, pcbversion: Option<*mut i32>, pszdescription: Option, pcbdescription: Option<*mut i32>, pdefaultkeyframerate: Option<*mut i32>, pdefaultpframesperkey: Option<*mut i32>, pdefaultquality: Option<*mut f64>, pcapabilities: Option<*mut i32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetInfo)( windows_core::Interface::as_raw(self), - core::mem::transmute(pszversion), - core::mem::transmute(pcbversion.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(pszdescription), - 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())), + core::mem::transmute(pszversion.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbversion.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pszdescription.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbdescription.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdefaultkeyframerate.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdefaultpframesperkey.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdefaultquality.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcapabilities.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -11584,7 +11550,7 @@ impl IAsyncReader { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), psample.param().abi(), core::mem::transmute(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), core::mem::transmute(dwtimeout), core::mem::transmute(ppsample.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwuser)).ok() + (windows_core::Interface::vtable(self).WaitForNext)(windows_core::Interface::as_raw(self), core::mem::transmute(dwtimeout), core::mem::transmute(ppsample.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwuser)).ok() } pub unsafe fn SyncReadAligned(&self, psample: P0) -> windows_core::Result<()> where @@ -16491,7 +16457,7 @@ impl ICaptureGraphBuilder { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), pf.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppint)).ok() + (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), pf.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppint)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn RenderStream(&self, pcategory: Option<*const windows_core::GUID>, psource: P1, pfcompressor: P2, pfrenderer: P3) -> windows_core::Result<()> @@ -16500,14 +16466,14 @@ impl ICaptureGraphBuilder { P2: windows_core::Param, P3: windows_core::Param, { - (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() + (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), 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: P1, pstart: *const i64, pstop: *const i64, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), pfilter.param().abi(), core::mem::transmute(pstart), core::mem::transmute(pstop), core::mem::transmute(wstartcookie), core::mem::transmute(wstopcookie)).ok() + (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), pfilter.param().abi(), core::mem::transmute(pstart), core::mem::transmute(pstop), core::mem::transmute(wstartcookie), core::mem::transmute(wstopcookie)).ok() } pub unsafe fn AllocCapFile(&self, lpstr: P0, dwlsize: u64) -> windows_core::Result<()> where @@ -16636,14 +16602,14 @@ impl ICaptureGraphBuilder2 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetOutputFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype), lpstrfile.param().abi(), core::mem::transmute(ppf), core::mem::transmute(ppsink.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetOutputFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(ptype), lpstrfile.param().abi(), core::mem::transmute(ppf), core::mem::transmute(ppsink.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn FindInterface(&self, pcategory: Option<*const windows_core::GUID>, ptype: Option<*const windows_core::GUID>, pf: P2, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P2: windows_core::Param, { - (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(), core::mem::transmute(riid), core::mem::transmute(ppint)).ok() + (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), pf.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppint)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn RenderStream(&self, pcategory: Option<*const windows_core::GUID>, ptype: *const windows_core::GUID, psource: P2, pfcompressor: P3, pfrenderer: P4) -> windows_core::Result<()> @@ -16652,14 +16618,14 @@ impl ICaptureGraphBuilder2 { P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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: P2, pstart: Option<*const i64>, pstop: Option<*const i64>, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory), core::mem::transmute(ptype), pfilter.param().abi(), core::mem::transmute(pstart.unwrap_or(core::ptr::null())), core::mem::transmute(pstop.unwrap_or(core::ptr::null())), core::mem::transmute(wstartcookie), core::mem::transmute(wstopcookie)).ok() + (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory), core::mem::transmute(ptype), pfilter.param().abi(), core::mem::transmute(pstart.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstop.unwrap_or(core::mem::zeroed())), core::mem::transmute(wstartcookie), core::mem::transmute(wstopcookie)).ok() } pub unsafe fn AllocCapFile(&self, lpstr: P0, dwlsize: u64) -> windows_core::Result<()> where @@ -16681,7 +16647,7 @@ impl ICaptureGraphBuilder2 { P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindPin)(windows_core::Interface::as_raw(self), psource.param().abi(), core::mem::transmute(pindir), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), core::mem::transmute(ptype.unwrap_or(core::ptr::null())), funconnected.param().abi(), core::mem::transmute(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(), core::mem::transmute(pindir), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), funconnected.param().abi(), core::mem::transmute(num), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -18267,11 +18233,8 @@ impl IDrawVideoImage { (windows_core::Interface::vtable(self).DrawVideoImageEnd)(windows_core::Interface::as_raw(self)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn DrawVideoImageDraw(&self, hdc: P0, lprcsrc: *const super::super::Foundation::RECT, lprcdst: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DrawVideoImageDraw)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(lprcsrc), core::mem::transmute(lprcdst)).ok() + pub unsafe fn DrawVideoImageDraw(&self, hdc: super::super::Graphics::Gdi::HDC, lprcsrc: *const super::super::Foundation::RECT, lprcdst: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DrawVideoImageDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(lprcsrc), core::mem::transmute(lprcdst)).ok() } } #[repr(C)] @@ -20597,7 +20560,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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, cfilters: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(cfilters)).ok() @@ -20672,7 +20635,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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, cmediatypes: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(cmediatypes)).ok() @@ -20814,7 +20777,7 @@ windows_core::imp::define_interface!(IEnumPins, IEnumPins_Vtbl, 0x56a86892_0ad4_ 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, cpins: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(cpins)).ok() @@ -20882,7 +20845,7 @@ windows_core::imp::define_interface!(IEnumRegFilters, IEnumRegFilters_Vtbl, 0x56 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, cfilters: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(cfilters)).ok() @@ -20950,7 +20913,7 @@ windows_core::imp::define_interface!(IEnumStreamIdMap, IEnumStreamIdMap_Vtbl, 0x 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, crecords: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(crecords)).ok() @@ -21025,7 +20988,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(core::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::mem::zeroed()))).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<()> { @@ -21133,11 +21096,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(core::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::mem::zeroed()))).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), core::mem::transmute(ppszfilename), core::mem::transmute(pmt.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurFile)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszfilename), core::mem::transmute(pmt.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -21308,7 +21271,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reconnect(&self, ppin: P0) -> windows_core::Result<()> where @@ -21450,13 +21413,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(core::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::mem::zeroed()))).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(), core::mem::transmute(dwflags), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RenderEx)(windows_core::Interface::as_raw(self), ppinout.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -21876,7 +21839,7 @@ impl IFilterMapper2 { P1: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).RegisterFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(clsidfilter), name.param().abi(), core::mem::transmute(ppmoniker.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pclsidcategory), szinstance.param().abi(), core::mem::transmute(prf2)).ok() + (windows_core::Interface::vtable(self).RegisterFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(clsidfilter), name.param().abi(), core::mem::transmute(ppmoniker.unwrap_or(core::mem::zeroed())), core::mem::transmute(pclsidcategory), szinstance.param().abi(), core::mem::transmute(prf2)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumMatchingFilters(&self, ppenum: *mut Option, dwflags: u32, bexactmatch: P2, dwmerit: u32, binputneeded: P4, cinputtypes: u32, pinputtypes: Option<*const windows_core::GUID>, pmedin: Option<*const REGPINMEDIUM>, ppincategoryin: Option<*const windows_core::GUID>, brender: P9, boutputneeded: P10, coutputtypes: u32, poutputtypes: Option<*const windows_core::GUID>, pmedout: Option<*const REGPINMEDIUM>, ppincategoryout: Option<*const windows_core::GUID>) -> windows_core::Result<()> @@ -21894,15 +21857,15 @@ impl IFilterMapper2 { core::mem::transmute(dwmerit), binputneeded.param().abi(), core::mem::transmute(cinputtypes), - 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())), + core::mem::transmute(pinputtypes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pmedin.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppincategoryin.unwrap_or(core::mem::zeroed())), brender.param().abi(), boutputneeded.param().abi(), core::mem::transmute(coutputtypes), - 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())), + core::mem::transmute(poutputtypes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pmedout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppincategoryout.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -22141,11 +22104,8 @@ impl IFullScreenVideo { pub unsafe fn SetClipFactor(&self, clipfactor: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetClipFactor)(windows_core::Interface::as_raw(self), core::mem::transmute(clipfactor)).ok() } - pub unsafe fn SetMessageDrain(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMessageDrain)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SetMessageDrain(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMessageDrain)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } pub unsafe fn GetMessageDrain(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -22357,12 +22317,8 @@ impl core::ops::Deref for IFullScreenVideoEx { windows_core::imp::interface_hierarchy!(IFullScreenVideoEx, windows_core::IUnknown, IFullScreenVideo); impl IFullScreenVideoEx { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetAcceleratorTable(&self, hwnd: P0, haccel: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAcceleratorTable)(windows_core::Interface::as_raw(self), hwnd.param().abi(), haccel.param().abi()).ok() + pub unsafe fn SetAcceleratorTable(&self, hwnd: super::super::Foundation::HWND, haccel: super::super::UI::WindowsAndMessaging::HACCEL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAcceleratorTable)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(haccel)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetAcceleratorTable(&self, phwnd: *mut super::super::Foundation::HWND, phaccel: *mut super::super::UI::WindowsAndMessaging::HACCEL) -> windows_core::Result<()> { @@ -22608,21 +22564,19 @@ windows_core::imp::define_interface!(IGraphConfig, IGraphConfig_Vtbl, 0x03a1eb8e windows_core::imp::interface_hierarchy!(IGraphConfig, windows_core::IUnknown); impl IGraphConfig { #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] - pub unsafe fn Reconnect(&self, poutputpin: P0, pinputpin: P1, pmtfirstconnection: *const super::MediaFoundation::AM_MEDIA_TYPE, pusingfilter: P3, habortevent: P4, dwflags: u32) -> windows_core::Result<()> + pub unsafe fn Reconnect(&self, poutputpin: P0, pinputpin: P1, pmtfirstconnection: *const super::MediaFoundation::AM_MEDIA_TYPE, pusingfilter: P3, habortevent: super::super::Foundation::HANDLE, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Reconnect)(windows_core::Interface::as_raw(self), poutputpin.param().abi(), pinputpin.param().abi(), core::mem::transmute(pmtfirstconnection), pusingfilter.param().abi(), habortevent.param().abi(), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).Reconnect)(windows_core::Interface::as_raw(self), poutputpin.param().abi(), pinputpin.param().abi(), core::mem::transmute(pmtfirstconnection), pusingfilter.param().abi(), core::mem::transmute(habortevent), core::mem::transmute(dwflags)).ok() } - pub unsafe fn Reconfigure(&self, pcallback: P0, pvcontext: *const core::ffi::c_void, dwflags: u32, habortevent: P3) -> windows_core::Result<()> + pub unsafe fn Reconfigure(&self, pcallback: P0, pvcontext: *const core::ffi::c_void, dwflags: u32, habortevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Reconfigure)(windows_core::Interface::as_raw(self), pcallback.param().abi(), core::mem::transmute(pvcontext), core::mem::transmute(dwflags), habortevent.param().abi()).ok() + (windows_core::Interface::vtable(self).Reconfigure)(windows_core::Interface::as_raw(self), pcallback.param().abi(), core::mem::transmute(pvcontext), core::mem::transmute(dwflags), core::mem::transmute(habortevent)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn AddFilterToCache(&self, pfilter: P0) -> windows_core::Result<()> @@ -22646,13 +22600,12 @@ impl IGraphConfig { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStartTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn PushThroughData(&self, poutputpin: P0, pconnection: P1, heventabort: P2) -> windows_core::Result<()> + pub unsafe fn PushThroughData(&self, poutputpin: P0, pconnection: P1, heventabort: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).PushThroughData)(windows_core::Interface::as_raw(self), poutputpin.param().abi(), pconnection.param().abi(), heventabort.param().abi()).ok() + (windows_core::Interface::vtable(self).PushThroughData)(windows_core::Interface::as_raw(self), poutputpin.param().abi(), pconnection.param().abi(), core::mem::transmute(heventabort)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetFilterFlags(&self, pfilter: P0, dwflags: u32) -> windows_core::Result<()> @@ -23948,7 +23901,7 @@ impl IMediaSample { (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(ptimeend.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptimeend.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn IsSyncPoint(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsSyncPoint)(windows_core::Interface::as_raw(self)) @@ -23996,7 +23949,7 @@ impl IMediaSample { (windows_core::Interface::vtable(self).GetMediaTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(ptimeend.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetMediaTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptimeend.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -24274,16 +24227,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), core::mem::transmute(ptarget), core::mem::transmute(ptargetformat.unwrap_or(core::ptr::null())), core::mem::transmute(source), core::mem::transmute(psourceformat.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ConvertTimeFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(ptarget), core::mem::transmute(ptargetformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(source), core::mem::transmute(psourceformat.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(dwcurrentflags), core::mem::transmute(pstop.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwstopflags)).ok() + (windows_core::Interface::vtable(self).SetPositions)(windows_core::Interface::as_raw(self), core::mem::transmute(pcurrent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcurrentflags), core::mem::transmute(pstop.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pstop.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPositions)(windows_core::Interface::as_raw(self), core::mem::transmute(pcurrent.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstop.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(platest.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(pearliest.unwrap_or(core::mem::zeroed())), core::mem::transmute(platest.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetRate(&self, drate: f64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), core::mem::transmute(drate)).ok() @@ -24831,7 +24784,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(core::ptr::null())), core::mem::transmute(pendtime.unwrap_or(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(pendtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } pub unsafe fn ReleaseBuffer(&self, pbuffer: P0) -> windows_core::Result<()> where @@ -25169,11 +25122,8 @@ impl IMixerOCX { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn OnDraw(&self, hdcdraw: P0, prcdraw: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnDraw)(windows_core::Interface::as_raw(self), hdcdraw.param().abi(), core::mem::transmute(prcdraw)).ok() + pub unsafe fn OnDraw(&self, hdcdraw: super::super::Graphics::Gdi::HDC, prcdraw: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(hdcdraw), core::mem::transmute(prcdraw)).ok() } pub unsafe fn SetDrawRegion(&self, lppttopleftsc: *const super::super::Foundation::POINT, prcdrawcc: *const super::super::Foundation::RECT, lprcclip: *const super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDrawRegion)(windows_core::Interface::as_raw(self), core::mem::transmute(lppttopleftsc), core::mem::transmute(prcdrawcc), core::mem::transmute(lprcclip)).ok() @@ -26196,11 +26146,8 @@ impl core::ops::Deref for IOverlayNotify2 { windows_core::imp::interface_hierarchy!(IOverlayNotify2, windows_core::IUnknown, IOverlayNotify); impl IOverlayNotify2 { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn OnDisplayChange(&self, hmonitor: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnDisplayChange)(windows_core::Interface::as_raw(self), hmonitor.param().abi()).ok() + pub unsafe fn OnDisplayChange(&self, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnDisplayChange)(windows_core::Interface::as_raw(self), core::mem::transmute(hmonitor)).ok() } } #[repr(C)] @@ -26320,7 +26267,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(core::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::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Media_MediaFoundation")] pub unsafe fn ReceiveConnection(&self, pconnector: P0, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()> @@ -26361,7 +26308,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(core::ptr::null_mut())), core::mem::transmute(npin)).ok() + (windows_core::Interface::vtable(self).QueryInternalConnections)(windows_core::Interface::as_raw(self), core::mem::transmute(appin.unwrap_or(core::mem::zeroed())), core::mem::transmute(npin)).ok() } pub unsafe fn EndOfStream(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndOfStream)(windows_core::Interface::as_raw(self)).ok() @@ -26547,11 +26494,8 @@ impl IPinConnection { pub unsafe fn DynamicQueryAccept(&self, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DynamicQueryAccept)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt)).ok() } - pub unsafe fn NotifyEndOfStream(&self, hnotifyevent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).NotifyEndOfStream)(windows_core::Interface::as_raw(self), hnotifyevent.param().abi()).ok() + pub unsafe fn NotifyEndOfStream(&self, hnotifyevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).NotifyEndOfStream)(windows_core::Interface::as_raw(self), core::mem::transmute(hnotifyevent)).ok() } pub unsafe fn IsEndPin(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsEndPin)(windows_core::Interface::as_raw(self)) @@ -26614,11 +26558,8 @@ impl windows_core::RuntimeName for IPinConnection {} windows_core::imp::define_interface!(IPinFlowControl, IPinFlowControl_Vtbl, 0xc56e9858_dbf3_4f6b_8119_384af2060deb); windows_core::imp::interface_hierarchy!(IPinFlowControl, windows_core::IUnknown); impl IPinFlowControl { - pub unsafe fn Block(&self, dwblockflags: u32, hevent: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Block)(windows_core::Interface::as_raw(self), core::mem::transmute(dwblockflags), hevent.param().abi()).ok() + pub unsafe fn Block(&self, dwblockflags: u32, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Block)(windows_core::Interface::as_raw(self), core::mem::transmute(dwblockflags), core::mem::transmute(hevent)).ok() } } #[repr(C)] @@ -27600,11 +27541,8 @@ impl IStreamSample { pub unsafe fn SetSampleTimes(&self, pstarttime: *const i64, pendtime: *const i64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetSampleTimes)(windows_core::Interface::as_raw(self), core::mem::transmute(pstarttime), core::mem::transmute(pendtime)).ok() } - pub unsafe fn Update(&self, dwflags: u32, hevent: P1, pfnapc: super::super::Foundation::PAPCFUNC, dwapcdata: usize) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), hevent.param().abi(), core::mem::transmute(pfnapc), core::mem::transmute(dwapcdata)).ok() + pub unsafe fn Update(&self, dwflags: u32, hevent: super::super::Foundation::HANDLE, pfnapc: super::super::Foundation::PAPCFUNC, dwapcdata: usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), core::mem::transmute(hevent), core::mem::transmute(pfnapc), core::mem::transmute(dwapcdata)).ok() } pub unsafe fn CompletionStatus(&self, dwflags: u32, dwmilliseconds: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CompletionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), core::mem::transmute(dwmilliseconds)).ok() @@ -28824,11 +28762,8 @@ impl IVMRMixerControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetOutputRect)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamid), &mut result__).map(|| result__) } - pub unsafe fn SetBackgroundClr(&self, clrbkg: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBackgroundClr)(windows_core::Interface::as_raw(self), clrbkg.param().abi()).ok() + pub unsafe fn SetBackgroundClr(&self, clrbkg: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBackgroundClr)(windows_core::Interface::as_raw(self), core::mem::transmute(clrbkg)).ok() } pub unsafe fn GetBackgroundClr(&self, lpclrbkg: *const super::super::Foundation::COLORREF) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetBackgroundClr)(windows_core::Interface::as_raw(self), core::mem::transmute(lpclrbkg)).ok() @@ -28976,11 +28911,8 @@ impl IVMRMixerControl9 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetOutputRect)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamid), &mut result__).map(|| result__) } - pub unsafe fn SetBackgroundClr(&self, clrbkg: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBackgroundClr)(windows_core::Interface::as_raw(self), clrbkg.param().abi()).ok() + pub unsafe fn SetBackgroundClr(&self, clrbkg: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBackgroundClr)(windows_core::Interface::as_raw(self), core::mem::transmute(clrbkg)).ok() } pub unsafe fn GetBackgroundClr(&self, lpclrbkg: *const super::super::Foundation::COLORREF) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetBackgroundClr)(windows_core::Interface::as_raw(self), core::mem::transmute(lpclrbkg)).ok() @@ -29679,20 +29611,18 @@ impl IVMRSurfaceAllocatorNotify { (windows_core::Interface::vtable(self).AdviseSurfaceAllocator)(windows_core::Interface::as_raw(self), core::mem::transmute(dwuserid), lpivrmsurfaceallocator.param().abi()).ok() } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi"))] - pub unsafe fn SetDDrawDevice(&self, lpddrawdevice: P0, hmonitor: P1) -> windows_core::Result<()> + pub unsafe fn SetDDrawDevice(&self, lpddrawdevice: P0, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetDDrawDevice)(windows_core::Interface::as_raw(self), lpddrawdevice.param().abi(), hmonitor.param().abi()).ok() + (windows_core::Interface::vtable(self).SetDDrawDevice)(windows_core::Interface::as_raw(self), lpddrawdevice.param().abi(), core::mem::transmute(hmonitor)).ok() } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi"))] - pub unsafe fn ChangeDDrawDevice(&self, lpddrawdevice: P0, hmonitor: P1) -> windows_core::Result<()> + pub unsafe fn ChangeDDrawDevice(&self, lpddrawdevice: P0, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ChangeDDrawDevice)(windows_core::Interface::as_raw(self), lpddrawdevice.param().abi(), hmonitor.param().abi()).ok() + (windows_core::Interface::vtable(self).ChangeDDrawDevice)(windows_core::Interface::as_raw(self), lpddrawdevice.param().abi(), core::mem::transmute(hmonitor)).ok() } pub unsafe fn RestoreDDrawSurfaces(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestoreDDrawSurfaces)(windows_core::Interface::as_raw(self)).ok() @@ -29700,11 +29630,8 @@ impl IVMRSurfaceAllocatorNotify { pub unsafe fn NotifyEvent(&self, eventcode: i32, param1: isize, param2: isize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).NotifyEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(eventcode), core::mem::transmute(param1), core::mem::transmute(param2)).ok() } - pub unsafe fn SetBorderColor(&self, clrborder: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), clrborder.param().abi()).ok() + pub unsafe fn SetBorderColor(&self, clrborder: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(clrborder)).ok() } } #[repr(C)] @@ -29785,20 +29712,18 @@ impl IVMRSurfaceAllocatorNotify9 { (windows_core::Interface::vtable(self).AdviseSurfaceAllocator)(windows_core::Interface::as_raw(self), core::mem::transmute(dwuserid), lpivrmsurfaceallocator.param().abi()).ok() } #[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))] - pub unsafe fn SetD3DDevice(&self, lpd3ddevice: P0, hmonitor: P1) -> windows_core::Result<()> + pub unsafe fn SetD3DDevice(&self, lpd3ddevice: P0, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetD3DDevice)(windows_core::Interface::as_raw(self), lpd3ddevice.param().abi(), hmonitor.param().abi()).ok() + (windows_core::Interface::vtable(self).SetD3DDevice)(windows_core::Interface::as_raw(self), lpd3ddevice.param().abi(), core::mem::transmute(hmonitor)).ok() } #[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))] - pub unsafe fn ChangeD3DDevice(&self, lpd3ddevice: P0, hmonitor: P1) -> windows_core::Result<()> + pub unsafe fn ChangeD3DDevice(&self, lpd3ddevice: P0, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ChangeD3DDevice)(windows_core::Interface::as_raw(self), lpd3ddevice.param().abi(), hmonitor.param().abi()).ok() + (windows_core::Interface::vtable(self).ChangeD3DDevice)(windows_core::Interface::as_raw(self), lpd3ddevice.param().abi(), core::mem::transmute(hmonitor)).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn AllocateSurfaceHelper(&self, lpallocinfo: *const VMR9AllocationInfo, lpnumbuffers: *mut u32, lplpsurface: *mut Option) -> windows_core::Result<()> { @@ -30037,19 +29962,12 @@ impl IVMRWindowlessControl { pub unsafe fn SetAspectRatioMode(&self, aspectratiomode: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAspectRatioMode)(windows_core::Interface::as_raw(self), core::mem::transmute(aspectratiomode)).ok() } - pub unsafe fn SetVideoClippingWindow(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVideoClippingWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SetVideoClippingWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVideoClippingWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn RepaintVideo(&self, hwnd: P0, hdc: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RepaintVideo)(windows_core::Interface::as_raw(self), hwnd.param().abi(), hdc.param().abi()).ok() + pub unsafe fn RepaintVideo(&self, hwnd: super::super::Foundation::HWND, hdc: super::super::Graphics::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RepaintVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(hdc)).ok() } pub unsafe fn DisplayModeChanged(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DisplayModeChanged)(windows_core::Interface::as_raw(self)).ok() @@ -30058,21 +29976,15 @@ impl IVMRWindowlessControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCurrentImage)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBorderColor(&self, clr: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), clr.param().abi()).ok() + pub unsafe fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(clr)).ok() } pub unsafe fn GetBorderColor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetBorderColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetColorKey(&self, clr: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), clr.param().abi()).ok() + pub unsafe fn SetColorKey(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetColorKey)(windows_core::Interface::as_raw(self), core::mem::transmute(clr)).ok() } pub unsafe fn GetColorKey(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -30256,19 +30168,12 @@ impl IVMRWindowlessControl9 { pub unsafe fn SetAspectRatioMode(&self, aspectratiomode: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAspectRatioMode)(windows_core::Interface::as_raw(self), core::mem::transmute(aspectratiomode)).ok() } - pub unsafe fn SetVideoClippingWindow(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVideoClippingWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SetVideoClippingWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVideoClippingWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn RepaintVideo(&self, hwnd: P0, hdc: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RepaintVideo)(windows_core::Interface::as_raw(self), hwnd.param().abi(), hdc.param().abi()).ok() + pub unsafe fn RepaintVideo(&self, hwnd: super::super::Foundation::HWND, hdc: super::super::Graphics::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RepaintVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(hdc)).ok() } pub unsafe fn DisplayModeChanged(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DisplayModeChanged)(windows_core::Interface::as_raw(self)).ok() @@ -30277,11 +30182,8 @@ impl IVMRWindowlessControl9 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCurrentImage)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBorderColor(&self, clr: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), clr.param().abi()).ok() + pub unsafe fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(clr)).ok() } pub unsafe fn GetBorderColor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -30425,7 +30327,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), core::mem::transmute(pdwnumconnectinfo), core::mem::transmute(pddvpconnectinfo.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConnectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwnumconnectinfo), core::mem::transmute(pddvpconnectinfo.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetConnectInfo(&self, dwchosenentry: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetConnectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwchosenentry)).ok() @@ -30442,7 +30344,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), core::mem::transmute(pdwnumformats), core::mem::transmute(pddpixelformats.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVideoFormats)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwnumformats), core::mem::transmute(pddpixelformats.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetVideoFormat(&self, dwchosenentry: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetVideoFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(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 9ac5d1af81..d1897d9ea3 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs @@ -377,7 +377,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(core::ptr::null_mut())), core::mem::transmute(pcblength.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBufferAndLength)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcblength.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -439,16 +439,16 @@ impl IMediaObject { (windows_core::Interface::vtable(self).GetOutputStreamInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(dwinputstreamindex), core::mem::transmute(dwtypeindex), core::mem::transmute(pmt.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInputType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwinputstreamindex), core::mem::transmute(dwtypeindex), core::mem::transmute(pmt.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwoutputstreamindex), core::mem::transmute(dwtypeindex), core::mem::transmute(pmt.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoutputstreamindex), core::mem::transmute(dwtypeindex), core::mem::transmute(pmt.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwinputstreamindex), core::mem::transmute(pmt.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).SetInputType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwinputstreamindex), core::mem::transmute(pmt.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(dwoutputstreamindex), core::mem::transmute(pmt.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).SetOutputType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoutputstreamindex), core::mem::transmute(pmt.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(dwinputstreamindex), core::mem::transmute(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 77ef9e336d..e92b7ed416 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs @@ -1,96 +1,63 @@ #[inline] -pub unsafe fn KsCreateAllocator(connectionhandle: P0, allocatorframing: *const KSALLOCATOR_FRAMING, allocatorhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn KsCreateAllocator(connectionhandle: super::super::Foundation::HANDLE, allocatorframing: *const KSALLOCATOR_FRAMING, allocatorhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("ksuser.dll" "system" fn KsCreateAllocator(connectionhandle : super::super::Foundation:: HANDLE, allocatorframing : *const KSALLOCATOR_FRAMING, allocatorhandle : *mut super::super::Foundation:: HANDLE) -> u32); - KsCreateAllocator(connectionhandle.param().abi(), core::mem::transmute(allocatorframing), core::mem::transmute(allocatorhandle)) + KsCreateAllocator(core::mem::transmute(connectionhandle), core::mem::transmute(allocatorframing), core::mem::transmute(allocatorhandle)) } #[inline] -pub unsafe fn KsCreateAllocator2(connectionhandle: P0, allocatorframing: *const KSALLOCATOR_FRAMING) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn KsCreateAllocator2(connectionhandle: super::super::Foundation::HANDLE, allocatorframing: *const KSALLOCATOR_FRAMING) -> windows_core::Result { windows_targets::link!("ksuser.dll" "system" fn KsCreateAllocator2(connectionhandle : super::super::Foundation:: HANDLE, allocatorframing : *const KSALLOCATOR_FRAMING, allocatorhandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - KsCreateAllocator2(connectionhandle.param().abi(), core::mem::transmute(allocatorframing), &mut result__).map(|| core::mem::transmute(result__)) + KsCreateAllocator2(core::mem::transmute(connectionhandle), core::mem::transmute(allocatorframing), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn KsCreateClock(connectionhandle: P0, clockcreate: *const KSCLOCK_CREATE, clockhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn KsCreateClock(connectionhandle: super::super::Foundation::HANDLE, clockcreate: *const KSCLOCK_CREATE, clockhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("ksuser.dll" "system" fn KsCreateClock(connectionhandle : super::super::Foundation:: HANDLE, clockcreate : *const KSCLOCK_CREATE, clockhandle : *mut super::super::Foundation:: HANDLE) -> u32); - KsCreateClock(connectionhandle.param().abi(), core::mem::transmute(clockcreate), core::mem::transmute(clockhandle)) + KsCreateClock(core::mem::transmute(connectionhandle), core::mem::transmute(clockcreate), core::mem::transmute(clockhandle)) } #[inline] -pub unsafe fn KsCreateClock2(connectionhandle: P0, clockcreate: *const KSCLOCK_CREATE) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn KsCreateClock2(connectionhandle: super::super::Foundation::HANDLE, clockcreate: *const KSCLOCK_CREATE) -> windows_core::Result { windows_targets::link!("ksuser.dll" "system" fn KsCreateClock2(connectionhandle : super::super::Foundation:: HANDLE, clockcreate : *const KSCLOCK_CREATE, clockhandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - KsCreateClock2(connectionhandle.param().abi(), core::mem::transmute(clockcreate), &mut result__).map(|| core::mem::transmute(result__)) + KsCreateClock2(core::mem::transmute(connectionhandle), core::mem::transmute(clockcreate), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn KsCreatePin(filterhandle: P0, connect: *const KSPIN_CONNECT, desiredaccess: u32, connectionhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn KsCreatePin(filterhandle: super::super::Foundation::HANDLE, connect: *const KSPIN_CONNECT, desiredaccess: u32, connectionhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("ksuser.dll" "system" fn KsCreatePin(filterhandle : super::super::Foundation:: HANDLE, connect : *const KSPIN_CONNECT, desiredaccess : u32, connectionhandle : *mut super::super::Foundation:: HANDLE) -> u32); - KsCreatePin(filterhandle.param().abi(), core::mem::transmute(connect), core::mem::transmute(desiredaccess), core::mem::transmute(connectionhandle)) + KsCreatePin(core::mem::transmute(filterhandle), core::mem::transmute(connect), core::mem::transmute(desiredaccess), core::mem::transmute(connectionhandle)) } #[inline] -pub unsafe fn KsCreatePin2(filterhandle: P0, connect: *const KSPIN_CONNECT, desiredaccess: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn KsCreatePin2(filterhandle: super::super::Foundation::HANDLE, connect: *const KSPIN_CONNECT, desiredaccess: u32) -> windows_core::Result { windows_targets::link!("ksuser.dll" "system" fn KsCreatePin2(filterhandle : super::super::Foundation:: HANDLE, connect : *const KSPIN_CONNECT, desiredaccess : u32, connectionhandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - KsCreatePin2(filterhandle.param().abi(), core::mem::transmute(connect), core::mem::transmute(desiredaccess), &mut result__).map(|| core::mem::transmute(result__)) + KsCreatePin2(core::mem::transmute(filterhandle), core::mem::transmute(connect), core::mem::transmute(desiredaccess), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn KsCreateTopologyNode(parenthandle: P0, nodecreate: *const KSNODE_CREATE, desiredaccess: u32, nodehandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn KsCreateTopologyNode(parenthandle: super::super::Foundation::HANDLE, nodecreate: *const KSNODE_CREATE, desiredaccess: u32, nodehandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("ksuser.dll" "system" fn KsCreateTopologyNode(parenthandle : super::super::Foundation:: HANDLE, nodecreate : *const KSNODE_CREATE, desiredaccess : u32, nodehandle : *mut super::super::Foundation:: HANDLE) -> u32); - KsCreateTopologyNode(parenthandle.param().abi(), core::mem::transmute(nodecreate), core::mem::transmute(desiredaccess), core::mem::transmute(nodehandle)) + KsCreateTopologyNode(core::mem::transmute(parenthandle), core::mem::transmute(nodecreate), core::mem::transmute(desiredaccess), core::mem::transmute(nodehandle)) } #[inline] -pub unsafe fn KsCreateTopologyNode2(parenthandle: P0, nodecreate: *const KSNODE_CREATE, desiredaccess: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn KsCreateTopologyNode2(parenthandle: super::super::Foundation::HANDLE, nodecreate: *const KSNODE_CREATE, desiredaccess: u32) -> windows_core::Result { windows_targets::link!("ksuser.dll" "system" fn KsCreateTopologyNode2(parenthandle : super::super::Foundation:: HANDLE, nodecreate : *const KSNODE_CREATE, desiredaccess : u32, nodehandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - KsCreateTopologyNode2(parenthandle.param().abi(), core::mem::transmute(nodecreate), core::mem::transmute(desiredaccess), &mut result__).map(|| core::mem::transmute(result__)) + KsCreateTopologyNode2(core::mem::transmute(parenthandle), core::mem::transmute(nodecreate), core::mem::transmute(desiredaccess), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Media_MediaFoundation")] #[inline] -pub unsafe fn KsGetMediaType(position: i32, ammediatype: *mut super::MediaFoundation::AM_MEDIA_TYPE, filterhandle: P2, pinfactoryid: u32) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn KsGetMediaType(position: i32, ammediatype: *mut super::MediaFoundation::AM_MEDIA_TYPE, filterhandle: super::super::Foundation::HANDLE, pinfactoryid: u32) -> windows_core::Result<()> { windows_targets::link!("ksproxy.ax" "system" fn KsGetMediaType(position : i32, ammediatype : *mut super::MediaFoundation:: AM_MEDIA_TYPE, filterhandle : super::super::Foundation:: HANDLE, pinfactoryid : u32) -> windows_core::HRESULT); - KsGetMediaType(core::mem::transmute(position), core::mem::transmute(ammediatype), filterhandle.param().abi(), core::mem::transmute(pinfactoryid)).ok() + KsGetMediaType(core::mem::transmute(position), core::mem::transmute(ammediatype), core::mem::transmute(filterhandle), core::mem::transmute(pinfactoryid)).ok() } #[inline] -pub unsafe fn KsGetMediaTypeCount(filterhandle: P0, pinfactoryid: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn KsGetMediaTypeCount(filterhandle: super::super::Foundation::HANDLE, pinfactoryid: u32) -> windows_core::Result { windows_targets::link!("ksproxy.ax" "system" fn KsGetMediaTypeCount(filterhandle : super::super::Foundation:: HANDLE, pinfactoryid : u32, mediatypecount : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - KsGetMediaTypeCount(filterhandle.param().abi(), core::mem::transmute(pinfactoryid), &mut result__).map(|| core::mem::transmute(result__)) + KsGetMediaTypeCount(core::mem::transmute(filterhandle), core::mem::transmute(pinfactoryid), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn KsGetMultiplePinFactoryItems(filterhandle: P0, pinfactoryid: u32, propertyid: u32, items: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn KsGetMultiplePinFactoryItems(filterhandle: super::super::Foundation::HANDLE, pinfactoryid: u32, propertyid: u32, items: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ksproxy.ax" "system" fn KsGetMultiplePinFactoryItems(filterhandle : super::super::Foundation:: HANDLE, pinfactoryid : u32, propertyid : u32, items : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - KsGetMultiplePinFactoryItems(filterhandle.param().abi(), core::mem::transmute(pinfactoryid), core::mem::transmute(propertyid), core::mem::transmute(items)).ok() + KsGetMultiplePinFactoryItems(core::mem::transmute(filterhandle), core::mem::transmute(pinfactoryid), core::mem::transmute(propertyid), core::mem::transmute(items)).ok() } #[inline] pub unsafe fn KsOpenDefaultDevice(category: *const windows_core::GUID, access: u32) -> windows_core::Result { @@ -101,15 +68,12 @@ 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(core::mem::transmute(datarange), core::mem::transmute(attributes.unwrap_or(core::ptr::null()))).ok() + KsResolveRequiredAttributes(core::mem::transmute(datarange), core::mem::transmute(attributes.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn KsSynchronousDeviceControl(handle: super::super::Foundation::HANDLE, 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<()> { 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(), core::mem::transmute(iocontrol), core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inlength), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outlength), core::mem::transmute(bytesreturned.unwrap_or(core::ptr::null_mut()))).ok() + KsSynchronousDeviceControl(core::mem::transmute(handle), core::mem::transmute(iocontrol), core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inlength), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outlength), core::mem::transmute(bytesreturned.unwrap_or(core::mem::zeroed()))).ok() } pub const AEC_MODE_FULL_DUPLEX: u32 = 2u32; pub const AEC_MODE_HALF_DUPLEX: u32 = 1u32; @@ -510,11 +474,8 @@ impl IKsAllocatorEx { pub unsafe fn KsSetProperties(&self, param0: *const ALLOCATOR_PROPERTIES_EX) { (windows_core::Interface::vtable(self).KsSetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)) } - pub unsafe fn KsSetAllocatorHandle(&self, allocatorhandle: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).KsSetAllocatorHandle)(windows_core::Interface::as_raw(self), allocatorhandle.param().abi()) + pub unsafe fn KsSetAllocatorHandle(&self, allocatorhandle: super::super::Foundation::HANDLE) { + (windows_core::Interface::vtable(self).KsSetAllocatorHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(allocatorhandle)) } pub unsafe fn KsCreateAllocatorAndGetHandle(&self, kspin: P0) -> super::super::Foundation::HANDLE where @@ -786,11 +747,8 @@ windows_core::imp::define_interface!(IKsDataTypeCompletion, IKsDataTypeCompletio windows_core::imp::interface_hierarchy!(IKsDataTypeCompletion, windows_core::IUnknown); impl IKsDataTypeCompletion { #[cfg(feature = "Win32_Media_MediaFoundation")] - pub unsafe fn KsCompleteMediaType(&self, filterhandle: P0, pinfactoryid: u32, ammediatype: *mut super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).KsCompleteMediaType)(windows_core::Interface::as_raw(self), filterhandle.param().abi(), core::mem::transmute(pinfactoryid), core::mem::transmute(ammediatype)).ok() + pub unsafe fn KsCompleteMediaType(&self, filterhandle: super::super::Foundation::HANDLE, pinfactoryid: u32, ammediatype: *mut super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).KsCompleteMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(filterhandle), core::mem::transmute(pinfactoryid), core::mem::transmute(ammediatype)).ok() } } #[repr(C)] @@ -1365,7 +1323,7 @@ impl IKsPin { (windows_core::Interface::vtable(self).KsCreateSinkPinHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(interface), core::mem::transmute(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(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() + (windows_core::Interface::vtable(self).KsGetCurrentCommunication)(windows_core::Interface::as_raw(self), core::mem::transmute(communication.unwrap_or(core::mem::zeroed())), core::mem::transmute(interface.unwrap_or(core::mem::zeroed())), core::mem::transmute(medium.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn KsPropagateAcquire(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).KsPropagateAcquire)(windows_core::Interface::as_raw(self)).ok() @@ -1903,8 +1861,8 @@ impl IKsTopologyInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_ConnectionInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwindex), &mut result__).map(|| result__) } - pub unsafe fn get_NodeName(&self, dwnodeid: u32, pwchnodename: windows_core::PWSTR, dwbufsize: u32, pdwnamelen: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).get_NodeName)(windows_core::Interface::as_raw(self), core::mem::transmute(dwnodeid), core::mem::transmute(pwchnodename), core::mem::transmute(dwbufsize), core::mem::transmute(pdwnamelen)).ok() + pub unsafe fn get_NodeName(&self, dwnodeid: u32, pwchnodename: Option, dwbufsize: u32, pdwnamelen: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).get_NodeName)(windows_core::Interface::as_raw(self), core::mem::transmute(dwnodeid), core::mem::transmute(pwchnodename.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbufsize), core::mem::transmute(pdwnamelen)).ok() } pub unsafe fn NumNodes(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Media/LibrarySharingServices/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/LibrarySharingServices/mod.rs index b8093a3e9b..ceb6abdf87 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/LibrarySharingServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/LibrarySharingServices/mod.rs @@ -358,11 +358,8 @@ impl IWindowsMediaLibrarySharingServices { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).userHomeMediaSharingState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetuserHomeMediaSharingState(&self, sharingenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetuserHomeMediaSharingState)(windows_core::Interface::as_raw(self), sharingenabled.param().abi()).ok() + pub unsafe fn SetuserHomeMediaSharingState(&self, sharingenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetuserHomeMediaSharingState)(windows_core::Interface::as_raw(self), core::mem::transmute(sharingenabled)).ok() } pub unsafe fn userHomeMediaSharingLibraryName(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -375,31 +372,22 @@ impl IWindowsMediaLibrarySharingServices { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).computerHomeMediaSharingAllowedState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetcomputerHomeMediaSharingAllowedState(&self, sharingallowed: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetcomputerHomeMediaSharingAllowedState)(windows_core::Interface::as_raw(self), sharingallowed.param().abi()).ok() + pub unsafe fn SetcomputerHomeMediaSharingAllowedState(&self, sharingallowed: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetcomputerHomeMediaSharingAllowedState)(windows_core::Interface::as_raw(self), core::mem::transmute(sharingallowed)).ok() } pub unsafe fn userInternetMediaSharingState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).userInternetMediaSharingState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetuserInternetMediaSharingState(&self, sharingenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetuserInternetMediaSharingState)(windows_core::Interface::as_raw(self), sharingenabled.param().abi()).ok() + pub unsafe fn SetuserInternetMediaSharingState(&self, sharingenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetuserInternetMediaSharingState)(windows_core::Interface::as_raw(self), core::mem::transmute(sharingenabled)).ok() } pub unsafe fn computerInternetMediaSharingAllowedState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).computerInternetMediaSharingAllowedState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetcomputerInternetMediaSharingAllowedState(&self, sharingallowed: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetcomputerInternetMediaSharingAllowedState)(windows_core::Interface::as_raw(self), sharingallowed.param().abi()).ok() + pub unsafe fn SetcomputerInternetMediaSharingAllowedState(&self, sharingallowed: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetcomputerInternetMediaSharingAllowedState)(windows_core::Interface::as_raw(self), core::mem::transmute(sharingallowed)).ok() } pub unsafe fn internetMediaSharingSecurityGroup(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -412,23 +400,14 @@ impl IWindowsMediaLibrarySharingServices { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).allowSharingToAllDevices)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetallowSharingToAllDevices(&self, sharingenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetallowSharingToAllDevices)(windows_core::Interface::as_raw(self), sharingenabled.param().abi()).ok() - } - pub unsafe fn setDefaultAuthorization(&self, macaddresses: &windows_core::BSTR, friendlyname: &windows_core::BSTR, authorization: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).setDefaultAuthorization)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(macaddresses), core::mem::transmute_copy(friendlyname), authorization.param().abi()).ok() - } - pub unsafe fn setAuthorizationState(&self, macaddress: &windows_core::BSTR, authorizationstate: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).setAuthorizationState)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(macaddress), authorizationstate.param().abi()).ok() + pub unsafe fn SetallowSharingToAllDevices(&self, sharingenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetallowSharingToAllDevices)(windows_core::Interface::as_raw(self), core::mem::transmute(sharingenabled)).ok() + } + pub unsafe fn setDefaultAuthorization(&self, macaddresses: &windows_core::BSTR, friendlyname: &windows_core::BSTR, authorization: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).setDefaultAuthorization)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(macaddresses), core::mem::transmute_copy(friendlyname), core::mem::transmute(authorization)).ok() + } + pub unsafe fn setAuthorizationState(&self, macaddress: &windows_core::BSTR, authorizationstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).setAuthorizationState)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(macaddress), core::mem::transmute(authorizationstate)).ok() } pub unsafe fn getAllDevices(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 abbbc65b57..2a04b2fc5c 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs @@ -28,13 +28,13 @@ where } #[cfg(feature = "Win32_Graphics_Direct3D9")] #[inline] -pub unsafe fn DXVAHD_CreateDevice(pd3ddevice: P0, pcontentdesc: *const DXVAHD_CONTENT_DESC, usage: DXVAHD_DEVICE_USAGE, pplugin: PDXVAHDSW_Plugin) -> windows_core::Result +pub unsafe fn DXVAHD_CreateDevice(pd3ddevice: P0, pcontentdesc: *const DXVAHD_CONTENT_DESC, usage: DXVAHD_DEVICE_USAGE, pplugin: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("dxva2.dll" "system" fn DXVAHD_CreateDevice(pd3ddevice : * mut core::ffi::c_void, pcontentdesc : *const DXVAHD_CONTENT_DESC, usage : DXVAHD_DEVICE_USAGE, pplugin : PDXVAHDSW_Plugin, ppdevice : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DXVAHD_CreateDevice(pd3ddevice.param().abi(), core::mem::transmute(pcontentdesc), core::mem::transmute(usage), core::mem::transmute(pplugin), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + DXVAHD_CreateDevice(pd3ddevice.param().abi(), core::mem::transmute(pcontentdesc), core::mem::transmute(usage), core::mem::transmute(pplugin.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn MFAddPeriodicCallback(callback: MFPERIODICCALLBACK, pcontext: P1, pdwkey: Option<*mut u32>) -> windows_core::Result<()> @@ -42,7 +42,7 @@ where P1: 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(core::mem::transmute(callback), pcontext.param().abi(), core::mem::transmute(pdwkey.unwrap_or(core::ptr::null_mut()))).ok() + MFAddPeriodicCallback(core::mem::transmute(callback), pcontext.param().abi(), core::mem::transmute(pdwkey.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pbmih), core::mem::transmute(cbbufsize), core::mem::transmute(pcbimagesize), core::mem::transmute(pbknown.unwrap_or(core::ptr::null_mut()))).ok() + MFCalculateBitmapImageSize(core::mem::transmute(pbmih), core::mem::transmute(cbbufsize), core::mem::transmute(pcbimagesize), core::mem::transmute(pbknown.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(ppmfvf), core::mem::transmute(pcbsize.unwrap_or(core::ptr::null_mut()))).ok() + MFCreateMFVideoFormatFromMFMediaType(pmftype.param().abi(), core::mem::transmute(ppmfvf), core::mem::transmute(pcbsize.unwrap_or(core::mem::zeroed()))).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 super::super::System::Com::StructuredStorage:: PROPVARIANT, ppevent : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MFCreateMediaEvent(core::mem::transmute(met), core::mem::transmute(guidextendedtype), core::mem::transmute(hrstatus), core::mem::transmute(pvvalue.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + MFCreateMediaEvent(core::mem::transmute(met), core::mem::transmute(guidextendedtype), core::mem::transmute(hrstatus), core::mem::transmute(pvvalue.unwrap_or(core::mem::zeroed())), &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 P1: 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(core::mem::transmute(dwcreationflags), pconfiguration.param().abi(), core::mem::transmute(ppmediasession), core::mem::transmute(ppenableractivate.unwrap_or(core::ptr::null_mut()))).ok() + MFCreatePMPMediaSession(core::mem::transmute(dwcreationflags), pconfiguration.param().abi(), core::mem::transmute(ppmediasession), core::mem::transmute(ppenableractivate.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn MFCreatePMPServer(dwcreationflags: u32) -> windows_core::Result { @@ -1095,13 +1095,10 @@ pub unsafe fn MFCreateVideoRenderer(riidrenderer: *const windows_core::GUID, ppv MFCreateVideoRenderer(core::mem::transmute(riidrenderer), core::mem::transmute(ppvideorenderer)).ok() } #[inline] -pub unsafe fn MFCreateVideoRendererActivate(hwndvideo: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn MFCreateVideoRendererActivate(hwndvideo: super::super::Foundation::HWND) -> windows_core::Result { windows_targets::link!("mf.dll" "system" fn MFCreateVideoRendererActivate(hwndvideo : super::super::Foundation:: HWND, ppactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MFCreateVideoRendererActivate(hwndvideo.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + MFCreateVideoRendererActivate(core::mem::transmute(hwndvideo), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn MFCreateVideoSampleAllocator(riid: *const windows_core::GUID, ppsampleallocator: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1180,7 +1177,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(), core::mem::transmute(ppwf), core::mem::transmute(pcbsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags)).ok() + MFCreateWaveFormatExFromMFMediaType(pmftype.param().abi(), core::mem::transmute(ppwf), core::mem::transmute(pcbsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1349,9 +1346,9 @@ pub unsafe fn MFGetUncompressedVideoFormat(pvideoformat: *const MFVIDEOFORMAT) - MFGetUncompressedVideoFormat(core::mem::transmute(pvideoformat)) } #[inline] -pub unsafe fn MFGetWorkQueueMMCSSClass(dwworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()> { +pub unsafe fn MFGetWorkQueueMMCSSClass(dwworkqueueid: u32, pwszclass: Option, pcchclass: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFGetWorkQueueMMCSSClass(dwworkqueueid : u32, pwszclass : windows_core::PWSTR, pcchclass : *mut u32) -> windows_core::HRESULT); - MFGetWorkQueueMMCSSClass(core::mem::transmute(dwworkqueueid), core::mem::transmute(pwszclass), core::mem::transmute(pcchclass)).ok() + MFGetWorkQueueMMCSSClass(core::mem::transmute(dwworkqueueid), core::mem::transmute(pwszclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchclass)).ok() } #[inline] pub unsafe fn MFGetWorkQueueMMCSSPriority(dwworkqueueid: u32) -> windows_core::Result { @@ -1417,7 +1414,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(), core::mem::transmute(pmp1vi), core::mem::transmute(cbbufsize), core::mem::transmute(psubtype.unwrap_or(core::ptr::null()))).ok() + MFInitMediaTypeFromMPEG1VideoInfo(pmftype.param().abi(), core::mem::transmute(pmp1vi), core::mem::transmute(cbbufsize), core::mem::transmute(psubtype.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1426,7 +1423,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(), core::mem::transmute(pmp2vi), core::mem::transmute(cbbufsize), core::mem::transmute(psubtype.unwrap_or(core::ptr::null()))).ok() + MFInitMediaTypeFromMPEG2VideoInfo(pmftype.param().abi(), core::mem::transmute(pmp2vi), core::mem::transmute(cbbufsize), core::mem::transmute(psubtype.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1435,7 +1432,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(), core::mem::transmute(pvih), core::mem::transmute(cbbufsize), core::mem::transmute(psubtype.unwrap_or(core::ptr::null()))).ok() + MFInitMediaTypeFromVideoInfoHeader(pmftype.param().abi(), core::mem::transmute(pvih), core::mem::transmute(cbbufsize), core::mem::transmute(psubtype.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1444,7 +1441,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(), core::mem::transmute(pvih2), core::mem::transmute(cbbufsize), core::mem::transmute(psubtype.unwrap_or(core::ptr::null()))).ok() + MFInitMediaTypeFromVideoInfoHeader2(pmftype.param().abi(), core::mem::transmute(pvih2), core::mem::transmute(cbbufsize), core::mem::transmute(psubtype.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Media_Audio")] #[inline] @@ -1502,7 +1499,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(core::ptr::null_mut())), core::mem::transmute(ppmanager)).ok() + MFLockDXGIDeviceManager(core::mem::transmute(presettoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppmanager)).ok() } #[inline] pub unsafe fn MFLockPlatform() -> windows_core::Result<()> { @@ -1535,24 +1532,22 @@ pub unsafe fn MFMapDXGIFormatToDX9Format(dx11: super::super::Graphics::Dxgi::Com MFMapDXGIFormatToDX9Format(core::mem::transmute(dx11)) } #[inline] -pub unsafe fn MFPCreateMediaPlayer(pwszurl: P0, fstartplayback: P1, creationoptions: MFP_CREATION_OPTIONS, pcallback: P3, hwnd: P4, ppmediaplayer: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn MFPCreateMediaPlayer(pwszurl: P0, fstartplayback: P1, creationoptions: MFP_CREATION_OPTIONS, pcallback: P3, hwnd: Option, ppmediaplayer: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, - P4: 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(), core::mem::transmute(creationoptions), pcallback.param().abi(), hwnd.param().abi(), core::mem::transmute(ppmediaplayer.unwrap_or(core::ptr::null_mut()))).ok() + MFPCreateMediaPlayer(pwszurl.param().abi(), fstartplayback.param().abi(), core::mem::transmute(creationoptions), pcallback.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppmediaplayer.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn MFPutWaitingWorkItem(hevent: P0, priority: i32, presult: P2, pkey: Option<*mut u64>) -> windows_core::Result<()> +pub unsafe fn MFPutWaitingWorkItem(hevent: super::super::Foundation::HANDLE, priority: i32, presult: P2, pkey: Option<*mut u64>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(priority), presult.param().abi(), core::mem::transmute(pkey.unwrap_or(core::ptr::null_mut()))).ok() + MFPutWaitingWorkItem(core::mem::transmute(hevent), core::mem::transmute(priority), presult.param().abi(), core::mem::transmute(pkey.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn MFPutWorkItem(dwqueue: u32, pcallback: P1, pstate: P2) -> windows_core::Result<()> @@ -1635,7 +1630,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(), core::mem::transmute(timeout), core::mem::transmute(pkey.unwrap_or(core::ptr::null_mut()))).ok() + MFScheduleWorkItem(pcallback.param().abi(), pstate.param().abi(), core::mem::transmute(timeout), core::mem::transmute(pkey.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn MFScheduleWorkItemEx(presult: P0, timeout: i64, pkey: Option<*mut u64>) -> windows_core::Result<()> @@ -1643,7 +1638,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(), core::mem::transmute(timeout), core::mem::transmute(pkey.unwrap_or(core::ptr::null_mut()))).ok() + MFScheduleWorkItemEx(presult.param().abi(), core::mem::transmute(timeout), core::mem::transmute(pkey.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1695,7 +1690,7 @@ where P4: 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), core::mem::transmute(flags), core::mem::transmute(pinputtype.unwrap_or(core::ptr::null())), core::mem::transmute(poutputtype.unwrap_or(core::ptr::null())), pattributes.param().abi(), core::mem::transmute(ppclsidmft), core::mem::transmute(pcmfts)).ok() + MFTEnum(core::mem::transmute(guidcategory), core::mem::transmute(flags), core::mem::transmute(pinputtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutputtype.unwrap_or(core::mem::zeroed())), pattributes.param().abi(), core::mem::transmute(ppclsidmft), core::mem::transmute(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: P4, pppmftactivate: *mut *mut Option, pnummftactivate: *mut u32) -> windows_core::Result<()> @@ -1703,17 +1698,17 @@ where P4: 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 * mut core::ffi::c_void, pnummftactivate : *mut u32) -> windows_core::HRESULT); - 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(), core::mem::transmute(pppmftactivate), core::mem::transmute(pnummftactivate)).ok() + MFTEnum2(core::mem::transmute(guidcategory), flags.0 as _, core::mem::transmute(pinputtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutputtype.unwrap_or(core::mem::zeroed())), pattributes.param().abi(), core::mem::transmute(pppmftactivate), core::mem::transmute(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 * mut core::ffi::c_void, pnummftactivate : *mut u32) -> windows_core::HRESULT); - 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())), core::mem::transmute(pppmftactivate), core::mem::transmute(pnummftactivate)).ok() + MFTEnumEx(core::mem::transmute(guidcategory), flags.0 as _, core::mem::transmute(pinputtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutputtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pppmftactivate), core::mem::transmute(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(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() + MFTGetInfo(core::mem::transmute(clsidmft), core::mem::transmute(pszname.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppinputtypes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcinputtypes.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoutputtypes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcoutputtypes.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppattributes.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn MFTRegister(clsidmft: windows_core::GUID, guidcategory: windows_core::GUID, pszname: P2, flags: u32, pinputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>, poutputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>, pattributes: P8) -> windows_core::Result<()> @@ -1837,12 +1832,9 @@ pub unsafe fn OPMGetVideoOutputForTarget(padapterluid: *const super::super::Foun } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn OPMGetVideoOutputsFromHMONITOR(hmonitor: P0, vos: OPM_VIDEO_OUTPUT_SEMANTICS, pulnumvideooutputs: *mut u32, pppopmvideooutputarray: *mut *mut Option) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn OPMGetVideoOutputsFromHMONITOR(hmonitor: super::super::Graphics::Gdi::HMONITOR, vos: OPM_VIDEO_OUTPUT_SEMANTICS, pulnumvideooutputs: *mut u32, pppopmvideooutputarray: *mut *mut Option) -> windows_core::Result<()> { windows_targets::link!("dxva2.dll" "system" fn OPMGetVideoOutputsFromHMONITOR(hmonitor : super::super::Graphics::Gdi:: HMONITOR, vos : OPM_VIDEO_OUTPUT_SEMANTICS, pulnumvideooutputs : *mut u32, pppopmvideooutputarray : *mut *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - OPMGetVideoOutputsFromHMONITOR(hmonitor.param().abi(), core::mem::transmute(vos), core::mem::transmute(pulnumvideooutputs), core::mem::transmute(pppopmvideooutputarray)).ok() + OPMGetVideoOutputsFromHMONITOR(core::mem::transmute(hmonitor), core::mem::transmute(vos), core::mem::transmute(pulnumvideooutputs), core::mem::transmute(pppopmvideooutputarray)).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] #[inline] @@ -10346,7 +10338,7 @@ windows_core::imp::define_interface!(IAudioSourceProvider, 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), core::mem::transmute(dwsamplecount), core::mem::transmute(pdwchannelcount), core::mem::transmute(pinterleavedaudiodata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ProvideInput)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsamplecount), core::mem::transmute(pdwchannelcount), core::mem::transmute(pinterleavedaudiodata.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -10685,7 +10677,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(core::ptr::null()))) + (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -10717,10 +10709,10 @@ impl ID3D12VideoDecodeCommandList { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), core::mem::transmute(alignedbufferoffset), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -10734,7 +10726,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), core::mem::transmute(count), core::mem::transmute(pparams), core::mem::transmute(pmodes.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(pparams), core::mem::transmute(pmodes.unwrap_or(core::mem::zeroed()))) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -11666,7 +11658,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(core::ptr::null()))) + (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -11698,10 +11690,10 @@ impl ID3D12VideoEncodeCommandList { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), core::mem::transmute(alignedbufferoffset), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -11719,7 +11711,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), core::mem::transmute(count), core::mem::transmute(pparams), core::mem::transmute(pmodes.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(pparams), core::mem::transmute(pmodes.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn SetProtectedResourceSession(&self, pprotectedresourcesession: P0) @@ -12550,7 +12542,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(core::ptr::null()))) + (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -12582,10 +12574,10 @@ impl ID3D12VideoProcessCommandList { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), core::mem::transmute(alignedbufferoffset), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(metadata), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -12599,7 +12591,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), core::mem::transmute(count), core::mem::transmute(pparams), core::mem::transmute(pmodes.unwrap_or(core::ptr::null()))) + (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(pparams), core::mem::transmute(pmodes.unwrap_or(core::mem::zeroed()))) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -13088,7 +13080,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), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(pool), core::mem::transmute(usage), core::mem::transmute(r#type), ppsurfaces.len().try_into().unwrap(), core::mem::transmute(ppsurfaces.as_ptr()), core::mem::transmute(psharedhandle.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVideoSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(pool), core::mem::transmute(usage), core::mem::transmute(r#type), ppsurfaces.len().try_into().unwrap(), core::mem::transmute(ppsurfaces.as_ptr()), core::mem::transmute(psharedhandle.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorDeviceCaps(&self, pcaps: *mut DXVAHD_VPDEVCAPS) -> windows_core::Result<()> { @@ -13620,38 +13612,27 @@ impl IDirect3DDeviceManager9 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OpenDeviceHandle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn CloseDeviceHandle(&self, hdevice: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CloseDeviceHandle)(windows_core::Interface::as_raw(self), hdevice.param().abi()).ok() + pub unsafe fn CloseDeviceHandle(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CloseDeviceHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice)).ok() } - pub unsafe fn TestDevice(&self, hdevice: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TestDevice)(windows_core::Interface::as_raw(self), hdevice.param().abi()).ok() + pub unsafe fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TestDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice)).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] - pub unsafe fn LockDevice(&self, hdevice: P0, ppdevice: *mut Option, fblock: P2) -> windows_core::Result<()> + pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, ppdevice: *mut Option, fblock: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), hdevice.param().abi(), core::mem::transmute(ppdevice), fblock.param().abi()).ok() + (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(ppdevice), fblock.param().abi()).ok() } - pub unsafe fn UnlockDevice(&self, hdevice: P0, fsavestate: P1) -> windows_core::Result<()> + pub unsafe fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), hdevice.param().abi(), fsavestate.param().abi()).ok() + (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), fsavestate.param().abi()).ok() } - pub unsafe fn GetVideoService(&self, hdevice: P0, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), hdevice.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppservice)).ok() + pub unsafe fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(riid), core::mem::transmute(ppservice)).ok() } } #[repr(C)] @@ -13740,7 +13721,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), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(backbuffers), core::mem::transmute(format), core::mem::transmute(pool), core::mem::transmute(usage), dxvatype.0 as _, core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(backbuffers), core::mem::transmute(format), core::mem::transmute(pool), core::mem::transmute(usage), dxvatype.0 as _, core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -13779,7 +13760,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(core::ptr::null_mut())), core::mem::transmute(pvideodesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pconfig.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdecoderrendertargets), core::mem::transmute(pnumsurfaces.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdeviceguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideodesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pconfig.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdecoderrendertargets), core::mem::transmute(pnumsurfaces.unwrap_or(core::mem::zeroed()))).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 _, core::mem::transmute(ppbuffer), core::mem::transmute(pbuffersize)).ok() @@ -13792,10 +13773,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(core::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::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EndFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(phandlecomplete.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pexecuteparams)).ok() @@ -13900,7 +13881,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), core::mem::transmute(guid), core::mem::transmute(pvideodesc), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pcount), core::mem::transmute(ppconfigs)).ok() + (windows_core::Interface::vtable(self).GetDecoderConfigurations)(windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(pvideodesc), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcount), core::mem::transmute(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 { @@ -14028,7 +14009,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(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() + (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdeviceguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvideodesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(prendertargetformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmaxnumsubstreams.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorCaps(&self, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()> { @@ -14047,7 +14028,7 @@ impl IDirectXVideoProcessor { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessBlt)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), core::mem::transmute(pbltparams), core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), core::mem::transmute(phandlecomplete.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).VideoProcessBlt)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), core::mem::transmute(pbltparams), core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), core::mem::transmute(phandlecomplete.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -16601,7 +16582,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), core::mem::transmute(guidkey), core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), core::mem::transmute(guidkey), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetItemType(&self, guidkey: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16640,7 +16621,7 @@ impl IMFAttributes { (windows_core::Interface::vtable(self).GetStringLength)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(guidkey), core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), core::mem::transmute(pcchlength.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), core::mem::transmute(guidkey), core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), core::mem::transmute(pcchlength.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(guidkey), core::mem::transmute(ppwszvalue), core::mem::transmute(pcchlength)).ok() @@ -16650,7 +16631,7 @@ impl IMFAttributes { (windows_core::Interface::vtable(self).GetBlobSize)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(guidkey), core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), core::mem::transmute(pcbblobsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBlob)(windows_core::Interface::as_raw(self), core::mem::transmute(guidkey), core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), core::mem::transmute(pcbblobsize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(guidkey), core::mem::transmute(ppbuf), core::mem::transmute(pcbsize)).ok() @@ -16711,7 +16692,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), core::mem::transmute(unindex), core::mem::transmute(pguidkey), core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetItemByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(unindex), core::mem::transmute(pguidkey), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn CopyAllItems(&self, pdest: P0) -> windows_core::Result<()> where @@ -17696,7 +17677,7 @@ impl IMFByteStreamHandler { P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), core::mem::transmute(dwflags), pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::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(), core::mem::transmute(dwflags), pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::mem::zeroed())), 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 @@ -17939,7 +17920,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), core::mem::transmute(control), core::mem::transmute(controlsize), core::mem::transmute(data.unwrap_or(core::ptr::null_mut())), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LockControlData)(windows_core::Interface::as_raw(self), core::mem::transmute(control), core::mem::transmute(controlsize), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn UnlockControlData(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnlockControlData)(windows_core::Interface::as_raw(self)).ok() @@ -18765,11 +18746,8 @@ impl core::ops::Deref for IMFCapturePreviewSink { } windows_core::imp::interface_hierarchy!(IMFCapturePreviewSink, windows_core::IUnknown, IMFCaptureSink); impl IMFCapturePreviewSink { - pub unsafe fn SetRenderHandle(&self, handle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRenderHandle)(windows_core::Interface::as_raw(self), handle.param().abi()).ok() + pub unsafe fn SetRenderHandle(&self, handle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRenderHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(handle)).ok() } pub unsafe fn SetRenderSurface(&self, psurface: P0) -> windows_core::Result<()> where @@ -18778,7 +18756,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(core::ptr::null())), core::mem::transmute(pdst.unwrap_or(core::ptr::null())), core::mem::transmute(pborderclr.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(psrc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdst.unwrap_or(core::mem::zeroed())), core::mem::transmute(pborderclr.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: P1) -> windows_core::Result<()> where @@ -19012,17 +18990,17 @@ windows_core::imp::define_interface!(IMFCaptureSink, IMFCaptureSink_Vtbl, 0x72d6 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), core::mem::transmute(dwsinkstreamindex), core::mem::transmute(ppmediatype.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsinkstreamindex), core::mem::transmute(ppmediatype.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwsinkstreamindex), core::mem::transmute(rguidservice), core::mem::transmute(riid), core::mem::transmute(ppunknown.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsinkstreamindex), core::mem::transmute(rguidservice), core::mem::transmute(riid), core::mem::transmute(ppunknown.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddStream(&self, dwsourcestreamindex: u32, pmediatype: P1, pattributes: P2, pdwsinkstreamindex: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsourcestreamindex), pmediatype.param().abi(), pattributes.param().abi(), core::mem::transmute(pdwsinkstreamindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsourcestreamindex), pmediatype.param().abi(), pattributes.param().abi(), core::mem::transmute(pdwsinkstreamindex.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Prepare(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Prepare)(windows_core::Interface::as_raw(self)).ok() @@ -19125,13 +19103,13 @@ windows_core::imp::define_interface!(IMFCaptureSource, IMFCaptureSource_Vtbl, 0x 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), core::mem::transmute(mfcaptureenginedevicetype), core::mem::transmute(ppmediasource.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCaptureDeviceSource)(windows_core::Interface::as_raw(self), core::mem::transmute(mfcaptureenginedevicetype), core::mem::transmute(ppmediasource.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(mfcaptureenginedevicetype), core::mem::transmute(ppactivate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCaptureDeviceActivate)(windows_core::Interface::as_raw(self), core::mem::transmute(mfcaptureenginedevicetype), core::mem::transmute(ppactivate.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(rguidservice), core::mem::transmute(riid), core::mem::transmute(ppunknown.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), core::mem::transmute(rguidservice), core::mem::transmute(riid), core::mem::transmute(ppunknown.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddEffect(&self, dwsourcestreamindex: u32, punknown: P1) -> windows_core::Result<()> where @@ -19149,7 +19127,7 @@ impl IMFCaptureSource { (windows_core::Interface::vtable(self).RemoveAllEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(dwsourcestreamindex), core::mem::transmute(dwmediatypeindex), core::mem::transmute(ppmediatype.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAvailableDeviceMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsourcestreamindex), core::mem::transmute(dwmediatypeindex), core::mem::transmute(ppmediatype.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32, pmediatype: P1) -> windows_core::Result<()> where @@ -20364,11 +20342,8 @@ impl windows_core::RuntimeName for IMFContentProtectionManager {} windows_core::imp::define_interface!(IMFD3D12SynchronizationObject, IMFD3D12SynchronizationObject_Vtbl, 0x802302b0_82de_45e1_b421_f19ee5bdaf23); windows_core::imp::interface_hierarchy!(IMFD3D12SynchronizationObject, windows_core::IUnknown); impl IMFD3D12SynchronizationObject { - pub unsafe fn SignalEventOnFinalResourceRelease(&self, hevent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SignalEventOnFinalResourceRelease)(windows_core::Interface::as_raw(self), hevent.param().abi()).ok() + pub unsafe fn SignalEventOnFinalResourceRelease(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SignalEventOnFinalResourceRelease)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent)).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -20422,11 +20397,8 @@ impl IMFD3D12SynchronizationObjectCommands { { (windows_core::Interface::vtable(self).EnqueueResourceReadyWait)(windows_core::Interface::as_raw(self), pconsumercommandqueue.param().abi()).ok() } - pub unsafe fn SignalEventOnResourceReady(&self, hevent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SignalEventOnResourceReady)(windows_core::Interface::as_raw(self), hevent.param().abi()).ok() + pub unsafe fn SignalEventOnResourceReady(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SignalEventOnResourceReady)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent)).ok() } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn EnqueueResourceRelease(&self, pconsumercommandqueue: P0) -> windows_core::Result<()> @@ -20640,24 +20612,17 @@ impl windows_core::RuntimeName for IMFDXGIBuffer {} windows_core::imp::define_interface!(IMFDXGIDeviceManager, IMFDXGIDeviceManager_Vtbl, 0xeb533d5d_2db6_40f8_97a9_494692014f07); windows_core::imp::interface_hierarchy!(IMFDXGIDeviceManager, windows_core::IUnknown); impl IMFDXGIDeviceManager { - pub unsafe fn CloseDeviceHandle(&self, hdevice: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CloseDeviceHandle)(windows_core::Interface::as_raw(self), hdevice.param().abi()).ok() + pub unsafe fn CloseDeviceHandle(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CloseDeviceHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice)).ok() } - pub unsafe fn GetVideoService(&self, hdevice: P0, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), hdevice.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppservice)).ok() + pub unsafe fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(riid), core::mem::transmute(ppservice)).ok() } - pub unsafe fn LockDevice(&self, hdevice: P0, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: P3) -> windows_core::Result<()> + pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), hdevice.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppunkdevice), fblock.param().abi()).ok() + (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(riid), core::mem::transmute(ppunkdevice), fblock.param().abi()).ok() } pub unsafe fn OpenDeviceHandle(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -20669,18 +20634,14 @@ impl IMFDXGIDeviceManager { { (windows_core::Interface::vtable(self).ResetDevice)(windows_core::Interface::as_raw(self), punkdevice.param().abi(), core::mem::transmute(resettoken)).ok() } - pub unsafe fn TestDevice(&self, hdevice: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TestDevice)(windows_core::Interface::as_raw(self), hdevice.param().abi()).ok() + pub unsafe fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TestDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice)).ok() } - pub unsafe fn UnlockDevice(&self, hdevice: P0, fsavestate: P1) -> windows_core::Result<()> + pub unsafe fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), hdevice.param().abi(), fsavestate.param().abi()).ok() + (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), fsavestate.param().abi()).ok() } } #[repr(C)] @@ -22293,7 +22254,7 @@ windows_core::imp::define_interface!(IMFMediaBuffer, IMFMediaBuffer_Vtbl, 0x045f 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), core::mem::transmute(ppbbuffer), core::mem::transmute(pcbmaxlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcurrentlength.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbbuffer), core::mem::transmute(pcbmaxlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcurrentlength.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Unlock(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self)).ok() @@ -22507,10 +22468,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(core::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(cx.unwrap_or(core::mem::zeroed())), core::mem::transmute(cy.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVideoAspectRatio)(windows_core::Interface::as_raw(self), core::mem::transmute(cx.unwrap_or(core::mem::zeroed())), core::mem::transmute(cy.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Shutdown(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() @@ -22519,7 +22480,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(core::ptr::null())), core::mem::transmute(pdst), core::mem::transmute(pborderclr.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pdst), core::mem::transmute(pborderclr.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn OnVideoStreamTick(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -23306,7 +23267,7 @@ impl IMFMediaEngineEx { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(statisticid), &mut result__).map(|| core::mem::transmute(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(core::ptr::null())), core::mem::transmute(pdst.unwrap_or(core::ptr::null())), core::mem::transmute(pborderclr.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).UpdateVideoStream)(windows_core::Interface::as_raw(self), core::mem::transmute(psrc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdst.unwrap_or(core::mem::zeroed())), core::mem::transmute(pborderclr.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetBalance(&self) -> f64 { (windows_core::Interface::vtable(self).GetBalance)(windows_core::Interface::as_raw(self)) @@ -24010,18 +23971,15 @@ impl IMFMediaEngineProtectedContent { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetRequiredProtections)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOPMWindow(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOPMWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SetOPMWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOPMWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } pub unsafe fn TransferVideoFrame(&self, pdstsurf: P0, psrc: Option<*const MFVideoNormalizedRect>, pdst: *const super::super::Foundation::RECT, pborderclr: Option<*const MFARGB>) -> windows_core::Result where 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(core::ptr::null())), core::mem::transmute(pdst), core::mem::transmute(pborderclr.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pdst), core::mem::transmute(pborderclr.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) } pub unsafe fn SetContentProtectionManager(&self, pcpm: P0) -> windows_core::Result<()> where @@ -26629,7 +26587,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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetMediaTypeCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -27173,13 +27131,13 @@ impl IMFNetCredential { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata), fencryptdata.param().abi()).ok() + (windows_core::Interface::vtable(self).GetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata), fencryptdata.param().abi()).ok() } pub unsafe fn GetPassword(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: P2) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata), fencryptdata.param().abi()).ok() + (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata), fencryptdata.param().abi()).ok() } pub unsafe fn LoggedOnUser(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -27467,8 +27425,8 @@ impl IMFNetProxyLocator { pub unsafe fn RegisterProxyResult(&self, hrop: windows_core::HRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RegisterProxyResult)(windows_core::Interface::as_raw(self), core::mem::transmute(hrop)).ok() } - pub unsafe fn GetCurrentProxy(&self, pszstr: windows_core::PWSTR, pcchstr: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(pszstr), core::mem::transmute(pcchstr)).ok() + pub unsafe fn GetCurrentProxy(&self, pszstr: Option, pcchstr: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCurrentProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(pszstr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchstr)).ok() } pub unsafe fn Clone(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -27904,7 +27862,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(core::ptr::null_mut())), core::mem::transmute(pcbticket.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pcbticket.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -28212,17 +28170,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(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() + (windows_core::Interface::vtable(self).GetStartStopPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidstartpositiontype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvstartvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pguidstoppositiontype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvstopvalue.unwrap_or(core::mem::zeroed()))).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(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() + (windows_core::Interface::vtable(self).SetStartStopPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidstartpositiontype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvstartvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pguidstoppositiontype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvstopvalue.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(pfselected.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).HasVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pfhasvideo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfselected.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(pfselected.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).HasAudio)(windows_core::Interface::as_raw(self), core::mem::transmute(pfhasaudio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfselected.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn IsProtected(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -28567,14 +28525,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(), core::mem::transmute(dwuserdata), core::mem::transmute(ppmediaitem.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateMediaItemFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), fsync.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(ppmediaitem.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(dwuserdata), core::mem::transmute(ppmediaitem.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateMediaItemFromObject)(windows_core::Interface::as_raw(self), piunknownobj.param().abi(), fsync.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(ppmediaitem.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetMediaItem(&self, pimfpmediaitem: P0) -> windows_core::Result<()> where @@ -28614,10 +28572,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(core::ptr::null_mut())), core::mem::transmute(pszarvideo.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszvideo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszarvideo.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(pszmax.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdealVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszmin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszmax.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetVideoSourceRect(&self, pnrcsource: *const MFVideoNormalizedRect) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetVideoSourceRect)(windows_core::Interface::as_raw(self), core::mem::transmute(pnrcsource)).ok() @@ -28640,11 +28598,8 @@ impl IMFPMediaPlayer { pub unsafe fn UpdateVideo(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetBorderColor(&self, clr: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), clr.param().abi()).ok() + pub unsafe fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(clr)).ok() } pub unsafe fn GetBorderColor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -29075,7 +29030,7 @@ impl IMFPluginControl { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), core::mem::transmute(plugintype), selector.param().abi(), core::mem::transmute(clsid.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), core::mem::transmute(plugintype), selector.param().abi(), core::mem::transmute(clsid.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(plugintype), core::mem::transmute(clsid)).ok() @@ -31056,7 +31011,7 @@ impl IMFSchemeHandler { P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), core::mem::transmute(dwflags), pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::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(), core::mem::transmute(dwflags), pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::mem::zeroed())), 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 @@ -32208,7 +32163,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(core::ptr::null_mut())), core::mem::transmute(pptopology.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pptopology.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn UpdateTopology(&self, dwid: u32, ptopology: P1) -> windows_core::Result<()> where @@ -32767,7 +32722,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), core::mem::transmute(dwstreamindex), core::mem::transmute(dwtransformindex), core::mem::transmute(pguidcategory.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptransform)).ok() + (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), core::mem::transmute(dwtransformindex), core::mem::transmute(pguidcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptransform)).ok() } } #[repr(C)] @@ -32826,7 +32781,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Abort(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self)).ok() @@ -33151,14 +33106,14 @@ impl IMFSourceReader { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetCurrentMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), pmediatype.param().abi()).ok() + (windows_core::Interface::vtable(self).SetCurrentMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), 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), core::mem::transmute(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), core::mem::transmute(dwstreamindex), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ReadSample)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), core::mem::transmute(dwcontrolflags), core::mem::transmute(pdwactualstreamindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwstreamflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(plltimestamp.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsample.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Flush(&self, dwstreamindex: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex)).ok() @@ -33422,7 +33377,7 @@ impl IMFSourceReaderEx { (windows_core::Interface::vtable(self).RemoveAllTransformsForStream)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(dwstreamindex), core::mem::transmute(dwtransformindex), core::mem::transmute(pguidcategory.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptransform)).ok() + (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), core::mem::transmute(dwtransformindex), core::mem::transmute(pguidcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptransform)).ok() } } #[repr(C)] @@ -33507,7 +33462,7 @@ impl IMFSourceResolver { P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginCreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), core::mem::transmute(dwflags), pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::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(), core::mem::transmute(dwflags), pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::mem::zeroed())), 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 @@ -33524,7 +33479,7 @@ impl IMFSourceResolver { P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), core::mem::transmute(dwflags), pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::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(), core::mem::transmute(dwflags), pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::mem::zeroed())), 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 @@ -34696,10 +34651,10 @@ impl IMFTimedTextCueList { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddTextCue)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(duration), text.param().abi(), core::mem::transmute(cue.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddTextCue)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(duration), text.param().abi(), core::mem::transmute(cue.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(start), core::mem::transmute(duration), core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), core::mem::transmute(cue.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddDataCue)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(duration), core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), core::mem::transmute(cue.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn RemoveCue(&self, cue: P0) -> windows_core::Result<()> where @@ -37177,11 +37132,8 @@ impl IMFVideoDisplayControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetAspectRatioMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetVideoWindow(&self, hwndvideo: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVideoWindow)(windows_core::Interface::as_raw(self), hwndvideo.param().abi()).ok() + pub unsafe fn SetVideoWindow(&self, hwndvideo: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVideoWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndvideo)).ok() } pub unsafe fn GetVideoWindow(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -37194,11 +37146,8 @@ impl IMFVideoDisplayControl { pub unsafe fn GetCurrentImage(&self, pbih: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER, pdib: *mut *mut u8, pcbdib: *mut u32, ptimestamp: *mut i64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetCurrentImage)(windows_core::Interface::as_raw(self), core::mem::transmute(pbih), core::mem::transmute(pdib), core::mem::transmute(pcbdib), core::mem::transmute(ptimestamp)).ok() } - pub unsafe fn SetBorderColor(&self, clr: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), clr.param().abi()).ok() + pub unsafe fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(clr)).ok() } pub unsafe fn GetBorderColor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -37762,11 +37711,8 @@ impl IMFVideoProcessor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetBackgroundColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBackgroundColor(&self, clrbkg: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), clrbkg.param().abi()).ok() + pub unsafe fn SetBackgroundColor(&self, clrbkg: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), core::mem::transmute(clrbkg)).ok() } } #[repr(C)] @@ -37916,13 +37862,13 @@ windows_core::imp::define_interface!(IMFVideoProcessorControl, IMFVideoProcessor 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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(pbordercolor.unwrap_or(core::mem::zeroed()))).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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetSourceRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(psrcrect.unwrap_or(core::mem::zeroed()))).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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetDestinationRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstrect.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(emirror)).ok() @@ -37931,7 +37877,7 @@ impl IMFVideoProcessorControl { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetConstrictionSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pconstrictionsize.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -38477,21 +38423,15 @@ 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), core::mem::transmute(propertyset), core::mem::transmute(propertyid), core::mem::transmute(propertyflags), core::mem::transmute(propertypayload.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertypayloadlength), core::mem::transmute(data.unwrap_or(core::ptr::null_mut())), core::mem::transmute(datalength), core::mem::transmute(datawritten)).ok() + (windows_core::Interface::vtable(self).SendCameraProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyset), core::mem::transmute(propertyid), core::mem::transmute(propertyflags), core::mem::transmute(propertypayload.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertypayloadlength), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(datalength), core::mem::transmute(datawritten)).ok() } - pub unsafe fn CreateSyncEvent(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, eventhandle: P3) -> windows_core::Result - where - P3: windows_core::Param, - { + pub unsafe fn CreateSyncEvent(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, eventhandle: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSyncEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(kseventset), core::mem::transmute(kseventid), core::mem::transmute(kseventflags), eventhandle.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSyncEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(kseventset), core::mem::transmute(kseventid), core::mem::transmute(kseventflags), core::mem::transmute(eventhandle), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateSyncSemaphore(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, semaphorehandle: P3, semaphoreadjustment: i32) -> windows_core::Result - where - P3: windows_core::Param, - { + pub unsafe fn CreateSyncSemaphore(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, semaphorehandle: super::super::Foundation::HANDLE, semaphoreadjustment: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSyncSemaphore)(windows_core::Interface::as_raw(self), core::mem::transmute(kseventset), core::mem::transmute(kseventid), core::mem::transmute(kseventflags), semaphorehandle.param().abi(), core::mem::transmute(semaphoreadjustment), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSyncSemaphore)(windows_core::Interface::as_raw(self), core::mem::transmute(kseventset), core::mem::transmute(kseventid), core::mem::transmute(kseventflags), core::mem::transmute(semaphorehandle), core::mem::transmute(semaphoreadjustment), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Shutdown(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() @@ -39087,8 +39027,8 @@ impl IToc { { (windows_core::Interface::vtable(self).SetDescription)(windows_core::Interface::as_raw(self), pwszdescription.param().abi()).ok() } - pub unsafe fn GetDescription(&self, pwdescriptionsize: *mut u16, pwszdescription: windows_core::PWSTR) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pwdescriptionsize), core::mem::transmute(pwszdescription)).ok() + pub unsafe fn GetDescription(&self, pwdescriptionsize: *mut u16, pwszdescription: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pwdescriptionsize), core::mem::transmute(pwszdescription.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetContext(&self, dwcontextsize: u32, pbtcontext: *mut u8) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetContext)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcontextsize), core::mem::transmute(pbtcontext)).ok() @@ -39312,8 +39252,8 @@ impl ITocEntry { { (windows_core::Interface::vtable(self).SetTitle)(windows_core::Interface::as_raw(self), pwsztitle.param().abi()).ok() } - pub unsafe fn GetTitle(&self, pwtitlesize: *mut u16, pwsztitle: windows_core::PWSTR) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTitle)(windows_core::Interface::as_raw(self), core::mem::transmute(pwtitlesize), core::mem::transmute(pwsztitle)).ok() + pub unsafe fn GetTitle(&self, pwtitlesize: *mut u16, pwsztitle: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetTitle)(windows_core::Interface::as_raw(self), core::mem::transmute(pwtitlesize), core::mem::transmute(pwsztitle.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetDescriptor(&self, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(pdescriptor)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs index cd7e2a2200..1fff4e29f2 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs @@ -711,11 +711,8 @@ impl IFeed { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DownloadEnclosuresAutomatically)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDownloadEnclosuresAutomatically(&self, downloadenclosuresautomatically: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDownloadEnclosuresAutomatically)(windows_core::Interface::as_raw(self), downloadenclosuresautomatically.param().abi()).ok() + pub unsafe fn SetDownloadEnclosuresAutomatically(&self, downloadenclosuresautomatically: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDownloadEnclosuresAutomatically)(windows_core::Interface::as_raw(self), core::mem::transmute(downloadenclosuresautomatically)).ok() } pub unsafe fn DownloadStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2301,11 +2298,8 @@ impl IFeedItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsRead)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsRead(&self, isread: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsRead)(windows_core::Interface::as_raw(self), isread.param().abi()).ok() + pub unsafe fn SetIsRead(&self, isread: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsRead)(windows_core::Interface::as_raw(self), core::mem::transmute(isread)).ok() } pub unsafe fn LocalId(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3862,11 +3856,8 @@ impl IWMPContentPartner { (windows_core::Interface::vtable(self).DownloadTrackComplete)(windows_core::Interface::as_raw(self), core::mem::transmute(hrresult), core::mem::transmute(contentid), core::mem::transmute_copy(downloadtrackparam)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn RefreshLicense(&self, dwcookie: u32, flocal: P1, bstrurl: &windows_core::BSTR, r#type: WMPStreamingType, contentid: u32, bstrrefreshreason: &windows_core::BSTR, preasoncontext: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RefreshLicense)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie), flocal.param().abi(), core::mem::transmute_copy(bstrurl), core::mem::transmute(r#type), core::mem::transmute(contentid), core::mem::transmute_copy(bstrrefreshreason), core::mem::transmute(preasoncontext)).ok() + pub unsafe fn RefreshLicense(&self, dwcookie: u32, flocal: super::super::Foundation::VARIANT_BOOL, bstrurl: &windows_core::BSTR, r#type: WMPStreamingType, contentid: u32, bstrrefreshreason: &windows_core::BSTR, preasoncontext: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RefreshLicense)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie), core::mem::transmute(flocal), core::mem::transmute_copy(bstrurl), core::mem::transmute(r#type), core::mem::transmute(contentid), core::mem::transmute_copy(bstrrefreshreason), core::mem::transmute(preasoncontext)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetCatalogURL(&self, dwcatalogversion: u32, dwcatalogschemaversion: u32, cataloglcid: u32, pdwnewcatalogversion: *mut u32, pbstrcatalogurl: *mut windows_core::BSTR, pexpirationdate: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -3884,12 +3875,8 @@ impl IWMPContentPartner { (windows_core::Interface::vtable(self).GetListContents)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(location), core::mem::transmute(pcontext), core::mem::transmute_copy(bstrlisttype), core::mem::transmute_copy(bstrparams), core::mem::transmute(dwlistcookie)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn Login(&self, userinfo: super::super::System::Com::BLOB, pwdinfo: super::super::System::Com::BLOB, fusedcachedcreds: P2, foktocache: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).Login)(windows_core::Interface::as_raw(self), core::mem::transmute(userinfo), core::mem::transmute(pwdinfo), fusedcachedcreds.param().abi(), foktocache.param().abi()).ok() + pub unsafe fn Login(&self, userinfo: super::super::System::Com::BLOB, pwdinfo: super::super::System::Com::BLOB, fusedcachedcreds: super::super::Foundation::VARIANT_BOOL, foktocache: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Login)(windows_core::Interface::as_raw(self), core::mem::transmute(userinfo), core::mem::transmute(pwdinfo), core::mem::transmute(fusedcachedcreds), core::mem::transmute(foktocache)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Authenticate(&self, userinfo: super::super::System::Com::BLOB, pwdinfo: super::super::System::Com::BLOB) -> windows_core::Result<()> { @@ -5618,11 +5605,8 @@ windows_core::imp::define_interface!(IWMPEffects, IWMPEffects_Vtbl, 0xd3984c13_c windows_core::imp::interface_hierarchy!(IWMPEffects, windows_core::IUnknown); impl IWMPEffects { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Render(&self, plevels: *mut TimedLevel, hdc: P1, prc: *mut super::super::Foundation::RECT) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), core::mem::transmute(plevels), hdc.param().abi(), core::mem::transmute(prc)).ok() + pub unsafe fn Render(&self, plevels: *mut TimedLevel, hdc: super::super::Graphics::Gdi::HDC, prc: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), core::mem::transmute(plevels), core::mem::transmute(hdc), core::mem::transmute(prc)).ok() } pub unsafe fn MediaInfo(&self, lchannelcount: i32, lsamplerate: i32, bstrtitle: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).MediaInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(lchannelcount), core::mem::transmute(lsamplerate), core::mem::transmute_copy(bstrtitle)).ok() @@ -5645,11 +5629,8 @@ impl IWMPEffects { pub unsafe fn GetCurrentPreset(&self, pnpreset: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetCurrentPreset)(windows_core::Interface::as_raw(self), core::mem::transmute(pnpreset)).ok() } - pub unsafe fn DisplayPropertyPage(&self, hwndowner: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DisplayPropertyPage)(windows_core::Interface::as_raw(self), hwndowner.param().abi()).ok() + pub unsafe fn DisplayPropertyPage(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DisplayPropertyPage)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner)).ok() } pub unsafe fn GoFullscreen(&self, ffullscreen: P0) -> windows_core::Result<()> where @@ -5777,11 +5758,8 @@ impl IWMPEffects2 { { (windows_core::Interface::vtable(self).SetCore)(windows_core::Interface::as_raw(self), pplayer.param().abi()).ok() } - pub unsafe fn Create(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn Create(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } pub unsafe fn Destroy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self)).ok() @@ -5793,12 +5771,8 @@ impl IWMPEffects2 { { (windows_core::Interface::vtable(self).NotifyNewMedia)(windows_core::Interface::as_raw(self), pmedia.param().abi()).ok() } - pub unsafe fn OnWindowMessage(&self, msg: u32, wparam: P1, lparam: P2, plresultparam: *mut super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(plresultparam)).ok() + pub unsafe fn OnWindowMessage(&self, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plresultparam: *mut super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(plresultparam)).ok() } pub unsafe fn RenderWindowed(&self, pdata: *mut TimedLevel, frequiredrender: P1) -> windows_core::Result<()> where @@ -6112,11 +6086,8 @@ impl IWMPEvents { pub unsafe fn Disconnect(&self, result: i32) { (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self), core::mem::transmute(result)) } - pub unsafe fn Buffering(&self, start: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Buffering)(windows_core::Interface::as_raw(self), start.param().abi()) + pub unsafe fn Buffering(&self, start: super::super::Foundation::VARIANT_BOOL) { + (windows_core::Interface::vtable(self).Buffering)(windows_core::Interface::as_raw(self), core::mem::transmute(start)) } pub unsafe fn Error(&self) { (windows_core::Interface::vtable(self).Error)(windows_core::Interface::as_raw(self)) @@ -6190,17 +6161,11 @@ impl IWMPEvents { pub unsafe fn PlaylistCollectionPlaylistRemoved(&self, bstrplaylistname: &windows_core::BSTR) { (windows_core::Interface::vtable(self).PlaylistCollectionPlaylistRemoved)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrplaylistname)) } - pub unsafe fn PlaylistCollectionPlaylistSetAsDeleted(&self, bstrplaylistname: &windows_core::BSTR, varfisdeleted: P1) - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlaylistCollectionPlaylistSetAsDeleted)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrplaylistname), varfisdeleted.param().abi()) + pub unsafe fn PlaylistCollectionPlaylistSetAsDeleted(&self, bstrplaylistname: &windows_core::BSTR, varfisdeleted: super::super::Foundation::VARIANT_BOOL) { + (windows_core::Interface::vtable(self).PlaylistCollectionPlaylistSetAsDeleted)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrplaylistname), core::mem::transmute(varfisdeleted)) } - pub unsafe fn ModeChange(&self, modename: &windows_core::BSTR, newvalue: P1) - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ModeChange)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(modename), newvalue.param().abi()) + pub unsafe fn ModeChange(&self, modename: &windows_core::BSTR, newvalue: super::super::Foundation::VARIANT_BOOL) { + (windows_core::Interface::vtable(self).ModeChange)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(modename), core::mem::transmute(newvalue)) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn MediaError(&self, pmediaobject: P0) @@ -7724,12 +7689,11 @@ impl IWMPMediaCollection { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).getByAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrattribute), core::mem::transmute_copy(bstrvalue), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn remove(&self, pitem: P0, varfdeletefile: P1) -> windows_core::Result<()> + pub unsafe fn remove(&self, pitem: P0, varfdeletefile: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).remove)(windows_core::Interface::as_raw(self), pitem.param().abi(), varfdeletefile.param().abi()).ok() + (windows_core::Interface::vtable(self).remove)(windows_core::Interface::as_raw(self), pitem.param().abi(), core::mem::transmute(varfdeletefile)).ok() } pub unsafe fn getAttributeStringCollection(&self, bstrattribute: &windows_core::BSTR, bstrmediatype: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7738,12 +7702,11 @@ impl IWMPMediaCollection { pub unsafe fn getMediaAtom(&self, bstritemname: &windows_core::BSTR, platom: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).getMediaAtom)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritemname), core::mem::transmute(platom)).ok() } - pub unsafe fn setDeleted(&self, pitem: P0, varfisdeleted: P1) -> windows_core::Result<()> + pub unsafe fn setDeleted(&self, pitem: P0, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).setDeleted)(windows_core::Interface::as_raw(self), pitem.param().abi(), varfisdeleted.param().abi()).ok() + (windows_core::Interface::vtable(self).setDeleted)(windows_core::Interface::as_raw(self), pitem.param().abi(), core::mem::transmute(varfisdeleted)).ok() } pub unsafe fn isDeleted(&self, pitem: P0, pvarfisdeleted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where @@ -7922,21 +7885,19 @@ impl IWMPMediaCollection2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).createQuery)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn getPlaylistByQuery(&self, pquery: P0, bstrmediatype: &windows_core::BSTR, bstrsortattribute: &windows_core::BSTR, fsortascending: P3) -> windows_core::Result + pub unsafe fn getPlaylistByQuery(&self, pquery: P0, bstrmediatype: &windows_core::BSTR, bstrsortattribute: &windows_core::BSTR, fsortascending: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result where P0: windows_core::Param, - P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).getPlaylistByQuery)(windows_core::Interface::as_raw(self), pquery.param().abi(), core::mem::transmute_copy(bstrmediatype), core::mem::transmute_copy(bstrsortattribute), fsortascending.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).getPlaylistByQuery)(windows_core::Interface::as_raw(self), pquery.param().abi(), core::mem::transmute_copy(bstrmediatype), core::mem::transmute_copy(bstrsortattribute), core::mem::transmute(fsortascending), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn getStringCollectionByQuery(&self, bstrattribute: &windows_core::BSTR, pquery: P1, bstrmediatype: &windows_core::BSTR, bstrsortattribute: &windows_core::BSTR, fsortascending: P4) -> windows_core::Result + pub unsafe fn getStringCollectionByQuery(&self, bstrattribute: &windows_core::BSTR, pquery: P1, bstrmediatype: &windows_core::BSTR, bstrsortattribute: &windows_core::BSTR, fsortascending: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result where P1: windows_core::Param, - P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).getStringCollectionByQuery)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrattribute), pquery.param().abi(), core::mem::transmute_copy(bstrmediatype), core::mem::transmute_copy(bstrsortattribute), fsortascending.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).getStringCollectionByQuery)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrattribute), pquery.param().abi(), core::mem::transmute_copy(bstrmediatype), core::mem::transmute_copy(bstrsortattribute), core::mem::transmute(fsortascending), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn getByAttributeAndMediaType(&self, bstrattribute: &windows_core::BSTR, bstrvalue: &windows_core::BSTR, bstrmediatype: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8271,11 +8232,8 @@ impl IWMPNetwork { pub unsafe fn getProxyBypassForLocal(&self, bstrprotocol: &windows_core::BSTR, pfbypassforlocal: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).getProxyBypassForLocal)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(pfbypassforlocal)).ok() } - pub unsafe fn setProxyBypassForLocal(&self, bstrprotocol: &windows_core::BSTR, fbypassforlocal: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).setProxyBypassForLocal)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), fbypassforlocal.param().abi()).ok() + pub unsafe fn setProxyBypassForLocal(&self, bstrprotocol: &windows_core::BSTR, fbypassforlocal: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).setProxyBypassForLocal)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(fbypassforlocal)).ok() } pub unsafe fn maxBandwidth(&self, lmaxbandwidth: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).maxBandwidth)(windows_core::Interface::as_raw(self), core::mem::transmute(lmaxbandwidth)).ok() @@ -8695,12 +8653,8 @@ impl windows_core::RuntimeName for IWMPNodeWindowed {} windows_core::imp::define_interface!(IWMPNodeWindowedHost, IWMPNodeWindowedHost_Vtbl, 0xa300415a_54aa_4081_adbf_3b13610d8958); windows_core::imp::interface_hierarchy!(IWMPNodeWindowedHost, windows_core::IUnknown); impl IWMPNodeWindowedHost { - pub unsafe fn OnWindowMessageFromRenderer(&self, umsg: u32, wparam: P1, lparam: P2, plret: *mut super::super::Foundation::LRESULT, pfhandled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnWindowMessageFromRenderer)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(plret), core::mem::transmute(pfhandled)).ok() + pub unsafe fn OnWindowMessageFromRenderer(&self, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plret: *mut super::super::Foundation::LRESULT, pfhandled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnWindowMessageFromRenderer)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(plret), core::mem::transmute(pfhandled)).ok() } } #[repr(C)] @@ -8805,29 +8759,20 @@ impl IWMPPlayer { pub unsafe fn enabled(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn Setenabled(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn Setenabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn fullScreen(&self, pbfullscreen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfullscreen)).ok() } - pub unsafe fn SetfullScreen(&self, bfullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), bfullscreen.param().abi()).ok() + pub unsafe fn SetfullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(bfullscreen)).ok() } pub unsafe fn enableContextMenu(&self, pbenablecontextmenu: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenablecontextmenu)).ok() } - pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), benablecontextmenu.param().abi()).ok() + pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(benablecontextmenu)).ok() } pub unsafe fn SetuiMode(&self, bstrmode: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetuiMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode)).ok() @@ -8929,29 +8874,20 @@ impl IWMPPlayer2 { pub unsafe fn enabled(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn Setenabled(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn Setenabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn fullScreen(&self, pbfullscreen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfullscreen)).ok() } - pub unsafe fn SetfullScreen(&self, bfullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), bfullscreen.param().abi()).ok() + pub unsafe fn SetfullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(bfullscreen)).ok() } pub unsafe fn enableContextMenu(&self, pbenablecontextmenu: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenablecontextmenu)).ok() } - pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), benablecontextmenu.param().abi()).ok() + pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(benablecontextmenu)).ok() } pub unsafe fn SetuiMode(&self, bstrmode: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetuiMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode)).ok() @@ -8962,20 +8898,14 @@ impl IWMPPlayer2 { pub unsafe fn stretchToFit(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn SetstretchToFit(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetstretchToFit(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn windowlessVideo(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn SetwindowlessVideo(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetwindowlessVideo(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -9099,29 +9029,20 @@ impl IWMPPlayer3 { pub unsafe fn enabled(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn Setenabled(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn Setenabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn fullScreen(&self, pbfullscreen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfullscreen)).ok() } - pub unsafe fn SetfullScreen(&self, bfullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), bfullscreen.param().abi()).ok() + pub unsafe fn SetfullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(bfullscreen)).ok() } pub unsafe fn enableContextMenu(&self, pbenablecontextmenu: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenablecontextmenu)).ok() } - pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), benablecontextmenu.param().abi()).ok() + pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(benablecontextmenu)).ok() } pub unsafe fn SetuiMode(&self, bstrmode: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetuiMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode)).ok() @@ -9132,20 +9053,14 @@ impl IWMPPlayer3 { pub unsafe fn stretchToFit(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn SetstretchToFit(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetstretchToFit(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn windowlessVideo(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn SetwindowlessVideo(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetwindowlessVideo(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -9269,29 +9184,20 @@ impl IWMPPlayer4 { pub unsafe fn enabled(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn Setenabled(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn Setenabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn fullScreen(&self, pbfullscreen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).fullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pbfullscreen)).ok() } - pub unsafe fn SetfullScreen(&self, bfullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), bfullscreen.param().abi()).ok() + pub unsafe fn SetfullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetfullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(bfullscreen)).ok() } pub unsafe fn enableContextMenu(&self, pbenablecontextmenu: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenablecontextmenu)).ok() } - pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), benablecontextmenu.param().abi()).ok() + pub unsafe fn SetenableContextMenu(&self, benablecontextmenu: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetenableContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(benablecontextmenu)).ok() } pub unsafe fn SetuiMode(&self, bstrmode: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetuiMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode)).ok() @@ -9302,20 +9208,14 @@ impl IWMPPlayer4 { pub unsafe fn stretchToFit(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).stretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn SetstretchToFit(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetstretchToFit(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetstretchToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn windowlessVideo(&self, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).windowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbenabled)).ok() } - pub unsafe fn SetwindowlessVideo(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetwindowlessVideo(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetwindowlessVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn isRemote(&self, pvarfisremote: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).isRemote)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarfisremote)).ok() @@ -9903,12 +9803,11 @@ impl IWMPPlaylistCollection { { (windows_core::Interface::vtable(self).remove)(windows_core::Interface::as_raw(self), pitem.param().abi()).ok() } - pub unsafe fn setDeleted(&self, pitem: P0, varfisdeleted: P1) -> windows_core::Result<()> + pub unsafe fn setDeleted(&self, pitem: P0, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).setDeleted)(windows_core::Interface::as_raw(self), pitem.param().abi(), varfisdeleted.param().abi()).ok() + (windows_core::Interface::vtable(self).setDeleted)(windows_core::Interface::as_raw(self), pitem.param().abi(), core::mem::transmute(varfisdeleted)).ok() } pub unsafe fn isDeleted(&self, pitem: P0, pvarfisdeleted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where @@ -10156,20 +10055,14 @@ impl IWMPPluginUI { { (windows_core::Interface::vtable(self).SetCore)(windows_core::Interface::as_raw(self), pcore.param().abi()).ok() } - pub unsafe fn Create(&self, hwndparent: P0, phwndwindow: *mut super::super::Foundation::HWND) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(phwndwindow)).ok() + pub unsafe fn Create(&self, hwndparent: super::super::Foundation::HWND, phwndwindow: *mut super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(phwndwindow)).ok() } pub unsafe fn Destroy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn DisplayPropertyPage(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DisplayPropertyPage)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn DisplayPropertyPage(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DisplayPropertyPage)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperty(&self, pwszname: P0, pvarproperty: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> @@ -10498,11 +10391,8 @@ impl IWMPSettings { pub unsafe fn autoStart(&self, pfautostart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).autoStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pfautostart)).ok() } - pub unsafe fn SetautoStart(&self, fautostart: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetautoStart)(windows_core::Interface::as_raw(self), fautostart.param().abi()).ok() + pub unsafe fn SetautoStart(&self, fautostart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetautoStart)(windows_core::Interface::as_raw(self), core::mem::transmute(fautostart)).ok() } pub unsafe fn baseURL(&self, pbstrbaseurl: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).baseURL)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrbaseurl)).ok() @@ -10519,20 +10409,14 @@ impl IWMPSettings { pub unsafe fn invokeURLs(&self, pfinvokeurls: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).invokeURLs)(windows_core::Interface::as_raw(self), core::mem::transmute(pfinvokeurls)).ok() } - pub unsafe fn SetinvokeURLs(&self, finvokeurls: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetinvokeURLs)(windows_core::Interface::as_raw(self), finvokeurls.param().abi()).ok() + pub unsafe fn SetinvokeURLs(&self, finvokeurls: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetinvokeURLs)(windows_core::Interface::as_raw(self), core::mem::transmute(finvokeurls)).ok() } pub unsafe fn mute(&self, pfmute: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).mute)(windows_core::Interface::as_raw(self), core::mem::transmute(pfmute)).ok() } - pub unsafe fn Setmute(&self, fmute: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setmute)(windows_core::Interface::as_raw(self), fmute.param().abi()).ok() + pub unsafe fn Setmute(&self, fmute: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setmute)(windows_core::Interface::as_raw(self), core::mem::transmute(fmute)).ok() } pub unsafe fn playCount(&self, plcount: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).playCount)(windows_core::Interface::as_raw(self), core::mem::transmute(plcount)).ok() @@ -10561,20 +10445,14 @@ impl IWMPSettings { pub unsafe fn getMode(&self, bstrmode: &windows_core::BSTR, pvarfmode: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).getMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode), core::mem::transmute(pvarfmode)).ok() } - pub unsafe fn setMode(&self, bstrmode: &windows_core::BSTR, varfmode: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).setMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode), varfmode.param().abi()).ok() + pub unsafe fn setMode(&self, bstrmode: &windows_core::BSTR, varfmode: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).setMode)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrmode), core::mem::transmute(varfmode)).ok() } pub unsafe fn enableErrorDialogs(&self, pfenableerrordialogs: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).enableErrorDialogs)(windows_core::Interface::as_raw(self), core::mem::transmute(pfenableerrordialogs)).ok() } - pub unsafe fn SetenableErrorDialogs(&self, fenableerrordialogs: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetenableErrorDialogs)(windows_core::Interface::as_raw(self), fenableerrordialogs.param().abi()).ok() + pub unsafe fn SetenableErrorDialogs(&self, fenableerrordialogs: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetenableErrorDialogs)(windows_core::Interface::as_raw(self), core::mem::transmute(fenableerrordialogs)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -10989,34 +10867,28 @@ windows_core::imp::define_interface!(IWMPSubscriptionService, IWMPSubscriptionSe windows_core::imp::interface_hierarchy!(IWMPSubscriptionService, windows_core::IUnknown); impl IWMPSubscriptionService { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn allowPlay(&self, hwnd: P0, pmedia: P1, pfallowplay: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> + pub unsafe fn allowPlay(&self, hwnd: super::super::Foundation::HWND, pmedia: P1, pfallowplay: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).allowPlay)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pmedia.param().abi(), core::mem::transmute(pfallowplay)).ok() + (windows_core::Interface::vtable(self).allowPlay)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pmedia.param().abi(), core::mem::transmute(pfallowplay)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn allowCDBurn(&self, hwnd: P0, pplaylist: P1, pfallowburn: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> + pub unsafe fn allowCDBurn(&self, hwnd: super::super::Foundation::HWND, pplaylist: P1, pfallowburn: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).allowCDBurn)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pplaylist.param().abi(), core::mem::transmute(pfallowburn)).ok() + (windows_core::Interface::vtable(self).allowCDBurn)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pplaylist.param().abi(), core::mem::transmute(pfallowburn)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn allowPDATransfer(&self, hwnd: P0, pplaylist: P1, pfallowtransfer: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> + pub unsafe fn allowPDATransfer(&self, hwnd: super::super::Foundation::HWND, pplaylist: P1, pfallowtransfer: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).allowPDATransfer)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pplaylist.param().abi(), core::mem::transmute(pfallowtransfer)).ok() + (windows_core::Interface::vtable(self).allowPDATransfer)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pplaylist.param().abi(), core::mem::transmute(pfallowtransfer)).ok() } - pub unsafe fn startBackgroundProcessing(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).startBackgroundProcessing)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn startBackgroundProcessing(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).startBackgroundProcessing)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } } #[repr(C)] @@ -11213,11 +11085,8 @@ impl IWMPSyncDevice { pub unsafe fn getItemInfo(&self, bstritemname: &windows_core::BSTR, pbstrval: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).getItemInfo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstritemname), core::mem::transmute(pbstrval)).ok() } - pub unsafe fn createPartnership(&self, vbshowui: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).createPartnership)(windows_core::Interface::as_raw(self), vbshowui.param().abi()).ok() + pub unsafe fn createPartnership(&self, vbshowui: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).createPartnership)(windows_core::Interface::as_raw(self), core::mem::transmute(vbshowui)).ok() } pub unsafe fn deletePartnership(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).deletePartnership)(windows_core::Interface::as_raw(self)).ok() @@ -11604,12 +11473,8 @@ impl windows_core::RuntimeName for IWMPVideoRenderConfig {} windows_core::imp::define_interface!(IWMPWindowMessageSink, IWMPWindowMessageSink_Vtbl, 0x3a0daa30_908d_4789_ba87_aed879b5c49b); windows_core::imp::interface_hierarchy!(IWMPWindowMessageSink, windows_core::IUnknown); impl IWMPWindowMessageSink { - pub unsafe fn OnWindowMessage(&self, umsg: u32, wparam: P1, lparam: P2, plret: *mut super::super::Foundation::LRESULT, pfhandled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(plret), core::mem::transmute(pfhandled)).ok() + pub unsafe fn OnWindowMessage(&self, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plret: *mut super::super::Foundation::LRESULT, pfhandled: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(plret), core::mem::transmute(pfhandled)).ok() } } #[repr(C)] 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 e2da7f338c..dca4778caa 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 P1: 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(), core::mem::transmute(umode), core::mem::transmute(lphandler.unwrap_or(core::ptr::null()))).ok() + AVIFileOpenA(core::mem::transmute(ppfile), szfile.param().abi(), core::mem::transmute(umode), core::mem::transmute(lphandler.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AVIFileOpenW(ppfile: *mut Option, szfile: P1, umode: u32, lphandler: Option<*const windows_core::GUID>) -> windows_core::Result<()> @@ -99,7 +99,7 @@ where P1: 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(), core::mem::transmute(umode), core::mem::transmute(lphandler.unwrap_or(core::ptr::null()))).ok() + AVIFileOpenW(core::mem::transmute(ppfile), szfile.param().abi(), core::mem::transmute(umode), core::mem::transmute(lphandler.unwrap_or(core::mem::zeroed()))).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 P1: 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(), core::mem::transmute(lpoptions), core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null()))).ok() + AVIMakeCompressedStream(core::mem::transmute(ppscompressed), ppssource.param().abi(), core::mem::transmute(lpoptions), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AVIMakeFileFromStreams(ppfile: *mut Option, papstreams: &[Option]) -> windows_core::Result<()> { @@ -145,13 +145,10 @@ pub unsafe fn AVIMakeFileFromStreams(ppfile: *mut Option, papstreams: AVIMakeFileFromStreams(core::mem::transmute(ppfile), papstreams.len().try_into().unwrap(), core::mem::transmute(papstreams.as_ptr())).ok() } #[inline] -pub unsafe fn AVIMakeStreamFromClipboard(cfformat: u32, hglobal: P1) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn AVIMakeStreamFromClipboard(cfformat: u32, hglobal: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("avifil32.dll" "system" fn AVIMakeStreamFromClipboard(cfformat : u32, hglobal : super::super::Foundation:: HANDLE, ppstream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - AVIMakeStreamFromClipboard(core::mem::transmute(cfformat), hglobal.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + AVIMakeStreamFromClipboard(core::mem::transmute(cfformat), core::mem::transmute(hglobal), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn AVIPutFileOnClipboard(pf: P0) -> windows_core::Result<()> @@ -168,15 +165,12 @@ where P4: 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(core::ptr::null())), core::mem::transmute(lpfncallback), core::mem::transmute(nstreams), pfile.param().abi(), core::mem::transmute(lpoptions)).ok() + AVISaveA(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfncallback), core::mem::transmute(nstreams), pfile.param().abi(), core::mem::transmute(lpoptions)).ok() } #[inline] -pub unsafe fn AVISaveOptions(hwnd: P0, uiflags: u32, nstreams: i32, ppavi: *const Option, plpoptions: *mut *mut AVICOMPRESSOPTIONS) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn AVISaveOptions(hwnd: super::super::Foundation::HWND, uiflags: u32, nstreams: i32, ppavi: *const Option, plpoptions: *mut *mut AVICOMPRESSOPTIONS) -> isize { windows_targets::link!("avifil32.dll" "system" fn AVISaveOptions(hwnd : super::super::Foundation:: HWND, uiflags : u32, nstreams : i32, ppavi : *const * mut core::ffi::c_void, plpoptions : *mut *mut AVICOMPRESSOPTIONS) -> isize); - AVISaveOptions(hwnd.param().abi(), core::mem::transmute(uiflags), core::mem::transmute(nstreams), core::mem::transmute(ppavi), core::mem::transmute(plpoptions)) + AVISaveOptions(core::mem::transmute(hwnd), core::mem::transmute(uiflags), core::mem::transmute(nstreams), core::mem::transmute(ppavi), core::mem::transmute(plpoptions)) } #[inline] pub unsafe fn AVISaveOptionsFree(plpoptions: &[*const AVICOMPRESSOPTIONS]) -> windows_core::Result<()> { @@ -189,7 +183,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(core::ptr::null())), core::mem::transmute(lpfncallback), core::mem::transmute(nstreams), core::mem::transmute(ppavi), core::mem::transmute(plpoptions)).ok() + AVISaveVA(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfncallback), core::mem::transmute(nstreams), core::mem::transmute(ppavi), core::mem::transmute(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 +191,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(core::ptr::null())), core::mem::transmute(lpfncallback), core::mem::transmute(nstreams), core::mem::transmute(ppavi), core::mem::transmute(plpoptions)).ok() + AVISaveVW(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfncallback), core::mem::transmute(nstreams), core::mem::transmute(ppavi), core::mem::transmute(plpoptions)).ok() } #[inline] pub unsafe fn AVISaveW(szfile: P0, pclsidhandler: Option<*const windows_core::GUID>, lpfncallback: AVISAVECALLBACK, nstreams: i32, pfile: P4, lpoptions: *const AVICOMPRESSOPTIONS) -> windows_core::Result<()> @@ -206,7 +200,7 @@ where P4: 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(core::ptr::null())), core::mem::transmute(lpfncallback), core::mem::transmute(nstreams), pfile.param().abi(), core::mem::transmute(lpoptions)).ok() + AVISaveW(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfncallback), core::mem::transmute(nstreams), pfile.param().abi(), core::mem::transmute(lpoptions)).ok() } #[inline] pub unsafe fn AVIStreamAddRef(pavi: P0) -> u32 @@ -227,7 +221,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), core::mem::transmute(lparam1), core::mem::transmute(lparam2), core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null()))).ok() + AVIStreamCreate(core::mem::transmute(ppavi), core::mem::transmute(lparam1), core::mem::transmute(lparam2), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AVIStreamEndStreaming(pavi: P0) -> windows_core::Result<()> @@ -268,7 +262,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(core::ptr::null()))) + AVIStreamGetFrameOpen(pavi.param().abi(), core::mem::transmute(lpbiwanted.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn AVIStreamInfoA(pavi: P0, psi: *mut AVISTREAMINFOA, lsize: i32) -> windows_core::Result<()> @@ -300,7 +294,7 @@ where P1: 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(), core::mem::transmute(fcctype), core::mem::transmute(lparam), core::mem::transmute(mode), core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null()))).ok() + AVIStreamOpenFromFileA(core::mem::transmute(ppavi), szfile.param().abi(), core::mem::transmute(fcctype), core::mem::transmute(lparam), core::mem::transmute(mode), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AVIStreamOpenFromFileW(ppavi: *mut Option, szfile: P1, fcctype: u32, lparam: i32, mode: u32, pclsidhandler: Option<*const windows_core::GUID>) -> windows_core::Result<()> @@ -308,7 +302,7 @@ where P1: 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(), core::mem::transmute(fcctype), core::mem::transmute(lparam), core::mem::transmute(mode), core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null()))).ok() + AVIStreamOpenFromFileW(core::mem::transmute(ppavi), szfile.param().abi(), core::mem::transmute(fcctype), core::mem::transmute(lparam), core::mem::transmute(mode), core::mem::transmute(pclsidhandler.unwrap_or(core::mem::zeroed()))).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 +310,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(), core::mem::transmute(lstart), core::mem::transmute(lsamples), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbuffer), core::mem::transmute(plbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plsamples.unwrap_or(core::ptr::null_mut()))).ok() + AVIStreamRead(pavi.param().abi(), core::mem::transmute(lstart), core::mem::transmute(lsamples), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbuffer), core::mem::transmute(plbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(plsamples.unwrap_or(core::mem::zeroed()))).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 +318,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(), core::mem::transmute(fcc), core::mem::transmute(lp.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcb)).ok() + AVIStreamReadData(pavi.param().abi(), core::mem::transmute(fcc), core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +326,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(), core::mem::transmute(lpos), core::mem::transmute(lpformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbformat)).ok() + AVIStreamReadFormat(pavi.param().abi(), core::mem::transmute(lpos), core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbformat)).ok() } #[inline] pub unsafe fn AVIStreamRelease(pavi: P0) -> u32 @@ -380,7 +374,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(), core::mem::transmute(lstart), core::mem::transmute(lsamples), core::mem::transmute(lpbuffer), core::mem::transmute(cbbuffer), core::mem::transmute(dwflags), core::mem::transmute(plsampwritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plbyteswritten.unwrap_or(core::ptr::null_mut()))).ok() + AVIStreamWrite(pavi.param().abi(), core::mem::transmute(lstart), core::mem::transmute(lsamples), core::mem::transmute(lpbuffer), core::mem::transmute(cbbuffer), core::mem::transmute(dwflags), core::mem::transmute(plsampwritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(plbyteswritten.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AVIStreamWriteData(pavi: P0, fcc: u32, lp: *const core::ffi::c_void, cb: i32) -> windows_core::Result<()> @@ -391,14 +385,9 @@ where AVIStreamWriteData(pavi.param().abi(), core::mem::transmute(fcc), core::mem::transmute(lp), core::mem::transmute(cb)).ok() } #[inline] -pub unsafe fn CloseDriver(hdriver: P0, lparam1: P1, lparam2: P2) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn CloseDriver(hdriver: HDRVR, lparam1: super::super::Foundation::LPARAM, lparam2: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("winmm.dll" "system" fn CloseDriver(hdriver : HDRVR, lparam1 : super::super::Foundation:: LPARAM, lparam2 : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - CloseDriver(hdriver.param().abi(), lparam1.param().abi(), lparam2.param().abi()) + CloseDriver(core::mem::transmute(hdriver), core::mem::transmute(lparam1), core::mem::transmute(lparam2)) } #[inline] pub unsafe fn CreateEditableStream(ppseditable: *mut Option, pssource: P1) -> windows_core::Result<()> @@ -409,23 +398,15 @@ where CreateEditableStream(core::mem::transmute(ppseditable), pssource.param().abi()).ok() } #[inline] -pub unsafe fn DefDriverProc(dwdriveridentifier: usize, hdrvr: P1, umsg: u32, lparam1: P3, lparam2: P4) -> super::super::Foundation::LRESULT -where - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DefDriverProc(dwdriveridentifier: usize, hdrvr: HDRVR, umsg: u32, lparam1: super::super::Foundation::LPARAM, lparam2: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("winmm.dll" "system" fn DefDriverProc(dwdriveridentifier : usize, hdrvr : HDRVR, umsg : u32, lparam1 : super::super::Foundation:: LPARAM, lparam2 : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefDriverProc(core::mem::transmute(dwdriveridentifier), hdrvr.param().abi(), core::mem::transmute(umsg), lparam1.param().abi(), lparam2.param().abi()) + DefDriverProc(core::mem::transmute(dwdriveridentifier), core::mem::transmute(hdrvr), core::mem::transmute(umsg), core::mem::transmute(lparam1), core::mem::transmute(lparam2)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawDibBegin(hdd: isize, hdc: P1, dxdst: i32, dydst: i32, lpbi: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, dxsrc: i32, dysrc: i32, wflags: u32) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn DrawDibBegin(hdd: isize, hdc: Option, dxdst: i32, dydst: i32, lpbi: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, dxsrc: i32, dysrc: i32, wflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("msvfw32.dll" "system" fn DrawDibBegin(hdd : isize, hdc : super::super::Graphics::Gdi:: HDC, dxdst : i32, dydst : i32, lpbi : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, dxsrc : i32, dysrc : i32, wflags : u32) -> super::super::Foundation:: BOOL); - DrawDibBegin(core::mem::transmute(hdd), hdc.param().abi(), core::mem::transmute(dxdst), core::mem::transmute(dydst), core::mem::transmute(lpbi), core::mem::transmute(dxsrc), core::mem::transmute(dysrc), core::mem::transmute(wflags)) + DrawDibBegin(core::mem::transmute(hdd), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dxdst), core::mem::transmute(dydst), core::mem::transmute(lpbi), core::mem::transmute(dxsrc), core::mem::transmute(dysrc), core::mem::transmute(wflags)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -440,12 +421,9 @@ pub unsafe fn DrawDibClose(hdd: isize) -> super::super::Foundation::BOOL { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawDibDraw(hdd: isize, hdc: P1, xdst: i32, ydst: i32, dxdst: i32, dydst: i32, lpbi: Option<*const super::super::Graphics::Gdi::BITMAPINFOHEADER>, lpbits: Option<*const core::ffi::c_void>, xsrc: i32, ysrc: i32, dxsrc: i32, dysrc: i32, wflags: u32) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn DrawDibDraw(hdd: isize, hdc: super::super::Graphics::Gdi::HDC, xdst: i32, ydst: i32, dxdst: i32, dydst: i32, lpbi: Option<*const super::super::Graphics::Gdi::BITMAPINFOHEADER>, lpbits: Option<*const core::ffi::c_void>, xsrc: i32, ysrc: i32, dxsrc: i32, dysrc: i32, wflags: u32) -> super::super::Foundation::BOOL { 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(core::mem::transmute(hdd), hdc.param().abi(), core::mem::transmute(xdst), core::mem::transmute(ydst), core::mem::transmute(dxdst), core::mem::transmute(dydst), core::mem::transmute(lpbi.unwrap_or(core::ptr::null())), core::mem::transmute(lpbits.unwrap_or(core::ptr::null())), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(dxsrc), core::mem::transmute(dysrc), core::mem::transmute(wflags)) + DrawDibDraw(core::mem::transmute(hdd), core::mem::transmute(hdc), core::mem::transmute(xdst), core::mem::transmute(ydst), core::mem::transmute(dxdst), core::mem::transmute(dydst), core::mem::transmute(lpbi.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbits.unwrap_or(core::mem::zeroed())), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(dxsrc), core::mem::transmute(dysrc), core::mem::transmute(wflags)) } #[inline] pub unsafe fn DrawDibEnd(hdd: isize) -> super::super::Foundation::BOOL { @@ -477,22 +455,18 @@ pub unsafe fn DrawDibProfileDisplay(lpbi: *const super::super::Graphics::Gdi::BI } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawDibRealize(hdd: isize, hdc: P1, fbackground: P2) -> u32 +pub unsafe fn DrawDibRealize(hdd: isize, hdc: super::super::Graphics::Gdi::HDC, fbackground: P2) -> u32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msvfw32.dll" "system" fn DrawDibRealize(hdd : isize, hdc : super::super::Graphics::Gdi:: HDC, fbackground : super::super::Foundation:: BOOL) -> u32); - DrawDibRealize(core::mem::transmute(hdd), hdc.param().abi(), fbackground.param().abi()) + DrawDibRealize(core::mem::transmute(hdd), core::mem::transmute(hdc), fbackground.param().abi()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawDibSetPalette(hdd: isize, hpal: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn DrawDibSetPalette(hdd: isize, hpal: Option) -> super::super::Foundation::BOOL { windows_targets::link!("msvfw32.dll" "system" fn DrawDibSetPalette(hdd : isize, hpal : super::super::Graphics::Gdi:: HPALETTE) -> super::super::Foundation:: BOOL); - DrawDibSetPalette(core::mem::transmute(hdd), hpal.param().abi()) + DrawDibSetPalette(core::mem::transmute(hdd), core::mem::transmute(hpal.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DrawDibStart(hdd: isize, rate: u32) -> super::super::Foundation::BOOL { @@ -510,20 +484,14 @@ pub unsafe fn DrawDibTime(hdd: isize, lpddtime: *mut DRAWDIBTIME) -> super::supe DrawDibTime(core::mem::transmute(hdd), core::mem::transmute(lpddtime)) } #[inline] -pub unsafe fn DriverCallback(dwcallback: usize, dwflags: u32, hdevice: P2, dwmsg: u32, dwuser: usize, dwparam1: usize, dwparam2: usize) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn DriverCallback(dwcallback: usize, dwflags: u32, hdevice: HDRVR, dwmsg: u32, dwuser: usize, dwparam1: usize, dwparam2: usize) -> super::super::Foundation::BOOL { windows_targets::link!("winmm.dll" "system" fn DriverCallback(dwcallback : usize, dwflags : u32, hdevice : HDRVR, dwmsg : u32, dwuser : usize, dwparam1 : usize, dwparam2 : usize) -> super::super::Foundation:: BOOL); - DriverCallback(core::mem::transmute(dwcallback), core::mem::transmute(dwflags), hdevice.param().abi(), core::mem::transmute(dwmsg), core::mem::transmute(dwuser), core::mem::transmute(dwparam1), core::mem::transmute(dwparam2)) + DriverCallback(core::mem::transmute(dwcallback), core::mem::transmute(dwflags), core::mem::transmute(hdevice), core::mem::transmute(dwmsg), core::mem::transmute(dwuser), core::mem::transmute(dwparam1), core::mem::transmute(dwparam2)) } #[inline] -pub unsafe fn DrvGetModuleHandle(hdriver: P0) -> super::super::Foundation::HMODULE -where - P0: windows_core::Param, -{ +pub unsafe fn DrvGetModuleHandle(hdriver: HDRVR) -> super::super::Foundation::HMODULE { windows_targets::link!("winmm.dll" "system" fn DrvGetModuleHandle(hdriver : HDRVR) -> super::super::Foundation:: HMODULE); - DrvGetModuleHandle(hdriver.param().abi()) + DrvGetModuleHandle(core::mem::transmute(hdriver)) } #[inline] pub unsafe fn EditStreamClone(pavi: P0) -> windows_core::Result @@ -594,12 +562,9 @@ where EditStreamSetNameW(pavi.param().abi(), lpszname.param().abi()).ok() } #[inline] -pub unsafe fn GetDriverModuleHandle(hdriver: P0) -> super::super::Foundation::HMODULE -where - P0: windows_core::Param, -{ +pub unsafe fn GetDriverModuleHandle(hdriver: HDRVR) -> super::super::Foundation::HMODULE { windows_targets::link!("winmm.dll" "system" fn GetDriverModuleHandle(hdriver : HDRVR) -> super::super::Foundation:: HMODULE); - GetDriverModuleHandle(hdriver.param().abi()) + GetDriverModuleHandle(core::mem::transmute(hdriver)) } #[cfg(feature = "Win32_UI_Controls_Dialogs")] #[inline] @@ -626,45 +591,38 @@ pub unsafe fn GetSaveFileNamePreviewW(lpofn: *mut super::super::UI::Controls::Di GetSaveFileNamePreviewW(core::mem::transmute(lpofn)) } #[inline] -pub unsafe fn ICClose(hic: P0) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, -{ +pub unsafe fn ICClose(hic: HIC) -> super::super::Foundation::LRESULT { windows_targets::link!("msvfw32.dll" "system" fn ICClose(hic : HIC) -> super::super::Foundation:: LRESULT); - ICClose(hic.param().abi()) + ICClose(core::mem::transmute(hic)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ICCompress(hic: P0, 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: Option<*mut u32>, lpdwflags: Option<*mut u32>, lframenum: i32, dwframesize: u32, dwquality: u32, lpbiprev: Option<*const super::super::Graphics::Gdi::BITMAPINFOHEADER>, lpprev: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>, lpdwflags: Option<*mut u32>, lframenum: i32, dwframesize: u32, dwquality: u32, lpbiprev: Option<*const super::super::Graphics::Gdi::BITMAPINFOHEADER>, lpprev: Option<*const core::ffi::c_void>) -> u32 { 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(), + core::mem::transmute(hic), core::mem::transmute(dwflags), core::mem::transmute(lpbioutput), core::mem::transmute(lpdata), core::mem::transmute(lpbiinput), core::mem::transmute(lpbits), - core::mem::transmute(lpckid.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(lpdwflags.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpckid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpdwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(lframenum), core::mem::transmute(dwframesize), core::mem::transmute(dwquality), - core::mem::transmute(lpbiprev.unwrap_or(core::ptr::null())), - core::mem::transmute(lpprev.unwrap_or(core::ptr::null())), + core::mem::transmute(lpbiprev.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpprev.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ICCompressorChoose(hwnd: P0, uiflags: u32, pvin: Option<*const core::ffi::c_void>, lpdata: Option<*const core::ffi::c_void>, pc: *mut COMPVARS, lpsztitle: P5) -> super::super::Foundation::BOOL +pub unsafe fn ICCompressorChoose(hwnd: Option, uiflags: u32, pvin: Option<*const core::ffi::c_void>, lpdata: Option<*const core::ffi::c_void>, pc: *mut COMPVARS, lpsztitle: P5) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P5: 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(), core::mem::transmute(uiflags), core::mem::transmute(pvin.unwrap_or(core::ptr::null())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pc), lpsztitle.param().abi()) + ICCompressorChoose(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(uiflags), core::mem::transmute(pvin.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pc), lpsztitle.param().abi()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -674,67 +632,60 @@ pub unsafe fn ICCompressorFree(pc: *const COMPVARS) { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ICDecompress(hic: P0, dwflags: u32, lpbiformat: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpdata: *const core::ffi::c_void, lpbi: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpbits: *mut core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ICDecompress(hic: HIC, dwflags: u32, lpbiformat: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpdata: *const core::ffi::c_void, lpbi: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpbits: *mut core::ffi::c_void) -> u32 { windows_targets::link!("msvfw32.dll" "cdecl" fn ICDecompress(hic : HIC, dwflags : u32, lpbiformat : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpdata : *const core::ffi::c_void, lpbi : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpbits : *mut core::ffi::c_void) -> u32); - ICDecompress(hic.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpbiformat), core::mem::transmute(lpdata), core::mem::transmute(lpbi), core::mem::transmute(lpbits)) + ICDecompress(core::mem::transmute(hic), core::mem::transmute(dwflags), core::mem::transmute(lpbiformat), core::mem::transmute(lpdata), core::mem::transmute(lpbi), core::mem::transmute(lpbits)) } #[inline] -pub unsafe fn ICDraw(hic: P0, dwflags: u32, lpformat: *const core::ffi::c_void, lpdata: Option<*const core::ffi::c_void>, cbdata: u32, ltime: i32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ICDraw(hic: HIC, dwflags: u32, lpformat: *const core::ffi::c_void, lpdata: Option<*const core::ffi::c_void>, cbdata: u32, ltime: i32) -> u32 { 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(), core::mem::transmute(dwflags), core::mem::transmute(lpformat), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata), core::mem::transmute(ltime)) + ICDraw(core::mem::transmute(hic), core::mem::transmute(dwflags), core::mem::transmute(lpformat), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata), core::mem::transmute(ltime)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ICDrawBegin(hic: P0, dwflags: u32, hpal: P2, hwnd: P3, hdc: P4, xdst: i32, ydst: i32, dxdst: i32, dydst: i32, lpbi: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, xsrc: i32, ysrc: i32, dxsrc: i32, dysrc: i32, dwrate: u32, dwscale: u32) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn ICDrawBegin(hic: HIC, dwflags: u32, hpal: Option, hwnd: Option, hdc: Option, xdst: i32, ydst: i32, dxdst: i32, dydst: i32, lpbi: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, xsrc: i32, ysrc: i32, dxsrc: i32, dysrc: i32, dwrate: u32, dwscale: u32) -> u32 { windows_targets::link!("msvfw32.dll" "cdecl" fn ICDrawBegin(hic : HIC, dwflags : u32, hpal : super::super::Graphics::Gdi:: HPALETTE, hwnd : super::super::Foundation:: HWND, hdc : super::super::Graphics::Gdi:: HDC, xdst : i32, ydst : i32, dxdst : i32, dydst : i32, lpbi : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, xsrc : i32, ysrc : i32, dxsrc : i32, dysrc : i32, dwrate : u32, dwscale : u32) -> u32); - ICDrawBegin(hic.param().abi(), core::mem::transmute(dwflags), hpal.param().abi(), hwnd.param().abi(), hdc.param().abi(), core::mem::transmute(xdst), core::mem::transmute(ydst), core::mem::transmute(dxdst), core::mem::transmute(dydst), core::mem::transmute(lpbi), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(dxsrc), core::mem::transmute(dysrc), core::mem::transmute(dwrate), core::mem::transmute(dwscale)) + ICDrawBegin( + core::mem::transmute(hic), + core::mem::transmute(dwflags), + core::mem::transmute(hpal.unwrap_or(core::mem::zeroed())), + core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), + core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), + core::mem::transmute(xdst), + core::mem::transmute(ydst), + core::mem::transmute(dxdst), + core::mem::transmute(dydst), + core::mem::transmute(lpbi), + core::mem::transmute(xsrc), + core::mem::transmute(ysrc), + core::mem::transmute(dxsrc), + core::mem::transmute(dysrc), + core::mem::transmute(dwrate), + core::mem::transmute(dwscale), + ) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ICGetDisplayFormat(hic: P0, lpbiin: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpbiout: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER, bitdepth: i32, dx: i32, dy: i32) -> HIC -where - P0: windows_core::Param, -{ +pub unsafe fn ICGetDisplayFormat(hic: Option, lpbiin: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpbiout: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER, bitdepth: i32, dx: i32, dy: i32) -> HIC { windows_targets::link!("msvfw32.dll" "system" fn ICGetDisplayFormat(hic : HIC, lpbiin : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpbiout : *mut super::super::Graphics::Gdi:: BITMAPINFOHEADER, bitdepth : i32, dx : i32, dy : i32) -> HIC); - ICGetDisplayFormat(hic.param().abi(), core::mem::transmute(lpbiin), core::mem::transmute(lpbiout), core::mem::transmute(bitdepth), core::mem::transmute(dx), core::mem::transmute(dy)) + ICGetDisplayFormat(core::mem::transmute(hic.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbiin), core::mem::transmute(lpbiout), core::mem::transmute(bitdepth), core::mem::transmute(dx), core::mem::transmute(dy)) } #[inline] -pub unsafe fn ICGetInfo(hic: P0, picinfo: *mut ICINFO, cb: u32) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, -{ +pub unsafe fn ICGetInfo(hic: HIC, picinfo: *mut ICINFO, cb: u32) -> super::super::Foundation::LRESULT { windows_targets::link!("msvfw32.dll" "system" fn ICGetInfo(hic : HIC, picinfo : *mut ICINFO, cb : u32) -> super::super::Foundation:: LRESULT); - ICGetInfo(hic.param().abi(), core::mem::transmute(picinfo), core::mem::transmute(cb)) + ICGetInfo(core::mem::transmute(hic), core::mem::transmute(picinfo), core::mem::transmute(cb)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ICImageCompress(hic: P0, uiflags: u32, lpbiin: *const super::super::Graphics::Gdi::BITMAPINFO, lpbits: *const core::ffi::c_void, lpbiout: Option<*const super::super::Graphics::Gdi::BITMAPINFO>, lquality: i32, plsize: Option<*mut i32>) -> super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn ICImageCompress(hic: HIC, uiflags: u32, lpbiin: *const super::super::Graphics::Gdi::BITMAPINFO, lpbits: *const core::ffi::c_void, lpbiout: Option<*const super::super::Graphics::Gdi::BITMAPINFO>, lquality: i32, plsize: Option<*mut i32>) -> super::super::Foundation::HANDLE { 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(), core::mem::transmute(uiflags), core::mem::transmute(lpbiin), core::mem::transmute(lpbits), core::mem::transmute(lpbiout.unwrap_or(core::ptr::null())), core::mem::transmute(lquality), core::mem::transmute(plsize.unwrap_or(core::ptr::null_mut()))) + ICImageCompress(core::mem::transmute(hic), core::mem::transmute(uiflags), core::mem::transmute(lpbiin), core::mem::transmute(lpbits), core::mem::transmute(lpbiout.unwrap_or(core::mem::zeroed())), core::mem::transmute(lquality), core::mem::transmute(plsize.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ICImageDecompress(hic: P0, uiflags: u32, lpbiin: *const super::super::Graphics::Gdi::BITMAPINFO, lpbits: *const core::ffi::c_void, lpbiout: Option<*const super::super::Graphics::Gdi::BITMAPINFO>) -> super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn ICImageDecompress(hic: Option, uiflags: u32, lpbiin: *const super::super::Graphics::Gdi::BITMAPINFO, lpbits: *const core::ffi::c_void, lpbiout: Option<*const super::super::Graphics::Gdi::BITMAPINFO>) -> super::super::Foundation::HANDLE { 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(), core::mem::transmute(uiflags), core::mem::transmute(lpbiin), core::mem::transmute(lpbits), core::mem::transmute(lpbiout.unwrap_or(core::ptr::null()))) + ICImageDecompress(core::mem::transmute(hic.unwrap_or(core::mem::zeroed())), core::mem::transmute(uiflags), core::mem::transmute(lpbiin), core::mem::transmute(lpbits), core::mem::transmute(lpbiout.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ICInfo(fcctype: u32, fcchandler: u32, lpicinfo: *mut ICINFO) -> super::super::Foundation::BOOL { @@ -742,19 +693,18 @@ pub unsafe fn ICInfo(fcctype: u32, fcchandler: u32, lpicinfo: *mut ICINFO) -> su ICInfo(core::mem::transmute(fcctype), core::mem::transmute(fcchandler), core::mem::transmute(lpicinfo)) } #[inline] -pub unsafe fn ICInstall(fcctype: u32, fcchandler: u32, lparam: P2, szdesc: P3, wflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn ICInstall(fcctype: u32, fcchandler: u32, lparam: super::super::Foundation::LPARAM, szdesc: P3, wflags: u32) -> super::super::Foundation::BOOL where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msvfw32.dll" "system" fn ICInstall(fcctype : u32, fcchandler : u32, lparam : super::super::Foundation:: LPARAM, szdesc : windows_core::PCSTR, wflags : u32) -> super::super::Foundation:: BOOL); - ICInstall(core::mem::transmute(fcctype), core::mem::transmute(fcchandler), lparam.param().abi(), szdesc.param().abi(), core::mem::transmute(wflags)) + ICInstall(core::mem::transmute(fcctype), core::mem::transmute(fcchandler), core::mem::transmute(lparam), szdesc.param().abi(), core::mem::transmute(wflags)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[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(core::mem::transmute(fcctype), core::mem::transmute(fcchandler), core::mem::transmute(lpbiin), core::mem::transmute(lpbiout.unwrap_or(core::ptr::null())), core::mem::transmute(wflags)) + ICLocate(core::mem::transmute(fcctype), core::mem::transmute(fcchandler), core::mem::transmute(lpbiin), core::mem::transmute(lpbiout.unwrap_or(core::mem::zeroed())), core::mem::transmute(wflags)) } #[inline] pub unsafe fn ICOpen(fcctype: u32, fcchandler: u32, wmode: u32) -> HIC { @@ -772,18 +722,15 @@ pub unsafe fn ICRemove(fcctype: u32, fcchandler: u32, wflags: u32) -> super::sup ICRemove(core::mem::transmute(fcctype), core::mem::transmute(fcchandler), core::mem::transmute(wflags)) } #[inline] -pub unsafe fn ICSendMessage(hic: P0, msg: u32, dw1: usize, dw2: usize) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, -{ +pub unsafe fn ICSendMessage(hic: HIC, msg: u32, dw1: usize, dw2: usize) -> super::super::Foundation::LRESULT { windows_targets::link!("msvfw32.dll" "system" fn ICSendMessage(hic : HIC, msg : u32, dw1 : usize, dw2 : usize) -> super::super::Foundation:: LRESULT); - ICSendMessage(hic.param().abi(), core::mem::transmute(msg), core::mem::transmute(dw1), core::mem::transmute(dw2)) + ICSendMessage(core::mem::transmute(hic), core::mem::transmute(msg), core::mem::transmute(dw1), core::mem::transmute(dw2)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[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 { +pub unsafe fn ICSeqCompressFrame(pc: *const COMPVARS, uiflags: Option, 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(core::mem::transmute(pc), core::mem::transmute(uiflags), core::mem::transmute(lpbits), core::mem::transmute(pfkey), core::mem::transmute(plsize.unwrap_or(core::ptr::null_mut()))) + ICSeqCompressFrame(core::mem::transmute(pc), core::mem::transmute(uiflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbits), core::mem::transmute(pfkey), core::mem::transmute(plsize.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -798,24 +745,20 @@ pub unsafe fn ICSeqCompressFrameStart(pc: *const COMPVARS, lpbiin: *const super: ICSeqCompressFrameStart(core::mem::transmute(pc), core::mem::transmute(lpbiin)) } #[inline] -pub unsafe fn MCIWndCreateA(hwndparent: P0, hinstance: P1, dwstyle: u32, szfile: P3) -> super::super::Foundation::HWND +pub unsafe fn MCIWndCreateA(hwndparent: Option, hinstance: Option, dwstyle: u32, szfile: P3) -> super::super::Foundation::HWND where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msvfw32.dll" "cdecl" fn MCIWndCreateA(hwndparent : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, dwstyle : u32, szfile : windows_core::PCSTR) -> super::super::Foundation:: HWND); - MCIWndCreateA(hwndparent.param().abi(), hinstance.param().abi(), core::mem::transmute(dwstyle), szfile.param().abi()) + MCIWndCreateA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwstyle), szfile.param().abi()) } #[inline] -pub unsafe fn MCIWndCreateW(hwndparent: P0, hinstance: P1, dwstyle: u32, szfile: P3) -> super::super::Foundation::HWND +pub unsafe fn MCIWndCreateW(hwndparent: Option, hinstance: Option, dwstyle: u32, szfile: P3) -> super::super::Foundation::HWND where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msvfw32.dll" "cdecl" fn MCIWndCreateW(hwndparent : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, dwstyle : u32, szfile : windows_core::PCWSTR) -> super::super::Foundation:: HWND); - MCIWndCreateW(hwndparent.param().abi(), hinstance.param().abi(), core::mem::transmute(dwstyle), szfile.param().abi()) + MCIWndCreateW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwstyle), szfile.param().abi()) } #[inline] pub unsafe fn MCIWndRegisterClass() -> super::super::Foundation::BOOL { @@ -823,24 +766,18 @@ pub unsafe fn MCIWndRegisterClass() -> super::super::Foundation::BOOL { MCIWndRegisterClass() } #[inline] -pub unsafe fn OpenDriver(szdrivername: P0, szsectionname: P1, lparam2: P2) -> HDRVR +pub unsafe fn OpenDriver(szdrivername: P0, szsectionname: P1, lparam2: super::super::Foundation::LPARAM) -> HDRVR where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn OpenDriver(szdrivername : windows_core::PCWSTR, szsectionname : windows_core::PCWSTR, lparam2 : super::super::Foundation:: LPARAM) -> HDRVR); - OpenDriver(szdrivername.param().abi(), szsectionname.param().abi(), lparam2.param().abi()) + OpenDriver(szdrivername.param().abi(), szsectionname.param().abi(), core::mem::transmute(lparam2)) } #[inline] -pub unsafe fn SendDriverMessage(hdriver: P0, message: u32, lparam1: P2, lparam2: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SendDriverMessage(hdriver: HDRVR, message: u32, lparam1: super::super::Foundation::LPARAM, lparam2: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("winmm.dll" "system" fn SendDriverMessage(hdriver : HDRVR, message : u32, lparam1 : super::super::Foundation:: LPARAM, lparam2 : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SendDriverMessage(hdriver.param().abi(), core::mem::transmute(message), lparam1.param().abi(), lparam2.param().abi()) + SendDriverMessage(core::mem::transmute(hdriver), core::mem::transmute(message), core::mem::transmute(lparam1), core::mem::transmute(lparam2)) } #[inline] pub unsafe fn VideoForWindowsVersion() -> u32 { @@ -848,22 +785,20 @@ pub unsafe fn VideoForWindowsVersion() -> u32 { VideoForWindowsVersion() } #[inline] -pub unsafe fn capCreateCaptureWindowA(lpszwindowname: P0, dwstyle: u32, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: P6, nid: i32) -> super::super::Foundation::HWND +pub unsafe fn capCreateCaptureWindowA(lpszwindowname: P0, dwstyle: u32, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: Option, nid: i32) -> super::super::Foundation::HWND where P0: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("avicap32.dll" "system" fn capCreateCaptureWindowA(lpszwindowname : windows_core::PCSTR, dwstyle : u32, x : i32, y : i32, nwidth : i32, nheight : i32, hwndparent : super::super::Foundation:: HWND, nid : i32) -> super::super::Foundation:: HWND); - capCreateCaptureWindowA(lpszwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), hwndparent.param().abi(), core::mem::transmute(nid)) + capCreateCaptureWindowA(lpszwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(nid)) } #[inline] -pub unsafe fn capCreateCaptureWindowW(lpszwindowname: P0, dwstyle: u32, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: P6, nid: i32) -> super::super::Foundation::HWND +pub unsafe fn capCreateCaptureWindowW(lpszwindowname: P0, dwstyle: u32, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: Option, nid: i32) -> super::super::Foundation::HWND where P0: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("avicap32.dll" "system" fn capCreateCaptureWindowW(lpszwindowname : windows_core::PCWSTR, dwstyle : u32, x : i32, y : i32, nwidth : i32, nheight : i32, hwndparent : super::super::Foundation:: HWND, nid : i32) -> super::super::Foundation:: HWND); - capCreateCaptureWindowW(lpszwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), hwndparent.param().abi(), core::mem::transmute(nid)) + capCreateCaptureWindowW(lpszwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(nid)) } #[inline] pub unsafe fn capGetDriverDescriptionA(wdriverindex: u32, lpszname: &mut [u8], lpszver: &mut [u8]) -> super::super::Foundation::BOOL { @@ -911,13 +846,12 @@ pub unsafe fn joyReleaseCapture(ujoyid: u32) -> u32 { joyReleaseCapture(core::mem::transmute(ujoyid)) } #[inline] -pub unsafe fn joySetCapture(hwnd: P0, ujoyid: u32, uperiod: u32, fchanged: P3) -> u32 +pub unsafe fn joySetCapture(hwnd: super::super::Foundation::HWND, ujoyid: u32, uperiod: u32, fchanged: P3) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn joySetCapture(hwnd : super::super::Foundation:: HWND, ujoyid : u32, uperiod : u32, fchanged : super::super::Foundation:: BOOL) -> u32); - joySetCapture(hwnd.param().abi(), core::mem::transmute(ujoyid), core::mem::transmute(uperiod), fchanged.param().abi()) + joySetCapture(core::mem::transmute(hwnd), core::mem::transmute(ujoyid), core::mem::transmute(uperiod), fchanged.param().abi()) } #[inline] pub unsafe fn joySetThreshold(ujoyid: u32, uthreshold: u32) -> u32 { @@ -925,12 +859,9 @@ pub unsafe fn joySetThreshold(ujoyid: u32, uthreshold: u32) -> u32 { joySetThreshold(core::mem::transmute(ujoyid), core::mem::transmute(uthreshold)) } #[inline] -pub unsafe fn mciDriverNotify(hwndcallback: P0, wdeviceid: u32, ustatus: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn mciDriverNotify(hwndcallback: super::super::Foundation::HANDLE, wdeviceid: u32, ustatus: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winmm.dll" "system" fn mciDriverNotify(hwndcallback : super::super::Foundation:: HANDLE, wdeviceid : u32, ustatus : u32) -> super::super::Foundation:: BOOL); - mciDriverNotify(hwndcallback.param().abi(), core::mem::transmute(wdeviceid), core::mem::transmute(ustatus)) + mciDriverNotify(core::mem::transmute(hwndcallback), core::mem::transmute(wdeviceid), core::mem::transmute(ustatus)) } #[inline] pub unsafe fn mciDriverYield(wdeviceid: u32) -> u32 { @@ -1000,41 +931,38 @@ pub unsafe fn mciGetYieldProc(mciid: u32, pdwyielddata: *const u32) -> YIELDPROC mciGetYieldProc(core::mem::transmute(mciid), core::mem::transmute(pdwyielddata)) } #[inline] -pub unsafe fn mciLoadCommandResource(hinstance: P0, lpresname: P1, wtype: u32) -> u32 +pub unsafe fn mciLoadCommandResource(hinstance: super::super::Foundation::HANDLE, lpresname: P1, wtype: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mciLoadCommandResource(hinstance : super::super::Foundation:: HANDLE, lpresname : windows_core::PCWSTR, wtype : u32) -> u32); - mciLoadCommandResource(hinstance.param().abi(), lpresname.param().abi(), core::mem::transmute(wtype)) + mciLoadCommandResource(core::mem::transmute(hinstance), lpresname.param().abi(), core::mem::transmute(wtype)) } #[inline] -pub unsafe fn mciSendCommandA(mciid: u32, umsg: u32, dwparam1: usize, dwparam2: usize) -> u32 { +pub unsafe fn mciSendCommandA(mciid: u32, umsg: u32, dwparam1: Option, dwparam2: Option) -> u32 { windows_targets::link!("winmm.dll" "system" fn mciSendCommandA(mciid : u32, umsg : u32, dwparam1 : usize, dwparam2 : usize) -> u32); - mciSendCommandA(core::mem::transmute(mciid), core::mem::transmute(umsg), core::mem::transmute(dwparam1), core::mem::transmute(dwparam2)) + mciSendCommandA(core::mem::transmute(mciid), core::mem::transmute(umsg), core::mem::transmute(dwparam1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwparam2.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn mciSendCommandW(mciid: u32, umsg: u32, dwparam1: usize, dwparam2: usize) -> u32 { +pub unsafe fn mciSendCommandW(mciid: u32, umsg: u32, dwparam1: Option, dwparam2: Option) -> u32 { windows_targets::link!("winmm.dll" "system" fn mciSendCommandW(mciid : u32, umsg : u32, dwparam1 : usize, dwparam2 : usize) -> u32); - mciSendCommandW(core::mem::transmute(mciid), core::mem::transmute(umsg), core::mem::transmute(dwparam1), core::mem::transmute(dwparam2)) + mciSendCommandW(core::mem::transmute(mciid), core::mem::transmute(umsg), core::mem::transmute(dwparam1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwparam2.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn mciSendStringA(lpstrcommand: P0, lpstrreturnstring: Option<&mut [u8]>, hwndcallback: P3) -> u32 +pub unsafe fn mciSendStringA(lpstrcommand: P0, lpstrreturnstring: Option<&mut [u8]>, hwndcallback: Option) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mciSendStringA(lpstrcommand : windows_core::PCSTR, lpstrreturnstring : windows_core::PSTR, ureturnlength : u32, hwndcallback : super::super::Foundation:: HWND) -> u32); - mciSendStringA(lpstrcommand.param().abi(), core::mem::transmute(lpstrreturnstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpstrreturnstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), hwndcallback.param().abi()) + mciSendStringA(lpstrcommand.param().abi(), core::mem::transmute(lpstrreturnstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpstrreturnstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(hwndcallback.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn mciSendStringW(lpstrcommand: P0, lpstrreturnstring: Option<&mut [u16]>, hwndcallback: P3) -> u32 +pub unsafe fn mciSendStringW(lpstrcommand: P0, lpstrreturnstring: Option<&mut [u16]>, hwndcallback: Option) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mciSendStringW(lpstrcommand : windows_core::PCWSTR, lpstrreturnstring : windows_core::PWSTR, ureturnlength : u32, hwndcallback : super::super::Foundation:: HWND) -> u32); - mciSendStringW(lpstrcommand.param().abi(), core::mem::transmute(lpstrreturnstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpstrreturnstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), hwndcallback.param().abi()) + mciSendStringW(lpstrcommand.param().abi(), core::mem::transmute(lpstrreturnstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpstrreturnstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(hwndcallback.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn mciSetDriverData(wdeviceid: u32, dwdata: usize) -> super::super::Foundation::BOOL { @@ -1042,18 +970,17 @@ pub unsafe fn mciSetDriverData(wdeviceid: u32, dwdata: usize) -> super::super::F mciSetDriverData(core::mem::transmute(wdeviceid), core::mem::transmute(dwdata)) } #[inline] -pub unsafe fn mciSetYieldProc(mciid: u32, fpyieldproc: YIELDPROC, dwyielddata: u32) -> super::super::Foundation::BOOL { +pub unsafe fn mciSetYieldProc(mciid: u32, fpyieldproc: Option, dwyielddata: u32) -> super::super::Foundation::BOOL { windows_targets::link!("winmm.dll" "system" fn mciSetYieldProc(mciid : u32, fpyieldproc : YIELDPROC, dwyielddata : u32) -> super::super::Foundation:: BOOL); - mciSetYieldProc(core::mem::transmute(mciid), core::mem::transmute(fpyieldproc), core::mem::transmute(dwyielddata)) + mciSetYieldProc(core::mem::transmute(mciid), core::mem::transmute(fpyieldproc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwyielddata)) } #[inline] -pub unsafe fn mmDrvInstall(hdriver: P0, wszdrventry: P1, drvmessage: DRIVERMSGPROC, wflags: u32) -> u32 +pub unsafe fn mmDrvInstall(hdriver: HDRVR, wszdrventry: P1, drvmessage: DRIVERMSGPROC, wflags: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mmDrvInstall(hdriver : HDRVR, wszdrventry : windows_core::PCWSTR, drvmessage : DRIVERMSGPROC, wflags : u32) -> u32); - mmDrvInstall(hdriver.param().abi(), wszdrventry.param().abi(), core::mem::transmute(drvmessage), core::mem::transmute(wflags)) + mmDrvInstall(core::mem::transmute(hdriver), wszdrventry.param().abi(), core::mem::transmute(drvmessage), core::mem::transmute(wflags)) } #[inline] pub unsafe fn mmGetCurrentTask() -> u32 { @@ -1081,88 +1008,64 @@ pub unsafe fn mmTaskYield() { mmTaskYield() } #[inline] -pub unsafe fn mmioAdvance(hmmio: P0, pmmioinfo: Option<*const MMIOINFO>, fuadvance: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioAdvance(hmmio: HMMIO, pmmioinfo: Option<*const MMIOINFO>, fuadvance: u32) -> u32 { 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(core::ptr::null())), core::mem::transmute(fuadvance)) + mmioAdvance(core::mem::transmute(hmmio), core::mem::transmute(pmmioinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(fuadvance)) } #[inline] -pub unsafe fn mmioAscend(hmmio: P0, pmmcki: *const MMCKINFO, fuascend: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioAscend(hmmio: HMMIO, pmmcki: *const MMCKINFO, fuascend: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmioAscend(hmmio : HMMIO, pmmcki : *const MMCKINFO, fuascend : u32) -> u32); - mmioAscend(hmmio.param().abi(), core::mem::transmute(pmmcki), core::mem::transmute(fuascend)) + mmioAscend(core::mem::transmute(hmmio), core::mem::transmute(pmmcki), core::mem::transmute(fuascend)) } #[inline] -pub unsafe fn mmioClose(hmmio: P0, fuclose: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioClose(hmmio: HMMIO, fuclose: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmioClose(hmmio : HMMIO, fuclose : u32) -> u32); - mmioClose(hmmio.param().abi(), core::mem::transmute(fuclose)) + mmioClose(core::mem::transmute(hmmio), core::mem::transmute(fuclose)) } #[inline] -pub unsafe fn mmioCreateChunk(hmmio: P0, pmmcki: *const MMCKINFO, fucreate: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioCreateChunk(hmmio: HMMIO, pmmcki: *const MMCKINFO, fucreate: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmioCreateChunk(hmmio : HMMIO, pmmcki : *const MMCKINFO, fucreate : u32) -> u32); - mmioCreateChunk(hmmio.param().abi(), core::mem::transmute(pmmcki), core::mem::transmute(fucreate)) + mmioCreateChunk(core::mem::transmute(hmmio), core::mem::transmute(pmmcki), core::mem::transmute(fucreate)) } #[inline] -pub unsafe fn mmioDescend(hmmio: P0, pmmcki: *mut MMCKINFO, pmmckiparent: Option<*const MMCKINFO>, fudescend: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioDescend(hmmio: HMMIO, pmmcki: *mut MMCKINFO, pmmckiparent: Option<*const MMCKINFO>, fudescend: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmioDescend(hmmio : HMMIO, pmmcki : *mut MMCKINFO, pmmckiparent : *const MMCKINFO, fudescend : u32) -> u32); - mmioDescend(hmmio.param().abi(), core::mem::transmute(pmmcki), core::mem::transmute(pmmckiparent.unwrap_or(core::ptr::null())), core::mem::transmute(fudescend)) + mmioDescend(core::mem::transmute(hmmio), core::mem::transmute(pmmcki), core::mem::transmute(pmmckiparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(fudescend)) } #[inline] -pub unsafe fn mmioFlush(hmmio: P0, fuflush: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioFlush(hmmio: HMMIO, fuflush: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmioFlush(hmmio : HMMIO, fuflush : u32) -> u32); - mmioFlush(hmmio.param().abi(), core::mem::transmute(fuflush)) + mmioFlush(core::mem::transmute(hmmio), core::mem::transmute(fuflush)) } #[inline] -pub unsafe fn mmioGetInfo(hmmio: P0, pmmioinfo: *mut MMIOINFO, fuinfo: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioGetInfo(hmmio: HMMIO, pmmioinfo: *mut MMIOINFO, fuinfo: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmioGetInfo(hmmio : HMMIO, pmmioinfo : *mut MMIOINFO, fuinfo : u32) -> u32); - mmioGetInfo(hmmio.param().abi(), core::mem::transmute(pmmioinfo), core::mem::transmute(fuinfo)) + mmioGetInfo(core::mem::transmute(hmmio), core::mem::transmute(pmmioinfo), core::mem::transmute(fuinfo)) } #[inline] -pub unsafe fn mmioInstallIOProcA(fccioproc: u32, pioproc: LPMMIOPROC, dwflags: u32) -> LPMMIOPROC { +pub unsafe fn mmioInstallIOProcA(fccioproc: u32, pioproc: Option, dwflags: u32) -> LPMMIOPROC { windows_targets::link!("winmm.dll" "system" fn mmioInstallIOProcA(fccioproc : u32, pioproc : LPMMIOPROC, dwflags : u32) -> LPMMIOPROC); - mmioInstallIOProcA(core::mem::transmute(fccioproc), core::mem::transmute(pioproc), core::mem::transmute(dwflags)) + mmioInstallIOProcA(core::mem::transmute(fccioproc), core::mem::transmute(pioproc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn mmioInstallIOProcW(fccioproc: u32, pioproc: LPMMIOPROC, dwflags: u32) -> LPMMIOPROC { +pub unsafe fn mmioInstallIOProcW(fccioproc: u32, pioproc: Option, dwflags: u32) -> LPMMIOPROC { windows_targets::link!("winmm.dll" "system" fn mmioInstallIOProcW(fccioproc : u32, pioproc : LPMMIOPROC, dwflags : u32) -> LPMMIOPROC); - mmioInstallIOProcW(core::mem::transmute(fccioproc), core::mem::transmute(pioproc), core::mem::transmute(dwflags)) + mmioInstallIOProcW(core::mem::transmute(fccioproc), core::mem::transmute(pioproc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[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(core::ptr::null_mut())), core::mem::transmute(fdwopen)) + mmioOpenA(core::mem::transmute(pszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pmmioinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(fdwopen)) + mmioOpenW(core::mem::transmute(pszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pmmioinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwopen)) } #[inline] -pub unsafe fn mmioRead(hmmio: P0, pch: &mut [u8]) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioRead(hmmio: HMMIO, pch: &mut [u8]) -> i32 { windows_targets::link!("winmm.dll" "system" fn mmioRead(hmmio : HMMIO, pch : *mut i8, cch : i32) -> i32); - mmioRead(hmmio.param().abi(), core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()) + mmioRead(core::mem::transmute(hmmio), core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()) } #[inline] pub unsafe fn mmioRenameA(pszfilename: P0, psznewfilename: P1, pmmioinfo: Option<*const MMIOINFO>, fdwrename: u32) -> u32 @@ -1171,7 +1074,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(core::ptr::null())), core::mem::transmute(fdwrename)) + mmioRenameA(pszfilename.param().abi(), psznewfilename.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwrename)) } #[inline] pub unsafe fn mmioRenameW(pszfilename: P0, psznewfilename: P1, pmmioinfo: Option<*const MMIOINFO>, fdwrename: u32) -> u32 @@ -1180,41 +1083,27 @@ 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(core::ptr::null())), core::mem::transmute(fdwrename)) + mmioRenameW(pszfilename.param().abi(), psznewfilename.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(fdwrename)) } #[inline] -pub unsafe fn mmioSeek(hmmio: P0, loffset: i32, iorigin: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioSeek(hmmio: HMMIO, loffset: i32, iorigin: i32) -> i32 { windows_targets::link!("winmm.dll" "system" fn mmioSeek(hmmio : HMMIO, loffset : i32, iorigin : i32) -> i32); - mmioSeek(hmmio.param().abi(), core::mem::transmute(loffset), core::mem::transmute(iorigin)) + mmioSeek(core::mem::transmute(hmmio), core::mem::transmute(loffset), core::mem::transmute(iorigin)) } #[inline] -pub unsafe fn mmioSendMessage(hmmio: P0, umsg: u32, lparam1: P2, lparam2: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn mmioSendMessage(hmmio: HMMIO, umsg: u32, lparam1: Option, lparam2: Option) -> super::super::Foundation::LRESULT { windows_targets::link!("winmm.dll" "system" fn mmioSendMessage(hmmio : HMMIO, umsg : u32, lparam1 : super::super::Foundation:: LPARAM, lparam2 : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - mmioSendMessage(hmmio.param().abi(), core::mem::transmute(umsg), lparam1.param().abi(), lparam2.param().abi()) + mmioSendMessage(core::mem::transmute(hmmio), core::mem::transmute(umsg), core::mem::transmute(lparam1.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam2.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn mmioSetBuffer(hmmio: P0, pchbuffer: Option<&mut [u8]>, fubuffer: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioSetBuffer(hmmio: HMMIO, pchbuffer: Option<&mut [u8]>, fubuffer: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmioSetBuffer(hmmio : HMMIO, pchbuffer : windows_core::PSTR, cchbuffer : i32, fubuffer : u32) -> u32); - mmioSetBuffer(hmmio.param().abi(), core::mem::transmute(pchbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pchbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(fubuffer)) + mmioSetBuffer(core::mem::transmute(hmmio), core::mem::transmute(pchbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pchbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(fubuffer)) } #[inline] -pub unsafe fn mmioSetInfo(hmmio: P0, pmmioinfo: *const MMIOINFO, fuinfo: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioSetInfo(hmmio: HMMIO, pmmioinfo: *const MMIOINFO, fuinfo: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mmioSetInfo(hmmio : HMMIO, pmmioinfo : *const MMIOINFO, fuinfo : u32) -> u32); - mmioSetInfo(hmmio.param().abi(), core::mem::transmute(pmmioinfo), core::mem::transmute(fuinfo)) + mmioSetInfo(core::mem::transmute(hmmio), core::mem::transmute(pmmioinfo), core::mem::transmute(fuinfo)) } #[inline] pub unsafe fn mmioStringToFOURCCA(sz: P0, uflags: u32) -> u32 @@ -1233,12 +1122,9 @@ where mmioStringToFOURCCW(sz.param().abi(), core::mem::transmute(uflags)) } #[inline] -pub unsafe fn mmioWrite(hmmio: P0, pch: &[u8]) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn mmioWrite(hmmio: HMMIO, pch: &[u8]) -> i32 { windows_targets::link!("winmm.dll" "system" fn mmioWrite(hmmio : HMMIO, pch : windows_core::PCSTR, cch : i32) -> i32); - mmioWrite(hmmio.param().abi(), core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()) + mmioWrite(core::mem::transmute(hmmio), core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()) } #[inline] pub unsafe fn sndOpenSound(eventname: P0, appname: P1, flags: i32, filehandle: *mut super::super::Foundation::HANDLE) -> i32 @@ -2527,12 +2413,8 @@ impl windows_core::RuntimeName for IAVIPersistFile {} windows_core::imp::define_interface!(IAVIStream, IAVIStream_Vtbl, 0x00020021_0000_0000_c000_000000000046); windows_core::imp::interface_hierarchy!(IAVIStream, windows_core::IUnknown); impl IAVIStream { - pub unsafe fn Create(&self, lparam1: P0, lparam2: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), lparam1.param().abi(), lparam2.param().abi()).ok() + pub unsafe fn Create(&self, lparam1: super::super::Foundation::LPARAM, lparam2: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), core::mem::transmute(lparam1), core::mem::transmute(lparam2)).ok() } pub unsafe fn Info(&self, psi: *mut AVISTREAMINFOW, lsize: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Info)(windows_core::Interface::as_raw(self), core::mem::transmute(psi), core::mem::transmute(lsize)).ok() @@ -2541,22 +2423,22 @@ impl IAVIStream { (windows_core::Interface::vtable(self).FindSample)(windows_core::Interface::as_raw(self), core::mem::transmute(lpos), core::mem::transmute(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), core::mem::transmute(lpos), core::mem::transmute(lpformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbformat)).ok() + (windows_core::Interface::vtable(self).ReadFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(lpos), core::mem::transmute(lpformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(lpos), core::mem::transmute(lpformat), core::mem::transmute(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), core::mem::transmute(lstart), core::mem::transmute(lsamples), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbuffer), core::mem::transmute(plbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plsamples.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(lstart), core::mem::transmute(lsamples), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbuffer), core::mem::transmute(plbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(plsamples.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lstart), core::mem::transmute(lsamples), core::mem::transmute(lpbuffer), core::mem::transmute(cbbuffer), core::mem::transmute(dwflags), core::mem::transmute(plsampwritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plbyteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), core::mem::transmute(lstart), core::mem::transmute(lsamples), core::mem::transmute(lpbuffer), core::mem::transmute(cbbuffer), core::mem::transmute(dwflags), core::mem::transmute(plsampwritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(plbyteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lstart), core::mem::transmute(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), core::mem::transmute(fcc), core::mem::transmute(lp.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcb)).ok() + (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), core::mem::transmute(fcc), core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(fcc), core::mem::transmute(lp), core::mem::transmute(cb)).ok() @@ -3160,7 +3042,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), core::mem::transmute(lpbi), core::mem::transmute(lpbits.unwrap_or(core::ptr::null())), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(dx), core::mem::transmute(dy)).ok() + (windows_core::Interface::vtable(self).SetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbi), core::mem::transmute(lpbits.unwrap_or(core::mem::zeroed())), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(dx), core::mem::transmute(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 c205e85cc5..8918055b7f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs @@ -34,15 +34,14 @@ impl IPhotoAcquire { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreatePhotoSource)(windows_core::Interface::as_raw(self), pszdevice.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Acquire(&self, pphotoacquiresource: P0, fshowprogress: P1, hwndparent: P2, pszapplicationname: P3, pphotoacquireprogresscb: P4) -> windows_core::Result<()> + pub unsafe fn Acquire(&self, pphotoacquiresource: P0, fshowprogress: P1, hwndparent: Option, pszapplicationname: P3, pphotoacquireprogresscb: P4) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self), pphotoacquiresource.param().abi(), fshowprogress.param().abi(), hwndparent.param().abi(), pszapplicationname.param().abi(), pphotoacquireprogresscb.param().abi()).ok() + (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self), pphotoacquiresource.param().abi(), fshowprogress.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pszapplicationname.param().abi(), pphotoacquireprogresscb.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumResults(&self) -> windows_core::Result { @@ -121,11 +120,8 @@ impl IPhotoAcquireDeviceSelectionDialog { { (windows_core::Interface::vtable(self).SetSubmitButtonText)(windows_core::Interface::as_raw(self), pszsubmitbuttontext.param().abi()).ok() } - pub unsafe fn DoModal(&self, hwndparent: P0, dwdeviceflags: u32, pbstrdeviceid: Option<*mut windows_core::BSTR>, pndevicetype: Option<*mut DEVICE_SELECTION_DEVICE_TYPE>) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(dwdeviceflags), core::mem::transmute(pbstrdeviceid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pndevicetype.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn DoModal(&self, hwndparent: super::super::Foundation::HWND, dwdeviceflags: u32, pbstrdeviceid: Option<*mut windows_core::BSTR>, pndevicetype: Option<*mut DEVICE_SELECTION_DEVICE_TYPE>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(dwdeviceflags), core::mem::transmute(pbstrdeviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pndevicetype.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -354,21 +350,15 @@ impl IPhotoAcquireOptionsDialog { { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pszregistryroot.param().abi()).ok() } - pub unsafe fn Create(&self, hwndparent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn Create(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), &mut result__).map(|| result__) } pub unsafe fn Destroy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn DoModal(&self, hwndparent: P0, ppnreturncode: Option<*mut isize>) -> windows_core::Result<()> - 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(core::ptr::null_mut()))).ok() + pub unsafe fn DoModal(&self, hwndparent: super::super::Foundation::HWND, ppnreturncode: Option<*mut isize>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(ppnreturncode.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SaveData(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveData)(windows_core::Interface::as_raw(self)).ok() @@ -455,11 +445,8 @@ impl IPhotoAcquirePlugin { pub unsafe fn TransferComplete(&self, hr: windows_core::HRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TransferComplete)(windows_core::Interface::as_raw(self), core::mem::transmute(hr)).ok() } - pub unsafe fn DisplayConfigureDialog(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DisplayConfigureDialog)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn DisplayConfigureDialog(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DisplayConfigureDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } } #[repr(C)] @@ -611,7 +598,7 @@ impl IPhotoAcquireProgressCB { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), core::mem::transmute(riidtype), punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), core::mem::transmute(riidtype), punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -1002,14 +989,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), core::mem::transmute(nsize), core::mem::transmute(phlargeicon.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phsmallicon.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDeviceIcons)(windows_core::Interface::as_raw(self), core::mem::transmute(nsize), core::mem::transmute(phlargeicon.unwrap_or(core::mem::zeroed())), core::mem::transmute(phsmallicon.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetItemCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1143,11 +1130,8 @@ impl windows_core::RuntimeName for IPhotoAcquireSource {} windows_core::imp::define_interface!(IPhotoProgressActionCB, IPhotoProgressActionCB_Vtbl, 0x00f242d0_b206_4e7d_b4c1_4755bcbb9c9f); windows_core::imp::interface_hierarchy!(IPhotoProgressActionCB, windows_core::IUnknown); impl IPhotoProgressActionCB { - pub unsafe fn DoAction(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DoAction)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn DoAction(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DoAction)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } } #[repr(C)] @@ -1174,11 +1158,8 @@ impl windows_core::RuntimeName for IPhotoProgressActionCB {} windows_core::imp::define_interface!(IPhotoProgressDialog, IPhotoProgressDialog_Vtbl, 0x00f246f9_0750_4f08_9381_2cd8e906a4ae); windows_core::imp::interface_hierarchy!(IPhotoProgressDialog, windows_core::IUnknown); impl IPhotoProgressDialog { - pub unsafe fn Create(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn Create(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Create)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } pub unsafe fn GetWindow(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1228,12 +1209,8 @@ impl IPhotoProgressDialog { (windows_core::Interface::vtable(self).SetCaption)(windows_core::Interface::as_raw(self), psztitle.param().abi()).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] - pub unsafe fn SetImage(&self, nimagetype: PROGRESS_DIALOG_IMAGE_TYPE, hicon: P1, hbitmap: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetImage)(windows_core::Interface::as_raw(self), core::mem::transmute(nimagetype), hicon.param().abi(), hbitmap.param().abi()).ok() + pub unsafe fn SetImage(&self, nimagetype: PROGRESS_DIALOG_IMAGE_TYPE, hicon: Option, hbitmap: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetImage)(windows_core::Interface::as_raw(self), core::mem::transmute(nimagetype), core::mem::transmute(hicon.unwrap_or(core::mem::zeroed())), core::mem::transmute(hbitmap.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetPercentComplete(&self, npercent: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetPercentComplete)(windows_core::Interface::as_raw(self), core::mem::transmute(npercent)).ok() @@ -1271,7 +1248,7 @@ impl IPhotoProgressDialog { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), core::mem::transmute(riidtype), punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), core::mem::transmute(riidtype), punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -1485,7 +1462,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), core::mem::transmute(nsize), core::mem::transmute(phbitmap.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phicon.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImage)(windows_core::Interface::as_raw(self), core::mem::transmute(nsize), core::mem::transmute(phbitmap.unwrap_or(core::mem::zeroed())), core::mem::transmute(phicon.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] 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 232059c2a7..318ee00f4c 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs @@ -497,7 +497,7 @@ windows_core::imp::define_interface!(IEnumSpObjectTokens, IEnumSpObjectTokens_Vt 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), core::mem::transmute(celt), core::mem::transmute(pelt), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), core::mem::transmute(celt), core::mem::transmute(pelt), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -1428,44 +1428,30 @@ impl ISpGrammarBuilder { { (windows_core::Interface::vtable(self).GetRule)(windows_core::Interface::as_raw(self), pszrulename.param().abi(), core::mem::transmute(dwruleid), core::mem::transmute(dwattributes), fcreateifnotexist.param().abi(), core::mem::transmute(phinitialstate)).ok() } - pub unsafe fn ClearRule(&self, hstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ClearRule)(windows_core::Interface::as_raw(self), hstate.param().abi()).ok() + pub unsafe fn ClearRule(&self, hstate: SPSTATEHANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ClearRule)(windows_core::Interface::as_raw(self), core::mem::transmute(hstate)).ok() } - pub unsafe fn CreateNewState(&self, hstate: P0, phstate: *mut SPSTATEHANDLE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateNewState)(windows_core::Interface::as_raw(self), hstate.param().abi(), core::mem::transmute(phstate)).ok() + pub unsafe fn CreateNewState(&self, hstate: SPSTATEHANDLE, phstate: *mut SPSTATEHANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateNewState)(windows_core::Interface::as_raw(self), core::mem::transmute(hstate), core::mem::transmute(phstate)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn AddWordTransition(&self, hfromstate: P0, htostate: P1, psz: P2, pszseparators: P3, ewordtype: SPGRAMMARWORDTYPE, weight: f32, ppropinfo: *const SPPROPERTYINFO) -> windows_core::Result<()> + pub unsafe fn AddWordTransition(&self, hfromstate: SPSTATEHANDLE, htostate: SPSTATEHANDLE, psz: P2, pszseparators: P3, ewordtype: SPGRAMMARWORDTYPE, weight: f32, ppropinfo: *const SPPROPERTYINFO) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).AddWordTransition)(windows_core::Interface::as_raw(self), hfromstate.param().abi(), htostate.param().abi(), psz.param().abi(), pszseparators.param().abi(), core::mem::transmute(ewordtype), core::mem::transmute(weight), core::mem::transmute(ppropinfo)).ok() + (windows_core::Interface::vtable(self).AddWordTransition)(windows_core::Interface::as_raw(self), core::mem::transmute(hfromstate), core::mem::transmute(htostate), psz.param().abi(), pszseparators.param().abi(), core::mem::transmute(ewordtype), core::mem::transmute(weight), core::mem::transmute(ppropinfo)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn AddRuleTransition(&self, hfromstate: P0, htostate: P1, hrule: P2, weight: f32, ppropinfo: *const SPPROPERTYINFO) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddRuleTransition)(windows_core::Interface::as_raw(self), hfromstate.param().abi(), htostate.param().abi(), hrule.param().abi(), core::mem::transmute(weight), core::mem::transmute(ppropinfo)).ok() + pub unsafe fn AddRuleTransition(&self, hfromstate: SPSTATEHANDLE, htostate: SPSTATEHANDLE, hrule: SPSTATEHANDLE, weight: f32, ppropinfo: *const SPPROPERTYINFO) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddRuleTransition)(windows_core::Interface::as_raw(self), core::mem::transmute(hfromstate), core::mem::transmute(htostate), core::mem::transmute(hrule), core::mem::transmute(weight), core::mem::transmute(ppropinfo)).ok() } - pub unsafe fn AddResource(&self, hrulestate: P0, pszresourcename: P1, pszresourcevalue: P2) -> windows_core::Result<()> + pub unsafe fn AddResource(&self, hrulestate: SPSTATEHANDLE, pszresourcename: P1, pszresourcevalue: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddResource)(windows_core::Interface::as_raw(self), hrulestate.param().abi(), pszresourcename.param().abi(), pszresourcevalue.param().abi()).ok() + (windows_core::Interface::vtable(self).AddResource)(windows_core::Interface::as_raw(self), core::mem::transmute(hrulestate), pszresourcename.param().abi(), pszresourcevalue.param().abi()).ok() } pub unsafe fn Commit(&self, dwreserved: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), core::mem::transmute(dwreserved)).ok() @@ -1556,13 +1542,11 @@ impl windows_core::RuntimeName for ISpGrammarBuilder {} windows_core::imp::define_interface!(ISpGrammarBuilder2, ISpGrammarBuilder2_Vtbl, 0x8ab10026_20cc_4b20_8c22_a49c9ba78f60); windows_core::imp::interface_hierarchy!(ISpGrammarBuilder2, windows_core::IUnknown); impl ISpGrammarBuilder2 { - pub unsafe fn AddTextSubset(&self, hfromstate: P0, htostate: P1, psz: P2, ematchmode: SPMATCHINGMODE) -> windows_core::Result<()> + pub unsafe fn AddTextSubset(&self, hfromstate: SPSTATEHANDLE, htostate: SPSTATEHANDLE, psz: P2, ematchmode: SPMATCHINGMODE) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddTextSubset)(windows_core::Interface::as_raw(self), hfromstate.param().abi(), htostate.param().abi(), psz.param().abi(), core::mem::transmute(ematchmode)).ok() + (windows_core::Interface::vtable(self).AddTextSubset)(windows_core::Interface::as_raw(self), core::mem::transmute(hfromstate), core::mem::transmute(htostate), psz.param().abi(), core::mem::transmute(ematchmode)).ok() } pub unsafe fn SetPhoneticAlphabet(&self, phoneticalphabet: PHONETICALPHABET) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetPhoneticAlphabet)(windows_core::Interface::as_raw(self), core::mem::transmute(phoneticalphabet)).ok() @@ -1701,13 +1685,13 @@ impl ISpLexicon { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddPronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), core::mem::transmute(langid), core::mem::transmute(epartofspeech), core::mem::transmute(pszpronunciation.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AddPronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), core::mem::transmute(langid), core::mem::transmute(epartofspeech), core::mem::transmute(pszpronunciation.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(langid), core::mem::transmute(epartofspeech), core::mem::transmute(pszpronunciation.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RemovePronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), core::mem::transmute(langid), core::mem::transmute(epartofspeech), core::mem::transmute(pszpronunciation.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetGeneration(&self, pdwgeneration: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetGeneration)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwgeneration)).ok() @@ -1716,7 +1700,7 @@ impl ISpLexicon { (windows_core::Interface::vtable(self).GetGenerationChange)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), core::mem::transmute(pdwgeneration), core::mem::transmute(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), core::mem::transmute(dwflags), core::mem::transmute(pdwgeneration), core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pwordlist)).ok() + (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), core::mem::transmute(pdwgeneration), core::mem::transmute(pdwcookie.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwordlist)).ok() } } #[repr(C)] @@ -1865,12 +1849,8 @@ impl ISpMMSysAudio_Vtbl { impl windows_core::RuntimeName for ISpMMSysAudio {} windows_core::imp::define_interface!(ISpNotifyCallback, ISpNotifyCallback_Vtbl); impl ISpNotifyCallback { - pub unsafe fn NotifyCallback(&self, wparam: P0, lparam: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).NotifyCallback)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn NotifyCallback(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).NotifyCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } } #[repr(C)] @@ -1938,28 +1918,17 @@ impl ISpNotifySource { { (windows_core::Interface::vtable(self).SetNotifySink)(windows_core::Interface::as_raw(self), pnotifysink.param().abi()).ok() } - pub unsafe fn SetNotifyWindowMessage(&self, hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNotifyWindowMessage)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn SetNotifyWindowMessage(&self, hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNotifyWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn SetNotifyCallbackFunction(&self, pfncallback: *mut SPNOTIFYCALLBACK, wparam: P1, lparam: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNotifyCallbackFunction)(windows_core::Interface::as_raw(self), core::mem::transmute(pfncallback), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn SetNotifyCallbackFunction(&self, pfncallback: *mut SPNOTIFYCALLBACK, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNotifyCallbackFunction)(windows_core::Interface::as_raw(self), core::mem::transmute(pfncallback), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn SetNotifyCallbackInterface(&self, pspcallback: P0, wparam: P1, lparam: P2) -> windows_core::Result<()> + pub unsafe fn SetNotifyCallbackInterface(&self, pspcallback: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetNotifyCallbackInterface)(windows_core::Interface::as_raw(self), pspcallback.param().abi(), wparam.param().abi(), lparam.param().abi()).ok() + (windows_core::Interface::vtable(self).SetNotifyCallbackInterface)(windows_core::Interface::as_raw(self), pspcallback.param().abi(), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } pub unsafe fn SetNotifyWin32Event(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetNotifyWin32Event)(windows_core::Interface::as_raw(self)).ok() @@ -2046,35 +2015,23 @@ impl core::ops::Deref for ISpNotifyTranslator { } windows_core::imp::interface_hierarchy!(ISpNotifyTranslator, windows_core::IUnknown, ISpNotifySink); impl ISpNotifyTranslator { - pub unsafe fn InitWindowMessage(&self, hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitWindowMessage)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn InitWindowMessage(&self, hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn InitCallback(&self, pfncallback: *mut SPNOTIFYCALLBACK, wparam: P1, lparam: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(pfncallback), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn InitCallback(&self, pfncallback: *mut SPNOTIFYCALLBACK, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(pfncallback), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn InitSpNotifyCallback(&self, pspcallback: P0, wparam: P1, lparam: P2) -> windows_core::Result<()> + pub unsafe fn InitSpNotifyCallback(&self, pspcallback: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).InitSpNotifyCallback)(windows_core::Interface::as_raw(self), pspcallback.param().abi(), wparam.param().abi(), lparam.param().abi()).ok() + (windows_core::Interface::vtable(self).InitSpNotifyCallback)(windows_core::Interface::as_raw(self), pspcallback.param().abi(), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn InitWin32Event(&self, hevent: P0, fclosehandleonrelease: P1) -> windows_core::Result<()> + pub unsafe fn InitWin32Event(&self, hevent: super::super::Foundation::HANDLE, fclosehandleonrelease: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InitWin32Event)(windows_core::Interface::as_raw(self), hevent.param().abi(), fclosehandleonrelease.param().abi()).ok() + (windows_core::Interface::vtable(self).InitWin32Event)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), fclosehandleonrelease.param().abi()).ok() } pub unsafe fn Wait(&self, dwmilliseconds: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Wait)(windows_core::Interface::as_raw(self), core::mem::transmute(dwmilliseconds)).ok() @@ -2189,7 +2146,7 @@ impl ISpObjectToken { (windows_core::Interface::vtable(self).RemoveStorageFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsidcaller.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn IsUISupported(&self, psztypeofui: P0, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: P3, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where @@ -2198,14 +2155,13 @@ impl ISpObjectToken { { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata), punkobject.param().abi(), core::mem::transmute(pfsupported)).ok() } - pub unsafe fn DisplayUI(&self, hwndparent: P0, psztitle: P1, psztypeofui: P2, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: P5) -> windows_core::Result<()> + pub unsafe fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: P1, psztypeofui: P2, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: P5) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata), punkobject.param().abi()).ok() + (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata), punkobject.param().abi()).ok() } pub unsafe fn MatchesAttributes(&self, pszattributes: P0, pfmatches: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where @@ -2835,7 +2791,7 @@ impl ISpPhrase { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(ulstart), core::mem::transmute(ulcount), fusetextreplacements.param().abi(), core::mem::transmute(ppszcomemtext), core::mem::transmute(pbdisplayattributes.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(ulstart), core::mem::transmute(ulcount), fusetextreplacements.param().abi(), core::mem::transmute(ppszcomemtext), core::mem::transmute(pbdisplayattributes.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Discard(&self, dwvaluetypes: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Discard)(windows_core::Interface::as_raw(self), core::mem::transmute(dwvaluetypes)).ok() @@ -3040,20 +2996,14 @@ impl ISpPhraseBuilder { pub unsafe fn AddElements(&self, celements: u32, pelement: *const SPPHRASEELEMENT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddElements)(windows_core::Interface::as_raw(self), core::mem::transmute(celements), core::mem::transmute(pelement)).ok() } - pub unsafe fn AddRules(&self, hparent: P0, prule: *const SPPHRASERULE) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn AddRules(&self, hparent: SPPHRASERULEHANDLE, prule: *const SPPHRASERULE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddRules)(windows_core::Interface::as_raw(self), hparent.param().abi(), core::mem::transmute(prule), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AddRules)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent), core::mem::transmute(prule), &mut result__).map(|| result__) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn AddProperties(&self, hparent: P0, pproperty: *const SPPHRASEPROPERTY) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn AddProperties(&self, hparent: SPPHRASEPROPERTYHANDLE, pproperty: *const SPPHRASEPROPERTY) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddProperties)(windows_core::Interface::as_raw(self), hparent.param().abi(), core::mem::transmute(pproperty), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AddProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent), core::mem::transmute(pproperty), &mut result__).map(|| result__) } pub unsafe fn AddReplacements(&self, creplacements: u32, preplacements: *const SPPHRASEREPLACEMENT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddReplacements)(windows_core::Interface::as_raw(self), core::mem::transmute(creplacements), core::mem::transmute(preplacements)).ok() @@ -3299,11 +3249,8 @@ impl ISpRecoContext { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DeserializeResult)(windows_core::Interface::as_raw(self), core::mem::transmute(pserializedresult), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Bookmark(&self, options: SPBOOKMARKOPTIONS, ullstreamposition: u64, lparamevent: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Bookmark)(windows_core::Interface::as_raw(self), core::mem::transmute(options), core::mem::transmute(ullstreamposition), lparamevent.param().abi()).ok() + pub unsafe fn Bookmark(&self, options: SPBOOKMARKOPTIONS, ullstreamposition: u64, lparamevent: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Bookmark)(windows_core::Interface::as_raw(self), core::mem::transmute(options), core::mem::transmute(ullstreamposition), core::mem::transmute(lparamevent)).ok() } pub unsafe fn SetAdaptationData(&self, padaptationdata: P0, cch: u32) -> windows_core::Result<()> where @@ -3600,13 +3547,12 @@ impl ISpRecoGrammar { { (windows_core::Interface::vtable(self).LoadCmdFromObject)(windows_core::Interface::as_raw(self), core::mem::transmute(rcid), pszgrammarname.param().abi(), core::mem::transmute(options)).ok() } - pub unsafe fn LoadCmdFromResource(&self, hmodule: P0, pszresourcename: P1, pszresourcetype: P2, wlanguage: u16, options: SPLOADOPTIONS) -> windows_core::Result<()> + pub unsafe fn LoadCmdFromResource(&self, hmodule: super::super::Foundation::HMODULE, pszresourcename: P1, pszresourcetype: P2, wlanguage: u16, options: SPLOADOPTIONS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).LoadCmdFromResource)(windows_core::Interface::as_raw(self), hmodule.param().abi(), pszresourcename.param().abi(), pszresourcetype.param().abi(), core::mem::transmute(wlanguage), core::mem::transmute(options)).ok() + (windows_core::Interface::vtable(self).LoadCmdFromResource)(windows_core::Interface::as_raw(self), core::mem::transmute(hmodule), pszresourcename.param().abi(), pszresourcetype.param().abi(), core::mem::transmute(wlanguage), core::mem::transmute(options)).ok() } pub unsafe fn LoadCmdFromMemory(&self, pgrammar: *const SPBINARYGRAMMAR, options: SPLOADOPTIONS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).LoadCmdFromMemory)(windows_core::Interface::as_raw(self), core::mem::transmute(pgrammar), core::mem::transmute(options)).ok() @@ -3658,7 +3604,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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetGrammarState(&self, pegrammarstate: *mut SPGRAMMARSTATE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetGrammarState)(windows_core::Interface::as_raw(self), core::mem::transmute(pegrammarstate)).ok() @@ -4222,13 +4168,12 @@ impl ISpRecognizer { { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata), core::mem::transmute(pfsupported)).ok() } - pub unsafe fn DisplayUI(&self, hwndparent: P0, psztitle: P1, psztypeofui: P2, pvextradata: *mut core::ffi::c_void, cbextradata: u32) -> windows_core::Result<()> + pub unsafe fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: P1, psztypeofui: P2, pvextradata: *mut core::ffi::c_void, cbextradata: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata)).ok() + (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata)).ok() } pub unsafe fn EmulateRecognition(&self, pphrase: P0) -> windows_core::Result<()> where @@ -4473,12 +4418,11 @@ impl core::ops::Deref for ISpRegDataKey { windows_core::imp::interface_hierarchy!(ISpRegDataKey, windows_core::IUnknown, ISpDataKey); impl ISpRegDataKey { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn SetKey(&self, hkey: P0, freadonly: P1) -> windows_core::Result<()> + pub unsafe fn SetKey(&self, hkey: super::super::System::Registry::HKEY, freadonly: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetKey)(windows_core::Interface::as_raw(self), hkey.param().abi(), freadonly.param().abi()).ok() + (windows_core::Interface::vtable(self).SetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hkey), freadonly.param().abi()).ok() } } #[repr(C)] @@ -4661,16 +4605,13 @@ impl ISpSREngine { (windows_core::Interface::vtable(self).GetInputAudioFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidsourceformatid), core::mem::transmute(psourcewaveformatex), core::mem::transmute(pguiddesiredformatid), core::mem::transmute(ppcomemdesiredwaveformatex)).ok() } #[cfg(feature = "Win32_Media_Audio")] - pub unsafe fn RecognizeStream(&self, rguidfmtid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, hrequestsync: P2, hdataavailable: P3, hexit: P4, fnewaudiostream: P5, frealtimeaudio: P6, paudioobjecttoken: P7) -> windows_core::Result<()> + pub unsafe fn RecognizeStream(&self, rguidfmtid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, hrequestsync: super::super::Foundation::HANDLE, hdataavailable: super::super::Foundation::HANDLE, hexit: super::super::Foundation::HANDLE, fnewaudiostream: P5, frealtimeaudio: P6, paudioobjecttoken: P7) -> windows_core::Result<()> where - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).RecognizeStream)(windows_core::Interface::as_raw(self), core::mem::transmute(rguidfmtid), core::mem::transmute(pwaveformatex), hrequestsync.param().abi(), hdataavailable.param().abi(), hexit.param().abi(), fnewaudiostream.param().abi(), frealtimeaudio.param().abi(), paudioobjecttoken.param().abi()).ok() + (windows_core::Interface::vtable(self).RecognizeStream)(windows_core::Interface::as_raw(self), core::mem::transmute(rguidfmtid), core::mem::transmute(pwaveformatex), core::mem::transmute(hrequestsync), core::mem::transmute(hdataavailable), core::mem::transmute(hexit), fnewaudiostream.param().abi(), frealtimeaudio.param().abi(), paudioobjecttoken.param().abi()).ok() } pub unsafe fn SetRecoProfile(&self, pprofile: P0) -> windows_core::Result<()> where @@ -4678,11 +4619,8 @@ impl ISpSREngine { { (windows_core::Interface::vtable(self).SetRecoProfile)(windows_core::Interface::as_raw(self), pprofile.param().abi()).ok() } - pub unsafe fn OnCreateGrammar(&self, pvenginerecocontext: *const core::ffi::c_void, hsapigrammar: P1, ppvenginegrammarcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnCreateGrammar)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginerecocontext), hsapigrammar.param().abi(), core::mem::transmute(ppvenginegrammarcontext)).ok() + pub unsafe fn OnCreateGrammar(&self, pvenginerecocontext: *const core::ffi::c_void, hsapigrammar: SPGRAMMARHANDLE, ppvenginegrammarcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnCreateGrammar)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginerecocontext), core::mem::transmute(hsapigrammar), core::mem::transmute(ppvenginegrammarcontext)).ok() } pub unsafe fn OnDeleteGrammar(&self, pvenginegrammar: *const core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnDeleteGrammar)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginegrammar)).ok() @@ -4731,11 +4669,8 @@ impl ISpSREngine { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsPronounceable)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginegrammar), pszword.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn OnCreateRecoContext(&self, hsapirecocontext: P0, ppvenginecontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnCreateRecoContext)(windows_core::Interface::as_raw(self), hsapirecocontext.param().abi(), core::mem::transmute(ppvenginecontext)).ok() + pub unsafe fn OnCreateRecoContext(&self, hsapirecocontext: SPRECOCONTEXTHANDLE, ppvenginecontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnCreateRecoContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hsapirecocontext), core::mem::transmute(ppvenginecontext)).ok() } pub unsafe fn OnDeleteRecoContext(&self, pvenginecontext: *const core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnDeleteRecoContext)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginecontext)).ok() @@ -5067,11 +5002,8 @@ impl ISpSREngine2 { { (windows_core::Interface::vtable(self).SetGrammarPrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginegrammar), pszprefix.param().abi(), fisprefixrequired.param().abi()).ok() } - pub unsafe fn SetRulePriority(&self, hrule: P0, pvclientrulecontext: *const core::ffi::c_void, nrulepriority: i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRulePriority)(windows_core::Interface::as_raw(self), hrule.param().abi(), core::mem::transmute(pvclientrulecontext), core::mem::transmute(nrulepriority)).ok() + pub unsafe fn SetRulePriority(&self, hrule: SPRULEHANDLE, pvclientrulecontext: *const core::ffi::c_void, nrulepriority: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRulePriority)(windows_core::Interface::as_raw(self), core::mem::transmute(hrule), core::mem::transmute(pvclientrulecontext), core::mem::transmute(nrulepriority)).ok() } pub unsafe fn EmulateRecognition(&self, pphrase: P0, dwcompareflags: u32) -> windows_core::Result<()> where @@ -5082,11 +5014,8 @@ impl ISpSREngine2 { pub unsafe fn SetSLMWeight(&self, pvenginegrammar: *const core::ffi::c_void, flweight: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetSLMWeight)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginegrammar), core::mem::transmute(flweight)).ok() } - pub unsafe fn SetRuleWeight(&self, hrule: P0, pvclientrulecontext: *const core::ffi::c_void, flweight: f32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRuleWeight)(windows_core::Interface::as_raw(self), hrule.param().abi(), core::mem::transmute(pvclientrulecontext), core::mem::transmute(flweight)).ok() + pub unsafe fn SetRuleWeight(&self, hrule: SPRULEHANDLE, pvclientrulecontext: *const core::ffi::c_void, flweight: f32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRuleWeight)(windows_core::Interface::as_raw(self), core::mem::transmute(hrule), core::mem::transmute(pvclientrulecontext), core::mem::transmute(flweight)).ok() } pub unsafe fn SetTrainingState(&self, fdoingtraining: P0, fadaptfromtrainingdata: P1) -> windows_core::Result<()> where @@ -5223,11 +5152,8 @@ impl ISpSREngineSite { pub unsafe fn Recognition(&self, presultinfo: *const SPRECORESULTINFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Recognition)(windows_core::Interface::as_raw(self), core::mem::transmute(presultinfo)).ok() } - pub unsafe fn AddEvent(&self, pevent: *const SPEVENT, hsapirecocontext: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(pevent), hsapirecocontext.param().abi()).ok() + pub unsafe fn AddEvent(&self, pevent: *const SPEVENT, hsapirecocontext: SPRECOCONTEXTHANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(pevent), core::mem::transmute(hsapirecocontext)).ok() } pub unsafe fn Synchronize(&self, ullprocessedthrupos: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), core::mem::transmute(ullprocessedthrupos)).ok() @@ -5235,63 +5161,40 @@ impl ISpSREngineSite { pub unsafe fn GetWordInfo(&self, pwordentry: *mut SPWORDENTRY, options: SPWORDINFOOPT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetWordInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pwordentry), core::mem::transmute(options)).ok() } - pub unsafe fn SetWordClientContext(&self, hword: P0, pvclientcontext: *const core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWordClientContext)(windows_core::Interface::as_raw(self), hword.param().abi(), core::mem::transmute(pvclientcontext)).ok() + pub unsafe fn SetWordClientContext(&self, hword: SPWORDHANDLE, pvclientcontext: *const core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWordClientContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hword), core::mem::transmute(pvclientcontext)).ok() } pub unsafe fn GetRuleInfo(&self, pruleentry: *mut SPRULEENTRY, options: SPRULEINFOOPT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRuleInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pruleentry), core::mem::transmute(options)).ok() } - pub unsafe fn SetRuleClientContext(&self, hrule: P0, pvclientcontext: *const core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRuleClientContext)(windows_core::Interface::as_raw(self), hrule.param().abi(), core::mem::transmute(pvclientcontext)).ok() + pub unsafe fn SetRuleClientContext(&self, hrule: SPRULEHANDLE, pvclientcontext: *const core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRuleClientContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hrule), core::mem::transmute(pvclientcontext)).ok() } - pub unsafe fn GetStateInfo(&self, hstate: P0, pstateinfo: *mut SPSTATEINFO) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetStateInfo)(windows_core::Interface::as_raw(self), hstate.param().abi(), core::mem::transmute(pstateinfo)).ok() + pub unsafe fn GetStateInfo(&self, hstate: SPSTATEHANDLE, pstateinfo: *mut SPSTATEINFO) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetStateInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(hstate), core::mem::transmute(pstateinfo)).ok() } - pub unsafe fn GetResource(&self, hrule: P0, pszresourcename: P1) -> windows_core::Result + pub unsafe fn GetResource(&self, hrule: SPRULEHANDLE, pszresourcename: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), hrule.param().abi(), pszresourcename.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), core::mem::transmute(hrule), pszresourcename.param().abi(), &mut result__).map(|| result__) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn GetTransitionProperty(&self, id: P0) -> windows_core::Result<*mut SPTRANSITIONPROPERTY> - where - P0: windows_core::Param, - { + pub unsafe fn GetTransitionProperty(&self, id: SPTRANSITIONID) -> windows_core::Result<*mut SPTRANSITIONPROPERTY> { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetTransitionProperty)(windows_core::Interface::as_raw(self), id.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetTransitionProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(id), &mut result__).map(|| result__) } - pub unsafe fn IsAlternate(&self, hrule: P0, haltrule: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).IsAlternate)(windows_core::Interface::as_raw(self), hrule.param().abi(), haltrule.param().abi()).ok() + pub unsafe fn IsAlternate(&self, hrule: SPRULEHANDLE, haltrule: SPRULEHANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).IsAlternate)(windows_core::Interface::as_raw(self), core::mem::transmute(hrule), core::mem::transmute(haltrule)).ok() } - pub unsafe fn GetMaxAlternates(&self, hrule: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetMaxAlternates(&self, hrule: SPRULEHANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetMaxAlternates)(windows_core::Interface::as_raw(self), hrule.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetMaxAlternates)(windows_core::Interface::as_raw(self), core::mem::transmute(hrule), &mut result__).map(|| result__) } - pub unsafe fn GetContextMaxAlternates(&self, hcontext: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetContextMaxAlternates(&self, hcontext: SPRECOCONTEXTHANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetContextMaxAlternates)(windows_core::Interface::as_raw(self), hcontext.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetContextMaxAlternates)(windows_core::Interface::as_raw(self), core::mem::transmute(hcontext), &mut result__).map(|| result__) } pub unsafe fn UpdateRecoPos(&self, ullcurrentrecopos: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpdateRecoPos)(windows_core::Interface::as_raw(self), core::mem::transmute(ullcurrentrecopos)).ok() @@ -5497,11 +5400,8 @@ impl core::ops::Deref for ISpSREngineSite2 { } windows_core::imp::interface_hierarchy!(ISpSREngineSite2, windows_core::IUnknown, ISpSREngineSite); impl ISpSREngineSite2 { - pub unsafe fn AddEventEx(&self, pevent: *const SPEVENTEX, hsapirecocontext: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddEventEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pevent), hsapirecocontext.param().abi()).ok() + pub unsafe fn AddEventEx(&self, pevent: *const SPEVENTEX, hsapirecocontext: SPRECOCONTEXTHANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddEventEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pevent), core::mem::transmute(hsapirecocontext)).ok() } pub unsafe fn UpdateRecoPosEx(&self, ullcurrentrecopos: u64, ullcurrentrecotime: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpdateRecoPosEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ullcurrentrecopos), core::mem::transmute(ullcurrentrecotime)).ok() @@ -5747,7 +5647,7 @@ impl ISpStream { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BindToFile)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), core::mem::transmute(emode), core::mem::transmute(pformatid.unwrap_or(core::ptr::null())), core::mem::transmute(pwaveformatex.unwrap_or(core::ptr::null())), core::mem::transmute(ulleventinterest)).ok() + (windows_core::Interface::vtable(self).BindToFile)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), core::mem::transmute(emode), core::mem::transmute(pformatid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwaveformatex.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulleventinterest)).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -6199,20 +6099,18 @@ impl ISpTaskManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetThreadPoolInfo)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn QueueTask(&self, ptask: P0, pvtaskdata: *const core::ffi::c_void, hcompevent: P2, pdwgroupid: *mut u32, ptaskid: *mut u32) -> windows_core::Result<()> + pub unsafe fn QueueTask(&self, ptask: P0, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE, pdwgroupid: *mut u32, ptaskid: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).QueueTask)(windows_core::Interface::as_raw(self), ptask.param().abi(), core::mem::transmute(pvtaskdata), hcompevent.param().abi(), core::mem::transmute(pdwgroupid), core::mem::transmute(ptaskid)).ok() + (windows_core::Interface::vtable(self).QueueTask)(windows_core::Interface::as_raw(self), ptask.param().abi(), core::mem::transmute(pvtaskdata), core::mem::transmute(hcompevent), core::mem::transmute(pdwgroupid), core::mem::transmute(ptaskid)).ok() } - pub unsafe fn CreateReoccurringTask(&self, ptask: P0, pvtaskdata: *const core::ffi::c_void, hcompevent: P2) -> windows_core::Result + pub unsafe fn CreateReoccurringTask(&self, ptask: P0, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE) -> windows_core::Result where P0: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateReoccurringTask)(windows_core::Interface::as_raw(self), ptask.param().abi(), core::mem::transmute(pvtaskdata), hcompevent.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateReoccurringTask)(windows_core::Interface::as_raw(self), ptask.param().abi(), core::mem::transmute(pvtaskdata), core::mem::transmute(hcompevent), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateThreadControl(&self, ptask: P0, pvtaskdata: *const core::ffi::c_void, npriority: i32) -> windows_core::Result where @@ -6441,27 +6339,14 @@ impl ISpThreadControl_Vtbl { impl windows_core::RuntimeName for ISpThreadControl {} windows_core::imp::define_interface!(ISpThreadTask, ISpThreadTask_Vtbl); impl ISpThreadTask { - pub unsafe fn InitThread(&self, pvtaskdata: *mut core::ffi::c_void, hwnd: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitThread)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), hwnd.param().abi()).ok() + pub unsafe fn InitThread(&self, pvtaskdata: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitThread)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), core::mem::transmute(hwnd)).ok() } - pub unsafe fn ThreadProc(&self, pvtaskdata: *mut core::ffi::c_void, hexitthreadevent: P1, hnotifyevent: P2, hwndworker: P3, pfcontinueprocessing: *const i32) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).ThreadProc)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), hexitthreadevent.param().abi(), hnotifyevent.param().abi(), hwndworker.param().abi(), core::mem::transmute(pfcontinueprocessing)).ok() + pub unsafe fn ThreadProc(&self, pvtaskdata: *mut core::ffi::c_void, hexitthreadevent: super::super::Foundation::HANDLE, hnotifyevent: super::super::Foundation::HANDLE, hwndworker: super::super::Foundation::HWND, pfcontinueprocessing: *const i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ThreadProc)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), core::mem::transmute(hexitthreadevent), core::mem::transmute(hnotifyevent), core::mem::transmute(hwndworker), core::mem::transmute(pfcontinueprocessing)).ok() } - pub unsafe fn WindowMessage(&self, pvtaskdata: *mut core::ffi::c_void, hwnd: P1, msg: u32, wparam: P3, lparam: P4) -> super::super::Foundation::LRESULT - where - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).WindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + pub unsafe fn WindowMessage(&self, pvtaskdata: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { + (windows_core::Interface::vtable(self).WindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pvtaskdata), core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } } #[repr(C)] @@ -6517,15 +6402,14 @@ impl ISpTokenUI { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata), punkobject.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn DisplayUI(&self, hwndparent: P0, psztitle: P1, psztypeofui: P2, pvextradata: *const core::ffi::c_void, cbextradata: u32, ptoken: P5, punkobject: P6) -> windows_core::Result<()> + pub unsafe fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: P1, psztypeofui: P2, pvextradata: *const core::ffi::c_void, cbextradata: u32, ptoken: P5, punkobject: P6) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata), ptoken.param().abi(), punkobject.param().abi()).ok() + (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata), ptoken.param().abi(), punkobject.param().abi()).ok() } } #[repr(C)] @@ -6661,14 +6545,14 @@ impl ISpVoice { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Speak)(windows_core::Interface::as_raw(self), pwcs.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pulstreamnumber.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Speak)(windows_core::Interface::as_raw(self), pwcs.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pulstreamnumber.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(dwflags), core::mem::transmute(pulstreamnumber.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SpeakStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pulstreamnumber.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(pstatus), core::mem::transmute(ppszlastbookmark)).ok() @@ -6721,13 +6605,12 @@ impl ISpVoice { { (windows_core::Interface::vtable(self).IsUISupported)(windows_core::Interface::as_raw(self), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata), core::mem::transmute(pfsupported)).ok() } - pub unsafe fn DisplayUI(&self, hwndparent: P0, psztitle: P1, psztypeofui: P2, pvextradata: *mut core::ffi::c_void, cbextradata: u32) -> windows_core::Result<()> + pub unsafe fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: P1, psztypeofui: P2, pvextradata: *mut core::ffi::c_void, cbextradata: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata)).ok() + (windows_core::Interface::vtable(self).DisplayUI)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), psztitle.param().abi(), psztypeofui.param().abi(), core::mem::transmute(pvextradata), core::mem::transmute(cbextradata)).ok() } } #[repr(C)] @@ -7940,11 +7823,8 @@ impl core::ops::Deref for ISpeechFileStream { windows_core::imp::interface_hierarchy!(ISpeechFileStream, windows_core::IUnknown, super::super::System::Com::IDispatch, ISpeechBaseStream); #[cfg(feature = "Win32_System_Com")] impl ISpeechFileStream { - pub unsafe fn Open(&self, filename: &windows_core::BSTR, filemode: SpeechStreamFileMode, doevents: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filename), core::mem::transmute(filemode), doevents.param().abi()).ok() + pub unsafe fn Open(&self, filename: &windows_core::BSTR, filemode: SpeechStreamFileMode, doevents: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filename), core::mem::transmute(filemode), core::mem::transmute(doevents)).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -9409,11 +9289,8 @@ impl ISpeechObjectToken { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(locale), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetId(&self, id: &windows_core::BSTR, categoryid: &windows_core::BSTR, createifnotexist: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(id), core::mem::transmute_copy(categoryid), createifnotexist.param().abi()).ok() + pub unsafe fn SetId(&self, id: &windows_core::BSTR, categoryid: &windows_core::BSTR, createifnotexist: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(id), core::mem::transmute_copy(categoryid), core::mem::transmute(createifnotexist)).ok() } pub unsafe fn GetAttribute(&self, attributename: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9433,11 +9310,8 @@ impl ISpeechObjectToken { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStorageFileName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(objectstorageclsid), core::mem::transmute_copy(keyname), core::mem::transmute_copy(filename), core::mem::transmute(folder), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn RemoveStorageFileName(&self, objectstorageclsid: &windows_core::BSTR, keyname: &windows_core::BSTR, deletefile: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemoveStorageFileName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(objectstorageclsid), core::mem::transmute_copy(keyname), deletefile.param().abi()).ok() + pub unsafe fn RemoveStorageFileName(&self, objectstorageclsid: &windows_core::BSTR, keyname: &windows_core::BSTR, deletefile: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemoveStorageFileName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(objectstorageclsid), core::mem::transmute_copy(keyname), core::mem::transmute(deletefile)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn IsUISupported(&self, typeofui: &windows_core::BSTR, extradata: *const super::super::System::Variant::VARIANT, object: P2) -> windows_core::Result @@ -9655,11 +9529,8 @@ impl ISpeechObjectTokenCategory { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Default)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetId(&self, id: &windows_core::BSTR, createifnotexist: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(id), createifnotexist.param().abi()).ok() + pub unsafe fn SetId(&self, id: &windows_core::BSTR, createifnotexist: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(id), core::mem::transmute(createifnotexist)).ok() } pub unsafe fn GetDataKey(&self, location: SpeechDataKeyLocation) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10566,19 +10437,13 @@ impl ISpeechPhraseInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SaveToMemory)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn GetText(&self, startelement: i32, elements: i32, usereplacements: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn GetText(&self, startelement: i32, elements: i32, usereplacements: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), core::mem::transmute(elements), usereplacements.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), core::mem::transmute(elements), core::mem::transmute(usereplacements), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn GetDisplayAttributes(&self, startelement: i32, elements: i32, usereplacements: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn GetDisplayAttributes(&self, startelement: i32, elements: i32, usereplacements: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetDisplayAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), core::mem::transmute(elements), usereplacements.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetDisplayAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), core::mem::transmute(elements), core::mem::transmute(usereplacements), &mut result__).map(|| result__) } } #[cfg(feature = "Win32_System_Com")] @@ -11640,11 +11505,8 @@ impl ISpeechRecoContext { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Voice)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetAllowVoiceFormatMatchingOnNextSet(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowVoiceFormatMatchingOnNextSet)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowVoiceFormatMatchingOnNextSet(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowVoiceFormatMatchingOnNextSet)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowVoiceFormatMatchingOnNextSet(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -12495,11 +12357,8 @@ impl core::ops::Deref for ISpeechRecoResult2 { windows_core::imp::interface_hierarchy!(ISpeechRecoResult2, windows_core::IUnknown, super::super::System::Com::IDispatch, ISpeechRecoResult); #[cfg(feature = "Win32_System_Com")] impl ISpeechRecoResult2 { - pub unsafe fn SetTextFeedback(&self, feedback: &windows_core::BSTR, wassuccessful: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTextFeedback)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(feedback), wassuccessful.param().abi()).ok() + pub unsafe fn SetTextFeedback(&self, feedback: &windows_core::BSTR, wassuccessful: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTextFeedback)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(feedback), core::mem::transmute(wassuccessful)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -12589,11 +12448,8 @@ impl ISpeechRecoResultDispatch { pub unsafe fn GetXMLErrorInfo(&self, linenumber: *mut i32, scriptline: *mut windows_core::BSTR, source: *mut windows_core::BSTR, description: *mut windows_core::BSTR, resultcode: *mut windows_core::HRESULT, iserror: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetXMLErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(linenumber), core::mem::transmute(scriptline), core::mem::transmute(source), core::mem::transmute(description), core::mem::transmute(resultcode), core::mem::transmute(iserror)).ok() } - pub unsafe fn SetTextFeedback(&self, feedback: &windows_core::BSTR, wassuccessful: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTextFeedback)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(feedback), wassuccessful.param().abi()).ok() + pub unsafe fn SetTextFeedback(&self, feedback: &windows_core::BSTR, wassuccessful: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTextFeedback)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(feedback), core::mem::transmute(wassuccessful)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -12903,11 +12759,8 @@ impl ISpeechRecognizer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Recognizer)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetAllowAudioInputFormatChangesOnNextSet(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowAudioInputFormatChangesOnNextSet)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowAudioInputFormatChangesOnNextSet(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowAudioInputFormatChangesOnNextSet)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowAudioInputFormatChangesOnNextSet(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13472,14 +13325,11 @@ impl core::ops::Deref for ISpeechResourceLoader { windows_core::imp::interface_hierarchy!(ISpeechResourceLoader, windows_core::IUnknown, super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl ISpeechResourceLoader { - pub unsafe fn LoadResource(&self, bstrresourceuri: &windows_core::BSTR, falwaysreload: P1, pstream: *mut Option, pbstrmimetype: Option<*mut windows_core::BSTR>, pfmodified: *mut super::super::Foundation::VARIANT_BOOL, pbstrredirecturl: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).LoadResource)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrresourceuri), falwaysreload.param().abi(), core::mem::transmute(pstream), core::mem::transmute(pbstrmimetype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfmodified), core::mem::transmute(pbstrredirecturl.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn LoadResource(&self, bstrresourceuri: &windows_core::BSTR, falwaysreload: super::super::Foundation::VARIANT_BOOL, pstream: *mut Option, pbstrmimetype: Option<*mut windows_core::BSTR>, pfmodified: *mut super::super::Foundation::VARIANT_BOOL, pbstrredirecturl: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LoadResource)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrresourceuri), core::mem::transmute(falwaysreload), core::mem::transmute(pstream), core::mem::transmute(pbstrmimetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfmodified), core::mem::transmute(pbstrredirecturl.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetLocalCopy(&self, bstrresourceuri: &windows_core::BSTR, pbstrlocalpath: *mut windows_core::BSTR, pbstrmimetype: Option<*mut windows_core::BSTR>, pbstrredirecturl: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLocalCopy)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrresourceuri), 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() + (windows_core::Interface::vtable(self).GetLocalCopy)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrresourceuri), core::mem::transmute(pbstrlocalpath), core::mem::transmute(pbstrmimetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrredirecturl.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReleaseLocalCopy(&self, pbstrlocalpath: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseLocalCopy)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pbstrlocalpath)).ok() @@ -13731,11 +13581,8 @@ impl ISpeechVoice { pub unsafe fn SetVolume(&self, volume: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetVolume)(windows_core::Interface::as_raw(self), core::mem::transmute(volume)).ok() } - pub unsafe fn SetAllowAudioOutputFormatChangesOnNextSet(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowAudioOutputFormatChangesOnNextSet)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowAudioOutputFormatChangesOnNextSet(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowAudioOutputFormatChangesOnNextSet)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowAudioOutputFormatChangesOnNextSet(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Media/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/mod.rs index 9bcdd09aeb..c8144d27f8 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/mod.rs @@ -85,19 +85,13 @@ impl IReferenceClock { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn AdviseTime(&self, basetime: i64, streamtime: i64, hevent: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn AdviseTime(&self, basetime: i64, streamtime: i64, hevent: super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AdviseTime)(windows_core::Interface::as_raw(self), core::mem::transmute(basetime), core::mem::transmute(streamtime), hevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AdviseTime)(windows_core::Interface::as_raw(self), core::mem::transmute(basetime), core::mem::transmute(streamtime), core::mem::transmute(hevent), &mut result__).map(|| result__) } - pub unsafe fn AdvisePeriodic(&self, starttime: i64, periodtime: i64, hsemaphore: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn AdvisePeriodic(&self, starttime: i64, periodtime: i64, hsemaphore: super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AdvisePeriodic)(windows_core::Interface::as_raw(self), core::mem::transmute(starttime), core::mem::transmute(periodtime), hsemaphore.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AdvisePeriodic)(windows_core::Interface::as_raw(self), core::mem::transmute(starttime), core::mem::transmute(periodtime), core::mem::transmute(hsemaphore), &mut result__).map(|| result__) } pub unsafe fn Unadvise(&self, dwadvisecookie: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unadvise)(windows_core::Interface::as_raw(self), core::mem::transmute(dwadvisecookie)).ok() 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 3af9363f13..5a5b584396 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 P2: 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(core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), adaptername.param().abi(), core::mem::transmute(classid), core::mem::transmute(params), core::mem::transmute(handle)) + DhcpRegisterParamChange(core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), adaptername.param().abi(), core::mem::transmute(classid), core::mem::transmute(params), core::mem::transmute(handle)) } #[inline] pub unsafe fn DhcpRemoveDNSRegistrations() -> u32 { @@ -1250,13 +1250,13 @@ pub unsafe fn DhcpSetThreadOptions(flags: u32, reserved: *mut core::ffi::c_void) DhcpSetThreadOptions(core::mem::transmute(flags), core::mem::transmute(reserved)) } #[inline] -pub unsafe fn DhcpUndoRequestParams(flags: u32, reserved: Option<*const core::ffi::c_void>, adaptername: P2, requestidstr: P3) -> u32 +pub unsafe fn DhcpUndoRequestParams(flags: Option, reserved: Option<*const core::ffi::c_void>, adaptername: P2, requestidstr: P3) -> u32 where P2: windows_core::Param, P3: 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(core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), adaptername.param().abi(), requestidstr.param().abi()) + DhcpUndoRequestParams(core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), adaptername.param().abi(), requestidstr.param().abi()) } #[inline] pub unsafe fn DhcpV4AddPolicyRange(serveripaddress: P0, subnetaddress: u32, policyname: P2, 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 5e31566d2b..4ec7cd18de 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(core::mem::transmute(credentialflags), core::mem::transmute(credentials.unwrap_or(core::ptr::null())), core::mem::transmute(pcontext)) + DnsAcquireContextHandle_A(core::mem::transmute(credentialflags), core::mem::transmute(credentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(credentialflags), core::mem::transmute(credentials.unwrap_or(core::ptr::null())), core::mem::transmute(pcontext)) + DnsAcquireContextHandle_W(core::mem::transmute(credentialflags), core::mem::transmute(credentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(freetype)) + DnsFree(core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(freetype)) } #[inline] pub unsafe fn DnsFreeCustomServers(pcservers: *mut u32, ppservers: *mut *mut DNS_CUSTOM_SERVER) { @@ -138,39 +138,30 @@ 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(core::mem::transmute(pcservers), core::mem::transmute(ppdefaultservers), core::mem::transmute(psettings.unwrap_or(core::ptr::null_mut()))) + DnsGetApplicationSettings(core::mem::transmute(pcservers), core::mem::transmute(ppdefaultservers), core::mem::transmute(psettings.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn DnsGetProxyInformation(hostname: P0, proxyinformation: *mut DNS_PROXY_INFORMATION, defaultproxyinformation: Option<*mut DNS_PROXY_INFORMATION>, completionroutine: Option, completioncontext: Option<*const core::ffi::c_void>) -> u32 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(), core::mem::transmute(proxyinformation), core::mem::transmute(defaultproxyinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(completionroutine), core::mem::transmute(completioncontext.unwrap_or(core::ptr::null()))) + DnsGetProxyInformation(hostname.param().abi(), core::mem::transmute(proxyinformation), core::mem::transmute(defaultproxyinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(completioncontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DnsModifyRecordsInSet_A(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: P3, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn DnsModifyRecordsInSet_A(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: Option, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 { 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(core::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(core::ptr::null())), core::mem::transmute(options), hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsModifyRecordsInSet_A(core::mem::transmute(paddrecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdeleterecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(options), core::mem::transmute(hcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pextralist.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DnsModifyRecordsInSet_UTF8(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: P3, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn DnsModifyRecordsInSet_UTF8(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: Option, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 { 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(core::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(core::ptr::null())), core::mem::transmute(options), hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsModifyRecordsInSet_UTF8(core::mem::transmute(paddrecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdeleterecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(options), core::mem::transmute(hcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pextralist.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DnsModifyRecordsInSet_W(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: P3, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn DnsModifyRecordsInSet_W(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: Option, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 { 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(core::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(core::ptr::null())), core::mem::transmute(options), hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsModifyRecordsInSet_W(core::mem::transmute(paddrecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdeleterecords.unwrap_or(core::mem::zeroed())), core::mem::transmute(options), core::mem::transmute(hcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pextralist.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DnsNameCompare_A(pname1: P0, pname2: P1) -> super::super::Foundation::BOOL @@ -196,12 +187,12 @@ where P2: 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(core::mem::transmute(config), core::mem::transmute(flag), pwsadaptername.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbuflen)) + DnsQueryConfig(core::mem::transmute(config), core::mem::transmute(flag), pwsadaptername.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pqueryrequest), core::mem::transmute(pqueryresults), core::mem::transmute(pcancelhandle.unwrap_or(core::ptr::null_mut()))) + DnsQueryEx(core::mem::transmute(pqueryrequest), core::mem::transmute(pqueryresults), core::mem::transmute(pcancelhandle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DnsQueryRaw(queryrequest: *const DNS_QUERY_RAW_REQUEST, cancelhandle: *mut DNS_QUERY_RAW_CANCEL) -> i32 { @@ -211,7 +202,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(core::ptr::null()))) + DnsQueryRawResultFree(core::mem::transmute(queryresults.unwrap_or(core::mem::zeroed()))) } #[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 +210,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(), core::mem::transmute(wtype), core::mem::transmute(options), core::mem::transmute(pextra.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsQuery_A(pszname.param().abi(), core::mem::transmute(wtype), core::mem::transmute(options), core::mem::transmute(pextra.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[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 +218,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(), core::mem::transmute(wtype), core::mem::transmute(options), core::mem::transmute(pextra.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsQuery_UTF8(pszname.param().abi(), core::mem::transmute(wtype), core::mem::transmute(options), core::mem::transmute(pextra.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[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 +226,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(), core::mem::transmute(wtype), core::mem::transmute(options), core::mem::transmute(pextra.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsQuery_W(pszname.param().abi(), core::mem::transmute(wtype), core::mem::transmute(options), core::mem::transmute(pextra.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppqueryresults), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DnsRecordCompare(precord1: *const DNS_RECORDA, precord2: *const DNS_RECORDA) -> super::super::Foundation::BOOL { @@ -250,7 +241,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(core::mem::transmute(prr1), core::mem::transmute(prr2), core::mem::transmute(ppdiff1.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdiff2.unwrap_or(core::ptr::null_mut()))) + DnsRecordSetCompare(core::mem::transmute(prr1), core::mem::transmute(prr2), core::mem::transmute(ppdiff1.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdiff2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DnsRecordSetCopyEx(precordset: *const DNS_RECORDA, charsetin: DNS_CHARSET, charsetout: DNS_CHARSET) -> *mut DNS_RECORDA { @@ -263,36 +254,24 @@ pub unsafe fn DnsRecordSetDetach(precordlist: *mut DNS_RECORDA) -> *mut DNS_RECO DnsRecordSetDetach(core::mem::transmute(precordlist)) } #[inline] -pub unsafe fn DnsReleaseContextHandle(hcontext: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn DnsReleaseContextHandle(hcontext: super::super::Foundation::HANDLE) { windows_targets::link!("dnsapi.dll" "system" fn DnsReleaseContextHandle(hcontext : super::super::Foundation:: HANDLE)); - DnsReleaseContextHandle(hcontext.param().abi()) + DnsReleaseContextHandle(core::mem::transmute(hcontext)) } #[inline] -pub unsafe fn DnsReplaceRecordSetA(preplaceset: *const DNS_RECORDA, options: u32, hcontext: P2, pextrainfo: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn DnsReplaceRecordSetA(preplaceset: *const DNS_RECORDA, options: u32, hcontext: Option, pextrainfo: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 { 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(core::mem::transmute(preplaceset), core::mem::transmute(options), hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsReplaceRecordSetA(core::mem::transmute(preplaceset), core::mem::transmute(options), core::mem::transmute(hcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pextrainfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DnsReplaceRecordSetUTF8(preplaceset: *const DNS_RECORDA, options: u32, hcontext: P2, pextrainfo: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn DnsReplaceRecordSetUTF8(preplaceset: *const DNS_RECORDA, options: u32, hcontext: Option, pextrainfo: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 { 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(core::mem::transmute(preplaceset), core::mem::transmute(options), hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsReplaceRecordSetUTF8(core::mem::transmute(preplaceset), core::mem::transmute(options), core::mem::transmute(hcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pextrainfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DnsReplaceRecordSetW(preplaceset: *const DNS_RECORDA, options: u32, hcontext: P2, pextrainfo: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn DnsReplaceRecordSetW(preplaceset: *const DNS_RECORDA, options: u32, hcontext: Option, pextrainfo: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 { 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(core::mem::transmute(preplaceset), core::mem::transmute(options), hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + DnsReplaceRecordSetW(core::mem::transmute(preplaceset), core::mem::transmute(options), core::mem::transmute(hcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pextrainfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DnsServiceBrowse(prequest: *const DNS_SERVICE_BROWSE_REQUEST, pcancel: *mut DNS_SERVICE_CANCEL) -> i32 { @@ -311,7 +290,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(core::ptr::null())), core::mem::transmute(pip6.unwrap_or(core::ptr::null())), core::mem::transmute(wport), core::mem::transmute(wpriority), core::mem::transmute(wweight), core::mem::transmute(dwpropertiescount), core::mem::transmute(keys), core::mem::transmute(values)) + DnsServiceConstructInstance(pservicename.param().abi(), phostname.param().abi(), core::mem::transmute(pip4.unwrap_or(core::mem::zeroed())), core::mem::transmute(pip6.unwrap_or(core::mem::zeroed())), core::mem::transmute(wport), core::mem::transmute(wpriority), core::mem::transmute(wweight), core::mem::transmute(dwpropertiescount), core::mem::transmute(keys), core::mem::transmute(values)) } #[inline] pub unsafe fn DnsServiceCopyInstance(porig: *const DNS_SERVICE_INSTANCE) -> *mut DNS_SERVICE_INSTANCE { @@ -321,7 +300,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(core::mem::transmute(prequest), core::mem::transmute(pcancel.unwrap_or(core::ptr::null_mut()))) + DnsServiceDeRegister(core::mem::transmute(prequest), core::mem::transmute(pcancel.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DnsServiceFreeInstance(pinstance: *const DNS_SERVICE_INSTANCE) { @@ -331,7 +310,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(core::mem::transmute(prequest), core::mem::transmute(pcancel.unwrap_or(core::ptr::null_mut()))) + DnsServiceRegister(core::mem::transmute(prequest), core::mem::transmute(pcancel.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DnsServiceRegisterCancel(pcancelhandle: *const DNS_SERVICE_CANCEL) -> u32 { @@ -351,7 +330,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(core::ptr::null()))) + DnsSetApplicationSettings(pservers.len().try_into().unwrap(), core::mem::transmute(pservers.as_ptr()), core::mem::transmute(psettings.unwrap_or(core::mem::zeroed()))) } #[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 a3c24132ed..e84c3ead7a 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs @@ -10,20 +10,14 @@ pub unsafe fn CancelIPChangeNotify(notifyoverlapped: *const super::super::System CancelIPChangeNotify(core::mem::transmute(notifyoverlapped)) } #[inline] -pub unsafe fn CancelIfTimestampConfigChange(notificationhandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CancelIfTimestampConfigChange(notificationhandle: HIFTIMESTAMPCHANGE) { windows_targets::link!("iphlpapi.dll" "system" fn CancelIfTimestampConfigChange(notificationhandle : HIFTIMESTAMPCHANGE)); - CancelIfTimestampConfigChange(notificationhandle.param().abi()) + CancelIfTimestampConfigChange(core::mem::transmute(notificationhandle)) } #[inline] -pub unsafe fn CancelMibChangeNotify2(notificationhandle: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn CancelMibChangeNotify2(notificationhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn CancelMibChangeNotify2(notificationhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - CancelMibChangeNotify2(notificationhandle.param().abi()) + CancelMibChangeNotify2(core::mem::transmute(notificationhandle)) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -38,12 +32,9 @@ pub unsafe fn ConvertCompartmentGuidToId(compartmentguid: *const windows_core::G } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn ConvertCompartmentIdToGuid(compartmentid: P0, compartmentguid: *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ConvertCompartmentIdToGuid(compartmentid: super::Ndis::NET_IF_COMPARTMENT_ID, compartmentguid: *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn ConvertCompartmentIdToGuid(compartmentid : super::Ndis:: NET_IF_COMPARTMENT_ID, compartmentguid : *mut windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - ConvertCompartmentIdToGuid(compartmentid.param().abi(), core::mem::transmute(compartmentguid)) + ConvertCompartmentIdToGuid(core::mem::transmute(compartmentid), core::mem::transmute(compartmentguid)) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -172,7 +163,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(core::ptr::null())), core::mem::transmute(sourceaddresscount), core::mem::transmute(destinationaddresslist), core::mem::transmute(destinationaddresscount), core::mem::transmute(addresssortoptions), core::mem::transmute(sortedaddresspairlist), core::mem::transmute(sortedaddresspaircount)) + CreateSortedAddressPairs(core::mem::transmute(sourceaddresslist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sourceaddresscount), core::mem::transmute(destinationaddresslist), core::mem::transmute(destinationaddresscount), core::mem::transmute(addresssortoptions), core::mem::transmute(sortedaddresspairlist), core::mem::transmute(sortedaddresspaircount)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -296,12 +287,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(core::mem::transmute(family), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), core::mem::transmute(adapteraddresses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sizepointer)) + GetAdaptersAddresses(core::mem::transmute(family), core::mem::transmute(flags), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(adapteraddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(sizepointer)) + GetAdaptersInfo(core::mem::transmute(adapterinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -328,15 +319,15 @@ pub unsafe fn GetBestInterfaceEx(pdestaddr: *const super::super::Networking::Win } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn GetBestRoute(dwdestaddr: u32, dwsourceaddr: u32, pbestroute: *mut MIB_IPFORWARDROW) -> u32 { +pub unsafe fn GetBestRoute(dwdestaddr: u32, dwsourceaddr: Option, pbestroute: *mut MIB_IPFORWARDROW) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetBestRoute(dwdestaddr : u32, dwsourceaddr : u32, pbestroute : *mut MIB_IPFORWARDROW) -> u32); - GetBestRoute(core::mem::transmute(dwdestaddr), core::mem::transmute(dwsourceaddr), core::mem::transmute(pbestroute)) + GetBestRoute(core::mem::transmute(dwdestaddr), core::mem::transmute(dwsourceaddr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbestroute)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[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(core::ptr::null())), core::mem::transmute(interfaceindex), core::mem::transmute(sourceaddress.unwrap_or(core::ptr::null())), core::mem::transmute(destinationaddress), core::mem::transmute(addresssortoptions), core::mem::transmute(bestroute), core::mem::transmute(bestsourceaddress)) + GetBestRoute2(core::mem::transmute(interfaceluid.unwrap_or(core::mem::zeroed())), core::mem::transmute(interfaceindex), core::mem::transmute(sourceaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(destinationaddress), core::mem::transmute(addresssortoptions), core::mem::transmute(bestroute), core::mem::transmute(bestsourceaddress)) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -366,7 +357,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(pdwsize), border.param().abi(), core::mem::transmute(ulaf), core::mem::transmute(tableclass), core::mem::transmute(reserved)) + GetExtendedTcpTable(core::mem::transmute(ptcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi(), core::mem::transmute(ulaf), core::mem::transmute(tableclass), core::mem::transmute(reserved)) } #[inline] pub unsafe fn GetExtendedUdpTable(pudptable: Option<*mut core::ffi::c_void>, pdwsize: *mut u32, border: P2, ulaf: u32, tableclass: UDP_TABLE_CLASS, reserved: u32) -> u32 @@ -374,7 +365,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(pdwsize), border.param().abi(), core::mem::transmute(ulaf), core::mem::transmute(tableclass), core::mem::transmute(reserved)) + GetExtendedUdpTable(core::mem::transmute(pudptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi(), core::mem::transmute(ulaf), core::mem::transmute(tableclass), core::mem::transmute(reserved)) } #[inline] pub unsafe fn GetFriendlyIfIndex(ifindex: u32) -> u32 { @@ -419,7 +410,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(pdwsize), border.param().abi()) + GetIfTable(core::mem::transmute(piftable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi()) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -459,7 +450,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(core::ptr::null_mut())), core::mem::transmute(dwoutbuflen)) + GetInterfaceInfo(core::mem::transmute(piftable.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoutbuflen)) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -478,12 +469,12 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(pdwsize), border.param().abi()) + GetIpAddrTable(core::mem::transmute(pipaddrtable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi()) } #[inline] -pub unsafe fn GetIpErrorString(errorcode: u32, buffer: windows_core::PWSTR, size: *mut u32) -> u32 { +pub unsafe fn GetIpErrorString(errorcode: u32, buffer: Option, size: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpErrorString(errorcode : u32, buffer : windows_core::PWSTR, size : *mut u32) -> u32); - GetIpErrorString(core::mem::transmute(errorcode), core::mem::transmute(buffer), core::mem::transmute(size)) + GetIpErrorString(core::mem::transmute(errorcode), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -498,7 +489,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(pdwsize), border.param().abi()) + GetIpForwardTable(core::mem::transmute(pipforwardtable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi()) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -530,7 +521,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(sizepointer), order.param().abi()) + GetIpNetTable(core::mem::transmute(ipnettable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -568,12 +559,9 @@ pub unsafe fn GetIpStatisticsEx(statistics: *mut MIB_IPSTATS_LH, family: u32) -> } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn GetJobCompartmentId(jobhandle: P0) -> super::Ndis::NET_IF_COMPARTMENT_ID -where - P0: windows_core::Param, -{ +pub unsafe fn GetJobCompartmentId(jobhandle: super::super::Foundation::HANDLE) -> super::Ndis::NET_IF_COMPARTMENT_ID { windows_targets::link!("iphlpapi.dll" "system" fn GetJobCompartmentId(jobhandle : super::super::Foundation:: HANDLE) -> super::Ndis:: NET_IF_COMPARTMENT_ID); - GetJobCompartmentId(jobhandle.param().abi()) + GetJobCompartmentId(core::mem::transmute(jobhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -607,7 +595,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(core::ptr::null_mut())), core::mem::transmute(poutbuflen)) + GetNetworkParams(core::mem::transmute(pfixedinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutbuflen)) } #[inline] pub unsafe fn GetNumberOfInterfaces(pdwnumif: *mut u32) -> u32 { @@ -642,7 +630,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(core::mem::transmute(ifindex), core::mem::transmute(pperadapterinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutbuflen)) + GetPerAdapterInfo(core::mem::transmute(ifindex), core::mem::transmute(pperadapterinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutbuflen)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -729,7 +717,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(sizepointer), order.param().abi()) + GetTcpTable(core::mem::transmute(tcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) } #[inline] pub unsafe fn GetTcpTable2(tcptable: Option<*mut MIB_TCPTABLE2>, sizepointer: *mut u32, order: P2) -> u32 @@ -737,7 +725,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(sizepointer), order.param().abi()) + GetTcpTable2(core::mem::transmute(tcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) } #[inline] pub unsafe fn GetTeredoPort(port: *mut u16) -> super::super::Foundation::WIN32_ERROR { @@ -751,7 +739,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(sizepointer), order.param().abi()) + GetUdp6Table(core::mem::transmute(udp6table.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) } #[inline] pub unsafe fn GetUdpStatistics(stats: *mut MIB_UDPSTATS) -> u32 { @@ -774,12 +762,12 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(sizepointer), order.param().abi()) + GetUdpTable(core::mem::transmute(udptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(dwoutbuflen)) + GetUniDirectionalAdapterInfo(core::mem::transmute(pipifinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoutbuflen)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -806,21 +794,27 @@ pub unsafe fn Icmp6ParseReplies(replybuffer: *mut core::ffi::c_void, replysize: } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn Icmp6SendEcho2(icmphandle: P0, event: P1, apcroutine: super::super::System::IO::PIO_APC_ROUTINE, apccontext: Option<*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: Option<*const IP_OPTION_INFORMATION>, replybuffer: *mut core::ffi::c_void, replysize: u32, timeout: u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn Icmp6SendEcho2(icmphandle: super::super::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*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: Option<*const IP_OPTION_INFORMATION>, replybuffer: *mut core::ffi::c_void, replysize: u32, timeout: u32) -> u32 { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(sourceaddress), core::mem::transmute(destinationaddress), core::mem::transmute(requestdata), core::mem::transmute(requestsize), core::mem::transmute(requestoptions.unwrap_or(core::ptr::null())), core::mem::transmute(replybuffer), core::mem::transmute(replysize), core::mem::transmute(timeout)) + Icmp6SendEcho2( + core::mem::transmute(icmphandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sourceaddress), + core::mem::transmute(destinationaddress), + core::mem::transmute(requestdata), + core::mem::transmute(requestsize), + core::mem::transmute(requestoptions.unwrap_or(core::mem::zeroed())), + core::mem::transmute(replybuffer), + core::mem::transmute(replysize), + core::mem::transmute(timeout), + ) } #[inline] -pub unsafe fn IcmpCloseHandle(icmphandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn IcmpCloseHandle(icmphandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("iphlpapi.dll" "system" fn IcmpCloseHandle(icmphandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - IcmpCloseHandle(icmphandle.param().abi()).ok() + IcmpCloseHandle(core::mem::transmute(icmphandle)).ok() } #[inline] pub unsafe fn IcmpCreateFile() -> windows_core::Result { @@ -834,32 +828,46 @@ pub unsafe fn IcmpParseReplies(replybuffer: *mut core::ffi::c_void, replysize: u IcmpParseReplies(core::mem::transmute(replybuffer), core::mem::transmute(replysize)) } #[inline] -pub unsafe fn IcmpSendEcho(icmphandle: P0, destinationaddress: u32, requestdata: *const core::ffi::c_void, requestsize: u16, requestoptions: Option<*const IP_OPTION_INFORMATION>, replybuffer: *mut core::ffi::c_void, replysize: u32, timeout: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IcmpSendEcho(icmphandle: super::super::Foundation::HANDLE, destinationaddress: u32, requestdata: *const core::ffi::c_void, requestsize: u16, requestoptions: Option<*const IP_OPTION_INFORMATION>, replybuffer: *mut core::ffi::c_void, replysize: u32, timeout: u32) -> u32 { 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(), core::mem::transmute(destinationaddress), core::mem::transmute(requestdata), core::mem::transmute(requestsize), core::mem::transmute(requestoptions.unwrap_or(core::ptr::null())), core::mem::transmute(replybuffer), core::mem::transmute(replysize), core::mem::transmute(timeout)) + IcmpSendEcho(core::mem::transmute(icmphandle), core::mem::transmute(destinationaddress), core::mem::transmute(requestdata), core::mem::transmute(requestsize), core::mem::transmute(requestoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(replybuffer), core::mem::transmute(replysize), core::mem::transmute(timeout)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn IcmpSendEcho2(icmphandle: P0, event: P1, apcroutine: super::super::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, destinationaddress: u32, requestdata: *const core::ffi::c_void, requestsize: u16, requestoptions: Option<*const IP_OPTION_INFORMATION>, replybuffer: *mut core::ffi::c_void, replysize: u32, timeout: u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IcmpSendEcho2(icmphandle: super::super::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, destinationaddress: u32, requestdata: *const core::ffi::c_void, requestsize: u16, requestoptions: Option<*const IP_OPTION_INFORMATION>, replybuffer: *mut core::ffi::c_void, replysize: u32, timeout: u32) -> u32 { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(destinationaddress), core::mem::transmute(requestdata), core::mem::transmute(requestsize), core::mem::transmute(requestoptions.unwrap_or(core::ptr::null())), core::mem::transmute(replybuffer), core::mem::transmute(replysize), core::mem::transmute(timeout)) + IcmpSendEcho2( + core::mem::transmute(icmphandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(destinationaddress), + core::mem::transmute(requestdata), + core::mem::transmute(requestsize), + core::mem::transmute(requestoptions.unwrap_or(core::mem::zeroed())), + core::mem::transmute(replybuffer), + core::mem::transmute(replysize), + core::mem::transmute(timeout), + ) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn IcmpSendEcho2Ex(icmphandle: P0, event: P1, apcroutine: super::super::System::IO::PIO_APC_ROUTINE, apccontext: Option<*const core::ffi::c_void>, sourceaddress: u32, destinationaddress: u32, requestdata: *const core::ffi::c_void, requestsize: u16, requestoptions: Option<*const IP_OPTION_INFORMATION>, replybuffer: *mut core::ffi::c_void, replysize: u32, timeout: u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IcmpSendEcho2Ex(icmphandle: super::super::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, sourceaddress: u32, destinationaddress: u32, requestdata: *const core::ffi::c_void, requestsize: u16, requestoptions: Option<*const IP_OPTION_INFORMATION>, replybuffer: *mut core::ffi::c_void, replysize: u32, timeout: u32) -> u32 { 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(), core::mem::transmute(apcroutine), core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), core::mem::transmute(sourceaddress), core::mem::transmute(destinationaddress), core::mem::transmute(requestdata), core::mem::transmute(requestsize), core::mem::transmute(requestoptions.unwrap_or(core::ptr::null())), core::mem::transmute(replybuffer), core::mem::transmute(replysize), core::mem::transmute(timeout)) + IcmpSendEcho2Ex( + core::mem::transmute(icmphandle), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sourceaddress), + core::mem::transmute(destinationaddress), + core::mem::transmute(requestdata), + core::mem::transmute(requestsize), + core::mem::transmute(requestoptions.unwrap_or(core::mem::zeroed())), + core::mem::transmute(replybuffer), + core::mem::transmute(replysize), + core::mem::transmute(timeout), + ) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -900,13 +908,12 @@ pub unsafe fn LookupPersistentUdpPortReservation(startport: u16, numberofports: LookupPersistentUdpPortReservation(core::mem::transmute(startport), core::mem::transmute(numberofports), core::mem::transmute(token)) } #[inline] -pub unsafe fn NhpAllocateAndGetInterfaceInfoFromStack(pptable: *mut *mut IP_INTERFACE_NAME_INFO_W2KSP1, pdwcount: *mut u32, border: P2, hheap: P3, dwflags: u32) -> u32 +pub unsafe fn NhpAllocateAndGetInterfaceInfoFromStack(pptable: *mut *mut IP_INTERFACE_NAME_INFO_W2KSP1, pdwcount: *mut u32, border: P2, hheap: super::super::Foundation::HANDLE, dwflags: u32) -> u32 where P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn NhpAllocateAndGetInterfaceInfoFromStack(pptable : *mut *mut IP_INTERFACE_NAME_INFO_W2KSP1, pdwcount : *mut u32, border : super::super::Foundation:: BOOL, hheap : super::super::Foundation:: HANDLE, dwflags : u32) -> u32); - NhpAllocateAndGetInterfaceInfoFromStack(core::mem::transmute(pptable), core::mem::transmute(pdwcount), border.param().abi(), hheap.param().abi(), core::mem::transmute(dwflags)) + NhpAllocateAndGetInterfaceInfoFromStack(core::mem::transmute(pptable), core::mem::transmute(pdwcount), border.param().abi(), core::mem::transmute(hheap), core::mem::transmute(dwflags)) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -917,7 +924,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(core::ptr::null())), core::mem::transmute(callback), core::mem::transmute(notificationhandle)) + NotifyIfTimestampConfigChange(core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(notificationhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -926,7 +933,7 @@ where P3: 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(core::mem::transmute(family), core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) + NotifyIpInterfaceChange(core::mem::transmute(family), core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -935,7 +942,7 @@ where P2: 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(core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) + NotifyNetworkConnectivityHintChange(core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -973,7 +980,7 @@ where P3: 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(core::mem::transmute(family), core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) + NotifyUnicastIpAddressChange(core::mem::transmute(family), core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -982,7 +989,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(), core::mem::transmute(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()))) + ParseNetworkString(networkstring.param().abi(), core::mem::transmute(types), core::mem::transmute(addressinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(portnumber.unwrap_or(core::mem::zeroed())), core::mem::transmute(prefixlength.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -1032,12 +1039,9 @@ where PfGetInterfaceStatistics(core::mem::transmute(pinterface), core::mem::transmute(ppfstats), core::mem::transmute(pdwbuffersize), fresetcounters.param().abi()) } #[inline] -pub unsafe fn PfMakeLog(hevent: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PfMakeLog(hevent: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfMakeLog(hevent : super::super::Foundation:: HANDLE) -> u32); - PfMakeLog(hevent.param().abi()) + PfMakeLog(core::mem::transmute(hevent)) } #[inline] pub unsafe fn PfRebindFilters(pinterface: *mut core::ffi::c_void, platebindinfo: *mut PF_LATEBIND_INFO) -> u32 { @@ -1077,13 +1081,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(core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), core::mem::transmute(notificationhandle)) + RegisterInterfaceTimestampConfigChange(core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(row), core::mem::transmute(sourceaddress.unwrap_or(core::ptr::null()))) + ResolveIpNetEntry2(core::mem::transmute(row), core::mem::transmute(sourceaddress.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1095,7 +1099,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(core::mem::transmute(poverlapped), core::mem::transmute(lpdwenablecount.unwrap_or(core::ptr::null_mut()))) + RestoreMediaSense(core::mem::transmute(poverlapped), core::mem::transmute(lpdwenablecount.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SendARP(destip: u32, srcip: u32, pmacaddr: *mut core::ffi::c_void, phyaddrlen: *mut u32) -> u32 { @@ -1104,12 +1108,9 @@ pub unsafe fn SendARP(destip: u32, srcip: u32, pmacaddr: *mut core::ffi::c_void, } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn SetCurrentThreadCompartmentId(compartmentid: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SetCurrentThreadCompartmentId(compartmentid: super::Ndis::NET_IF_COMPARTMENT_ID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn SetCurrentThreadCompartmentId(compartmentid : super::Ndis:: NET_IF_COMPARTMENT_ID) -> super::super::Foundation:: WIN32_ERROR); - SetCurrentThreadCompartmentId(compartmentid.param().abi()) + SetCurrentThreadCompartmentId(core::mem::transmute(compartmentid)) } #[inline] pub unsafe fn SetCurrentThreadCompartmentScope(compartmentscope: u32) -> super::super::Foundation::WIN32_ERROR { @@ -1177,23 +1178,18 @@ pub unsafe fn SetIpTTL(nttl: u32) -> u32 { } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn SetJobCompartmentId(jobhandle: P0, compartmentid: P1) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetJobCompartmentId(jobhandle: super::super::Foundation::HANDLE, compartmentid: super::Ndis::NET_IF_COMPARTMENT_ID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn SetJobCompartmentId(jobhandle : super::super::Foundation:: HANDLE, compartmentid : super::Ndis:: NET_IF_COMPARTMENT_ID) -> super::super::Foundation:: WIN32_ERROR); - SetJobCompartmentId(jobhandle.param().abi(), compartmentid.param().abi()) + SetJobCompartmentId(core::mem::transmute(jobhandle), core::mem::transmute(compartmentid)) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn SetNetworkInformation(networkguid: *const windows_core::GUID, compartmentid: P1, networkname: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetNetworkInformation(networkguid: *const windows_core::GUID, compartmentid: super::Ndis::NET_IF_COMPARTMENT_ID, networkname: P2) -> super::super::Foundation::WIN32_ERROR where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn SetNetworkInformation(networkguid : *const windows_core::GUID, compartmentid : super::Ndis:: NET_IF_COMPARTMENT_ID, networkname : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - SetNetworkInformation(core::mem::transmute(networkguid), compartmentid.param().abi(), networkname.param().abi()) + SetNetworkInformation(core::mem::transmute(networkguid), core::mem::transmute(compartmentid), networkname.param().abi()) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1208,12 +1204,9 @@ pub unsafe fn SetPerTcpConnectionEStats(row: *const MIB_TCPROW_LH, estatstype: T } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn SetSessionCompartmentId(sessionid: u32, compartmentid: P1) -> super::super::Foundation::WIN32_ERROR -where - P1: windows_core::Param, -{ +pub unsafe fn SetSessionCompartmentId(sessionid: u32, compartmentid: super::Ndis::NET_IF_COMPARTMENT_ID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn SetSessionCompartmentId(sessionid : u32, compartmentid : super::Ndis:: NET_IF_COMPARTMENT_ID) -> super::super::Foundation:: WIN32_ERROR); - SetSessionCompartmentId(core::mem::transmute(sessionid), compartmentid.param().abi()) + SetSessionCompartmentId(core::mem::transmute(sessionid), core::mem::transmute(compartmentid)) } #[inline] pub unsafe fn SetTcpEntry(ptcprow: *const MIB_TCPROW_LH) -> u32 { @@ -1230,15 +1223,12 @@ 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(core::mem::transmute(poverlapped), core::mem::transmute(lpdwenablecount.unwrap_or(core::ptr::null_mut()))) + UnenableRouter(core::mem::transmute(poverlapped), core::mem::transmute(lpdwenablecount.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn UnregisterInterfaceTimestampConfigChange(notificationhandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterInterfaceTimestampConfigChange(notificationhandle: HIFTIMESTAMPCHANGE) { windows_targets::link!("iphlpapi.dll" "system" fn UnregisterInterfaceTimestampConfigChange(notificationhandle : HIFTIMESTAMPCHANGE)); - UnregisterInterfaceTimestampConfigChange(notificationhandle.param().abi()) + UnregisterInterfaceTimestampConfigChange(core::mem::transmute(notificationhandle)) } #[inline] pub unsafe fn if_indextoname(interfaceindex: u32, interfacename: &mut [u8; 256]) -> windows_core::PSTR { diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs index df1ee95e67..f69de6611d 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs @@ -3241,12 +3241,11 @@ impl IMbnSmsEvents { (windows_core::Interface::vtable(self).OnSmsSendComplete)(windows_core::Interface::as_raw(self), sms.param().abi(), core::mem::transmute(requestid), core::mem::transmute(status)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn OnSmsReadComplete(&self, sms: P0, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY, moremsgs: P3, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()> + pub unsafe fn OnSmsReadComplete(&self, sms: P0, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY, moremsgs: super::super::Foundation::VARIANT_BOOL, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).OnSmsReadComplete)(windows_core::Interface::as_raw(self), sms.param().abi(), core::mem::transmute(smsformat), core::mem::transmute(readmsgs), moremsgs.param().abi(), core::mem::transmute(requestid), core::mem::transmute(status)).ok() + (windows_core::Interface::vtable(self).OnSmsReadComplete)(windows_core::Interface::as_raw(self), sms.param().abi(), core::mem::transmute(smsformat), core::mem::transmute(readmsgs), core::mem::transmute(moremsgs), core::mem::transmute(requestid), core::mem::transmute(status)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn OnSmsNewClass0Message(&self, sms: P0, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> 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 ccbb1c9908..5c895abb5c 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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetAccessAdd(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(recursive), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetAccessEnum(servername.param().abi(), basepath.param().abi(), core::mem::transmute(recursive), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetAccessSetInfo(servername.param().abi(), resource.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + NetApiBufferFree(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(newbytecount), core::mem::transmute(newbuffer)) + NetApiBufferReallocate(core::mem::transmute(oldbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(newbytecount), core::mem::transmute(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(core::mem::transmute(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()))) + NetCreateProvisioningPackage(core::mem::transmute(pprovisioningparams), core::mem::transmute(pppackagebindata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwpackagebindatasize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pppackagetextdata.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + NetErrorLogClear(uncservername.param().abi(), backupfile.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(errorloghandle), core::mem::transmute(offset), core::mem::transmute(reserved2.unwrap_or(core::ptr::null())), core::mem::transmute(reserved3), core::mem::transmute(offsetflag), core::mem::transmute(bufptr), core::mem::transmute(prefmaxsize), core::mem::transmute(bytesread), core::mem::transmute(totalavailable)) + NetErrorLogRead(uncservername.param().abi(), reserved1.param().abi(), core::mem::transmute(errorloghandle), core::mem::transmute(offset), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved3), core::mem::transmute(offsetflag), core::mem::transmute(bufptr), core::mem::transmute(prefmaxsize), core::mem::transmute(bytesread), core::mem::transmute(totalavailable)) } #[inline] pub unsafe fn NetErrorLogWrite(reserved1: Option<*const u8>, code: u32, component: P2, buffer: *const u8, numbytes: u32, msgbuf: *const u8, strcount: u32, reserved2: Option<*const u8>) -> u32 @@ -257,13 +257,13 @@ where P2: 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(core::ptr::null())), core::mem::transmute(code), component.param().abi(), core::mem::transmute(buffer), core::mem::transmute(numbytes), core::mem::transmute(msgbuf), core::mem::transmute(strcount), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))) + NetErrorLogWrite(core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(code), component.param().abi(), core::mem::transmute(buffer), core::mem::transmute(numbytes), core::mem::transmute(msgbuf), core::mem::transmute(strcount), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + NetFreeAadJoinInformation(core::mem::transmute(pjoininfo.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetGroupAdd(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetGroupEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) + NetGroupGetUsers(servername.param().abi(), groupname.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetGroupSetInfo(servername.param().abi(), groupname.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetGroupSetUsers(servername: P0, groupname: P1, level: u32, buf: *const u8, totalentries: u32) -> u32 @@ -429,18 +429,17 @@ 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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetLocalGroupAdd(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NetLocalGroupAddMember(servername: P0, groupname: P1, membersid: P2) -> u32 +pub unsafe fn NetLocalGroupAddMember(servername: P0, groupname: P1, membersid: super::super::Security::PSID) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupAddMember(servername : windows_core::PCWSTR, groupname : windows_core::PCWSTR, membersid : super::super::Security:: PSID) -> u32); - NetLocalGroupAddMember(servername.param().abi(), groupname.param().abi(), membersid.param().abi()) + NetLocalGroupAddMember(servername.param().abi(), groupname.param().abi(), core::mem::transmute(membersid)) } #[inline] pub unsafe fn NetLocalGroupAddMembers(servername: P0, groupname: P1, level: u32, buf: *const u8, totalentries: u32) -> u32 @@ -462,14 +461,13 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NetLocalGroupDelMember(servername: P0, groupname: P1, membersid: P2) -> u32 +pub unsafe fn NetLocalGroupDelMember(servername: P0, groupname: P1, membersid: super::super::Security::PSID) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupDelMember(servername : windows_core::PCWSTR, groupname : windows_core::PCWSTR, membersid : super::super::Security:: PSID) -> u32); - NetLocalGroupDelMember(servername.param().abi(), groupname.param().abi(), membersid.param().abi()) + NetLocalGroupDelMember(servername.param().abi(), groupname.param().abi(), core::mem::transmute(membersid)) } #[inline] pub unsafe fn NetLocalGroupDelMembers(servername: P0, groupname: P1, level: u32, buf: *const u8, totalentries: u32) -> u32 @@ -486,7 +484,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) + NetLocalGroupEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetLocalGroupGetInfo(servername: P0, groupname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -504,7 +502,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) + NetLocalGroupGetMembers(servername.param().abi(), localgroupname.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetLocalGroupSetInfo(servername: P0, groupname: P1, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -513,7 +511,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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetLocalGroupSetInfo(servername.param().abi(), groupname.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetLocalGroupSetMembers(servername: P0, groupname: P1, level: u32, buf: *const u8, totalentries: u32) -> u32 @@ -578,7 +576,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(), core::mem::transmute(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()))) + NetProvisionComputerAccount(lpdomain.param().abi(), lpmachinename.param().abi(), lpmachineaccountou.param().abi(), lpdcname.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(pprovisionbindata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwprovisionbindatasize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprovisiontextdata.unwrap_or(core::mem::zeroed()))) } #[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 +785,7 @@ where P3: 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(), core::mem::transmute(dwprovisionoptions), lpwindowspath.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + NetRequestProvisioningPackageInstall(core::mem::transmute(ppackagebindata.as_ptr()), ppackagebindata.len().try_into().unwrap(), core::mem::transmute(dwprovisionoptions), lpwindowspath.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetScheduleJobAdd(servername: P0, buffer: *mut u8, jobid: *mut u32) -> u32 @@ -846,7 +844,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetServerDiskEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[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: P7, resume_handle: Option<*mut u32>) -> u32 @@ -855,7 +853,7 @@ where P7: 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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(servertype), domain.param().abi(), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetServerEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(servertype), domain.param().abi(), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetServerGetInfo(servername: P0, level: u32, bufptr: *mut *mut u8) -> u32 @@ -871,7 +869,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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parmerror.unwrap_or(core::ptr::null_mut()))) + NetServerSetInfo(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parmerror.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetServerTransportAdd(servername: P0, level: u32, bufptr: *const u8) -> u32 @@ -903,7 +901,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetServerTransportEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetServiceControl(servername: P0, service: P1, opcode: u32, arg: u32, bufptr: *mut *mut u8) -> u32 @@ -920,7 +918,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetServiceEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetServiceGetInfo(servername: P0, service: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -964,7 +962,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(core::ptr::null())), core::mem::transmute(levelflags), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetUseAdd(core::mem::transmute(servername.unwrap_or(core::mem::zeroed())), core::mem::transmute(levelflags), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetUseDel(uncservername: P0, usename: P1, forcelevelflags: FORCE_LEVEL_FLAGS) -> u32 @@ -981,7 +979,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(), core::mem::transmute(levelflags), core::mem::transmute(bufptr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preferedmaximumsize), core::mem::transmute(entriesread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) + NetUseEnum(uncservername.param().abi(), core::mem::transmute(levelflags), core::mem::transmute(bufptr.unwrap_or(core::mem::zeroed())), core::mem::transmute(preferedmaximumsize), core::mem::transmute(entriesread.unwrap_or(core::mem::zeroed())), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetUseGetInfo(uncservername: P0, usename: P1, levelflags: u32, bufptr: Option<*mut *mut u8>) -> u32 @@ -990,7 +988,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(), core::mem::transmute(levelflags), core::mem::transmute(bufptr.unwrap_or(core::ptr::null_mut()))) + NetUseGetInfo(uncservername.param().abi(), usename.param().abi(), core::mem::transmute(levelflags), core::mem::transmute(bufptr.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetUserAdd(servername: P0, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -998,7 +996,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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetUserAdd(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetUserChangePassword(domainname: P0, username: P1, oldpassword: P2, newpassword: P3) -> u32 @@ -1026,7 +1024,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(), core::mem::transmute(level), core::mem::transmute(filter), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetUserEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(filter), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[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 +1067,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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetUserModalsSet(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetUserSetGroups(servername: P0, username: P1, level: u32, buf: *const u8, num_entries: u32) -> u32 @@ -1087,7 +1085,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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetUserSetInfo(servername.param().abi(), username.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetValidateName(lpserver: P0, lpname: P1, lpaccount: P2, lppassword: P3, nametype: NETSETUP_NAME_TYPE) -> u32 @@ -1119,7 +1117,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(), core::mem::transmute(level), core::mem::transmute(bufptr.unwrap_or(core::ptr::null_mut()))) + NetWkstaGetInfo(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetWkstaSetInfo(servername: P0, level: u32, buffer: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -1127,12 +1125,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(), core::mem::transmute(level), core::mem::transmute(buffer), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetWkstaSetInfo(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buffer), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetWkstaTransportAdd(core::mem::transmute(servername.unwrap_or(core::mem::zeroed())), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetWkstaTransportDel(servername: P0, transportname: P1, ucond: FORCE_LEVEL_FLAGS) -> u32 @@ -1146,7 +1144,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(core::ptr::null())), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetWkstaTransportEnum(core::mem::transmute(servername.unwrap_or(core::mem::zeroed())), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[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 +1152,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(), core::mem::transmute(level), core::mem::transmute(bufptr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) + NetWkstaUserEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr.unwrap_or(core::mem::zeroed())), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread.unwrap_or(core::mem::zeroed())), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetWkstaUserGetInfo(reserved: P0, level: u32, bufptr: *mut *mut u8) -> u32 @@ -1170,7 +1168,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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetWkstaUserSetInfo(reserved.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RouterAssert(pszfailedassertion: P0, pszfilename: P1, dwlinenumber: u32, pszmessage: P3) @@ -1193,104 +1191,76 @@ pub unsafe fn RouterGetErrorStringW(dwerrorcode: u32, lplpwszerrorstring: *mut w RouterGetErrorStringW(core::mem::transmute(dwerrorcode), core::mem::transmute(lplpwszerrorstring)) } #[inline] -pub unsafe fn RouterLogDeregisterA(hloghandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn RouterLogDeregisterA(hloghandle: super::super::Foundation::HANDLE) { windows_targets::link!("rtutils.dll" "system" fn RouterLogDeregisterA(hloghandle : super::super::Foundation:: HANDLE)); - RouterLogDeregisterA(hloghandle.param().abi()) + RouterLogDeregisterA(core::mem::transmute(hloghandle)) } #[inline] -pub unsafe fn RouterLogDeregisterW(hloghandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn RouterLogDeregisterW(hloghandle: super::super::Foundation::HANDLE) { windows_targets::link!("rtutils.dll" "system" fn RouterLogDeregisterW(hloghandle : super::super::Foundation:: HANDLE)); - RouterLogDeregisterW(hloghandle.param().abi()) + RouterLogDeregisterW(core::mem::transmute(hloghandle)) } #[inline] -pub unsafe fn RouterLogEventA(hloghandle: P0, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCSTR]>, dwerrorcode: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn RouterLogEventA(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCSTR]>, dwerrorcode: u32) { windows_targets::link!("rtutils.dll" "system" fn RouterLogEventA(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const windows_core::PCSTR, dwerrorcode : u32)); - RouterLogEventA(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plpszsubstringarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(dwerrorcode)) + RouterLogEventA(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plpszsubstringarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(dwerrorcode)) } #[inline] -pub unsafe fn RouterLogEventDataA(hloghandle: P0, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCSTR]>, dwdatabytes: u32, lpdatabytes: *mut u8) -where - P0: windows_core::Param, -{ +pub unsafe fn RouterLogEventDataA(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCSTR]>, dwdatabytes: u32, lpdatabytes: *mut u8) { windows_targets::link!("rtutils.dll" "system" fn RouterLogEventDataA(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const windows_core::PCSTR, dwdatabytes : u32, lpdatabytes : *mut u8)); - RouterLogEventDataA(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plpszsubstringarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(dwdatabytes), core::mem::transmute(lpdatabytes)) + RouterLogEventDataA(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plpszsubstringarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(dwdatabytes), core::mem::transmute(lpdatabytes)) } #[inline] -pub unsafe fn RouterLogEventDataW(hloghandle: P0, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCWSTR]>, dwdatabytes: u32, lpdatabytes: *mut u8) -where - P0: windows_core::Param, -{ +pub unsafe fn RouterLogEventDataW(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCWSTR]>, dwdatabytes: u32, lpdatabytes: *mut u8) { windows_targets::link!("rtutils.dll" "system" fn RouterLogEventDataW(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const windows_core::PCWSTR, dwdatabytes : u32, lpdatabytes : *mut u8)); - RouterLogEventDataW(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plpszsubstringarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(dwdatabytes), core::mem::transmute(lpdatabytes)) + RouterLogEventDataW(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plpszsubstringarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(dwdatabytes), core::mem::transmute(lpdatabytes)) } #[inline] -pub unsafe fn RouterLogEventExA(hloghandle: P0, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4) +pub unsafe fn RouterLogEventExA(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4) where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("rtutils.dll" "cdecl" fn RouterLogEventExA(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwerrorcode : u32, dwmessageid : u32, ptszformat : windows_core::PCSTR)); - RouterLogEventExA(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwerrorcode), core::mem::transmute(dwmessageid), ptszformat.param().abi()) + RouterLogEventExA(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwerrorcode), core::mem::transmute(dwmessageid), ptszformat.param().abi()) } #[inline] -pub unsafe fn RouterLogEventExW(hloghandle: P0, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4) +pub unsafe fn RouterLogEventExW(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4) where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("rtutils.dll" "cdecl" fn RouterLogEventExW(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwerrorcode : u32, dwmessageid : u32, ptszformat : windows_core::PCWSTR)); - RouterLogEventExW(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwerrorcode), core::mem::transmute(dwmessageid), ptszformat.param().abi()) + RouterLogEventExW(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwerrorcode), core::mem::transmute(dwmessageid), ptszformat.param().abi()) } #[inline] -pub unsafe fn RouterLogEventStringA(hloghandle: P0, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: &[windows_core::PCSTR], dwerrorcode: u32, dwerrorindex: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn RouterLogEventStringA(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: &[windows_core::PCSTR], dwerrorcode: u32, dwerrorindex: u32) { windows_targets::link!("rtutils.dll" "system" fn RouterLogEventStringA(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const windows_core::PCSTR, dwerrorcode : u32, dwerrorindex : u32)); - RouterLogEventStringA(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.len().try_into().unwrap(), core::mem::transmute(plpszsubstringarray.as_ptr()), core::mem::transmute(dwerrorcode), core::mem::transmute(dwerrorindex)) + RouterLogEventStringA(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.len().try_into().unwrap(), core::mem::transmute(plpszsubstringarray.as_ptr()), core::mem::transmute(dwerrorcode), core::mem::transmute(dwerrorindex)) } #[inline] -pub unsafe fn RouterLogEventStringW(hloghandle: P0, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: &[windows_core::PCWSTR], dwerrorcode: u32, dwerrorindex: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn RouterLogEventStringW(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: &[windows_core::PCWSTR], dwerrorcode: u32, dwerrorindex: u32) { windows_targets::link!("rtutils.dll" "system" fn RouterLogEventStringW(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const windows_core::PCWSTR, dwerrorcode : u32, dwerrorindex : u32)); - RouterLogEventStringW(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.len().try_into().unwrap(), core::mem::transmute(plpszsubstringarray.as_ptr()), core::mem::transmute(dwerrorcode), core::mem::transmute(dwerrorindex)) + RouterLogEventStringW(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.len().try_into().unwrap(), core::mem::transmute(plpszsubstringarray.as_ptr()), core::mem::transmute(dwerrorcode), core::mem::transmute(dwerrorindex)) } #[inline] -pub unsafe fn RouterLogEventValistExA(hloghandle: P0, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4, arglist: *mut i8) +pub unsafe fn RouterLogEventValistExA(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4, arglist: *mut i8) where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("rtutils.dll" "system" fn RouterLogEventValistExA(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwerrorcode : u32, dwmessageid : u32, ptszformat : windows_core::PCSTR, arglist : *mut i8)); - RouterLogEventValistExA(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwerrorcode), core::mem::transmute(dwmessageid), ptszformat.param().abi(), core::mem::transmute(arglist)) + RouterLogEventValistExA(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwerrorcode), core::mem::transmute(dwmessageid), ptszformat.param().abi(), core::mem::transmute(arglist)) } #[inline] -pub unsafe fn RouterLogEventValistExW(hloghandle: P0, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4, arglist: *mut i8) +pub unsafe fn RouterLogEventValistExW(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwerrorcode: u32, dwmessageid: u32, ptszformat: P4, arglist: *mut i8) where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("rtutils.dll" "system" fn RouterLogEventValistExW(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwerrorcode : u32, dwmessageid : u32, ptszformat : windows_core::PCWSTR, arglist : *mut i8)); - RouterLogEventValistExW(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwerrorcode), core::mem::transmute(dwmessageid), ptszformat.param().abi(), core::mem::transmute(arglist)) + RouterLogEventValistExW(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwerrorcode), core::mem::transmute(dwmessageid), ptszformat.param().abi(), core::mem::transmute(arglist)) } #[inline] -pub unsafe fn RouterLogEventW(hloghandle: P0, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCWSTR]>, dwerrorcode: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn RouterLogEventW(hloghandle: super::super::Foundation::HANDLE, dweventtype: u32, dwmessageid: u32, plpszsubstringarray: Option<&[windows_core::PCWSTR]>, dwerrorcode: u32) { windows_targets::link!("rtutils.dll" "system" fn RouterLogEventW(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const windows_core::PCWSTR, dwerrorcode : u32)); - RouterLogEventW(hloghandle.param().abi(), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plpszsubstringarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(dwerrorcode)) + RouterLogEventW(core::mem::transmute(hloghandle), core::mem::transmute(dweventtype), core::mem::transmute(dwmessageid), plpszsubstringarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plpszsubstringarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(dwerrorcode)) } #[inline] pub unsafe fn RouterLogRegisterA(lpszsource: P0) -> super::super::Foundation::HANDLE @@ -2878,7 +2848,7 @@ windows_core::imp::define_interface!(IEnumNetCfgBindingInterface, IEnumNetCfgBin 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -2887,7 +2857,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -2939,7 +2909,7 @@ windows_core::imp::define_interface!(IEnumNetCfgBindingPath, IEnumNetCfgBindingP 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -2948,7 +2918,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3000,7 +2970,7 @@ windows_core::imp::define_interface!(IEnumNetCfgComponent, 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -3009,7 +2979,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3063,7 +3033,7 @@ windows_core::imp::define_interface!(INetCfg, INetCfg_Vtbl, 0xc0e8ae93_306e_11d1 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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Uninitialize(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Uninitialize)(windows_core::Interface::as_raw(self)).ok() @@ -3075,16 +3045,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), core::mem::transmute(pguidclass), core::mem::transmute(ppenumcomponent.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidclass), core::mem::transmute(ppenumcomponent.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed()))).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), core::mem::transmute(pguidclass), core::mem::transmute(riid), core::mem::transmute(ppvobject.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).QueryNetCfgClass)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidclass), core::mem::transmute(riid), core::mem::transmute(ppvobject.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3157,13 +3127,13 @@ windows_core::imp::define_interface!(INetCfgBindingInterface, INetCfgBindingInte 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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwinterfacename.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetUpperComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnccitem.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLowerComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnccitem.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3229,17 +3199,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPathToken)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwpathtoken.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOwner)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomponent.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumBindingInterfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenuminterface.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3328,10 +3298,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(core::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::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenumcomponent.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3368,25 +3338,22 @@ impl windows_core::RuntimeName for INetCfgClass {} windows_core::imp::define_interface!(INetCfgClassSetup, INetCfgClassSetup_Vtbl, 0xc0e8ae9d_306e_11d1_aacf_00805fc1270e); windows_core::imp::interface_hierarchy!(INetCfgClassSetup, windows_core::IUnknown); impl INetCfgClassSetup { - pub unsafe fn SelectAndInstall(&self, hwndparent: P0, pobotoken: Option<*const OBO_TOKEN>, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> - 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(core::ptr::null())), core::mem::transmute(ppnccitem.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn SelectAndInstall(&self, hwndparent: super::super::Foundation::HWND, pobotoken: Option<*const OBO_TOKEN>, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectAndInstall)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(pobotoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppnccitem.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn Install(&self, pszwinfid: P0, pobotoken: Option<*const OBO_TOKEN>, dwsetupflags: u32, dwupgradefrombuildno: u32, pszwanswerfile: P4, pszwanswersections: P5, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> + pub unsafe fn Install(&self, pszwinfid: P0, pobotoken: Option<*const OBO_TOKEN>, dwsetupflags: Option, dwupgradefrombuildno: Option, pszwanswerfile: P4, pszwanswersections: P5, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).Install)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), core::mem::transmute(pobotoken.unwrap_or(core::ptr::null())), core::mem::transmute(dwsetupflags), core::mem::transmute(dwupgradefrombuildno), pszwanswerfile.param().abi(), pszwanswersections.param().abi(), core::mem::transmute(ppnccitem.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(dwsetupflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwupgradefrombuildno.unwrap_or(core::mem::zeroed())), pszwanswerfile.param().abi(), pszwanswersections.param().abi(), core::mem::transmute(ppnccitem.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(pmszwrefs.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pmszwrefs.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3436,11 +3403,11 @@ impl core::ops::Deref for INetCfgClassSetup2 { } windows_core::imp::interface_hierarchy!(INetCfgClassSetup2, windows_core::IUnknown, INetCfgClassSetup); impl INetCfgClassSetup2 { - pub unsafe fn UpdateNonEnumeratedComponent(&self, picomp: P0, dwsetupflags: u32, dwupgradefrombuildno: u32) -> windows_core::Result<()> + pub unsafe fn UpdateNonEnumeratedComponent(&self, picomp: P0, dwsetupflags: Option, dwupgradefrombuildno: Option) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateNonEnumeratedComponent)(windows_core::Interface::as_raw(self), picomp.param().abi(), core::mem::transmute(dwsetupflags), core::mem::transmute(dwupgradefrombuildno)).ok() + (windows_core::Interface::vtable(self).UpdateNonEnumeratedComponent)(windows_core::Interface::as_raw(self), picomp.param().abi(), core::mem::transmute(dwsetupflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwupgradefrombuildno.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3468,7 +3435,7 @@ windows_core::imp::define_interface!(INetCfgComponent, INetCfgComponent_Vtbl, 0x 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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwdisplayname.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetDisplayName(&self, pszwdisplayname: P0) -> windows_core::Result<()> where @@ -3477,26 +3444,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetHelpText)(windows_core::Interface::as_raw(self), core::mem::transmute(pszwhelptext.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetId)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwid.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInstanceGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPnpDevNodeId)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwdevnodeid.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetClassGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBindName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwbindname.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetDeviceStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3504,14 +3471,13 @@ 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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).OpenParamKey)(windows_core::Interface::as_raw(self), core::mem::transmute(phkey.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn RaisePropertyUi(&self, hwndparent: P0, dwflags: u32, punkcontext: P2) -> windows_core::Result<()> + pub unsafe fn RaisePropertyUi(&self, hwndparent: Option, dwflags: u32, punkcontext: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).RaisePropertyUi)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(dwflags), punkcontext.param().abi()).ok() + (windows_core::Interface::vtable(self).RaisePropertyUi)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), punkcontext.param().abi()).ok() } } #[repr(C)] @@ -3667,7 +3633,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), core::mem::transmute(dwflags), core::mem::transmute(ppienum.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumBindingPaths)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), core::mem::transmute(ppienum.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn MoveBefore(&self, pncbitemsrc: P0, pncbitemdest: P1) -> windows_core::Result<()> where @@ -3965,17 +3931,11 @@ impl INetCfgComponentPropertyUi { { (windows_core::Interface::vtable(self).SetContext)(windows_core::Interface::as_raw(self), punkreserved.param().abi()).ok() } - pub unsafe fn MergePropPages(&self, pdwdefpages: *mut u32, pahpspprivate: *mut *mut u8, pcpages: *mut u32, hwndparent: P3, pszstartpage: Option<*const windows_core::PCWSTR>) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).MergePropPages)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwdefpages), core::mem::transmute(pahpspprivate), core::mem::transmute(pcpages), hwndparent.param().abi(), core::mem::transmute(pszstartpage.unwrap_or(core::ptr::null()))).ok() + pub unsafe fn MergePropPages(&self, pdwdefpages: *mut u32, pahpspprivate: *mut *mut u8, pcpages: *mut u32, hwndparent: super::super::Foundation::HWND, pszstartpage: Option<*const windows_core::PCWSTR>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).MergePropPages)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwdefpages), core::mem::transmute(pahpspprivate), core::mem::transmute(pcpages), core::mem::transmute(hwndparent), core::mem::transmute(pszstartpage.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn ValidateProperties(&self, hwndsheet: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ValidateProperties)(windows_core::Interface::as_raw(self), hwndsheet.param().abi()).ok() + pub unsafe fn ValidateProperties(&self, hwndsheet: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ValidateProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndsheet)).ok() } pub unsafe fn ApplyProperties(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ApplyProperties)(windows_core::Interface::as_raw(self)).ok() @@ -4164,7 +4124,7 @@ impl INetCfgComponentUpperEdge { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetInterfaceIdsForAdapter)(windows_core::Interface::as_raw(self), padapter.param().abi(), core::mem::transmute(pdwnuminterfaces), core::mem::transmute(ppguidinterfaceids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInterfaceIdsForAdapter)(windows_core::Interface::as_raw(self), padapter.param().abi(), core::mem::transmute(pdwnuminterfaces), core::mem::transmute(ppguidinterfaceids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddInterfacesToAdapter(&self, padapter: P0, dwnuminterfaces: u32) -> windows_core::Result<()> where @@ -4224,13 +4184,13 @@ impl INetCfgLock { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AcquireWriteLock)(windows_core::Interface::as_raw(self), core::mem::transmute(cmstimeout), pszwclientdescription.param().abi(), core::mem::transmute(ppszwclientdescription.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AcquireWriteLock)(windows_core::Interface::as_raw(self), core::mem::transmute(cmstimeout), pszwclientdescription.param().abi(), core::mem::transmute(ppszwclientdescription.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsWriteLocked)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwclientdescription.unwrap_or(core::mem::zeroed()))).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 577b3a40e3..ac368264a1 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs @@ -1,11 +1,10 @@ #[inline] -pub unsafe fn MatchEnumTag(hmodule: P0, pwcarg: P1, dwnumarg: u32, penumtable: *const TOKEN_VALUE, pdwvalue: *mut u32) -> u32 +pub unsafe fn MatchEnumTag(hmodule: super::super::Foundation::HANDLE, pwcarg: P1, dwnumarg: u32, penumtable: *const TOKEN_VALUE, pdwvalue: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("netsh.dll" "system" fn MatchEnumTag(hmodule : super::super::Foundation:: HANDLE, pwcarg : windows_core::PCWSTR, dwnumarg : u32, penumtable : *const TOKEN_VALUE, pdwvalue : *mut u32) -> u32); - MatchEnumTag(hmodule.param().abi(), pwcarg.param().abi(), core::mem::transmute(dwnumarg), core::mem::transmute(penumtable), core::mem::transmute(pdwvalue)) + MatchEnumTag(core::mem::transmute(hmodule), pwcarg.param().abi(), core::mem::transmute(dwnumarg), core::mem::transmute(penumtable), core::mem::transmute(pdwvalue)) } #[inline] pub unsafe fn MatchToken(pwszusertoken: P0, pwszcmdtoken: P1) -> super::super::Foundation::BOOL @@ -17,20 +16,14 @@ where MatchToken(pwszusertoken.param().abi(), pwszcmdtoken.param().abi()) } #[inline] -pub unsafe fn PreprocessCommand(hmodule: P0, ppwcarguments: &mut [windows_core::PWSTR], dwcurrentindex: u32, ptttags: Option<&mut [TAG_TYPE]>, dwminargs: u32, dwmaxargs: u32, pdwtagtype: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PreprocessCommand(hmodule: Option, ppwcarguments: &mut [windows_core::PWSTR], dwcurrentindex: u32, ptttags: Option<&mut [TAG_TYPE]>, dwminargs: u32, dwmaxargs: u32, pdwtagtype: Option<*mut u32>) -> u32 { 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()), core::mem::transmute(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()), core::mem::transmute(dwminargs), core::mem::transmute(dwmaxargs), core::mem::transmute(pdwtagtype.unwrap_or(core::ptr::null_mut()))) + PreprocessCommand(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwcarguments.as_ptr()), core::mem::transmute(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()), core::mem::transmute(dwminargs), core::mem::transmute(dwmaxargs), core::mem::transmute(pdwtagtype.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PrintError(hmodule: P0, dwerrid: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PrintError(hmodule: super::super::Foundation::HANDLE, dwerrid: u32) -> u32 { windows_targets::link!("netsh.dll" "cdecl" fn PrintError(hmodule : super::super::Foundation:: HANDLE, dwerrid : u32) -> u32); - PrintError(hmodule.param().abi(), core::mem::transmute(dwerrid)) + PrintError(core::mem::transmute(hmodule), core::mem::transmute(dwerrid)) } #[inline] pub unsafe fn PrintMessage(pwszformat: P0) -> u32 @@ -41,12 +34,9 @@ where PrintMessage(pwszformat.param().abi()) } #[inline] -pub unsafe fn PrintMessageFromModule(hmodule: P0, dwmsgid: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PrintMessageFromModule(hmodule: super::super::Foundation::HANDLE, dwmsgid: u32) -> u32 { windows_targets::link!("netsh.dll" "cdecl" fn PrintMessageFromModule(hmodule : super::super::Foundation:: HANDLE, dwmsgid : u32) -> u32); - PrintMessageFromModule(hmodule.param().abi(), core::mem::transmute(dwmsgid)) + PrintMessageFromModule(core::mem::transmute(hmodule), core::mem::transmute(dwmsgid)) } #[inline] pub unsafe fn RegisterContext(pchildcontext: *const NS_CONTEXT_ATTRIBUTES) -> 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 e2a3597465..bf038b2217 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 P5: 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(core::ptr::null())), appid.param().abi(), core::mem::transmute(handle)).ok() + NdfCreateGroupingIncident(cloudname.param().abi(), groupname.param().abi(), identity.param().abi(), invitation.param().abi(), core::mem::transmute(addresses.unwrap_or(core::mem::zeroed())), appid.param().abi(), core::mem::transmute(handle)).ok() } #[inline] pub unsafe fn NdfCreateIncident(helperclassname: P0, attributes: &[HELPER_ATTRIBUTE], handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -86,14 +86,13 @@ where } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security"))] #[inline] -pub unsafe fn NdfCreateWinSockIncident(sock: P0, host: P1, port: u16, appid: P3, userid: Option<*const super::super::Security::SID>, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn NdfCreateWinSockIncident(sock: super::super::Networking::WinSock::SOCKET, host: P1, port: u16, appid: P3, userid: Option<*const super::super::Security::SID>, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: 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(), core::mem::transmute(port), appid.param().abi(), core::mem::transmute(userid.unwrap_or(core::ptr::null())), core::mem::transmute(handle)).ok() + NdfCreateWinSockIncident(core::mem::transmute(sock), host.param().abi(), core::mem::transmute(port), appid.param().abi(), core::mem::transmute(userid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { @@ -101,12 +100,9 @@ pub unsafe fn NdfDiagnoseIncident(handle: *const core::ffi::c_void, rootcausecou NdfDiagnoseIncident(core::mem::transmute(handle), core::mem::transmute(rootcausecount), core::mem::transmute(rootcauses), core::mem::transmute(dwwait), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NdfExecuteDiagnosis(handle: *const core::ffi::c_void, hwnd: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn NdfExecuteDiagnosis(handle: *const core::ffi::c_void, hwnd: Option) -> windows_core::Result<()> { windows_targets::link!("ndfapi.dll" "system" fn NdfExecuteDiagnosis(handle : *const core::ffi::c_void, hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - NdfExecuteDiagnosis(core::mem::transmute(handle), hwnd.param().abi()).ok() + NdfExecuteDiagnosis(core::mem::transmute(handle), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn NdfGetTraceFile(handle: *const core::ffi::c_void) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkPolicyServer/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkPolicyServer/mod.rs index a95ccf630e..47080b3fef 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkPolicyServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkPolicyServer/mod.rs @@ -822,11 +822,8 @@ impl ISdoMachine2 { pub unsafe fn EnableTemplates(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableTemplates)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SyncConfigAgainstTemplates(&self, bstrservicename: &windows_core::BSTR, ppconfigroot: *mut Option, pptemplatesroot: *mut Option, bforcedsync: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).SyncConfigAgainstTemplates)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrservicename), core::mem::transmute(ppconfigroot), core::mem::transmute(pptemplatesroot), bforcedsync.param().abi()).ok() + pub unsafe fn SyncConfigAgainstTemplates(&self, bstrservicename: &windows_core::BSTR, ppconfigroot: *mut Option, pptemplatesroot: *mut Option, bforcedsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SyncConfigAgainstTemplates)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrservicename), core::mem::transmute(ppconfigroot), core::mem::transmute(pptemplatesroot), core::mem::transmute(bforcedsync)).ok() } pub unsafe fn ImportRemoteTemplates(&self, plocaltemplatesroot: P0, bstrremotemachinename: &windows_core::BSTR) -> windows_core::Result<()> where 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 9736fd8a0d..423758d35b 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(core::mem::transmute(prootcert), core::mem::transmute(plocalcert.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + DrtCreateDerivedKeySecurityProvider(core::mem::transmute(prootcert), core::mem::transmute(plocalcert.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn DrtCreateDnsBootstrapResolver(port: u16, pwszaddress: P1) -> windows_core::Result<*mut DRT_BOOTSTRAP_PROVIDER> @@ -131,25 +131,19 @@ pub unsafe fn DrtGetSearchResultSize(hsearchcontext: *const core::ffi::c_void) - DrtGetSearchResultSize(core::mem::transmute(hsearchcontext), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DrtOpen(psettings: *const DRT_SETTINGS, hevent: P1, pvcontext: Option<*const core::ffi::c_void>, phdrt: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn DrtOpen(psettings: *const DRT_SETTINGS, hevent: Option, pvcontext: Option<*const core::ffi::c_void>, phdrt: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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(core::mem::transmute(psettings), hevent.param().abi(), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), core::mem::transmute(phdrt)).ok() + DrtOpen(core::mem::transmute(psettings), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hdrt), core::mem::transmute(pregistration), core::mem::transmute(pvkeycontext.unwrap_or(core::ptr::null())), core::mem::transmute(phkeyregistration)).ok() + DrtRegisterKey(core::mem::transmute(hdrt), core::mem::transmute(pregistration), core::mem::transmute(pvkeycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P4, pvcontext: Option<*const core::ffi::c_void>, hsearchcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn DrtStartSearch(hdrt: *const core::ffi::c_void, pkey: *const DRT_DATA, pinfo: Option<*const DRT_SEARCH_INFO>, timeout: u32, hevent: super::super::Foundation::HANDLE, pvcontext: Option<*const core::ffi::c_void>, hsearchcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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(core::mem::transmute(hdrt), core::mem::transmute(pkey), core::mem::transmute(pinfo.unwrap_or(core::ptr::null())), core::mem::transmute(timeout), hevent.param().abi(), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), core::mem::transmute(hsearchcontext)).ok() + DrtStartSearch(core::mem::transmute(hdrt), core::mem::transmute(pkey), core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout), core::mem::transmute(hevent), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(hsearchcontext)).ok() } #[inline] pub unsafe fn DrtUnregisterKey(hkeyregistration: *const core::ffi::c_void) { @@ -167,41 +161,29 @@ 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(core::ptr::null_mut()))).ok() + PeerCollabAddContact(pwzcontactdata.param().abi(), core::mem::transmute(ppcontact.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn PeerCollabAsyncInviteContact(pccontact: Option<*const PEER_CONTACT>, pcendpoint: *const PEER_ENDPOINT, pcinvitation: *const PEER_INVITATION, hevent: P3, phinvitation: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn PeerCollabAsyncInviteContact(pccontact: Option<*const PEER_CONTACT>, pcendpoint: *const PEER_ENDPOINT, pcinvitation: *const PEER_INVITATION, hevent: Option, phinvitation: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(pcendpoint), core::mem::transmute(pcinvitation), hevent.param().abi(), core::mem::transmute(phinvitation.unwrap_or(core::ptr::null_mut()))).ok() + PeerCollabAsyncInviteContact(core::mem::transmute(pccontact.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcendpoint), core::mem::transmute(pcinvitation), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), core::mem::transmute(phinvitation.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn PeerCollabAsyncInviteEndpoint(pcendpoint: *const PEER_ENDPOINT, pcinvitation: *const PEER_INVITATION, hevent: P2, phinvitation: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn PeerCollabAsyncInviteEndpoint(pcendpoint: *const PEER_ENDPOINT, pcinvitation: *const PEER_INVITATION, hevent: Option, phinvitation: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> { 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(core::mem::transmute(pcendpoint), core::mem::transmute(pcinvitation), hevent.param().abi(), core::mem::transmute(phinvitation.unwrap_or(core::ptr::null_mut()))).ok() + PeerCollabAsyncInviteEndpoint(core::mem::transmute(pcendpoint), core::mem::transmute(pcinvitation), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), core::mem::transmute(phinvitation.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn PeerCollabCancelInvitation(hinvitation: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PeerCollabCancelInvitation(hinvitation: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabCancelInvitation(hinvitation : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - PeerCollabCancelInvitation(hinvitation.param().abi()).ok() + PeerCollabCancelInvitation(core::mem::transmute(hinvitation)).ok() } #[inline] -pub unsafe fn PeerCollabCloseHandle(hinvitation: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PeerCollabCloseHandle(hinvitation: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabCloseHandle(hinvitation : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - PeerCollabCloseHandle(hinvitation.param().abi()).ok() + PeerCollabCloseHandle(core::mem::transmute(hinvitation)).ok() } #[inline] pub unsafe fn PeerCollabDeleteContact(pwzpeername: P0) -> windows_core::Result<()> @@ -231,7 +213,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(core::ptr::null())), core::mem::transmute(papplicationid.unwrap_or(core::ptr::null())), core::mem::transmute(phpeerenum)).ok() + PeerCollabEnumApplications(core::mem::transmute(pcendpoint.unwrap_or(core::mem::zeroed())), core::mem::transmute(papplicationid.unwrap_or(core::mem::zeroed())), core::mem::transmute(phpeerenum)).ok() } #[inline] pub unsafe fn PeerCollabEnumContacts(phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -241,13 +223,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(core::ptr::null())), core::mem::transmute(phpeerenum)).ok() + PeerCollabEnumEndpoints(core::mem::transmute(pccontact.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(pobjectid.unwrap_or(core::ptr::null())), core::mem::transmute(phpeerenum)).ok() + PeerCollabEnumObjects(core::mem::transmute(pcendpoint.unwrap_or(core::mem::zeroed())), core::mem::transmute(pobjectid.unwrap_or(core::mem::zeroed())), core::mem::transmute(phpeerenum)).ok() } #[inline] pub unsafe fn PeerCollabEnumPeopleNearMe(phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -299,20 +281,17 @@ pub unsafe fn PeerCollabGetEventData(hpeerevent: *const core::ffi::c_void) -> wi PeerCollabGetEventData(core::mem::transmute(hpeerevent), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn PeerCollabGetInvitationResponse(hinvitation: P0) -> windows_core::Result<*mut PEER_INVITATION_RESPONSE> -where - P0: windows_core::Param, -{ +pub unsafe fn PeerCollabGetInvitationResponse(hinvitation: super::super::Foundation::HANDLE) -> windows_core::Result<*mut PEER_INVITATION_RESPONSE> { windows_targets::link!("p2p.dll" "system" fn PeerCollabGetInvitationResponse(hinvitation : super::super::Foundation:: HANDLE, ppinvitationresponse : *mut *mut PEER_INVITATION_RESPONSE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PeerCollabGetInvitationResponse(hinvitation.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + PeerCollabGetInvitationResponse(core::mem::transmute(hinvitation), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + PeerCollabGetPresenceInfo(core::mem::transmute(pcendpoint.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn PeerCollabGetSigninOptions() -> windows_core::Result { @@ -325,7 +304,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(core::ptr::null())), core::mem::transmute(pcendpoint), core::mem::transmute(pcinvitation), &mut result__).map(|| core::mem::transmute(result__)) + PeerCollabInviteContact(core::mem::transmute(pccontact.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcendpoint), core::mem::transmute(pcinvitation), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -348,7 +327,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(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + PeerCollabQueryContactData(core::mem::transmute(pcendpoint.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -362,12 +341,9 @@ pub unsafe fn PeerCollabRegisterApplication(pcapplication: *const PEER_APPLICATI PeerCollabRegisterApplication(core::mem::transmute(pcapplication), core::mem::transmute(registrationtype)).ok() } #[inline] -pub unsafe fn PeerCollabRegisterEvent(hevent: P0, peventregistrations: &[PEER_COLLAB_EVENT_REGISTRATION], phpeerevent: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PeerCollabRegisterEvent(hevent: super::super::Foundation::HANDLE, peventregistrations: &[PEER_COLLAB_EVENT_REGISTRATION], phpeerevent: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabRegisterEvent(hevent : super::super::Foundation:: HANDLE, ceventregistration : u32, peventregistrations : *const PEER_COLLAB_EVENT_REGISTRATION, phpeerevent : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerCollabRegisterEvent(hevent.param().abi(), peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() + PeerCollabRegisterEvent(core::mem::transmute(hevent), peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() } #[inline] pub unsafe fn PeerCollabSetEndpointName(pwzendpointname: P0) -> windows_core::Result<()> @@ -393,12 +369,9 @@ pub unsafe fn PeerCollabShutdown() -> windows_core::Result<()> { PeerCollabShutdown().ok() } #[inline] -pub unsafe fn PeerCollabSignin(hwndparent: P0, dwsigninoptions: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PeerCollabSignin(hwndparent: Option, dwsigninoptions: u32) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabSignin(hwndparent : super::super::Foundation:: HWND, dwsigninoptions : u32) -> windows_core::HRESULT); - PeerCollabSignin(hwndparent.param().abi(), core::mem::transmute(dwsigninoptions)).ok() + PeerCollabSignin(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsigninoptions)).ok() } #[inline] pub unsafe fn PeerCollabSignout(dwsigninoptions: u32) -> windows_core::Result<()> { @@ -469,7 +442,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(core::mem::transmute(hpeerdist), core::mem::transmute(hcontenthandle), core::mem::transmute(poverlapped.unwrap_or(core::ptr::null()))) + PeerDistClientCancelAsyncOperation(core::mem::transmute(hpeerdist), core::mem::transmute(hcontenthandle), core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PeerDistClientCloseContent(hpeerdist: isize, hcontenthandle: isize) -> u32 { @@ -484,12 +457,9 @@ pub unsafe fn PeerDistClientCompleteContentInformation(hpeerdist: isize, hconten } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn PeerDistClientFlushContent(hpeerdist: isize, pcontenttag: *const PEERDIST_CONTENT_TAG, hcompletionport: P2, ulcompletionkey: usize, lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn PeerDistClientFlushContent(hpeerdist: isize, pcontenttag: *const PEERDIST_CONTENT_TAG, hcompletionport: Option, ulcompletionkey: Option, lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistClientFlushContent(hpeerdist : isize, pcontenttag : *const PEERDIST_CONTENT_TAG, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, lpoverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistClientFlushContent(core::mem::transmute(hpeerdist), core::mem::transmute(pcontenttag), hcompletionport.param().abi(), core::mem::transmute(ulcompletionkey), core::mem::transmute(lpoverlapped)) + PeerDistClientFlushContent(core::mem::transmute(hpeerdist), core::mem::transmute(pcontenttag), core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped)) } #[inline] pub unsafe fn PeerDistClientGetInformationByHandle(hpeerdist: isize, hcontenthandle: isize, peerdistclientinfoclass: PEERDIST_CLIENT_INFO_BY_HANDLE_CLASS, dwbuffersize: u32, lpinformation: *mut core::ffi::c_void) -> u32 { @@ -497,12 +467,9 @@ pub unsafe fn PeerDistClientGetInformationByHandle(hpeerdist: isize, hcontenthan PeerDistClientGetInformationByHandle(core::mem::transmute(hpeerdist), core::mem::transmute(hcontenthandle), core::mem::transmute(peerdistclientinfoclass), core::mem::transmute(dwbuffersize), core::mem::transmute(lpinformation)) } #[inline] -pub unsafe fn PeerDistClientOpenContent(hpeerdist: isize, pcontenttag: *const PEERDIST_CONTENT_TAG, hcompletionport: P2, ulcompletionkey: usize, phcontenthandle: *mut isize) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn PeerDistClientOpenContent(hpeerdist: isize, pcontenttag: *const PEERDIST_CONTENT_TAG, hcompletionport: Option, ulcompletionkey: Option, phcontenthandle: *mut isize) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistClientOpenContent(hpeerdist : isize, pcontenttag : *const PEERDIST_CONTENT_TAG, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, phcontenthandle : *mut isize) -> u32); - PeerDistClientOpenContent(core::mem::transmute(hpeerdist), core::mem::transmute(pcontenttag), hcompletionport.param().abi(), core::mem::transmute(ulcompletionkey), core::mem::transmute(phcontenthandle)) + PeerDistClientOpenContent(core::mem::transmute(hpeerdist), core::mem::transmute(pcontenttag), core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcontenthandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -531,21 +498,15 @@ pub unsafe fn PeerDistGetStatusEx(hpeerdist: isize, ppeerdiststatus: *mut PEERDI } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn PeerDistRegisterForStatusChangeNotification(hpeerdist: isize, hcompletionport: P1, ulcompletionkey: usize, lpoverlapped: *const super::super::System::IO::OVERLAPPED, ppeerdiststatus: *mut PEERDIST_STATUS) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn PeerDistRegisterForStatusChangeNotification(hpeerdist: isize, hcompletionport: Option, ulcompletionkey: Option, lpoverlapped: *const super::super::System::IO::OVERLAPPED, ppeerdiststatus: *mut PEERDIST_STATUS) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistRegisterForStatusChangeNotification(hpeerdist : isize, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, ppeerdiststatus : *mut PEERDIST_STATUS) -> u32); - PeerDistRegisterForStatusChangeNotification(core::mem::transmute(hpeerdist), hcompletionport.param().abi(), core::mem::transmute(ulcompletionkey), core::mem::transmute(lpoverlapped), core::mem::transmute(ppeerdiststatus)) + PeerDistRegisterForStatusChangeNotification(core::mem::transmute(hpeerdist), core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped), core::mem::transmute(ppeerdiststatus)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn PeerDistRegisterForStatusChangeNotificationEx(hpeerdist: isize, hcompletionport: P1, ulcompletionkey: usize, lpoverlapped: *const super::super::System::IO::OVERLAPPED, ppeerdiststatus: *mut PEERDIST_STATUS_INFO) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn PeerDistRegisterForStatusChangeNotificationEx(hpeerdist: isize, hcompletionport: Option, ulcompletionkey: Option, lpoverlapped: *const super::super::System::IO::OVERLAPPED, ppeerdiststatus: *mut PEERDIST_STATUS_INFO) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistRegisterForStatusChangeNotificationEx(hpeerdist : isize, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, ppeerdiststatus : *mut PEERDIST_STATUS_INFO) -> u32); - PeerDistRegisterForStatusChangeNotificationEx(core::mem::transmute(hpeerdist), hcompletionport.param().abi(), core::mem::transmute(ulcompletionkey), core::mem::transmute(lpoverlapped), core::mem::transmute(ppeerdiststatus)) + PeerDistRegisterForStatusChangeNotificationEx(core::mem::transmute(hpeerdist), core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped), core::mem::transmute(ppeerdiststatus)) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -564,20 +525,14 @@ pub unsafe fn PeerDistServerCloseStreamHandle(hpeerdist: isize, hstream: isize) PeerDistServerCloseStreamHandle(core::mem::transmute(hpeerdist), core::mem::transmute(hstream)) } #[inline] -pub unsafe fn PeerDistServerOpenContentInformation(hpeerdist: isize, pcontentidentifier: &[u8], ullcontentoffset: u64, cbcontentlength: u64, hcompletionport: P5, ulcompletionkey: usize, phcontentinfo: *mut isize) -> u32 -where - P5: windows_core::Param, -{ +pub unsafe fn PeerDistServerOpenContentInformation(hpeerdist: isize, pcontentidentifier: &[u8], ullcontentoffset: u64, cbcontentlength: u64, hcompletionport: Option, ulcompletionkey: Option, phcontentinfo: *mut isize) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistServerOpenContentInformation(hpeerdist : isize, cbcontentidentifier : u32, pcontentidentifier : *const u8, ullcontentoffset : u64, cbcontentlength : u64, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, phcontentinfo : *mut isize) -> u32); - PeerDistServerOpenContentInformation(core::mem::transmute(hpeerdist), pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), core::mem::transmute(ullcontentoffset), core::mem::transmute(cbcontentlength), hcompletionport.param().abi(), core::mem::transmute(ulcompletionkey), core::mem::transmute(phcontentinfo)) + PeerDistServerOpenContentInformation(core::mem::transmute(hpeerdist), pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), core::mem::transmute(ullcontentoffset), core::mem::transmute(cbcontentlength), core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcontentinfo)) } #[inline] -pub unsafe fn PeerDistServerOpenContentInformationEx(hpeerdist: isize, pcontentidentifier: &[u8], ullcontentoffset: u64, cbcontentlength: u64, pretrievaloptions: *const PEERDIST_RETRIEVAL_OPTIONS, hcompletionport: P6, ulcompletionkey: usize, phcontentinfo: *mut isize) -> u32 -where - P6: windows_core::Param, -{ +pub unsafe fn PeerDistServerOpenContentInformationEx(hpeerdist: isize, pcontentidentifier: &[u8], ullcontentoffset: u64, cbcontentlength: u64, pretrievaloptions: *const PEERDIST_RETRIEVAL_OPTIONS, hcompletionport: Option, ulcompletionkey: Option, phcontentinfo: *mut isize) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistServerOpenContentInformationEx(hpeerdist : isize, cbcontentidentifier : u32, pcontentidentifier : *const u8, ullcontentoffset : u64, cbcontentlength : u64, pretrievaloptions : *const PEERDIST_RETRIEVAL_OPTIONS, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, phcontentinfo : *mut isize) -> u32); - PeerDistServerOpenContentInformationEx(core::mem::transmute(hpeerdist), pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), core::mem::transmute(ullcontentoffset), core::mem::transmute(cbcontentlength), core::mem::transmute(pretrievaloptions), hcompletionport.param().abi(), core::mem::transmute(ulcompletionkey), core::mem::transmute(phcontentinfo)) + PeerDistServerOpenContentInformationEx(core::mem::transmute(hpeerdist), pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), core::mem::transmute(ullcontentoffset), core::mem::transmute(cbcontentlength), core::mem::transmute(pretrievaloptions), core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcontentinfo)) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -592,12 +547,9 @@ pub unsafe fn PeerDistServerPublishCompleteStream(hpeerdist: isize, hstream: isi PeerDistServerPublishCompleteStream(core::mem::transmute(hpeerdist), core::mem::transmute(hstream), core::mem::transmute(lpoverlapped)) } #[inline] -pub unsafe fn PeerDistServerPublishStream(hpeerdist: isize, pcontentidentifier: &[u8], cbcontentlength: u64, ppublishoptions: Option<*const PEERDIST_PUBLICATION_OPTIONS>, hcompletionport: P5, ulcompletionkey: usize, phstream: *mut isize) -> u32 -where - P5: windows_core::Param, -{ +pub unsafe fn PeerDistServerPublishStream(hpeerdist: isize, pcontentidentifier: &[u8], cbcontentlength: u64, ppublishoptions: Option<*const PEERDIST_PUBLICATION_OPTIONS>, hcompletionport: Option, ulcompletionkey: Option, phstream: *mut isize) -> u32 { 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(core::mem::transmute(hpeerdist), pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), core::mem::transmute(cbcontentlength), core::mem::transmute(ppublishoptions.unwrap_or(core::ptr::null())), hcompletionport.param().abi(), core::mem::transmute(ulcompletionkey), core::mem::transmute(phstream)) + PeerDistServerPublishStream(core::mem::transmute(hpeerdist), pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), core::mem::transmute(cbcontentlength), core::mem::transmute(ppublishoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(hcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcompletionkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phstream)) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -618,7 +570,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(core::mem::transmute(dwversionrequested), core::mem::transmute(phpeerdist), core::mem::transmute(pdwsupportedversion.unwrap_or(core::ptr::null_mut()))) + PeerDistStartup(core::mem::transmute(dwversionrequested), core::mem::transmute(phpeerdist), core::mem::transmute(pdwsupportedversion.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PeerDistUnregisterForStatusChangeNotification(hpeerdist: isize) -> u32 { @@ -646,7 +598,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(core::ptr::null()))) + PeerFreeData(core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PeerGetItemCount(hpeerenum: *const core::ffi::c_void) -> windows_core::Result { @@ -691,7 +643,7 @@ where P1: 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(core::mem::transmute(pgraphproperties), pwzdatabasename.param().abi(), core::mem::transmute(psecurityinterface.unwrap_or(core::ptr::null())), core::mem::transmute(phgraph)).ok() + PeerGraphCreate(core::mem::transmute(pgraphproperties), pwzdatabasename.param().abi(), core::mem::transmute(psecurityinterface.unwrap_or(core::mem::zeroed())), core::mem::transmute(phgraph)).ok() } #[inline] pub unsafe fn PeerGraphDelete(pwzgraphid: P0, pwzpeerid: P1, pwzdatabasename: P2) -> windows_core::Result<()> @@ -735,7 +687,7 @@ where P2: 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(core::mem::transmute(hgraph), core::mem::transmute(precordtype.unwrap_or(core::ptr::null())), pwzpeerid.param().abi(), core::mem::transmute(phpeerenum)).ok() + PeerGraphEnumRecords(core::mem::transmute(hgraph), core::mem::transmute(precordtype.unwrap_or(core::mem::zeroed())), pwzpeerid.param().abi(), core::mem::transmute(phpeerenum)).ok() } #[inline] pub unsafe fn PeerGraphExportDatabase(hgraph: *const core::ffi::c_void, pwzfilepath: P1) -> windows_core::Result<()> @@ -801,9 +753,9 @@ where PeerGraphImportDatabase(core::mem::transmute(hgraph), pwzfilepath.param().abi()).ok() } #[inline] -pub unsafe fn PeerGraphListen(hgraph: *const core::ffi::c_void, dwscope: u32, dwscopeid: u32, wport: u16) -> windows_core::Result<()> { +pub unsafe fn PeerGraphListen(hgraph: *const core::ffi::c_void, dwscope: Option, dwscopeid: Option, wport: Option) -> windows_core::Result<()> { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphListen(hgraph : *const core::ffi::c_void, dwscope : u32, dwscopeid : u32, wport : u16) -> windows_core::HRESULT); - PeerGraphListen(core::mem::transmute(hgraph), core::mem::transmute(dwscope), core::mem::transmute(dwscopeid), core::mem::transmute(wport)).ok() + PeerGraphListen(core::mem::transmute(hgraph), core::mem::transmute(dwscope.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwscopeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(wport.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn PeerGraphOpen(pwzgraphid: P0, pwzpeerid: P1, pwzdatabasename: P2, psecurityinterface: Option<*const PEER_SECURITY_INTERFACE>, precordtypesyncprecedence: Option<&[windows_core::GUID]>, phgraph: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -813,7 +765,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(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())), core::mem::transmute(phgraph)).ok() + PeerGraphOpen(pwzgraphid.param().abi(), pwzpeerid.param().abi(), pwzdatabasename.param().abi(), core::mem::transmute(psecurityinterface.unwrap_or(core::mem::zeroed())), 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())), core::mem::transmute(phgraph)).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -832,12 +784,9 @@ pub unsafe fn PeerGraphPeerTimeToUniversalTime(hgraph: *const core::ffi::c_void, PeerGraphPeerTimeToUniversalTime(core::mem::transmute(hgraph), core::mem::transmute(pftpeertime), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn PeerGraphRegisterEvent(hgraph: *const core::ffi::c_void, hevent: P1, peventregistrations: &[PEER_GRAPH_EVENT_REGISTRATION], phpeerevent: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn PeerGraphRegisterEvent(hgraph: *const core::ffi::c_void, hevent: super::super::Foundation::HANDLE, peventregistrations: &[PEER_GRAPH_EVENT_REGISTRATION], phpeerevent: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphRegisterEvent(hgraph : *const core::ffi::c_void, hevent : super::super::Foundation:: HANDLE, ceventregistrations : u32, peventregistrations : *const PEER_GRAPH_EVENT_REGISTRATION, phpeerevent : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerGraphRegisterEvent(core::mem::transmute(hgraph), hevent.param().abi(), peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() + PeerGraphRegisterEvent(core::mem::transmute(hgraph), core::mem::transmute(hevent), peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() } #[inline] pub unsafe fn PeerGraphSearchRecords(hgraph: *const core::ffi::c_void, pwzcriteria: P1, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -944,7 +893,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(core::mem::transmute(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(|| core::mem::transmute(result__)) + PeerGroupCreateInvitation(core::mem::transmute(hgroup), pwzidentityinfo.param().abi(), core::mem::transmute(pftexpiration.unwrap_or(core::mem::zeroed())), 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(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn PeerGroupCreatePasswordInvitation(hgroup: *const core::ffi::c_void) -> windows_core::Result { @@ -982,7 +931,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(core::mem::transmute(hgroup), core::mem::transmute(precordtype.unwrap_or(core::ptr::null())), core::mem::transmute(phpeerenum)).ok() + PeerGroupEnumRecords(core::mem::transmute(hgroup), core::mem::transmute(precordtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(phpeerenum)).ok() } #[inline] pub unsafe fn PeerGroupExportConfig(hgroup: *const core::ffi::c_void, pwzpassword: P1) -> windows_core::Result @@ -1050,7 +999,7 @@ where P1: 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(core::mem::transmute(hgroup), pwzsubjectidentity.param().abi(), core::mem::transmute(pcredentialinfo.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(ppwzinvitation.unwrap_or(core::ptr::null_mut()))).ok() + PeerGroupIssueCredentials(core::mem::transmute(hgroup), pwzsubjectidentity.param().abi(), core::mem::transmute(pcredentialinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(ppwzinvitation.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn PeerGroupJoin(pwzidentity: P0, pwzinvitation: P1, pwzcloud: P2, phgroup: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1110,12 +1059,9 @@ pub unsafe fn PeerGroupPeerTimeToUniversalTime(hgroup: *const core::ffi::c_void, PeerGroupPeerTimeToUniversalTime(core::mem::transmute(hgroup), core::mem::transmute(pftpeertime), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn PeerGroupRegisterEvent(hgroup: *const core::ffi::c_void, hevent: P1, peventregistrations: &[PEER_GROUP_EVENT_REGISTRATION], phpeerevent: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn PeerGroupRegisterEvent(hgroup: *const core::ffi::c_void, hevent: super::super::Foundation::HANDLE, peventregistrations: &[PEER_GROUP_EVENT_REGISTRATION], phpeerevent: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerGroupRegisterEvent(hgroup : *const core::ffi::c_void, hevent : super::super::Foundation:: HANDLE, ceventregistration : u32, peventregistrations : *const PEER_GROUP_EVENT_REGISTRATION, phpeerevent : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerGroupRegisterEvent(core::mem::transmute(hgroup), hevent.param().abi(), peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() + PeerGroupRegisterEvent(core::mem::transmute(hgroup), core::mem::transmute(hevent), peventregistrations.len().try_into().unwrap(), core::mem::transmute(peventregistrations.as_ptr()), core::mem::transmute(phpeerevent)).ok() } #[inline] pub unsafe fn PeerGroupResumePasswordAuthentication(hgroup: *const core::ffi::c_void, hpeereventhandle: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1177,14 +1123,14 @@ where PeerHostNameToPeerName(pwzhostname.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn PeerIdentityCreate(pwzclassifier: P0, pwzfriendlyname: P1, hcryptprov: usize) -> windows_core::Result +pub unsafe fn PeerIdentityCreate(pwzclassifier: P0, pwzfriendlyname: P1, hcryptprov: Option) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerIdentityCreate(pwzclassifier : windows_core::PCWSTR, pwzfriendlyname : windows_core::PCWSTR, hcryptprov : usize, ppwzidentity : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PeerIdentityCreate(pwzclassifier.param().abi(), pwzfriendlyname.param().abi(), core::mem::transmute(hcryptprov), &mut result__).map(|| core::mem::transmute(result__)) + PeerIdentityCreate(pwzclassifier.param().abi(), pwzfriendlyname.param().abi(), core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn PeerIdentityDelete(pwzidentity: P0) -> windows_core::Result<()> @@ -1289,7 +1235,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(core::ptr::null())), core::mem::transmute(phregistration)).ok() + PeerPnrpRegister(pcwzpeername.param().abi(), core::mem::transmute(pregistrationinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(phregistration)).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1307,14 +1253,13 @@ pub unsafe fn PeerPnrpShutdown() -> windows_core::Result<()> { PeerPnrpShutdown().ok() } #[inline] -pub unsafe fn PeerPnrpStartResolve(pcwzpeername: P0, pcwzcloudname: P1, cmaxendpoints: u32, hevent: P3, phresolve: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn PeerPnrpStartResolve(pcwzpeername: P0, pcwzcloudname: P1, cmaxendpoints: Option, hevent: super::super::Foundation::HANDLE, phresolve: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerPnrpStartResolve(pcwzpeername : windows_core::PCWSTR, pcwzcloudname : windows_core::PCWSTR, cmaxendpoints : u32, hevent : super::super::Foundation:: HANDLE, phresolve : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerPnrpStartResolve(pcwzpeername.param().abi(), pcwzcloudname.param().abi(), core::mem::transmute(cmaxendpoints), hevent.param().abi(), core::mem::transmute(phresolve)).ok() + PeerPnrpStartResolve(pcwzpeername.param().abi(), pcwzcloudname.param().abi(), core::mem::transmute(cmaxendpoints.unwrap_or(core::mem::zeroed())), core::mem::transmute(hevent), core::mem::transmute(phresolve)).ok() } #[inline] pub unsafe fn PeerPnrpStartup(wversionrequested: u16) -> windows_core::Result<()> { 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 fc9293ded3..17ce3bad16 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs @@ -1,29 +1,19 @@ #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn QOSAddSocketToFlow(qoshandle: P0, socket: P1, destaddr: Option<*const super::super::Networking::WinSock::SOCKADDR>, traffictype: QOS_TRAFFIC_TYPE, flags: u32, flowid: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn QOSAddSocketToFlow(qoshandle: super::super::Foundation::HANDLE, socket: super::super::Networking::WinSock::SOCKET, destaddr: Option<*const super::super::Networking::WinSock::SOCKADDR>, traffictype: QOS_TRAFFIC_TYPE, flags: Option, flowid: *mut u32) -> super::super::Foundation::BOOL { 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(core::ptr::null())), core::mem::transmute(traffictype), core::mem::transmute(flags), core::mem::transmute(flowid)) + QOSAddSocketToFlow(core::mem::transmute(qoshandle), core::mem::transmute(socket), core::mem::transmute(destaddr.unwrap_or(core::mem::zeroed())), core::mem::transmute(traffictype), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(flowid)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn QOSCancel(qoshandle: P0, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QOSCancel(qoshandle: super::super::Foundation::HANDLE, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { windows_targets::link!("qwave.dll" "system" fn QOSCancel(qoshandle : super::super::Foundation:: HANDLE, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - QOSCancel(qoshandle.param().abi(), core::mem::transmute(overlapped)) + QOSCancel(core::mem::transmute(qoshandle), core::mem::transmute(overlapped)) } #[inline] -pub unsafe fn QOSCloseHandle(qoshandle: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QOSCloseHandle(qoshandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("qwave.dll" "system" fn QOSCloseHandle(qoshandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - QOSCloseHandle(qoshandle.param().abi()) + QOSCloseHandle(core::mem::transmute(qoshandle)) } #[inline] pub unsafe fn QOSCreateHandle(version: *const QOS_VERSION, qoshandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -31,180 +21,120 @@ pub unsafe fn QOSCreateHandle(version: *const QOS_VERSION, qoshandle: *mut super QOSCreateHandle(core::mem::transmute(version), core::mem::transmute(qoshandle)) } #[inline] -pub unsafe fn QOSEnumerateFlows(qoshandle: P0, size: *mut u32, buffer: *mut core::ffi::c_void) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QOSEnumerateFlows(qoshandle: super::super::Foundation::HANDLE, size: *mut u32, buffer: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("qwave.dll" "system" fn QOSEnumerateFlows(qoshandle : super::super::Foundation:: HANDLE, size : *mut u32, buffer : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - QOSEnumerateFlows(qoshandle.param().abi(), core::mem::transmute(size), core::mem::transmute(buffer)) + QOSEnumerateFlows(core::mem::transmute(qoshandle), core::mem::transmute(size), core::mem::transmute(buffer)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn QOSNotifyFlow(qoshandle: P0, flowid: u32, operation: QOS_NOTIFY_FLOW, size: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, flags: u32, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QOSNotifyFlow(qoshandle: super::super::Foundation::HANDLE, flowid: u32, operation: QOS_NOTIFY_FLOW, size: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, flags: Option, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(flowid), core::mem::transmute(operation), core::mem::transmute(size.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + QOSNotifyFlow(core::mem::transmute(qoshandle), core::mem::transmute(flowid), core::mem::transmute(operation), core::mem::transmute(size.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn QOSQueryFlow(qoshandle: P0, flowid: u32, operation: QOS_QUERY_FLOW, size: *mut u32, buffer: *mut core::ffi::c_void, flags: u32, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QOSQueryFlow(qoshandle: super::super::Foundation::HANDLE, flowid: u32, operation: QOS_QUERY_FLOW, size: *mut u32, buffer: *mut core::ffi::c_void, flags: Option, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(flowid), core::mem::transmute(operation), core::mem::transmute(size), core::mem::transmute(buffer), core::mem::transmute(flags), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + QOSQueryFlow(core::mem::transmute(qoshandle), core::mem::transmute(flowid), core::mem::transmute(operation), core::mem::transmute(size), core::mem::transmute(buffer), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn QOSRemoveSocketFromFlow(qoshandle: P0, socket: P1, flowid: u32, flags: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn QOSRemoveSocketFromFlow(qoshandle: super::super::Foundation::HANDLE, socket: Option, flowid: u32, flags: Option) -> super::super::Foundation::BOOL { windows_targets::link!("qwave.dll" "system" fn QOSRemoveSocketFromFlow(qoshandle : super::super::Foundation:: HANDLE, socket : super::super::Networking::WinSock:: SOCKET, flowid : u32, flags : u32) -> super::super::Foundation:: BOOL); - QOSRemoveSocketFromFlow(qoshandle.param().abi(), socket.param().abi(), core::mem::transmute(flowid), core::mem::transmute(flags)) + QOSRemoveSocketFromFlow(core::mem::transmute(qoshandle), core::mem::transmute(socket.unwrap_or(core::mem::zeroed())), core::mem::transmute(flowid), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn QOSSetFlow(qoshandle: P0, flowid: u32, operation: QOS_SET_FLOW, size: u32, buffer: *const core::ffi::c_void, flags: u32, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QOSSetFlow(qoshandle: super::super::Foundation::HANDLE, flowid: u32, operation: QOS_SET_FLOW, size: u32, buffer: *const core::ffi::c_void, flags: Option, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(flowid), core::mem::transmute(operation), core::mem::transmute(size), core::mem::transmute(buffer), core::mem::transmute(flags), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + QOSSetFlow(core::mem::transmute(qoshandle), core::mem::transmute(flowid), core::mem::transmute(operation), core::mem::transmute(size), core::mem::transmute(buffer), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn QOSStartTrackingClient(qoshandle: P0, destaddr: *const super::super::Networking::WinSock::SOCKADDR, flags: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QOSStartTrackingClient(qoshandle: super::super::Foundation::HANDLE, destaddr: *const super::super::Networking::WinSock::SOCKADDR, flags: Option) -> super::super::Foundation::BOOL { windows_targets::link!("qwave.dll" "system" fn QOSStartTrackingClient(qoshandle : super::super::Foundation:: HANDLE, destaddr : *const super::super::Networking::WinSock:: SOCKADDR, flags : u32) -> super::super::Foundation:: BOOL); - QOSStartTrackingClient(qoshandle.param().abi(), core::mem::transmute(destaddr), core::mem::transmute(flags)) + QOSStartTrackingClient(core::mem::transmute(qoshandle), core::mem::transmute(destaddr), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn QOSStopTrackingClient(qoshandle: P0, destaddr: *const super::super::Networking::WinSock::SOCKADDR, flags: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QOSStopTrackingClient(qoshandle: super::super::Foundation::HANDLE, destaddr: *const super::super::Networking::WinSock::SOCKADDR, flags: Option) -> super::super::Foundation::BOOL { windows_targets::link!("qwave.dll" "system" fn QOSStopTrackingClient(qoshandle : super::super::Foundation:: HANDLE, destaddr : *const super::super::Networking::WinSock:: SOCKADDR, flags : u32) -> super::super::Foundation:: BOOL); - QOSStopTrackingClient(qoshandle.param().abi(), core::mem::transmute(destaddr), core::mem::transmute(flags)) + QOSStopTrackingClient(core::mem::transmute(qoshandle), core::mem::transmute(destaddr), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn TcAddFilter(flowhandle: P0, pgenericfilter: *const TC_GEN_FILTER, pfilterhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcAddFilter(flowhandle: super::super::Foundation::HANDLE, pgenericfilter: *const TC_GEN_FILTER, pfilterhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcAddFilter(flowhandle : super::super::Foundation:: HANDLE, pgenericfilter : *const TC_GEN_FILTER, pfilterhandle : *mut super::super::Foundation:: HANDLE) -> u32); - TcAddFilter(flowhandle.param().abi(), core::mem::transmute(pgenericfilter), core::mem::transmute(pfilterhandle)) + TcAddFilter(core::mem::transmute(flowhandle), core::mem::transmute(pgenericfilter), core::mem::transmute(pfilterhandle)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn TcAddFlow(ifchandle: P0, clflowctx: P1, flags: u32, pgenericflow: *const TC_GEN_FLOW, pflowhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn TcAddFlow(ifchandle: super::super::Foundation::HANDLE, clflowctx: super::super::Foundation::HANDLE, flags: u32, pgenericflow: *const TC_GEN_FLOW, pflowhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcAddFlow(ifchandle : super::super::Foundation:: HANDLE, clflowctx : super::super::Foundation:: HANDLE, flags : u32, pgenericflow : *const TC_GEN_FLOW, pflowhandle : *mut super::super::Foundation:: HANDLE) -> u32); - TcAddFlow(ifchandle.param().abi(), clflowctx.param().abi(), core::mem::transmute(flags), core::mem::transmute(pgenericflow), core::mem::transmute(pflowhandle)) + TcAddFlow(core::mem::transmute(ifchandle), core::mem::transmute(clflowctx), core::mem::transmute(flags), core::mem::transmute(pgenericflow), core::mem::transmute(pflowhandle)) } #[inline] -pub unsafe fn TcCloseInterface(ifchandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcCloseInterface(ifchandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcCloseInterface(ifchandle : super::super::Foundation:: HANDLE) -> u32); - TcCloseInterface(ifchandle.param().abi()) + TcCloseInterface(core::mem::transmute(ifchandle)) } #[inline] -pub unsafe fn TcDeleteFilter(filterhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcDeleteFilter(filterhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcDeleteFilter(filterhandle : super::super::Foundation:: HANDLE) -> u32); - TcDeleteFilter(filterhandle.param().abi()) + TcDeleteFilter(core::mem::transmute(filterhandle)) } #[inline] -pub unsafe fn TcDeleteFlow(flowhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcDeleteFlow(flowhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcDeleteFlow(flowhandle : super::super::Foundation:: HANDLE) -> u32); - TcDeleteFlow(flowhandle.param().abi()) + TcDeleteFlow(core::mem::transmute(flowhandle)) } #[inline] -pub unsafe fn TcDeregisterClient(clienthandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcDeregisterClient(clienthandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcDeregisterClient(clienthandle : super::super::Foundation:: HANDLE) -> u32); - TcDeregisterClient(clienthandle.param().abi()) + TcDeregisterClient(core::mem::transmute(clienthandle)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn TcEnumerateFlows(ifchandle: P0, penumhandle: *mut super::super::Foundation::HANDLE, pflowcount: *mut u32, pbufsize: *mut u32, buffer: *mut ENUMERATION_BUFFER) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcEnumerateFlows(ifchandle: super::super::Foundation::HANDLE, penumhandle: *mut super::super::Foundation::HANDLE, pflowcount: *mut u32, pbufsize: *mut u32, buffer: *mut ENUMERATION_BUFFER) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcEnumerateFlows(ifchandle : super::super::Foundation:: HANDLE, penumhandle : *mut super::super::Foundation:: HANDLE, pflowcount : *mut u32, pbufsize : *mut u32, buffer : *mut ENUMERATION_BUFFER) -> u32); - TcEnumerateFlows(ifchandle.param().abi(), core::mem::transmute(penumhandle), core::mem::transmute(pflowcount), core::mem::transmute(pbufsize), core::mem::transmute(buffer)) + TcEnumerateFlows(core::mem::transmute(ifchandle), core::mem::transmute(penumhandle), core::mem::transmute(pflowcount), core::mem::transmute(pbufsize), core::mem::transmute(buffer)) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn TcEnumerateInterfaces(clienthandle: P0, pbuffersize: *mut u32, interfacebuffer: *mut TC_IFC_DESCRIPTOR) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcEnumerateInterfaces(clienthandle: super::super::Foundation::HANDLE, pbuffersize: *mut u32, interfacebuffer: *mut TC_IFC_DESCRIPTOR) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcEnumerateInterfaces(clienthandle : super::super::Foundation:: HANDLE, pbuffersize : *mut u32, interfacebuffer : *mut TC_IFC_DESCRIPTOR) -> u32); - TcEnumerateInterfaces(clienthandle.param().abi(), core::mem::transmute(pbuffersize), core::mem::transmute(interfacebuffer)) + TcEnumerateInterfaces(core::mem::transmute(clienthandle), core::mem::transmute(pbuffersize), core::mem::transmute(interfacebuffer)) } #[inline] -pub unsafe fn TcGetFlowNameA(flowhandle: P0, pflowname: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcGetFlowNameA(flowhandle: super::super::Foundation::HANDLE, pflowname: &mut [u8]) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcGetFlowNameA(flowhandle : super::super::Foundation:: HANDLE, strsize : u32, pflowname : windows_core::PSTR) -> u32); - TcGetFlowNameA(flowhandle.param().abi(), pflowname.len().try_into().unwrap(), core::mem::transmute(pflowname.as_ptr())) + TcGetFlowNameA(core::mem::transmute(flowhandle), pflowname.len().try_into().unwrap(), core::mem::transmute(pflowname.as_ptr())) } #[inline] -pub unsafe fn TcGetFlowNameW(flowhandle: P0, pflowname: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcGetFlowNameW(flowhandle: super::super::Foundation::HANDLE, pflowname: &mut [u16]) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcGetFlowNameW(flowhandle : super::super::Foundation:: HANDLE, strsize : u32, pflowname : windows_core::PWSTR) -> u32); - TcGetFlowNameW(flowhandle.param().abi(), pflowname.len().try_into().unwrap(), core::mem::transmute(pflowname.as_ptr())) + TcGetFlowNameW(core::mem::transmute(flowhandle), pflowname.len().try_into().unwrap(), core::mem::transmute(pflowname.as_ptr())) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn TcModifyFlow(flowhandle: P0, pgenericflow: *const TC_GEN_FLOW) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcModifyFlow(flowhandle: super::super::Foundation::HANDLE, pgenericflow: *const TC_GEN_FLOW) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcModifyFlow(flowhandle : super::super::Foundation:: HANDLE, pgenericflow : *const TC_GEN_FLOW) -> u32); - TcModifyFlow(flowhandle.param().abi(), core::mem::transmute(pgenericflow)) + TcModifyFlow(core::mem::transmute(flowhandle), core::mem::transmute(pgenericflow)) } #[inline] -pub unsafe fn TcOpenInterfaceA(pinterfacename: P0, clienthandle: P1, clifcctx: P2, pifchandle: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn TcOpenInterfaceA(pinterfacename: P0, clienthandle: super::super::Foundation::HANDLE, clifcctx: super::super::Foundation::HANDLE, pifchandle: *mut super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("traffic.dll" "system" fn TcOpenInterfaceA(pinterfacename : windows_core::PCSTR, clienthandle : super::super::Foundation:: HANDLE, clifcctx : super::super::Foundation:: HANDLE, pifchandle : *mut super::super::Foundation:: HANDLE) -> u32); - TcOpenInterfaceA(pinterfacename.param().abi(), clienthandle.param().abi(), clifcctx.param().abi(), core::mem::transmute(pifchandle)) + TcOpenInterfaceA(pinterfacename.param().abi(), core::mem::transmute(clienthandle), core::mem::transmute(clifcctx), core::mem::transmute(pifchandle)) } #[inline] -pub unsafe fn TcOpenInterfaceW(pinterfacename: P0, clienthandle: P1, clifcctx: P2, pifchandle: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn TcOpenInterfaceW(pinterfacename: P0, clienthandle: super::super::Foundation::HANDLE, clifcctx: super::super::Foundation::HANDLE, pifchandle: *mut super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("traffic.dll" "system" fn TcOpenInterfaceW(pinterfacename : windows_core::PCWSTR, clienthandle : super::super::Foundation:: HANDLE, clifcctx : super::super::Foundation:: HANDLE, pifchandle : *mut super::super::Foundation:: HANDLE) -> u32); - TcOpenInterfaceW(pinterfacename.param().abi(), clienthandle.param().abi(), clifcctx.param().abi(), core::mem::transmute(pifchandle)) + TcOpenInterfaceW(pinterfacename.param().abi(), core::mem::transmute(clienthandle), core::mem::transmute(clifcctx), core::mem::transmute(pifchandle)) } #[inline] pub unsafe fn TcQueryFlowA(pflowname: P0, pguidparam: *const windows_core::GUID, pbuffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 @@ -223,21 +153,17 @@ where TcQueryFlowW(pflowname.param().abi(), core::mem::transmute(pguidparam), core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn TcQueryInterface(ifchandle: P0, pguidparam: *const windows_core::GUID, notifychange: P2, pbuffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 +pub unsafe fn TcQueryInterface(ifchandle: super::super::Foundation::HANDLE, pguidparam: *const windows_core::GUID, notifychange: P2, pbuffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("traffic.dll" "system" fn TcQueryInterface(ifchandle : super::super::Foundation:: HANDLE, pguidparam : *const windows_core::GUID, notifychange : super::super::Foundation:: BOOLEAN, pbuffersize : *mut u32, buffer : *mut core::ffi::c_void) -> u32); - TcQueryInterface(ifchandle.param().abi(), core::mem::transmute(pguidparam), notifychange.param().abi(), core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) + TcQueryInterface(core::mem::transmute(ifchandle), core::mem::transmute(pguidparam), notifychange.param().abi(), core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn TcRegisterClient(tciversion: u32, clregctx: P1, clienthandlerlist: *const TCI_CLIENT_FUNC_LIST, pclienthandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn TcRegisterClient(tciversion: u32, clregctx: super::super::Foundation::HANDLE, clienthandlerlist: *const TCI_CLIENT_FUNC_LIST, pclienthandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcRegisterClient(tciversion : u32, clregctx : super::super::Foundation:: HANDLE, clienthandlerlist : *const TCI_CLIENT_FUNC_LIST, pclienthandle : *mut super::super::Foundation:: HANDLE) -> u32); - TcRegisterClient(core::mem::transmute(tciversion), clregctx.param().abi(), core::mem::transmute(clienthandlerlist), core::mem::transmute(pclienthandle)) + TcRegisterClient(core::mem::transmute(tciversion), core::mem::transmute(clregctx), core::mem::transmute(clienthandlerlist), core::mem::transmute(pclienthandle)) } #[inline] pub unsafe fn TcSetFlowA(pflowname: P0, pguidparam: *const windows_core::GUID, buffersize: u32, buffer: *const core::ffi::c_void) -> u32 @@ -256,12 +182,9 @@ where TcSetFlowW(pflowname.param().abi(), core::mem::transmute(pguidparam), core::mem::transmute(buffersize), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn TcSetInterface(ifchandle: P0, pguidparam: *const windows_core::GUID, buffersize: u32, buffer: *const core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TcSetInterface(ifchandle: super::super::Foundation::HANDLE, pguidparam: *const windows_core::GUID, buffersize: u32, buffer: *const core::ffi::c_void) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcSetInterface(ifchandle : super::super::Foundation:: HANDLE, pguidparam : *const windows_core::GUID, buffersize : u32, buffer : *const core::ffi::c_void) -> u32); - TcSetInterface(ifchandle.param().abi(), core::mem::transmute(pguidparam), core::mem::transmute(buffersize), core::mem::transmute(buffer)) + TcSetInterface(core::mem::transmute(ifchandle), core::mem::transmute(pguidparam), core::mem::transmute(buffersize), core::mem::transmute(buffer)) } pub const ABLE_TO_RECV_RSVP: u32 = 50002u32; #[repr(C)] 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 3b9994f1ce..f8183dac0b 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs @@ -1,26 +1,17 @@ #[inline] -pub unsafe fn MgmAddGroupMembershipEntry(hprotocol: P0, dwsourceaddr: u32, dwsourcemask: u32, dwgroupaddr: u32, dwgroupmask: u32, dwifindex: u32, dwifnexthopipaddr: u32, dwflags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MgmAddGroupMembershipEntry(hprotocol: super::super::Foundation::HANDLE, dwsourceaddr: u32, dwsourcemask: u32, dwgroupaddr: u32, dwgroupmask: u32, dwifindex: u32, dwifnexthopipaddr: u32, dwflags: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmAddGroupMembershipEntry(hprotocol : super::super::Foundation:: HANDLE, dwsourceaddr : u32, dwsourcemask : u32, dwgroupaddr : u32, dwgroupmask : u32, dwifindex : u32, dwifnexthopipaddr : u32, dwflags : u32) -> u32); - MgmAddGroupMembershipEntry(hprotocol.param().abi(), core::mem::transmute(dwsourceaddr), core::mem::transmute(dwsourcemask), core::mem::transmute(dwgroupaddr), core::mem::transmute(dwgroupmask), core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopipaddr), core::mem::transmute(dwflags)) + MgmAddGroupMembershipEntry(core::mem::transmute(hprotocol), core::mem::transmute(dwsourceaddr), core::mem::transmute(dwsourcemask), core::mem::transmute(dwgroupaddr), core::mem::transmute(dwgroupmask), core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopipaddr), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn MgmDeRegisterMProtocol(hprotocol: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MgmDeRegisterMProtocol(hprotocol: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmDeRegisterMProtocol(hprotocol : super::super::Foundation:: HANDLE) -> u32); - MgmDeRegisterMProtocol(hprotocol.param().abi()) + MgmDeRegisterMProtocol(core::mem::transmute(hprotocol)) } #[inline] -pub unsafe fn MgmDeleteGroupMembershipEntry(hprotocol: P0, dwsourceaddr: u32, dwsourcemask: u32, dwgroupaddr: u32, dwgroupmask: u32, dwifindex: u32, dwifnexthopipaddr: u32, dwflags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MgmDeleteGroupMembershipEntry(hprotocol: super::super::Foundation::HANDLE, dwsourceaddr: u32, dwsourcemask: u32, dwgroupaddr: u32, dwgroupmask: u32, dwifindex: u32, dwifnexthopipaddr: u32, dwflags: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmDeleteGroupMembershipEntry(hprotocol : super::super::Foundation:: HANDLE, dwsourceaddr : u32, dwsourcemask : u32, dwgroupaddr : u32, dwgroupmask : u32, dwifindex : u32, dwifnexthopipaddr : u32, dwflags : u32) -> u32); - MgmDeleteGroupMembershipEntry(hprotocol.param().abi(), core::mem::transmute(dwsourceaddr), core::mem::transmute(dwsourcemask), core::mem::transmute(dwgroupaddr), core::mem::transmute(dwgroupmask), core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopipaddr), core::mem::transmute(dwflags)) + MgmDeleteGroupMembershipEntry(core::mem::transmute(hprotocol), core::mem::transmute(dwsourceaddr), core::mem::transmute(dwsourcemask), core::mem::transmute(dwgroupaddr), core::mem::transmute(dwgroupmask), core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopipaddr), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn MgmGetFirstMfe(pdwbuffersize: *mut u32, pbbuffer: *mut u8, pdwnumentries: *mut u32) -> u32 { @@ -62,28 +53,19 @@ pub unsafe fn MgmGetProtocolOnInterface(dwifindex: u32, dwifnexthopaddr: u32, pd MgmGetProtocolOnInterface(core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopaddr), core::mem::transmute(pdwifprotocolid), core::mem::transmute(pdwifcomponentid)) } #[inline] -pub unsafe fn MgmGroupEnumerationEnd(henum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MgmGroupEnumerationEnd(henum: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGroupEnumerationEnd(henum : super::super::Foundation:: HANDLE) -> u32); - MgmGroupEnumerationEnd(henum.param().abi()) + MgmGroupEnumerationEnd(core::mem::transmute(henum)) } #[inline] -pub unsafe fn MgmGroupEnumerationGetNext(henum: P0, pdwbuffersize: *mut u32, pbbuffer: *mut u8, pdwnumentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MgmGroupEnumerationGetNext(henum: super::super::Foundation::HANDLE, pdwbuffersize: *mut u32, pbbuffer: *mut u8, pdwnumentries: *mut u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGroupEnumerationGetNext(henum : super::super::Foundation:: HANDLE, pdwbuffersize : *mut u32, pbbuffer : *mut u8, pdwnumentries : *mut u32) -> u32); - MgmGroupEnumerationGetNext(henum.param().abi(), core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer), core::mem::transmute(pdwnumentries)) + MgmGroupEnumerationGetNext(core::mem::transmute(henum), core::mem::transmute(pdwbuffersize), core::mem::transmute(pbbuffer), core::mem::transmute(pdwnumentries)) } #[inline] -pub unsafe fn MgmGroupEnumerationStart(hprotocol: P0, metenumtype: MGM_ENUM_TYPES, phenumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MgmGroupEnumerationStart(hprotocol: super::super::Foundation::HANDLE, metenumtype: MGM_ENUM_TYPES, phenumhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmGroupEnumerationStart(hprotocol : super::super::Foundation:: HANDLE, metenumtype : MGM_ENUM_TYPES, phenumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - MgmGroupEnumerationStart(hprotocol.param().abi(), core::mem::transmute(metenumtype), core::mem::transmute(phenumhandle)) + MgmGroupEnumerationStart(core::mem::transmute(hprotocol), core::mem::transmute(metenumtype), core::mem::transmute(phenumhandle)) } #[inline] pub unsafe fn MgmRegisterMProtocol(prpiinfo: *mut ROUTING_PROTOCOL_CONFIG, dwprotocolid: u32, dwcomponentid: u32, phprotocol: *mut super::super::Foundation::HANDLE) -> u32 { @@ -91,20 +73,14 @@ pub unsafe fn MgmRegisterMProtocol(prpiinfo: *mut ROUTING_PROTOCOL_CONFIG, dwpro MgmRegisterMProtocol(core::mem::transmute(prpiinfo), core::mem::transmute(dwprotocolid), core::mem::transmute(dwcomponentid), core::mem::transmute(phprotocol)) } #[inline] -pub unsafe fn MgmReleaseInterfaceOwnership(hprotocol: P0, dwifindex: u32, dwifnexthopaddr: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MgmReleaseInterfaceOwnership(hprotocol: super::super::Foundation::HANDLE, dwifindex: u32, dwifnexthopaddr: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmReleaseInterfaceOwnership(hprotocol : super::super::Foundation:: HANDLE, dwifindex : u32, dwifnexthopaddr : u32) -> u32); - MgmReleaseInterfaceOwnership(hprotocol.param().abi(), core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopaddr)) + MgmReleaseInterfaceOwnership(core::mem::transmute(hprotocol), core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopaddr)) } #[inline] -pub unsafe fn MgmTakeInterfaceOwnership(hprotocol: P0, dwifindex: u32, dwifnexthopaddr: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MgmTakeInterfaceOwnership(hprotocol: super::super::Foundation::HANDLE, dwifindex: u32, dwifnexthopaddr: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn MgmTakeInterfaceOwnership(hprotocol : super::super::Foundation:: HANDLE, dwifindex : u32, dwifnexthopaddr : u32) -> u32); - MgmTakeInterfaceOwnership(hprotocol.param().abi(), core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopaddr)) + MgmTakeInterfaceOwnership(core::mem::transmute(hprotocol), core::mem::transmute(dwifindex), core::mem::transmute(dwifnexthopaddr)) } #[inline] pub unsafe fn MprAdminBufferFree(pbuffer: *const core::ffi::c_void) -> u32 { @@ -112,17 +88,14 @@ pub unsafe fn MprAdminBufferFree(pbuffer: *const core::ffi::c_void) -> u32 { MprAdminBufferFree(core::mem::transmute(pbuffer)) } #[inline] -pub unsafe fn MprAdminConnectionClearStats(hrasserver: isize, hrasconnection: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminConnectionClearStats(hrasserver: isize, hrasconnection: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminConnectionClearStats(hrasserver : isize, hrasconnection : super::super::Foundation:: HANDLE) -> u32); - MprAdminConnectionClearStats(core::mem::transmute(hrasserver), hrasconnection.param().abi()) + MprAdminConnectionClearStats(core::mem::transmute(hrasserver), core::mem::transmute(hrasconnection)) } #[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(core::mem::transmute(hrasserver), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null()))) + MprAdminConnectionEnum(core::mem::transmute(hrasserver), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -130,38 +103,27 @@ pub unsafe fn MprAdminConnectionEnumEx(hrasserver: isize, pobjectheader: *const MprAdminConnectionEnumEx(core::mem::transmute(hrasserver), core::mem::transmute(pobjectheader), core::mem::transmute(dwpreferedmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(pprasconn), core::mem::transmute(lpdwresumehandle)) } #[inline] -pub unsafe fn MprAdminConnectionGetInfo(hrasserver: isize, dwlevel: u32, hrasconnection: P2, lplpbbuffer: *mut *mut u8) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn MprAdminConnectionGetInfo(hrasserver: isize, dwlevel: u32, hrasconnection: super::super::Foundation::HANDLE, lplpbbuffer: *mut *mut u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminConnectionGetInfo(hrasserver : isize, dwlevel : u32, hrasconnection : super::super::Foundation:: HANDLE, lplpbbuffer : *mut *mut u8) -> u32); - MprAdminConnectionGetInfo(core::mem::transmute(hrasserver), core::mem::transmute(dwlevel), hrasconnection.param().abi(), core::mem::transmute(lplpbbuffer)) + MprAdminConnectionGetInfo(core::mem::transmute(hrasserver), core::mem::transmute(dwlevel), core::mem::transmute(hrasconnection), core::mem::transmute(lplpbbuffer)) } #[inline] -pub unsafe fn MprAdminConnectionGetInfoEx(hrasserver: isize, hrasconnection: P1, prasconnection: *mut RAS_CONNECTION_EX) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminConnectionGetInfoEx(hrasserver: isize, hrasconnection: super::super::Foundation::HANDLE, prasconnection: *mut RAS_CONNECTION_EX) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminConnectionGetInfoEx(hrasserver : isize, hrasconnection : super::super::Foundation:: HANDLE, prasconnection : *mut RAS_CONNECTION_EX) -> u32); - MprAdminConnectionGetInfoEx(core::mem::transmute(hrasserver), hrasconnection.param().abi(), core::mem::transmute(prasconnection)) + MprAdminConnectionGetInfoEx(core::mem::transmute(hrasserver), core::mem::transmute(hrasconnection), core::mem::transmute(prasconnection)) } #[inline] -pub unsafe fn MprAdminConnectionRemoveQuarantine(hrasserver: P0, hrasconnection: P1, fisipaddress: P2) -> u32 +pub unsafe fn MprAdminConnectionRemoveQuarantine(hrasserver: super::super::Foundation::HANDLE, hrasconnection: super::super::Foundation::HANDLE, fisipaddress: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminConnectionRemoveQuarantine(hrasserver : super::super::Foundation:: HANDLE, hrasconnection : super::super::Foundation:: HANDLE, fisipaddress : super::super::Foundation:: BOOL) -> u32); - MprAdminConnectionRemoveQuarantine(hrasserver.param().abi(), hrasconnection.param().abi(), fisipaddress.param().abi()) + MprAdminConnectionRemoveQuarantine(core::mem::transmute(hrasserver), core::mem::transmute(hrasconnection), fisipaddress.param().abi()) } #[inline] -pub unsafe fn MprAdminDeregisterConnectionNotification(hmprserver: isize, heventnotification: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminDeregisterConnectionNotification(hmprserver: isize, heventnotification: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminDeregisterConnectionNotification(hmprserver : isize, heventnotification : super::super::Foundation:: HANDLE) -> u32); - MprAdminDeregisterConnectionNotification(core::mem::transmute(hmprserver), heventnotification.param().abi()) + MprAdminDeregisterConnectionNotification(core::mem::transmute(hmprserver), core::mem::transmute(heventnotification)) } #[inline] pub unsafe fn MprAdminDeviceEnum(hmprserver: isize, dwlevel: u32, lplpbbuffer: *mut *mut u8, lpdwtotalentries: *mut u32) -> u32 { @@ -193,14 +155,12 @@ where MprAdminGetPDCServer(lpszdomain.param().abi(), lpszserver.param().abi(), core::mem::transmute(lpszpdcserver)) } #[inline] -pub unsafe fn MprAdminInterfaceConnect(hmprserver: isize, hinterface: P1, hevent: P2, fsynchronous: P3) -> u32 +pub unsafe fn MprAdminInterfaceConnect(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, hevent: super::super::Foundation::HANDLE, fsynchronous: P3) -> u32 where - P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceConnect(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, hevent : super::super::Foundation:: HANDLE, fsynchronous : super::super::Foundation:: BOOL) -> u32); - MprAdminInterfaceConnect(core::mem::transmute(hmprserver), hinterface.param().abi(), hevent.param().abi(), fsynchronous.param().abi()) + MprAdminInterfaceConnect(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(hevent), fsynchronous.param().abi()) } #[inline] pub unsafe fn MprAdminInterfaceCreate(hmprserver: isize, dwlevel: u32, lpbbuffer: *const u8, phinterface: *mut super::super::Foundation::HANDLE) -> u32 { @@ -208,67 +168,49 @@ pub unsafe fn MprAdminInterfaceCreate(hmprserver: isize, dwlevel: u32, lpbbuffer MprAdminInterfaceCreate(core::mem::transmute(hmprserver), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer), core::mem::transmute(phinterface)) } #[inline] -pub unsafe fn MprAdminInterfaceDelete(hmprserver: isize, hinterface: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceDelete(hmprserver: isize, hinterface: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceDelete(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE) -> u32); - MprAdminInterfaceDelete(core::mem::transmute(hmprserver), hinterface.param().abi()) + MprAdminInterfaceDelete(core::mem::transmute(hmprserver), core::mem::transmute(hinterface)) } #[inline] -pub unsafe fn MprAdminInterfaceDeviceGetInfo(hmprserver: isize, hinterface: P1, dwindex: u32, dwlevel: u32, lplpbuffer: *mut *mut u8) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceDeviceGetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwindex: u32, dwlevel: u32, lplpbuffer: *mut *mut u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceDeviceGetInfo(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwindex : u32, dwlevel : u32, lplpbuffer : *mut *mut u8) -> u32); - MprAdminInterfaceDeviceGetInfo(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer)) + MprAdminInterfaceDeviceGetInfo(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwindex), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer)) } #[inline] -pub unsafe fn MprAdminInterfaceDeviceSetInfo(hmprserver: isize, hinterface: P1, dwindex: u32, dwlevel: u32, lpbbuffer: *const u8) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceDeviceSetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwindex: u32, dwlevel: u32, lpbbuffer: *const u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceDeviceSetInfo(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwindex : u32, dwlevel : u32, lpbbuffer : *const u8) -> u32); - MprAdminInterfaceDeviceSetInfo(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer)) + MprAdminInterfaceDeviceSetInfo(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwindex), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer)) } #[inline] -pub unsafe fn MprAdminInterfaceDisconnect(hmprserver: isize, hinterface: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceDisconnect(hmprserver: isize, hinterface: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceDisconnect(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE) -> u32); - MprAdminInterfaceDisconnect(core::mem::transmute(hmprserver), hinterface.param().abi()) + MprAdminInterfaceDisconnect(core::mem::transmute(hmprserver), core::mem::transmute(hinterface)) } #[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(core::mem::transmute(hmprserver), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null()))) + MprAdminInterfaceEnum(core::mem::transmute(hmprserver), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MprAdminInterfaceGetCredentials(lpwsserver: P0, lpwsinterfacename: P1, lpwsusername: windows_core::PWSTR, lpwspassword: windows_core::PWSTR, lpwsdomainname: windows_core::PWSTR) -> u32 +pub unsafe fn MprAdminInterfaceGetCredentials(lpwsserver: P0, lpwsinterfacename: P1, lpwsusername: Option, lpwspassword: Option, lpwsdomainname: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceGetCredentials(lpwsserver : windows_core::PCWSTR, lpwsinterfacename : windows_core::PCWSTR, lpwsusername : windows_core::PWSTR, lpwspassword : windows_core::PWSTR, lpwsdomainname : windows_core::PWSTR) -> u32); - MprAdminInterfaceGetCredentials(lpwsserver.param().abi(), lpwsinterfacename.param().abi(), core::mem::transmute(lpwsusername), core::mem::transmute(lpwspassword), core::mem::transmute(lpwsdomainname)) + MprAdminInterfaceGetCredentials(lpwsserver.param().abi(), lpwsinterfacename.param().abi(), core::mem::transmute(lpwsusername.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpwspassword.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpwsdomainname.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MprAdminInterfaceGetCredentialsEx(hmprserver: isize, hinterface: P1, dwlevel: u32, lplpbbuffer: *mut *mut u8) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceGetCredentialsEx(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwlevel: u32, lplpbbuffer: *mut *mut u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceGetCredentialsEx(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwlevel : u32, lplpbbuffer : *mut *mut u8) -> u32); - MprAdminInterfaceGetCredentialsEx(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer)) + MprAdminInterfaceGetCredentialsEx(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer)) } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security_Cryptography"))] #[inline] -pub unsafe fn MprAdminInterfaceGetCustomInfoEx(hmprserver: isize, hinterface: P1, pcustominfo: *mut MPR_IF_CUSTOMINFOEX2) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceGetCustomInfoEx(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, pcustominfo: *mut MPR_IF_CUSTOMINFOEX2) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceGetCustomInfoEx(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, pcustominfo : *mut MPR_IF_CUSTOMINFOEX2) -> u32); - MprAdminInterfaceGetCustomInfoEx(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(pcustominfo)) + MprAdminInterfaceGetCustomInfoEx(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(pcustominfo)) } #[inline] pub unsafe fn MprAdminInterfaceGetHandle(hmprserver: isize, lpwsinterfacename: P1, phinterface: *mut super::super::Foundation::HANDLE, fincludeclientinterfaces: P3) -> u32 @@ -280,20 +222,14 @@ where MprAdminInterfaceGetHandle(core::mem::transmute(hmprserver), lpwsinterfacename.param().abi(), core::mem::transmute(phinterface), fincludeclientinterfaces.param().abi()) } #[inline] -pub unsafe fn MprAdminInterfaceGetInfo(hmprserver: isize, hinterface: P1, dwlevel: u32, lplpbbuffer: *const *const u8) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceGetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwlevel: u32, lplpbbuffer: *const *const u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceGetInfo(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwlevel : u32, lplpbbuffer : *const *const u8) -> u32); - MprAdminInterfaceGetInfo(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer)) + MprAdminInterfaceGetInfo(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer)) } #[inline] -pub unsafe fn MprAdminInterfaceQueryUpdateResult(hmprserver: isize, hinterface: P1, dwprotocolid: u32, lpdwupdateresult: *mut u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceQueryUpdateResult(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwprotocolid: u32, lpdwupdateresult: *mut u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceQueryUpdateResult(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwprotocolid : u32, lpdwupdateresult : *mut u32) -> u32); - MprAdminInterfaceQueryUpdateResult(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwprotocolid), core::mem::transmute(lpdwupdateresult)) + MprAdminInterfaceQueryUpdateResult(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwprotocolid), core::mem::transmute(lpdwupdateresult)) } #[inline] pub unsafe fn MprAdminInterfaceSetCredentials(lpwsserver: P0, lpwsinterfacename: P1, lpwsusername: P2, lpwsdomainname: P3, lpwspassword: P4) -> u32 @@ -308,78 +244,50 @@ where MprAdminInterfaceSetCredentials(lpwsserver.param().abi(), lpwsinterfacename.param().abi(), lpwsusername.param().abi(), lpwsdomainname.param().abi(), lpwspassword.param().abi()) } #[inline] -pub unsafe fn MprAdminInterfaceSetCredentialsEx(hmprserver: isize, hinterface: P1, dwlevel: u32, lpbbuffer: *const u8) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceSetCredentialsEx(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwlevel: u32, lpbbuffer: *const u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceSetCredentialsEx(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwlevel : u32, lpbbuffer : *const u8) -> u32); - MprAdminInterfaceSetCredentialsEx(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer)) + MprAdminInterfaceSetCredentialsEx(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer)) } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security_Cryptography"))] #[inline] -pub unsafe fn MprAdminInterfaceSetCustomInfoEx(hmprserver: isize, hinterface: P1, pcustominfo: *const MPR_IF_CUSTOMINFOEX2) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceSetCustomInfoEx(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, pcustominfo: *const MPR_IF_CUSTOMINFOEX2) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceSetCustomInfoEx(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, pcustominfo : *const MPR_IF_CUSTOMINFOEX2) -> u32); - MprAdminInterfaceSetCustomInfoEx(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(pcustominfo)) + MprAdminInterfaceSetCustomInfoEx(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(pcustominfo)) } #[inline] -pub unsafe fn MprAdminInterfaceSetInfo(hmprserver: isize, hinterface: P1, dwlevel: u32, lpbbuffer: *const u8) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceSetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwlevel: u32, lpbbuffer: *const u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceSetInfo(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwlevel : u32, lpbbuffer : *const u8) -> u32); - MprAdminInterfaceSetInfo(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer)) + MprAdminInterfaceSetInfo(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer)) } #[inline] -pub unsafe fn MprAdminInterfaceTransportAdd(hmprserver: isize, hinterface: P1, dwtransportid: u32, pinterfaceinfo: *const u8, dwinterfaceinfosize: u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceTransportAdd(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwtransportid: u32, pinterfaceinfo: *const u8, dwinterfaceinfosize: u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceTransportAdd(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwtransportid : u32, pinterfaceinfo : *const u8, dwinterfaceinfosize : u32) -> u32); - MprAdminInterfaceTransportAdd(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(pinterfaceinfo), core::mem::transmute(dwinterfaceinfosize)) + MprAdminInterfaceTransportAdd(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwtransportid), core::mem::transmute(pinterfaceinfo), core::mem::transmute(dwinterfaceinfosize)) } #[inline] -pub unsafe fn MprAdminInterfaceTransportGetInfo(hmprserver: isize, hinterface: P1, dwtransportid: u32, ppinterfaceinfo: *mut *mut u8, lpdwinterfaceinfosize: Option<*mut u32>) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceTransportGetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwtransportid: u32, ppinterfaceinfo: *mut *mut u8, lpdwinterfaceinfosize: Option<*mut u32>) -> u32 { 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(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(ppinterfaceinfo), core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(core::ptr::null_mut()))) + MprAdminInterfaceTransportGetInfo(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwtransportid), core::mem::transmute(ppinterfaceinfo), core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MprAdminInterfaceTransportRemove(hmprserver: isize, hinterface: P1, dwtransportid: u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceTransportRemove(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwtransportid: u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceTransportRemove(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwtransportid : u32) -> u32); - MprAdminInterfaceTransportRemove(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwtransportid)) + MprAdminInterfaceTransportRemove(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwtransportid)) } #[inline] -pub unsafe fn MprAdminInterfaceTransportSetInfo(hmprserver: isize, hinterface: P1, dwtransportid: u32, pinterfaceinfo: *const u8, dwinterfaceinfosize: u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceTransportSetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwtransportid: u32, pinterfaceinfo: *const u8, dwinterfaceinfosize: u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceTransportSetInfo(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwtransportid : u32, pinterfaceinfo : *const u8, dwinterfaceinfosize : u32) -> u32); - MprAdminInterfaceTransportSetInfo(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(pinterfaceinfo), core::mem::transmute(dwinterfaceinfosize)) + MprAdminInterfaceTransportSetInfo(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwtransportid), core::mem::transmute(pinterfaceinfo), core::mem::transmute(dwinterfaceinfosize)) } #[inline] -pub unsafe fn MprAdminInterfaceUpdatePhonebookInfo(hmprserver: isize, hinterface: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceUpdatePhonebookInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceUpdatePhonebookInfo(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE) -> u32); - MprAdminInterfaceUpdatePhonebookInfo(core::mem::transmute(hmprserver), hinterface.param().abi()) + MprAdminInterfaceUpdatePhonebookInfo(core::mem::transmute(hmprserver), core::mem::transmute(hinterface)) } #[inline] -pub unsafe fn MprAdminInterfaceUpdateRoutes(hmprserver: isize, hinterface: P1, dwprotocolid: u32, hevent: P3) -> u32 -where - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceUpdateRoutes(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwprotocolid: u32, hevent: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceUpdateRoutes(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwprotocolid : u32, hevent : super::super::Foundation:: HANDLE) -> u32); - MprAdminInterfaceUpdateRoutes(core::mem::transmute(hmprserver), hinterface.param().abi(), core::mem::transmute(dwprotocolid), hevent.param().abi()) + MprAdminInterfaceUpdateRoutes(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(dwprotocolid), core::mem::transmute(hevent)) } #[inline] pub unsafe fn MprAdminIsDomainRasServer(pszdomain: P0, pszmachine: P1, pbisrasserver: *mut super::super::Foundation::BOOL) -> u32 @@ -455,61 +363,42 @@ pub unsafe fn MprAdminMIBServerDisconnect(hmibserver: isize) { MprAdminMIBServerDisconnect(core::mem::transmute(hmibserver)) } #[inline] -pub unsafe fn MprAdminPortClearStats(hrasserver: isize, hport: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminPortClearStats(hrasserver: isize, hport: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminPortClearStats(hrasserver : isize, hport : super::super::Foundation:: HANDLE) -> u32); - MprAdminPortClearStats(core::mem::transmute(hrasserver), hport.param().abi()) + MprAdminPortClearStats(core::mem::transmute(hrasserver), core::mem::transmute(hport)) } #[inline] -pub unsafe fn MprAdminPortDisconnect(hrasserver: isize, hport: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminPortDisconnect(hrasserver: isize, hport: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminPortDisconnect(hrasserver : isize, hport : super::super::Foundation:: HANDLE) -> u32); - MprAdminPortDisconnect(core::mem::transmute(hrasserver), hport.param().abi()) + MprAdminPortDisconnect(core::mem::transmute(hrasserver), core::mem::transmute(hport)) } #[inline] -pub unsafe fn MprAdminPortEnum(hrasserver: isize, dwlevel: u32, hrasconnection: P2, lplpbbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*const u32>) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn MprAdminPortEnum(hrasserver: isize, dwlevel: u32, hrasconnection: super::super::Foundation::HANDLE, lplpbbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*const u32>) -> u32 { 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(core::mem::transmute(hrasserver), core::mem::transmute(dwlevel), hrasconnection.param().abi(), core::mem::transmute(lplpbbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null()))) + MprAdminPortEnum(core::mem::transmute(hrasserver), core::mem::transmute(dwlevel), core::mem::transmute(hrasconnection), core::mem::transmute(lplpbbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MprAdminPortGetInfo(hrasserver: isize, dwlevel: u32, hport: P2, lplpbbuffer: *mut *mut u8) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn MprAdminPortGetInfo(hrasserver: isize, dwlevel: u32, hport: super::super::Foundation::HANDLE, lplpbbuffer: *mut *mut u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminPortGetInfo(hrasserver : isize, dwlevel : u32, hport : super::super::Foundation:: HANDLE, lplpbbuffer : *mut *mut u8) -> u32); - MprAdminPortGetInfo(core::mem::transmute(hrasserver), core::mem::transmute(dwlevel), hport.param().abi(), core::mem::transmute(lplpbbuffer)) + MprAdminPortGetInfo(core::mem::transmute(hrasserver), core::mem::transmute(dwlevel), core::mem::transmute(hport), core::mem::transmute(lplpbbuffer)) } #[inline] -pub unsafe fn MprAdminPortReset(hrasserver: isize, hport: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminPortReset(hrasserver: isize, hport: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminPortReset(hrasserver : isize, hport : super::super::Foundation:: HANDLE) -> u32); - MprAdminPortReset(core::mem::transmute(hrasserver), hport.param().abi()) + MprAdminPortReset(core::mem::transmute(hrasserver), core::mem::transmute(hport)) } #[inline] -pub unsafe fn MprAdminRegisterConnectionNotification(hmprserver: isize, heventnotification: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminRegisterConnectionNotification(hmprserver: isize, heventnotification: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminRegisterConnectionNotification(hmprserver : isize, heventnotification : super::super::Foundation:: HANDLE) -> u32); - MprAdminRegisterConnectionNotification(core::mem::transmute(hmprserver), heventnotification.param().abi()) + MprAdminRegisterConnectionNotification(core::mem::transmute(hmprserver), core::mem::transmute(heventnotification)) } #[inline] -pub unsafe fn MprAdminSendUserMessage(hmprserver: isize, hconnection: P1, lpwszmessage: P2) -> u32 +pub unsafe fn MprAdminSendUserMessage(hmprserver: isize, hconnection: super::super::Foundation::HANDLE, lpwszmessage: P2) -> u32 where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminSendUserMessage(hmprserver : isize, hconnection : super::super::Foundation:: HANDLE, lpwszmessage : windows_core::PCWSTR) -> u32); - MprAdminSendUserMessage(core::mem::transmute(hmprserver), hconnection.param().abi(), lpwszmessage.param().abi()) + MprAdminSendUserMessage(core::mem::transmute(hmprserver), core::mem::transmute(hconnection), lpwszmessage.param().abi()) } #[inline] pub unsafe fn MprAdminServerConnect(lpwsservername: P0, phmprserver: *mut isize) -> u32 @@ -557,31 +446,28 @@ pub unsafe fn MprAdminServerSetInfoEx(hmprserver: isize, pserverinfo: *const MPR MprAdminServerSetInfoEx(core::mem::transmute(hmprserver), core::mem::transmute(pserverinfo)) } #[inline] -pub unsafe fn MprAdminTransportCreate(hmprserver: isize, dwtransportid: u32, lpwstransportname: P2, pglobalinfo: *const u8, dwglobalinfosize: u32, pclientinterfaceinfo: Option<*const u8>, dwclientinterfaceinfosize: u32, lpwsdllpath: P7) -> u32 +pub unsafe fn MprAdminTransportCreate(hmprserver: isize, dwtransportid: u32, lpwstransportname: P2, pglobalinfo: *const u8, dwglobalinfosize: u32, pclientinterfaceinfo: Option<*const u8>, dwclientinterfaceinfosize: Option, lpwsdllpath: P7) -> u32 where P2: windows_core::Param, P7: 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(core::mem::transmute(hmprserver), core::mem::transmute(dwtransportid), lpwstransportname.param().abi(), core::mem::transmute(pglobalinfo), core::mem::transmute(dwglobalinfosize), core::mem::transmute(pclientinterfaceinfo.unwrap_or(core::ptr::null())), core::mem::transmute(dwclientinterfaceinfosize), lpwsdllpath.param().abi()) + MprAdminTransportCreate(core::mem::transmute(hmprserver), core::mem::transmute(dwtransportid), lpwstransportname.param().abi(), core::mem::transmute(pglobalinfo), core::mem::transmute(dwglobalinfosize), core::mem::transmute(pclientinterfaceinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwclientinterfaceinfosize.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(hmprserver), core::mem::transmute(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()))) + MprAdminTransportGetInfo(core::mem::transmute(hmprserver), core::mem::transmute(dwtransportid), core::mem::transmute(ppglobalinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwglobalinfosize.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppclientinterfaceinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwclientinterfaceinfosize.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hmprserver), core::mem::transmute(dwtransportid), core::mem::transmute(pglobalinfo.unwrap_or(core::ptr::null())), core::mem::transmute(dwglobalinfosize), core::mem::transmute(pclientinterfaceinfo.unwrap_or(core::ptr::null())), core::mem::transmute(dwclientinterfaceinfosize)) + MprAdminTransportSetInfo(core::mem::transmute(hmprserver), core::mem::transmute(dwtransportid), core::mem::transmute(pglobalinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwglobalinfosize), core::mem::transmute(pclientinterfaceinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwclientinterfaceinfosize)) } #[inline] -pub unsafe fn MprAdminUpdateConnection(hrasserver: isize, hrasconnection: P1, prasupdateconnection: *const RAS_UPDATE_CONNECTION) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn MprAdminUpdateConnection(hrasserver: isize, hrasconnection: super::super::Foundation::HANDLE, prasupdateconnection: *const RAS_UPDATE_CONNECTION) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminUpdateConnection(hrasserver : isize, hrasconnection : super::super::Foundation:: HANDLE, prasupdateconnection : *const RAS_UPDATE_CONNECTION) -> u32); - MprAdminUpdateConnection(core::mem::transmute(hrasserver), hrasconnection.param().abi(), core::mem::transmute(prasupdateconnection)) + MprAdminUpdateConnection(core::mem::transmute(hrasserver), core::mem::transmute(hrasconnection), core::mem::transmute(prasupdateconnection)) } #[inline] pub unsafe fn MprAdminUserGetInfo(lpszserver: P0, lpszuser: P1, dwlevel: u32, lpbbuffer: *mut u8) -> u32 @@ -607,177 +493,116 @@ pub unsafe fn MprConfigBufferFree(pbuffer: *const core::ffi::c_void) -> u32 { MprConfigBufferFree(core::mem::transmute(pbuffer)) } #[inline] -pub unsafe fn MprConfigFilterGetInfo(hmprconfig: P0, dwlevel: u32, dwtransportid: u32, lpbuffer: *mut u8) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigFilterGetInfo(hmprconfig: super::super::Foundation::HANDLE, dwlevel: u32, dwtransportid: u32, lpbuffer: *mut u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigFilterGetInfo(hmprconfig : super::super::Foundation:: HANDLE, dwlevel : u32, dwtransportid : u32, lpbuffer : *mut u8) -> u32); - MprConfigFilterGetInfo(hmprconfig.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(dwtransportid), core::mem::transmute(lpbuffer)) + MprConfigFilterGetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(dwlevel), core::mem::transmute(dwtransportid), core::mem::transmute(lpbuffer)) } #[inline] -pub unsafe fn MprConfigFilterSetInfo(hmprconfig: P0, dwlevel: u32, dwtransportid: u32, lpbuffer: *const u8) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigFilterSetInfo(hmprconfig: super::super::Foundation::HANDLE, dwlevel: u32, dwtransportid: u32, lpbuffer: *const u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigFilterSetInfo(hmprconfig : super::super::Foundation:: HANDLE, dwlevel : u32, dwtransportid : u32, lpbuffer : *const u8) -> u32); - MprConfigFilterSetInfo(hmprconfig.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(dwtransportid), core::mem::transmute(lpbuffer)) + MprConfigFilterSetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(dwlevel), core::mem::transmute(dwtransportid), core::mem::transmute(lpbuffer)) } #[inline] -pub unsafe fn MprConfigGetFriendlyName(hmprconfig: P0, pszguidname: P1, pszbuffer: windows_core::PWSTR, dwbuffersize: u32) -> u32 +pub unsafe fn MprConfigGetFriendlyName(hmprconfig: super::super::Foundation::HANDLE, pszguidname: P1, pszbuffer: windows_core::PWSTR, dwbuffersize: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigGetFriendlyName(hmprconfig : super::super::Foundation:: HANDLE, pszguidname : windows_core::PCWSTR, pszbuffer : windows_core::PWSTR, dwbuffersize : u32) -> u32); - MprConfigGetFriendlyName(hmprconfig.param().abi(), pszguidname.param().abi(), core::mem::transmute(pszbuffer), core::mem::transmute(dwbuffersize)) + MprConfigGetFriendlyName(core::mem::transmute(hmprconfig), pszguidname.param().abi(), core::mem::transmute(pszbuffer), core::mem::transmute(dwbuffersize)) } #[inline] -pub unsafe fn MprConfigGetGuidName(hmprconfig: P0, pszfriendlyname: P1, pszbuffer: windows_core::PWSTR, dwbuffersize: u32) -> u32 +pub unsafe fn MprConfigGetGuidName(hmprconfig: super::super::Foundation::HANDLE, pszfriendlyname: P1, pszbuffer: windows_core::PWSTR, dwbuffersize: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigGetGuidName(hmprconfig : super::super::Foundation:: HANDLE, pszfriendlyname : windows_core::PCWSTR, pszbuffer : windows_core::PWSTR, dwbuffersize : u32) -> u32); - MprConfigGetGuidName(hmprconfig.param().abi(), pszfriendlyname.param().abi(), core::mem::transmute(pszbuffer), core::mem::transmute(dwbuffersize)) + MprConfigGetGuidName(core::mem::transmute(hmprconfig), pszfriendlyname.param().abi(), core::mem::transmute(pszbuffer), core::mem::transmute(dwbuffersize)) } #[inline] -pub unsafe fn MprConfigInterfaceCreate(hmprconfig: P0, dwlevel: u32, lpbbuffer: *const u8, phrouterinterface: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceCreate(hmprconfig: super::super::Foundation::HANDLE, dwlevel: u32, lpbbuffer: *const u8, phrouterinterface: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceCreate(hmprconfig : super::super::Foundation:: HANDLE, dwlevel : u32, lpbbuffer : *const u8, phrouterinterface : *mut super::super::Foundation:: HANDLE) -> u32); - MprConfigInterfaceCreate(hmprconfig.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer), core::mem::transmute(phrouterinterface)) + MprConfigInterfaceCreate(core::mem::transmute(hmprconfig), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer), core::mem::transmute(phrouterinterface)) } #[inline] -pub unsafe fn MprConfigInterfaceDelete(hmprconfig: P0, hrouterinterface: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceDelete(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceDelete(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE) -> u32); - MprConfigInterfaceDelete(hmprconfig.param().abi(), hrouterinterface.param().abi()) + MprConfigInterfaceDelete(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface)) } #[inline] -pub unsafe fn MprConfigInterfaceEnum(hmprconfig: P0, dwlevel: u32, lplpbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceEnum(hmprconfig: super::super::Foundation::HANDLE, dwlevel: u32, lplpbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*mut u32>) -> u32 { 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(), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null_mut()))) + MprConfigInterfaceEnum(core::mem::transmute(hmprconfig), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security_Cryptography"))] #[inline] -pub unsafe fn MprConfigInterfaceGetCustomInfoEx(hmprconfig: P0, hrouterinterface: P1, pcustominfo: *mut MPR_IF_CUSTOMINFOEX2) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceGetCustomInfoEx(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, pcustominfo: *mut MPR_IF_CUSTOMINFOEX2) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceGetCustomInfoEx(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, pcustominfo : *mut MPR_IF_CUSTOMINFOEX2) -> u32); - MprConfigInterfaceGetCustomInfoEx(hmprconfig.param().abi(), hrouterinterface.param().abi(), core::mem::transmute(pcustominfo)) + MprConfigInterfaceGetCustomInfoEx(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(pcustominfo)) } #[inline] -pub unsafe fn MprConfigInterfaceGetHandle(hmprconfig: P0, lpwsinterfacename: P1, phrouterinterface: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn MprConfigInterfaceGetHandle(hmprconfig: super::super::Foundation::HANDLE, lpwsinterfacename: P1, phrouterinterface: *mut super::super::Foundation::HANDLE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceGetHandle(hmprconfig : super::super::Foundation:: HANDLE, lpwsinterfacename : windows_core::PCWSTR, phrouterinterface : *mut super::super::Foundation:: HANDLE) -> u32); - MprConfigInterfaceGetHandle(hmprconfig.param().abi(), lpwsinterfacename.param().abi(), core::mem::transmute(phrouterinterface)) + MprConfigInterfaceGetHandle(core::mem::transmute(hmprconfig), lpwsinterfacename.param().abi(), core::mem::transmute(phrouterinterface)) } #[inline] -pub unsafe fn MprConfigInterfaceGetInfo(hmprconfig: P0, hrouterinterface: P1, dwlevel: u32, lplpbuffer: *mut *mut u8, lpdwbuffersize: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceGetInfo(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, dwlevel: u32, lplpbuffer: *mut *mut u8, lpdwbuffersize: *mut u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceGetInfo(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, dwlevel : u32, lplpbuffer : *mut *mut u8, lpdwbuffersize : *mut u32) -> u32); - MprConfigInterfaceGetInfo(hmprconfig.param().abi(), hrouterinterface.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer), core::mem::transmute(lpdwbuffersize)) + MprConfigInterfaceGetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer), core::mem::transmute(lpdwbuffersize)) } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security_Cryptography"))] #[inline] -pub unsafe fn MprConfigInterfaceSetCustomInfoEx(hmprconfig: P0, hrouterinterface: P1, pcustominfo: *const MPR_IF_CUSTOMINFOEX2) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceSetCustomInfoEx(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, pcustominfo: *const MPR_IF_CUSTOMINFOEX2) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceSetCustomInfoEx(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, pcustominfo : *const MPR_IF_CUSTOMINFOEX2) -> u32); - MprConfigInterfaceSetCustomInfoEx(hmprconfig.param().abi(), hrouterinterface.param().abi(), core::mem::transmute(pcustominfo)) + MprConfigInterfaceSetCustomInfoEx(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(pcustominfo)) } #[inline] -pub unsafe fn MprConfigInterfaceSetInfo(hmprconfig: P0, hrouterinterface: P1, dwlevel: u32, lpbbuffer: *const u8) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceSetInfo(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, dwlevel: u32, lpbbuffer: *const u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceSetInfo(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, dwlevel : u32, lpbbuffer : *const u8) -> u32); - MprConfigInterfaceSetInfo(hmprconfig.param().abi(), hrouterinterface.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer)) + MprConfigInterfaceSetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(dwlevel), core::mem::transmute(lpbbuffer)) } #[inline] -pub unsafe fn MprConfigInterfaceTransportAdd(hmprconfig: P0, hrouterinterface: P1, dwtransportid: u32, lpwstransportname: P3, pinterfaceinfo: &[u8], phrouteriftransport: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn MprConfigInterfaceTransportAdd(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, dwtransportid: u32, lpwstransportname: P3, pinterfaceinfo: &[u8], phrouteriftransport: *mut super::super::Foundation::HANDLE) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceTransportAdd(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, dwtransportid : u32, lpwstransportname : windows_core::PCWSTR, pinterfaceinfo : *const u8, dwinterfaceinfosize : u32, phrouteriftransport : *mut super::super::Foundation:: HANDLE) -> u32); - MprConfigInterfaceTransportAdd(hmprconfig.param().abi(), hrouterinterface.param().abi(), core::mem::transmute(dwtransportid), lpwstransportname.param().abi(), core::mem::transmute(pinterfaceinfo.as_ptr()), pinterfaceinfo.len().try_into().unwrap(), core::mem::transmute(phrouteriftransport)) + MprConfigInterfaceTransportAdd(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(dwtransportid), lpwstransportname.param().abi(), core::mem::transmute(pinterfaceinfo.as_ptr()), pinterfaceinfo.len().try_into().unwrap(), core::mem::transmute(phrouteriftransport)) } #[inline] -pub unsafe fn MprConfigInterfaceTransportEnum(hmprconfig: P0, hrouterinterface: P1, dwlevel: u32, lplpbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> u32 { 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(), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null_mut()))) + MprConfigInterfaceTransportEnum(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MprConfigInterfaceTransportGetHandle(hmprconfig: P0, hrouterinterface: P1, dwtransportid: u32, phrouteriftransport: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceTransportGetHandle(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, dwtransportid: u32, phrouteriftransport: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceTransportGetHandle(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, dwtransportid : u32, phrouteriftransport : *mut super::super::Foundation:: HANDLE) -> u32); - MprConfigInterfaceTransportGetHandle(hmprconfig.param().abi(), hrouterinterface.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(phrouteriftransport)) + MprConfigInterfaceTransportGetHandle(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(dwtransportid), core::mem::transmute(phrouteriftransport)) } #[inline] -pub unsafe fn MprConfigInterfaceTransportGetInfo(hmprconfig: P0, hrouterinterface: P1, hrouteriftransport: P2, ppinterfaceinfo: Option<*mut *mut u8>, lpdwinterfaceinfosize: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceTransportGetInfo(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, hrouteriftransport: super::super::Foundation::HANDLE, ppinterfaceinfo: Option<*mut *mut u8>, lpdwinterfaceinfosize: Option<*mut u32>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(core::ptr::null_mut()))) + MprConfigInterfaceTransportGetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(hrouteriftransport), core::mem::transmute(ppinterfaceinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MprConfigInterfaceTransportRemove(hmprconfig: P0, hrouterinterface: P1, hrouteriftransport: P2) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceTransportRemove(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, hrouteriftransport: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceTransportRemove(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, hrouteriftransport : super::super::Foundation:: HANDLE) -> u32); - MprConfigInterfaceTransportRemove(hmprconfig.param().abi(), hrouterinterface.param().abi(), hrouteriftransport.param().abi()) + MprConfigInterfaceTransportRemove(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(hrouteriftransport)) } #[inline] -pub unsafe fn MprConfigInterfaceTransportSetInfo(hmprconfig: P0, hrouterinterface: P1, hrouteriftransport: P2, pinterfaceinfo: Option<&[u8]>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn MprConfigInterfaceTransportSetInfo(hmprconfig: super::super::Foundation::HANDLE, hrouterinterface: super::super::Foundation::HANDLE, hrouteriftransport: super::super::Foundation::HANDLE, pinterfaceinfo: Option<&[u8]>) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceTransportSetInfo(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, hrouteriftransport : super::super::Foundation:: HANDLE, pinterfaceinfo : *const u8, dwinterfaceinfosize : u32) -> u32); - MprConfigInterfaceTransportSetInfo(hmprconfig.param().abi(), hrouterinterface.param().abi(), hrouteriftransport.param().abi(), core::mem::transmute(pinterfaceinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pinterfaceinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + MprConfigInterfaceTransportSetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(hrouterinterface), core::mem::transmute(hrouteriftransport), core::mem::transmute(pinterfaceinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pinterfaceinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn MprConfigServerBackup(hmprconfig: P0, lpwspath: P1) -> u32 +pub unsafe fn MprConfigServerBackup(hmprconfig: super::super::Foundation::HANDLE, lpwspath: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigServerBackup(hmprconfig : super::super::Foundation:: HANDLE, lpwspath : windows_core::PCWSTR) -> u32); - MprConfigServerBackup(hmprconfig.param().abi(), lpwspath.param().abi()) + MprConfigServerBackup(core::mem::transmute(hmprconfig), lpwspath.param().abi()) } #[inline] pub unsafe fn MprConfigServerConnect(lpwsservername: P0, phmprconfig: *mut super::super::Foundation::HANDLE) -> u32 @@ -788,29 +613,20 @@ where MprConfigServerConnect(lpwsservername.param().abi(), core::mem::transmute(phmprconfig)) } #[inline] -pub unsafe fn MprConfigServerDisconnect(hmprconfig: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigServerDisconnect(hmprconfig: super::super::Foundation::HANDLE) { windows_targets::link!("mprapi.dll" "system" fn MprConfigServerDisconnect(hmprconfig : super::super::Foundation:: HANDLE)); - MprConfigServerDisconnect(hmprconfig.param().abi()) + MprConfigServerDisconnect(core::mem::transmute(hmprconfig)) } #[inline] -pub unsafe fn MprConfigServerGetInfo(hmprconfig: P0, dwlevel: u32, lplpbbuffer: *mut *mut u8) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigServerGetInfo(hmprconfig: super::super::Foundation::HANDLE, dwlevel: u32, lplpbbuffer: *mut *mut u8) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigServerGetInfo(hmprconfig : super::super::Foundation:: HANDLE, dwlevel : u32, lplpbbuffer : *mut *mut u8) -> u32); - MprConfigServerGetInfo(hmprconfig.param().abi(), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer)) + MprConfigServerGetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer)) } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] -pub unsafe fn MprConfigServerGetInfoEx(hmprconfig: P0, pserverinfo: *mut MPR_SERVER_EX1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigServerGetInfoEx(hmprconfig: super::super::Foundation::HANDLE, pserverinfo: *mut MPR_SERVER_EX1) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigServerGetInfoEx(hmprconfig : super::super::Foundation:: HANDLE, pserverinfo : *mut MPR_SERVER_EX1) -> u32); - MprConfigServerGetInfoEx(hmprconfig.param().abi(), core::mem::transmute(pserverinfo)) + MprConfigServerGetInfoEx(core::mem::transmute(hmprconfig), core::mem::transmute(pserverinfo)) } #[inline] pub unsafe fn MprConfigServerInstall(dwlevel: u32, pbuffer: *const core::ffi::c_void) -> u32 { @@ -818,21 +634,17 @@ pub unsafe fn MprConfigServerInstall(dwlevel: u32, pbuffer: *const core::ffi::c_ MprConfigServerInstall(core::mem::transmute(dwlevel), core::mem::transmute(pbuffer)) } #[inline] -pub unsafe fn MprConfigServerRefresh(hmprconfig: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigServerRefresh(hmprconfig: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigServerRefresh(hmprconfig : super::super::Foundation:: HANDLE) -> u32); - MprConfigServerRefresh(hmprconfig.param().abi()) + MprConfigServerRefresh(core::mem::transmute(hmprconfig)) } #[inline] -pub unsafe fn MprConfigServerRestore(hmprconfig: P0, lpwspath: P1) -> u32 +pub unsafe fn MprConfigServerRestore(hmprconfig: super::super::Foundation::HANDLE, lpwspath: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigServerRestore(hmprconfig : super::super::Foundation:: HANDLE, lpwspath : windows_core::PCWSTR) -> u32); - MprConfigServerRestore(hmprconfig.param().abi(), lpwspath.param().abi()) + MprConfigServerRestore(core::mem::transmute(hmprconfig), lpwspath.param().abi()) } #[inline] pub unsafe fn MprConfigServerSetInfo(hmprserver: isize, dwlevel: u32, lpbbuffer: *const u8) -> u32 { @@ -841,66 +653,46 @@ pub unsafe fn MprConfigServerSetInfo(hmprserver: isize, dwlevel: u32, lpbbuffer: } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] -pub unsafe fn MprConfigServerSetInfoEx(hmprconfig: P0, psetserverconfig: *const MPR_SERVER_SET_CONFIG_EX1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigServerSetInfoEx(hmprconfig: super::super::Foundation::HANDLE, psetserverconfig: *const MPR_SERVER_SET_CONFIG_EX1) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigServerSetInfoEx(hmprconfig : super::super::Foundation:: HANDLE, psetserverconfig : *const MPR_SERVER_SET_CONFIG_EX1) -> u32); - MprConfigServerSetInfoEx(hmprconfig.param().abi(), core::mem::transmute(psetserverconfig)) + MprConfigServerSetInfoEx(core::mem::transmute(hmprconfig), core::mem::transmute(psetserverconfig)) } #[inline] -pub unsafe fn MprConfigTransportCreate(hmprconfig: P0, dwtransportid: u32, lpwstransportname: P2, pglobalinfo: &[u8], pclientinterfaceinfo: Option<&[u8]>, lpwsdllpath: P7, phroutertransport: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn MprConfigTransportCreate(hmprconfig: super::super::Foundation::HANDLE, dwtransportid: u32, lpwstransportname: P2, pglobalinfo: &[u8], pclientinterfaceinfo: Option<&[u8]>, lpwsdllpath: P7, phroutertransport: *mut super::super::Foundation::HANDLE) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P7: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigTransportCreate(hmprconfig : super::super::Foundation:: HANDLE, dwtransportid : u32, lpwstransportname : windows_core::PCWSTR, pglobalinfo : *const u8, dwglobalinfosize : u32, pclientinterfaceinfo : *const u8, dwclientinterfaceinfosize : u32, lpwsdllpath : windows_core::PCWSTR, phroutertransport : *mut super::super::Foundation:: HANDLE) -> u32); - MprConfigTransportCreate(hmprconfig.param().abi(), core::mem::transmute(dwtransportid), lpwstransportname.param().abi(), core::mem::transmute(pglobalinfo.as_ptr()), pglobalinfo.len().try_into().unwrap(), core::mem::transmute(pclientinterfaceinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pclientinterfaceinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpwsdllpath.param().abi(), core::mem::transmute(phroutertransport)) + MprConfigTransportCreate(core::mem::transmute(hmprconfig), core::mem::transmute(dwtransportid), lpwstransportname.param().abi(), core::mem::transmute(pglobalinfo.as_ptr()), pglobalinfo.len().try_into().unwrap(), core::mem::transmute(pclientinterfaceinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pclientinterfaceinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpwsdllpath.param().abi(), core::mem::transmute(phroutertransport)) } #[inline] -pub unsafe fn MprConfigTransportDelete(hmprconfig: P0, hroutertransport: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MprConfigTransportDelete(hmprconfig: super::super::Foundation::HANDLE, hroutertransport: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigTransportDelete(hmprconfig : super::super::Foundation:: HANDLE, hroutertransport : super::super::Foundation:: HANDLE) -> u32); - MprConfigTransportDelete(hmprconfig.param().abi(), hroutertransport.param().abi()) + MprConfigTransportDelete(core::mem::transmute(hmprconfig), core::mem::transmute(hroutertransport)) } #[inline] -pub unsafe fn MprConfigTransportEnum(hmprconfig: P0, dwlevel: u32, lplpbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigTransportEnum(hmprconfig: super::super::Foundation::HANDLE, dwlevel: u32, lplpbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*mut u32>) -> u32 { 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(), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null_mut()))) + MprConfigTransportEnum(core::mem::transmute(hmprconfig), core::mem::transmute(dwlevel), core::mem::transmute(lplpbuffer), core::mem::transmute(dwprefmaxlen), core::mem::transmute(lpdwentriesread), core::mem::transmute(lpdwtotalentries), core::mem::transmute(lpdwresumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MprConfigTransportGetHandle(hmprconfig: P0, dwtransportid: u32, phroutertransport: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MprConfigTransportGetHandle(hmprconfig: super::super::Foundation::HANDLE, dwtransportid: u32, phroutertransport: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprConfigTransportGetHandle(hmprconfig : super::super::Foundation:: HANDLE, dwtransportid : u32, phroutertransport : *mut super::super::Foundation:: HANDLE) -> u32); - MprConfigTransportGetHandle(hmprconfig.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(phroutertransport)) + MprConfigTransportGetHandle(core::mem::transmute(hmprconfig), core::mem::transmute(dwtransportid), core::mem::transmute(phroutertransport)) } #[inline] -pub unsafe fn MprConfigTransportGetInfo(hmprconfig: P0, hroutertransport: P1, ppglobalinfo: Option<*mut *mut u8>, lpdwglobalinfosize: Option<*mut u32>, ppclientinterfaceinfo: Option<*mut *mut u8>, lpdwclientinterfaceinfosize: Option<*mut u32>, lplpwsdllpath: Option<*mut windows_core::PWSTR>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MprConfigTransportGetInfo(hmprconfig: super::super::Foundation::HANDLE, hroutertransport: super::super::Foundation::HANDLE, ppglobalinfo: Option<*mut *mut u8>, lpdwglobalinfosize: Option<*mut u32>, ppclientinterfaceinfo: Option<*mut *mut u8>, lpdwclientinterfaceinfosize: Option<*mut u32>, lplpwsdllpath: Option<*mut windows_core::PWSTR>) -> u32 { 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(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()))) + MprConfigTransportGetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(hroutertransport), core::mem::transmute(ppglobalinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwglobalinfosize.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppclientinterfaceinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwclientinterfaceinfosize.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpwsdllpath.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MprConfigTransportSetInfo(hmprconfig: P0, hroutertransport: P1, pglobalinfo: Option<&[u8]>, pclientinterfaceinfo: Option<&[u8]>, lpwsdllpath: P6) -> u32 +pub unsafe fn MprConfigTransportSetInfo(hmprconfig: super::super::Foundation::HANDLE, hroutertransport: super::super::Foundation::HANDLE, pglobalinfo: Option<&[u8]>, pclientinterfaceinfo: Option<&[u8]>, lpwsdllpath: P6) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigTransportSetInfo(hmprconfig : super::super::Foundation:: HANDLE, hroutertransport : super::super::Foundation:: HANDLE, pglobalinfo : *const u8, dwglobalinfosize : u32, pclientinterfaceinfo : *const u8, dwclientinterfaceinfosize : u32, lpwsdllpath : windows_core::PCWSTR) -> u32); - MprConfigTransportSetInfo(hmprconfig.param().abi(), hroutertransport.param().abi(), core::mem::transmute(pglobalinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pglobalinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pclientinterfaceinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pclientinterfaceinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpwsdllpath.param().abi()) + MprConfigTransportSetInfo(core::mem::transmute(hmprconfig), core::mem::transmute(hroutertransport), core::mem::transmute(pglobalinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pglobalinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pclientinterfaceinfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pclientinterfaceinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpwsdllpath.param().abi()) } #[inline] pub unsafe fn MprInfoBlockAdd(lpheader: *const core::ffi::c_void, dwinfotype: u32, dwitemsize: u32, dwitemcount: u32, lpitemdata: *const u8, lplpnewheader: *mut *mut core::ffi::c_void) -> u32 { @@ -948,56 +740,40 @@ pub unsafe fn MprInfoRemoveAll(lpheader: *const core::ffi::c_void, lplpnewheader MprInfoRemoveAll(core::mem::transmute(lpheader), core::mem::transmute(lplpnewheader)) } #[inline] -pub unsafe fn RasClearConnectionStatistics(hrasconn: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasClearConnectionStatistics(hrasconn: HRASCONN) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasClearConnectionStatistics(hrasconn : HRASCONN) -> u32); - RasClearConnectionStatistics(hrasconn.param().abi()) + RasClearConnectionStatistics(core::mem::transmute(hrasconn)) } #[inline] -pub unsafe fn RasClearLinkStatistics(hrasconn: P0, dwsubentry: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasClearLinkStatistics(hrasconn: HRASCONN, dwsubentry: u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasClearLinkStatistics(hrasconn : HRASCONN, dwsubentry : u32) -> u32); - RasClearLinkStatistics(hrasconn.param().abi(), core::mem::transmute(dwsubentry)) + RasClearLinkStatistics(core::mem::transmute(hrasconn), core::mem::transmute(dwsubentry)) } #[inline] -pub unsafe fn RasConnectionNotificationA(param0: P0, param1: P1, param2: u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RasConnectionNotificationA(param0: HRASCONN, param1: super::super::Foundation::HANDLE, param2: u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasConnectionNotificationA(param0 : HRASCONN, param1 : super::super::Foundation:: HANDLE, param2 : u32) -> u32); - RasConnectionNotificationA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2)) + RasConnectionNotificationA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] -pub unsafe fn RasConnectionNotificationW(param0: P0, param1: P1, param2: u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RasConnectionNotificationW(param0: HRASCONN, param1: super::super::Foundation::HANDLE, param2: u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasConnectionNotificationW(param0 : HRASCONN, param1 : super::super::Foundation:: HANDLE, param2 : u32) -> u32); - RasConnectionNotificationW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2)) + RasConnectionNotificationW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] -pub unsafe fn RasCreatePhonebookEntryA(param0: P0, param1: P1) -> u32 +pub unsafe fn RasCreatePhonebookEntryA(param0: super::super::Foundation::HWND, param1: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasCreatePhonebookEntryA(param0 : super::super::Foundation:: HWND, param1 : windows_core::PCSTR) -> u32); - RasCreatePhonebookEntryA(param0.param().abi(), param1.param().abi()) + RasCreatePhonebookEntryA(core::mem::transmute(param0), param1.param().abi()) } #[inline] -pub unsafe fn RasCreatePhonebookEntryW(param0: P0, param1: P1) -> u32 +pub unsafe fn RasCreatePhonebookEntryW(param0: super::super::Foundation::HWND, param1: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasCreatePhonebookEntryW(param0 : super::super::Foundation:: HWND, param1 : windows_core::PCWSTR) -> u32); - RasCreatePhonebookEntryW(param0.param().abi(), param1.param().abi()) + RasCreatePhonebookEntryW(core::mem::transmute(param0), param1.param().abi()) } #[inline] pub unsafe fn RasDeleteEntryA(param0: P0, param1: P1) -> u32 @@ -1041,7 +817,7 @@ where P1: 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(core::ptr::null())), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::ptr::null())), core::mem::transmute(param5)) + RasDialA(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5)) } #[inline] pub unsafe fn RasDialDlgA(lpszphonebook: P0, lpszentry: P1, lpszphonenumber: P2, lpinfo: *mut RASDIALDLG) -> super::super::Foundation::BOOL @@ -1069,27 +845,25 @@ where P1: 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(core::ptr::null())), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::ptr::null())), core::mem::transmute(param5)) + RasDialW(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5)) } #[inline] -pub unsafe fn RasEditPhonebookEntryA(param0: P0, param1: P1, param2: P2) -> u32 +pub unsafe fn RasEditPhonebookEntryA(param0: super::super::Foundation::HWND, param1: P1, param2: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasEditPhonebookEntryA(param0 : super::super::Foundation:: HWND, param1 : windows_core::PCSTR, param2 : windows_core::PCSTR) -> u32); - RasEditPhonebookEntryA(param0.param().abi(), param1.param().abi(), param2.param().abi()) + RasEditPhonebookEntryA(core::mem::transmute(param0), param1.param().abi(), param2.param().abi()) } #[inline] -pub unsafe fn RasEditPhonebookEntryW(param0: P0, param1: P1, param2: P2) -> u32 +pub unsafe fn RasEditPhonebookEntryW(param0: super::super::Foundation::HWND, param1: P1, param2: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasEditPhonebookEntryW(param0 : super::super::Foundation:: HWND, param1 : windows_core::PCWSTR, param2 : windows_core::PCWSTR) -> u32); - RasEditPhonebookEntryW(param0.param().abi(), param1.param().abi(), param2.param().abi()) + RasEditPhonebookEntryW(core::mem::transmute(param0), param1.param().abi(), param2.param().abi()) } #[inline] pub unsafe fn RasEntryDlgA(lpszphonebook: P0, lpszentry: P1, lpinfo: *mut RASENTRYDLGA) -> super::super::Foundation::BOOL @@ -1112,32 +886,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(core::ptr::null_mut())), core::mem::transmute(lpdwcbrasautodialaddresses), core::mem::transmute(lpdwcrasautodialaddresses)) + RasEnumAutodialAddressesA(core::mem::transmute(lpprasautodialaddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwcbrasautodialaddresses), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(lpdwcbrasautodialaddresses), core::mem::transmute(lpdwcrasautodialaddresses)) + RasEnumAutodialAddressesW(core::mem::transmute(lpprasautodialaddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwcbrasautodialaddresses), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(param1), core::mem::transmute(param2)) + RasEnumConnectionsA(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(param1), core::mem::transmute(param2)) + RasEnumConnectionsW(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(param1), core::mem::transmute(param2)) + RasEnumDevicesA(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(param1), core::mem::transmute(param2)) + RasEnumDevicesW(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] pub unsafe fn RasEnumEntriesA(param0: P0, param1: P1, param2: Option<*mut RASENTRYNAMEA>, param3: *mut u32, param4: *mut u32) -> u32 @@ -1146,7 +920,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(core::ptr::null_mut())), core::mem::transmute(param3), core::mem::transmute(param4)) + RasEnumEntriesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] pub unsafe fn RasEnumEntriesW(param0: P0, param1: P1, param2: Option<*mut RASENTRYNAMEW>, param3: *mut u32, param4: *mut u32) -> u32 @@ -1155,7 +929,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(core::ptr::null_mut())), core::mem::transmute(param3), core::mem::transmute(param4)) + RasEnumEntriesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] pub unsafe fn RasFreeEapUserIdentityA(praseapuseridentity: *const RASEAPUSERIDENTITYA) { @@ -1173,7 +947,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(core::ptr::null())), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param3), core::mem::transmute(param4)) + RasGetAutodialAddressA(param0.param().abi(), core::mem::transmute(param1.unwrap_or(core::mem::zeroed())), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(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 +955,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(core::ptr::null())), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param3), core::mem::transmute(param4)) + RasGetAutodialAddressW(param0.param().abi(), core::mem::transmute(param1.unwrap_or(core::mem::zeroed())), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] pub unsafe fn RasGetAutodialEnableA(param0: u32, param1: *mut super::super::Foundation::BOOL) -> u32 { @@ -1205,39 +979,30 @@ pub unsafe fn RasGetAutodialParamW(param0: u32, param1: *mut core::ffi::c_void, } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn RasGetConnectStatusA(param0: P0, param1: *mut RASCONNSTATUSA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetConnectStatusA(param0: HRASCONN, param1: *mut RASCONNSTATUSA) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetConnectStatusA(param0 : HRASCONN, param1 : *mut RASCONNSTATUSA) -> u32); - RasGetConnectStatusA(param0.param().abi(), core::mem::transmute(param1)) + RasGetConnectStatusA(core::mem::transmute(param0), core::mem::transmute(param1)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn RasGetConnectStatusW(param0: P0, param1: *mut RASCONNSTATUSW) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetConnectStatusW(param0: HRASCONN, param1: *mut RASCONNSTATUSW) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetConnectStatusW(param0 : HRASCONN, param1 : *mut RASCONNSTATUSW) -> u32); - RasGetConnectStatusW(param0.param().abi(), core::mem::transmute(param1)) + RasGetConnectStatusW(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] -pub unsafe fn RasGetConnectionStatistics(hrasconn: P0, lpstatistics: *mut RAS_STATS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetConnectionStatistics(hrasconn: HRASCONN, lpstatistics: *mut RAS_STATS) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetConnectionStatistics(hrasconn : HRASCONN, lpstatistics : *mut RAS_STATS) -> u32); - RasGetConnectionStatistics(hrasconn.param().abi(), core::mem::transmute(lpstatistics)) + RasGetConnectionStatistics(core::mem::transmute(hrasconn), core::mem::transmute(lpstatistics)) } #[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(core::ptr::null_mut())), core::mem::transmute(param1)) + RasGetCountryInfoA(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(param1)) + RasGetCountryInfoW(core::mem::transmute(param0.unwrap_or(core::mem::zeroed())), core::mem::transmute(param1)) } #[inline] pub unsafe fn RasGetCredentialsA(param0: P0, param1: P1, param2: *mut RASCREDENTIALSA) -> u32 @@ -1264,7 +1029,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(core::ptr::null_mut())), core::mem::transmute(pdwsizeofcustomauthdata)) + RasGetCustomAuthDataA(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofcustomauthdata)) } #[inline] pub unsafe fn RasGetCustomAuthDataW(pszphonebook: P0, pszentry: P1, pbcustomauthdata: Option<*mut u8>, pdwsizeofcustomauthdata: *mut u32) -> u32 @@ -1273,47 +1038,43 @@ 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(core::ptr::null_mut())), core::mem::transmute(pdwsizeofcustomauthdata)) + RasGetCustomAuthDataW(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofcustomauthdata)) } #[inline] -pub unsafe fn RasGetEapUserDataA(htoken: P0, pszphonebook: P1, pszentry: P2, pbeapdata: Option<*mut u8>, pdwsizeofeapdata: *mut u32) -> u32 +pub unsafe fn RasGetEapUserDataA(htoken: Option, pszphonebook: P1, pszentry: P2, pbeapdata: Option<*mut u8>, pdwsizeofeapdata: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(pdwsizeofeapdata)) + RasGetEapUserDataA(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofeapdata)) } #[inline] -pub unsafe fn RasGetEapUserDataW(htoken: P0, pszphonebook: P1, pszentry: P2, pbeapdata: Option<*mut u8>, pdwsizeofeapdata: *mut u32) -> u32 +pub unsafe fn RasGetEapUserDataW(htoken: Option, pszphonebook: P1, pszentry: P2, pbeapdata: Option<*mut u8>, pdwsizeofeapdata: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(pdwsizeofeapdata)) + RasGetEapUserDataW(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofeapdata)) } #[inline] -pub unsafe fn RasGetEapUserIdentityA(pszphonebook: P0, pszentry: P1, dwflags: u32, hwnd: P3, ppraseapuseridentity: *mut *mut RASEAPUSERIDENTITYA) -> u32 +pub unsafe fn RasGetEapUserIdentityA(pszphonebook: P0, pszentry: P1, dwflags: u32, hwnd: super::super::Foundation::HWND, ppraseapuseridentity: *mut *mut RASEAPUSERIDENTITYA) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEapUserIdentityA(pszphonebook : windows_core::PCSTR, pszentry : windows_core::PCSTR, dwflags : u32, hwnd : super::super::Foundation:: HWND, ppraseapuseridentity : *mut *mut RASEAPUSERIDENTITYA) -> u32); - RasGetEapUserIdentityA(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(dwflags), hwnd.param().abi(), core::mem::transmute(ppraseapuseridentity)) + RasGetEapUserIdentityA(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(hwnd), core::mem::transmute(ppraseapuseridentity)) } #[inline] -pub unsafe fn RasGetEapUserIdentityW(pszphonebook: P0, pszentry: P1, dwflags: u32, hwnd: P3, ppraseapuseridentity: *mut *mut RASEAPUSERIDENTITYW) -> u32 +pub unsafe fn RasGetEapUserIdentityW(pszphonebook: P0, pszentry: P1, dwflags: u32, hwnd: super::super::Foundation::HWND, ppraseapuseridentity: *mut *mut RASEAPUSERIDENTITYW) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEapUserIdentityW(pszphonebook : windows_core::PCWSTR, pszentry : windows_core::PCWSTR, dwflags : u32, hwnd : super::super::Foundation:: HWND, ppraseapuseridentity : *mut *mut RASEAPUSERIDENTITYW) -> u32); - RasGetEapUserIdentityW(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(dwflags), hwnd.param().abi(), core::mem::transmute(ppraseapuseridentity)) + RasGetEapUserIdentityW(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(hwnd), core::mem::transmute(ppraseapuseridentity)) } #[inline] pub unsafe fn RasGetEntryDialParamsA(param0: P0, param1: *mut RASDIALPARAMSA, param2: *mut super::super::Foundation::BOOL) -> u32 @@ -1339,7 +1100,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(core::ptr::null_mut())), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(core::ptr::null_mut()))) + RasGetEntryPropertiesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1349,7 +1110,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(core::ptr::null_mut())), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(core::ptr::null_mut()))) + RasGetEntryPropertiesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RasGetErrorStringA(resourceid: u32, lpszstring: &mut [u8]) -> u32 { @@ -1362,12 +1123,9 @@ pub unsafe fn RasGetErrorStringW(resourceid: u32, lpszstring: &mut [u16]) -> u32 RasGetErrorStringW(core::mem::transmute(resourceid), core::mem::transmute(lpszstring.as_ptr()), lpszstring.len().try_into().unwrap()) } #[inline] -pub unsafe fn RasGetLinkStatistics(hrasconn: P0, dwsubentry: u32, lpstatistics: *mut RAS_STATS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetLinkStatistics(hrasconn: HRASCONN, dwsubentry: u32, lpstatistics: *mut RAS_STATS) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetLinkStatistics(hrasconn : HRASCONN, dwsubentry : u32, lpstatistics : *mut RAS_STATS) -> u32); - RasGetLinkStatistics(hrasconn.param().abi(), core::mem::transmute(dwsubentry), core::mem::transmute(lpstatistics)) + RasGetLinkStatistics(core::mem::transmute(hrasconn), core::mem::transmute(dwsubentry), core::mem::transmute(lpstatistics)) } #[inline] pub unsafe fn RasGetPCscf(lpszpcscf: windows_core::PWSTR) -> u32 { @@ -1375,45 +1133,30 @@ pub unsafe fn RasGetPCscf(lpszpcscf: windows_core::PWSTR) -> u32 { RasGetPCscf(core::mem::transmute(lpszpcscf)) } #[inline] -pub unsafe fn RasGetProjectionInfoA(param0: P0, param1: RASPROJECTION, param2: *mut core::ffi::c_void, param3: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetProjectionInfoA(param0: HRASCONN, param1: RASPROJECTION, param2: *mut core::ffi::c_void, param3: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetProjectionInfoA(param0 : HRASCONN, param1 : RASPROJECTION, param2 : *mut core::ffi::c_void, param3 : *mut u32) -> u32); - RasGetProjectionInfoA(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) + RasGetProjectionInfoA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn RasGetProjectionInfoEx(hrasconn: P0, prasprojection: Option<*mut RAS_PROJECTION_INFO>, lpdwsize: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetProjectionInfoEx(hrasconn: HRASCONN, prasprojection: Option<*mut RAS_PROJECTION_INFO>, lpdwsize: *mut u32) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(lpdwsize)) + RasGetProjectionInfoEx(core::mem::transmute(hrasconn), core::mem::transmute(prasprojection.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsize)) } #[inline] -pub unsafe fn RasGetProjectionInfoW(param0: P0, param1: RASPROJECTION, param2: *mut core::ffi::c_void, param3: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetProjectionInfoW(param0: HRASCONN, param1: RASPROJECTION, param2: *mut core::ffi::c_void, param3: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetProjectionInfoW(param0 : HRASCONN, param1 : RASPROJECTION, param2 : *mut core::ffi::c_void, param3 : *mut u32) -> u32); - RasGetProjectionInfoW(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) + RasGetProjectionInfoW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] -pub unsafe fn RasGetSubEntryHandleA(param0: P0, param1: u32, param2: *mut HRASCONN) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetSubEntryHandleA(param0: HRASCONN, param1: u32, param2: *mut HRASCONN) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetSubEntryHandleA(param0 : HRASCONN, param1 : u32, param2 : *mut HRASCONN) -> u32); - RasGetSubEntryHandleA(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)) + RasGetSubEntryHandleA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] -pub unsafe fn RasGetSubEntryHandleW(param0: P0, param1: u32, param2: *mut HRASCONN) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasGetSubEntryHandleW(param0: HRASCONN, param1: u32, param2: *mut HRASCONN) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetSubEntryHandleW(param0 : HRASCONN, param1 : u32, param2 : *mut HRASCONN) -> u32); - RasGetSubEntryHandleW(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)) + RasGetSubEntryHandleW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] pub unsafe fn RasGetSubEntryPropertiesA(param0: P0, param1: P1, param2: u32, param3: Option<*mut RASSUBENTRYA>, param4: Option<*mut u32>, param5: Option<*mut u8>, param6: Option<*mut u32>) -> u32 @@ -1422,7 +1165,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(), core::mem::transmute(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()))) + RasGetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3.unwrap_or(core::mem::zeroed())), core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5.unwrap_or(core::mem::zeroed())), core::mem::transmute(param6.unwrap_or(core::mem::zeroed()))) } #[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,32 +1174,22 @@ 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(), core::mem::transmute(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()))) + RasGetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3.unwrap_or(core::mem::zeroed())), core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5.unwrap_or(core::mem::zeroed())), core::mem::transmute(param6.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RasHangUpA(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasHangUpA(param0: HRASCONN) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasHangUpA(param0 : HRASCONN) -> u32); - RasHangUpA(param0.param().abi()) + RasHangUpA(core::mem::transmute(param0)) } #[inline] -pub unsafe fn RasHangUpW(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasHangUpW(param0: HRASCONN) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasHangUpW(param0 : HRASCONN) -> u32); - RasHangUpW(param0.param().abi()) + RasHangUpW(core::mem::transmute(param0)) } #[inline] -pub unsafe fn RasInvokeEapUI(param0: P0, param1: u32, param2: *const RASDIALEXTENSIONS, param3: P3) -> u32 -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn RasInvokeEapUI(param0: HRASCONN, param1: u32, param2: *const RASDIALEXTENSIONS, param3: super::super::Foundation::HWND) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasInvokeEapUI(param0 : HRASCONN, param1 : u32, param2 : *const RASDIALEXTENSIONS, param3 : super::super::Foundation:: HWND) -> u32); - RasInvokeEapUI(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()) + RasInvokeEapUI(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] pub unsafe fn RasPhonebookDlgA(lpszphonebook: P0, lpszentry: P1, lpinfo: *mut RASPBDLGA) -> super::super::Foundation::BOOL @@ -1502,7 +1235,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(), core::mem::transmute(param1), core::mem::transmute(param2.unwrap_or(core::ptr::null())), core::mem::transmute(param3), core::mem::transmute(param4)) + RasSetAutodialAddressA(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] pub unsafe fn RasSetAutodialAddressW(param0: P0, param1: u32, param2: Option<*const RASAUTODIALENTRYW>, param3: u32, param4: u32) -> u32 @@ -1510,7 +1243,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(), core::mem::transmute(param1), core::mem::transmute(param2.unwrap_or(core::ptr::null())), core::mem::transmute(param3), core::mem::transmute(param4)) + RasSetAutodialAddressW(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] pub unsafe fn RasSetAutodialEnableA(param0: u32, param1: P1) -> u32 @@ -1577,24 +1310,22 @@ where RasSetCustomAuthDataW(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.as_ptr()), pbcustomauthdata.len().try_into().unwrap()) } #[inline] -pub unsafe fn RasSetEapUserDataA(htoken: P0, pszphonebook: P1, pszentry: P2, pbeapdata: *const u8, dwsizeofeapdata: u32) -> u32 +pub unsafe fn RasSetEapUserDataA(htoken: Option, pszphonebook: P1, pszentry: P2, pbeapdata: *const u8, dwsizeofeapdata: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetEapUserDataA(htoken : super::super::Foundation:: HANDLE, pszphonebook : windows_core::PCSTR, pszentry : windows_core::PCSTR, pbeapdata : *const u8, dwsizeofeapdata : u32) -> u32); - RasSetEapUserDataA(htoken.param().abi(), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata), core::mem::transmute(dwsizeofeapdata)) + RasSetEapUserDataA(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata), core::mem::transmute(dwsizeofeapdata)) } #[inline] -pub unsafe fn RasSetEapUserDataW(htoken: P0, pszphonebook: P1, pszentry: P2, pbeapdata: *const u8, dwsizeofeapdata: u32) -> u32 +pub unsafe fn RasSetEapUserDataW(htoken: Option, pszphonebook: P1, pszentry: P2, pbeapdata: *const u8, dwsizeofeapdata: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetEapUserDataW(htoken : super::super::Foundation:: HANDLE, pszphonebook : windows_core::PCWSTR, pszentry : windows_core::PCWSTR, pbeapdata : *const u8, dwsizeofeapdata : u32) -> u32); - RasSetEapUserDataW(htoken.param().abi(), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata), core::mem::transmute(dwsizeofeapdata)) + RasSetEapUserDataW(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata), core::mem::transmute(dwsizeofeapdata)) } #[inline] pub unsafe fn RasSetEntryDialParamsA(param0: P0, param1: *const RASDIALPARAMSA, param2: P2) -> u32 @@ -1622,7 +1353,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(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::ptr::null())), core::mem::transmute(param5)) + RasSetEntryPropertiesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(param5)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1632,7 +1363,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(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::ptr::null())), core::mem::transmute(param5)) + RasSetEntryPropertiesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +1372,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(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4), core::mem::transmute(param5.unwrap_or(core::ptr::null())), core::mem::transmute(param6)) + RasSetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4), core::mem::transmute(param5.unwrap_or(core::mem::zeroed())), core::mem::transmute(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,16 +1381,13 @@ 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(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4), core::mem::transmute(param5.unwrap_or(core::ptr::null())), core::mem::transmute(param6)) + RasSetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3), core::mem::transmute(param4), core::mem::transmute(param5.unwrap_or(core::mem::zeroed())), core::mem::transmute(param6)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn RasUpdateConnection(hrasconn: P0, lprasupdateconn: *const RASUPDATECONN) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RasUpdateConnection(hrasconn: HRASCONN, lprasupdateconn: *const RASUPDATECONN) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasUpdateConnection(hrasconn : HRASCONN, lprasupdateconn : *const RASUPDATECONN) -> u32); - RasUpdateConnection(hrasconn.param().abi(), core::mem::transmute(lprasupdateconn)) + RasUpdateConnection(core::mem::transmute(hrasconn), core::mem::transmute(lprasupdateconn)) } #[inline] pub unsafe fn RasValidateEntryNameA(param0: P0, param1: P1) -> u32 @@ -1690,12 +1418,9 @@ pub unsafe fn RtmAddRouteToDest(rtmreghandle: isize, routehandle: *mut isize, de RtmAddRouteToDest(core::mem::transmute(rtmreghandle), core::mem::transmute(routehandle), core::mem::transmute(destaddress), core::mem::transmute(routeinfo), core::mem::transmute(timetolive), core::mem::transmute(routelisthandle), core::mem::transmute(notifytype), core::mem::transmute(notifyhandle), core::mem::transmute(changeflags)) } #[inline] -pub unsafe fn RtmBlockMethods(rtmreghandle: isize, targethandle: P1, targettype: u8, blockingflag: u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn RtmBlockMethods(rtmreghandle: isize, targethandle: super::super::Foundation::HANDLE, targettype: u8, blockingflag: u32) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmBlockMethods(rtmreghandle : isize, targethandle : super::super::Foundation:: HANDLE, targettype : u8, blockingflag : u32) -> u32); - RtmBlockMethods(core::mem::transmute(rtmreghandle), targethandle.param().abi(), core::mem::transmute(targettype), core::mem::transmute(blockingflag)) + RtmBlockMethods(core::mem::transmute(rtmreghandle), core::mem::transmute(targethandle), core::mem::transmute(targettype), core::mem::transmute(blockingflag)) } #[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 42630043e1..842ecd60e6 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs @@ -34,12 +34,9 @@ pub unsafe fn SnmpCreatePdu(session: isize, pdu_type: SNMP_PDU_TYPE, request_id: SnmpCreatePdu(core::mem::transmute(session), core::mem::transmute(pdu_type), core::mem::transmute(request_id), core::mem::transmute(error_status), core::mem::transmute(error_index), core::mem::transmute(varbindlist)) } #[inline] -pub unsafe fn SnmpCreateSession(hwnd: P0, wmsg: u32, fcallback: SNMPAPI_CALLBACK, lpclientdata: *mut core::ffi::c_void) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn SnmpCreateSession(hwnd: super::super::Foundation::HWND, wmsg: u32, fcallback: SNMPAPI_CALLBACK, lpclientdata: *mut core::ffi::c_void) -> isize { windows_targets::link!("wsnmp32.dll" "system" fn SnmpCreateSession(hwnd : super::super::Foundation:: HWND, wmsg : u32, fcallback : SNMPAPI_CALLBACK, lpclientdata : *mut core::ffi::c_void) -> isize); - SnmpCreateSession(hwnd.param().abi(), core::mem::transmute(wmsg), core::mem::transmute(fcallback), core::mem::transmute(lpclientdata)) + SnmpCreateSession(core::mem::transmute(hwnd), core::mem::transmute(wmsg), core::mem::transmute(fcallback), core::mem::transmute(lpclientdata)) } #[inline] pub unsafe fn SnmpCreateVbl(session: isize, name: *mut smiOID, value: *mut smiVALUE) -> isize { @@ -174,7 +171,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(core::mem::transmute(oid), core::mem::transmute(string.unwrap_or(core::ptr::null_mut()))) + SnmpMgrOidToStr(core::mem::transmute(oid), core::mem::transmute(string.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SnmpMgrOpen(lpagentaddress: P0, lpagentcommunity: P1, ntimeout: i32, nretries: i32) -> *mut core::ffi::c_void @@ -219,12 +216,9 @@ pub unsafe fn SnmpOidToStr(srcoid: *const smiOID, string: &mut [u8]) -> u32 { SnmpOidToStr(core::mem::transmute(srcoid), string.len().try_into().unwrap(), core::mem::transmute(string.as_ptr())) } #[inline] -pub unsafe fn SnmpOpen(hwnd: P0, wmsg: u32) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn SnmpOpen(hwnd: super::super::Foundation::HWND, wmsg: u32) -> isize { windows_targets::link!("wsnmp32.dll" "system" fn SnmpOpen(hwnd : super::super::Foundation:: HWND, wmsg : u32) -> isize); - SnmpOpen(hwnd.param().abi(), core::mem::transmute(wmsg)) + SnmpOpen(core::mem::transmute(hwnd), core::mem::transmute(wmsg)) } #[inline] pub unsafe fn SnmpRecvMsg(session: isize, srcentity: *mut isize, dstentity: *mut isize, context: *mut isize, pdu: *mut isize) -> u32 { 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 a20c19123e..e76e05775f 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs @@ -18,22 +18,18 @@ where NPAddConnection(core::mem::transmute(lpnetresource), lppassword.param().abi(), lpusername.param().abi()) } #[inline] -pub unsafe fn NPAddConnection3(hwndowner: P0, lpnetresource: *const NETRESOURCEW, lppassword: P2, lpusername: P3, dwflags: NET_CONNECT_FLAGS) -> u32 +pub unsafe fn NPAddConnection3(hwndowner: Option, lpnetresource: *const NETRESOURCEW, lppassword: P2, lpusername: P3, dwflags: NET_CONNECT_FLAGS) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("davclnt.dll" "system" fn NPAddConnection3(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEW, lppassword : windows_core::PCWSTR, lpusername : windows_core::PCWSTR, dwflags : NET_CONNECT_FLAGS) -> u32); - NPAddConnection3(hwndowner.param().abi(), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpusername.param().abi(), core::mem::transmute(dwflags)) + NPAddConnection3(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpusername.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn NPAddConnection4(hwndowner: P0, lpnetresource: *const NETRESOURCEW, lpauthbuffer: Option<*const core::ffi::c_void>, cbauthbuffer: u32, dwflags: u32, lpuseoptions: Option<&[u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn NPAddConnection4(hwndowner: Option, lpnetresource: *const NETRESOURCEW, lpauthbuffer: Option<*const core::ffi::c_void>, cbauthbuffer: u32, dwflags: u32, lpuseoptions: Option<&[u8]>) -> u32 { 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(), core::mem::transmute(lpnetresource), core::mem::transmute(lpauthbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbauthbuffer), core::mem::transmute(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(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), core::mem::transmute(lpauthbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbauthbuffer), core::mem::transmute(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 @@ -54,20 +50,14 @@ where NPCancelConnection2(lpname.param().abi(), fforce.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn NPCloseEnum(henum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn NPCloseEnum(henum: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("davclnt.dll" "system" fn NPCloseEnum(henum : super::super::Foundation:: HANDLE) -> u32); - NPCloseEnum(henum.param().abi()) + NPCloseEnum(core::mem::transmute(henum)) } #[inline] -pub unsafe fn NPEnumResource(henum: P0, lpccount: *mut u32, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn NPEnumResource(henum: super::super::Foundation::HANDLE, lpccount: *mut u32, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> u32 { windows_targets::link!("davclnt.dll" "system" fn NPEnumResource(henum : super::super::Foundation:: HANDLE, lpccount : *mut u32, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32) -> u32); - NPEnumResource(henum.param().abi(), core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) + NPEnumResource(core::mem::transmute(henum), core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } #[inline] pub unsafe fn NPFormatNetworkName(lpremotename: P0, lpformattedname: windows_core::PWSTR, lpnlength: *mut u32, dwflags: NETWORK_NAME_FORMAT_FLAGS, dwavecharperline: u32) -> u32 @@ -83,12 +73,12 @@ pub unsafe fn NPGetCaps(ndex: u32) -> u32 { NPGetCaps(core::mem::transmute(ndex)) } #[inline] -pub unsafe fn NPGetConnection(lplocalname: P0, lpremotename: windows_core::PWSTR, lpnbufferlen: *mut u32) -> u32 +pub unsafe fn NPGetConnection(lplocalname: P0, lpremotename: Option, lpnbufferlen: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("davclnt.dll" "system" fn NPGetConnection(lplocalname : windows_core::PCWSTR, lpremotename : windows_core::PWSTR, lpnbufferlen : *mut u32) -> u32); - NPGetConnection(lplocalname.param().abi(), core::mem::transmute(lpremotename), core::mem::transmute(lpnbufferlen)) + NPGetConnection(lplocalname.param().abi(), core::mem::transmute(lpremotename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnbufferlen)) } #[inline] pub unsafe fn NPGetConnection3(lplocalname: P0, dwlevel: u32, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> u32 @@ -143,7 +133,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(core::mem::transmute(dwscope), core::mem::transmute(dwtype), core::mem::transmute(dwusage), core::mem::transmute(lpnetresource.unwrap_or(core::ptr::null())), core::mem::transmute(lphenum)) + NPOpenEnum(core::mem::transmute(dwscope), core::mem::transmute(dwtype), core::mem::transmute(dwusage), core::mem::transmute(lpnetresource.unwrap_or(core::mem::zeroed())), core::mem::transmute(lphenum)) } #[inline] pub unsafe fn WNetAddConnection2A(lpnetresource: *const NETRESOURCEA, lppassword: P1, lpusername: P2, dwflags: NET_CONNECT_FLAGS) -> super::super::Foundation::WIN32_ERROR @@ -164,40 +154,32 @@ where WNetAddConnection2W(core::mem::transmute(lpnetresource), lppassword.param().abi(), lpusername.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn WNetAddConnection3A(hwndowner: P0, lpnetresource: *const NETRESOURCEA, lppassword: P2, lpusername: P3, dwflags: NET_CONNECT_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetAddConnection3A(hwndowner: Option, lpnetresource: *const NETRESOURCEA, lppassword: P2, lpusername: P3, dwflags: NET_CONNECT_FLAGS) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetAddConnection3A(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEA, lppassword : windows_core::PCSTR, lpusername : windows_core::PCSTR, dwflags : NET_CONNECT_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - WNetAddConnection3A(hwndowner.param().abi(), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpusername.param().abi(), core::mem::transmute(dwflags)) + WNetAddConnection3A(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpusername.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn WNetAddConnection3W(hwndowner: P0, lpnetresource: *const NETRESOURCEW, lppassword: P2, lpusername: P3, dwflags: NET_CONNECT_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetAddConnection3W(hwndowner: Option, lpnetresource: *const NETRESOURCEW, lppassword: P2, lpusername: P3, dwflags: NET_CONNECT_FLAGS) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetAddConnection3W(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEW, lppassword : windows_core::PCWSTR, lpusername : windows_core::PCWSTR, dwflags : NET_CONNECT_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - WNetAddConnection3W(hwndowner.param().abi(), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpusername.param().abi(), core::mem::transmute(dwflags)) + WNetAddConnection3W(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpusername.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn WNetAddConnection4A(hwndowner: P0, lpnetresource: *const NETRESOURCEA, pauthbuffer: *const core::ffi::c_void, cbauthbuffer: u32, dwflags: NET_CONNECT_FLAGS, lpuseoptions: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn WNetAddConnection4A(hwndowner: Option, lpnetresource: *const NETRESOURCEA, pauthbuffer: *const core::ffi::c_void, cbauthbuffer: u32, dwflags: NET_CONNECT_FLAGS, lpuseoptions: &[u8]) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetAddConnection4A(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEA, pauthbuffer : *const core::ffi::c_void, cbauthbuffer : u32, dwflags : NET_CONNECT_FLAGS, lpuseoptions : *const u8, cbuseoptions : u32) -> super::super::Foundation:: WIN32_ERROR); - WNetAddConnection4A(hwndowner.param().abi(), core::mem::transmute(lpnetresource), core::mem::transmute(pauthbuffer), core::mem::transmute(cbauthbuffer), core::mem::transmute(dwflags), core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()) + WNetAddConnection4A(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), core::mem::transmute(pauthbuffer), core::mem::transmute(cbauthbuffer), core::mem::transmute(dwflags), core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()) } #[inline] -pub unsafe fn WNetAddConnection4W(hwndowner: P0, lpnetresource: *const NETRESOURCEW, pauthbuffer: *const core::ffi::c_void, cbauthbuffer: u32, dwflags: NET_CONNECT_FLAGS, lpuseoptions: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn WNetAddConnection4W(hwndowner: Option, lpnetresource: *const NETRESOURCEW, pauthbuffer: *const core::ffi::c_void, cbauthbuffer: u32, dwflags: NET_CONNECT_FLAGS, lpuseoptions: &[u8]) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetAddConnection4W(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEW, pauthbuffer : *const core::ffi::c_void, cbauthbuffer : u32, dwflags : NET_CONNECT_FLAGS, lpuseoptions : *const u8, cbuseoptions : u32) -> super::super::Foundation:: WIN32_ERROR); - WNetAddConnection4W(hwndowner.param().abi(), core::mem::transmute(lpnetresource), core::mem::transmute(pauthbuffer), core::mem::transmute(cbauthbuffer), core::mem::transmute(dwflags), core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()) + WNetAddConnection4W(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), core::mem::transmute(pauthbuffer), core::mem::transmute(cbauthbuffer), core::mem::transmute(dwflags), core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()) } #[inline] pub unsafe fn WNetAddConnectionA(lpremotename: P0, lppassword: P1, lplocalname: P2) -> super::super::Foundation::WIN32_ERROR @@ -256,20 +238,14 @@ where WNetCancelConnectionW(lpname.param().abi(), fforce.param().abi()) } #[inline] -pub unsafe fn WNetCloseEnum(henum: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn WNetCloseEnum(henum: super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetCloseEnum(henum : super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - WNetCloseEnum(henum.param().abi()) + WNetCloseEnum(core::mem::transmute(henum)) } #[inline] -pub unsafe fn WNetConnectionDialog(hwnd: P0, dwtype: u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn WNetConnectionDialog(hwnd: super::super::Foundation::HWND, dwtype: u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetConnectionDialog(hwnd : super::super::Foundation:: HWND, dwtype : u32) -> super::super::Foundation:: WIN32_ERROR); - WNetConnectionDialog(hwnd.param().abi(), core::mem::transmute(dwtype)) + WNetConnectionDialog(core::mem::transmute(hwnd), core::mem::transmute(dwtype)) } #[inline] pub unsafe fn WNetConnectionDialog1A(lpconndlgstruct: *mut CONNECTDLGSTRUCTA) -> super::super::Foundation::WIN32_ERROR { @@ -282,12 +258,9 @@ pub unsafe fn WNetConnectionDialog1W(lpconndlgstruct: *mut CONNECTDLGSTRUCTW) -> WNetConnectionDialog1W(core::mem::transmute(lpconndlgstruct)) } #[inline] -pub unsafe fn WNetDisconnectDialog(hwnd: P0, dwtype: u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn WNetDisconnectDialog(hwnd: Option, dwtype: u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetDisconnectDialog(hwnd : super::super::Foundation:: HWND, dwtype : u32) -> super::super::Foundation:: WIN32_ERROR); - WNetDisconnectDialog(hwnd.param().abi(), core::mem::transmute(dwtype)) + WNetDisconnectDialog(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwtype)) } #[inline] pub unsafe fn WNetDisconnectDialog1A(lpconndlgstruct: *const DISCDLGSTRUCTA) -> super::super::Foundation::WIN32_ERROR { @@ -300,36 +273,30 @@ pub unsafe fn WNetDisconnectDialog1W(lpconndlgstruct: *const DISCDLGSTRUCTW) -> WNetDisconnectDialog1W(core::mem::transmute(lpconndlgstruct)) } #[inline] -pub unsafe fn WNetEnumResourceA(henum: P0, lpccount: *mut u32, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn WNetEnumResourceA(henum: super::super::Foundation::HANDLE, lpccount: *mut u32, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetEnumResourceA(henum : super::super::Foundation:: HANDLE, lpccount : *mut u32, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetEnumResourceA(henum.param().abi(), core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) + WNetEnumResourceA(core::mem::transmute(henum), core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } #[inline] -pub unsafe fn WNetEnumResourceW(henum: P0, lpccount: *mut u32, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn WNetEnumResourceW(henum: super::super::Foundation::HANDLE, lpccount: *mut u32, lpbuffer: *mut core::ffi::c_void, lpbuffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetEnumResourceW(henum : super::super::Foundation:: HANDLE, lpccount : *mut u32, lpbuffer : *mut core::ffi::c_void, lpbuffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetEnumResourceW(henum.param().abi(), core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) + WNetEnumResourceW(core::mem::transmute(henum), core::mem::transmute(lpccount), core::mem::transmute(lpbuffer), core::mem::transmute(lpbuffersize)) } #[inline] -pub unsafe fn WNetGetConnectionA(lplocalname: P0, lpremotename: windows_core::PSTR, lpnlength: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetGetConnectionA(lplocalname: P0, lpremotename: Option, lpnlength: *mut u32) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetGetConnectionA(lplocalname : windows_core::PCSTR, lpremotename : windows_core::PSTR, lpnlength : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetGetConnectionA(lplocalname.param().abi(), core::mem::transmute(lpremotename), core::mem::transmute(lpnlength)) + WNetGetConnectionA(lplocalname.param().abi(), core::mem::transmute(lpremotename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnlength)) } #[inline] -pub unsafe fn WNetGetConnectionW(lplocalname: P0, lpremotename: windows_core::PWSTR, lpnlength: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetGetConnectionW(lplocalname: P0, lpremotename: Option, lpnlength: *mut u32) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetGetConnectionW(lplocalname : windows_core::PCWSTR, lpremotename : windows_core::PWSTR, lpnlength : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetGetConnectionW(lplocalname.param().abi(), core::mem::transmute(lpremotename), core::mem::transmute(lpnlength)) + WNetGetConnectionW(lplocalname.param().abi(), core::mem::transmute(lpremotename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnlength)) } #[inline] pub unsafe fn WNetGetLastErrorA(lperror: *mut u32, lperrorbuf: &mut [u8], lpnamebuf: &mut [u8]) -> super::super::Foundation::WIN32_ERROR { @@ -422,12 +389,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(core::mem::transmute(dwscope), core::mem::transmute(dwtype), core::mem::transmute(dwusage), core::mem::transmute(lpnetresource.unwrap_or(core::ptr::null())), core::mem::transmute(lphenum)) + WNetOpenEnumA(core::mem::transmute(dwscope), core::mem::transmute(dwtype), core::mem::transmute(dwusage), core::mem::transmute(lpnetresource.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dwscope), core::mem::transmute(dwtype), core::mem::transmute(dwusage), core::mem::transmute(lpnetresource.unwrap_or(core::ptr::null())), core::mem::transmute(lphenum)) + WNetOpenEnumW(core::mem::transmute(dwscope), core::mem::transmute(dwtype), core::mem::transmute(dwusage), core::mem::transmute(lpnetresource.unwrap_or(core::mem::zeroed())), core::mem::transmute(lphenum)) } #[inline] pub unsafe fn WNetSetLastErrorA(err: u32, lperror: P1, lpproviders: P2) @@ -448,62 +415,54 @@ where WNetSetLastErrorW(core::mem::transmute(err), lperror.param().abi(), lpproviders.param().abi()) } #[inline] -pub unsafe fn WNetUseConnection4A(hwndowner: P0, lpnetresource: *const NETRESOURCEA, pauthbuffer: Option<*const core::ffi::c_void>, cbauthbuffer: u32, dwflags: u32, lpuseoptions: Option<&[u8]>, lpaccessname: windows_core::PSTR, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn WNetUseConnection4A(hwndowner: Option, lpnetresource: *const NETRESOURCEA, pauthbuffer: Option<*const core::ffi::c_void>, cbauthbuffer: u32, dwflags: u32, lpuseoptions: Option<&[u8]>, lpaccessname: Option, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(), + core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), - core::mem::transmute(pauthbuffer.unwrap_or(core::ptr::null())), + core::mem::transmute(pauthbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbauthbuffer), core::mem::transmute(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())), + core::mem::transmute(lpaccessname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpbuffersize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpresult.unwrap_or(core::mem::zeroed())), ) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn WNetUseConnection4W(hwndowner: Option, lpnetresource: *const NETRESOURCEW, pauthbuffer: Option<*const core::ffi::c_void>, cbauthbuffer: u32, dwflags: u32, lpuseoptions: Option<&[u8]>, lpaccessname: Option, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(), + core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), - core::mem::transmute(pauthbuffer.unwrap_or(core::ptr::null())), + core::mem::transmute(pauthbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbauthbuffer), core::mem::transmute(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())), + core::mem::transmute(lpaccessname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpbuffersize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpresult.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn WNetUseConnectionA(hwndowner: P0, lpnetresource: *const NETRESOURCEA, lppassword: P2, lpuserid: P3, dwflags: NET_CONNECT_FLAGS, lpaccessname: windows_core::PSTR, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetUseConnectionA(hwndowner: Option, lpnetresource: *const NETRESOURCEA, lppassword: P2, lpuserid: P3, dwflags: NET_CONNECT_FLAGS, lpaccessname: Option, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P2: windows_core::Param, P3: 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(), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpuserid.param().abi(), core::mem::transmute(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()))) + WNetUseConnectionA(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpuserid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpaccessname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffersize.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpresult.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WNetUseConnectionW(hwndowner: P0, lpnetresource: *const NETRESOURCEW, lppassword: P2, lpuserid: P3, dwflags: NET_CONNECT_FLAGS, lpaccessname: windows_core::PWSTR, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetUseConnectionW(hwndowner: Option, lpnetresource: *const NETRESOURCEW, lppassword: P2, lpuserid: P3, dwflags: NET_CONNECT_FLAGS, lpaccessname: Option, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P2: windows_core::Param, P3: 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(), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpuserid.param().abi(), core::mem::transmute(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()))) + WNetUseConnectionW(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), lppassword.param().abi(), lpuserid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpaccessname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffersize.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpresult.unwrap_or(core::mem::zeroed()))) } 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/WebDav/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs index a8f5dee792..690a2dcb86 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs @@ -18,52 +18,43 @@ where DavCancelConnectionsToServer(lpname.param().abi(), fforce.param().abi()) } #[inline] -pub unsafe fn DavDeleteConnection(connectionhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DavDeleteConnection(connectionhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("netapi32.dll" "system" fn DavDeleteConnection(connectionhandle : super::super::Foundation:: HANDLE) -> u32); - DavDeleteConnection(connectionhandle.param().abi()) + DavDeleteConnection(core::mem::transmute(connectionhandle)) } #[inline] -pub unsafe fn DavFlushFile(hfile: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DavFlushFile(hfile: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("netapi32.dll" "system" fn DavFlushFile(hfile : super::super::Foundation:: HANDLE) -> u32); - DavFlushFile(hfile.param().abi()) + DavFlushFile(core::mem::transmute(hfile)) } #[inline] -pub unsafe fn DavGetExtendedError(hfile: P0, exterror: *mut u32, exterrorstring: windows_core::PWSTR, cchsize: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DavGetExtendedError(hfile: super::super::Foundation::HANDLE, exterror: *mut u32, exterrorstring: windows_core::PWSTR, cchsize: *mut u32) -> u32 { windows_targets::link!("netapi32.dll" "system" fn DavGetExtendedError(hfile : super::super::Foundation:: HANDLE, exterror : *mut u32, exterrorstring : windows_core::PWSTR, cchsize : *mut u32) -> u32); - DavGetExtendedError(hfile.param().abi(), core::mem::transmute(exterror), core::mem::transmute(exterrorstring), core::mem::transmute(cchsize)) + DavGetExtendedError(core::mem::transmute(hfile), core::mem::transmute(exterror), core::mem::transmute(exterrorstring), core::mem::transmute(cchsize)) } #[inline] -pub unsafe fn DavGetHTTPFromUNCPath(uncpath: P0, url: windows_core::PWSTR, lpsize: *mut u32) -> u32 +pub unsafe fn DavGetHTTPFromUNCPath(uncpath: P0, url: Option, lpsize: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DavGetHTTPFromUNCPath(uncpath : windows_core::PCWSTR, url : windows_core::PWSTR, lpsize : *mut u32) -> u32); - DavGetHTTPFromUNCPath(uncpath.param().abi(), core::mem::transmute(url), core::mem::transmute(lpsize)) + DavGetHTTPFromUNCPath(uncpath.param().abi(), core::mem::transmute(url.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)) } #[inline] -pub unsafe fn DavGetTheLockOwnerOfTheFile(filename: P0, lockownername: windows_core::PWSTR, lockownernamelengthinbytes: *mut u32) -> u32 +pub unsafe fn DavGetTheLockOwnerOfTheFile(filename: P0, lockownername: Option, lockownernamelengthinbytes: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("davclnt.dll" "system" fn DavGetTheLockOwnerOfTheFile(filename : windows_core::PCWSTR, lockownername : windows_core::PWSTR, lockownernamelengthinbytes : *mut u32) -> u32); - DavGetTheLockOwnerOfTheFile(filename.param().abi(), core::mem::transmute(lockownername), core::mem::transmute(lockownernamelengthinbytes)) + DavGetTheLockOwnerOfTheFile(filename.param().abi(), core::mem::transmute(lockownername.unwrap_or(core::mem::zeroed())), core::mem::transmute(lockownernamelengthinbytes)) } #[inline] -pub unsafe fn DavGetUNCFromHTTPPath(url: P0, uncpath: windows_core::PWSTR, lpsize: *mut u32) -> u32 +pub unsafe fn DavGetUNCFromHTTPPath(url: P0, uncpath: Option, lpsize: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DavGetUNCFromHTTPPath(url : windows_core::PCWSTR, uncpath : windows_core::PWSTR, lpsize : *mut u32) -> u32); - DavGetUNCFromHTTPPath(url.param().abi(), core::mem::transmute(uncpath), core::mem::transmute(lpsize)) + DavGetUNCFromHTTPPath(url.param().abi(), core::mem::transmute(uncpath.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)) } #[inline] pub unsafe fn DavInvalidateCache(urlname: P0) -> u32 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 cb2f568c02..7606032fd2 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs @@ -1,26 +1,17 @@ #[inline] -pub unsafe fn WFDCancelOpenSession(hsessionhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WFDCancelOpenSession(hsessionhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WFDCancelOpenSession(hsessionhandle : super::super::Foundation:: HANDLE) -> u32); - WFDCancelOpenSession(hsessionhandle.param().abi()) + WFDCancelOpenSession(core::mem::transmute(hsessionhandle)) } #[inline] -pub unsafe fn WFDCloseHandle(hclienthandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WFDCloseHandle(hclienthandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WFDCloseHandle(hclienthandle : super::super::Foundation:: HANDLE) -> u32); - WFDCloseHandle(hclienthandle.param().abi()) + WFDCloseHandle(core::mem::transmute(hclienthandle)) } #[inline] -pub unsafe fn WFDCloseSession(hsessionhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WFDCloseSession(hsessionhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WFDCloseSession(hsessionhandle : super::super::Foundation:: HANDLE) -> u32); - WFDCloseSession(hsessionhandle.param().abi()) + WFDCloseSession(core::mem::transmute(hsessionhandle)) } #[inline] pub unsafe fn WFDOpenHandle(dwclientversion: u32, pdwnegotiatedversion: *mut u32, phclienthandle: *mut super::super::Foundation::HANDLE) -> u32 { @@ -28,20 +19,14 @@ pub unsafe fn WFDOpenHandle(dwclientversion: u32, pdwnegotiatedversion: *mut u32 WFDOpenHandle(core::mem::transmute(dwclientversion), core::mem::transmute(pdwnegotiatedversion), core::mem::transmute(phclienthandle)) } #[inline] -pub unsafe fn WFDOpenLegacySession(hclienthandle: P0, plegacymacaddress: *const *const u8, phsessionhandle: *mut super::super::Foundation::HANDLE, pguidsessioninterface: *mut windows_core::GUID) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WFDOpenLegacySession(hclienthandle: super::super::Foundation::HANDLE, plegacymacaddress: *const *const u8, phsessionhandle: *mut super::super::Foundation::HANDLE, pguidsessioninterface: *mut windows_core::GUID) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WFDOpenLegacySession(hclienthandle : super::super::Foundation:: HANDLE, plegacymacaddress : *const *const u8, phsessionhandle : *mut super::super::Foundation:: HANDLE, pguidsessioninterface : *mut windows_core::GUID) -> u32); - WFDOpenLegacySession(hclienthandle.param().abi(), core::mem::transmute(plegacymacaddress), core::mem::transmute(phsessionhandle), core::mem::transmute(pguidsessioninterface)) + WFDOpenLegacySession(core::mem::transmute(hclienthandle), core::mem::transmute(plegacymacaddress), core::mem::transmute(phsessionhandle), core::mem::transmute(pguidsessioninterface)) } #[inline] -pub unsafe fn WFDStartOpenSession(hclienthandle: P0, pdeviceaddress: *const *const u8, pvcontext: Option<*const core::ffi::c_void>, pfncallback: WFD_OPEN_SESSION_COMPLETE_CALLBACK, phsessionhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WFDStartOpenSession(hclienthandle: super::super::Foundation::HANDLE, pdeviceaddress: *const *const u8, pvcontext: Option<*const core::ffi::c_void>, pfncallback: WFD_OPEN_SESSION_COMPLETE_CALLBACK, phsessionhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(pdeviceaddress), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pfncallback), core::mem::transmute(phsessionhandle)) + WFDStartOpenSession(core::mem::transmute(hclienthandle), core::mem::transmute(pdeviceaddress), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfncallback), core::mem::transmute(phsessionhandle)) } #[inline] pub unsafe fn WFDUpdateDeviceVisibility(pdeviceaddress: *const *const u8) -> u32 { @@ -54,72 +39,52 @@ pub unsafe fn WlanAllocateMemory(dwmemorysize: u32) -> *mut core::ffi::c_void { WlanAllocateMemory(core::mem::transmute(dwmemorysize)) } #[inline] -pub unsafe fn WlanCloseHandle(hclienthandle: P0, preserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanCloseHandle(hclienthandle: super::super::Foundation::HANDLE, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null()))) + WlanCloseHandle(core::mem::transmute(hclienthandle), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn WlanConnect(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, pconnectionparameters: *const WLAN_CONNECTION_PARAMETERS, preserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanConnect(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, pconnectionparameters: *const WLAN_CONNECTION_PARAMETERS, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(pconnectionparameters), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanConnect(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(pconnectionparameters), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] -pub unsafe fn WlanConnect2(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, pconnectionparameters: *const WLAN_CONNECTION_PARAMETERS_V2, preserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanConnect2(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, pconnectionparameters: *const WLAN_CONNECTION_PARAMETERS_V2, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(pconnectionparameters), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanConnect2(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(pconnectionparameters), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanDeleteProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanDeleteProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanDeleteProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanDeviceServiceCommand(hclienthandle: super::super::Foundation::HANDLE, 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 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(pdeviceserviceguid), core::mem::transmute(dwopcode), core::mem::transmute(dwinbuffersize), core::mem::transmute(pinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(dwoutbuffersize), core::mem::transmute(poutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwbytesreturned)) + WlanDeviceServiceCommand(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(pdeviceserviceguid), core::mem::transmute(dwopcode), core::mem::transmute(dwinbuffersize), core::mem::transmute(pinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoutbuffersize), core::mem::transmute(poutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbytesreturned)) } #[inline] -pub unsafe fn WlanDisconnect(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, preserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanDisconnect(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanDisconnect(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanEnumInterfaces(hclienthandle: P0, preserved: Option<*const core::ffi::c_void>, ppinterfacelist: *mut *mut WLAN_INTERFACE_INFO_LIST) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanEnumInterfaces(hclienthandle: super::super::Foundation::HANDLE, preserved: Option<*const core::ffi::c_void>, ppinterfacelist: *mut *mut WLAN_INTERFACE_INFO_LIST) -> u32 { 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(core::ptr::null())), core::mem::transmute(ppinterfacelist)) + WlanEnumInterfaces(core::mem::transmute(hclienthandle), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppinterfacelist)) } #[inline] -pub unsafe fn WlanExtractPsdIEDataList(hclienthandle: P0, prawiedata: &[u8], strformat: P3, preserved: Option<*const core::ffi::c_void>, pppsdiedatalist: *mut *mut WLAN_RAW_DATA_LIST) -> u32 +pub unsafe fn WlanExtractPsdIEDataList(hclienthandle: super::super::Foundation::HANDLE, prawiedata: &[u8], strformat: P3, preserved: Option<*const core::ffi::c_void>, pppsdiedatalist: *mut *mut WLAN_RAW_DATA_LIST) -> u32 where - P0: windows_core::Param, P3: 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(core::ptr::null())), core::mem::transmute(pppsdiedatalist)) + WlanExtractPsdIEDataList(core::mem::transmute(hclienthandle), prawiedata.len().try_into().unwrap(), core::mem::transmute(prawiedata.as_ptr()), strformat.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pppsdiedatalist)) } #[inline] pub unsafe fn WlanFreeMemory(pmemory: *const core::ffi::c_void) { @@ -127,374 +92,280 @@ pub unsafe fn WlanFreeMemory(pmemory: *const core::ffi::c_void) { WlanFreeMemory(core::mem::transmute(pmemory)) } #[inline] -pub unsafe fn WlanGetAvailableNetworkList(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, dwflags: u32, preserved: Option<*const core::ffi::c_void>, ppavailablenetworklist: *mut *mut WLAN_AVAILABLE_NETWORK_LIST) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanGetAvailableNetworkList(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, dwflags: u32, preserved: Option<*const core::ffi::c_void>, ppavailablenetworklist: *mut *mut WLAN_AVAILABLE_NETWORK_LIST) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(dwflags), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppavailablenetworklist)) + WlanGetAvailableNetworkList(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(dwflags), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanGetAvailableNetworkList2(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, dwflags: u32, preserved: Option<*const core::ffi::c_void>, ppavailablenetworklist: *mut *mut WLAN_AVAILABLE_NETWORK_LIST_V2) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(dwflags), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppavailablenetworklist)) + WlanGetAvailableNetworkList2(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(dwflags), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanGetFilterList(hclienthandle: super::super::Foundation::HANDLE, wlanfilterlisttype: WLAN_FILTER_LIST_TYPE, preserved: Option<*const core::ffi::c_void>, ppnetworklist: *mut *mut DOT11_NETWORK_LIST) -> u32 { 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(), core::mem::transmute(wlanfilterlisttype), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppnetworklist)) + WlanGetFilterList(core::mem::transmute(hclienthandle), core::mem::transmute(wlanfilterlisttype), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanGetInterfaceCapability(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, preserved: Option<*const core::ffi::c_void>, ppcapability: *mut *mut WLAN_INTERFACE_CAPABILITY) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppcapability)) + WlanGetInterfaceCapability(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcapability)) } #[inline] -pub unsafe fn WlanGetNetworkBssList(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, dot11bsstype: DOT11_BSS_TYPE, bsecurityenabled: P4, preserved: Option<*const core::ffi::c_void>, ppwlanbsslist: *mut *mut WLAN_BSS_LIST) -> u32 +pub unsafe fn WlanGetNetworkBssList(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, dot11bsstype: DOT11_BSS_TYPE, bsecurityenabled: P4, preserved: Option<*const core::ffi::c_void>, ppwlanbsslist: *mut *mut WLAN_BSS_LIST) -> u32 where - P0: windows_core::Param, P4: 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(pdot11ssid.unwrap_or(core::ptr::null())), core::mem::transmute(dot11bsstype), bsecurityenabled.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppwlanbsslist)) + WlanGetNetworkBssList(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(pdot11ssid.unwrap_or(core::mem::zeroed())), core::mem::transmute(dot11bsstype), bsecurityenabled.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwlanbsslist)) } #[inline] -pub unsafe fn WlanGetProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, preserved: Option<*const core::ffi::c_void>, pstrprofilexml: *mut windows_core::PWSTR, pdwflags: Option<*mut u32>, pdwgrantedaccess: Option<*mut u32>) -> u32 +pub unsafe fn WlanGetProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, preserved: Option<*const core::ffi::c_void>, pstrprofilexml: *mut windows_core::PWSTR, pdwflags: Option<*mut u32>, pdwgrantedaccess: Option<*mut u32>) -> u32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pstrprofilexml), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) + WlanGetProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstrprofilexml), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanGetProfileCustomUserData(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, preserved: Option<*const core::ffi::c_void>, pdwdatasize: *mut u32, ppdata: *mut *mut u8) -> u32 +pub unsafe fn WlanGetProfileCustomUserData(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, preserved: Option<*const core::ffi::c_void>, pdwdatasize: *mut u32, ppdata: *mut *mut u8) -> u32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata)) + WlanGetProfileCustomUserData(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatasize), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanGetProfileList(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, preserved: Option<*const core::ffi::c_void>, ppprofilelist: *mut *mut WLAN_PROFILE_INFO_LIST) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppprofilelist)) + WlanGetProfileList(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanGetSecuritySettings(hclienthandle: super::super::Foundation::HANDLE, securableobject: WLAN_SECURABLE_OBJECT, pvaluetype: Option<*mut WLAN_OPCODE_VALUE_TYPE>, pstrcurrentsddl: *mut windows_core::PWSTR, pdwgrantedaccess: *mut u32) -> u32 { 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(), core::mem::transmute(securableobject), core::mem::transmute(pvaluetype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pstrcurrentsddl), core::mem::transmute(pdwgrantedaccess)) + WlanGetSecuritySettings(core::mem::transmute(hclienthandle), core::mem::transmute(securableobject), core::mem::transmute(pvaluetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstrcurrentsddl), core::mem::transmute(pdwgrantedaccess)) } #[inline] -pub unsafe fn WlanGetSupportedDeviceServices(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, ppdevsvcguidlist: *mut *mut WLAN_DEVICE_SERVICE_GUID_LIST) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanGetSupportedDeviceServices(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, ppdevsvcguidlist: *mut *mut WLAN_DEVICE_SERVICE_GUID_LIST) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WlanGetSupportedDeviceServices(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, ppdevsvcguidlist : *mut *mut WLAN_DEVICE_SERVICE_GUID_LIST) -> u32); - WlanGetSupportedDeviceServices(hclienthandle.param().abi(), core::mem::transmute(pinterfaceguid), core::mem::transmute(ppdevsvcguidlist)) + WlanGetSupportedDeviceServices(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(ppdevsvcguidlist)) } #[inline] -pub unsafe fn WlanHostedNetworkForceStart(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkForceStart(hclienthandle: super::super::Foundation::HANDLE, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkForceStart(core::mem::transmute(hclienthandle), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanHostedNetworkForceStop(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkForceStop(hclienthandle: super::super::Foundation::HANDLE, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkForceStop(core::mem::transmute(hclienthandle), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanHostedNetworkInitSettings(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkInitSettings(hclienthandle: super::super::Foundation::HANDLE, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkInitSettings(core::mem::transmute(hclienthandle), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(opcode), core::mem::transmute(pdwdatasize), core::mem::transmute(ppvdata), core::mem::transmute(pwlanopcodevaluetype), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkQueryProperty(core::mem::transmute(hclienthandle), core::mem::transmute(opcode), core::mem::transmute(pdwdatasize), core::mem::transmute(ppvdata), core::mem::transmute(pwlanopcodevaluetype), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(pdwkeylength), core::mem::transmute(ppuckeydata), core::mem::transmute(pbispassphrase), core::mem::transmute(pbpersistent), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkQuerySecondaryKey(core::mem::transmute(hclienthandle), core::mem::transmute(pdwkeylength), core::mem::transmute(ppuckeydata), core::mem::transmute(pbispassphrase), core::mem::transmute(pbpersistent), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanHostedNetworkQueryStatus(hclienthandle: P0, ppwlanhostednetworkstatus: *mut *mut WLAN_HOSTED_NETWORK_STATUS, pvreserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkQueryStatus(hclienthandle: super::super::Foundation::HANDLE, ppwlanhostednetworkstatus: *mut *mut WLAN_HOSTED_NETWORK_STATUS, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(ppwlanhostednetworkstatus), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkQueryStatus(core::mem::transmute(hclienthandle), core::mem::transmute(ppwlanhostednetworkstatus), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanHostedNetworkRefreshSecuritySettings(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkRefreshSecuritySettings(hclienthandle: super::super::Foundation::HANDLE, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkRefreshSecuritySettings(core::mem::transmute(hclienthandle), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkSetProperty(hclienthandle: super::super::Foundation::HANDLE, 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 { 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(), core::mem::transmute(opcode), core::mem::transmute(dwdatasize), core::mem::transmute(pvdata), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkSetProperty(core::mem::transmute(hclienthandle), core::mem::transmute(opcode), core::mem::transmute(dwdatasize), core::mem::transmute(pvdata), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanHostedNetworkSetSecondaryKey(hclienthandle: P0, puckeydata: &[u8], bispassphrase: P3, bpersistent: P4, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanHostedNetworkSetSecondaryKey(hclienthandle: super::super::Foundation::HANDLE, puckeydata: &[u8], bispassphrase: P3, bpersistent: P4, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkSetSecondaryKey(core::mem::transmute(hclienthandle), puckeydata.len().try_into().unwrap(), core::mem::transmute(puckeydata.as_ptr()), bispassphrase.param().abi(), bpersistent.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanHostedNetworkStartUsing(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkStartUsing(hclienthandle: super::super::Foundation::HANDLE, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkStartUsing(core::mem::transmute(hclienthandle), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanHostedNetworkStopUsing(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkStopUsing(hclienthandle: super::super::Foundation::HANDLE, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + WlanHostedNetworkStopUsing(core::mem::transmute(hclienthandle), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut core::ffi::c_void>, pdwbytesreturned: *mut u32) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(r#type), core::mem::transmute(dwinbuffersize), core::mem::transmute(pinbuffer), core::mem::transmute(dwoutbuffersize), core::mem::transmute(poutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwbytesreturned)) + WlanIhvControl(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(r#type), core::mem::transmute(dwinbuffersize), core::mem::transmute(pinbuffer), core::mem::transmute(dwoutbuffersize), core::mem::transmute(poutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dwclientversion), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwnegotiatedversion), core::mem::transmute(phclienthandle)) + WlanOpenHandle(core::mem::transmute(dwclientversion), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwnegotiatedversion), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanQueryAutoConfigParameter(hclienthandle: super::super::Foundation::HANDLE, 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 { 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(), core::mem::transmute(opcode), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata), core::mem::transmute(pwlanopcodevaluetype.unwrap_or(core::ptr::null_mut()))) + WlanQueryAutoConfigParameter(core::mem::transmute(hclienthandle), core::mem::transmute(opcode), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata), core::mem::transmute(pwlanopcodevaluetype.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanQueryInterface(hclienthandle: super::super::Foundation::HANDLE, 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 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(opcode), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata), core::mem::transmute(pwlanopcodevaluetype.unwrap_or(core::ptr::null_mut()))) + WlanQueryInterface(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(opcode), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata), core::mem::transmute(pwlanopcodevaluetype.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dwreasoncode), pstringbuffer.len().try_into().unwrap(), core::mem::transmute(pstringbuffer.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanReasonCodeToString(core::mem::transmute(dwreasoncode), pstringbuffer.len().try_into().unwrap(), core::mem::transmute(pstringbuffer.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanRegisterDeviceServiceNotification(hclienthandle: P0, pdevsvcguidlist: Option<*const WLAN_DEVICE_SERVICE_GUID_LIST>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanRegisterDeviceServiceNotification(hclienthandle: super::super::Foundation::HANDLE, pdevsvcguidlist: Option<*const WLAN_DEVICE_SERVICE_GUID_LIST>) -> u32 { 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(core::ptr::null()))) + WlanRegisterDeviceServiceNotification(core::mem::transmute(hclienthandle), core::mem::transmute(pdevsvcguidlist.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanRegisterNotification(hclienthandle: P0, dwnotifsource: WLAN_NOTIFICATION_SOURCES, bignoreduplicate: P2, funccallback: WLAN_NOTIFICATION_CALLBACK, pcallbackcontext: Option<*const core::ffi::c_void>, preserved: Option<*const core::ffi::c_void>, pdwprevnotifsource: Option<*mut u32>) -> u32 +pub unsafe fn WlanRegisterNotification(hclienthandle: super::super::Foundation::HANDLE, dwnotifsource: WLAN_NOTIFICATION_SOURCES, bignoreduplicate: P2, funccallback: Option, pcallbackcontext: Option<*const core::ffi::c_void>, preserved: Option<*const core::ffi::c_void>, pdwprevnotifsource: Option<*mut u32>) -> u32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(dwnotifsource), bignoreduplicate.param().abi(), core::mem::transmute(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()))) + WlanRegisterNotification(core::mem::transmute(hclienthandle), core::mem::transmute(dwnotifsource), bignoreduplicate.param().abi(), core::mem::transmute(funccallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwprevnotifsource.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanRegisterVirtualStationNotification(hclienthandle: P0, bregister: P1, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanRegisterVirtualStationNotification(hclienthandle: super::super::Foundation::HANDLE, bregister: P1, preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null()))) + WlanRegisterVirtualStationNotification(core::mem::transmute(hclienthandle), bregister.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanRenameProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, stroldprofilename: P2, strnewprofilename: P3, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanRenameProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, stroldprofilename: P2, strnewprofilename: P3, preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P3: 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(), core::mem::transmute(pinterfaceguid), stroldprofilename.param().abi(), strnewprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanRenameProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), stroldprofilename.param().abi(), strnewprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSaveTemporaryProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, stralluserprofilesecurity: P3, dwflags: u32, boverwrite: P5, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanSaveTemporaryProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, stralluserprofilesecurity: P3, dwflags: u32, boverwrite: P5, preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P5: 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(), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), stralluserprofilesecurity.param().abi(), core::mem::transmute(dwflags), boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSaveTemporaryProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), stralluserprofilesecurity.param().abi(), core::mem::transmute(dwflags), boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanScan(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, piedata: Option<*const WLAN_RAW_DATA>, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(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()))) + WlanScan(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(pdot11ssid.unwrap_or(core::mem::zeroed())), core::mem::transmute(piedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanSetAutoConfigParameter(hclienthandle: super::super::Foundation::HANDLE, opcode: WLAN_AUTOCONF_OPCODE, dwdatasize: u32, pdata: *const core::ffi::c_void, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(opcode), core::mem::transmute(dwdatasize), core::mem::transmute(pdata), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSetAutoConfigParameter(core::mem::transmute(hclienthandle), core::mem::transmute(opcode), core::mem::transmute(dwdatasize), core::mem::transmute(pdata), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanSetFilterList(hclienthandle: super::super::Foundation::HANDLE, wlanfilterlisttype: WLAN_FILTER_LIST_TYPE, pnetworklist: Option<*const DOT11_NETWORK_LIST>, preserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(wlanfilterlisttype), core::mem::transmute(pnetworklist.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSetFilterList(core::mem::transmute(hclienthandle), core::mem::transmute(wlanfilterlisttype), core::mem::transmute(pnetworklist.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(opcode), core::mem::transmute(dwdatasize), core::mem::transmute(pdata), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSetInterface(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(opcode), core::mem::transmute(dwdatasize), core::mem::transmute(pdata), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSetProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, dwflags: u32, strprofilexml: P3, stralluserprofilesecurity: P4, boverwrite: P5, preserved: Option<*const core::ffi::c_void>, pdwreasoncode: *mut u32) -> u32 +pub unsafe fn WlanSetProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, dwflags: u32, strprofilexml: P3, stralluserprofilesecurity: P4, boverwrite: P5, preserved: Option<*const core::ffi::c_void>, pdwreasoncode: *mut u32) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: 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(), core::mem::transmute(pinterfaceguid), core::mem::transmute(dwflags), strprofilexml.param().abi(), stralluserprofilesecurity.param().abi(), boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwreasoncode)) + WlanSetProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(dwflags), strprofilexml.param().abi(), stralluserprofilesecurity.param().abi(), boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwreasoncode)) } #[inline] -pub unsafe fn WlanSetProfileCustomUserData(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, pdata: &[u8], preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanSetProfileCustomUserData(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, pdata: &[u8], preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), pdata.len().try_into().unwrap(), core::mem::transmute(pdata.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSetProfileCustomUserData(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), pdata.len().try_into().unwrap(), core::mem::transmute(pdata.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security_ExtensibleAuthenticationProtocol")] #[inline] -pub unsafe fn WlanSetProfileEapUserData(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, eaptype: super::super::Security::ExtensibleAuthenticationProtocol::EAP_METHOD_TYPE, dwflags: WLAN_SET_EAPHOST_FLAGS, pbeapuserdata: Option<&[u8]>, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanSetProfileEapUserData(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, eaptype: super::super::Security::ExtensibleAuthenticationProtocol::EAP_METHOD_TYPE, dwflags: WLAN_SET_EAPHOST_FLAGS, pbeapuserdata: Option<&[u8]>, preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(eaptype), core::mem::transmute(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()))) + WlanSetProfileEapUserData(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(eaptype), core::mem::transmute(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::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSetProfileEapXmlUserData(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, dwflags: WLAN_SET_EAPHOST_FLAGS, streapxmluserdata: P4, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanSetProfileEapXmlUserData(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, dwflags: WLAN_SET_EAPHOST_FLAGS, streapxmluserdata: P4, preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P4: 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(), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(dwflags), streapxmluserdata.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSetProfileEapXmlUserData(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(dwflags), streapxmluserdata.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSetProfileList(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilenames: &[windows_core::PCWSTR], preserved: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WlanSetProfileList(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilenames: &[windows_core::PCWSTR], preserved: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(pinterfaceguid), strprofilenames.len().try_into().unwrap(), core::mem::transmute(strprofilenames.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSetProfileList(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilenames.len().try_into().unwrap(), core::mem::transmute(strprofilenames.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSetProfilePosition(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, dwposition: u32, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanSetProfilePosition(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, dwposition: u32, preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(dwposition), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSetProfilePosition(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), core::mem::transmute(dwposition), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSetPsdIEDataList(hclienthandle: P0, strformat: P1, ppsdiedatalist: Option<*const WLAN_RAW_DATA_LIST>, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanSetPsdIEDataList(hclienthandle: super::super::Foundation::HANDLE, strformat: P1, ppsdiedatalist: Option<*const WLAN_RAW_DATA_LIST>, preserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WlanSetPsdIEDataList(core::mem::transmute(hclienthandle), strformat.param().abi(), core::mem::transmute(ppsdiedatalist.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSetSecuritySettings(hclienthandle: P0, securableobject: WLAN_SECURABLE_OBJECT, strmodifiedsddl: P2) -> u32 +pub unsafe fn WlanSetSecuritySettings(hclienthandle: super::super::Foundation::HANDLE, securableobject: WLAN_SECURABLE_OBJECT, strmodifiedsddl: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetSecuritySettings(hclienthandle : super::super::Foundation:: HANDLE, securableobject : WLAN_SECURABLE_OBJECT, strmodifiedsddl : windows_core::PCWSTR) -> u32); - WlanSetSecuritySettings(hclienthandle.param().abi(), core::mem::transmute(securableobject), strmodifiedsddl.param().abi()) + WlanSetSecuritySettings(core::mem::transmute(hclienthandle), core::mem::transmute(securableobject), strmodifiedsddl.param().abi()) } #[inline] -pub unsafe fn WlanUIEditProfile(dwclientversion: u32, wstrprofilename: P1, pinterfaceguid: *const windows_core::GUID, hwnd: P3, wlstartpage: WL_DISPLAY_PAGES, preserved: Option<*const core::ffi::c_void>, pwlanreasoncode: Option<*mut u32>) -> u32 +pub unsafe fn WlanUIEditProfile(dwclientversion: u32, wstrprofilename: P1, pinterfaceguid: *const windows_core::GUID, hwnd: super::super::Foundation::HWND, wlstartpage: WL_DISPLAY_PAGES, preserved: Option<*const core::ffi::c_void>, pwlanreasoncode: Option<*mut u32>) -> u32 where P1: windows_core::Param, - P3: 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(core::mem::transmute(dwclientversion), wstrprofilename.param().abi(), core::mem::transmute(pinterfaceguid), hwnd.param().abi(), core::mem::transmute(wlstartpage), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pwlanreasoncode.unwrap_or(core::ptr::null_mut()))) + WlanUIEditProfile(core::mem::transmute(dwclientversion), wstrprofilename.param().abi(), core::mem::transmute(pinterfaceguid), core::mem::transmute(hwnd), core::mem::transmute(wlstartpage), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwlanreasoncode.unwrap_or(core::mem::zeroed()))) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 8fe4ef93de..cc9f1490c8 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs @@ -26,15 +26,12 @@ 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(core::mem::transmute(callback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + OnDemandRegisterNotification(core::mem::transmute(callback), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn OnDemandUnRegisterNotification(registrationhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn OnDemandUnRegisterNotification(registrationhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("ondemandconnroutehelper.dll" "system" fn OnDemandUnRegisterNotification(registrationhandle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - OnDemandUnRegisterNotification(registrationhandle.param().abi()).ok() + OnDemandUnRegisterNotification(core::mem::transmute(registrationhandle)).ok() } #[inline] pub unsafe fn WcmFreeMemory(pmemory: *mut core::ffi::c_void) { @@ -44,7 +41,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(core::ptr::null())), core::mem::transmute(ppprofilelist)) + WcmGetProfileList(core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppprofilelist)) } #[inline] pub unsafe fn WcmQueryProperty(pinterface: Option<*const windows_core::GUID>, strprofilename: P1, property: WCM_PROPERTY, preserved: Option<*const core::ffi::c_void>, pdwdatasize: *mut u32, ppdata: *mut *mut u8) -> u32 @@ -52,7 +49,7 @@ where P1: 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(core::ptr::null())), strprofilename.param().abi(), core::mem::transmute(property), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata)) + WcmQueryProperty(core::mem::transmute(pinterface.unwrap_or(core::mem::zeroed())), strprofilename.param().abi(), core::mem::transmute(property), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata)) } #[inline] pub unsafe fn WcmSetProfileList(pprofilelist: *const WCM_PROFILE_INFO_LIST, dwposition: u32, fignoreunknownprofiles: P2, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -60,7 +57,7 @@ where P2: 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(core::mem::transmute(pprofilelist), core::mem::transmute(dwposition), fignoreunknownprofiles.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) + WcmSetProfileList(core::mem::transmute(pprofilelist), core::mem::transmute(dwposition), fignoreunknownprofiles.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WcmSetProperty(pinterface: Option<*const windows_core::GUID>, strprofilename: P1, property: WCM_PROPERTY, preserved: Option<*const core::ffi::c_void>, pbdata: Option<&[u8]>) -> u32 @@ -68,7 +65,7 @@ where P1: 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(core::ptr::null())), strprofilename.param().abi(), core::mem::transmute(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()))) + WcmSetProperty(core::mem::transmute(pinterface.unwrap_or(core::mem::zeroed())), strprofilename.param().abi(), core::mem::transmute(property), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), 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()))) } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 ecd584a27b..3b95a502f3 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs @@ -1,192 +1,122 @@ #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmCalloutAdd0(enginehandle: P0, callout: *const FWPM_CALLOUT0, sd: P2, id: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmCalloutAdd0(enginehandle: super::super::Foundation::HANDLE, callout: *const FWPM_CALLOUT0, sd: Option, id: Option<*mut u32>) -> u32 { 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(), core::mem::transmute(callout), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmCalloutAdd0(core::mem::transmute(enginehandle), core::mem::transmute(callout), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FwpmCalloutCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_CALLOUT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_CALLOUT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmCalloutCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmCalloutDeleteById0(enginehandle: P0, id: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutDeleteById0(enginehandle : super::super::Foundation:: HANDLE, id : u32) -> u32); - FwpmCalloutDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + FwpmCalloutDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn FwpmCalloutDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutDeleteByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID) -> u32); - FwpmCalloutDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmCalloutDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmCalloutDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmCalloutDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmCalloutDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmCalloutEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_CALLOUT0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmCalloutEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_CALLOUT0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_CALLOUT0, numentriesreturned : *mut u32) -> u32); - FwpmCalloutEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmCalloutEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn FwpmCalloutGetById0(enginehandle: P0, id: u32, callout: *mut *mut FWPM_CALLOUT0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutGetById0(enginehandle: super::super::Foundation::HANDLE, id: u32, callout: *mut *mut FWPM_CALLOUT0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutGetById0(enginehandle : super::super::Foundation:: HANDLE, id : u32, callout : *mut *mut FWPM_CALLOUT0) -> u32); - FwpmCalloutGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(callout)) + FwpmCalloutGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(callout)) } #[inline] -pub unsafe fn FwpmCalloutGetByKey0(enginehandle: P0, key: *const windows_core::GUID, callout: *mut *mut FWPM_CALLOUT0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutGetByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, callout: *mut *mut FWPM_CALLOUT0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutGetByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, callout : *mut *mut FWPM_CALLOUT0) -> u32); - FwpmCalloutGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(callout)) + FwpmCalloutGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(callout)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmCalloutGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutGetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmCalloutGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmCalloutSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutSetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmCalloutSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutSubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_CALLOUT_SUBSCRIPTION0, callback: FWPM_CALLOUT_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(changehandle)) + FwpmCalloutSubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } #[inline] -pub unsafe fn FwpmCalloutSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_CALLOUT_SUBSCRIPTION0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutSubscriptionsGet0(enginehandle: super::super::Foundation::HANDLE, entries: *mut *mut *mut FWPM_CALLOUT_SUBSCRIPTION0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutSubscriptionsGet0(enginehandle : super::super::Foundation:: HANDLE, entries : *mut *mut *mut FWPM_CALLOUT_SUBSCRIPTION0, numentries : *mut u32) -> u32); - FwpmCalloutSubscriptionsGet0(enginehandle.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + FwpmCalloutSubscriptionsGet0(core::mem::transmute(enginehandle), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn FwpmCalloutUnsubscribeChanges0(enginehandle: P0, changehandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmCalloutUnsubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, changehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutUnsubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, changehandle : super::super::Foundation:: HANDLE) -> u32); - FwpmCalloutUnsubscribeChanges0(enginehandle.param().abi(), core::mem::transmute(changehandle)) + FwpmCalloutUnsubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(changehandle)) } #[inline] -pub unsafe fn FwpmConnectionCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_CONNECTION_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_CONNECTION_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmConnectionCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: P0, enumhandle: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmConnectionDestroyEnumHandle0(enginehandle.param().abi(), enumhandle.param().abi()) + FwpmConnectionDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmConnectionEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_CONNECTION0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmConnectionEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_CONNECTION0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_CONNECTION0, numentriesreturned : *mut u32) -> u32); - FwpmConnectionEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmConnectionEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn FwpmConnectionGetById0(enginehandle: P0, id: u64, connection: *mut *mut FWPM_CONNECTION0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionGetById0(enginehandle: super::super::Foundation::HANDLE, id: u64, connection: *mut *mut FWPM_CONNECTION0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionGetById0(enginehandle : super::super::Foundation:: HANDLE, id : u64, connection : *mut *mut FWPM_CONNECTION0) -> u32); - FwpmConnectionGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(connection)) + FwpmConnectionGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(connection)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmConnectionGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionGetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionGetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, 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); - FwpmConnectionGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmConnectionGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmConnectionSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionSetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(), core::mem::transmute(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()))) + FwpmConnectionSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionSubscribe0(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_CONNECTION_SUBSCRIPTION0, callback: FWPM_CONNECTION_CALLBACK0, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(eventshandle)) + FwpmConnectionSubscribe0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } #[inline] -pub unsafe fn FwpmConnectionUnsubscribe0(enginehandle: P0, eventshandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmConnectionUnsubscribe0(enginehandle: super::super::Foundation::HANDLE, eventshandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionUnsubscribe0(enginehandle : super::super::Foundation:: HANDLE, eventshandle : super::super::Foundation:: HANDLE) -> u32); - FwpmConnectionUnsubscribe0(enginehandle.param().abi(), core::mem::transmute(eventshandle)) + FwpmConnectionUnsubscribe0(core::mem::transmute(enginehandle), core::mem::transmute(eventshandle)) } #[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(core::mem::transmute(flags), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(subscriptionhandle)) + FwpmDynamicKeywordSubscribe0(core::mem::transmute(flags), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(subscriptionhandle)) } #[inline] -pub unsafe fn FwpmDynamicKeywordUnsubscribe0(subscriptionhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmDynamicKeywordUnsubscribe0(subscriptionhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmDynamicKeywordUnsubscribe0(subscriptionhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmDynamicKeywordUnsubscribe0(subscriptionhandle.param().abi()) + FwpmDynamicKeywordUnsubscribe0(core::mem::transmute(subscriptionhandle)) } #[inline] pub unsafe fn FwpmEngineClose0(enginehandle: super::super::Foundation::HANDLE) -> u32 { @@ -195,21 +125,15 @@ pub unsafe fn FwpmEngineClose0(enginehandle: super::super::Foundation::HANDLE) - } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmEngineGetOption0(enginehandle: P0, option: FWPM_ENGINE_OPTION, value: *mut *mut FWP_VALUE0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmEngineGetOption0(enginehandle: super::super::Foundation::HANDLE, option: FWPM_ENGINE_OPTION, value: *mut *mut FWP_VALUE0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineGetOption0(enginehandle : super::super::Foundation:: HANDLE, option : FWPM_ENGINE_OPTION, value : *mut *mut FWP_VALUE0) -> u32); - FwpmEngineGetOption0(enginehandle.param().abi(), core::mem::transmute(option), core::mem::transmute(value)) + FwpmEngineGetOption0(core::mem::transmute(enginehandle), core::mem::transmute(option), core::mem::transmute(value)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmEngineGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmEngineGetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineGetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, 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); - FwpmEngineGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmEngineGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Rpc"))] #[inline] @@ -218,140 +142,93 @@ 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(), core::mem::transmute(authnservice), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), core::mem::transmute(session.unwrap_or(core::ptr::null())), core::mem::transmute(enginehandle)) + FwpmEngineOpen0(servername.param().abi(), core::mem::transmute(authnservice), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(session.unwrap_or(core::mem::zeroed())), core::mem::transmute(enginehandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmEngineSetOption0(enginehandle: P0, option: FWPM_ENGINE_OPTION, newvalue: *const FWP_VALUE0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmEngineSetOption0(enginehandle: super::super::Foundation::HANDLE, option: FWPM_ENGINE_OPTION, newvalue: *const FWP_VALUE0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineSetOption0(enginehandle : super::super::Foundation:: HANDLE, option : FWPM_ENGINE_OPTION, newvalue : *const FWP_VALUE0) -> u32); - FwpmEngineSetOption0(enginehandle.param().abi(), core::mem::transmute(option), core::mem::transmute(newvalue)) + FwpmEngineSetOption0(core::mem::transmute(enginehandle), core::mem::transmute(option), core::mem::transmute(newvalue)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmEngineSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmEngineSetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(), core::mem::transmute(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()))) + FwpmEngineSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterAdd0(enginehandle: P0, filter: *const FWPM_FILTER0, sd: P2, id: Option<*mut u64>) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmFilterAdd0(enginehandle: super::super::Foundation::HANDLE, filter: *const FWPM_FILTER0, sd: Option, id: Option<*mut u64>) -> u32 { 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(), core::mem::transmute(filter), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmFilterAdd0(core::mem::transmute(enginehandle), core::mem::transmute(filter), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_FILTER_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_FILTER_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmFilterCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmFilterDeleteById0(enginehandle: P0, id: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterDeleteById0(enginehandle : super::super::Foundation:: HANDLE, id : u64) -> u32); - FwpmFilterDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + FwpmFilterDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn FwpmFilterDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterDeleteByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID) -> u32); - FwpmFilterDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmFilterDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmFilterDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmFilterDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmFilterDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_FILTER0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmFilterEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_FILTER0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_FILTER0, numentriesreturned : *mut u32) -> u32); - FwpmFilterEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmFilterEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterGetById0(enginehandle: P0, id: u64, filter: *mut *mut FWPM_FILTER0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterGetById0(enginehandle: super::super::Foundation::HANDLE, id: u64, filter: *mut *mut FWPM_FILTER0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterGetById0(enginehandle : super::super::Foundation:: HANDLE, id : u64, filter : *mut *mut FWPM_FILTER0) -> u32); - FwpmFilterGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(filter)) + FwpmFilterGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(filter)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterGetByKey0(enginehandle: P0, key: *const windows_core::GUID, filter: *mut *mut FWPM_FILTER0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterGetByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, filter: *mut *mut FWPM_FILTER0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterGetByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, filter : *mut *mut FWPM_FILTER0) -> u32); - FwpmFilterGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(filter)) + FwpmFilterGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(filter)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterGetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmFilterGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterSetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmFilterSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterSubscribeChanges0(enginehandle: P0, subscription: *const FWPM_FILTER_SUBSCRIPTION0, callback: FWPM_FILTER_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterSubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_FILTER_SUBSCRIPTION0, callback: FWPM_FILTER_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(changehandle)) + FwpmFilterSubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmFilterSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_FILTER_SUBSCRIPTION0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterSubscriptionsGet0(enginehandle: super::super::Foundation::HANDLE, entries: *mut *mut *mut FWPM_FILTER_SUBSCRIPTION0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterSubscriptionsGet0(enginehandle : super::super::Foundation:: HANDLE, entries : *mut *mut *mut FWPM_FILTER_SUBSCRIPTION0, numentries : *mut u32) -> u32); - FwpmFilterSubscriptionsGet0(enginehandle.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + FwpmFilterSubscriptionsGet0(core::mem::transmute(enginehandle), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn FwpmFilterUnsubscribeChanges0(enginehandle: P0, changehandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmFilterUnsubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, changehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterUnsubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, changehandle : super::super::Foundation:: HANDLE) -> u32); - FwpmFilterUnsubscribeChanges0(enginehandle.param().abi(), core::mem::transmute(changehandle)) + FwpmFilterUnsubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(changehandle)) } #[inline] pub unsafe fn FwpmFreeMemory0(p: *mut *mut core::ffi::c_void) { @@ -368,1240 +245,781 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmIPsecTunnelAdd0(enginehandle: P0, flags: u32, mainmodepolicy: Option<*const FWPM_PROVIDER_CONTEXT0>, tunnelpolicy: *const FWPM_PROVIDER_CONTEXT0, filterconditions: &[FWPM_FILTER_CONDITION0], sd: P6) -> u32 -where - P0: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelAdd0(enginehandle: super::super::Foundation::HANDLE, flags: u32, mainmodepolicy: Option<*const FWPM_PROVIDER_CONTEXT0>, tunnelpolicy: *const FWPM_PROVIDER_CONTEXT0, filterconditions: &[FWPM_FILTER_CONDITION0], sd: Option) -> u32 { 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(), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), sd.param().abi()) + FwpmIPsecTunnelAdd0(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmIPsecTunnelAdd1(enginehandle: P0, flags: u32, mainmodepolicy: Option<*const FWPM_PROVIDER_CONTEXT1>, tunnelpolicy: *const FWPM_PROVIDER_CONTEXT1, filterconditions: &[FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: P7) -> u32 -where - P0: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelAdd1(enginehandle: super::super::Foundation::HANDLE, flags: u32, mainmodepolicy: Option<*const FWPM_PROVIDER_CONTEXT1>, tunnelpolicy: *const FWPM_PROVIDER_CONTEXT1, filterconditions: &[FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: Option) -> u32 { 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(), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd1(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmIPsecTunnelAdd2(enginehandle: P0, flags: u32, mainmodepolicy: Option<*const FWPM_PROVIDER_CONTEXT2>, tunnelpolicy: *const FWPM_PROVIDER_CONTEXT2, filterconditions: &[FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: P7) -> u32 -where - P0: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelAdd2(enginehandle: super::super::Foundation::HANDLE, flags: u32, mainmodepolicy: Option<*const FWPM_PROVIDER_CONTEXT2>, tunnelpolicy: *const FWPM_PROVIDER_CONTEXT2, filterconditions: &[FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: Option) -> u32 { 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(), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd2(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmIPsecTunnelAdd3(enginehandle: P0, flags: u32, mainmodepolicy: Option<*const FWPM_PROVIDER_CONTEXT3>, tunnelpolicy: *const FWPM_PROVIDER_CONTEXT3, filterconditions: &[FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: P7) -> u32 -where - P0: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelAdd3(enginehandle: super::super::Foundation::HANDLE, flags: u32, mainmodepolicy: Option<*const FWPM_PROVIDER_CONTEXT3>, tunnelpolicy: *const FWPM_PROVIDER_CONTEXT3, filterconditions: &[FWPM_FILTER_CONDITION0], keymodkey: Option<*const windows_core::GUID>, sd: Option) -> u32 { 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(), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd3(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(mainmodepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(tunnelpolicy), filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelDeleteByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID) -> u32); - FwpmIPsecTunnelDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmIPsecTunnelDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmLayerCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_LAYER_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_LAYER_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmLayerCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmLayerDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmLayerDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmLayerDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmLayerEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_LAYER0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmLayerEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_LAYER0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_LAYER0, numentriesreturned : *mut u32) -> u32); - FwpmLayerEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmLayerEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn FwpmLayerGetById0(enginehandle: P0, id: u16, layer: *mut *mut FWPM_LAYER0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerGetById0(enginehandle: super::super::Foundation::HANDLE, id: u16, layer: *mut *mut FWPM_LAYER0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerGetById0(enginehandle : super::super::Foundation:: HANDLE, id : u16, layer : *mut *mut FWPM_LAYER0) -> u32); - FwpmLayerGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(layer)) + FwpmLayerGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(layer)) } #[inline] -pub unsafe fn FwpmLayerGetByKey0(enginehandle: P0, key: *const windows_core::GUID, layer: *mut *mut FWPM_LAYER0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerGetByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, layer: *mut *mut FWPM_LAYER0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerGetByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, layer : *mut *mut FWPM_LAYER0) -> u32); - FwpmLayerGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(layer)) + FwpmLayerGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(layer)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmLayerGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerGetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmLayerGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmLayerSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmLayerSetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmLayerSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_NET_EVENT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_NET_EVENT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmNetEventCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmNetEventDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmNetEventDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmNetEventDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_NET_EVENT0, numentriesreturned : *mut u32) -> u32); - FwpmNetEventEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT1, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum1(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT1, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum1(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_NET_EVENT1, numentriesreturned : *mut u32) -> u32); - FwpmNetEventEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventEnum2(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT2, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum2(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT2, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum2(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_NET_EVENT2, numentriesreturned : *mut u32) -> u32); - FwpmNetEventEnum2(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum2(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventEnum3(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT3, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum3(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT3, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum3(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_NET_EVENT3, numentriesreturned : *mut u32) -> u32); - FwpmNetEventEnum3(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum3(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventEnum4(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT4, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum4(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT4, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum4(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_NET_EVENT4, numentriesreturned : *mut u32) -> u32); - FwpmNetEventEnum4(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum4(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventEnum5(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT5, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmNetEventEnum5(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_NET_EVENT5, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventEnum5(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_NET_EVENT5, numentriesreturned : *mut u32) -> u32); - FwpmNetEventEnum5(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmNetEventEnum5(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventSubscribe0(enginehandle: P0, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK0, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventSubscribe0(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK0, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(eventshandle)) + FwpmNetEventSubscribe0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventSubscribe1(enginehandle: P0, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK1, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventSubscribe1(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK1, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(eventshandle)) + FwpmNetEventSubscribe1(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventSubscribe2(enginehandle: P0, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK2, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventSubscribe2(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK2, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(eventshandle)) + FwpmNetEventSubscribe2(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventSubscribe3(enginehandle: P0, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK3, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventSubscribe3(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK3, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(eventshandle)) + FwpmNetEventSubscribe3(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventSubscribe4(enginehandle: P0, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK4, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventSubscribe4(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_NET_EVENT_SUBSCRIPTION0, callback: FWPM_NET_EVENT_CALLBACK4, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(eventshandle)) + FwpmNetEventSubscribe4(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_NET_EVENT_SUBSCRIPTION0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventSubscriptionsGet0(enginehandle: super::super::Foundation::HANDLE, entries: *mut *mut *mut FWPM_NET_EVENT_SUBSCRIPTION0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventSubscriptionsGet0(enginehandle : super::super::Foundation:: HANDLE, entries : *mut *mut *mut FWPM_NET_EVENT_SUBSCRIPTION0, numentries : *mut u32) -> u32); - FwpmNetEventSubscriptionsGet0(enginehandle.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + FwpmNetEventSubscriptionsGet0(core::mem::transmute(enginehandle), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn FwpmNetEventUnsubscribe0(enginehandle: P0, eventshandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventUnsubscribe0(enginehandle: super::super::Foundation::HANDLE, eventshandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventUnsubscribe0(enginehandle : super::super::Foundation:: HANDLE, eventshandle : super::super::Foundation:: HANDLE) -> u32); - FwpmNetEventUnsubscribe0(enginehandle.param().abi(), core::mem::transmute(eventshandle)) + FwpmNetEventUnsubscribe0(core::mem::transmute(enginehandle), core::mem::transmute(eventshandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventsGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventsGetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventsGetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, 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); - FwpmNetEventsGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmNetEventsGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmNetEventsSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmNetEventsSetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(), core::mem::transmute(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()))) + FwpmNetEventsSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderAdd0(enginehandle: P0, provider: *const FWPM_PROVIDER0, sd: P2) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderAdd0(enginehandle: super::super::Foundation::HANDLE, provider: *const FWPM_PROVIDER0, sd: Option) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderAdd0(enginehandle : super::super::Foundation:: HANDLE, provider : *const FWPM_PROVIDER0, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmProviderAdd0(enginehandle.param().abi(), core::mem::transmute(provider), sd.param().abi()) + FwpmProviderAdd0(core::mem::transmute(enginehandle), core::mem::transmute(provider), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextAdd0(enginehandle: P0, providercontext: *const FWPM_PROVIDER_CONTEXT0, sd: P2, id: Option<*mut u64>) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextAdd0(enginehandle: super::super::Foundation::HANDLE, providercontext: *const FWPM_PROVIDER_CONTEXT0, sd: Option, id: Option<*mut u64>) -> u32 { 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(), core::mem::transmute(providercontext), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmProviderContextAdd0(core::mem::transmute(enginehandle), core::mem::transmute(providercontext), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextAdd1(enginehandle: P0, providercontext: *const FWPM_PROVIDER_CONTEXT1, sd: P2, id: Option<*mut u64>) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextAdd1(enginehandle: super::super::Foundation::HANDLE, providercontext: *const FWPM_PROVIDER_CONTEXT1, sd: Option, id: Option<*mut u64>) -> u32 { 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(), core::mem::transmute(providercontext), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmProviderContextAdd1(core::mem::transmute(enginehandle), core::mem::transmute(providercontext), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextAdd2(enginehandle: P0, providercontext: *const FWPM_PROVIDER_CONTEXT2, sd: P2, id: Option<*mut u64>) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextAdd2(enginehandle: super::super::Foundation::HANDLE, providercontext: *const FWPM_PROVIDER_CONTEXT2, sd: Option, id: Option<*mut u64>) -> u32 { 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(), core::mem::transmute(providercontext), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmProviderContextAdd2(core::mem::transmute(enginehandle), core::mem::transmute(providercontext), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextAdd3(enginehandle: P0, providercontext: *const FWPM_PROVIDER_CONTEXT3, sd: P2, id: Option<*mut u64>) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextAdd3(enginehandle: super::super::Foundation::HANDLE, providercontext: *const FWPM_PROVIDER_CONTEXT3, sd: Option, id: Option<*mut u64>) -> u32 { 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(), core::mem::transmute(providercontext), sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) + FwpmProviderContextAdd3(core::mem::transmute(enginehandle), core::mem::transmute(providercontext), core::mem::transmute(sd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FwpmProviderContextCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmProviderContextCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmProviderContextDeleteById0(enginehandle: P0, id: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextDeleteById0(enginehandle : super::super::Foundation:: HANDLE, id : u64) -> u32); - FwpmProviderContextDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + FwpmProviderContextDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn FwpmProviderContextDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextDeleteByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID) -> u32); - FwpmProviderContextDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmProviderContextDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmProviderContextDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmProviderContextDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmProviderContextDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_PROVIDER_CONTEXT0, numentriesreturned : *mut u32) -> u32); - FwpmProviderContextEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderContextEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT1, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextEnum1(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT1, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextEnum1(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_PROVIDER_CONTEXT1, numentriesreturned : *mut u32) -> u32); - FwpmProviderContextEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderContextEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextEnum2(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT2, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextEnum2(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT2, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextEnum2(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_PROVIDER_CONTEXT2, numentriesreturned : *mut u32) -> u32); - FwpmProviderContextEnum2(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderContextEnum2(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextEnum3(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT3, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextEnum3(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT3, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextEnum3(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_PROVIDER_CONTEXT3, numentriesreturned : *mut u32) -> u32); - FwpmProviderContextEnum3(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderContextEnum3(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetById0(enginehandle: P0, id: u64, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetById0(enginehandle: super::super::Foundation::HANDLE, id: u64, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetById0(enginehandle : super::super::Foundation:: HANDLE, id : u64, providercontext : *mut *mut FWPM_PROVIDER_CONTEXT0) -> u32); - FwpmProviderContextGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(providercontext)) + FwpmProviderContextGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetById1(enginehandle: P0, id: u64, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetById1(enginehandle: super::super::Foundation::HANDLE, id: u64, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT1) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetById1(enginehandle : super::super::Foundation:: HANDLE, id : u64, providercontext : *mut *mut FWPM_PROVIDER_CONTEXT1) -> u32); - FwpmProviderContextGetById1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(providercontext)) + FwpmProviderContextGetById1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetById2(enginehandle: P0, id: u64, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT2) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetById2(enginehandle: super::super::Foundation::HANDLE, id: u64, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT2) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetById2(enginehandle : super::super::Foundation:: HANDLE, id : u64, providercontext : *mut *mut FWPM_PROVIDER_CONTEXT2) -> u32); - FwpmProviderContextGetById2(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(providercontext)) + FwpmProviderContextGetById2(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetById3(enginehandle: P0, id: u64, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT3) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetById3(enginehandle: super::super::Foundation::HANDLE, id: u64, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT3) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetById3(enginehandle : super::super::Foundation:: HANDLE, id : u64, providercontext : *mut *mut FWPM_PROVIDER_CONTEXT3) -> u32); - FwpmProviderContextGetById3(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(providercontext)) + FwpmProviderContextGetById3(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetByKey0(enginehandle: P0, key: *const windows_core::GUID, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, providercontext : *mut *mut FWPM_PROVIDER_CONTEXT0) -> u32); - FwpmProviderContextGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(providercontext)) + FwpmProviderContextGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetByKey1(enginehandle: P0, key: *const windows_core::GUID, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetByKey1(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT1) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetByKey1(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, providercontext : *mut *mut FWPM_PROVIDER_CONTEXT1) -> u32); - FwpmProviderContextGetByKey1(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(providercontext)) + FwpmProviderContextGetByKey1(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetByKey2(enginehandle: P0, key: *const windows_core::GUID, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT2) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetByKey2(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT2) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetByKey2(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, providercontext : *mut *mut FWPM_PROVIDER_CONTEXT2) -> u32); - FwpmProviderContextGetByKey2(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(providercontext)) + FwpmProviderContextGetByKey2(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetByKey3(enginehandle: P0, key: *const windows_core::GUID, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT3) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetByKey3(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, providercontext: *mut *mut FWPM_PROVIDER_CONTEXT3) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetByKey3(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, providercontext : *mut *mut FWPM_PROVIDER_CONTEXT3) -> u32); - FwpmProviderContextGetByKey3(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(providercontext)) + FwpmProviderContextGetByKey3(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(providercontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextGetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmProviderContextGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderContextSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextSetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmProviderContextSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextSubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, 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 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(changehandle)) + FwpmProviderContextSubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } #[inline] -pub unsafe fn FwpmProviderContextSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextSubscriptionsGet0(enginehandle: super::super::Foundation::HANDLE, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextSubscriptionsGet0(enginehandle : super::super::Foundation:: HANDLE, entries : *mut *mut *mut FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0, numentries : *mut u32) -> u32); - FwpmProviderContextSubscriptionsGet0(enginehandle.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + FwpmProviderContextSubscriptionsGet0(core::mem::transmute(enginehandle), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn FwpmProviderContextUnsubscribeChanges0(enginehandle: P0, changehandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderContextUnsubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, changehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextUnsubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, changehandle : super::super::Foundation:: HANDLE) -> u32); - FwpmProviderContextUnsubscribeChanges0(enginehandle.param().abi(), core::mem::transmute(changehandle)) + FwpmProviderContextUnsubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(changehandle)) } #[inline] -pub unsafe fn FwpmProviderCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_PROVIDER_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_PROVIDER_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmProviderCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderDeleteByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID) -> u32); - FwpmProviderDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmProviderDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmProviderDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmProviderDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmProviderDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmProviderEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmProviderEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_PROVIDER0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_PROVIDER0, numentriesreturned : *mut u32) -> u32); - FwpmProviderEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmProviderEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn FwpmProviderGetByKey0(enginehandle: P0, key: *const windows_core::GUID, provider: *mut *mut FWPM_PROVIDER0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderGetByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, provider: *mut *mut FWPM_PROVIDER0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderGetByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, provider : *mut *mut FWPM_PROVIDER0) -> u32); - FwpmProviderGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(provider)) + FwpmProviderGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(provider)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderGetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmProviderGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmProviderSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderSetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmProviderSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderSubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_PROVIDER_SUBSCRIPTION0, callback: FWPM_PROVIDER_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(changehandle)) + FwpmProviderSubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } #[inline] -pub unsafe fn FwpmProviderSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_PROVIDER_SUBSCRIPTION0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderSubscriptionsGet0(enginehandle: super::super::Foundation::HANDLE, entries: *mut *mut *mut FWPM_PROVIDER_SUBSCRIPTION0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderSubscriptionsGet0(enginehandle : super::super::Foundation:: HANDLE, entries : *mut *mut *mut FWPM_PROVIDER_SUBSCRIPTION0, numentries : *mut u32) -> u32); - FwpmProviderSubscriptionsGet0(enginehandle.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + FwpmProviderSubscriptionsGet0(core::mem::transmute(enginehandle), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn FwpmProviderUnsubscribeChanges0(enginehandle: P0, changehandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmProviderUnsubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, changehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderUnsubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, changehandle : super::super::Foundation:: HANDLE) -> u32); - FwpmProviderUnsubscribeChanges0(enginehandle.param().abi(), core::mem::transmute(changehandle)) + FwpmProviderUnsubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(changehandle)) } #[inline] -pub unsafe fn FwpmSessionCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_SESSION_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSessionCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_SESSION_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmSessionCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmSessionDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSessionDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSessionDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmSessionDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmSessionDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmSessionEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_SESSION0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmSessionEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_SESSION0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSessionEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_SESSION0, numentriesreturned : *mut u32) -> u32); - FwpmSessionEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmSessionEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmSubLayerAdd0(enginehandle: P0, sublayer: *const FWPM_SUBLAYER0, sd: P2) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerAdd0(enginehandle: super::super::Foundation::HANDLE, sublayer: *const FWPM_SUBLAYER0, sd: Option) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerAdd0(enginehandle : super::super::Foundation:: HANDLE, sublayer : *const FWPM_SUBLAYER0, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmSubLayerAdd0(enginehandle.param().abi(), core::mem::transmute(sublayer), sd.param().abi()) + FwpmSubLayerAdd0(core::mem::transmute(enginehandle), core::mem::transmute(sublayer), core::mem::transmute(sd.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FwpmSubLayerCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_SUBLAYER_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const FWPM_SUBLAYER_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + FwpmSubLayerCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerDeleteByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID) -> u32); - FwpmSubLayerDeleteByKey0(enginehandle.param().abi(), core::mem::transmute(key)) + FwpmSubLayerDeleteByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key)) } #[inline] -pub unsafe fn FwpmSubLayerDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmSubLayerDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + FwpmSubLayerDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn FwpmSubLayerEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut FWPM_SUBLAYER0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut FWPM_SUBLAYER0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut FWPM_SUBLAYER0, numentriesreturned : *mut u32) -> u32); - FwpmSubLayerEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + FwpmSubLayerEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn FwpmSubLayerGetByKey0(enginehandle: P0, key: *const windows_core::GUID, sublayer: *mut *mut FWPM_SUBLAYER0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerGetByKey0(enginehandle: super::super::Foundation::HANDLE, key: *const windows_core::GUID, sublayer: *mut *mut FWPM_SUBLAYER0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerGetByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, sublayer : *mut *mut FWPM_SUBLAYER0) -> u32); - FwpmSubLayerGetByKey0(enginehandle.param().abi(), core::mem::transmute(key), core::mem::transmute(sublayer)) + FwpmSubLayerGetByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key), core::mem::transmute(sublayer)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmSubLayerGetSecurityInfoByKey0(enginehandle: P0, key: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerGetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmSubLayerGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmSubLayerSetSecurityInfoByKey0(enginehandle: P0, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerSetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, key: Option<*const windows_core::GUID>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(core::ptr::null())), core::mem::transmute(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()))) + FwpmSubLayerSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerSubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_SUBLAYER_SUBSCRIPTION0, callback: FWPM_SUBLAYER_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(changehandle)) + FwpmSubLayerSubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(changehandle)) } #[inline] -pub unsafe fn FwpmSubLayerSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_SUBLAYER_SUBSCRIPTION0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerSubscriptionsGet0(enginehandle: super::super::Foundation::HANDLE, entries: *mut *mut *mut FWPM_SUBLAYER_SUBSCRIPTION0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerSubscriptionsGet0(enginehandle : super::super::Foundation:: HANDLE, entries : *mut *mut *mut FWPM_SUBLAYER_SUBSCRIPTION0, numentries : *mut u32) -> u32); - FwpmSubLayerSubscriptionsGet0(enginehandle.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + FwpmSubLayerSubscriptionsGet0(core::mem::transmute(enginehandle), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn FwpmSubLayerUnsubscribeChanges0(enginehandle: P0, changehandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSubLayerUnsubscribeChanges0(enginehandle: super::super::Foundation::HANDLE, changehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerUnsubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, changehandle : super::super::Foundation:: HANDLE) -> u32); - FwpmSubLayerUnsubscribeChanges0(enginehandle.param().abi(), core::mem::transmute(changehandle)) + FwpmSubLayerUnsubscribeChanges0(core::mem::transmute(enginehandle), core::mem::transmute(changehandle)) } #[inline] -pub unsafe fn FwpmSystemPortsGet0(enginehandle: P0, sysports: *mut *mut FWPM_SYSTEM_PORTS0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSystemPortsGet0(enginehandle: Option, sysports: *mut *mut FWPM_SYSTEM_PORTS0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSystemPortsGet0(enginehandle : super::super::Foundation:: HANDLE, sysports : *mut *mut FWPM_SYSTEM_PORTS0) -> u32); - FwpmSystemPortsGet0(enginehandle.param().abi(), core::mem::transmute(sysports)) + FwpmSystemPortsGet0(core::mem::transmute(enginehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysports)) } #[inline] -pub unsafe fn FwpmSystemPortsSubscribe0(enginehandle: P0, reserved: Option<*const core::ffi::c_void>, callback: FWPM_SYSTEM_PORTS_CALLBACK0, context: Option<*const core::ffi::c_void>, sysportshandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSystemPortsSubscribe0(enginehandle: Option, reserved: Option<*const core::ffi::c_void>, callback: FWPM_SYSTEM_PORTS_CALLBACK0, context: Option<*const core::ffi::c_void>, sysportshandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(sysportshandle)) + FwpmSystemPortsSubscribe0(core::mem::transmute(enginehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysportshandle)) } #[inline] -pub unsafe fn FwpmSystemPortsUnsubscribe0(enginehandle: P0, sysportshandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmSystemPortsUnsubscribe0(enginehandle: Option, sysportshandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSystemPortsUnsubscribe0(enginehandle : super::super::Foundation:: HANDLE, sysportshandle : super::super::Foundation:: HANDLE) -> u32); - FwpmSystemPortsUnsubscribe0(enginehandle.param().abi(), core::mem::transmute(sysportshandle)) + FwpmSystemPortsUnsubscribe0(core::mem::transmute(enginehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysportshandle)) } #[inline] -pub unsafe fn FwpmTransactionAbort0(enginehandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmTransactionAbort0(enginehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmTransactionAbort0(enginehandle : super::super::Foundation:: HANDLE) -> u32); - FwpmTransactionAbort0(enginehandle.param().abi()) + FwpmTransactionAbort0(core::mem::transmute(enginehandle)) } #[inline] -pub unsafe fn FwpmTransactionBegin0(enginehandle: P0, flags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmTransactionBegin0(enginehandle: super::super::Foundation::HANDLE, flags: u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmTransactionBegin0(enginehandle : super::super::Foundation:: HANDLE, flags : u32) -> u32); - FwpmTransactionBegin0(enginehandle.param().abi(), core::mem::transmute(flags)) + FwpmTransactionBegin0(core::mem::transmute(enginehandle), core::mem::transmute(flags)) } #[inline] -pub unsafe fn FwpmTransactionCommit0(enginehandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmTransactionCommit0(enginehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmTransactionCommit0(enginehandle : super::super::Foundation:: HANDLE) -> u32); - FwpmTransactionCommit0(enginehandle.param().abi()) + FwpmTransactionCommit0(core::mem::transmute(enginehandle)) } #[inline] -pub unsafe fn FwpmvSwitchEventSubscribe0(enginehandle: P0, subscription: *const FWPM_VSWITCH_EVENT_SUBSCRIPTION0, callback: FWPM_VSWITCH_EVENT_CALLBACK0, context: Option<*const core::ffi::c_void>, subscriptionhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmvSwitchEventSubscribe0(enginehandle: super::super::Foundation::HANDLE, subscription: *const FWPM_VSWITCH_EVENT_SUBSCRIPTION0, callback: FWPM_VSWITCH_EVENT_CALLBACK0, context: Option<*const core::ffi::c_void>, subscriptionhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(subscriptionhandle)) + FwpmvSwitchEventSubscribe0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(subscriptionhandle)) } #[inline] -pub unsafe fn FwpmvSwitchEventUnsubscribe0(enginehandle: P0, subscriptionhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmvSwitchEventUnsubscribe0(enginehandle: super::super::Foundation::HANDLE, subscriptionhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmvSwitchEventUnsubscribe0(enginehandle : super::super::Foundation:: HANDLE, subscriptionhandle : super::super::Foundation:: HANDLE) -> u32); - FwpmvSwitchEventUnsubscribe0(enginehandle.param().abi(), core::mem::transmute(subscriptionhandle)) + FwpmvSwitchEventUnsubscribe0(core::mem::transmute(enginehandle), core::mem::transmute(subscriptionhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmvSwitchEventsGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmvSwitchEventsGetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmvSwitchEventsGetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, 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); - FwpmvSwitchEventsGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + FwpmvSwitchEventsGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn FwpmvSwitchEventsSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FwpmvSwitchEventsSetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(), core::mem::transmute(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()))) + FwpmvSwitchEventsSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecDospGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospGetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospGetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, 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); - IPsecDospGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + IPsecDospGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[inline] -pub unsafe fn IPsecDospGetStatistics0(enginehandle: P0, idpstatistics: *mut IPSEC_DOSP_STATISTICS0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospGetStatistics0(enginehandle: super::super::Foundation::HANDLE, idpstatistics: *mut IPSEC_DOSP_STATISTICS0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospGetStatistics0(enginehandle : super::super::Foundation:: HANDLE, idpstatistics : *mut IPSEC_DOSP_STATISTICS0) -> u32); - IPsecDospGetStatistics0(enginehandle.param().abi(), core::mem::transmute(idpstatistics)) + IPsecDospGetStatistics0(core::mem::transmute(enginehandle), core::mem::transmute(idpstatistics)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecDospSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospSetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(), core::mem::transmute(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()))) + IPsecDospSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IPsecDospStateCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const IPSEC_DOSP_STATE_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospStateCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const IPSEC_DOSP_STATE_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + IPsecDospStateCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn IPsecDospStateDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecDospStateDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospStateDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - IPsecDospStateDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + IPsecDospStateDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn IPsecDospStateEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_DOSP_STATE0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecDospStateEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_DOSP_STATE0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospStateEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut IPSEC_DOSP_STATE0, numentries : *mut u32) -> u32); - IPsecDospStateEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentries)) + IPsecDospStateEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn IPsecGetStatistics0(enginehandle: P0, ipsecstatistics: *mut IPSEC_STATISTICS0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecGetStatistics0(enginehandle: super::super::Foundation::HANDLE, ipsecstatistics: *mut IPSEC_STATISTICS0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecGetStatistics0(enginehandle : super::super::Foundation:: HANDLE, ipsecstatistics : *mut IPSEC_STATISTICS0) -> u32); - IPsecGetStatistics0(enginehandle.param().abi(), core::mem::transmute(ipsecstatistics)) + IPsecGetStatistics0(core::mem::transmute(enginehandle), core::mem::transmute(ipsecstatistics)) } #[inline] -pub unsafe fn IPsecGetStatistics1(enginehandle: P0, ipsecstatistics: *mut IPSEC_STATISTICS1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecGetStatistics1(enginehandle: super::super::Foundation::HANDLE, ipsecstatistics: *mut IPSEC_STATISTICS1) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecGetStatistics1(enginehandle : super::super::Foundation:: HANDLE, ipsecstatistics : *mut IPSEC_STATISTICS1) -> u32); - IPsecGetStatistics1(enginehandle.param().abi(), core::mem::transmute(ipsecstatistics)) + IPsecGetStatistics1(core::mem::transmute(enginehandle), core::mem::transmute(ipsecstatistics)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecKeyManagerAddAndRegister0(enginehandle: P0, keymanager: *const IPSEC_KEY_MANAGER0, keymanagercallbacks: *const IPSEC_KEY_MANAGER_CALLBACKS0, keymgmthandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecKeyManagerAddAndRegister0(enginehandle: super::super::Foundation::HANDLE, keymanager: *const IPSEC_KEY_MANAGER0, keymanagercallbacks: *const IPSEC_KEY_MANAGER_CALLBACKS0, keymgmthandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecKeyManagerAddAndRegister0(enginehandle : super::super::Foundation:: HANDLE, keymanager : *const IPSEC_KEY_MANAGER0, keymanagercallbacks : *const IPSEC_KEY_MANAGER_CALLBACKS0, keymgmthandle : *mut super::super::Foundation:: HANDLE) -> u32); - IPsecKeyManagerAddAndRegister0(enginehandle.param().abi(), core::mem::transmute(keymanager), core::mem::transmute(keymanagercallbacks), core::mem::transmute(keymgmthandle)) + IPsecKeyManagerAddAndRegister0(core::mem::transmute(enginehandle), core::mem::transmute(keymanager), core::mem::transmute(keymanagercallbacks), core::mem::transmute(keymgmthandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecKeyManagerGetSecurityInfoByKey0(enginehandle: P0, reserved: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecKeyManagerGetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, reserved: Option<*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 { 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(core::ptr::null())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + IPsecKeyManagerGetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecKeyManagerSetSecurityInfoByKey0(enginehandle: P0, reserved: Option<*const core::ffi::c_void>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecKeyManagerSetSecurityInfoByKey0(enginehandle: super::super::Foundation::HANDLE, reserved: Option<*const core::ffi::c_void>, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(core::ptr::null())), core::mem::transmute(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()))) + IPsecKeyManagerSetSecurityInfoByKey0(core::mem::transmute(enginehandle), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IPsecKeyManagerUnregisterAndDelete0(enginehandle: P0, keymgmthandle: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecKeyManagerUnregisterAndDelete0(enginehandle: super::super::Foundation::HANDLE, keymgmthandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecKeyManagerUnregisterAndDelete0(enginehandle : super::super::Foundation:: HANDLE, keymgmthandle : super::super::Foundation:: HANDLE) -> u32); - IPsecKeyManagerUnregisterAndDelete0(enginehandle.param().abi(), keymgmthandle.param().abi()) + IPsecKeyManagerUnregisterAndDelete0(core::mem::transmute(enginehandle), core::mem::transmute(keymgmthandle)) } #[inline] -pub unsafe fn IPsecKeyManagersGet0(enginehandle: P0, entries: *mut *mut *mut IPSEC_KEY_MANAGER0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecKeyManagersGet0(enginehandle: super::super::Foundation::HANDLE, entries: *mut *mut *mut IPSEC_KEY_MANAGER0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecKeyManagersGet0(enginehandle : super::super::Foundation:: HANDLE, entries : *mut *mut *mut IPSEC_KEY_MANAGER0, numentries : *mut u32) -> u32); - IPsecKeyManagersGet0(enginehandle.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + IPsecKeyManagersGet0(core::mem::transmute(enginehandle), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn IPsecSaContextAddInbound0(enginehandle: P0, id: u64, inboundbundle: *const IPSEC_SA_BUNDLE0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextAddInbound0(enginehandle: super::super::Foundation::HANDLE, id: u64, inboundbundle: *const IPSEC_SA_BUNDLE0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextAddInbound0(enginehandle : super::super::Foundation:: HANDLE, id : u64, inboundbundle : *const IPSEC_SA_BUNDLE0) -> u32); - IPsecSaContextAddInbound0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(inboundbundle)) + IPsecSaContextAddInbound0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(inboundbundle)) } #[inline] -pub unsafe fn IPsecSaContextAddInbound1(enginehandle: P0, id: u64, inboundbundle: *const IPSEC_SA_BUNDLE1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextAddInbound1(enginehandle: super::super::Foundation::HANDLE, id: u64, inboundbundle: *const IPSEC_SA_BUNDLE1) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextAddInbound1(enginehandle : super::super::Foundation:: HANDLE, id : u64, inboundbundle : *const IPSEC_SA_BUNDLE1) -> u32); - IPsecSaContextAddInbound1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(inboundbundle)) + IPsecSaContextAddInbound1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(inboundbundle)) } #[inline] -pub unsafe fn IPsecSaContextAddOutbound0(enginehandle: P0, id: u64, outboundbundle: *const IPSEC_SA_BUNDLE0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextAddOutbound0(enginehandle: super::super::Foundation::HANDLE, id: u64, outboundbundle: *const IPSEC_SA_BUNDLE0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextAddOutbound0(enginehandle : super::super::Foundation:: HANDLE, id : u64, outboundbundle : *const IPSEC_SA_BUNDLE0) -> u32); - IPsecSaContextAddOutbound0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(outboundbundle)) + IPsecSaContextAddOutbound0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(outboundbundle)) } #[inline] -pub unsafe fn IPsecSaContextAddOutbound1(enginehandle: P0, id: u64, outboundbundle: *const IPSEC_SA_BUNDLE1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextAddOutbound1(enginehandle: super::super::Foundation::HANDLE, id: u64, outboundbundle: *const IPSEC_SA_BUNDLE1) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextAddOutbound1(enginehandle : super::super::Foundation:: HANDLE, id : u64, outboundbundle : *const IPSEC_SA_BUNDLE1) -> u32); - IPsecSaContextAddOutbound1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(outboundbundle)) + IPsecSaContextAddOutbound1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(outboundbundle)) } #[inline] -pub unsafe fn IPsecSaContextCreate0(enginehandle: P0, outboundtraffic: *const IPSEC_TRAFFIC0, inboundfilterid: Option<*mut u64>, id: *mut u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextCreate0(enginehandle: super::super::Foundation::HANDLE, outboundtraffic: *const IPSEC_TRAFFIC0, inboundfilterid: Option<*mut u64>, id: *mut u64) -> u32 { 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(), core::mem::transmute(outboundtraffic), core::mem::transmute(inboundfilterid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(id)) + IPsecSaContextCreate0(core::mem::transmute(enginehandle), core::mem::transmute(outboundtraffic), core::mem::transmute(inboundfilterid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextCreate1(enginehandle: super::super::Foundation::HANDLE, outboundtraffic: *const IPSEC_TRAFFIC1, virtualiftunnelinfo: Option<*const IPSEC_VIRTUAL_IF_TUNNEL_INFO0>, inboundfilterid: Option<*mut u64>, id: *mut u64) -> u32 { 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(), core::mem::transmute(outboundtraffic), core::mem::transmute(virtualiftunnelinfo.unwrap_or(core::ptr::null())), core::mem::transmute(inboundfilterid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(id)) + IPsecSaContextCreate1(core::mem::transmute(enginehandle), core::mem::transmute(outboundtraffic), core::mem::transmute(virtualiftunnelinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(inboundfilterid.unwrap_or(core::mem::zeroed())), core::mem::transmute(id)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaContextCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const IPSEC_SA_CONTEXT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const IPSEC_SA_CONTEXT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + IPsecSaContextCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn IPsecSaContextDeleteById0(enginehandle: P0, id: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextDeleteById0(enginehandle : super::super::Foundation:: HANDLE, id : u64) -> u32); - IPsecSaContextDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + IPsecSaContextDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn IPsecSaContextDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - IPsecSaContextDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + IPsecSaContextDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaContextEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_SA_CONTEXT0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecSaContextEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_SA_CONTEXT0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut IPSEC_SA_CONTEXT0, numentriesreturned : *mut u32) -> u32); - IPsecSaContextEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IPsecSaContextEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaContextEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_SA_CONTEXT1, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecSaContextEnum1(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_SA_CONTEXT1, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextEnum1(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut IPSEC_SA_CONTEXT1, numentriesreturned : *mut u32) -> u32); - IPsecSaContextEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IPsecSaContextEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn IPsecSaContextExpire0(enginehandle: P0, id: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextExpire0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextExpire0(enginehandle : super::super::Foundation:: HANDLE, id : u64) -> u32); - IPsecSaContextExpire0(enginehandle.param().abi(), core::mem::transmute(id)) + IPsecSaContextExpire0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaContextGetById0(enginehandle: P0, id: u64, sacontext: *mut *mut IPSEC_SA_CONTEXT0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextGetById0(enginehandle: super::super::Foundation::HANDLE, id: u64, sacontext: *mut *mut IPSEC_SA_CONTEXT0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextGetById0(enginehandle : super::super::Foundation:: HANDLE, id : u64, sacontext : *mut *mut IPSEC_SA_CONTEXT0) -> u32); - IPsecSaContextGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(sacontext)) + IPsecSaContextGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(sacontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaContextGetById1(enginehandle: P0, id: u64, sacontext: *mut *mut IPSEC_SA_CONTEXT1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextGetById1(enginehandle: super::super::Foundation::HANDLE, id: u64, sacontext: *mut *mut IPSEC_SA_CONTEXT1) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextGetById1(enginehandle : super::super::Foundation:: HANDLE, id : u64, sacontext : *mut *mut IPSEC_SA_CONTEXT1) -> u32); - IPsecSaContextGetById1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(sacontext)) + IPsecSaContextGetById1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(sacontext)) } #[inline] -pub unsafe fn IPsecSaContextGetSpi0(enginehandle: P0, id: u64, getspi: *const IPSEC_GETSPI0, inboundspi: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextGetSpi0(enginehandle: super::super::Foundation::HANDLE, id: u64, getspi: *const IPSEC_GETSPI0, inboundspi: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextGetSpi0(enginehandle : super::super::Foundation:: HANDLE, id : u64, getspi : *const IPSEC_GETSPI0, inboundspi : *mut u32) -> u32); - IPsecSaContextGetSpi0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) + IPsecSaContextGetSpi0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) } #[inline] -pub unsafe fn IPsecSaContextGetSpi1(enginehandle: P0, id: u64, getspi: *const IPSEC_GETSPI1, inboundspi: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextGetSpi1(enginehandle: super::super::Foundation::HANDLE, id: u64, getspi: *const IPSEC_GETSPI1, inboundspi: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextGetSpi1(enginehandle : super::super::Foundation:: HANDLE, id : u64, getspi : *const IPSEC_GETSPI1, inboundspi : *mut u32) -> u32); - IPsecSaContextGetSpi1(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) + IPsecSaContextGetSpi1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) } #[inline] -pub unsafe fn IPsecSaContextSetSpi0(enginehandle: P0, id: u64, getspi: *const IPSEC_GETSPI1, inboundspi: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextSetSpi0(enginehandle: super::super::Foundation::HANDLE, id: u64, getspi: *const IPSEC_GETSPI1, inboundspi: u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextSetSpi0(enginehandle : super::super::Foundation:: HANDLE, id : u64, getspi : *const IPSEC_GETSPI1, inboundspi : u32) -> u32); - IPsecSaContextSetSpi0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) + IPsecSaContextSetSpi0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(getspi), core::mem::transmute(inboundspi)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaContextSubscribe0(enginehandle: P0, subscription: *const IPSEC_SA_CONTEXT_SUBSCRIPTION0, callback: IPSEC_SA_CONTEXT_CALLBACK0, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextSubscribe0(enginehandle: super::super::Foundation::HANDLE, subscription: *const IPSEC_SA_CONTEXT_SUBSCRIPTION0, callback: IPSEC_SA_CONTEXT_CALLBACK0, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(eventshandle)) + IPsecSaContextSubscribe0(core::mem::transmute(enginehandle), core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventshandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaContextSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut IPSEC_SA_CONTEXT_SUBSCRIPTION0, numentries: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextSubscriptionsGet0(enginehandle: super::super::Foundation::HANDLE, entries: *mut *mut *mut IPSEC_SA_CONTEXT_SUBSCRIPTION0, numentries: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextSubscriptionsGet0(enginehandle : super::super::Foundation:: HANDLE, entries : *mut *mut *mut IPSEC_SA_CONTEXT_SUBSCRIPTION0, numentries : *mut u32) -> u32); - IPsecSaContextSubscriptionsGet0(enginehandle.param().abi(), core::mem::transmute(entries), core::mem::transmute(numentries)) + IPsecSaContextSubscriptionsGet0(core::mem::transmute(enginehandle), core::mem::transmute(entries), core::mem::transmute(numentries)) } #[inline] -pub unsafe fn IPsecSaContextUnsubscribe0(enginehandle: P0, eventshandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextUnsubscribe0(enginehandle: super::super::Foundation::HANDLE, eventshandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextUnsubscribe0(enginehandle : super::super::Foundation:: HANDLE, eventshandle : super::super::Foundation:: HANDLE) -> u32); - IPsecSaContextUnsubscribe0(enginehandle.param().abi(), core::mem::transmute(eventshandle)) + IPsecSaContextUnsubscribe0(core::mem::transmute(enginehandle), core::mem::transmute(eventshandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaContextUpdate0(enginehandle: P0, flags: u64, newvalues: *const IPSEC_SA_CONTEXT1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaContextUpdate0(enginehandle: super::super::Foundation::HANDLE, flags: u64, newvalues: *const IPSEC_SA_CONTEXT1) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextUpdate0(enginehandle : super::super::Foundation:: HANDLE, flags : u64, newvalues : *const IPSEC_SA_CONTEXT1) -> u32); - IPsecSaContextUpdate0(enginehandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(newvalues)) + IPsecSaContextUpdate0(core::mem::transmute(enginehandle), core::mem::transmute(flags), core::mem::transmute(newvalues)) } #[inline] -pub unsafe fn IPsecSaCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const IPSEC_SA_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const IPSEC_SA_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + IPsecSaCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaDbGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaDbGetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaDbGetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, 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); - IPsecSaDbGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + IPsecSaDbGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaDbSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaDbSetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(), core::mem::transmute(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()))) + IPsecSaDbSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IPsecSaDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IPsecSaDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - IPsecSaDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + IPsecSaDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_SA_DETAILS0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecSaEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_SA_DETAILS0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut IPSEC_SA_DETAILS0, numentriesreturned : *mut u32) -> u32); - IPsecSaEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IPsecSaEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IPsecSaEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_SA_DETAILS1, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IPsecSaEnum1(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut IPSEC_SA_DETAILS1, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaEnum1(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut IPSEC_SA_DETAILS1, numentriesreturned : *mut u32) -> u32); - IPsecSaEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IPsecSaEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn IkeextGetStatistics0(enginehandle: P0, ikeextstatistics: *mut IKEEXT_STATISTICS0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextGetStatistics0(enginehandle: super::super::Foundation::HANDLE, ikeextstatistics: *mut IKEEXT_STATISTICS0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextGetStatistics0(enginehandle : super::super::Foundation:: HANDLE, ikeextstatistics : *mut IKEEXT_STATISTICS0) -> u32); - IkeextGetStatistics0(enginehandle.param().abi(), core::mem::transmute(ikeextstatistics)) + IkeextGetStatistics0(core::mem::transmute(enginehandle), core::mem::transmute(ikeextstatistics)) } #[inline] -pub unsafe fn IkeextGetStatistics1(enginehandle: P0, ikeextstatistics: *mut IKEEXT_STATISTICS1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextGetStatistics1(enginehandle: super::super::Foundation::HANDLE, ikeextstatistics: *mut IKEEXT_STATISTICS1) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextGetStatistics1(enginehandle : super::super::Foundation:: HANDLE, ikeextstatistics : *mut IKEEXT_STATISTICS1) -> u32); - IkeextGetStatistics1(enginehandle.param().abi(), core::mem::transmute(ikeextstatistics)) + IkeextGetStatistics1(core::mem::transmute(enginehandle), core::mem::transmute(ikeextstatistics)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IkeextSaCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const IKEEXT_SA_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaCreateEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumtemplate: Option<*const IKEEXT_SA_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 { 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(core::ptr::null())), core::mem::transmute(enumhandle)) + IkeextSaCreateEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumhandle)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IkeextSaDbGetSecurityInfo0(enginehandle: P0, 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 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaDbGetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, 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 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaDbGetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, 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); - IkeextSaDbGetSecurityInfo0(enginehandle.param().abi(), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) + IkeextSaDbGetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner), core::mem::transmute(sidgroup), core::mem::transmute(dacl), core::mem::transmute(sacl), core::mem::transmute(securitydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IkeextSaDbSetSecurityInfo0(enginehandle: P0, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaDbSetSecurityInfo0(enginehandle: super::super::Foundation::HANDLE, securityinfo: u32, sidowner: Option<*const super::super::Security::SID>, sidgroup: Option<*const super::super::Security::SID>, dacl: Option<*const super::super::Security::ACL>, sacl: Option<*const super::super::Security::ACL>) -> u32 { 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(), core::mem::transmute(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()))) + IkeextSaDbSetSecurityInfo0(core::mem::transmute(enginehandle), core::mem::transmute(securityinfo), core::mem::transmute(sidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(sacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IkeextSaDeleteById0(enginehandle: P0, id: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaDeleteById0(enginehandle: super::super::Foundation::HANDLE, id: u64) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaDeleteById0(enginehandle : super::super::Foundation:: HANDLE, id : u64) -> u32); - IkeextSaDeleteById0(enginehandle.param().abi(), core::mem::transmute(id)) + IkeextSaDeleteById0(core::mem::transmute(enginehandle), core::mem::transmute(id)) } #[inline] -pub unsafe fn IkeextSaDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaDestroyEnumHandle0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaDestroyEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE) -> u32); - IkeextSaDestroyEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumhandle)) + IkeextSaDestroyEnumHandle0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn IkeextSaEnum0(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut IKEEXT_SA_DETAILS0, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IkeextSaEnum0(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut IKEEXT_SA_DETAILS0, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaEnum0(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut IKEEXT_SA_DETAILS0, numentriesreturned : *mut u32) -> u32); - IkeextSaEnum0(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IkeextSaEnum0(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn IkeextSaEnum1(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut IKEEXT_SA_DETAILS1, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IkeextSaEnum1(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut IKEEXT_SA_DETAILS1, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaEnum1(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut IKEEXT_SA_DETAILS1, numentriesreturned : *mut u32) -> u32); - IkeextSaEnum1(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IkeextSaEnum1(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn IkeextSaEnum2(enginehandle: P0, enumhandle: P1, numentriesrequested: u32, entries: *mut *mut *mut IKEEXT_SA_DETAILS2, numentriesreturned: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IkeextSaEnum2(enginehandle: super::super::Foundation::HANDLE, enumhandle: super::super::Foundation::HANDLE, numentriesrequested: u32, entries: *mut *mut *mut IKEEXT_SA_DETAILS2, numentriesreturned: *mut u32) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaEnum2(enginehandle : super::super::Foundation:: HANDLE, enumhandle : super::super::Foundation:: HANDLE, numentriesrequested : u32, entries : *mut *mut *mut IKEEXT_SA_DETAILS2, numentriesreturned : *mut u32) -> u32); - IkeextSaEnum2(enginehandle.param().abi(), enumhandle.param().abi(), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) + IkeextSaEnum2(core::mem::transmute(enginehandle), core::mem::transmute(enumhandle), core::mem::transmute(numentriesrequested), core::mem::transmute(entries), core::mem::transmute(numentriesreturned)) } #[inline] -pub unsafe fn IkeextSaGetById0(enginehandle: P0, id: u64, sa: *mut *mut IKEEXT_SA_DETAILS0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaGetById0(enginehandle: super::super::Foundation::HANDLE, id: u64, sa: *mut *mut IKEEXT_SA_DETAILS0) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaGetById0(enginehandle : super::super::Foundation:: HANDLE, id : u64, sa : *mut *mut IKEEXT_SA_DETAILS0) -> u32); - IkeextSaGetById0(enginehandle.param().abi(), core::mem::transmute(id), core::mem::transmute(sa)) + IkeextSaGetById0(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(sa)) } #[inline] -pub unsafe fn IkeextSaGetById1(enginehandle: P0, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut IKEEXT_SA_DETAILS1) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaGetById1(enginehandle: super::super::Foundation::HANDLE, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut IKEEXT_SA_DETAILS1) -> u32 { 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(), core::mem::transmute(id), core::mem::transmute(salookupcontext.unwrap_or(core::ptr::null())), core::mem::transmute(sa)) + IkeextSaGetById1(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(salookupcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(sa)) } #[inline] -pub unsafe fn IkeextSaGetById2(enginehandle: P0, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut IKEEXT_SA_DETAILS2) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IkeextSaGetById2(enginehandle: super::super::Foundation::HANDLE, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut IKEEXT_SA_DETAILS2) -> u32 { 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(), core::mem::transmute(id), core::mem::transmute(salookupcontext.unwrap_or(core::ptr::null())), core::mem::transmute(sa)) + IkeextSaGetById2(core::mem::transmute(enginehandle), core::mem::transmute(id), core::mem::transmute(salookupcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(sa)) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 cc524d16a3..60e05061a6 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs @@ -50,22 +50,21 @@ 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(), core::mem::transmute(dwflags), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(callback), core::mem::transmute(hoperation)) + NetworkIsolationGetEnterpriseIdAsync(wszservername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(hoperation)) } #[inline] -pub unsafe fn NetworkIsolationGetEnterpriseIdClose(hoperation: P0, bwaitforoperation: P1) -> u32 +pub unsafe fn NetworkIsolationGetEnterpriseIdClose(hoperation: super::super::Foundation::HANDLE, bwaitforoperation: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("firewallapi.dll" "system" fn NetworkIsolationGetEnterpriseIdClose(hoperation : super::super::Foundation:: HANDLE, bwaitforoperation : super::super::Foundation:: BOOL) -> u32); - NetworkIsolationGetEnterpriseIdClose(hoperation.param().abi(), bwaitforoperation.param().abi()) + NetworkIsolationGetEnterpriseIdClose(core::mem::transmute(hoperation), bwaitforoperation.param().abi()) } #[cfg(feature = "Win32_Security")] #[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(core::mem::transmute(flags), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(registrationobject)) + NetworkIsolationRegisterForAppContainerChanges(core::mem::transmute(flags), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(registrationobject)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -75,24 +74,20 @@ pub unsafe fn NetworkIsolationSetAppContainerConfig(appcontainersids: &[super::s } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NetworkIsolationSetupAppContainerBinaries(applicationcontainersid: P0, packagefullname: P1, packagefolder: P2, displayname: P3, bbinariesfullycomputed: P4, binaries: &[windows_core::PCWSTR]) -> windows_core::Result<()> +pub unsafe fn NetworkIsolationSetupAppContainerBinaries(applicationcontainersid: super::super::Security::PSID, packagefullname: P1, packagefolder: P2, displayname: P3, bbinariesfullycomputed: P4, binaries: &[windows_core::PCWSTR]) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationSetupAppContainerBinaries(applicationcontainersid : super::super::Security:: PSID, packagefullname : windows_core::PCWSTR, packagefolder : windows_core::PCWSTR, displayname : windows_core::PCWSTR, bbinariesfullycomputed : super::super::Foundation:: BOOL, binaries : *const windows_core::PCWSTR, binariescount : u32) -> windows_core::HRESULT); - NetworkIsolationSetupAppContainerBinaries(applicationcontainersid.param().abi(), packagefullname.param().abi(), packagefolder.param().abi(), displayname.param().abi(), bbinariesfullycomputed.param().abi(), core::mem::transmute(binaries.as_ptr()), binaries.len().try_into().unwrap()).ok() + NetworkIsolationSetupAppContainerBinaries(core::mem::transmute(applicationcontainersid), packagefullname.param().abi(), packagefolder.param().abi(), displayname.param().abi(), bbinariesfullycomputed.param().abi(), core::mem::transmute(binaries.as_ptr()), binaries.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn NetworkIsolationUnregisterForAppContainerChanges(registrationobject: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn NetworkIsolationUnregisterForAppContainerChanges(registrationobject: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationUnregisterForAppContainerChanges(registrationobject : super::super::Foundation:: HANDLE) -> u32); - NetworkIsolationUnregisterForAppContainerChanges(registrationobject.param().abi()) + NetworkIsolationUnregisterForAppContainerChanges(core::mem::transmute(registrationobject)) } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -273,11 +268,8 @@ impl IDynamicPortMapping { pub unsafe fn EditInternalClient(&self, bstrinternalclient: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EditInternalClient)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrinternalclient)).ok() } - pub unsafe fn Enable(&self, vb: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), vb.param().abi()).ok() + pub unsafe fn Enable(&self, vb: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), core::mem::transmute(vb)).ok() } pub unsafe fn EditDescription(&self, bstrdescription: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EditDescription)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdescription)).ok() @@ -493,12 +485,9 @@ impl IDynamicPortMappingCollection { pub unsafe fn Remove(&self, bstrremotehost: &windows_core::BSTR, lexternalport: i32, bstrprotocol: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrremotehost), core::mem::transmute(lexternalport), core::mem::transmute_copy(bstrprotocol)).ok() } - pub unsafe fn Add(&self, bstrremotehost: &windows_core::BSTR, lexternalport: i32, bstrprotocol: &windows_core::BSTR, linternalport: i32, bstrinternalclient: &windows_core::BSTR, benabled: P5, bstrdescription: &windows_core::BSTR, lleaseduration: i32) -> windows_core::Result - where - P5: windows_core::Param, - { + pub unsafe fn Add(&self, bstrremotehost: &windows_core::BSTR, lexternalport: i32, bstrprotocol: &windows_core::BSTR, linternalport: i32, bstrinternalclient: &windows_core::BSTR, benabled: super::super::Foundation::VARIANT_BOOL, bstrdescription: &windows_core::BSTR, lleaseduration: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrremotehost), core::mem::transmute(lexternalport), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(linternalport), core::mem::transmute_copy(bstrinternalclient), benabled.param().abi(), core::mem::transmute_copy(bstrdescription), core::mem::transmute(lleaseduration), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrremotehost), core::mem::transmute(lexternalport), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(linternalport), core::mem::transmute_copy(bstrinternalclient), core::mem::transmute(benabled), core::mem::transmute_copy(bstrdescription), core::mem::transmute(lleaseduration), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -1300,17 +1289,11 @@ impl INetConnectionConnectUi { { (windows_core::Interface::vtable(self).SetConnection)(windows_core::Interface::as_raw(self), pcon.param().abi()).ok() } - pub unsafe fn Connect(&self, hwndparent: P0, dwflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn Connect(&self, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(dwflags)).ok() } - pub unsafe fn Disconnect(&self, hwndparent: P0, dwflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn Disconnect(&self, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(dwflags)).ok() } } #[repr(C)] @@ -1575,11 +1558,8 @@ impl INetFwAuthorizedApplication { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1849,101 +1829,71 @@ impl INetFwIcmpSettings { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowOutboundDestinationUnreachable)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowOutboundDestinationUnreachable(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowOutboundDestinationUnreachable)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowOutboundDestinationUnreachable(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowOutboundDestinationUnreachable)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowRedirect(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowRedirect)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowRedirect(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowRedirect)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowRedirect(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowRedirect)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowInboundEchoRequest(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowInboundEchoRequest)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowInboundEchoRequest(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowInboundEchoRequest)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowInboundEchoRequest(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowInboundEchoRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowOutboundTimeExceeded(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowOutboundTimeExceeded)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowOutboundTimeExceeded(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowOutboundTimeExceeded)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowOutboundTimeExceeded(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowOutboundTimeExceeded)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowOutboundParameterProblem(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowOutboundParameterProblem)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowOutboundParameterProblem(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowOutboundParameterProblem)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowOutboundParameterProblem(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowOutboundParameterProblem)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowOutboundSourceQuench(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowOutboundSourceQuench)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowOutboundSourceQuench(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowOutboundSourceQuench)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowOutboundSourceQuench(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowOutboundSourceQuench)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowInboundRouterRequest(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowInboundRouterRequest)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowInboundRouterRequest(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowInboundRouterRequest)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowInboundRouterRequest(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowInboundRouterRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowInboundTimestampRequest(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowInboundTimestampRequest)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowInboundTimestampRequest(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowInboundTimestampRequest)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowInboundTimestampRequest(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowInboundTimestampRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowInboundMaskRequest(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowInboundMaskRequest)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowInboundMaskRequest(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowInboundMaskRequest)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowInboundMaskRequest(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowInboundMaskRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } pub unsafe fn AllowOutboundPacketTooBig(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowOutboundPacketTooBig)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowOutboundPacketTooBig(&self, allow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowOutboundPacketTooBig)(windows_core::Interface::as_raw(self), allow.param().abi()).ok() + pub unsafe fn SetAllowOutboundPacketTooBig(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowOutboundPacketTooBig)(windows_core::Interface::as_raw(self), core::mem::transmute(allow)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -2333,11 +2283,8 @@ impl INetFwOpenPort { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn BuiltIn(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2717,11 +2664,8 @@ impl INetFwPolicy2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_FirewallEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), &mut result__).map(|| result__) } - pub unsafe fn put_FirewallEnabled(&self, profiletype: NET_FW_PROFILE_TYPE2, enabled: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).put_FirewallEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), enabled.param().abi()).ok() + pub unsafe fn put_FirewallEnabled(&self, profiletype: NET_FW_PROFILE_TYPE2, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).put_FirewallEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), core::mem::transmute(enabled)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn get_ExcludedInterfaces(&self, profiletype: NET_FW_PROFILE_TYPE2) -> windows_core::Result { @@ -2736,31 +2680,22 @@ impl INetFwPolicy2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_BlockAllInboundTraffic)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), &mut result__).map(|| result__) } - pub unsafe fn put_BlockAllInboundTraffic(&self, profiletype: NET_FW_PROFILE_TYPE2, block: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).put_BlockAllInboundTraffic)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), block.param().abi()).ok() + pub unsafe fn put_BlockAllInboundTraffic(&self, profiletype: NET_FW_PROFILE_TYPE2, block: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).put_BlockAllInboundTraffic)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), core::mem::transmute(block)).ok() } pub unsafe fn get_NotificationsDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_NotificationsDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), &mut result__).map(|| result__) } - pub unsafe fn put_NotificationsDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2, disabled: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).put_NotificationsDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), disabled.param().abi()).ok() + pub unsafe fn put_NotificationsDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2, disabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).put_NotificationsDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), core::mem::transmute(disabled)).ok() } pub unsafe fn get_UnicastResponsesToMulticastBroadcastDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_UnicastResponsesToMulticastBroadcastDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), &mut result__).map(|| result__) } - pub unsafe fn put_UnicastResponsesToMulticastBroadcastDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2, disabled: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).put_UnicastResponsesToMulticastBroadcastDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), disabled.param().abi()).ok() + pub unsafe fn put_UnicastResponsesToMulticastBroadcastDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2, disabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).put_UnicastResponsesToMulticastBroadcastDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletype), core::mem::transmute(disabled)).ok() } pub unsafe fn Rules(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2770,11 +2705,8 @@ impl INetFwPolicy2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ServiceRestriction)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn EnableRuleGroup(&self, profiletypesbitmask: i32, group: &windows_core::BSTR, enable: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableRuleGroup)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletypesbitmask), core::mem::transmute_copy(group), enable.param().abi()).ok() + pub unsafe fn EnableRuleGroup(&self, profiletypesbitmask: i32, group: &windows_core::BSTR, enable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableRuleGroup)(windows_core::Interface::as_raw(self), core::mem::transmute(profiletypesbitmask), core::mem::transmute_copy(group), core::mem::transmute(enable)).ok() } pub unsafe fn IsRuleGroupEnabled(&self, profiletypesbitmask: i32, group: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3306,41 +3238,29 @@ impl INetFwProfile { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FirewallEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFirewallEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFirewallEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetFirewallEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFirewallEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn ExceptionsNotAllowed(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ExceptionsNotAllowed)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetExceptionsNotAllowed(&self, notallowed: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetExceptionsNotAllowed)(windows_core::Interface::as_raw(self), notallowed.param().abi()).ok() + pub unsafe fn SetExceptionsNotAllowed(&self, notallowed: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetExceptionsNotAllowed)(windows_core::Interface::as_raw(self), core::mem::transmute(notallowed)).ok() } pub unsafe fn NotificationsDisabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).NotificationsDisabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNotificationsDisabled(&self, disabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNotificationsDisabled)(windows_core::Interface::as_raw(self), disabled.param().abi()).ok() + pub unsafe fn SetNotificationsDisabled(&self, disabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNotificationsDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(disabled)).ok() } pub unsafe fn UnicastResponsesToMulticastBroadcastDisabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UnicastResponsesToMulticastBroadcastDisabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUnicastResponsesToMulticastBroadcastDisabled(&self, disabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUnicastResponsesToMulticastBroadcastDisabled)(windows_core::Interface::as_raw(self), disabled.param().abi()).ok() + pub unsafe fn SetUnicastResponsesToMulticastBroadcastDisabled(&self, disabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUnicastResponsesToMulticastBroadcastDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(disabled)).ok() } pub unsafe fn RemoteAdminSettings(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3580,11 +3500,8 @@ impl INetFwRemoteAdminSettings { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -3798,11 +3715,8 @@ impl INetFwRule { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn Grouping(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3822,11 +3736,8 @@ impl INetFwRule { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EdgeTraversal)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEdgeTraversal(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEdgeTraversal)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEdgeTraversal(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEdgeTraversal)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn Action(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4641,11 +4552,8 @@ impl INetFwService { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn GloballyOpenPorts(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4818,12 +4726,8 @@ impl core::ops::Deref for INetFwServiceRestriction { windows_core::imp::interface_hierarchy!(INetFwServiceRestriction, windows_core::IUnknown, super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl INetFwServiceRestriction { - pub unsafe fn RestrictService(&self, servicename: &windows_core::BSTR, appname: &windows_core::BSTR, restrictservice: P2, servicesidrestricted: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).RestrictService)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(servicename), core::mem::transmute_copy(appname), restrictservice.param().abi(), servicesidrestricted.param().abi()).ok() + pub unsafe fn RestrictService(&self, servicename: &windows_core::BSTR, appname: &windows_core::BSTR, restrictservice: super::super::Foundation::VARIANT_BOOL, servicesidrestricted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RestrictService)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(servicename), core::mem::transmute_copy(appname), core::mem::transmute(restrictservice), core::mem::transmute(servicesidrestricted)).ok() } pub unsafe fn ServiceRestricted(&self, servicename: &windows_core::BSTR, appname: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5863,11 +5767,8 @@ impl IStaticPortMapping { pub unsafe fn EditInternalClient(&self, bstrinternalclient: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EditInternalClient)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrinternalclient)).ok() } - pub unsafe fn Enable(&self, vb: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), vb.param().abi()).ok() + pub unsafe fn Enable(&self, vb: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), core::mem::transmute(vb)).ok() } pub unsafe fn EditDescription(&self, bstrdescription: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EditDescription)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdescription)).ok() @@ -6044,12 +5945,9 @@ impl IStaticPortMappingCollection { pub unsafe fn Remove(&self, lexternalport: i32, bstrprotocol: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute(lexternalport), core::mem::transmute_copy(bstrprotocol)).ok() } - pub unsafe fn Add(&self, lexternalport: i32, bstrprotocol: &windows_core::BSTR, linternalport: i32, bstrinternalclient: &windows_core::BSTR, benabled: P4, bstrdescription: &windows_core::BSTR) -> windows_core::Result - where - P4: windows_core::Param, - { + pub unsafe fn Add(&self, lexternalport: i32, bstrprotocol: &windows_core::BSTR, linternalport: i32, bstrinternalclient: &windows_core::BSTR, benabled: super::super::Foundation::VARIANT_BOOL, bstrdescription: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute(lexternalport), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(linternalport), core::mem::transmute_copy(bstrinternalclient), benabled.param().abi(), core::mem::transmute_copy(bstrdescription), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute(lexternalport), core::mem::transmute_copy(bstrprotocol), core::mem::transmute(linternalport), core::mem::transmute_copy(bstrinternalclient), core::mem::transmute(benabled), core::mem::transmute_copy(bstrdescription), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsNetworkVirtualization/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsNetworkVirtualization/mod.rs index e0669c60c2..f67339fe11 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsNetworkVirtualization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsNetworkVirtualization/mod.rs @@ -5,12 +5,9 @@ pub unsafe fn WnvOpen() -> super::super::Foundation::HANDLE { } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WnvRequestNotification(wnvhandle: P0, notificationparam: *mut WNV_NOTIFICATION_PARAM, overlapped: *mut super::super::System::IO::OVERLAPPED, bytestransferred: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WnvRequestNotification(wnvhandle: super::super::Foundation::HANDLE, notificationparam: *mut WNV_NOTIFICATION_PARAM, overlapped: *mut super::super::System::IO::OVERLAPPED, bytestransferred: *mut u32) -> u32 { windows_targets::link!("wnvapi.dll" "system" fn WnvRequestNotification(wnvhandle : super::super::Foundation:: HANDLE, notificationparam : *mut WNV_NOTIFICATION_PARAM, overlapped : *mut super::super::System::IO:: OVERLAPPED, bytestransferred : *mut u32) -> u32); - WnvRequestNotification(wnvhandle.param().abi(), core::mem::transmute(notificationparam), core::mem::transmute(overlapped), core::mem::transmute(bytestransferred)) + WnvRequestNotification(core::mem::transmute(wnvhandle), core::mem::transmute(notificationparam), core::mem::transmute(overlapped), core::mem::transmute(bytestransferred)) } pub const WNV_API_MAJOR_VERSION_1: u32 = 1u32; pub const WNV_API_MINOR_VERSION_0: u32 = 0u32; 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 3eb37faafc..95b5c5f65b 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs @@ -93,47 +93,29 @@ where ADsPropCreateNotifyObj(pappthddataobj.param().abi(), pwzadsobjname.param().abi(), core::mem::transmute(phnotifyobj)).ok() } #[inline] -pub unsafe fn ADsPropGetInitInfo(hnotifyobj: P0, pinitparams: *mut ADSPROPINITPARAMS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ADsPropGetInitInfo(hnotifyobj: super::super::Foundation::HWND, pinitparams: *mut ADSPROPINITPARAMS) -> super::super::Foundation::BOOL { windows_targets::link!("dsprop.dll" "system" fn ADsPropGetInitInfo(hnotifyobj : super::super::Foundation:: HWND, pinitparams : *mut ADSPROPINITPARAMS) -> super::super::Foundation:: BOOL); - ADsPropGetInitInfo(hnotifyobj.param().abi(), core::mem::transmute(pinitparams)) + ADsPropGetInitInfo(core::mem::transmute(hnotifyobj), core::mem::transmute(pinitparams)) } #[inline] -pub unsafe fn ADsPropSendErrorMessage(hnotifyobj: P0, perror: *mut ADSPROPERROR) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ADsPropSendErrorMessage(hnotifyobj: super::super::Foundation::HWND, perror: *mut ADSPROPERROR) -> super::super::Foundation::BOOL { windows_targets::link!("dsprop.dll" "system" fn ADsPropSendErrorMessage(hnotifyobj : super::super::Foundation:: HWND, perror : *mut ADSPROPERROR) -> super::super::Foundation:: BOOL); - ADsPropSendErrorMessage(hnotifyobj.param().abi(), core::mem::transmute(perror)) + ADsPropSendErrorMessage(core::mem::transmute(hnotifyobj), core::mem::transmute(perror)) } #[inline] -pub unsafe fn ADsPropSetHwnd(hnotifyobj: P0, hpage: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ADsPropSetHwnd(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("dsprop.dll" "system" fn ADsPropSetHwnd(hnotifyobj : super::super::Foundation:: HWND, hpage : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ADsPropSetHwnd(hnotifyobj.param().abi(), hpage.param().abi()) + ADsPropSetHwnd(core::mem::transmute(hnotifyobj), core::mem::transmute(hpage)) } #[inline] -pub unsafe fn ADsPropSetHwndWithTitle(hnotifyobj: P0, hpage: P1, ptztitle: *const i8) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ADsPropSetHwndWithTitle(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND, ptztitle: *const i8) -> super::super::Foundation::BOOL { windows_targets::link!("dsprop.dll" "system" fn ADsPropSetHwndWithTitle(hnotifyobj : super::super::Foundation:: HWND, hpage : super::super::Foundation:: HWND, ptztitle : *const i8) -> super::super::Foundation:: BOOL); - ADsPropSetHwndWithTitle(hnotifyobj.param().abi(), hpage.param().abi(), core::mem::transmute(ptztitle)) + ADsPropSetHwndWithTitle(core::mem::transmute(hnotifyobj), core::mem::transmute(hpage), core::mem::transmute(ptztitle)) } #[inline] -pub unsafe fn ADsPropShowErrorDialog(hnotifyobj: P0, hpage: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ADsPropShowErrorDialog(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("dsprop.dll" "system" fn ADsPropShowErrorDialog(hnotifyobj : super::super::Foundation:: HWND, hpage : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ADsPropShowErrorDialog(hnotifyobj.param().abi(), hpage.param().abi()) + ADsPropShowErrorDialog(core::mem::transmute(hnotifyobj), core::mem::transmute(hpage)) } #[inline] pub unsafe fn ADsSetLastError(dwerr: u32, pszerror: P1, pszprovider: P2) @@ -170,20 +152,18 @@ where } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn BinarySDToSecurityDescriptor(psecuritydescriptor: P0, pvarsec: *mut super::super::System::Variant::VARIANT, pszservername: P2, username: P3, password: P4, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn BinarySDToSecurityDescriptor(psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, pvarsec: *mut super::super::System::Variant::VARIANT, pszservername: P2, username: P3, password: P4, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("activeds.dll" "system" fn BinarySDToSecurityDescriptor(psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, pvarsec : *mut super::super::System::Variant:: VARIANT, pszservername : windows_core::PCWSTR, username : windows_core::PCWSTR, password : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - BinarySDToSecurityDescriptor(psecuritydescriptor.param().abi(), core::mem::transmute(pvarsec), pszservername.param().abi(), username.param().abi(), password.param().abi(), core::mem::transmute(dwflags)).ok() + BinarySDToSecurityDescriptor(core::mem::transmute(psecuritydescriptor), core::mem::transmute(pvarsec), pszservername.param().abi(), username.param().abi(), password.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn DsAddSidHistoryA(hds: P0, flags: u32, srcdomain: P2, srcprincipal: P3, srcdomaincontroller: P4, srcdomaincreds: Option<*const core::ffi::c_void>, dstdomain: P6, dstprincipal: P7) -> u32 +pub unsafe fn DsAddSidHistoryA(hds: super::super::Foundation::HANDLE, flags: Option, srcdomain: P2, srcprincipal: P3, srcdomaincontroller: P4, srcdomaincreds: Option<*const core::ffi::c_void>, dstdomain: P6, dstprincipal: P7) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, @@ -191,12 +171,11 @@ where P7: 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(), core::mem::transmute(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()) + DsAddSidHistoryA(core::mem::transmute(hds), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), srcdomain.param().abi(), srcprincipal.param().abi(), srcdomaincontroller.param().abi(), core::mem::transmute(srcdomaincreds.unwrap_or(core::mem::zeroed())), dstdomain.param().abi(), dstprincipal.param().abi()) } #[inline] -pub unsafe fn DsAddSidHistoryW(hds: P0, flags: u32, srcdomain: P2, srcprincipal: P3, srcdomaincontroller: P4, srcdomaincreds: Option<*const core::ffi::c_void>, dstdomain: P6, dstprincipal: P7) -> u32 +pub unsafe fn DsAddSidHistoryW(hds: super::super::Foundation::HANDLE, flags: Option, srcdomain: P2, srcprincipal: P3, srcdomaincontroller: P4, srcdomaincreds: Option<*const core::ffi::c_void>, dstdomain: P6, dstprincipal: P7) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, @@ -204,7 +183,7 @@ where P7: 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(), core::mem::transmute(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()) + DsAddSidHistoryW(core::mem::transmute(hds), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), srcdomain.param().abi(), srcprincipal.param().abi(), srcdomaincontroller.param().abi(), core::mem::transmute(srcdomaincreds.unwrap_or(core::mem::zeroed())), dstdomain.param().abi(), dstprincipal.param().abi()) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -252,7 +231,7 @@ where DsBindA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(phds)) } #[inline] -pub unsafe fn DsBindByInstanceA(servername: P0, annotation: P1, instanceguid: Option<*const windows_core::GUID>, dnsdomainname: P3, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P5, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn DsBindByInstanceA(servername: P0, annotation: P1, instanceguid: Option<*const windows_core::GUID>, dnsdomainname: P3, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P5, bindflags: Option, phds: *mut super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -260,10 +239,10 @@ where P5: 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(core::ptr::null())), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), serviceprincipalname.param().abi(), core::mem::transmute(bindflags), core::mem::transmute(phds)) + DsBindByInstanceA(servername.param().abi(), annotation.param().abi(), core::mem::transmute(instanceguid.unwrap_or(core::mem::zeroed())), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), serviceprincipalname.param().abi(), core::mem::transmute(bindflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(phds)) } #[inline] -pub unsafe fn DsBindByInstanceW(servername: P0, annotation: P1, instanceguid: Option<*const windows_core::GUID>, dnsdomainname: P3, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P5, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn DsBindByInstanceW(servername: P0, annotation: P1, instanceguid: Option<*const windows_core::GUID>, dnsdomainname: P3, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P5, bindflags: Option, phds: *mut super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -271,7 +250,7 @@ where P5: 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(core::ptr::null())), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), serviceprincipalname.param().abi(), core::mem::transmute(bindflags), core::mem::transmute(phds)) + DsBindByInstanceW(servername.param().abi(), annotation.param().abi(), core::mem::transmute(instanceguid.unwrap_or(core::mem::zeroed())), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), serviceprincipalname.param().abi(), core::mem::transmute(bindflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(phds)) } #[inline] pub unsafe fn DsBindToISTGA(sitename: P0, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -305,7 +284,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(core::ptr::null())), core::mem::transmute(phds)) + DsBindWithCredA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +293,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(core::ptr::null())), core::mem::transmute(phds)) + DsBindWithCredW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(phds)) } #[inline] pub unsafe fn DsBindWithSpnA(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P3, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -324,27 +303,27 @@ where P3: 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(core::ptr::null())), serviceprincipalname.param().abi(), core::mem::transmute(phds)) + DsBindWithSpnA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), serviceprincipalname.param().abi(), core::mem::transmute(phds)) } #[inline] -pub unsafe fn DsBindWithSpnExA(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P3, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn DsBindWithSpnExA(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P3, bindflags: Option, phds: *mut super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P3: 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(core::ptr::null())), serviceprincipalname.param().abi(), core::mem::transmute(bindflags), core::mem::transmute(phds)) + DsBindWithSpnExA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), serviceprincipalname.param().abi(), core::mem::transmute(bindflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(phds)) } #[inline] -pub unsafe fn DsBindWithSpnExW(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P3, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn DsBindWithSpnExW(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P3, bindflags: Option, phds: *mut super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P3: 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(core::ptr::null())), serviceprincipalname.param().abi(), core::mem::transmute(bindflags), core::mem::transmute(phds)) + DsBindWithSpnExW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), serviceprincipalname.param().abi(), core::mem::transmute(bindflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(phds)) } #[inline] pub unsafe fn DsBindWithSpnW(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P3, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -354,15 +333,12 @@ where P3: 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(core::ptr::null())), serviceprincipalname.param().abi(), core::mem::transmute(phds)) + DsBindWithSpnW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), serviceprincipalname.param().abi(), core::mem::transmute(phds)) } #[inline] -pub unsafe fn DsBindingSetTimeout(hds: P0, ctimeoutsecs: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsBindingSetTimeout(hds: super::super::Foundation::HANDLE, ctimeoutsecs: u32) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsBindingSetTimeout(hds : super::super::Foundation:: HANDLE, ctimeoutsecs : u32) -> u32); - DsBindingSetTimeout(hds.param().abi(), core::mem::transmute(ctimeoutsecs)) + DsBindingSetTimeout(core::mem::transmute(hds), core::mem::transmute(ctimeoutsecs)) } #[cfg(feature = "Win32_UI_Shell")] #[inline] @@ -395,30 +371,44 @@ where DsClientMakeSpnForTargetServerW(serviceclass.param().abi(), servicename.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn)) } #[inline] -pub unsafe fn DsCrackNamesA(hds: P0, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, rpnames: &[windows_core::PCSTR], ppresult: *mut *mut DS_NAME_RESULTA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsCrackNamesA(hds: Option, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, rpnames: &[windows_core::PCSTR], ppresult: *mut *mut DS_NAME_RESULTA) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsCrackNamesA(hds : super::super::Foundation:: HANDLE, flags : DS_NAME_FLAGS, formatoffered : DS_NAME_FORMAT, formatdesired : DS_NAME_FORMAT, cnames : u32, rpnames : *const windows_core::PCSTR, ppresult : *mut *mut DS_NAME_RESULTA) -> u32); - DsCrackNamesA(hds.param().abi(), core::mem::transmute(flags), core::mem::transmute(formatoffered), core::mem::transmute(formatdesired), rpnames.len().try_into().unwrap(), core::mem::transmute(rpnames.as_ptr()), core::mem::transmute(ppresult)) + DsCrackNamesA(core::mem::transmute(hds.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(formatoffered), core::mem::transmute(formatdesired), rpnames.len().try_into().unwrap(), core::mem::transmute(rpnames.as_ptr()), core::mem::transmute(ppresult)) } #[inline] -pub unsafe fn DsCrackNamesW(hds: P0, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, rpnames: &[windows_core::PCWSTR], ppresult: *mut *mut DS_NAME_RESULTW) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsCrackNamesW(hds: Option, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, rpnames: &[windows_core::PCWSTR], ppresult: *mut *mut DS_NAME_RESULTW) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsCrackNamesW(hds : super::super::Foundation:: HANDLE, flags : DS_NAME_FLAGS, formatoffered : DS_NAME_FORMAT, formatdesired : DS_NAME_FORMAT, cnames : u32, rpnames : *const windows_core::PCWSTR, ppresult : *mut *mut DS_NAME_RESULTW) -> u32); - DsCrackNamesW(hds.param().abi(), core::mem::transmute(flags), core::mem::transmute(formatoffered), core::mem::transmute(formatdesired), rpnames.len().try_into().unwrap(), core::mem::transmute(rpnames.as_ptr()), core::mem::transmute(ppresult)) + DsCrackNamesW(core::mem::transmute(hds.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(formatoffered), core::mem::transmute(formatdesired), rpnames.len().try_into().unwrap(), core::mem::transmute(rpnames.as_ptr()), core::mem::transmute(ppresult)) } #[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 { +pub unsafe fn DsCrackSpn2A(pszspn: &[u8], pcserviceclass: Option<*mut u32>, serviceclass: Option, pcservicename: Option<*mut u32>, servicename: Option, pcinstancename: Option<*mut u32>, instancename: Option, 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(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()))) + DsCrackSpn2A( + core::mem::transmute(pszspn.as_ptr()), + pszspn.len().try_into().unwrap(), + core::mem::transmute(pcserviceclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(serviceclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcservicename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(servicename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcinstancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pinstanceport.unwrap_or(core::mem::zeroed())), + ) } #[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 { +pub unsafe fn DsCrackSpn2W(pszspn: &[u16], pcserviceclass: Option<*mut u32>, serviceclass: Option, pcservicename: Option<*mut u32>, servicename: Option, pcinstancename: Option<*mut u32>, instancename: Option, 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(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()))) + DsCrackSpn2W( + core::mem::transmute(pszspn.as_ptr()), + pszspn.len().try_into().unwrap(), + core::mem::transmute(pcserviceclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(serviceclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcservicename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(servicename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcinstancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pinstanceport.unwrap_or(core::mem::zeroed())), + ) } #[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 @@ -437,30 +427,48 @@ where DsCrackSpn4W(pszspn.param().abi(), core::mem::transmute(cspn), core::mem::transmute(pchostname), core::mem::transmute(hostname), core::mem::transmute(pcinstancename), core::mem::transmute(instancename), core::mem::transmute(pcportname), core::mem::transmute(portname), core::mem::transmute(pcdomainname), core::mem::transmute(domainname), core::mem::transmute(pcrealmname), core::mem::transmute(realmname)) } #[inline] -pub unsafe fn DsCrackSpnA(pszspn: P0, 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 +pub unsafe fn DsCrackSpnA(pszspn: P0, pcserviceclass: Option<*mut u32>, serviceclass: Option, pcservicename: Option<*mut u32>, servicename: Option, pcinstancename: Option<*mut u32>, instancename: Option, pinstanceport: Option<*mut u16>) -> u32 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(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()))) + DsCrackSpnA( + pszspn.param().abi(), + core::mem::transmute(pcserviceclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(serviceclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcservicename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(servicename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcinstancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pinstanceport.unwrap_or(core::mem::zeroed())), + ) } #[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 +pub unsafe fn DsCrackSpnW(pszspn: P0, pcserviceclass: Option<*mut u32>, serviceclass: Option, pcservicename: Option<*mut u32>, servicename: Option, pcinstancename: Option<*mut u32>, instancename: Option, pinstanceport: Option<*mut u16>) -> u32 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(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()))) + DsCrackSpnW( + pszspn.param().abi(), + core::mem::transmute(pcserviceclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(serviceclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcservicename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(servicename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcinstancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(instancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pinstanceport.unwrap_or(core::mem::zeroed())), + ) } #[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(core::ptr::null_mut())), core::mem::transmute(pedsmanglefor.unwrap_or(core::ptr::null_mut()))) + DsCrackUnquotedMangledRdnA(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), core::mem::transmute(pguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pedsmanglefor.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(pedsmanglefor.unwrap_or(core::ptr::null_mut()))) + DsCrackUnquotedMangledRdnW(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), core::mem::transmute(pguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pedsmanglefor.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DsDeregisterDnsHostRecordsA(servername: P0, dnsdomainname: P1, domainguid: Option<*const windows_core::GUID>, dsaguid: Option<*const windows_core::GUID>, dnshostname: P4) -> u32 @@ -470,7 +478,7 @@ where P4: 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(core::ptr::null())), core::mem::transmute(dsaguid.unwrap_or(core::ptr::null())), dnshostname.param().abi()) + DsDeregisterDnsHostRecordsA(servername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(dsaguid.unwrap_or(core::mem::zeroed())), 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: P4) -> u32 @@ -480,7 +488,7 @@ where P4: 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(core::ptr::null())), core::mem::transmute(dsaguid.unwrap_or(core::ptr::null())), dnshostname.param().abi()) + DsDeregisterDnsHostRecordsW(servername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(dsaguid.unwrap_or(core::mem::zeroed())), dnshostname.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -546,12 +554,9 @@ pub unsafe fn DsFreeSpnArrayW(rpszspn: &mut [windows_core::PWSTR]) { DsFreeSpnArrayW(rpszspn.len().try_into().unwrap(), core::mem::transmute(rpszspn.as_ptr())) } #[inline] -pub unsafe fn DsGetDcCloseW(getdccontexthandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn DsGetDcCloseW(getdccontexthandle: super::super::Foundation::HANDLE) { windows_targets::link!("netapi32.dll" "system" fn DsGetDcCloseW(getdccontexthandle : super::super::Foundation:: HANDLE)); - DsGetDcCloseW(getdccontexthandle.param().abi()) + DsGetDcCloseW(core::mem::transmute(getdccontexthandle)) } #[inline] pub unsafe fn DsGetDcNameA(computername: P0, domainname: P1, domainguid: Option<*const windows_core::GUID>, sitename: P3, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOA) -> u32 @@ -561,7 +566,7 @@ where P3: 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(core::ptr::null())), sitename.param().abi(), core::mem::transmute(flags), core::mem::transmute(domaincontrollerinfo)) + DsGetDcNameA(computername.param().abi(), domainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), sitename.param().abi(), core::mem::transmute(flags), core::mem::transmute(domaincontrollerinfo)) } #[inline] pub unsafe fn DsGetDcNameW(computername: P0, domainname: P1, domainguid: Option<*const windows_core::GUID>, sitename: P3, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOW) -> u32 @@ -571,25 +576,19 @@ where P3: 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(core::ptr::null())), sitename.param().abi(), core::mem::transmute(flags), core::mem::transmute(domaincontrollerinfo)) + DsGetDcNameW(computername.param().abi(), domainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), sitename.param().abi(), core::mem::transmute(flags), core::mem::transmute(domaincontrollerinfo)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn DsGetDcNextA(getdccontexthandle: P0, sockaddresscount: Option<*mut u32>, sockaddresses: Option<*mut *mut super::WinSock::SOCKET_ADDRESS>, dnshostname: Option<*mut windows_core::PSTR>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsGetDcNextA(getdccontexthandle: super::super::Foundation::HANDLE, sockaddresscount: Option<*mut u32>, sockaddresses: Option<*mut *mut super::WinSock::SOCKET_ADDRESS>, dnshostname: Option<*mut windows_core::PSTR>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(sockaddresses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dnshostname.unwrap_or(core::ptr::null_mut()))) + DsGetDcNextA(core::mem::transmute(getdccontexthandle), core::mem::transmute(sockaddresscount.unwrap_or(core::mem::zeroed())), core::mem::transmute(sockaddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(dnshostname.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn DsGetDcNextW(getdccontexthandle: P0, sockaddresscount: Option<*mut u32>, sockaddresses: Option<*mut *mut super::WinSock::SOCKET_ADDRESS>, dnshostname: Option<*mut windows_core::PWSTR>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsGetDcNextW(getdccontexthandle: super::super::Foundation::HANDLE, sockaddresscount: Option<*mut u32>, sockaddresses: Option<*mut *mut super::WinSock::SOCKET_ADDRESS>, dnshostname: Option<*mut windows_core::PWSTR>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(sockaddresses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dnshostname.unwrap_or(core::ptr::null_mut()))) + DsGetDcNextW(core::mem::transmute(getdccontexthandle), core::mem::transmute(sockaddresscount.unwrap_or(core::mem::zeroed())), core::mem::transmute(sockaddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(dnshostname.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DsGetDcOpenA(dnsname: P0, optionflags: u32, sitename: P2, domainguid: Option<*const windows_core::GUID>, dnsforestname: P4, dcflags: u32, retgetdccontext: *mut super::super::Foundation::HANDLE) -> u32 @@ -599,7 +598,7 @@ where P4: 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(), core::mem::transmute(optionflags), sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::ptr::null())), dnsforestname.param().abi(), core::mem::transmute(dcflags), core::mem::transmute(retgetdccontext)) + DsGetDcOpenA(dnsname.param().abi(), core::mem::transmute(optionflags), sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), dnsforestname.param().abi(), core::mem::transmute(dcflags), core::mem::transmute(retgetdccontext)) } #[inline] pub unsafe fn DsGetDcOpenW(dnsname: P0, optionflags: u32, sitename: P2, domainguid: Option<*const windows_core::GUID>, dnsforestname: P4, dcflags: u32, retgetdccontext: *mut super::super::Foundation::HANDLE) -> u32 @@ -609,7 +608,7 @@ where P4: 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(), core::mem::transmute(optionflags), sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::ptr::null())), dnsforestname.param().abi(), core::mem::transmute(dcflags), core::mem::transmute(retgetdccontext)) + DsGetDcOpenW(dnsname.param().abi(), core::mem::transmute(optionflags), sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::mem::zeroed())), dnsforestname.param().abi(), core::mem::transmute(dcflags), core::mem::transmute(retgetdccontext)) } #[inline] pub unsafe fn DsGetDcSiteCoverageA(servername: P0, entrycount: *mut u32, sitenames: *mut *mut windows_core::PSTR) -> u32 @@ -628,22 +627,20 @@ where DsGetDcSiteCoverageW(servername.param().abi(), core::mem::transmute(entrycount), core::mem::transmute(sitenames)) } #[inline] -pub unsafe fn DsGetDomainControllerInfoA(hds: P0, domainname: P1, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut core::ffi::c_void) -> u32 +pub unsafe fn DsGetDomainControllerInfoA(hds: super::super::Foundation::HANDLE, domainname: P1, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsGetDomainControllerInfoA(hds : super::super::Foundation:: HANDLE, domainname : windows_core::PCSTR, infolevel : u32, pcout : *mut u32, ppinfo : *mut *mut core::ffi::c_void) -> u32); - DsGetDomainControllerInfoA(hds.param().abi(), domainname.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(pcout), core::mem::transmute(ppinfo)) + DsGetDomainControllerInfoA(core::mem::transmute(hds), domainname.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(pcout), core::mem::transmute(ppinfo)) } #[inline] -pub unsafe fn DsGetDomainControllerInfoW(hds: P0, domainname: P1, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut core::ffi::c_void) -> u32 +pub unsafe fn DsGetDomainControllerInfoW(hds: super::super::Foundation::HANDLE, domainname: P1, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsGetDomainControllerInfoW(hds : super::super::Foundation:: HANDLE, domainname : windows_core::PCWSTR, infolevel : u32, pcout : *mut u32, ppinfo : *mut *mut core::ffi::c_void) -> u32); - DsGetDomainControllerInfoW(hds.param().abi(), domainname.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(pcout), core::mem::transmute(ppinfo)) + DsGetDomainControllerInfoW(core::mem::transmute(hds), domainname.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(pcout), core::mem::transmute(ppinfo)) } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] @@ -700,7 +697,7 @@ where P2: 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(core::mem::transmute(servicetype), serviceclass.param().abi(), servicename.param().abi(), core::mem::transmute(instanceport), core::mem::transmute(cinstancenames), core::mem::transmute(pinstancenames.unwrap_or(core::ptr::null())), core::mem::transmute(pinstanceports.unwrap_or(core::ptr::null())), core::mem::transmute(pcspn), core::mem::transmute(prpszspn)) + DsGetSpnA(core::mem::transmute(servicetype), serviceclass.param().abi(), servicename.param().abi(), core::mem::transmute(instanceport), core::mem::transmute(cinstancenames), core::mem::transmute(pinstancenames.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinstanceports.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcspn), core::mem::transmute(prpszspn)) } #[inline] pub unsafe fn DsGetSpnW(servicetype: DS_SPN_NAME_TYPE, serviceclass: P1, servicename: P2, 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,27 +706,25 @@ where P2: 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(core::mem::transmute(servicetype), serviceclass.param().abi(), servicename.param().abi(), core::mem::transmute(instanceport), core::mem::transmute(cinstancenames), core::mem::transmute(pinstancenames.unwrap_or(core::ptr::null())), core::mem::transmute(pinstanceports.unwrap_or(core::ptr::null())), core::mem::transmute(pcspn), core::mem::transmute(prpszspn)) + DsGetSpnW(core::mem::transmute(servicetype), serviceclass.param().abi(), servicename.param().abi(), core::mem::transmute(instanceport), core::mem::transmute(cinstancenames), core::mem::transmute(pinstancenames.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinstanceports.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcspn), core::mem::transmute(prpszspn)) } #[inline] -pub unsafe fn DsInheritSecurityIdentityA(hds: P0, flags: u32, srcprincipal: P2, dstprincipal: P3) -> u32 +pub unsafe fn DsInheritSecurityIdentityA(hds: super::super::Foundation::HANDLE, flags: Option, srcprincipal: P2, dstprincipal: P3) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsInheritSecurityIdentityA(hds : super::super::Foundation:: HANDLE, flags : u32, srcprincipal : windows_core::PCSTR, dstprincipal : windows_core::PCSTR) -> u32); - DsInheritSecurityIdentityA(hds.param().abi(), core::mem::transmute(flags), srcprincipal.param().abi(), dstprincipal.param().abi()) + DsInheritSecurityIdentityA(core::mem::transmute(hds), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), srcprincipal.param().abi(), dstprincipal.param().abi()) } #[inline] -pub unsafe fn DsInheritSecurityIdentityW(hds: P0, flags: u32, srcprincipal: P2, dstprincipal: P3) -> u32 +pub unsafe fn DsInheritSecurityIdentityW(hds: super::super::Foundation::HANDLE, flags: Option, srcprincipal: P2, dstprincipal: P3) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsInheritSecurityIdentityW(hds : super::super::Foundation:: HANDLE, flags : u32, srcprincipal : windows_core::PCWSTR, dstprincipal : windows_core::PCWSTR) -> u32); - DsInheritSecurityIdentityW(hds.param().abi(), core::mem::transmute(flags), srcprincipal.param().abi(), dstprincipal.param().abi()) + DsInheritSecurityIdentityW(core::mem::transmute(hds), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), srcprincipal.param().abi(), dstprincipal.param().abi()) } #[inline] pub unsafe fn DsIsMangledDnA(pszdn: P0, edsmanglefor: DS_MANGLE_FOR) -> super::super::Foundation::BOOL @@ -758,110 +753,90 @@ pub unsafe fn DsIsMangledRdnValueW(pszrdn: &[u16], edsmanglefordesired: DS_MANGL DsIsMangledRdnValueW(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), core::mem::transmute(edsmanglefordesired)) } #[inline] -pub unsafe fn DsListDomainsInSiteA(hds: P0, site: P1, ppdomains: *mut *mut DS_NAME_RESULTA) -> u32 +pub unsafe fn DsListDomainsInSiteA(hds: super::super::Foundation::HANDLE, site: P1, ppdomains: *mut *mut DS_NAME_RESULTA) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsListDomainsInSiteA(hds : super::super::Foundation:: HANDLE, site : windows_core::PCSTR, ppdomains : *mut *mut DS_NAME_RESULTA) -> u32); - DsListDomainsInSiteA(hds.param().abi(), site.param().abi(), core::mem::transmute(ppdomains)) + DsListDomainsInSiteA(core::mem::transmute(hds), site.param().abi(), core::mem::transmute(ppdomains)) } #[inline] -pub unsafe fn DsListDomainsInSiteW(hds: P0, site: P1, ppdomains: *mut *mut DS_NAME_RESULTW) -> u32 +pub unsafe fn DsListDomainsInSiteW(hds: super::super::Foundation::HANDLE, site: P1, ppdomains: *mut *mut DS_NAME_RESULTW) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsListDomainsInSiteW(hds : super::super::Foundation:: HANDLE, site : windows_core::PCWSTR, ppdomains : *mut *mut DS_NAME_RESULTW) -> u32); - DsListDomainsInSiteW(hds.param().abi(), site.param().abi(), core::mem::transmute(ppdomains)) + DsListDomainsInSiteW(core::mem::transmute(hds), site.param().abi(), core::mem::transmute(ppdomains)) } #[inline] -pub unsafe fn DsListInfoForServerA(hds: P0, server: P1, ppinfo: *mut *mut DS_NAME_RESULTA) -> u32 +pub unsafe fn DsListInfoForServerA(hds: super::super::Foundation::HANDLE, server: P1, ppinfo: *mut *mut DS_NAME_RESULTA) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsListInfoForServerA(hds : super::super::Foundation:: HANDLE, server : windows_core::PCSTR, ppinfo : *mut *mut DS_NAME_RESULTA) -> u32); - DsListInfoForServerA(hds.param().abi(), server.param().abi(), core::mem::transmute(ppinfo)) + DsListInfoForServerA(core::mem::transmute(hds), server.param().abi(), core::mem::transmute(ppinfo)) } #[inline] -pub unsafe fn DsListInfoForServerW(hds: P0, server: P1, ppinfo: *mut *mut DS_NAME_RESULTW) -> u32 +pub unsafe fn DsListInfoForServerW(hds: super::super::Foundation::HANDLE, server: P1, ppinfo: *mut *mut DS_NAME_RESULTW) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsListInfoForServerW(hds : super::super::Foundation:: HANDLE, server : windows_core::PCWSTR, ppinfo : *mut *mut DS_NAME_RESULTW) -> u32); - DsListInfoForServerW(hds.param().abi(), server.param().abi(), core::mem::transmute(ppinfo)) + DsListInfoForServerW(core::mem::transmute(hds), server.param().abi(), core::mem::transmute(ppinfo)) } #[inline] -pub unsafe fn DsListRolesA(hds: P0, pproles: *mut *mut DS_NAME_RESULTA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsListRolesA(hds: super::super::Foundation::HANDLE, pproles: *mut *mut DS_NAME_RESULTA) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsListRolesA(hds : super::super::Foundation:: HANDLE, pproles : *mut *mut DS_NAME_RESULTA) -> u32); - DsListRolesA(hds.param().abi(), core::mem::transmute(pproles)) + DsListRolesA(core::mem::transmute(hds), core::mem::transmute(pproles)) } #[inline] -pub unsafe fn DsListRolesW(hds: P0, pproles: *mut *mut DS_NAME_RESULTW) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsListRolesW(hds: super::super::Foundation::HANDLE, pproles: *mut *mut DS_NAME_RESULTW) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsListRolesW(hds : super::super::Foundation:: HANDLE, pproles : *mut *mut DS_NAME_RESULTW) -> u32); - DsListRolesW(hds.param().abi(), core::mem::transmute(pproles)) + DsListRolesW(core::mem::transmute(hds), core::mem::transmute(pproles)) } #[inline] -pub unsafe fn DsListServersForDomainInSiteA(hds: P0, domain: P1, site: P2, ppservers: *mut *mut DS_NAME_RESULTA) -> u32 +pub unsafe fn DsListServersForDomainInSiteA(hds: super::super::Foundation::HANDLE, domain: P1, site: P2, ppservers: *mut *mut DS_NAME_RESULTA) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsListServersForDomainInSiteA(hds : super::super::Foundation:: HANDLE, domain : windows_core::PCSTR, site : windows_core::PCSTR, ppservers : *mut *mut DS_NAME_RESULTA) -> u32); - DsListServersForDomainInSiteA(hds.param().abi(), domain.param().abi(), site.param().abi(), core::mem::transmute(ppservers)) + DsListServersForDomainInSiteA(core::mem::transmute(hds), domain.param().abi(), site.param().abi(), core::mem::transmute(ppservers)) } #[inline] -pub unsafe fn DsListServersForDomainInSiteW(hds: P0, domain: P1, site: P2, ppservers: *mut *mut DS_NAME_RESULTW) -> u32 +pub unsafe fn DsListServersForDomainInSiteW(hds: super::super::Foundation::HANDLE, domain: P1, site: P2, ppservers: *mut *mut DS_NAME_RESULTW) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsListServersForDomainInSiteW(hds : super::super::Foundation:: HANDLE, domain : windows_core::PCWSTR, site : windows_core::PCWSTR, ppservers : *mut *mut DS_NAME_RESULTW) -> u32); - DsListServersForDomainInSiteW(hds.param().abi(), domain.param().abi(), site.param().abi(), core::mem::transmute(ppservers)) + DsListServersForDomainInSiteW(core::mem::transmute(hds), domain.param().abi(), site.param().abi(), core::mem::transmute(ppservers)) } #[inline] -pub unsafe fn DsListServersInSiteA(hds: P0, site: P1, ppservers: *mut *mut DS_NAME_RESULTA) -> u32 +pub unsafe fn DsListServersInSiteA(hds: super::super::Foundation::HANDLE, site: P1, ppservers: *mut *mut DS_NAME_RESULTA) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsListServersInSiteA(hds : super::super::Foundation:: HANDLE, site : windows_core::PCSTR, ppservers : *mut *mut DS_NAME_RESULTA) -> u32); - DsListServersInSiteA(hds.param().abi(), site.param().abi(), core::mem::transmute(ppservers)) + DsListServersInSiteA(core::mem::transmute(hds), site.param().abi(), core::mem::transmute(ppservers)) } #[inline] -pub unsafe fn DsListServersInSiteW(hds: P0, site: P1, ppservers: *mut *mut DS_NAME_RESULTW) -> u32 +pub unsafe fn DsListServersInSiteW(hds: super::super::Foundation::HANDLE, site: P1, ppservers: *mut *mut DS_NAME_RESULTW) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsListServersInSiteW(hds : super::super::Foundation:: HANDLE, site : windows_core::PCWSTR, ppservers : *mut *mut DS_NAME_RESULTW) -> u32); - DsListServersInSiteW(hds.param().abi(), site.param().abi(), core::mem::transmute(ppservers)) + DsListServersInSiteW(core::mem::transmute(hds), site.param().abi(), core::mem::transmute(ppservers)) } #[inline] -pub unsafe fn DsListSitesA(hds: P0, ppsites: *mut *mut DS_NAME_RESULTA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsListSitesA(hds: super::super::Foundation::HANDLE, ppsites: *mut *mut DS_NAME_RESULTA) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsListSitesA(hds : super::super::Foundation:: HANDLE, ppsites : *mut *mut DS_NAME_RESULTA) -> u32); - DsListSitesA(hds.param().abi(), core::mem::transmute(ppsites)) + DsListSitesA(core::mem::transmute(hds), core::mem::transmute(ppsites)) } #[inline] -pub unsafe fn DsListSitesW(hds: P0, ppsites: *mut *mut DS_NAME_RESULTW) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsListSitesW(hds: super::super::Foundation::HANDLE, ppsites: *mut *mut DS_NAME_RESULTW) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsListSitesW(hds : super::super::Foundation:: HANDLE, ppsites : *mut *mut DS_NAME_RESULTW) -> u32); - DsListSitesW(hds.param().abi(), core::mem::transmute(ppsites)) + DsListSitesW(core::mem::transmute(hds), core::mem::transmute(ppsites)) } #[inline] pub unsafe fn DsMakePasswordCredentialsA(user: P0, domain: P1, password: P2, pauthidentity: *mut *mut core::ffi::c_void) -> u32 @@ -884,7 +859,7 @@ where DsMakePasswordCredentialsW(user.param().abi(), domain.param().abi(), password.param().abi(), core::mem::transmute(pauthidentity)) } #[inline] -pub unsafe fn DsMakeSpnA(serviceclass: P0, servicename: P1, instancename: P2, instanceport: u16, referrer: P4, pcspnlength: *mut u32, pszspn: windows_core::PSTR) -> u32 +pub unsafe fn DsMakeSpnA(serviceclass: P0, servicename: P1, instancename: P2, instanceport: u16, referrer: P4, pcspnlength: *mut u32, pszspn: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -892,10 +867,10 @@ where P4: windows_core::Param, { windows_targets::link!("dsparse.dll" "system" fn DsMakeSpnA(serviceclass : windows_core::PCSTR, servicename : windows_core::PCSTR, instancename : windows_core::PCSTR, instanceport : u16, referrer : windows_core::PCSTR, pcspnlength : *mut u32, pszspn : windows_core::PSTR) -> u32); - DsMakeSpnA(serviceclass.param().abi(), servicename.param().abi(), instancename.param().abi(), core::mem::transmute(instanceport), referrer.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn)) + DsMakeSpnA(serviceclass.param().abi(), servicename.param().abi(), instancename.param().abi(), core::mem::transmute(instanceport), referrer.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DsMakeSpnW(serviceclass: P0, servicename: P1, instancename: P2, instanceport: u16, referrer: P4, pcspnlength: *mut u32, pszspn: windows_core::PWSTR) -> u32 +pub unsafe fn DsMakeSpnW(serviceclass: P0, servicename: P1, instancename: P2, instanceport: u16, referrer: P4, pcspnlength: *mut u32, pszspn: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -903,23 +878,17 @@ where P4: windows_core::Param, { windows_targets::link!("dsparse.dll" "system" fn DsMakeSpnW(serviceclass : windows_core::PCWSTR, servicename : windows_core::PCWSTR, instancename : windows_core::PCWSTR, instanceport : u16, referrer : windows_core::PCWSTR, pcspnlength : *mut u32, pszspn : windows_core::PWSTR) -> u32); - DsMakeSpnW(serviceclass.param().abi(), servicename.param().abi(), instancename.param().abi(), core::mem::transmute(instanceport), referrer.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn)) + DsMakeSpnW(serviceclass.param().abi(), servicename.param().abi(), instancename.param().abi(), core::mem::transmute(instanceport), referrer.param().abi(), core::mem::transmute(pcspnlength), core::mem::transmute(pszspn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DsMapSchemaGuidsA(hds: P0, rguids: &[windows_core::GUID], ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsMapSchemaGuidsA(hds: super::super::Foundation::HANDLE, rguids: &[windows_core::GUID], ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPA) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsMapSchemaGuidsA(hds : super::super::Foundation:: HANDLE, cguids : u32, rguids : *const windows_core::GUID, ppguidmap : *mut *mut DS_SCHEMA_GUID_MAPA) -> u32); - DsMapSchemaGuidsA(hds.param().abi(), rguids.len().try_into().unwrap(), core::mem::transmute(rguids.as_ptr()), core::mem::transmute(ppguidmap)) + DsMapSchemaGuidsA(core::mem::transmute(hds), rguids.len().try_into().unwrap(), core::mem::transmute(rguids.as_ptr()), core::mem::transmute(ppguidmap)) } #[inline] -pub unsafe fn DsMapSchemaGuidsW(hds: P0, rguids: &[windows_core::GUID], ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPW) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsMapSchemaGuidsW(hds: super::super::Foundation::HANDLE, rguids: &[windows_core::GUID], ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPW) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsMapSchemaGuidsW(hds : super::super::Foundation:: HANDLE, cguids : u32, rguids : *const windows_core::GUID, ppguidmap : *mut *mut DS_SCHEMA_GUID_MAPW) -> u32); - DsMapSchemaGuidsW(hds.param().abi(), rguids.len().try_into().unwrap(), core::mem::transmute(rguids.as_ptr()), core::mem::transmute(ppguidmap)) + DsMapSchemaGuidsW(core::mem::transmute(hds), rguids.len().try_into().unwrap(), core::mem::transmute(rguids.as_ptr()), core::mem::transmute(ppguidmap)) } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] @@ -928,25 +897,23 @@ 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(), core::mem::transmute(newforesttrustinfo), core::mem::transmute(oldforesttrustinfo.unwrap_or(core::ptr::null())), core::mem::transmute(mergedforesttrustinfo)) + DsMergeForestTrustInformationW(domainname.param().abi(), core::mem::transmute(newforesttrustinfo), core::mem::transmute(oldforesttrustinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(mergedforesttrustinfo)) } #[inline] -pub unsafe fn DsQuerySitesByCostA(hds: P0, pszfromsite: P1, rgsztosites: &[windows_core::PCSTR], dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32 +pub unsafe fn DsQuerySitesByCostA(hds: super::super::Foundation::HANDLE, pszfromsite: P1, rgsztosites: &[windows_core::PCSTR], dwflags: Option, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsQuerySitesByCostA(hds : super::super::Foundation:: HANDLE, pszfromsite : windows_core::PCSTR, rgsztosites : *const windows_core::PCSTR, ctosites : u32, dwflags : u32, prgsiteinfo : *mut *mut DS_SITE_COST_INFO) -> u32); - DsQuerySitesByCostA(hds.param().abi(), pszfromsite.param().abi(), core::mem::transmute(rgsztosites.as_ptr()), rgsztosites.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(prgsiteinfo)) + DsQuerySitesByCostA(core::mem::transmute(hds), pszfromsite.param().abi(), core::mem::transmute(rgsztosites.as_ptr()), rgsztosites.len().try_into().unwrap(), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(prgsiteinfo)) } #[inline] -pub unsafe fn DsQuerySitesByCostW(hds: P0, pwszfromsite: P1, rgwsztosites: &[windows_core::PCWSTR], dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32 +pub unsafe fn DsQuerySitesByCostW(hds: super::super::Foundation::HANDLE, pwszfromsite: P1, rgwsztosites: &[windows_core::PCWSTR], dwflags: Option, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsQuerySitesByCostW(hds : super::super::Foundation:: HANDLE, pwszfromsite : windows_core::PCWSTR, rgwsztosites : *const windows_core::PCWSTR, ctosites : u32, dwflags : u32, prgsiteinfo : *mut *mut DS_SITE_COST_INFO) -> u32); - DsQuerySitesByCostW(hds.param().abi(), pwszfromsite.param().abi(), core::mem::transmute(rgwsztosites.as_ptr()), rgwsztosites.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(prgsiteinfo)) + DsQuerySitesByCostW(core::mem::transmute(hds), pwszfromsite.param().abi(), core::mem::transmute(rgwsztosites.as_ptr()), rgwsztosites.len().try_into().unwrap(), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(prgsiteinfo)) } #[inline] pub unsafe fn DsQuerySitesFree(rgsiteinfo: *const DS_SITE_COST_INFO) { @@ -964,96 +931,85 @@ pub unsafe fn DsQuoteRdnValueW(psunquotedrdnvalue: &[u16], pcquotedrdnvaluelengt DsQuoteRdnValueW(psunquotedrdnvalue.len().try_into().unwrap(), core::mem::transmute(psunquotedrdnvalue.as_ptr()), core::mem::transmute(pcquotedrdnvaluelength), core::mem::transmute(psquotedrdnvalue)) } #[inline] -pub unsafe fn DsRemoveDsDomainA(hds: P0, domaindn: P1) -> u32 +pub unsafe fn DsRemoveDsDomainA(hds: super::super::Foundation::HANDLE, domaindn: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsRemoveDsDomainA(hds : super::super::Foundation:: HANDLE, domaindn : windows_core::PCSTR) -> u32); - DsRemoveDsDomainA(hds.param().abi(), domaindn.param().abi()) + DsRemoveDsDomainA(core::mem::transmute(hds), domaindn.param().abi()) } #[inline] -pub unsafe fn DsRemoveDsDomainW(hds: P0, domaindn: P1) -> u32 +pub unsafe fn DsRemoveDsDomainW(hds: super::super::Foundation::HANDLE, domaindn: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsRemoveDsDomainW(hds : super::super::Foundation:: HANDLE, domaindn : windows_core::PCWSTR) -> u32); - DsRemoveDsDomainW(hds.param().abi(), domaindn.param().abi()) + DsRemoveDsDomainW(core::mem::transmute(hds), domaindn.param().abi()) } #[inline] -pub unsafe fn DsRemoveDsServerA(hds: P0, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: P4) -> u32 +pub unsafe fn DsRemoveDsServerA(hds: super::super::Foundation::HANDLE, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: P4) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P4: 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(core::ptr::null_mut())), fcommit.param().abi()) + DsRemoveDsServerA(core::mem::transmute(hds), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::mem::zeroed())), fcommit.param().abi()) } #[inline] -pub unsafe fn DsRemoveDsServerW(hds: P0, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: P4) -> u32 +pub unsafe fn DsRemoveDsServerW(hds: super::super::Foundation::HANDLE, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: P4) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P4: 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(core::ptr::null_mut())), fcommit.param().abi()) + DsRemoveDsServerW(core::mem::transmute(hds), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::mem::zeroed())), 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 +pub unsafe fn DsReplicaAddA(hds: super::super::Foundation::HANDLE, namecontext: P1, sourcedsadn: P2, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(options)) + DsReplicaAddA(core::mem::transmute(hds), namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::mem::zeroed())), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaAddW(hds: P0, namecontext: P1, sourcedsadn: P2, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, options: u32) -> u32 +pub unsafe fn DsReplicaAddW(hds: super::super::Foundation::HANDLE, namecontext: P1, sourcedsadn: P2, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(options)) + DsReplicaAddW(core::mem::transmute(hds), namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::mem::zeroed())), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaConsistencyCheck(hds: P0, taskid: DS_KCC_TASKID, dwflags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DsReplicaConsistencyCheck(hds: super::super::Foundation::HANDLE, taskid: DS_KCC_TASKID, dwflags: u32) -> u32 { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaConsistencyCheck(hds : super::super::Foundation:: HANDLE, taskid : DS_KCC_TASKID, dwflags : u32) -> u32); - DsReplicaConsistencyCheck(hds.param().abi(), core::mem::transmute(taskid), core::mem::transmute(dwflags)) + DsReplicaConsistencyCheck(core::mem::transmute(hds), core::mem::transmute(taskid), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn DsReplicaDelA(hds: P0, namecontext: P1, dsasrc: P2, options: u32) -> u32 +pub unsafe fn DsReplicaDelA(hds: super::super::Foundation::HANDLE, namecontext: P1, dsasrc: P2, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaDelA(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCSTR, dsasrc : windows_core::PCSTR, options : u32) -> u32); - DsReplicaDelA(hds.param().abi(), namecontext.param().abi(), dsasrc.param().abi(), core::mem::transmute(options)) + DsReplicaDelA(core::mem::transmute(hds), namecontext.param().abi(), dsasrc.param().abi(), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaDelW(hds: P0, namecontext: P1, dsasrc: P2, options: u32) -> u32 +pub unsafe fn DsReplicaDelW(hds: super::super::Foundation::HANDLE, namecontext: P1, dsasrc: P2, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaDelW(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCWSTR, dsasrc : windows_core::PCWSTR, options : u32) -> u32); - DsReplicaDelW(hds.param().abi(), namecontext.param().abi(), dsasrc.param().abi(), core::mem::transmute(options)) + DsReplicaDelW(core::mem::transmute(hds), namecontext.param().abi(), dsasrc.param().abi(), core::mem::transmute(options)) } #[inline] pub unsafe fn DsReplicaFreeInfo(infotype: DS_REPL_INFO_TYPE, pinfo: *const core::ffi::c_void) { @@ -1061,120 +1017,108 @@ pub unsafe fn DsReplicaFreeInfo(infotype: DS_REPL_INFO_TYPE, pinfo: *const core: DsReplicaFreeInfo(core::mem::transmute(infotype), core::mem::transmute(pinfo)) } #[inline] -pub unsafe fn DsReplicaGetInfo2W(hds: P0, infotype: DS_REPL_INFO_TYPE, pszobject: P2, puuidforsourcedsaobjguid: Option<*const windows_core::GUID>, pszattributename: P4, pszvalue: P5, dwflags: u32, dwenumerationcontext: u32, ppinfo: *mut *mut core::ffi::c_void) -> u32 +pub unsafe fn DsReplicaGetInfo2W(hds: super::super::Foundation::HANDLE, infotype: DS_REPL_INFO_TYPE, pszobject: P2, puuidforsourcedsaobjguid: Option<*const windows_core::GUID>, pszattributename: P4, pszvalue: P5, dwflags: u32, dwenumerationcontext: u32, ppinfo: *mut *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, P5: 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(), core::mem::transmute(infotype), pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(core::ptr::null())), pszattributename.param().abi(), pszvalue.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwenumerationcontext), core::mem::transmute(ppinfo)) + DsReplicaGetInfo2W(core::mem::transmute(hds), core::mem::transmute(infotype), pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(core::mem::zeroed())), pszattributename.param().abi(), pszvalue.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwenumerationcontext), core::mem::transmute(ppinfo)) } #[inline] -pub unsafe fn DsReplicaGetInfoW(hds: P0, infotype: DS_REPL_INFO_TYPE, pszobject: P2, puuidforsourcedsaobjguid: Option<*const windows_core::GUID>, ppinfo: *mut *mut core::ffi::c_void) -> u32 +pub unsafe fn DsReplicaGetInfoW(hds: super::super::Foundation::HANDLE, infotype: DS_REPL_INFO_TYPE, pszobject: P2, puuidforsourcedsaobjguid: Option<*const windows_core::GUID>, ppinfo: *mut *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(infotype), pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(core::ptr::null())), core::mem::transmute(ppinfo)) + DsReplicaGetInfoW(core::mem::transmute(hds), core::mem::transmute(infotype), pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppinfo)) } #[inline] -pub unsafe fn DsReplicaModifyA(hds: P0, namecontext: P1, puuidsourcedsa: Option<*const windows_core::GUID>, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, replicaflags: u32, modifyfields: u32, options: u32) -> u32 +pub unsafe fn DsReplicaModifyA(hds: super::super::Foundation::HANDLE, namecontext: P1, puuidsourcedsa: Option<*const windows_core::GUID>, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, replicaflags: Option, modifyfields: u32, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null())), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::ptr::null())), core::mem::transmute(replicaflags), core::mem::transmute(modifyfields), core::mem::transmute(options)) + DsReplicaModifyA(core::mem::transmute(hds), namecontext.param().abi(), core::mem::transmute(puuidsourcedsa.unwrap_or(core::mem::zeroed())), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::mem::zeroed())), core::mem::transmute(replicaflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(modifyfields), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaModifyW(hds: P0, namecontext: P1, puuidsourcedsa: Option<*const windows_core::GUID>, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, replicaflags: u32, modifyfields: u32, options: u32) -> u32 +pub unsafe fn DsReplicaModifyW(hds: super::super::Foundation::HANDLE, namecontext: P1, puuidsourcedsa: Option<*const windows_core::GUID>, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, replicaflags: u32, modifyfields: u32, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, P4: 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(core::ptr::null())), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::ptr::null())), core::mem::transmute(replicaflags), core::mem::transmute(modifyfields), core::mem::transmute(options)) + DsReplicaModifyW(core::mem::transmute(hds), namecontext.param().abi(), core::mem::transmute(puuidsourcedsa.unwrap_or(core::mem::zeroed())), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::mem::zeroed())), core::mem::transmute(replicaflags), core::mem::transmute(modifyfields), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaSyncA(hds: P0, namecontext: P1, puuiddsasrc: *const windows_core::GUID, options: u32) -> u32 +pub unsafe fn DsReplicaSyncA(hds: super::super::Foundation::HANDLE, namecontext: P1, puuiddsasrc: *const windows_core::GUID, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaSyncA(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCSTR, puuiddsasrc : *const windows_core::GUID, options : u32) -> u32); - DsReplicaSyncA(hds.param().abi(), namecontext.param().abi(), core::mem::transmute(puuiddsasrc), core::mem::transmute(options)) + DsReplicaSyncA(core::mem::transmute(hds), namecontext.param().abi(), core::mem::transmute(puuiddsasrc), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaSyncAllA(hds: P0, psznamecontext: P1, ulflags: u32, pfncallback: isize, pcallbackdata: Option<*const core::ffi::c_void>, perrors: Option<*mut *mut *mut DS_REPSYNCALL_ERRINFOA>) -> u32 +pub unsafe fn DsReplicaSyncAllA(hds: super::super::Foundation::HANDLE, psznamecontext: P1, ulflags: u32, pfncallback: isize, pcallbackdata: Option<*const core::ffi::c_void>, perrors: Option<*mut *mut *mut DS_REPSYNCALL_ERRINFOA>) -> u32 where - P0: windows_core::Param, 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(), core::mem::transmute(ulflags), core::mem::transmute(pfncallback), core::mem::transmute(pcallbackdata.unwrap_or(core::ptr::null())), core::mem::transmute(perrors.unwrap_or(core::ptr::null_mut()))) + DsReplicaSyncAllA(core::mem::transmute(hds), psznamecontext.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(pfncallback), core::mem::transmute(pcallbackdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(perrors.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn DsReplicaSyncAllW(hds: super::super::Foundation::HANDLE, psznamecontext: P1, ulflags: u32, pfncallback: isize, pcallbackdata: Option<*const core::ffi::c_void>, perrors: Option<*mut *mut *mut DS_REPSYNCALL_ERRINFOW>) -> u32 where - P0: windows_core::Param, 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(), core::mem::transmute(ulflags), core::mem::transmute(pfncallback), core::mem::transmute(pcallbackdata.unwrap_or(core::ptr::null())), core::mem::transmute(perrors.unwrap_or(core::ptr::null_mut()))) + DsReplicaSyncAllW(core::mem::transmute(hds), psznamecontext.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(pfncallback), core::mem::transmute(pcallbackdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(perrors.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DsReplicaSyncW(hds: P0, namecontext: P1, puuiddsasrc: *const windows_core::GUID, options: u32) -> u32 +pub unsafe fn DsReplicaSyncW(hds: super::super::Foundation::HANDLE, namecontext: P1, puuiddsasrc: *const windows_core::GUID, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaSyncW(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCWSTR, puuiddsasrc : *const windows_core::GUID, options : u32) -> u32); - DsReplicaSyncW(hds.param().abi(), namecontext.param().abi(), core::mem::transmute(puuiddsasrc), core::mem::transmute(options)) + DsReplicaSyncW(core::mem::transmute(hds), namecontext.param().abi(), core::mem::transmute(puuiddsasrc), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaUpdateRefsA(hds: P0, namecontext: P1, dsadest: P2, puuiddsadest: *const windows_core::GUID, options: u32) -> u32 +pub unsafe fn DsReplicaUpdateRefsA(hds: super::super::Foundation::HANDLE, namecontext: P1, dsadest: P2, puuiddsadest: *const windows_core::GUID, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaUpdateRefsA(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCSTR, dsadest : windows_core::PCSTR, puuiddsadest : *const windows_core::GUID, options : u32) -> u32); - DsReplicaUpdateRefsA(hds.param().abi(), namecontext.param().abi(), dsadest.param().abi(), core::mem::transmute(puuiddsadest), core::mem::transmute(options)) + DsReplicaUpdateRefsA(core::mem::transmute(hds), namecontext.param().abi(), dsadest.param().abi(), core::mem::transmute(puuiddsadest), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaUpdateRefsW(hds: P0, namecontext: P1, dsadest: P2, puuiddsadest: *const windows_core::GUID, options: u32) -> u32 +pub unsafe fn DsReplicaUpdateRefsW(hds: super::super::Foundation::HANDLE, namecontext: P1, dsadest: P2, puuiddsadest: *const windows_core::GUID, options: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaUpdateRefsW(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCWSTR, dsadest : windows_core::PCWSTR, puuiddsadest : *const windows_core::GUID, options : u32) -> u32); - DsReplicaUpdateRefsW(hds.param().abi(), namecontext.param().abi(), dsadest.param().abi(), core::mem::transmute(puuiddsadest), core::mem::transmute(options)) + DsReplicaUpdateRefsW(core::mem::transmute(hds), namecontext.param().abi(), dsadest.param().abi(), core::mem::transmute(puuiddsadest), core::mem::transmute(options)) } #[inline] -pub unsafe fn DsReplicaVerifyObjectsA(hds: P0, namecontext: P1, puuiddsasrc: *const windows_core::GUID, uloptions: u32) -> u32 +pub unsafe fn DsReplicaVerifyObjectsA(hds: super::super::Foundation::HANDLE, namecontext: P1, puuiddsasrc: *const windows_core::GUID, uloptions: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaVerifyObjectsA(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCSTR, puuiddsasrc : *const windows_core::GUID, uloptions : u32) -> u32); - DsReplicaVerifyObjectsA(hds.param().abi(), namecontext.param().abi(), core::mem::transmute(puuiddsasrc), core::mem::transmute(uloptions)) + DsReplicaVerifyObjectsA(core::mem::transmute(hds), namecontext.param().abi(), core::mem::transmute(puuiddsasrc), core::mem::transmute(uloptions)) } #[inline] -pub unsafe fn DsReplicaVerifyObjectsW(hds: P0, namecontext: P1, puuiddsasrc: *const windows_core::GUID, uloptions: u32) -> u32 +pub unsafe fn DsReplicaVerifyObjectsW(hds: super::super::Foundation::HANDLE, namecontext: P1, puuiddsasrc: *const windows_core::GUID, uloptions: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaVerifyObjectsW(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCWSTR, puuiddsasrc : *const windows_core::GUID, uloptions : u32) -> u32); - DsReplicaVerifyObjectsW(hds.param().abi(), namecontext.param().abi(), core::mem::transmute(puuiddsasrc), core::mem::transmute(uloptions)) + DsReplicaVerifyObjectsW(core::mem::transmute(hds), namecontext.param().abi(), core::mem::transmute(puuiddsasrc), core::mem::transmute(uloptions)) } #[inline] pub unsafe fn DsRoleFreeMemory(buffer: *mut core::ffi::c_void) { @@ -1244,22 +1188,20 @@ where DsValidateSubnetNameW(subnetname.param().abi()) } #[inline] -pub unsafe fn DsWriteAccountSpnA(hds: P0, operation: DS_SPN_WRITE_OP, pszaccount: P2, rpszspn: &[windows_core::PCSTR]) -> u32 +pub unsafe fn DsWriteAccountSpnA(hds: super::super::Foundation::HANDLE, operation: DS_SPN_WRITE_OP, pszaccount: P2, rpszspn: &[windows_core::PCSTR]) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsWriteAccountSpnA(hds : super::super::Foundation:: HANDLE, operation : DS_SPN_WRITE_OP, pszaccount : windows_core::PCSTR, cspn : u32, rpszspn : *const windows_core::PCSTR) -> u32); - DsWriteAccountSpnA(hds.param().abi(), core::mem::transmute(operation), pszaccount.param().abi(), rpszspn.len().try_into().unwrap(), core::mem::transmute(rpszspn.as_ptr())) + DsWriteAccountSpnA(core::mem::transmute(hds), core::mem::transmute(operation), pszaccount.param().abi(), rpszspn.len().try_into().unwrap(), core::mem::transmute(rpszspn.as_ptr())) } #[inline] -pub unsafe fn DsWriteAccountSpnW(hds: P0, operation: DS_SPN_WRITE_OP, pszaccount: P2, rpszspn: &[windows_core::PCWSTR]) -> u32 +pub unsafe fn DsWriteAccountSpnW(hds: super::super::Foundation::HANDLE, operation: DS_SPN_WRITE_OP, pszaccount: P2, rpszspn: &[windows_core::PCWSTR]) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsWriteAccountSpnW(hds : super::super::Foundation:: HANDLE, operation : DS_SPN_WRITE_OP, pszaccount : windows_core::PCWSTR, cspn : u32, rpszspn : *const windows_core::PCWSTR) -> u32); - DsWriteAccountSpnW(hds.param().abi(), core::mem::transmute(operation), pszaccount.param().abi(), rpszspn.len().try_into().unwrap(), core::mem::transmute(rpszspn.as_ptr())) + DsWriteAccountSpnW(core::mem::transmute(hds), core::mem::transmute(operation), pszaccount.param().abi(), rpszspn.len().try_into().unwrap(), core::mem::transmute(rpszspn.as_ptr())) } #[inline] pub unsafe fn FreeADsMem(pmem: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { @@ -5487,21 +5429,15 @@ impl IADsClass { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Abstract)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAbstract(&self, fabstract: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAbstract)(windows_core::Interface::as_raw(self), fabstract.param().abi()).ok() + pub unsafe fn SetAbstract(&self, fabstract: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAbstract)(windows_core::Interface::as_raw(self), core::mem::transmute(fabstract)).ok() } pub unsafe fn Auxiliary(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Auxiliary)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAuxiliary(&self, fauxiliary: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAuxiliary)(windows_core::Interface::as_raw(self), fauxiliary.param().abi()).ok() + pub unsafe fn SetAuxiliary(&self, fauxiliary: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAuxiliary)(windows_core::Interface::as_raw(self), core::mem::transmute(fauxiliary)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn MandatoryProperties(&self) -> windows_core::Result { @@ -5570,11 +5506,8 @@ impl IADsClass { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Container)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetContainer(&self, fcontainer: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetContainer)(windows_core::Interface::as_raw(self), fcontainer.param().abi()).ok() + pub unsafe fn SetContainer(&self, fcontainer: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetContainer)(windows_core::Interface::as_raw(self), core::mem::transmute(fcontainer)).ok() } pub unsafe fn HelpFileName(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6560,11 +6493,8 @@ impl IADsComputerOperations { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Status)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Shutdown(&self, breboot: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self), breboot.param().abi()).ok() + pub unsafe fn Shutdown(&self, breboot: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self), core::mem::transmute(breboot)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -10698,11 +10628,8 @@ impl IADsProperty { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MultiValued)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMultiValued(&self, fmultivalued: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMultiValued)(windows_core::Interface::as_raw(self), fmultivalued.param().abi()).ok() + pub unsafe fn SetMultiValued(&self, fmultivalued: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMultiValued)(windows_core::Interface::as_raw(self), core::mem::transmute(fmultivalued)).ok() } pub unsafe fn Qualifiers(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11935,11 +11862,8 @@ impl IADsSecurityDescriptor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OwnerDefaulted)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOwnerDefaulted(&self, fownerdefaulted: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOwnerDefaulted)(windows_core::Interface::as_raw(self), fownerdefaulted.param().abi()).ok() + pub unsafe fn SetOwnerDefaulted(&self, fownerdefaulted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOwnerDefaulted)(windows_core::Interface::as_raw(self), core::mem::transmute(fownerdefaulted)).ok() } pub unsafe fn Group(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11952,11 +11876,8 @@ impl IADsSecurityDescriptor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GroupDefaulted)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetGroupDefaulted(&self, fgroupdefaulted: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGroupDefaulted)(windows_core::Interface::as_raw(self), fgroupdefaulted.param().abi()).ok() + pub unsafe fn SetGroupDefaulted(&self, fgroupdefaulted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGroupDefaulted)(windows_core::Interface::as_raw(self), core::mem::transmute(fgroupdefaulted)).ok() } pub unsafe fn DiscretionaryAcl(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11972,11 +11893,8 @@ impl IADsSecurityDescriptor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DaclDefaulted)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDaclDefaulted(&self, fdacldefaulted: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDaclDefaulted)(windows_core::Interface::as_raw(self), fdacldefaulted.param().abi()).ok() + pub unsafe fn SetDaclDefaulted(&self, fdacldefaulted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDaclDefaulted)(windows_core::Interface::as_raw(self), core::mem::transmute(fdacldefaulted)).ok() } pub unsafe fn SystemAcl(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11992,11 +11910,8 @@ impl IADsSecurityDescriptor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SaclDefaulted)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSaclDefaulted(&self, fsacldefaulted: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSaclDefaulted)(windows_core::Interface::as_raw(self), fsacldefaulted.param().abi()).ok() + pub unsafe fn SetSaclDefaulted(&self, fsacldefaulted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSaclDefaulted)(windows_core::Interface::as_raw(self), core::mem::transmute(fsacldefaulted)).ok() } pub unsafe fn CopySecurityDescriptor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13434,11 +13349,8 @@ impl IADsUser { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AccountDisabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAccountDisabled(&self, faccountdisabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAccountDisabled)(windows_core::Interface::as_raw(self), faccountdisabled.param().abi()).ok() + pub unsafe fn SetAccountDisabled(&self, faccountdisabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAccountDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(faccountdisabled)).ok() } pub unsafe fn AccountExpirationDate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13465,11 +13377,8 @@ impl IADsUser { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsAccountLocked)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsAccountLocked(&self, fisaccountlocked: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsAccountLocked)(windows_core::Interface::as_raw(self), fisaccountlocked.param().abi()).ok() + pub unsafe fn SetIsAccountLocked(&self, fisaccountlocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsAccountLocked)(windows_core::Interface::as_raw(self), core::mem::transmute(fisaccountlocked)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn LoginHours(&self) -> windows_core::Result { @@ -13521,21 +13430,15 @@ impl IADsUser { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).PasswordRequired)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPasswordRequired(&self, fpasswordrequired: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPasswordRequired)(windows_core::Interface::as_raw(self), fpasswordrequired.param().abi()).ok() + pub unsafe fn SetPasswordRequired(&self, fpasswordrequired: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPasswordRequired)(windows_core::Interface::as_raw(self), core::mem::transmute(fpasswordrequired)).ok() } pub unsafe fn RequireUniquePassword(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RequireUniquePassword)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetRequireUniquePassword(&self, frequireuniquepassword: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRequireUniquePassword)(windows_core::Interface::as_raw(self), frequireuniquepassword.param().abi()).ok() + pub unsafe fn SetRequireUniquePassword(&self, frequireuniquepassword: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRequireUniquePassword)(windows_core::Interface::as_raw(self), core::mem::transmute(frequireuniquepassword)).ok() } pub unsafe fn EmailAddress(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14732,11 +14635,8 @@ windows_core::imp::define_interface!(ICommonQuery, ICommonQuery_Vtbl, 0xab50dec0 windows_core::imp::interface_hierarchy!(ICommonQuery, windows_core::IUnknown); impl ICommonQuery { #[cfg(feature = "Win32_System_Com_StructuredStorage")] - pub unsafe fn OpenQueryWindow(&self, hwndparent: P0, pquerywnd: *mut OPENQUERYWINDOW, ppdataobject: *mut Option) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OpenQueryWindow)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(pquerywnd), core::mem::transmute(ppdataobject)).ok() + pub unsafe fn OpenQueryWindow(&self, hwndparent: super::super::Foundation::HWND, pquerywnd: *mut OPENQUERYWINDOW, ppdataobject: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OpenQueryWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(pquerywnd), core::mem::transmute(ppdataobject)).ok() } } #[repr(C)] @@ -15003,51 +14903,32 @@ impl IDirectorySearch { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ExecuteSearch)(windows_core::Interface::as_raw(self), pszsearchfilter.param().abi(), core::mem::transmute(pattributenames), core::mem::transmute(dwnumberattributes), &mut result__).map(|| result__) } - pub unsafe fn AbandonSearch(&self, phsearchresult: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AbandonSearch)(windows_core::Interface::as_raw(self), phsearchresult.param().abi()).ok() + pub unsafe fn AbandonSearch(&self, phsearchresult: ADS_SEARCH_HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AbandonSearch)(windows_core::Interface::as_raw(self), core::mem::transmute(phsearchresult)).ok() } - pub unsafe fn GetFirstRow(&self, hsearchresult: P0) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetFirstRow)(windows_core::Interface::as_raw(self), hsearchresult.param().abi()) + pub unsafe fn GetFirstRow(&self, hsearchresult: ADS_SEARCH_HANDLE) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).GetFirstRow)(windows_core::Interface::as_raw(self), core::mem::transmute(hsearchresult)) } - pub unsafe fn GetNextRow(&self, hsearchresult: P0) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetNextRow)(windows_core::Interface::as_raw(self), hsearchresult.param().abi()) + pub unsafe fn GetNextRow(&self, hsearchresult: ADS_SEARCH_HANDLE) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).GetNextRow)(windows_core::Interface::as_raw(self), core::mem::transmute(hsearchresult)) } - pub unsafe fn GetPreviousRow(&self, hsearchresult: P0) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetPreviousRow)(windows_core::Interface::as_raw(self), hsearchresult.param().abi()) + pub unsafe fn GetPreviousRow(&self, hsearchresult: ADS_SEARCH_HANDLE) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).GetPreviousRow)(windows_core::Interface::as_raw(self), core::mem::transmute(hsearchresult)) } - pub unsafe fn GetNextColumnName(&self, hsearchhandle: P0, ppszcolumnname: *mut windows_core::PWSTR) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetNextColumnName)(windows_core::Interface::as_raw(self), hsearchhandle.param().abi(), core::mem::transmute(ppszcolumnname)) + pub unsafe fn GetNextColumnName(&self, hsearchhandle: ADS_SEARCH_HANDLE, ppszcolumnname: *mut windows_core::PWSTR) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).GetNextColumnName)(windows_core::Interface::as_raw(self), core::mem::transmute(hsearchhandle), core::mem::transmute(ppszcolumnname)) } - pub unsafe fn GetColumn(&self, hsearchresult: P0, szcolumnname: P1, psearchcolumn: *mut ADS_SEARCH_COLUMN) -> windows_core::Result<()> + pub unsafe fn GetColumn(&self, hsearchresult: ADS_SEARCH_HANDLE, szcolumnname: P1, psearchcolumn: *mut ADS_SEARCH_COLUMN) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetColumn)(windows_core::Interface::as_raw(self), hsearchresult.param().abi(), szcolumnname.param().abi(), core::mem::transmute(psearchcolumn)).ok() + (windows_core::Interface::vtable(self).GetColumn)(windows_core::Interface::as_raw(self), core::mem::transmute(hsearchresult), szcolumnname.param().abi(), core::mem::transmute(psearchcolumn)).ok() } pub unsafe fn FreeColumn(&self, psearchcolumn: *const ADS_SEARCH_COLUMN) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FreeColumn)(windows_core::Interface::as_raw(self), core::mem::transmute(psearchcolumn)).ok() } - pub unsafe fn CloseSearchHandle(&self, hsearchresult: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CloseSearchHandle)(windows_core::Interface::as_raw(self), hsearchresult.param().abi()).ok() + pub unsafe fn CloseSearchHandle(&self, hsearchresult: ADS_SEARCH_HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CloseSearchHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hsearchresult)).ok() } } #[repr(C)] @@ -15156,12 +15037,9 @@ impl IDsAdminCreateObj { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), padscontainerobj.param().abi(), padscopysource.param().abi(), lpszclassname.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn CreateModal(&self, hwndparent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateModal(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateModal)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateModal)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -15268,11 +15146,8 @@ impl IDsAdminNewObjExt { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), padscontainerobj.param().abi(), padscopysource.param().abi(), lpszclassname.param().abi(), pdsadminnewobj.param().abi(), core::mem::transmute(pdispinfo)).ok() } #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn AddPages(&self, lpfnaddpage: super::super::UI::Controls::LPFNSVADDPROPSHEETPAGE, lparam: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddPages)(windows_core::Interface::as_raw(self), core::mem::transmute(lpfnaddpage), lparam.param().abi()).ok() + pub unsafe fn AddPages(&self, lpfnaddpage: super::super::UI::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddPages)(windows_core::Interface::as_raw(self), core::mem::transmute(lpfnaddpage), core::mem::transmute(lparam)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetObject(&self, padsobj: P0) -> windows_core::Result<()> @@ -15281,17 +15156,11 @@ impl IDsAdminNewObjExt { { (windows_core::Interface::vtable(self).SetObject)(windows_core::Interface::as_raw(self), padsobj.param().abi()).ok() } - pub unsafe fn WriteData(&self, hwnd: P0, ucontext: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).WriteData)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(ucontext)).ok() + pub unsafe fn WriteData(&self, hwnd: super::super::Foundation::HWND, ucontext: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).WriteData)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(ucontext)).ok() } - pub unsafe fn OnError(&self, hwnd: P0, hr: windows_core::HRESULT, ucontext: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnError)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(hr), core::mem::transmute(ucontext)).ok() + pub unsafe fn OnError(&self, hwnd: super::super::Foundation::HWND, hr: windows_core::HRESULT, ucontext: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnError)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(hr), core::mem::transmute(ucontext)).ok() } pub unsafe fn GetSummaryInfo(&self, pbstrtext: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSummaryInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrtext)).ok() @@ -15490,11 +15359,8 @@ impl windows_core::RuntimeName for IDsAdminNotifyHandler {} windows_core::imp::define_interface!(IDsBrowseDomainTree, IDsBrowseDomainTree_Vtbl, 0x7cabcf1e_78f5_11d2_960c_00c04fa31a86); windows_core::imp::interface_hierarchy!(IDsBrowseDomainTree, windows_core::IUnknown); impl IDsBrowseDomainTree { - pub unsafe fn BrowseTo(&self, hwndparent: P0, ppsztargetpath: *mut windows_core::PWSTR, dwflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).BrowseTo)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(ppsztargetpath), core::mem::transmute(dwflags)).ok() + pub unsafe fn BrowseTo(&self, hwndparent: super::super::Foundation::HWND, ppsztargetpath: *mut windows_core::PWSTR, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).BrowseTo)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(ppsztargetpath), core::mem::transmute(dwflags)).ok() } pub unsafe fn GetDomains(&self, ppdomaintree: *mut *mut DOMAIN_TREE, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDomains)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdomaintree), core::mem::transmute(dwflags)).ok() @@ -15625,12 +15491,11 @@ impl IDsDisplaySpecifier { { (windows_core::Interface::vtable(self).GetClassCreationInfo)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), core::mem::transmute(ppdscci)).ok() } - pub unsafe fn EnumClassAttributes(&self, pszobjectclass: P0, pcbenum: LPDSENUMATTRIBUTES, lparam: P2) -> windows_core::Result<()> + pub unsafe fn EnumClassAttributes(&self, pszobjectclass: P0, pcbenum: LPDSENUMATTRIBUTES, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).EnumClassAttributes)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), core::mem::transmute(pcbenum), lparam.param().abi()).ok() + (windows_core::Interface::vtable(self).EnumClassAttributes)(windows_core::Interface::as_raw(self), pszobjectclass.param().abi(), core::mem::transmute(pcbenum), core::mem::transmute(lparam)).ok() } pub unsafe fn GetAttributeADsType(&self, pszattributename: P0) -> ADSTYPE where @@ -15746,12 +15611,9 @@ impl IDsObjectPicker { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pinitinfo)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn InvokeDialog(&self, hwndparent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn InvokeDialog(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).InvokeDialog)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).InvokeDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -16116,25 +15978,16 @@ windows_core::imp::define_interface!(IQueryForm, IQueryForm_Vtbl, 0x8cfcee30_39b windows_core::imp::interface_hierarchy!(IQueryForm, windows_core::IUnknown); impl IQueryForm { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn Initialize(&self, hkform: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hkform.param().abi()).ok() + pub unsafe fn Initialize(&self, hkform: super::super::System::Registry::HKEY) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hkform)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn AddForms(&self, paddformsproc: LPCQADDFORMSPROC, lparam: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddForms)(windows_core::Interface::as_raw(self), core::mem::transmute(paddformsproc), lparam.param().abi()).ok() + pub unsafe fn AddForms(&self, paddformsproc: LPCQADDFORMSPROC, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddForms)(windows_core::Interface::as_raw(self), core::mem::transmute(paddformsproc), core::mem::transmute(lparam)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn AddPages(&self, paddpagesproc: LPCQADDPAGESPROC, lparam: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddPages)(windows_core::Interface::as_raw(self), core::mem::transmute(paddpagesproc), lparam.param().abi()).ok() + pub unsafe fn AddPages(&self, paddpagesproc: LPCQADDPAGESPROC, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddPages)(windows_core::Interface::as_raw(self), core::mem::transmute(paddpagesproc), core::mem::transmute(lparam)).ok() } } #[repr(C)] 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 971183957b..97d9413f38 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs @@ -1,295 +1,206 @@ #[inline] -pub unsafe fn AddClusterGroupDependency(hdependentgroup: P0, hprovidergroup: P1) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param
, -{ +pub unsafe fn AddClusterGroupDependency(hdependentgroup: HGROUP, hprovidergroup: HGROUP) -> u32 { windows_targets::link!("clusapi.dll" "system" fn AddClusterGroupDependency(hdependentgroup : HGROUP, hprovidergroup : HGROUP) -> u32); - AddClusterGroupDependency(hdependentgroup.param().abi(), hprovidergroup.param().abi()) + AddClusterGroupDependency(core::mem::transmute(hdependentgroup), core::mem::transmute(hprovidergroup)) } #[inline] -pub unsafe fn AddClusterGroupDependencyEx(hdependentgroup: P0, hprovidergroup: P1, lpszreason: P2) -> u32 +pub unsafe fn AddClusterGroupDependencyEx(hdependentgroup: HGROUP, hprovidergroup: HGROUP, lpszreason: P2) -> u32 where - P0: windows_core::Param
, - P1: windows_core::Param
, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterGroupDependencyEx(hdependentgroup : HGROUP, hprovidergroup : HGROUP, lpszreason : windows_core::PCWSTR) -> u32); - AddClusterGroupDependencyEx(hdependentgroup.param().abi(), hprovidergroup.param().abi(), lpszreason.param().abi()) + AddClusterGroupDependencyEx(core::mem::transmute(hdependentgroup), core::mem::transmute(hprovidergroup), lpszreason.param().abi()) } #[inline] -pub unsafe fn AddClusterGroupSetDependency(hdependentgroupset: P0, hprovidergroupset: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AddClusterGroupSetDependency(hdependentgroupset: HGROUPSET, hprovidergroupset: HGROUPSET) -> u32 { windows_targets::link!("clusapi.dll" "system" fn AddClusterGroupSetDependency(hdependentgroupset : HGROUPSET, hprovidergroupset : HGROUPSET) -> u32); - AddClusterGroupSetDependency(hdependentgroupset.param().abi(), hprovidergroupset.param().abi()) + AddClusterGroupSetDependency(core::mem::transmute(hdependentgroupset), core::mem::transmute(hprovidergroupset)) } #[inline] -pub unsafe fn AddClusterGroupSetDependencyEx(hdependentgroupset: P0, hprovidergroupset: P1, lpszreason: P2) -> u32 +pub unsafe fn AddClusterGroupSetDependencyEx(hdependentgroupset: HGROUPSET, hprovidergroupset: HGROUPSET, lpszreason: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterGroupSetDependencyEx(hdependentgroupset : HGROUPSET, hprovidergroupset : HGROUPSET, lpszreason : windows_core::PCWSTR) -> u32); - AddClusterGroupSetDependencyEx(hdependentgroupset.param().abi(), hprovidergroupset.param().abi(), lpszreason.param().abi()) + AddClusterGroupSetDependencyEx(core::mem::transmute(hdependentgroupset), core::mem::transmute(hprovidergroupset), lpszreason.param().abi()) } #[inline] -pub unsafe fn AddClusterGroupToGroupSetDependency(hdependentgroup: P0, hprovidergroupset: P1) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param, -{ +pub unsafe fn AddClusterGroupToGroupSetDependency(hdependentgroup: HGROUP, hprovidergroupset: HGROUPSET) -> u32 { windows_targets::link!("clusapi.dll" "system" fn AddClusterGroupToGroupSetDependency(hdependentgroup : HGROUP, hprovidergroupset : HGROUPSET) -> u32); - AddClusterGroupToGroupSetDependency(hdependentgroup.param().abi(), hprovidergroupset.param().abi()) + AddClusterGroupToGroupSetDependency(core::mem::transmute(hdependentgroup), core::mem::transmute(hprovidergroupset)) } #[inline] -pub unsafe fn AddClusterGroupToGroupSetDependencyEx(hdependentgroup: P0, hprovidergroupset: P1, lpszreason: P2) -> u32 +pub unsafe fn AddClusterGroupToGroupSetDependencyEx(hdependentgroup: HGROUP, hprovidergroupset: HGROUPSET, lpszreason: P2) -> u32 where - P0: windows_core::Param
, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterGroupToGroupSetDependencyEx(hdependentgroup : HGROUP, hprovidergroupset : HGROUPSET, lpszreason : windows_core::PCWSTR) -> u32); - AddClusterGroupToGroupSetDependencyEx(hdependentgroup.param().abi(), hprovidergroupset.param().abi(), lpszreason.param().abi()) + AddClusterGroupToGroupSetDependencyEx(core::mem::transmute(hdependentgroup), core::mem::transmute(hprovidergroupset), lpszreason.param().abi()) } #[inline] -pub unsafe fn AddClusterNode(hcluster: P0, lpsznodename: P1, pfnprogresscallback: PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>) -> HNODE +pub unsafe fn AddClusterNode(hcluster: HCLUSTER, lpsznodename: P1, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> HNODE where - P0: windows_core::Param, 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(), core::mem::transmute(pfnprogresscallback), core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) + AddClusterNode(core::mem::transmute(hcluster), lpsznodename.param().abi(), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn AddClusterNodeEx(hcluster: P0, lpsznodename: P1, dwflags: u32, pfnprogresscallback: PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>) -> HNODE +pub unsafe fn AddClusterNodeEx(hcluster: HCLUSTER, lpsznodename: P1, dwflags: u32, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> HNODE where - P0: windows_core::Param, 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(), core::mem::transmute(dwflags), core::mem::transmute(pfnprogresscallback), core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) + AddClusterNodeEx(core::mem::transmute(hcluster), lpsznodename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn AddClusterResourceDependency(hresource: P0, hdependson: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AddClusterResourceDependency(hresource: HRESOURCE, hdependson: HRESOURCE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn AddClusterResourceDependency(hresource : HRESOURCE, hdependson : HRESOURCE) -> u32); - AddClusterResourceDependency(hresource.param().abi(), hdependson.param().abi()) + AddClusterResourceDependency(core::mem::transmute(hresource), core::mem::transmute(hdependson)) } #[inline] -pub unsafe fn AddClusterResourceDependencyEx(hresource: P0, hdependson: P1, lpszreason: P2) -> u32 +pub unsafe fn AddClusterResourceDependencyEx(hresource: HRESOURCE, hdependson: HRESOURCE, lpszreason: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterResourceDependencyEx(hresource : HRESOURCE, hdependson : HRESOURCE, lpszreason : windows_core::PCWSTR) -> u32); - AddClusterResourceDependencyEx(hresource.param().abi(), hdependson.param().abi(), lpszreason.param().abi()) + AddClusterResourceDependencyEx(core::mem::transmute(hresource), core::mem::transmute(hdependson), lpszreason.param().abi()) } #[inline] -pub unsafe fn AddClusterResourceNode(hresource: P0, hnode: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AddClusterResourceNode(hresource: HRESOURCE, hnode: HNODE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn AddClusterResourceNode(hresource : HRESOURCE, hnode : HNODE) -> u32); - AddClusterResourceNode(hresource.param().abi(), hnode.param().abi()) + AddClusterResourceNode(core::mem::transmute(hresource), core::mem::transmute(hnode)) } #[inline] -pub unsafe fn AddClusterResourceNodeEx(hresource: P0, hnode: P1, lpszreason: P2) -> u32 +pub unsafe fn AddClusterResourceNodeEx(hresource: HRESOURCE, hnode: HNODE, lpszreason: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterResourceNodeEx(hresource : HRESOURCE, hnode : HNODE, lpszreason : windows_core::PCWSTR) -> u32); - AddClusterResourceNodeEx(hresource.param().abi(), hnode.param().abi(), lpszreason.param().abi()) + AddClusterResourceNodeEx(core::mem::transmute(hresource), core::mem::transmute(hnode), lpszreason.param().abi()) } #[inline] -pub unsafe fn AddClusterStorageNode(hcluster: P0, lpsznodename: P1, pfnprogresscallback: PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>, lpszclusterstoragenodedescription: P4, lpszclusterstoragenodelocation: P5) -> u32 +pub unsafe fn AddClusterStorageNode(hcluster: HCLUSTER, lpsznodename: P1, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>, lpszclusterstoragenodedescription: P4, lpszclusterstoragenodelocation: P5) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P4: windows_core::Param, P5: 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(), core::mem::transmute(pfnprogresscallback), core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null())), lpszclusterstoragenodedescription.param().abi(), lpszclusterstoragenodelocation.param().abi()) + AddClusterStorageNode(core::mem::transmute(hcluster), lpsznodename.param().abi(), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed())), lpszclusterstoragenodedescription.param().abi(), lpszclusterstoragenodelocation.param().abi()) } #[inline] -pub unsafe fn AddCrossClusterGroupSetDependency(hdependentgroupset: P0, lpremoteclustername: P1, lpremotegroupsetname: P2) -> u32 +pub unsafe fn AddCrossClusterGroupSetDependency(hdependentgroupset: HGROUPSET, lpremoteclustername: P1, lpremotegroupsetname: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddCrossClusterGroupSetDependency(hdependentgroupset : HGROUPSET, lpremoteclustername : windows_core::PCWSTR, lpremotegroupsetname : windows_core::PCWSTR) -> u32); - AddCrossClusterGroupSetDependency(hdependentgroupset.param().abi(), lpremoteclustername.param().abi(), lpremotegroupsetname.param().abi()) + AddCrossClusterGroupSetDependency(core::mem::transmute(hdependentgroupset), lpremoteclustername.param().abi(), lpremotegroupsetname.param().abi()) } #[inline] -pub unsafe fn AddResourceToClusterSharedVolumes(hresource: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn AddResourceToClusterSharedVolumes(hresource: HRESOURCE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn AddResourceToClusterSharedVolumes(hresource : HRESOURCE) -> u32); - AddResourceToClusterSharedVolumes(hresource.param().abi()) + AddResourceToClusterSharedVolumes(core::mem::transmute(hresource)) } #[inline] -pub unsafe fn BackupClusterDatabase(hcluster: P0, lpszpathname: P1) -> u32 +pub unsafe fn BackupClusterDatabase(hcluster: HCLUSTER, lpszpathname: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn BackupClusterDatabase(hcluster : HCLUSTER, lpszpathname : windows_core::PCWSTR) -> u32); - BackupClusterDatabase(hcluster.param().abi(), lpszpathname.param().abi()) + BackupClusterDatabase(core::mem::transmute(hcluster), lpszpathname.param().abi()) } #[inline] -pub unsafe fn CanResourceBeDependent(hresource: P0, hresourcedependent: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CanResourceBeDependent(hresource: HRESOURCE, hresourcedependent: HRESOURCE) -> super::super::Foundation::BOOL { windows_targets::link!("clusapi.dll" "system" fn CanResourceBeDependent(hresource : HRESOURCE, hresourcedependent : HRESOURCE) -> super::super::Foundation:: BOOL); - CanResourceBeDependent(hresource.param().abi(), hresourcedependent.param().abi()) + CanResourceBeDependent(core::mem::transmute(hresource), core::mem::transmute(hresourcedependent)) } #[inline] -pub unsafe fn CancelClusterGroupOperation(hgroup: P0, dwcancelflags_reserved: u32) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn CancelClusterGroupOperation(hgroup: HGROUP, dwcancelflags_reserved: u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn CancelClusterGroupOperation(hgroup : HGROUP, dwcancelflags_reserved : u32) -> u32); - CancelClusterGroupOperation(hgroup.param().abi(), core::mem::transmute(dwcancelflags_reserved)) + CancelClusterGroupOperation(core::mem::transmute(hgroup), core::mem::transmute(dwcancelflags_reserved)) } #[inline] -pub unsafe fn ChangeClusterResourceGroup(hresource: P0, hgroup: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param
, -{ +pub unsafe fn ChangeClusterResourceGroup(hresource: HRESOURCE, hgroup: HGROUP) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ChangeClusterResourceGroup(hresource : HRESOURCE, hgroup : HGROUP) -> u32); - ChangeClusterResourceGroup(hresource.param().abi(), hgroup.param().abi()) + ChangeClusterResourceGroup(core::mem::transmute(hresource), core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn ChangeClusterResourceGroupEx(hresource: P0, hgroup: P1, flags: u64) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param
, -{ +pub unsafe fn ChangeClusterResourceGroupEx(hresource: HRESOURCE, hgroup: HGROUP, flags: u64) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ChangeClusterResourceGroupEx(hresource : HRESOURCE, hgroup : HGROUP, flags : u64) -> u32); - ChangeClusterResourceGroupEx(hresource.param().abi(), hgroup.param().abi(), core::mem::transmute(flags)) + ChangeClusterResourceGroupEx(core::mem::transmute(hresource), core::mem::transmute(hgroup), core::mem::transmute(flags)) } #[inline] -pub unsafe fn ChangeClusterResourceGroupEx2(hresource: P0, hgroup: P1, flags: u64, lpszreason: P3) -> u32 +pub unsafe fn ChangeClusterResourceGroupEx2(hresource: HRESOURCE, hgroup: HGROUP, flags: u64, lpszreason: P3) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param
, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ChangeClusterResourceGroupEx2(hresource : HRESOURCE, hgroup : HGROUP, flags : u64, lpszreason : windows_core::PCWSTR) -> u32); - ChangeClusterResourceGroupEx2(hresource.param().abi(), hgroup.param().abi(), core::mem::transmute(flags), lpszreason.param().abi()) + ChangeClusterResourceGroupEx2(core::mem::transmute(hresource), core::mem::transmute(hgroup), core::mem::transmute(flags), lpszreason.param().abi()) } #[inline] -pub unsafe fn CloseCluster(hcluster: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CloseCluster(hcluster: HCLUSTER) -> super::super::Foundation::BOOL { windows_targets::link!("clusapi.dll" "system" fn CloseCluster(hcluster : HCLUSTER) -> super::super::Foundation:: BOOL); - CloseCluster(hcluster.param().abi()) + CloseCluster(core::mem::transmute(hcluster)) } #[inline] -pub unsafe fn CloseClusterCryptProvider(hcluscryptprovider: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn CloseClusterCryptProvider(hcluscryptprovider: HCLUSCRYPTPROVIDER) -> u32 { windows_targets::link!("resutils.dll" "system" fn CloseClusterCryptProvider(hcluscryptprovider : HCLUSCRYPTPROVIDER) -> u32); - CloseClusterCryptProvider(hcluscryptprovider.param().abi()) + CloseClusterCryptProvider(core::mem::transmute(hcluscryptprovider)) } #[inline] -pub unsafe fn CloseClusterGroup(hgroup: P0) -> windows_core::Result<()> -where - P0: windows_core::Param
, -{ +pub unsafe fn CloseClusterGroup(hgroup: HGROUP) -> windows_core::Result<()> { windows_targets::link!("clusapi.dll" "system" fn CloseClusterGroup(hgroup : HGROUP) -> super::super::Foundation:: BOOL); - CloseClusterGroup(hgroup.param().abi()).ok() + CloseClusterGroup(core::mem::transmute(hgroup)).ok() } #[inline] -pub unsafe fn CloseClusterGroupSet(hgroupset: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseClusterGroupSet(hgroupset: HGROUPSET) -> windows_core::Result<()> { windows_targets::link!("clusapi.dll" "system" fn CloseClusterGroupSet(hgroupset : HGROUPSET) -> super::super::Foundation:: BOOL); - CloseClusterGroupSet(hgroupset.param().abi()).ok() + CloseClusterGroupSet(core::mem::transmute(hgroupset)).ok() } #[inline] -pub unsafe fn CloseClusterNetInterface(hnetinterface: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseClusterNetInterface(hnetinterface: HNETINTERFACE) -> windows_core::Result<()> { windows_targets::link!("clusapi.dll" "system" fn CloseClusterNetInterface(hnetinterface : HNETINTERFACE) -> super::super::Foundation:: BOOL); - CloseClusterNetInterface(hnetinterface.param().abi()).ok() + CloseClusterNetInterface(core::mem::transmute(hnetinterface)).ok() } #[inline] -pub unsafe fn CloseClusterNetwork(hnetwork: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseClusterNetwork(hnetwork: HNETWORK) -> windows_core::Result<()> { windows_targets::link!("clusapi.dll" "system" fn CloseClusterNetwork(hnetwork : HNETWORK) -> super::super::Foundation:: BOOL); - CloseClusterNetwork(hnetwork.param().abi()).ok() + CloseClusterNetwork(core::mem::transmute(hnetwork)).ok() } #[inline] -pub unsafe fn CloseClusterNode(hnode: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseClusterNode(hnode: HNODE) -> windows_core::Result<()> { windows_targets::link!("clusapi.dll" "system" fn CloseClusterNode(hnode : HNODE) -> super::super::Foundation:: BOOL); - CloseClusterNode(hnode.param().abi()).ok() + CloseClusterNode(core::mem::transmute(hnode)).ok() } #[inline] -pub unsafe fn CloseClusterNotifyPort(hchange: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CloseClusterNotifyPort(hchange: HCHANGE) -> super::super::Foundation::BOOL { windows_targets::link!("clusapi.dll" "system" fn CloseClusterNotifyPort(hchange : HCHANGE) -> super::super::Foundation:: BOOL); - CloseClusterNotifyPort(hchange.param().abi()) + CloseClusterNotifyPort(core::mem::transmute(hchange)) } #[inline] -pub unsafe fn CloseClusterResource(hresource: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseClusterResource(hresource: HRESOURCE) -> windows_core::Result<()> { windows_targets::link!("clusapi.dll" "system" fn CloseClusterResource(hresource : HRESOURCE) -> super::super::Foundation:: BOOL); - CloseClusterResource(hresource.param().abi()).ok() + CloseClusterResource(core::mem::transmute(hresource)).ok() } #[inline] -pub unsafe fn ClusAddClusterHealthFault(hcluster: P0, failure: *const CLUSTER_HEALTH_FAULT, param2: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusAddClusterHealthFault(hcluster: HCLUSTER, failure: *const CLUSTER_HEALTH_FAULT, param2: u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ClusAddClusterHealthFault(hcluster : HCLUSTER, failure : *const CLUSTER_HEALTH_FAULT, param2 : u32) -> u32); - ClusAddClusterHealthFault(hcluster.param().abi(), core::mem::transmute(failure), core::mem::transmute(param2)) + ClusAddClusterHealthFault(core::mem::transmute(hcluster), core::mem::transmute(failure), core::mem::transmute(param2)) } #[inline] -pub unsafe fn ClusGetClusterHealthFaults(hcluster: P0, objects: *mut CLUSTER_HEALTH_FAULT_ARRAY, flags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusGetClusterHealthFaults(hcluster: HCLUSTER, objects: *mut CLUSTER_HEALTH_FAULT_ARRAY, flags: u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ClusGetClusterHealthFaults(hcluster : HCLUSTER, objects : *mut CLUSTER_HEALTH_FAULT_ARRAY, flags : u32) -> u32); - ClusGetClusterHealthFaults(hcluster.param().abi(), core::mem::transmute(objects), core::mem::transmute(flags)) + ClusGetClusterHealthFaults(core::mem::transmute(hcluster), core::mem::transmute(objects), core::mem::transmute(flags)) } #[inline] -pub unsafe fn ClusRemoveClusterHealthFault(hcluster: P0, id: P1, flags: u32) -> u32 +pub unsafe fn ClusRemoveClusterHealthFault(hcluster: HCLUSTER, id: P1, flags: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ClusRemoveClusterHealthFault(hcluster : HCLUSTER, id : windows_core::PCWSTR, flags : u32) -> u32); - ClusRemoveClusterHealthFault(hcluster.param().abi(), id.param().abi(), core::mem::transmute(flags)) + ClusRemoveClusterHealthFault(core::mem::transmute(hcluster), id.param().abi(), core::mem::transmute(flags)) } #[inline] pub unsafe fn ClusWorkerCheckTerminate(lpworker: *mut CLUS_WORKER) -> super::super::Foundation::BOOL { @@ -328,52 +239,38 @@ pub unsafe fn ClusapiSetReasonHandler(lphandler: *const CLUSAPI_REASON_HANDLER) ClusapiSetReasonHandler(core::mem::transmute(lphandler)) } #[inline] -pub unsafe fn ClusterAddGroupToAffinityRule(hcluster: P0, rulename: P1, hgroup: P2) -> u32 +pub unsafe fn ClusterAddGroupToAffinityRule(hcluster: HCLUSTER, rulename: P1, hgroup: HGROUP) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param
, { windows_targets::link!("clusapi.dll" "system" fn ClusterAddGroupToAffinityRule(hcluster : HCLUSTER, rulename : windows_core::PCWSTR, hgroup : HGROUP) -> u32); - ClusterAddGroupToAffinityRule(hcluster.param().abi(), rulename.param().abi(), hgroup.param().abi()) + ClusterAddGroupToAffinityRule(core::mem::transmute(hcluster), rulename.param().abi(), core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn ClusterAddGroupToGroupSet(hgroupset: P0, hgroup: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param
, -{ +pub unsafe fn ClusterAddGroupToGroupSet(hgroupset: HGROUPSET, hgroup: HGROUP) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterAddGroupToGroupSet(hgroupset : HGROUPSET, hgroup : HGROUP) -> u32); - ClusterAddGroupToGroupSet(hgroupset.param().abi(), hgroup.param().abi()) + ClusterAddGroupToGroupSet(core::mem::transmute(hgroupset), core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn ClusterAddGroupToGroupSetWithDomains(hgroupset: P0, hgroup: P1, faultdomain: u32, updatedomain: u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param
, -{ +pub unsafe fn ClusterAddGroupToGroupSetWithDomains(hgroupset: HGROUPSET, hgroup: HGROUP, faultdomain: u32, updatedomain: u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterAddGroupToGroupSetWithDomains(hgroupset : HGROUPSET, hgroup : HGROUP, faultdomain : u32, updatedomain : u32) -> u32); - ClusterAddGroupToGroupSetWithDomains(hgroupset.param().abi(), hgroup.param().abi(), core::mem::transmute(faultdomain), core::mem::transmute(updatedomain)) + ClusterAddGroupToGroupSetWithDomains(core::mem::transmute(hgroupset), core::mem::transmute(hgroup), core::mem::transmute(faultdomain), core::mem::transmute(updatedomain)) } #[inline] -pub unsafe fn ClusterAddGroupToGroupSetWithDomainsEx(hgroupset: P0, hgroup: P1, faultdomain: u32, updatedomain: u32, lpszreason: P4) -> u32 +pub unsafe fn ClusterAddGroupToGroupSetWithDomainsEx(hgroupset: HGROUPSET, hgroup: HGROUP, faultdomain: u32, updatedomain: u32, lpszreason: P4) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param
, P4: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterAddGroupToGroupSetWithDomainsEx(hgroupset : HGROUPSET, hgroup : HGROUP, faultdomain : u32, updatedomain : u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterAddGroupToGroupSetWithDomainsEx(hgroupset.param().abi(), hgroup.param().abi(), core::mem::transmute(faultdomain), core::mem::transmute(updatedomain), lpszreason.param().abi()) + ClusterAddGroupToGroupSetWithDomainsEx(core::mem::transmute(hgroupset), core::mem::transmute(hgroup), core::mem::transmute(faultdomain), core::mem::transmute(updatedomain), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterAffinityRuleControl(hcluster: P0, affinityrulename: P1, hhostnode: P2, 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 +pub unsafe fn ClusterAffinityRuleControl(hcluster: HCLUSTER, affinityrulename: P1, hhostnode: Option, 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 where - P0: windows_core::Param, P1: windows_core::Param, - 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterAffinityRuleControl(core::mem::transmute(hcluster), affinityrulename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ClusterClearBackupStateForSharedVolume(lpszvolumepathname: P0) -> u32 @@ -384,96 +281,65 @@ where ClusterClearBackupStateForSharedVolume(lpszvolumepathname.param().abi()) } #[inline] -pub unsafe fn ClusterCloseEnum(henum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterCloseEnum(henum: HCLUSENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterCloseEnum(henum : HCLUSENUM) -> u32); - ClusterCloseEnum(henum.param().abi()) + ClusterCloseEnum(core::mem::transmute(henum)) } #[inline] -pub unsafe fn ClusterCloseEnumEx(hclusterenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterCloseEnumEx(hclusterenum: HCLUSENUMEX) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterCloseEnumEx(hclusterenum : HCLUSENUMEX) -> u32); - ClusterCloseEnumEx(hclusterenum.param().abi()) + ClusterCloseEnumEx(core::mem::transmute(hclusterenum)) } #[inline] -pub unsafe fn ClusterControl(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>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ClusterControl(hcluster: HCLUSTER, hhostnode: Option, 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 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterControl(core::mem::transmute(hcluster), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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: P8) -> u32 +pub unsafe fn ClusterControlEx(hcluster: HCLUSTER, hhostnode: Option, 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: P8) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P8: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterControlEx(core::mem::transmute(hcluster), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterCreateAffinityRule(hcluster: P0, rulename: P1, ruletype: CLUS_AFFINITY_RULE_TYPE) -> u32 +pub unsafe fn ClusterCreateAffinityRule(hcluster: HCLUSTER, rulename: P1, ruletype: CLUS_AFFINITY_RULE_TYPE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterCreateAffinityRule(hcluster : HCLUSTER, rulename : windows_core::PCWSTR, ruletype : CLUS_AFFINITY_RULE_TYPE) -> u32); - ClusterCreateAffinityRule(hcluster.param().abi(), rulename.param().abi(), core::mem::transmute(ruletype)) + ClusterCreateAffinityRule(core::mem::transmute(hcluster), rulename.param().abi(), core::mem::transmute(ruletype)) } #[inline] -pub unsafe fn ClusterDecrypt(hcluscryptprovider: P0, pcryptinput: *const u8, cbcryptinput: u32, ppcryptoutput: *mut *mut u8, pcbcryptoutput: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterDecrypt(hcluscryptprovider: HCLUSCRYPTPROVIDER, pcryptinput: *const u8, cbcryptinput: u32, ppcryptoutput: *mut *mut u8, pcbcryptoutput: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ClusterDecrypt(hcluscryptprovider : HCLUSCRYPTPROVIDER, pcryptinput : *const u8, cbcryptinput : u32, ppcryptoutput : *mut *mut u8, pcbcryptoutput : *mut u32) -> u32); - ClusterDecrypt(hcluscryptprovider.param().abi(), core::mem::transmute(pcryptinput), core::mem::transmute(cbcryptinput), core::mem::transmute(ppcryptoutput), core::mem::transmute(pcbcryptoutput)) + ClusterDecrypt(core::mem::transmute(hcluscryptprovider), core::mem::transmute(pcryptinput), core::mem::transmute(cbcryptinput), core::mem::transmute(ppcryptoutput), core::mem::transmute(pcbcryptoutput)) } #[inline] -pub unsafe fn ClusterEncrypt(hcluscryptprovider: P0, pdata: &[u8], ppdata: *mut *mut u8, pcbdata: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterEncrypt(hcluscryptprovider: HCLUSCRYPTPROVIDER, pdata: &[u8], ppdata: *mut *mut u8, pcbdata: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ClusterEncrypt(hcluscryptprovider : HCLUSCRYPTPROVIDER, pdata : *const u8, cbdata : u32, ppdata : *mut *mut u8, pcbdata : *mut u32) -> u32); - ClusterEncrypt(hcluscryptprovider.param().abi(), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), core::mem::transmute(ppdata), core::mem::transmute(pcbdata)) + ClusterEncrypt(core::mem::transmute(hcluscryptprovider), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), core::mem::transmute(ppdata), core::mem::transmute(pcbdata)) } #[inline] -pub unsafe fn ClusterEnum(henum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterEnum(henum: HCLUSENUM, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterEnum(henum : HCLUSENUM, dwindex : u32, lpdwtype : *mut u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - ClusterEnum(henum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) + ClusterEnum(core::mem::transmute(henum), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } #[inline] -pub unsafe fn ClusterEnumEx(hclusterenum: P0, dwindex: u32, pitem: *mut CLUSTER_ENUM_ITEM, cbitem: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterEnumEx(hclusterenum: HCLUSENUMEX, dwindex: u32, pitem: *mut CLUSTER_ENUM_ITEM, cbitem: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterEnumEx(hclusterenum : HCLUSENUMEX, dwindex : u32, pitem : *mut CLUSTER_ENUM_ITEM, cbitem : *mut u32) -> u32); - ClusterEnumEx(hclusterenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pitem), core::mem::transmute(cbitem)) + ClusterEnumEx(core::mem::transmute(hclusterenum), core::mem::transmute(dwindex), core::mem::transmute(pitem), core::mem::transmute(cbitem)) } #[inline] -pub unsafe fn ClusterGetEnumCount(henum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGetEnumCount(henum: HCLUSENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGetEnumCount(henum : HCLUSENUM) -> u32); - ClusterGetEnumCount(henum.param().abi()) + ClusterGetEnumCount(core::mem::transmute(henum)) } #[inline] -pub unsafe fn ClusterGetEnumCountEx(hclusterenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGetEnumCountEx(hclusterenum: HCLUSENUMEX) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGetEnumCountEx(hclusterenum : HCLUSENUMEX) -> u32); - ClusterGetEnumCountEx(hclusterenum.param().abi()) + ClusterGetEnumCountEx(core::mem::transmute(hclusterenum)) } #[inline] pub unsafe fn ClusterGetVolumeNameForVolumeMountPoint(lpszvolumemountpoint: P0, lpszvolumename: windows_core::PWSTR, cchbufferlength: u32) -> windows_core::Result<()> @@ -492,140 +358,94 @@ where ClusterGetVolumePathName(lpszfilename.param().abi(), core::mem::transmute(lpszvolumepathname), core::mem::transmute(cchbufferlength)).ok() } #[inline] -pub unsafe fn ClusterGroupCloseEnum(hgroupenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupCloseEnum(hgroupenum: HGROUPENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupCloseEnum(hgroupenum : HGROUPENUM) -> u32); - ClusterGroupCloseEnum(hgroupenum.param().abi()) + ClusterGroupCloseEnum(core::mem::transmute(hgroupenum)) } #[inline] -pub unsafe fn ClusterGroupCloseEnumEx(hgroupenumex: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupCloseEnumEx(hgroupenumex: HGROUPENUMEX) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupCloseEnumEx(hgroupenumex : HGROUPENUMEX) -> u32); - ClusterGroupCloseEnumEx(hgroupenumex.param().abi()) + ClusterGroupCloseEnumEx(core::mem::transmute(hgroupenumex)) } #[inline] -pub unsafe fn ClusterGroupControl(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>) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param, -{ +pub unsafe fn ClusterGroupControl(hgroup: HGROUP, hhostnode: Option, 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 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterGroupControl(core::mem::transmute(hgroup), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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: P8) -> u32 +pub unsafe fn ClusterGroupControlEx(hgroup: HGROUP, hhostnode: Option, 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: P8) -> u32 where - P0: windows_core::Param
, - P1: windows_core::Param, P8: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterGroupControlEx(core::mem::transmute(hgroup), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterGroupEnum(hgroupenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszresourcename: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupEnum(hgroupenum: HGROUPENUM, dwindex: u32, lpdwtype: *mut u32, lpszresourcename: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupEnum(hgroupenum : HGROUPENUM, dwindex : u32, lpdwtype : *mut u32, lpszresourcename : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - ClusterGroupEnum(hgroupenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszresourcename), core::mem::transmute(lpcchname)) + ClusterGroupEnum(core::mem::transmute(hgroupenum), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszresourcename), core::mem::transmute(lpcchname)) } #[inline] -pub unsafe fn ClusterGroupEnumEx(hgroupenumex: P0, dwindex: u32, pitem: *mut CLUSTER_GROUP_ENUM_ITEM, cbitem: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupEnumEx(hgroupenumex: HGROUPENUMEX, dwindex: u32, pitem: *mut CLUSTER_GROUP_ENUM_ITEM, cbitem: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupEnumEx(hgroupenumex : HGROUPENUMEX, dwindex : u32, pitem : *mut CLUSTER_GROUP_ENUM_ITEM, cbitem : *mut u32) -> u32); - ClusterGroupEnumEx(hgroupenumex.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pitem), core::mem::transmute(cbitem)) + ClusterGroupEnumEx(core::mem::transmute(hgroupenumex), core::mem::transmute(dwindex), core::mem::transmute(pitem), core::mem::transmute(cbitem)) } #[inline] -pub unsafe fn ClusterGroupGetEnumCount(hgroupenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupGetEnumCount(hgroupenum: HGROUPENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupGetEnumCount(hgroupenum : HGROUPENUM) -> u32); - ClusterGroupGetEnumCount(hgroupenum.param().abi()) + ClusterGroupGetEnumCount(core::mem::transmute(hgroupenum)) } #[inline] -pub unsafe fn ClusterGroupGetEnumCountEx(hgroupenumex: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupGetEnumCountEx(hgroupenumex: HGROUPENUMEX) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupGetEnumCountEx(hgroupenumex : HGROUPENUMEX) -> u32); - ClusterGroupGetEnumCountEx(hgroupenumex.param().abi()) + ClusterGroupGetEnumCountEx(core::mem::transmute(hgroupenumex)) } #[inline] -pub unsafe fn ClusterGroupOpenEnum(hgroup: P0, dwtype: u32) -> HGROUPENUM -where - P0: windows_core::Param
, -{ +pub unsafe fn ClusterGroupOpenEnum(hgroup: HGROUP, dwtype: u32) -> HGROUPENUM { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupOpenEnum(hgroup : HGROUP, dwtype : u32) -> HGROUPENUM); - ClusterGroupOpenEnum(hgroup.param().abi(), core::mem::transmute(dwtype)) + ClusterGroupOpenEnum(core::mem::transmute(hgroup), core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn ClusterGroupOpenEnumEx(hcluster: P0, lpszproperties: P1, cbproperties: u32, lpszroproperties: P3, cbroproperties: u32, dwflags: u32) -> HGROUPENUMEX +pub unsafe fn ClusterGroupOpenEnumEx(hcluster: HCLUSTER, lpszproperties: P1, cbproperties: u32, lpszroproperties: P3, cbroproperties: u32, dwflags: u32) -> HGROUPENUMEX where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupOpenEnumEx(hcluster : HCLUSTER, lpszproperties : windows_core::PCWSTR, cbproperties : u32, lpszroproperties : windows_core::PCWSTR, cbroproperties : u32, dwflags : u32) -> HGROUPENUMEX); - ClusterGroupOpenEnumEx(hcluster.param().abi(), lpszproperties.param().abi(), core::mem::transmute(cbproperties), lpszroproperties.param().abi(), core::mem::transmute(cbroproperties), core::mem::transmute(dwflags)) + ClusterGroupOpenEnumEx(core::mem::transmute(hcluster), lpszproperties.param().abi(), core::mem::transmute(cbproperties), lpszroproperties.param().abi(), core::mem::transmute(cbroproperties), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn ClusterGroupSetCloseEnum(hgroupsetenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupSetCloseEnum(hgroupsetenum: HGROUPSETENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupSetCloseEnum(hgroupsetenum : HGROUPSETENUM) -> u32); - ClusterGroupSetCloseEnum(hgroupsetenum.param().abi()) + ClusterGroupSetCloseEnum(core::mem::transmute(hgroupsetenum)) } #[inline] -pub unsafe fn ClusterGroupSetControl(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>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ClusterGroupSetControl(hgroupset: HGROUPSET, hhostnode: Option, 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 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterGroupSetControl(core::mem::transmute(hgroupset), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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: P8) -> u32 +pub unsafe fn ClusterGroupSetControlEx(hgroupset: HGROUPSET, hhostnode: Option, 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: P8) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P8: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterGroupSetControlEx(core::mem::transmute(hgroupset), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterGroupSetEnum(hgroupsetenum: P0, dwindex: u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupSetEnum(hgroupsetenum: HGROUPSETENUM, dwindex: u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupSetEnum(hgroupsetenum : HGROUPSETENUM, dwindex : u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - ClusterGroupSetEnum(hgroupsetenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) + ClusterGroupSetEnum(core::mem::transmute(hgroupsetenum), core::mem::transmute(dwindex), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } #[inline] -pub unsafe fn ClusterGroupSetGetEnumCount(hgroupsetenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupSetGetEnumCount(hgroupsetenum: HGROUPSETENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupSetGetEnumCount(hgroupsetenum : HGROUPSETENUM) -> u32); - ClusterGroupSetGetEnumCount(hgroupsetenum.param().abi()) + ClusterGroupSetGetEnumCount(core::mem::transmute(hgroupsetenum)) } #[inline] -pub unsafe fn ClusterGroupSetOpenEnum(hcluster: P0) -> HGROUPSETENUM -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterGroupSetOpenEnum(hcluster: HCLUSTER) -> HGROUPSETENUM { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupSetOpenEnum(hcluster : HCLUSTER) -> HGROUPSETENUM); - ClusterGroupSetOpenEnum(hcluster.param().abi()) + ClusterGroupSetOpenEnum(core::mem::transmute(hcluster)) } #[inline] pub unsafe fn ClusterIsPathOnSharedVolume(lpszpathname: P0) -> super::super::Foundation::BOOL @@ -636,209 +456,141 @@ where ClusterIsPathOnSharedVolume(lpszpathname.param().abi()) } #[inline] -pub unsafe fn ClusterNetInterfaceCloseEnum(hnetinterfaceenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNetInterfaceCloseEnum(hnetinterfaceenum: HNETINTERFACEENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNetInterfaceCloseEnum(hnetinterfaceenum : HNETINTERFACEENUM) -> u32); - ClusterNetInterfaceCloseEnum(hnetinterfaceenum.param().abi()) + ClusterNetInterfaceCloseEnum(core::mem::transmute(hnetinterfaceenum)) } #[inline] -pub unsafe fn ClusterNetInterfaceControl(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>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ClusterNetInterfaceControl(hnetinterface: HNETINTERFACE, hhostnode: Option, 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 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterNetInterfaceControl(core::mem::transmute(hnetinterface), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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: P8) -> u32 +pub unsafe fn ClusterNetInterfaceControlEx(hnetinterface: HNETINTERFACE, hhostnode: Option, 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: P8) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P8: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterNetInterfaceControlEx(core::mem::transmute(hnetinterface), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterNetInterfaceEnum(hnetinterfaceenum: P0, dwindex: u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNetInterfaceEnum(hnetinterfaceenum: HNETINTERFACEENUM, dwindex: u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNetInterfaceEnum(hnetinterfaceenum : HNETINTERFACEENUM, dwindex : u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - ClusterNetInterfaceEnum(hnetinterfaceenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) + ClusterNetInterfaceEnum(core::mem::transmute(hnetinterfaceenum), core::mem::transmute(dwindex), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } #[inline] -pub unsafe fn ClusterNetInterfaceOpenEnum(hcluster: P0, lpsznodename: P1, lpsznetworkname: P2) -> HNETINTERFACEENUM +pub unsafe fn ClusterNetInterfaceOpenEnum(hcluster: HCLUSTER, lpsznodename: P1, lpsznetworkname: P2) -> HNETINTERFACEENUM where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNetInterfaceOpenEnum(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, lpsznetworkname : windows_core::PCWSTR) -> HNETINTERFACEENUM); - ClusterNetInterfaceOpenEnum(hcluster.param().abi(), lpsznodename.param().abi(), lpsznetworkname.param().abi()) + ClusterNetInterfaceOpenEnum(core::mem::transmute(hcluster), lpsznodename.param().abi(), lpsznetworkname.param().abi()) } #[inline] -pub unsafe fn ClusterNetworkCloseEnum(hnetworkenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNetworkCloseEnum(hnetworkenum: HNETWORKENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNetworkCloseEnum(hnetworkenum : HNETWORKENUM) -> u32); - ClusterNetworkCloseEnum(hnetworkenum.param().abi()) + ClusterNetworkCloseEnum(core::mem::transmute(hnetworkenum)) } #[inline] -pub unsafe fn ClusterNetworkControl(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>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ClusterNetworkControl(hnetwork: HNETWORK, hhostnode: Option, 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 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterNetworkControl(core::mem::transmute(hnetwork), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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: P8) -> u32 +pub unsafe fn ClusterNetworkControlEx(hnetwork: HNETWORK, hhostnode: Option, 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: P8) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P8: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterNetworkControlEx(core::mem::transmute(hnetwork), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterNetworkEnum(hnetworkenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNetworkEnum(hnetworkenum: HNETWORKENUM, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNetworkEnum(hnetworkenum : HNETWORKENUM, dwindex : u32, lpdwtype : *mut u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - ClusterNetworkEnum(hnetworkenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) + ClusterNetworkEnum(core::mem::transmute(hnetworkenum), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } #[inline] -pub unsafe fn ClusterNetworkGetEnumCount(hnetworkenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNetworkGetEnumCount(hnetworkenum: HNETWORKENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNetworkGetEnumCount(hnetworkenum : HNETWORKENUM) -> u32); - ClusterNetworkGetEnumCount(hnetworkenum.param().abi()) + ClusterNetworkGetEnumCount(core::mem::transmute(hnetworkenum)) } #[inline] -pub unsafe fn ClusterNetworkOpenEnum(hnetwork: P0, dwtype: u32) -> HNETWORKENUM -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNetworkOpenEnum(hnetwork: HNETWORK, dwtype: u32) -> HNETWORKENUM { windows_targets::link!("clusapi.dll" "system" fn ClusterNetworkOpenEnum(hnetwork : HNETWORK, dwtype : u32) -> HNETWORKENUM); - ClusterNetworkOpenEnum(hnetwork.param().abi(), core::mem::transmute(dwtype)) + ClusterNetworkOpenEnum(core::mem::transmute(hnetwork), core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn ClusterNodeCloseEnum(hnodeenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNodeCloseEnum(hnodeenum: HNODEENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeCloseEnum(hnodeenum : HNODEENUM) -> u32); - ClusterNodeCloseEnum(hnodeenum.param().abi()) + ClusterNodeCloseEnum(core::mem::transmute(hnodeenum)) } #[inline] -pub unsafe fn ClusterNodeCloseEnumEx(hnodeenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNodeCloseEnumEx(hnodeenum: HNODEENUMEX) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeCloseEnumEx(hnodeenum : HNODEENUMEX) -> u32); - ClusterNodeCloseEnumEx(hnodeenum.param().abi()) + ClusterNodeCloseEnumEx(core::mem::transmute(hnodeenum)) } #[inline] -pub unsafe fn ClusterNodeControl(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>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ClusterNodeControl(hnode: HNODE, hhostnode: Option, 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 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterNodeControl(core::mem::transmute(hnode), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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: P8) -> u32 +pub unsafe fn ClusterNodeControlEx(hnode: HNODE, hhostnode: Option, 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: P8) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P8: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterNodeControlEx(core::mem::transmute(hnode), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterNodeEnum(hnodeenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNodeEnum(hnodeenum: HNODEENUM, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeEnum(hnodeenum : HNODEENUM, dwindex : u32, lpdwtype : *mut u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - ClusterNodeEnum(hnodeenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) + ClusterNodeEnum(core::mem::transmute(hnodeenum), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } #[inline] -pub unsafe fn ClusterNodeEnumEx(hnodeenum: P0, dwindex: u32, pitem: *mut CLUSTER_ENUM_ITEM, cbitem: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNodeEnumEx(hnodeenum: HNODEENUMEX, dwindex: u32, pitem: *mut CLUSTER_ENUM_ITEM, cbitem: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeEnumEx(hnodeenum : HNODEENUMEX, dwindex : u32, pitem : *mut CLUSTER_ENUM_ITEM, cbitem : *mut u32) -> u32); - ClusterNodeEnumEx(hnodeenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pitem), core::mem::transmute(cbitem)) + ClusterNodeEnumEx(core::mem::transmute(hnodeenum), core::mem::transmute(dwindex), core::mem::transmute(pitem), core::mem::transmute(cbitem)) } #[inline] -pub unsafe fn ClusterNodeGetEnumCount(hnodeenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNodeGetEnumCount(hnodeenum: HNODEENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeGetEnumCount(hnodeenum : HNODEENUM) -> u32); - ClusterNodeGetEnumCount(hnodeenum.param().abi()) + ClusterNodeGetEnumCount(core::mem::transmute(hnodeenum)) } #[inline] -pub unsafe fn ClusterNodeGetEnumCountEx(hnodeenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNodeGetEnumCountEx(hnodeenum: HNODEENUMEX) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeGetEnumCountEx(hnodeenum : HNODEENUMEX) -> u32); - ClusterNodeGetEnumCountEx(hnodeenum.param().abi()) + ClusterNodeGetEnumCountEx(core::mem::transmute(hnodeenum)) } #[inline] -pub unsafe fn ClusterNodeOpenEnum(hnode: P0, dwtype: u32) -> HNODEENUM -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNodeOpenEnum(hnode: HNODE, dwtype: u32) -> HNODEENUM { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeOpenEnum(hnode : HNODE, dwtype : u32) -> HNODEENUM); - ClusterNodeOpenEnum(hnode.param().abi(), core::mem::transmute(dwtype)) + ClusterNodeOpenEnum(core::mem::transmute(hnode), core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn ClusterNodeOpenEnumEx(hnode: P0, dwtype: u32, poptions: Option<*const core::ffi::c_void>) -> HNODEENUMEX -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterNodeOpenEnumEx(hnode: HNODE, dwtype: u32, poptions: Option<*const core::ffi::c_void>) -> HNODEENUMEX { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeOpenEnumEx(hnode : HNODE, dwtype : u32, poptions : *const core::ffi::c_void) -> HNODEENUMEX); - ClusterNodeOpenEnumEx(hnode.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))) + ClusterNodeOpenEnumEx(core::mem::transmute(hnode), core::mem::transmute(dwtype), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ClusterNodeReplacement(hcluster: P0, lpsznodenamecurrent: P1, lpsznodenamenew: P2) -> u32 +pub unsafe fn ClusterNodeReplacement(hcluster: HCLUSTER, lpsznodenamecurrent: P1, lpsznodenamenew: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeReplacement(hcluster : HCLUSTER, lpsznodenamecurrent : windows_core::PCWSTR, lpsznodenamenew : windows_core::PCWSTR) -> u32); - ClusterNodeReplacement(hcluster.param().abi(), lpsznodenamecurrent.param().abi(), lpsznodenamenew.param().abi()) + ClusterNodeReplacement(core::mem::transmute(hcluster), lpsznodenamecurrent.param().abi(), lpsznodenamenew.param().abi()) } #[inline] -pub unsafe fn ClusterOpenEnum(hcluster: P0, dwtype: u32) -> HCLUSENUM -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterOpenEnum(hcluster: HCLUSTER, dwtype: u32) -> HCLUSENUM { windows_targets::link!("clusapi.dll" "system" fn ClusterOpenEnum(hcluster : HCLUSTER, dwtype : u32) -> HCLUSENUM); - ClusterOpenEnum(hcluster.param().abi(), core::mem::transmute(dwtype)) + ClusterOpenEnum(core::mem::transmute(hcluster), core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn ClusterOpenEnumEx(hcluster: P0, dwtype: u32, poptions: Option<*const core::ffi::c_void>) -> HCLUSENUMEX -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterOpenEnumEx(hcluster: HCLUSTER, dwtype: u32, poptions: Option<*const core::ffi::c_void>) -> HCLUSENUMEX { windows_targets::link!("clusapi.dll" "system" fn ClusterOpenEnumEx(hcluster : HCLUSTER, dwtype : u32, poptions : *const core::ffi::c_void) -> HCLUSENUMEX); - ClusterOpenEnumEx(hcluster.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))) + ClusterOpenEnumEx(core::mem::transmute(hcluster), core::mem::transmute(dwtype), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ClusterPrepareSharedVolumeForBackup(lpszfilename: P0, lpszvolumepathname: windows_core::PWSTR, lpcchvolumepathname: *mut u32, lpszvolumename: windows_core::PWSTR, lpcchvolumename: *mut u32) -> u32 @@ -849,533 +601,400 @@ where ClusterPrepareSharedVolumeForBackup(lpszfilename.param().abi(), core::mem::transmute(lpszvolumepathname), core::mem::transmute(lpcchvolumepathname), core::mem::transmute(lpszvolumename), core::mem::transmute(lpcchvolumename)) } #[inline] -pub unsafe fn ClusterRegBatchAddCommand(hregbatch: P0, dwcommand: CLUSTER_REG_COMMAND, wzname: P2, dwoptions: u32, lpdata: Option<*const core::ffi::c_void>, cbdata: u32) -> i32 +pub unsafe fn ClusterRegBatchAddCommand(hregbatch: HREGBATCH, dwcommand: CLUSTER_REG_COMMAND, wzname: P2, dwoptions: u32, lpdata: Option<*const core::ffi::c_void>, cbdata: u32) -> i32 where - P0: windows_core::Param, P2: 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(), core::mem::transmute(dwcommand), wzname.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata)) + ClusterRegBatchAddCommand(core::mem::transmute(hregbatch), core::mem::transmute(dwcommand), wzname.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata)) } #[inline] -pub unsafe fn ClusterRegBatchCloseNotification(hbatchnotification: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegBatchCloseNotification(hbatchnotification: HREGBATCHNOTIFICATION) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegBatchCloseNotification(hbatchnotification : HREGBATCHNOTIFICATION) -> i32); - ClusterRegBatchCloseNotification(hbatchnotification.param().abi()) + ClusterRegBatchCloseNotification(core::mem::transmute(hbatchnotification)) } #[inline] -pub unsafe fn ClusterRegBatchReadCommand(hbatchnotification: P0, pbatchcommand: *mut CLUSTER_BATCH_COMMAND) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegBatchReadCommand(hbatchnotification: HREGBATCHNOTIFICATION, pbatchcommand: *mut CLUSTER_BATCH_COMMAND) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegBatchReadCommand(hbatchnotification : HREGBATCHNOTIFICATION, pbatchcommand : *mut CLUSTER_BATCH_COMMAND) -> i32); - ClusterRegBatchReadCommand(hbatchnotification.param().abi(), core::mem::transmute(pbatchcommand)) + ClusterRegBatchReadCommand(core::mem::transmute(hbatchnotification), core::mem::transmute(pbatchcommand)) } #[inline] -pub unsafe fn ClusterRegCloseBatch(hregbatch: P0, bcommit: P1, failedcommandnumber: Option<*mut i32>) -> i32 +pub unsafe fn ClusterRegCloseBatch(hregbatch: HREGBATCH, bcommit: P1, failedcommandnumber: Option<*mut i32>) -> i32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + ClusterRegCloseBatch(core::mem::transmute(hregbatch), bcommit.param().abi(), core::mem::transmute(failedcommandnumber.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ClusterRegCloseBatchEx(hregbatch: P0, flags: u32, failedcommandnumber: Option<*mut i32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCloseBatchEx(hregbatch: HREGBATCH, flags: u32, failedcommandnumber: Option<*mut i32>) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseBatchEx(hregbatch : HREGBATCH, flags : u32, failedcommandnumber : *mut i32) -> i32); - ClusterRegCloseBatchEx(hregbatch.param().abi(), core::mem::transmute(flags), core::mem::transmute(failedcommandnumber.unwrap_or(core::ptr::null_mut()))) + ClusterRegCloseBatchEx(core::mem::transmute(hregbatch), core::mem::transmute(flags), core::mem::transmute(failedcommandnumber.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ClusterRegCloseBatchNotifyPort(hbatchnotifyport: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCloseBatchNotifyPort(hbatchnotifyport: HREGBATCHPORT) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseBatchNotifyPort(hbatchnotifyport : HREGBATCHPORT) -> i32); - ClusterRegCloseBatchNotifyPort(hbatchnotifyport.param().abi()) + ClusterRegCloseBatchNotifyPort(core::mem::transmute(hbatchnotifyport)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegCloseKey(hkey: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCloseKey(hkey: super::super::System::Registry::HKEY) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseKey(hkey : super::super::System::Registry:: HKEY) -> i32); - ClusterRegCloseKey(hkey.param().abi()) + ClusterRegCloseKey(core::mem::transmute(hkey)) } #[inline] -pub unsafe fn ClusterRegCloseReadBatch(hregreadbatch: P0, phregreadbatchreply: *mut HREGREADBATCHREPLY) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCloseReadBatch(hregreadbatch: HREGREADBATCH, phregreadbatchreply: *mut HREGREADBATCHREPLY) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseReadBatch(hregreadbatch : HREGREADBATCH, phregreadbatchreply : *mut HREGREADBATCHREPLY) -> i32); - ClusterRegCloseReadBatch(hregreadbatch.param().abi(), core::mem::transmute(phregreadbatchreply)) + ClusterRegCloseReadBatch(core::mem::transmute(hregreadbatch), core::mem::transmute(phregreadbatchreply)) } #[inline] -pub unsafe fn ClusterRegCloseReadBatchEx(hregreadbatch: P0, flags: u32, phregreadbatchreply: *mut HREGREADBATCHREPLY) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCloseReadBatchEx(hregreadbatch: HREGREADBATCH, flags: u32, phregreadbatchreply: *mut HREGREADBATCHREPLY) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseReadBatchEx(hregreadbatch : HREGREADBATCH, flags : u32, phregreadbatchreply : *mut HREGREADBATCHREPLY) -> i32); - ClusterRegCloseReadBatchEx(hregreadbatch.param().abi(), core::mem::transmute(flags), core::mem::transmute(phregreadbatchreply)) + ClusterRegCloseReadBatchEx(core::mem::transmute(hregreadbatch), core::mem::transmute(flags), core::mem::transmute(phregreadbatchreply)) } #[inline] -pub unsafe fn ClusterRegCloseReadBatchReply(hregreadbatchreply: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCloseReadBatchReply(hregreadbatchreply: HREGREADBATCHREPLY) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseReadBatchReply(hregreadbatchreply : HREGREADBATCHREPLY) -> i32); - ClusterRegCloseReadBatchReply(hregreadbatchreply.param().abi()) + ClusterRegCloseReadBatchReply(core::mem::transmute(hregreadbatchreply)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegCreateBatch(hkey: P0, phregbatch: *mut HREGBATCH) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCreateBatch(hkey: Option, phregbatch: *mut HREGBATCH) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCreateBatch(hkey : super::super::System::Registry:: HKEY, phregbatch : *mut HREGBATCH) -> i32); - ClusterRegCreateBatch(hkey.param().abi(), core::mem::transmute(phregbatch)) + ClusterRegCreateBatch(core::mem::transmute(hkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phregbatch)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegCreateBatchNotifyPort(hkey: P0, phbatchnotifyport: *mut HREGBATCHPORT) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCreateBatchNotifyPort(hkey: super::super::System::Registry::HKEY, phbatchnotifyport: *mut HREGBATCHPORT) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCreateBatchNotifyPort(hkey : super::super::System::Registry:: HKEY, phbatchnotifyport : *mut HREGBATCHPORT) -> i32); - ClusterRegCreateBatchNotifyPort(hkey.param().abi(), core::mem::transmute(phbatchnotifyport)) + ClusterRegCreateBatchNotifyPort(core::mem::transmute(hkey), core::mem::transmute(phbatchnotifyport)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn ClusterRegCreateKey(hkey: P0, lpszsubkey: P1, dwoptions: u32, samdesired: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut super::super::System::Registry::HKEY, lpdwdisposition: Option<*mut u32>) -> i32 +pub unsafe fn ClusterRegCreateKey(hkey: super::super::System::Registry::HKEY, lpszsubkey: P1, dwoptions: u32, samdesired: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut super::super::System::Registry::HKEY, lpdwdisposition: Option<*mut u32>) -> i32 where - P0: windows_core::Param, 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(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut()))) + ClusterRegCreateKey(core::mem::transmute(hkey), lpszsubkey.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn ClusterRegCreateKeyEx(hkey: P0, lpsubkey: P1, dwoptions: u32, samdesired: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut super::super::System::Registry::HKEY, lpdwdisposition: Option<*mut u32>, lpszreason: P7) -> i32 +pub unsafe fn ClusterRegCreateKeyEx(hkey: super::super::System::Registry::HKEY, lpsubkey: P1, dwoptions: u32, samdesired: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut super::super::System::Registry::HKEY, lpdwdisposition: Option<*mut u32>, lpszreason: P7) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P7: 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(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterRegCreateKeyEx(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegCreateReadBatch(hkey: P0, phregreadbatch: *mut HREGREADBATCH) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegCreateReadBatch(hkey: super::super::System::Registry::HKEY, phregreadbatch: *mut HREGREADBATCH) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCreateReadBatch(hkey : super::super::System::Registry:: HKEY, phregreadbatch : *mut HREGREADBATCH) -> i32); - ClusterRegCreateReadBatch(hkey.param().abi(), core::mem::transmute(phregreadbatch)) + ClusterRegCreateReadBatch(core::mem::transmute(hkey), core::mem::transmute(phregreadbatch)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegDeleteKey(hkey: P0, lpszsubkey: P1) -> i32 +pub unsafe fn ClusterRegDeleteKey(hkey: super::super::System::Registry::HKEY, lpszsubkey: P1) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegDeleteKey(hkey : super::super::System::Registry:: HKEY, lpszsubkey : windows_core::PCWSTR) -> i32); - ClusterRegDeleteKey(hkey.param().abi(), lpszsubkey.param().abi()) + ClusterRegDeleteKey(core::mem::transmute(hkey), lpszsubkey.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegDeleteKeyEx(hkey: P0, lpsubkey: P1, lpszreason: P2) -> i32 +pub unsafe fn ClusterRegDeleteKeyEx(hkey: super::super::System::Registry::HKEY, lpsubkey: P1, lpszreason: P2) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegDeleteKeyEx(hkey : super::super::System::Registry:: HKEY, lpsubkey : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> i32); - ClusterRegDeleteKeyEx(hkey.param().abi(), lpsubkey.param().abi(), lpszreason.param().abi()) + ClusterRegDeleteKeyEx(core::mem::transmute(hkey), lpsubkey.param().abi(), lpszreason.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegDeleteValue(hkey: P0, lpszvaluename: P1) -> u32 +pub unsafe fn ClusterRegDeleteValue(hkey: super::super::System::Registry::HKEY, lpszvaluename: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegDeleteValue(hkey : super::super::System::Registry:: HKEY, lpszvaluename : windows_core::PCWSTR) -> u32); - ClusterRegDeleteValue(hkey.param().abi(), lpszvaluename.param().abi()) + ClusterRegDeleteValue(core::mem::transmute(hkey), lpszvaluename.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegDeleteValueEx(hkey: P0, lpszvaluename: P1, lpszreason: P2) -> u32 +pub unsafe fn ClusterRegDeleteValueEx(hkey: super::super::System::Registry::HKEY, lpszvaluename: P1, lpszreason: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegDeleteValueEx(hkey : super::super::System::Registry:: HKEY, lpszvaluename : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> u32); - ClusterRegDeleteValueEx(hkey.param().abi(), lpszvaluename.param().abi(), lpszreason.param().abi()) + ClusterRegDeleteValueEx(core::mem::transmute(hkey), lpszvaluename.param().abi(), lpszreason.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegEnumKey(hkey: P0, dwindex: u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegEnumKey(hkey: super::super::System::Registry::HKEY, dwindex: u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> i32 { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpszname), core::mem::transmute(lpcchname), core::mem::transmute(lpftlastwritetime.unwrap_or(core::ptr::null_mut()))) + ClusterRegEnumKey(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(lpszname), core::mem::transmute(lpcchname), core::mem::transmute(lpftlastwritetime.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegEnumValue(hkey: P0, dwindex: u32, lpszvaluename: windows_core::PWSTR, lpcchvaluename: *mut u32, lpdwtype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegEnumValue(hkey: super::super::System::Registry::HKEY, dwindex: u32, lpszvaluename: windows_core::PWSTR, lpcchvaluename: *mut u32, lpdwtype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> u32 { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpszvaluename), core::mem::transmute(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()))) + ClusterRegEnumValue(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(lpszvaluename), core::mem::transmute(lpcchvaluename), core::mem::transmute(lpdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ClusterRegGetBatchNotification(hbatchnotify: P0, phbatchnotification: *mut HREGBATCHNOTIFICATION) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegGetBatchNotification(hbatchnotify: HREGBATCHPORT, phbatchnotification: *mut HREGBATCHNOTIFICATION) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegGetBatchNotification(hbatchnotify : HREGBATCHPORT, phbatchnotification : *mut HREGBATCHNOTIFICATION) -> i32); - ClusterRegGetBatchNotification(hbatchnotify.param().abi(), core::mem::transmute(phbatchnotification)) + ClusterRegGetBatchNotification(core::mem::transmute(hbatchnotify), core::mem::transmute(phbatchnotification)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn ClusterRegGetKeySecurity(hkey: P0, requestedinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegGetKeySecurity(hkey: super::super::System::Registry::HKEY, requestedinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor: *mut u32) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegGetKeySecurity(hkey : super::super::System::Registry:: HKEY, requestedinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor : *mut u32) -> i32); - ClusterRegGetKeySecurity(hkey.param().abi(), core::mem::transmute(requestedinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(lpcbsecuritydescriptor)) + ClusterRegGetKeySecurity(core::mem::transmute(hkey), core::mem::transmute(requestedinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(lpcbsecuritydescriptor)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegOpenKey(hkey: P0, lpszsubkey: P1, samdesired: u32, phkresult: *mut super::super::System::Registry::HKEY) -> i32 +pub unsafe fn ClusterRegOpenKey(hkey: super::super::System::Registry::HKEY, lpszsubkey: P1, samdesired: u32, phkresult: *mut super::super::System::Registry::HKEY) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegOpenKey(hkey : super::super::System::Registry:: HKEY, lpszsubkey : windows_core::PCWSTR, samdesired : u32, phkresult : *mut super::super::System::Registry:: HKEY) -> i32); - ClusterRegOpenKey(hkey.param().abi(), lpszsubkey.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(phkresult)) + ClusterRegOpenKey(core::mem::transmute(hkey), lpszsubkey.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(phkresult)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegQueryInfoKey(hkey: P0, lpcsubkeys: *const u32, lpcchmaxsubkeylen: *const u32, lpcvalues: *const u32, lpcchmaxvaluenamelen: *const u32, lpcbmaxvaluelen: *const u32, lpcbsecuritydescriptor: *const u32, lpftlastwritetime: *const super::super::Foundation::FILETIME) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegQueryInfoKey(hkey: super::super::System::Registry::HKEY, lpcsubkeys: *const u32, lpcchmaxsubkeylen: *const u32, lpcvalues: *const u32, lpcchmaxvaluenamelen: *const u32, lpcbmaxvaluelen: *const u32, lpcbsecuritydescriptor: *const u32, lpftlastwritetime: *const super::super::Foundation::FILETIME) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegQueryInfoKey(hkey : super::super::System::Registry:: HKEY, lpcsubkeys : *const u32, lpcchmaxsubkeylen : *const u32, lpcvalues : *const u32, lpcchmaxvaluenamelen : *const u32, lpcbmaxvaluelen : *const u32, lpcbsecuritydescriptor : *const u32, lpftlastwritetime : *const super::super::Foundation:: FILETIME) -> i32); - ClusterRegQueryInfoKey(hkey.param().abi(), core::mem::transmute(lpcsubkeys), core::mem::transmute(lpcchmaxsubkeylen), core::mem::transmute(lpcvalues), core::mem::transmute(lpcchmaxvaluenamelen), core::mem::transmute(lpcbmaxvaluelen), core::mem::transmute(lpcbsecuritydescriptor), core::mem::transmute(lpftlastwritetime)) + ClusterRegQueryInfoKey(core::mem::transmute(hkey), core::mem::transmute(lpcsubkeys), core::mem::transmute(lpcchmaxsubkeylen), core::mem::transmute(lpcvalues), core::mem::transmute(lpcchmaxvaluenamelen), core::mem::transmute(lpcbmaxvaluelen), core::mem::transmute(lpcbsecuritydescriptor), core::mem::transmute(lpftlastwritetime)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegQueryValue(hkey: P0, lpszvaluename: P1, lpdwvaluetype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> i32 +pub unsafe fn ClusterRegQueryValue(hkey: super::super::System::Registry::HKEY, lpszvaluename: P1, lpdwvaluetype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> i32 where - P0: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) + ClusterRegQueryValue(core::mem::transmute(hkey), lpszvaluename.param().abi(), core::mem::transmute(lpdwvaluetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ClusterRegReadBatchAddCommand(hregreadbatch: P0, wzsubkeyname: P1, wzvaluename: P2) -> i32 +pub unsafe fn ClusterRegReadBatchAddCommand(hregreadbatch: HREGREADBATCH, wzsubkeyname: P1, wzvaluename: P2) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegReadBatchAddCommand(hregreadbatch : HREGREADBATCH, wzsubkeyname : windows_core::PCWSTR, wzvaluename : windows_core::PCWSTR) -> i32); - ClusterRegReadBatchAddCommand(hregreadbatch.param().abi(), wzsubkeyname.param().abi(), wzvaluename.param().abi()) + ClusterRegReadBatchAddCommand(core::mem::transmute(hregreadbatch), wzsubkeyname.param().abi(), wzvaluename.param().abi()) } #[inline] -pub unsafe fn ClusterRegReadBatchReplyNextCommand(hregreadbatchreply: P0, pbatchcommand: *mut CLUSTER_READ_BATCH_COMMAND) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegReadBatchReplyNextCommand(hregreadbatchreply: HREGREADBATCHREPLY, pbatchcommand: *mut CLUSTER_READ_BATCH_COMMAND) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegReadBatchReplyNextCommand(hregreadbatchreply : HREGREADBATCHREPLY, pbatchcommand : *mut CLUSTER_READ_BATCH_COMMAND) -> i32); - ClusterRegReadBatchReplyNextCommand(hregreadbatchreply.param().abi(), core::mem::transmute(pbatchcommand)) + ClusterRegReadBatchReplyNextCommand(core::mem::transmute(hregreadbatchreply), core::mem::transmute(pbatchcommand)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn ClusterRegSetKeySecurity(hkey: P0, securityinformation: u32, psecuritydescriptor: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ClusterRegSetKeySecurity(hkey: super::super::System::Registry::HKEY, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegSetKeySecurity(hkey : super::super::System::Registry:: HKEY, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> i32); - ClusterRegSetKeySecurity(hkey.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()) + ClusterRegSetKeySecurity(core::mem::transmute(hkey), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn ClusterRegSetKeySecurityEx(hkey: P0, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P2, lpszreason: P3) -> i32 +pub unsafe fn ClusterRegSetKeySecurityEx(hkey: super::super::System::Registry::HKEY, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, lpszreason: P3) -> i32 where - P0: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegSetKeySecurityEx(hkey : super::super::System::Registry:: HKEY, securityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, lpszreason : windows_core::PCWSTR) -> i32); - ClusterRegSetKeySecurityEx(hkey.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi(), lpszreason.param().abi()) + ClusterRegSetKeySecurityEx(core::mem::transmute(hkey), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor), lpszreason.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegSetValue(hkey: P0, lpszvaluename: P1, dwtype: u32, lpdata: *const u8, cbdata: u32) -> u32 +pub unsafe fn ClusterRegSetValue(hkey: super::super::System::Registry::HKEY, lpszvaluename: P1, dwtype: u32, lpdata: *const u8, cbdata: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegSetValue(hkey : super::super::System::Registry:: HKEY, lpszvaluename : windows_core::PCWSTR, dwtype : u32, lpdata : *const u8, cbdata : u32) -> u32); - ClusterRegSetValue(hkey.param().abi(), lpszvaluename.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata), core::mem::transmute(cbdata)) + ClusterRegSetValue(core::mem::transmute(hkey), lpszvaluename.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata), core::mem::transmute(cbdata)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ClusterRegSetValueEx(hkey: P0, lpszvaluename: P1, dwtype: u32, lpdata: *const u8, cbdata: u32, lpszreason: P5) -> u32 +pub unsafe fn ClusterRegSetValueEx(hkey: super::super::System::Registry::HKEY, lpszvaluename: P1, dwtype: u32, lpdata: *const u8, cbdata: u32, lpszreason: P5) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegSetValueEx(hkey : super::super::System::Registry:: HKEY, lpszvaluename : windows_core::PCWSTR, dwtype : u32, lpdata : *const u8, cbdata : u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterRegSetValueEx(hkey.param().abi(), lpszvaluename.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata), core::mem::transmute(cbdata), lpszreason.param().abi()) + ClusterRegSetValueEx(core::mem::transmute(hkey), lpszvaluename.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata), core::mem::transmute(cbdata), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterRegSyncDatabase(hcluster: P0, flags: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterRegSyncDatabase(hcluster: HCLUSTER, flags: u32) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegSyncDatabase(hcluster : HCLUSTER, flags : u32) -> i32); - ClusterRegSyncDatabase(hcluster.param().abi(), core::mem::transmute(flags)) + ClusterRegSyncDatabase(core::mem::transmute(hcluster), core::mem::transmute(flags)) } #[inline] -pub unsafe fn ClusterRemoveAffinityRule(hcluster: P0, rulename: P1) -> u32 +pub unsafe fn ClusterRemoveAffinityRule(hcluster: HCLUSTER, rulename: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRemoveAffinityRule(hcluster : HCLUSTER, rulename : windows_core::PCWSTR) -> u32); - ClusterRemoveAffinityRule(hcluster.param().abi(), rulename.param().abi()) + ClusterRemoveAffinityRule(core::mem::transmute(hcluster), rulename.param().abi()) } #[inline] -pub unsafe fn ClusterRemoveGroupFromAffinityRule(hcluster: P0, rulename: P1, hgroup: P2) -> u32 +pub unsafe fn ClusterRemoveGroupFromAffinityRule(hcluster: HCLUSTER, rulename: P1, hgroup: HGROUP) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param
, { windows_targets::link!("clusapi.dll" "system" fn ClusterRemoveGroupFromAffinityRule(hcluster : HCLUSTER, rulename : windows_core::PCWSTR, hgroup : HGROUP) -> u32); - ClusterRemoveGroupFromAffinityRule(hcluster.param().abi(), rulename.param().abi(), hgroup.param().abi()) + ClusterRemoveGroupFromAffinityRule(core::mem::transmute(hcluster), rulename.param().abi(), core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn ClusterRemoveGroupFromGroupSet(hgroup: P0) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn ClusterRemoveGroupFromGroupSet(hgroup: HGROUP) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRemoveGroupFromGroupSet(hgroup : HGROUP) -> u32); - ClusterRemoveGroupFromGroupSet(hgroup.param().abi()) + ClusterRemoveGroupFromGroupSet(core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn ClusterRemoveGroupFromGroupSetEx(hgroup: P0, lpszreason: P1) -> u32 +pub unsafe fn ClusterRemoveGroupFromGroupSetEx(hgroup: HGROUP, lpszreason: P1) -> u32 where - P0: windows_core::Param
, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRemoveGroupFromGroupSetEx(hgroup : HGROUP, lpszreason : windows_core::PCWSTR) -> u32); - ClusterRemoveGroupFromGroupSetEx(hgroup.param().abi(), lpszreason.param().abi()) + ClusterRemoveGroupFromGroupSetEx(core::mem::transmute(hgroup), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterResourceCloseEnum(hresenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceCloseEnum(hresenum: HRESENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceCloseEnum(hresenum : HRESENUM) -> u32); - ClusterResourceCloseEnum(hresenum.param().abi()) + ClusterResourceCloseEnum(core::mem::transmute(hresenum)) } #[inline] -pub unsafe fn ClusterResourceCloseEnumEx(hresourceenumex: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceCloseEnumEx(hresourceenumex: HRESENUMEX) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceCloseEnumEx(hresourceenumex : HRESENUMEX) -> u32); - ClusterResourceCloseEnumEx(hresourceenumex.param().abi()) + ClusterResourceCloseEnumEx(core::mem::transmute(hresourceenumex)) } #[inline] -pub unsafe fn ClusterResourceControl(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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ClusterResourceControl(hresource: HRESOURCE, hhostnode: Option, 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 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterResourceControl(core::mem::transmute(hresource), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ClusterResourceControlAsUser(hresource: HRESOURCE, hhostnode: Option, 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 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterResourceControlAsUser(core::mem::transmute(hresource), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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: P8) -> u32 +pub unsafe fn ClusterResourceControlAsUserEx(hresource: HRESOURCE, hhostnode: Option, 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: P8) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P8: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterResourceControlAsUserEx(core::mem::transmute(hresource), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), 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: P8) -> u32 +pub unsafe fn ClusterResourceControlEx(hresource: HRESOURCE, hhostnode: Option, 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: P8) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P8: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterResourceControlEx(core::mem::transmute(hresource), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterResourceEnum(hresenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceEnum(hresenum: HRESENUM, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceEnum(hresenum : HRESENUM, dwindex : u32, lpdwtype : *mut u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - ClusterResourceEnum(hresenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) + ClusterResourceEnum(core::mem::transmute(hresenum), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } #[inline] -pub unsafe fn ClusterResourceEnumEx(hresourceenumex: P0, dwindex: u32, pitem: *mut CLUSTER_RESOURCE_ENUM_ITEM, cbitem: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceEnumEx(hresourceenumex: HRESENUMEX, dwindex: u32, pitem: *mut CLUSTER_RESOURCE_ENUM_ITEM, cbitem: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceEnumEx(hresourceenumex : HRESENUMEX, dwindex : u32, pitem : *mut CLUSTER_RESOURCE_ENUM_ITEM, cbitem : *mut u32) -> u32); - ClusterResourceEnumEx(hresourceenumex.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pitem), core::mem::transmute(cbitem)) + ClusterResourceEnumEx(core::mem::transmute(hresourceenumex), core::mem::transmute(dwindex), core::mem::transmute(pitem), core::mem::transmute(cbitem)) } #[inline] -pub unsafe fn ClusterResourceGetEnumCount(hresenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceGetEnumCount(hresenum: HRESENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceGetEnumCount(hresenum : HRESENUM) -> u32); - ClusterResourceGetEnumCount(hresenum.param().abi()) + ClusterResourceGetEnumCount(core::mem::transmute(hresenum)) } #[inline] -pub unsafe fn ClusterResourceGetEnumCountEx(hresourceenumex: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceGetEnumCountEx(hresourceenumex: HRESENUMEX) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceGetEnumCountEx(hresourceenumex : HRESENUMEX) -> u32); - ClusterResourceGetEnumCountEx(hresourceenumex.param().abi()) + ClusterResourceGetEnumCountEx(core::mem::transmute(hresourceenumex)) } #[inline] -pub unsafe fn ClusterResourceOpenEnum(hresource: P0, dwtype: u32) -> HRESENUM -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceOpenEnum(hresource: HRESOURCE, dwtype: u32) -> HRESENUM { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceOpenEnum(hresource : HRESOURCE, dwtype : u32) -> HRESENUM); - ClusterResourceOpenEnum(hresource.param().abi(), core::mem::transmute(dwtype)) + ClusterResourceOpenEnum(core::mem::transmute(hresource), core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn ClusterResourceOpenEnumEx(hcluster: P0, lpszproperties: P1, cbproperties: u32, lpszroproperties: P3, cbroproperties: u32, dwflags: u32) -> HRESENUMEX +pub unsafe fn ClusterResourceOpenEnumEx(hcluster: HCLUSTER, lpszproperties: P1, cbproperties: u32, lpszroproperties: P3, cbroproperties: u32, dwflags: u32) -> HRESENUMEX where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceOpenEnumEx(hcluster : HCLUSTER, lpszproperties : windows_core::PCWSTR, cbproperties : u32, lpszroproperties : windows_core::PCWSTR, cbroproperties : u32, dwflags : u32) -> HRESENUMEX); - ClusterResourceOpenEnumEx(hcluster.param().abi(), lpszproperties.param().abi(), core::mem::transmute(cbproperties), lpszroproperties.param().abi(), core::mem::transmute(cbroproperties), core::mem::transmute(dwflags)) + ClusterResourceOpenEnumEx(core::mem::transmute(hcluster), lpszproperties.param().abi(), core::mem::transmute(cbproperties), lpszroproperties.param().abi(), core::mem::transmute(cbroproperties), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn ClusterResourceTypeCloseEnum(hrestypeenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceTypeCloseEnum(hrestypeenum: HRESTYPEENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceTypeCloseEnum(hrestypeenum : HRESTYPEENUM) -> u32); - ClusterResourceTypeCloseEnum(hrestypeenum.param().abi()) + ClusterResourceTypeCloseEnum(core::mem::transmute(hrestypeenum)) } #[inline] -pub unsafe fn ClusterResourceTypeControl(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 +pub unsafe fn ClusterResourceTypeControl(hcluster: HCLUSTER, lpszresourcetypename: P1, hhostnode: Option, 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 where - P0: windows_core::Param, P1: windows_core::Param, - 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterResourceTypeControl(core::mem::transmute(hcluster), lpszresourcetypename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn ClusterResourceTypeControlAsUser(hcluster: HCLUSTER, lpszresourcetypename: P1, hhostnode: Option, 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 where - P0: windows_core::Param, P1: windows_core::Param, - 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) + ClusterResourceTypeControlAsUser(core::mem::transmute(hcluster), lpszresourcetypename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed()))) } #[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: P9) -> u32 +pub unsafe fn ClusterResourceTypeControlAsUserEx(hcluster: HCLUSTER, lpszresourcetypename: P1, hhostnode: Option, 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: P9) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P9: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterResourceTypeControlAsUserEx(core::mem::transmute(hcluster), lpszresourcetypename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), 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: P9) -> u32 +pub unsafe fn ClusterResourceTypeControlEx(hcluster: HCLUSTER, lpszresourcetypename: P1, hhostnode: Option, 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: P9) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P9: 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) + ClusterResourceTypeControlEx(core::mem::transmute(hcluster), lpszresourcetypename.param().abi(), core::mem::transmute(hhostnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] -pub unsafe fn ClusterResourceTypeEnum(hrestypeenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceTypeEnum(hrestypeenum: HRESTYPEENUM, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceTypeEnum(hrestypeenum : HRESTYPEENUM, dwindex : u32, lpdwtype : *mut u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - ClusterResourceTypeEnum(hrestypeenum.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) + ClusterResourceTypeEnum(core::mem::transmute(hrestypeenum), core::mem::transmute(dwindex), core::mem::transmute(lpdwtype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname)) } #[inline] -pub unsafe fn ClusterResourceTypeGetEnumCount(hrestypeenum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ClusterResourceTypeGetEnumCount(hrestypeenum: HRESTYPEENUM) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceTypeGetEnumCount(hrestypeenum : HRESTYPEENUM) -> u32); - ClusterResourceTypeGetEnumCount(hrestypeenum.param().abi()) + ClusterResourceTypeGetEnumCount(core::mem::transmute(hrestypeenum)) } #[inline] -pub unsafe fn ClusterResourceTypeOpenEnum(hcluster: P0, lpszresourcetypename: P1, dwtype: u32) -> HRESTYPEENUM +pub unsafe fn ClusterResourceTypeOpenEnum(hcluster: HCLUSTER, lpszresourcetypename: P1, dwtype: u32) -> HRESTYPEENUM where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceTypeOpenEnum(hcluster : HCLUSTER, lpszresourcetypename : windows_core::PCWSTR, dwtype : u32) -> HRESTYPEENUM); - ClusterResourceTypeOpenEnum(hcluster.param().abi(), lpszresourcetypename.param().abi(), core::mem::transmute(dwtype)) + ClusterResourceTypeOpenEnum(core::mem::transmute(hcluster), lpszresourcetypename.param().abi(), core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn ClusterSetAccountAccess(hcluster: P0, szaccountsid: P1, dwaccess: u32, dwcontroltype: u32) -> u32 +pub unsafe fn ClusterSetAccountAccess(hcluster: HCLUSTER, szaccountsid: P1, dwaccess: u32, dwcontroltype: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterSetAccountAccess(hcluster : HCLUSTER, szaccountsid : windows_core::PCWSTR, dwaccess : u32, dwcontroltype : u32) -> u32); - ClusterSetAccountAccess(hcluster.param().abi(), szaccountsid.param().abi(), core::mem::transmute(dwaccess), core::mem::transmute(dwcontroltype)) + ClusterSetAccountAccess(core::mem::transmute(hcluster), szaccountsid.param().abi(), core::mem::transmute(dwaccess), core::mem::transmute(dwcontroltype)) } #[inline] pub unsafe fn ClusterSharedVolumeSetSnapshotState(guidsnapshotset: windows_core::GUID, lpszvolumename: P1, state: CLUSTER_SHARED_VOLUME_SNAPSHOT_STATE) -> u32 @@ -1386,228 +1005,186 @@ where ClusterSharedVolumeSetSnapshotState(core::mem::transmute(guidsnapshotset), lpszvolumename.param().abi(), core::mem::transmute(state)) } #[inline] -pub unsafe fn ClusterUpgradeFunctionalLevel(hcluster: P0, perform: P1, pfnprogresscallback: PCLUSTER_UPGRADE_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn ClusterUpgradeFunctionalLevel(hcluster: HCLUSTER, perform: P1, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, 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(), core::mem::transmute(pfnprogresscallback), core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) + ClusterUpgradeFunctionalLevel(core::mem::transmute(hcluster), perform.param().abi(), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreateCluster(pconfig: *const CREATE_CLUSTER_CONFIG, pfnprogresscallback: PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>) -> HCLUSTER { +pub unsafe fn CreateCluster(pconfig: *const CREATE_CLUSTER_CONFIG, pfnprogresscallback: Option, 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(core::mem::transmute(pconfig), core::mem::transmute(pfnprogresscallback), core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) + CreateCluster(core::mem::transmute(pconfig), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreateClusterAvailabilitySet(hcluster: P0, lpavailabilitysetname: P1, pavailabilitysetconfig: *const CLUSTER_AVAILABILITY_SET_CONFIG) -> HGROUPSET +pub unsafe fn CreateClusterAvailabilitySet(hcluster: HCLUSTER, lpavailabilitysetname: P1, pavailabilitysetconfig: *const CLUSTER_AVAILABILITY_SET_CONFIG) -> HGROUPSET where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterAvailabilitySet(hcluster : HCLUSTER, lpavailabilitysetname : windows_core::PCWSTR, pavailabilitysetconfig : *const CLUSTER_AVAILABILITY_SET_CONFIG) -> HGROUPSET); - CreateClusterAvailabilitySet(hcluster.param().abi(), lpavailabilitysetname.param().abi(), core::mem::transmute(pavailabilitysetconfig)) + CreateClusterAvailabilitySet(core::mem::transmute(hcluster), lpavailabilitysetname.param().abi(), core::mem::transmute(pavailabilitysetconfig)) } #[inline] -pub unsafe fn CreateClusterGroup(hcluster: P0, lpszgroupname: P1) -> HGROUP +pub unsafe fn CreateClusterGroup(hcluster: HCLUSTER, lpszgroupname: P1) -> HGROUP where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterGroup(hcluster : HCLUSTER, lpszgroupname : windows_core::PCWSTR) -> HGROUP); - CreateClusterGroup(hcluster.param().abi(), lpszgroupname.param().abi()) + CreateClusterGroup(core::mem::transmute(hcluster), lpszgroupname.param().abi()) } #[inline] -pub unsafe fn CreateClusterGroupEx(hcluster: P0, lpszgroupname: P1, pgroupinfo: Option<*const CLUSTER_CREATE_GROUP_INFO>) -> HGROUP +pub unsafe fn CreateClusterGroupEx(hcluster: HCLUSTER, lpszgroupname: P1, pgroupinfo: Option<*const CLUSTER_CREATE_GROUP_INFO>) -> HGROUP where - P0: windows_core::Param, 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(core::ptr::null()))) + CreateClusterGroupEx(core::mem::transmute(hcluster), lpszgroupname.param().abi(), core::mem::transmute(pgroupinfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreateClusterGroupSet(hcluster: P0, groupsetname: P1) -> HGROUPSET +pub unsafe fn CreateClusterGroupSet(hcluster: HCLUSTER, groupsetname: P1) -> HGROUPSET where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterGroupSet(hcluster : HCLUSTER, groupsetname : windows_core::PCWSTR) -> HGROUPSET); - CreateClusterGroupSet(hcluster.param().abi(), groupsetname.param().abi()) + CreateClusterGroupSet(core::mem::transmute(hcluster), groupsetname.param().abi()) } #[inline] -pub unsafe fn CreateClusterNameAccount(hcluster: P0, pconfig: *const CREATE_CLUSTER_NAME_ACCOUNT, pfnprogresscallback: PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn CreateClusterNameAccount(hcluster: HCLUSTER, pconfig: *const CREATE_CLUSTER_NAME_ACCOUNT, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(pconfig), core::mem::transmute(pfnprogresscallback), core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) + CreateClusterNameAccount(core::mem::transmute(hcluster), core::mem::transmute(pconfig), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreateClusterNotifyPort(hchange: P0, hcluster: P1, dwfilter: u32, dwnotifykey: usize) -> HCHANGE -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CreateClusterNotifyPort(hchange: HCHANGE, hcluster: HCLUSTER, dwfilter: u32, dwnotifykey: usize) -> HCHANGE { windows_targets::link!("clusapi.dll" "system" fn CreateClusterNotifyPort(hchange : HCHANGE, hcluster : HCLUSTER, dwfilter : u32, dwnotifykey : usize) -> HCHANGE); - CreateClusterNotifyPort(hchange.param().abi(), hcluster.param().abi(), core::mem::transmute(dwfilter), core::mem::transmute(dwnotifykey)) + CreateClusterNotifyPort(core::mem::transmute(hchange), core::mem::transmute(hcluster), core::mem::transmute(dwfilter), core::mem::transmute(dwnotifykey)) } #[inline] -pub unsafe fn CreateClusterNotifyPortV2(hchange: P0, hcluster: P1, filters: *const NOTIFY_FILTER_AND_TYPE, dwfiltercount: u32, dwnotifykey: usize) -> HCHANGE -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CreateClusterNotifyPortV2(hchange: HCHANGE, hcluster: HCLUSTER, filters: *const NOTIFY_FILTER_AND_TYPE, dwfiltercount: u32, dwnotifykey: usize) -> HCHANGE { windows_targets::link!("clusapi.dll" "system" fn CreateClusterNotifyPortV2(hchange : HCHANGE, hcluster : HCLUSTER, filters : *const NOTIFY_FILTER_AND_TYPE, dwfiltercount : u32, dwnotifykey : usize) -> HCHANGE); - CreateClusterNotifyPortV2(hchange.param().abi(), hcluster.param().abi(), core::mem::transmute(filters), core::mem::transmute(dwfiltercount), core::mem::transmute(dwnotifykey)) + CreateClusterNotifyPortV2(core::mem::transmute(hchange), core::mem::transmute(hcluster), core::mem::transmute(filters), core::mem::transmute(dwfiltercount), core::mem::transmute(dwnotifykey)) } #[inline] -pub unsafe fn CreateClusterResource(hgroup: P0, lpszresourcename: P1, lpszresourcetype: P2, dwflags: u32) -> HRESOURCE +pub unsafe fn CreateClusterResource(hgroup: HGROUP, lpszresourcename: P1, lpszresourcetype: P2, dwflags: u32) -> HRESOURCE where - P0: windows_core::Param
, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterResource(hgroup : HGROUP, lpszresourcename : windows_core::PCWSTR, lpszresourcetype : windows_core::PCWSTR, dwflags : u32) -> HRESOURCE); - CreateClusterResource(hgroup.param().abi(), lpszresourcename.param().abi(), lpszresourcetype.param().abi(), core::mem::transmute(dwflags)) + CreateClusterResource(core::mem::transmute(hgroup), lpszresourcename.param().abi(), lpszresourcetype.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn CreateClusterResourceEx(hgroup: P0, lpszresourcename: P1, lpszresourcetype: P2, dwflags: u32, lpszreason: P4) -> HRESOURCE +pub unsafe fn CreateClusterResourceEx(hgroup: HGROUP, lpszresourcename: P1, lpszresourcetype: P2, dwflags: u32, lpszreason: P4) -> HRESOURCE where - P0: windows_core::Param
, P1: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterResourceEx(hgroup : HGROUP, lpszresourcename : windows_core::PCWSTR, lpszresourcetype : windows_core::PCWSTR, dwflags : u32, lpszreason : windows_core::PCWSTR) -> HRESOURCE); - CreateClusterResourceEx(hgroup.param().abi(), lpszresourcename.param().abi(), lpszresourcetype.param().abi(), core::mem::transmute(dwflags), lpszreason.param().abi()) + CreateClusterResourceEx(core::mem::transmute(hgroup), lpszresourcename.param().abi(), lpszresourcetype.param().abi(), core::mem::transmute(dwflags), lpszreason.param().abi()) } #[inline] -pub unsafe fn CreateClusterResourceType(hcluster: P0, lpszresourcetypename: P1, lpszdisplayname: P2, lpszresourcetypedll: P3, dwlooksalivepollinterval: u32, dwisalivepollinterval: u32) -> u32 +pub unsafe fn CreateClusterResourceType(hcluster: HCLUSTER, lpszresourcetypename: P1, lpszdisplayname: P2, lpszresourcetypedll: P3, dwlooksalivepollinterval: u32, dwisalivepollinterval: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterResourceType(hcluster : HCLUSTER, lpszresourcetypename : windows_core::PCWSTR, lpszdisplayname : windows_core::PCWSTR, lpszresourcetypedll : windows_core::PCWSTR, dwlooksalivepollinterval : u32, dwisalivepollinterval : u32) -> u32); - CreateClusterResourceType(hcluster.param().abi(), lpszresourcetypename.param().abi(), lpszdisplayname.param().abi(), lpszresourcetypedll.param().abi(), core::mem::transmute(dwlooksalivepollinterval), core::mem::transmute(dwisalivepollinterval)) + CreateClusterResourceType(core::mem::transmute(hcluster), lpszresourcetypename.param().abi(), lpszdisplayname.param().abi(), lpszresourcetypedll.param().abi(), core::mem::transmute(dwlooksalivepollinterval), core::mem::transmute(dwisalivepollinterval)) } #[inline] -pub unsafe fn CreateClusterResourceTypeEx(hcluster: P0, lpszresourcetypename: P1, lpszdisplayname: P2, lpszresourcetypedll: P3, dwlooksalivepollinterval: u32, dwisalivepollinterval: u32, lpszreason: P6) -> u32 +pub unsafe fn CreateClusterResourceTypeEx(hcluster: HCLUSTER, lpszresourcetypename: P1, lpszdisplayname: P2, lpszresourcetypedll: P3, dwlooksalivepollinterval: u32, dwisalivepollinterval: u32, lpszreason: P6) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterResourceTypeEx(hcluster : HCLUSTER, lpszresourcetypename : windows_core::PCWSTR, lpszdisplayname : windows_core::PCWSTR, lpszresourcetypedll : windows_core::PCWSTR, dwlooksalivepollinterval : u32, dwisalivepollinterval : u32, lpszreason : windows_core::PCWSTR) -> u32); - CreateClusterResourceTypeEx(hcluster.param().abi(), lpszresourcetypename.param().abi(), lpszdisplayname.param().abi(), lpszresourcetypedll.param().abi(), core::mem::transmute(dwlooksalivepollinterval), core::mem::transmute(dwisalivepollinterval), lpszreason.param().abi()) + CreateClusterResourceTypeEx(core::mem::transmute(hcluster), lpszresourcetypename.param().abi(), lpszdisplayname.param().abi(), lpszresourcetypedll.param().abi(), core::mem::transmute(dwlooksalivepollinterval), core::mem::transmute(dwisalivepollinterval), lpszreason.param().abi()) } #[inline] -pub unsafe fn DeleteClusterGroup(hgroup: P0) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn DeleteClusterGroup(hgroup: HGROUP) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DeleteClusterGroup(hgroup : HGROUP) -> u32); - DeleteClusterGroup(hgroup.param().abi()) + DeleteClusterGroup(core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn DeleteClusterGroupEx(hgroup: P0, lpszreason: P1) -> u32 +pub unsafe fn DeleteClusterGroupEx(hgroup: HGROUP, lpszreason: P1) -> u32 where - P0: windows_core::Param
, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn DeleteClusterGroupEx(hgroup : HGROUP, lpszreason : windows_core::PCWSTR) -> u32); - DeleteClusterGroupEx(hgroup.param().abi(), lpszreason.param().abi()) + DeleteClusterGroupEx(core::mem::transmute(hgroup), lpszreason.param().abi()) } #[inline] -pub unsafe fn DeleteClusterGroupSet(hgroupset: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteClusterGroupSet(hgroupset: HGROUPSET) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DeleteClusterGroupSet(hgroupset : HGROUPSET) -> u32); - DeleteClusterGroupSet(hgroupset.param().abi()) + DeleteClusterGroupSet(core::mem::transmute(hgroupset)) } #[inline] -pub unsafe fn DeleteClusterGroupSetEx(hgroupset: P0, lpszreason: P1) -> u32 +pub unsafe fn DeleteClusterGroupSetEx(hgroupset: HGROUPSET, lpszreason: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn DeleteClusterGroupSetEx(hgroupset : HGROUPSET, lpszreason : windows_core::PCWSTR) -> u32); - DeleteClusterGroupSetEx(hgroupset.param().abi(), lpszreason.param().abi()) + DeleteClusterGroupSetEx(core::mem::transmute(hgroupset), lpszreason.param().abi()) } #[inline] -pub unsafe fn DeleteClusterResource(hresource: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteClusterResource(hresource: HRESOURCE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DeleteClusterResource(hresource : HRESOURCE) -> u32); - DeleteClusterResource(hresource.param().abi()) + DeleteClusterResource(core::mem::transmute(hresource)) } #[inline] -pub unsafe fn DeleteClusterResourceEx(hresource: P0, lpszreason: P1) -> u32 +pub unsafe fn DeleteClusterResourceEx(hresource: HRESOURCE, lpszreason: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn DeleteClusterResourceEx(hresource : HRESOURCE, lpszreason : windows_core::PCWSTR) -> u32); - DeleteClusterResourceEx(hresource.param().abi(), lpszreason.param().abi()) + DeleteClusterResourceEx(core::mem::transmute(hresource), lpszreason.param().abi()) } #[inline] -pub unsafe fn DeleteClusterResourceType(hcluster: P0, lpszresourcetypename: P1) -> u32 +pub unsafe fn DeleteClusterResourceType(hcluster: HCLUSTER, lpszresourcetypename: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn DeleteClusterResourceType(hcluster : HCLUSTER, lpszresourcetypename : windows_core::PCWSTR) -> u32); - DeleteClusterResourceType(hcluster.param().abi(), lpszresourcetypename.param().abi()) + DeleteClusterResourceType(core::mem::transmute(hcluster), lpszresourcetypename.param().abi()) } #[inline] -pub unsafe fn DeleteClusterResourceTypeEx(hcluster: P0, lpsztypename: P1, lpszreason: P2) -> u32 +pub unsafe fn DeleteClusterResourceTypeEx(hcluster: HCLUSTER, lpsztypename: P1, lpszreason: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn DeleteClusterResourceTypeEx(hcluster : HCLUSTER, lpsztypename : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> u32); - DeleteClusterResourceTypeEx(hcluster.param().abi(), lpsztypename.param().abi(), lpszreason.param().abi()) + DeleteClusterResourceTypeEx(core::mem::transmute(hcluster), lpsztypename.param().abi(), lpszreason.param().abi()) } #[inline] -pub unsafe fn DestroyCluster(hcluster: P0, pfnprogresscallback: PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>, fdeletevirtualcomputerobjects: P3) -> u32 +pub unsafe fn DestroyCluster(hcluster: HCLUSTER, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>, fdeletevirtualcomputerobjects: P3) -> u32 where - P0: windows_core::Param, P3: 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(), core::mem::transmute(pfnprogresscallback), core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null())), fdeletevirtualcomputerobjects.param().abi()) + DestroyCluster(core::mem::transmute(hcluster), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed())), fdeletevirtualcomputerobjects.param().abi()) } #[inline] -pub unsafe fn DestroyClusterGroup(hgroup: P0) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn DestroyClusterGroup(hgroup: HGROUP) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DestroyClusterGroup(hgroup : HGROUP) -> u32); - DestroyClusterGroup(hgroup.param().abi()) + DestroyClusterGroup(core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn DestroyClusterGroupEx(hgroup: P0, lpszreason: P1) -> u32 +pub unsafe fn DestroyClusterGroupEx(hgroup: HGROUP, lpszreason: P1) -> u32 where - P0: windows_core::Param
, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn DestroyClusterGroupEx(hgroup : HGROUP, lpszreason : windows_core::PCWSTR) -> u32); - DestroyClusterGroupEx(hgroup.param().abi(), lpszreason.param().abi()) + DestroyClusterGroupEx(core::mem::transmute(hgroup), lpszreason.param().abi()) } #[inline] -pub unsafe fn DetermineCNOResTypeFromCluster(hcluster: P0, pcnorestype: *mut CLUSTER_MGMT_POINT_RESTYPE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DetermineCNOResTypeFromCluster(hcluster: HCLUSTER, pcnorestype: *mut CLUSTER_MGMT_POINT_RESTYPE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DetermineCNOResTypeFromCluster(hcluster : HCLUSTER, pcnorestype : *mut CLUSTER_MGMT_POINT_RESTYPE) -> u32); - DetermineCNOResTypeFromCluster(hcluster.param().abi(), core::mem::transmute(pcnorestype)) + DetermineCNOResTypeFromCluster(core::mem::transmute(hcluster), core::mem::transmute(pcnorestype)) } #[inline] pub unsafe fn DetermineCNOResTypeFromNodelist(cnodes: u32, ppsznodenames: *const windows_core::PCWSTR, pcnorestype: *mut CLUSTER_MGMT_POINT_RESTYPE) -> u32 { @@ -1615,12 +1192,9 @@ pub unsafe fn DetermineCNOResTypeFromNodelist(cnodes: u32, ppsznodenames: *const DetermineCNOResTypeFromNodelist(core::mem::transmute(cnodes), core::mem::transmute(ppsznodenames), core::mem::transmute(pcnorestype)) } #[inline] -pub unsafe fn DetermineClusterCloudTypeFromCluster(hcluster: P0, pcloudtype: *mut CLUSTER_CLOUD_TYPE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DetermineClusterCloudTypeFromCluster(hcluster: HCLUSTER, pcloudtype: *mut CLUSTER_CLOUD_TYPE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DetermineClusterCloudTypeFromCluster(hcluster : HCLUSTER, pcloudtype : *mut CLUSTER_CLOUD_TYPE) -> u32); - DetermineClusterCloudTypeFromCluster(hcluster.param().abi(), core::mem::transmute(pcloudtype)) + DetermineClusterCloudTypeFromCluster(core::mem::transmute(hcluster), core::mem::transmute(pcloudtype)) } #[inline] pub unsafe fn DetermineClusterCloudTypeFromNodelist(cnodes: u32, ppsznodenames: *const windows_core::PCWSTR, pcloudtype: *mut CLUSTER_CLOUD_TYPE) -> u32 { @@ -1628,46 +1202,35 @@ pub unsafe fn DetermineClusterCloudTypeFromNodelist(cnodes: u32, ppsznodenames: DetermineClusterCloudTypeFromNodelist(core::mem::transmute(cnodes), core::mem::transmute(ppsznodenames), core::mem::transmute(pcloudtype)) } #[inline] -pub unsafe fn EvictClusterNode(hnode: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EvictClusterNode(hnode: HNODE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn EvictClusterNode(hnode : HNODE) -> u32); - EvictClusterNode(hnode.param().abi()) + EvictClusterNode(core::mem::transmute(hnode)) } #[inline] -pub unsafe fn EvictClusterNodeEx(hnode: P0, dwtimeout: u32, phrcleanupstatus: *mut windows_core::HRESULT) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EvictClusterNodeEx(hnode: HNODE, dwtimeout: u32, phrcleanupstatus: *mut windows_core::HRESULT) -> u32 { windows_targets::link!("clusapi.dll" "system" fn EvictClusterNodeEx(hnode : HNODE, dwtimeout : u32, phrcleanupstatus : *mut windows_core::HRESULT) -> u32); - EvictClusterNodeEx(hnode.param().abi(), core::mem::transmute(dwtimeout), core::mem::transmute(phrcleanupstatus)) + EvictClusterNodeEx(core::mem::transmute(hnode), core::mem::transmute(dwtimeout), core::mem::transmute(phrcleanupstatus)) } #[inline] -pub unsafe fn EvictClusterNodeEx2(hnode: P0, dwtimeout: u32, phrcleanupstatus: *mut windows_core::HRESULT, lpszreason: P3) -> u32 +pub unsafe fn EvictClusterNodeEx2(hnode: HNODE, dwtimeout: u32, phrcleanupstatus: *mut windows_core::HRESULT, lpszreason: P3) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn EvictClusterNodeEx2(hnode : HNODE, dwtimeout : u32, phrcleanupstatus : *mut windows_core::HRESULT, lpszreason : windows_core::PCWSTR) -> u32); - EvictClusterNodeEx2(hnode.param().abi(), core::mem::transmute(dwtimeout), core::mem::transmute(phrcleanupstatus), lpszreason.param().abi()) + EvictClusterNodeEx2(core::mem::transmute(hnode), core::mem::transmute(dwtimeout), core::mem::transmute(phrcleanupstatus), lpszreason.param().abi()) } #[inline] -pub unsafe fn FailClusterResource(hresource: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn FailClusterResource(hresource: HRESOURCE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn FailClusterResource(hresource : HRESOURCE) -> u32); - FailClusterResource(hresource.param().abi()) + FailClusterResource(core::mem::transmute(hresource)) } #[inline] -pub unsafe fn FailClusterResourceEx(hresource: P0, lpszreason: P1) -> u32 +pub unsafe fn FailClusterResourceEx(hresource: HRESOURCE, lpszreason: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn FailClusterResourceEx(hresource : HRESOURCE, lpszreason : windows_core::PCWSTR) -> u32); - FailClusterResourceEx(hresource.param().abi(), lpszreason.param().abi()) + FailClusterResourceEx(core::mem::transmute(hresource), lpszreason.param().abi()) } #[inline] pub unsafe fn FreeClusterCrypt(pcryptinfo: *const core::ffi::c_void) -> u32 { @@ -1685,243 +1248,169 @@ pub unsafe fn FreeClusterHealthFaultArray(clusterhealthfaultarray: *mut CLUSTER_ FreeClusterHealthFaultArray(core::mem::transmute(clusterhealthfaultarray)) } #[inline] -pub unsafe fn GetClusterFromGroup(hgroup: P0) -> HCLUSTER -where - P0: windows_core::Param
, -{ +pub unsafe fn GetClusterFromGroup(hgroup: HGROUP) -> HCLUSTER { windows_targets::link!("clusapi.dll" "system" fn GetClusterFromGroup(hgroup : HGROUP) -> HCLUSTER); - GetClusterFromGroup(hgroup.param().abi()) + GetClusterFromGroup(core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn GetClusterFromNetInterface(hnetinterface: P0) -> HCLUSTER -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterFromNetInterface(hnetinterface: HNETINTERFACE) -> HCLUSTER { windows_targets::link!("clusapi.dll" "system" fn GetClusterFromNetInterface(hnetinterface : HNETINTERFACE) -> HCLUSTER); - GetClusterFromNetInterface(hnetinterface.param().abi()) + GetClusterFromNetInterface(core::mem::transmute(hnetinterface)) } #[inline] -pub unsafe fn GetClusterFromNetwork(hnetwork: P0) -> HCLUSTER -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterFromNetwork(hnetwork: HNETWORK) -> HCLUSTER { windows_targets::link!("clusapi.dll" "system" fn GetClusterFromNetwork(hnetwork : HNETWORK) -> HCLUSTER); - GetClusterFromNetwork(hnetwork.param().abi()) + GetClusterFromNetwork(core::mem::transmute(hnetwork)) } #[inline] -pub unsafe fn GetClusterFromNode(hnode: P0) -> HCLUSTER -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterFromNode(hnode: HNODE) -> HCLUSTER { windows_targets::link!("clusapi.dll" "system" fn GetClusterFromNode(hnode : HNODE) -> HCLUSTER); - GetClusterFromNode(hnode.param().abi()) + GetClusterFromNode(core::mem::transmute(hnode)) } #[inline] -pub unsafe fn GetClusterFromResource(hresource: P0) -> HCLUSTER -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterFromResource(hresource: HRESOURCE) -> HCLUSTER { windows_targets::link!("clusapi.dll" "system" fn GetClusterFromResource(hresource : HRESOURCE) -> HCLUSTER); - GetClusterFromResource(hresource.param().abi()) + GetClusterFromResource(core::mem::transmute(hresource)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetClusterGroupKey(hgroup: P0, samdesired: u32) -> windows_core::Result -where - P0: windows_core::Param
, -{ +pub unsafe fn GetClusterGroupKey(hgroup: HGROUP, samdesired: u32) -> windows_core::Result { windows_targets::link!("clusapi.dll" "system" fn GetClusterGroupKey(hgroup : HGROUP, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = GetClusterGroupKey(hgroup.param().abi(), core::mem::transmute(samdesired)); + let result__ = GetClusterGroupKey(core::mem::transmute(hgroup), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetClusterGroupState(hgroup: P0, lpsznodename: windows_core::PWSTR, lpcchnodename: Option<*mut u32>) -> CLUSTER_GROUP_STATE -where - P0: windows_core::Param
, -{ +pub unsafe fn GetClusterGroupState(hgroup: HGROUP, lpsznodename: Option, lpcchnodename: Option<*mut u32>) -> CLUSTER_GROUP_STATE { 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(core::ptr::null_mut()))) + GetClusterGroupState(core::mem::transmute(hgroup), core::mem::transmute(lpsznodename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchnodename.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetClusterInformation(hcluster: P0, lpszclustername: windows_core::PWSTR, lpcchclustername: *mut u32, lpclusterinfo: Option<*mut CLUSTERVERSIONINFO>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterInformation(hcluster: HCLUSTER, lpszclustername: windows_core::PWSTR, lpcchclustername: *mut u32, lpclusterinfo: Option<*mut CLUSTERVERSIONINFO>) -> u32 { 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), core::mem::transmute(lpcchclustername), core::mem::transmute(lpclusterinfo.unwrap_or(core::ptr::null_mut()))) + GetClusterInformation(core::mem::transmute(hcluster), core::mem::transmute(lpszclustername), core::mem::transmute(lpcchclustername), core::mem::transmute(lpclusterinfo.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetClusterKey(hcluster: P0, samdesired: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterKey(hcluster: HCLUSTER, samdesired: u32) -> windows_core::Result { windows_targets::link!("clusapi.dll" "system" fn GetClusterKey(hcluster : HCLUSTER, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = GetClusterKey(hcluster.param().abi(), core::mem::transmute(samdesired)); + let result__ = GetClusterKey(core::mem::transmute(hcluster), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetClusterNetInterface(hcluster: P0, lpsznodename: P1, lpsznetworkname: P2, lpszinterfacename: windows_core::PWSTR, lpcchinterfacename: *mut u32) -> u32 +pub unsafe fn GetClusterNetInterface(hcluster: HCLUSTER, lpsznodename: P1, lpsznetworkname: P2, lpszinterfacename: windows_core::PWSTR, lpcchinterfacename: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn GetClusterNetInterface(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, lpsznetworkname : windows_core::PCWSTR, lpszinterfacename : windows_core::PWSTR, lpcchinterfacename : *mut u32) -> u32); - GetClusterNetInterface(hcluster.param().abi(), lpsznodename.param().abi(), lpsznetworkname.param().abi(), core::mem::transmute(lpszinterfacename), core::mem::transmute(lpcchinterfacename)) + GetClusterNetInterface(core::mem::transmute(hcluster), lpsznodename.param().abi(), lpsznetworkname.param().abi(), core::mem::transmute(lpszinterfacename), core::mem::transmute(lpcchinterfacename)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetClusterNetInterfaceKey(hnetinterface: P0, samdesired: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNetInterfaceKey(hnetinterface: HNETINTERFACE, samdesired: u32) -> windows_core::Result { windows_targets::link!("clusapi.dll" "system" fn GetClusterNetInterfaceKey(hnetinterface : HNETINTERFACE, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = GetClusterNetInterfaceKey(hnetinterface.param().abi(), core::mem::transmute(samdesired)); + let result__ = GetClusterNetInterfaceKey(core::mem::transmute(hnetinterface), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetClusterNetInterfaceState(hnetinterface: P0) -> CLUSTER_NETINTERFACE_STATE -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNetInterfaceState(hnetinterface: HNETINTERFACE) -> CLUSTER_NETINTERFACE_STATE { windows_targets::link!("clusapi.dll" "system" fn GetClusterNetInterfaceState(hnetinterface : HNETINTERFACE) -> CLUSTER_NETINTERFACE_STATE); - GetClusterNetInterfaceState(hnetinterface.param().abi()) + GetClusterNetInterfaceState(core::mem::transmute(hnetinterface)) } #[inline] -pub unsafe fn GetClusterNetworkId(hnetwork: P0, lpsznetworkid: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNetworkId(hnetwork: HNETWORK, lpsznetworkid: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn GetClusterNetworkId(hnetwork : HNETWORK, lpsznetworkid : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - GetClusterNetworkId(hnetwork.param().abi(), core::mem::transmute(lpsznetworkid), core::mem::transmute(lpcchname)) + GetClusterNetworkId(core::mem::transmute(hnetwork), core::mem::transmute(lpsznetworkid), core::mem::transmute(lpcchname)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetClusterNetworkKey(hnetwork: P0, samdesired: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNetworkKey(hnetwork: HNETWORK, samdesired: u32) -> windows_core::Result { windows_targets::link!("clusapi.dll" "system" fn GetClusterNetworkKey(hnetwork : HNETWORK, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = GetClusterNetworkKey(hnetwork.param().abi(), core::mem::transmute(samdesired)); + let result__ = GetClusterNetworkKey(core::mem::transmute(hnetwork), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetClusterNetworkState(hnetwork: P0) -> CLUSTER_NETWORK_STATE -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNetworkState(hnetwork: HNETWORK) -> CLUSTER_NETWORK_STATE { windows_targets::link!("clusapi.dll" "system" fn GetClusterNetworkState(hnetwork : HNETWORK) -> CLUSTER_NETWORK_STATE); - GetClusterNetworkState(hnetwork.param().abi()) + GetClusterNetworkState(core::mem::transmute(hnetwork)) } #[inline] -pub unsafe fn GetClusterNodeId(hnode: P0, lpsznodeid: windows_core::PWSTR, lpcchname: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNodeId(hnode: Option, lpsznodeid: windows_core::PWSTR, lpcchname: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn GetClusterNodeId(hnode : HNODE, lpsznodeid : windows_core::PWSTR, lpcchname : *mut u32) -> u32); - GetClusterNodeId(hnode.param().abi(), core::mem::transmute(lpsznodeid), core::mem::transmute(lpcchname)) + GetClusterNodeId(core::mem::transmute(hnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsznodeid), core::mem::transmute(lpcchname)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetClusterNodeKey(hnode: P0, samdesired: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNodeKey(hnode: HNODE, samdesired: u32) -> windows_core::Result { windows_targets::link!("clusapi.dll" "system" fn GetClusterNodeKey(hnode : HNODE, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = GetClusterNodeKey(hnode.param().abi(), core::mem::transmute(samdesired)); + let result__ = GetClusterNodeKey(core::mem::transmute(hnode), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetClusterNodeState(hnode: P0) -> CLUSTER_NODE_STATE -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNodeState(hnode: HNODE) -> CLUSTER_NODE_STATE { windows_targets::link!("clusapi.dll" "system" fn GetClusterNodeState(hnode : HNODE) -> CLUSTER_NODE_STATE); - GetClusterNodeState(hnode.param().abi()) + GetClusterNodeState(core::mem::transmute(hnode)) } #[inline] -pub unsafe fn GetClusterNotify(hchange: P0, lpdwnotifykey: *mut usize, lpdwfiltertype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32, dwmilliseconds: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNotify(hchange: HCHANGE, lpdwnotifykey: *mut usize, lpdwfiltertype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32, dwmilliseconds: u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn GetClusterNotify(hchange : HCHANGE, lpdwnotifykey : *mut usize, lpdwfiltertype : *mut u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32, dwmilliseconds : u32) -> u32); - GetClusterNotify(hchange.param().abi(), core::mem::transmute(lpdwnotifykey), core::mem::transmute(lpdwfiltertype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname), core::mem::transmute(dwmilliseconds)) + GetClusterNotify(core::mem::transmute(hchange), core::mem::transmute(lpdwnotifykey), core::mem::transmute(lpdwfiltertype), core::mem::transmute(lpszname), core::mem::transmute(lpcchname), core::mem::transmute(dwmilliseconds)) } #[inline] -pub unsafe fn GetClusterNotifyV2(hchange: P0, lpdwnotifykey: *mut usize, pfilterandtype: Option<*mut NOTIFY_FILTER_AND_TYPE>, buffer: Option<*mut u8>, lpbbuffersize: Option<*mut u32>, lpszobjectid: windows_core::PWSTR, lpcchobjectid: Option<*mut u32>, lpszparentid: windows_core::PWSTR, lpcchparentid: Option<*mut u32>, lpszname: windows_core::PWSTR, lpcchname: Option<*mut u32>, lpsztype: windows_core::PWSTR, lpcchtype: Option<*mut u32>, dwmilliseconds: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterNotifyV2(hchange: HCHANGE, lpdwnotifykey: *mut usize, pfilterandtype: Option<*mut NOTIFY_FILTER_AND_TYPE>, buffer: Option<*mut u8>, lpbbuffersize: Option<*mut u32>, lpszobjectid: Option, lpcchobjectid: Option<*mut u32>, lpszparentid: Option, lpcchparentid: Option<*mut u32>, lpszname: Option, lpcchname: Option<*mut u32>, lpsztype: Option, lpcchtype: Option<*mut u32>, dwmilliseconds: Option) -> u32 { windows_targets::link!("clusapi.dll" "system" fn GetClusterNotifyV2(hchange : HCHANGE, lpdwnotifykey : *mut usize, pfilterandtype : *mut NOTIFY_FILTER_AND_TYPE, buffer : *mut u8, lpbbuffersize : *mut u32, lpszobjectid : windows_core::PWSTR, lpcchobjectid : *mut u32, lpszparentid : windows_core::PWSTR, lpcchparentid : *mut u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32, lpsztype : windows_core::PWSTR, lpcchtype : *mut u32, dwmilliseconds : u32) -> u32); GetClusterNotifyV2( - hchange.param().abi(), + core::mem::transmute(hchange), core::mem::transmute(lpdwnotifykey), - 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(core::ptr::null_mut())), - core::mem::transmute(lpszparentid), - core::mem::transmute(lpcchparentid.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(lpszname), - core::mem::transmute(lpcchname.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(lpsztype), - core::mem::transmute(lpcchtype.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(dwmilliseconds), + core::mem::transmute(pfilterandtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpbbuffersize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpszobjectid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcchobjectid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpszparentid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcchparentid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpszname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcchname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpsztype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcchtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwmilliseconds.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn GetClusterQuorumResource(hcluster: P0, lpszresourcename: windows_core::PWSTR, lpcchresourcename: *mut u32, lpszdevicename: windows_core::PWSTR, lpcchdevicename: *mut u32, lpdwmaxquorumlogsize: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterQuorumResource(hcluster: HCLUSTER, lpszresourcename: windows_core::PWSTR, lpcchresourcename: *mut u32, lpszdevicename: windows_core::PWSTR, lpcchdevicename: *mut u32, lpdwmaxquorumlogsize: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn GetClusterQuorumResource(hcluster : HCLUSTER, lpszresourcename : windows_core::PWSTR, lpcchresourcename : *mut u32, lpszdevicename : windows_core::PWSTR, lpcchdevicename : *mut u32, lpdwmaxquorumlogsize : *mut u32) -> u32); - GetClusterQuorumResource(hcluster.param().abi(), core::mem::transmute(lpszresourcename), core::mem::transmute(lpcchresourcename), core::mem::transmute(lpszdevicename), core::mem::transmute(lpcchdevicename), core::mem::transmute(lpdwmaxquorumlogsize)) + GetClusterQuorumResource(core::mem::transmute(hcluster), core::mem::transmute(lpszresourcename), core::mem::transmute(lpcchresourcename), core::mem::transmute(lpszdevicename), core::mem::transmute(lpcchdevicename), core::mem::transmute(lpdwmaxquorumlogsize)) } #[inline] -pub unsafe fn GetClusterResourceDependencyExpression(hresource: P0, lpszdependencyexpression: windows_core::PWSTR, lpcchdependencyexpression: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterResourceDependencyExpression(hresource: HRESOURCE, lpszdependencyexpression: Option, lpcchdependencyexpression: *mut u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn GetClusterResourceDependencyExpression(hresource : HRESOURCE, lpszdependencyexpression : windows_core::PWSTR, lpcchdependencyexpression : *mut u32) -> u32); - GetClusterResourceDependencyExpression(hresource.param().abi(), core::mem::transmute(lpszdependencyexpression), core::mem::transmute(lpcchdependencyexpression)) + GetClusterResourceDependencyExpression(core::mem::transmute(hresource), core::mem::transmute(lpszdependencyexpression.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchdependencyexpression)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetClusterResourceKey(hresource: P0, samdesired: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterResourceKey(hresource: HRESOURCE, samdesired: u32) -> windows_core::Result { windows_targets::link!("clusapi.dll" "system" fn GetClusterResourceKey(hresource : HRESOURCE, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = GetClusterResourceKey(hresource.param().abi(), core::mem::transmute(samdesired)); + let result__ = GetClusterResourceKey(core::mem::transmute(hresource), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetClusterResourceNetworkName(hresource: P0, lpbuffer: windows_core::PWSTR, nsize: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterResourceNetworkName(hresource: HRESOURCE, lpbuffer: windows_core::PWSTR, nsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("clusapi.dll" "system" fn GetClusterResourceNetworkName(hresource : HRESOURCE, lpbuffer : windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetClusterResourceNetworkName(hresource.param().abi(), core::mem::transmute(lpbuffer), core::mem::transmute(nsize)).ok() + GetClusterResourceNetworkName(core::mem::transmute(hresource), core::mem::transmute(lpbuffer), core::mem::transmute(nsize)).ok() } #[inline] -pub unsafe fn GetClusterResourceState(hresource: P0, lpsznodename: windows_core::PWSTR, lpcchnodename: Option<*mut u32>, lpszgroupname: windows_core::PWSTR, lpcchgroupname: Option<*mut u32>) -> CLUSTER_RESOURCE_STATE -where - P0: windows_core::Param, -{ +pub unsafe fn GetClusterResourceState(hresource: HRESOURCE, lpsznodename: Option, lpcchnodename: Option<*mut u32>, lpszgroupname: Option, lpcchgroupname: Option<*mut u32>) -> CLUSTER_RESOURCE_STATE { 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(core::ptr::null_mut())), core::mem::transmute(lpszgroupname), core::mem::transmute(lpcchgroupname.unwrap_or(core::ptr::null_mut()))) + GetClusterResourceState(core::mem::transmute(hresource), core::mem::transmute(lpsznodename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchnodename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpszgroupname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchgroupname.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetClusterResourceTypeKey(hcluster: P0, lpsztypename: P1, samdesired: u32) -> windows_core::Result +pub unsafe fn GetClusterResourceTypeKey(hcluster: HCLUSTER, lpsztypename: P1, samdesired: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn GetClusterResourceTypeKey(hcluster : HCLUSTER, lpsztypename : windows_core::PCWSTR, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = GetClusterResourceTypeKey(hcluster.param().abi(), lpsztypename.param().abi(), core::mem::transmute(samdesired)); + let result__ = GetClusterResourceTypeKey(core::mem::transmute(hcluster), lpsztypename.param().abi(), core::mem::transmute(samdesired)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1941,12 +1430,9 @@ where GetNodeClusterState(lpsznodename.param().abi(), core::mem::transmute(pdwclusterstate)) } #[inline] -pub unsafe fn GetNotifyEventHandle(hchange: P0, lphtargetevent: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetNotifyEventHandle(hchange: HCHANGE, lphtargetevent: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn GetNotifyEventHandle(hchange : HCHANGE, lphtargetevent : *mut super::super::Foundation:: HANDLE) -> u32); - GetNotifyEventHandle(hchange.param().abi(), core::mem::transmute(lphtargetevent)) + GetNotifyEventHandle(core::mem::transmute(hchange), core::mem::transmute(lphtargetevent)) } #[inline] pub unsafe fn InitializeClusterHealthFault(clusterhealthfault: *mut CLUSTER_HEALTH_FAULT) -> u32 { @@ -1967,135 +1453,94 @@ where IsFileOnClusterSharedVolume(lpszpathname.param().abi(), core::mem::transmute(pbfileisonsharedvolume)) } #[inline] -pub unsafe fn MoveClusterGroup(hgroup: P0, hdestinationnode: P1) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param, -{ +pub unsafe fn MoveClusterGroup(hgroup: HGROUP, hdestinationnode: Option) -> u32 { windows_targets::link!("clusapi.dll" "system" fn MoveClusterGroup(hgroup : HGROUP, hdestinationnode : HNODE) -> u32); - MoveClusterGroup(hgroup.param().abi(), hdestinationnode.param().abi()) + MoveClusterGroup(core::mem::transmute(hgroup), core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MoveClusterGroupEx(hgroup: P0, hdestinationnode: P1, dwmoveflags: u32, lpinbuffer: Option<&[u8]>) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param, -{ +pub unsafe fn MoveClusterGroupEx(hgroup: HGROUP, hdestinationnode: Option, dwmoveflags: u32, lpinbuffer: Option<&[u8]>) -> u32 { windows_targets::link!("clusapi.dll" "system" fn MoveClusterGroupEx(hgroup : HGROUP, hdestinationnode : HNODE, dwmoveflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - MoveClusterGroupEx(hgroup.param().abi(), hdestinationnode.param().abi(), core::mem::transmute(dwmoveflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + MoveClusterGroupEx(core::mem::transmute(hgroup), core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmoveflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn MoveClusterGroupEx2(hgroup: P0, hdestinationnode: P1, dwmoveflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P5) -> u32 +pub unsafe fn MoveClusterGroupEx2(hgroup: HGROUP, hdestinationnode: Option, dwmoveflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P5) -> u32 where - P0: windows_core::Param
, - P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn MoveClusterGroupEx2(hgroup : HGROUP, hdestinationnode : HNODE, dwmoveflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : windows_core::PCWSTR) -> u32); - MoveClusterGroupEx2(hgroup.param().abi(), hdestinationnode.param().abi(), core::mem::transmute(dwmoveflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.param().abi()) + MoveClusterGroupEx2(core::mem::transmute(hgroup), core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmoveflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.param().abi()) } #[inline] -pub unsafe fn OfflineClusterGroup(hgroup: P0) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn OfflineClusterGroup(hgroup: HGROUP) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OfflineClusterGroup(hgroup : HGROUP) -> u32); - OfflineClusterGroup(hgroup.param().abi()) + OfflineClusterGroup(core::mem::transmute(hgroup)) } #[inline] -pub unsafe fn OfflineClusterGroupEx(hgroup: P0, dwofflineflags: u32, lpinbuffer: Option<&[u8]>) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn OfflineClusterGroupEx(hgroup: HGROUP, dwofflineflags: u32, lpinbuffer: Option<&[u8]>) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OfflineClusterGroupEx(hgroup : HGROUP, dwofflineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - OfflineClusterGroupEx(hgroup.param().abi(), core::mem::transmute(dwofflineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + OfflineClusterGroupEx(core::mem::transmute(hgroup), core::mem::transmute(dwofflineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn OfflineClusterGroupEx2(hgroup: P0, dwofflineflags: u32, lpinbuffer: Option<*const u8>, cbinbuffersize: u32, lpszreason: P4) -> u32 +pub unsafe fn OfflineClusterGroupEx2(hgroup: HGROUP, dwofflineflags: u32, lpinbuffer: Option<*const u8>, cbinbuffersize: u32, lpszreason: P4) -> u32 where - P0: windows_core::Param
, P4: 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(), core::mem::transmute(dwofflineflags), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffersize), lpszreason.param().abi()) + OfflineClusterGroupEx2(core::mem::transmute(hgroup), core::mem::transmute(dwofflineflags), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffersize), lpszreason.param().abi()) } #[inline] -pub unsafe fn OfflineClusterResource(hresource: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn OfflineClusterResource(hresource: HRESOURCE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OfflineClusterResource(hresource : HRESOURCE) -> u32); - OfflineClusterResource(hresource.param().abi()) + OfflineClusterResource(core::mem::transmute(hresource)) } #[inline] -pub unsafe fn OfflineClusterResourceEx(hresource: P0, dwofflineflags: u32, lpinbuffer: Option<&[u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn OfflineClusterResourceEx(hresource: HRESOURCE, dwofflineflags: u32, lpinbuffer: Option<&[u8]>) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OfflineClusterResourceEx(hresource : HRESOURCE, dwofflineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - OfflineClusterResourceEx(hresource.param().abi(), core::mem::transmute(dwofflineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + OfflineClusterResourceEx(core::mem::transmute(hresource), core::mem::transmute(dwofflineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn OfflineClusterResourceEx2(hresource: P0, dwofflineflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P4) -> u32 +pub unsafe fn OfflineClusterResourceEx2(hresource: HRESOURCE, dwofflineflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P4) -> u32 where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OfflineClusterResourceEx2(hresource : HRESOURCE, dwofflineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : windows_core::PCWSTR) -> u32); - OfflineClusterResourceEx2(hresource.param().abi(), core::mem::transmute(dwofflineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.param().abi()) + OfflineClusterResourceEx2(core::mem::transmute(hresource), core::mem::transmute(dwofflineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.param().abi()) } #[inline] -pub unsafe fn OnlineClusterGroup(hgroup: P0, hdestinationnode: P1) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param, -{ +pub unsafe fn OnlineClusterGroup(hgroup: HGROUP, hdestinationnode: Option) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OnlineClusterGroup(hgroup : HGROUP, hdestinationnode : HNODE) -> u32); - OnlineClusterGroup(hgroup.param().abi(), hdestinationnode.param().abi()) + OnlineClusterGroup(core::mem::transmute(hgroup), core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OnlineClusterGroupEx(hgroup: P0, hdestinationnode: P1, dwonlineflags: u32, lpinbuffer: Option<&[u8]>) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param, -{ +pub unsafe fn OnlineClusterGroupEx(hgroup: HGROUP, hdestinationnode: Option, dwonlineflags: u32, lpinbuffer: Option<&[u8]>) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OnlineClusterGroupEx(hgroup : HGROUP, hdestinationnode : HNODE, dwonlineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - OnlineClusterGroupEx(hgroup.param().abi(), hdestinationnode.param().abi(), core::mem::transmute(dwonlineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + OnlineClusterGroupEx(core::mem::transmute(hgroup), core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwonlineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn OnlineClusterGroupEx2(hgroup: P0, hdestinationnode: P1, dwonlineflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P5) -> u32 +pub unsafe fn OnlineClusterGroupEx2(hgroup: HGROUP, hdestinationnode: Option, dwonlineflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P5) -> u32 where - P0: windows_core::Param
, - P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OnlineClusterGroupEx2(hgroup : HGROUP, hdestinationnode : HNODE, dwonlineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : windows_core::PCWSTR) -> u32); - OnlineClusterGroupEx2(hgroup.param().abi(), hdestinationnode.param().abi(), core::mem::transmute(dwonlineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.param().abi()) + OnlineClusterGroupEx2(core::mem::transmute(hgroup), core::mem::transmute(hdestinationnode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwonlineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.param().abi()) } #[inline] -pub unsafe fn OnlineClusterResource(hresource: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn OnlineClusterResource(hresource: HRESOURCE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OnlineClusterResource(hresource : HRESOURCE) -> u32); - OnlineClusterResource(hresource.param().abi()) + OnlineClusterResource(core::mem::transmute(hresource)) } #[inline] -pub unsafe fn OnlineClusterResourceEx(hresource: P0, dwonlineflags: u32, lpinbuffer: Option<&[u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn OnlineClusterResourceEx(hresource: HRESOURCE, dwonlineflags: u32, lpinbuffer: Option<&[u8]>) -> u32 { windows_targets::link!("clusapi.dll" "system" fn OnlineClusterResourceEx(hresource : HRESOURCE, dwonlineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - OnlineClusterResourceEx(hresource.param().abi(), core::mem::transmute(dwonlineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + OnlineClusterResourceEx(core::mem::transmute(hresource), core::mem::transmute(dwonlineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn OnlineClusterResourceEx2(hresource: P0, dwonlineflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P4) -> u32 +pub unsafe fn OnlineClusterResourceEx2(hresource: HRESOURCE, dwonlineflags: u32, lpinbuffer: Option<&[u8]>, lpszreason: P4) -> u32 where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OnlineClusterResourceEx2(hresource : HRESOURCE, dwonlineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : windows_core::PCWSTR) -> u32); - OnlineClusterResourceEx2(hresource.param().abi(), core::mem::transmute(dwonlineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.param().abi()) + OnlineClusterResourceEx2(core::mem::transmute(hresource), core::mem::transmute(dwonlineflags), core::mem::transmute(lpinbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.param().abi()) } #[inline] pub unsafe fn OpenCluster(lpszclustername: P0) -> HCLUSTER @@ -2128,143 +1573,122 @@ 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(), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess.unwrap_or(core::ptr::null_mut()))) + OpenClusterEx(lpszclustername.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OpenClusterGroup(hcluster: P0, lpszgroupname: P1) -> HGROUP +pub unsafe fn OpenClusterGroup(hcluster: HCLUSTER, lpszgroupname: P1) -> HGROUP where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterGroup(hcluster : HCLUSTER, lpszgroupname : windows_core::PCWSTR) -> HGROUP); - OpenClusterGroup(hcluster.param().abi(), lpszgroupname.param().abi()) + OpenClusterGroup(core::mem::transmute(hcluster), lpszgroupname.param().abi()) } #[inline] -pub unsafe fn OpenClusterGroupEx(hcluster: P0, lpszgroupname: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HGROUP +pub unsafe fn OpenClusterGroupEx(hcluster: HCLUSTER, lpszgroupname: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HGROUP where - P0: windows_core::Param, 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) + OpenClusterGroupEx(core::mem::transmute(hcluster), lpszgroupname.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OpenClusterGroupSet(hcluster: P0, lpszgroupsetname: P1) -> HGROUPSET +pub unsafe fn OpenClusterGroupSet(hcluster: HCLUSTER, lpszgroupsetname: P1) -> HGROUPSET where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterGroupSet(hcluster : HCLUSTER, lpszgroupsetname : windows_core::PCWSTR) -> HGROUPSET); - OpenClusterGroupSet(hcluster.param().abi(), lpszgroupsetname.param().abi()) + OpenClusterGroupSet(core::mem::transmute(hcluster), lpszgroupsetname.param().abi()) } #[inline] -pub unsafe fn OpenClusterNetInterface(hcluster: P0, lpszinterfacename: P1) -> HNETINTERFACE +pub unsafe fn OpenClusterNetInterface(hcluster: HCLUSTER, lpszinterfacename: P1) -> HNETINTERFACE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNetInterface(hcluster : HCLUSTER, lpszinterfacename : windows_core::PCWSTR) -> HNETINTERFACE); - OpenClusterNetInterface(hcluster.param().abi(), lpszinterfacename.param().abi()) + OpenClusterNetInterface(core::mem::transmute(hcluster), lpszinterfacename.param().abi()) } #[inline] -pub unsafe fn OpenClusterNetInterfaceEx(hcluster: P0, lpszinterfacename: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HNETINTERFACE +pub unsafe fn OpenClusterNetInterfaceEx(hcluster: HCLUSTER, lpszinterfacename: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HNETINTERFACE where - P0: windows_core::Param, 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) + OpenClusterNetInterfaceEx(core::mem::transmute(hcluster), lpszinterfacename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OpenClusterNetwork(hcluster: P0, lpsznetworkname: P1) -> HNETWORK +pub unsafe fn OpenClusterNetwork(hcluster: HCLUSTER, lpsznetworkname: P1) -> HNETWORK where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNetwork(hcluster : HCLUSTER, lpsznetworkname : windows_core::PCWSTR) -> HNETWORK); - OpenClusterNetwork(hcluster.param().abi(), lpsznetworkname.param().abi()) + OpenClusterNetwork(core::mem::transmute(hcluster), lpsznetworkname.param().abi()) } #[inline] -pub unsafe fn OpenClusterNetworkEx(hcluster: P0, lpsznetworkname: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HNETWORK +pub unsafe fn OpenClusterNetworkEx(hcluster: HCLUSTER, lpsznetworkname: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HNETWORK where - P0: windows_core::Param, 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) + OpenClusterNetworkEx(core::mem::transmute(hcluster), lpsznetworkname.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OpenClusterNode(hcluster: P0, lpsznodename: P1) -> HNODE +pub unsafe fn OpenClusterNode(hcluster: HCLUSTER, lpsznodename: P1) -> HNODE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNode(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR) -> HNODE); - OpenClusterNode(hcluster.param().abi(), lpsznodename.param().abi()) + OpenClusterNode(core::mem::transmute(hcluster), lpsznodename.param().abi()) } #[inline] -pub unsafe fn OpenClusterNodeById(hcluster: P0, nodeid: u32) -> HNODE -where - P0: windows_core::Param, -{ +pub unsafe fn OpenClusterNodeById(hcluster: HCLUSTER, nodeid: u32) -> HNODE { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNodeById(hcluster : HCLUSTER, nodeid : u32) -> HNODE); - OpenClusterNodeById(hcluster.param().abi(), core::mem::transmute(nodeid)) + OpenClusterNodeById(core::mem::transmute(hcluster), core::mem::transmute(nodeid)) } #[inline] -pub unsafe fn OpenClusterNodeEx(hcluster: P0, lpsznodename: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HNODE +pub unsafe fn OpenClusterNodeEx(hcluster: HCLUSTER, lpsznodename: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HNODE where - P0: windows_core::Param, 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) + OpenClusterNodeEx(core::mem::transmute(hcluster), lpsznodename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OpenClusterResource(hcluster: P0, lpszresourcename: P1) -> HRESOURCE +pub unsafe fn OpenClusterResource(hcluster: HCLUSTER, lpszresourcename: P1) -> HRESOURCE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterResource(hcluster : HCLUSTER, lpszresourcename : windows_core::PCWSTR) -> HRESOURCE); - OpenClusterResource(hcluster.param().abi(), lpszresourcename.param().abi()) + OpenClusterResource(core::mem::transmute(hcluster), lpszresourcename.param().abi()) } #[inline] -pub unsafe fn OpenClusterResourceEx(hcluster: P0, lpszresourcename: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HRESOURCE +pub unsafe fn OpenClusterResourceEx(hcluster: HCLUSTER, lpszresourcename: P1, dwdesiredaccess: u32, lpdwgrantedaccess: Option<*mut u32>) -> HRESOURCE where - P0: windows_core::Param, 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) + OpenClusterResourceEx(core::mem::transmute(hcluster), lpszresourcename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PauseClusterNode(hnode: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PauseClusterNode(hnode: HNODE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn PauseClusterNode(hnode : HNODE) -> u32); - PauseClusterNode(hnode.param().abi()) + PauseClusterNode(core::mem::transmute(hnode)) } #[inline] -pub unsafe fn PauseClusterNodeEx(hnode: P0, bdrainnode: P1, dwpauseflags: u32, hnodedraintarget: P3) -> u32 +pub unsafe fn PauseClusterNodeEx(hnode: HNODE, bdrainnode: P1, dwpauseflags: u32, hnodedraintarget: Option) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn PauseClusterNodeEx(hnode : HNODE, bdrainnode : super::super::Foundation:: BOOL, dwpauseflags : u32, hnodedraintarget : HNODE) -> u32); - PauseClusterNodeEx(hnode.param().abi(), bdrainnode.param().abi(), core::mem::transmute(dwpauseflags), hnodedraintarget.param().abi()) + PauseClusterNodeEx(core::mem::transmute(hnode), bdrainnode.param().abi(), core::mem::transmute(dwpauseflags), core::mem::transmute(hnodedraintarget.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PauseClusterNodeEx2(hnode: P0, bdrainnode: P1, dwpauseflags: u32, hnodedraintarget: P3, lpszreason: P4) -> u32 +pub unsafe fn PauseClusterNodeEx2(hnode: HNODE, bdrainnode: P1, dwpauseflags: u32, hnodedraintarget: Option, lpszreason: P4) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn PauseClusterNodeEx2(hnode : HNODE, bdrainnode : super::super::Foundation:: BOOL, dwpauseflags : u32, hnodedraintarget : HNODE, lpszreason : windows_core::PCWSTR) -> u32); - PauseClusterNodeEx2(hnode.param().abi(), bdrainnode.param().abi(), core::mem::transmute(dwpauseflags), hnodedraintarget.param().abi(), lpszreason.param().abi()) + PauseClusterNodeEx2(core::mem::transmute(hnode), bdrainnode.param().abi(), core::mem::transmute(dwpauseflags), core::mem::transmute(hnodedraintarget.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] pub unsafe fn QueryAppInstanceVersion(appinstanceid: *const windows_core::GUID, instanceversionhigh: *mut u64, instanceversionlow: *mut u64, versionstatus: *mut super::super::Foundation::NTSTATUS) -> u32 { @@ -2272,13 +1696,12 @@ pub unsafe fn QueryAppInstanceVersion(appinstanceid: *const windows_core::GUID, QueryAppInstanceVersion(core::mem::transmute(appinstanceid), core::mem::transmute(instanceversionhigh), core::mem::transmute(instanceversionlow), core::mem::transmute(versionstatus)) } #[inline] -pub unsafe fn RegisterAppInstance(processhandle: P0, appinstanceid: *const windows_core::GUID, childreninheritappinstance: P2) -> u32 +pub unsafe fn RegisterAppInstance(processhandle: super::super::Foundation::HANDLE, appinstanceid: *const windows_core::GUID, childreninheritappinstance: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntlanman.dll" "system" fn RegisterAppInstance(processhandle : super::super::Foundation:: HANDLE, appinstanceid : *const windows_core::GUID, childreninheritappinstance : super::super::Foundation:: BOOL) -> u32); - RegisterAppInstance(processhandle.param().abi(), core::mem::transmute(appinstanceid), childreninheritappinstance.param().abi()) + RegisterAppInstance(core::mem::transmute(processhandle), core::mem::transmute(appinstanceid), childreninheritappinstance.param().abi()) } #[inline] pub unsafe fn RegisterAppInstanceVersion(appinstanceid: *const windows_core::GUID, instanceversionhigh: u64, instanceversionlow: u64) -> u32 { @@ -2286,172 +1709,123 @@ pub unsafe fn RegisterAppInstanceVersion(appinstanceid: *const windows_core::GUI RegisterAppInstanceVersion(core::mem::transmute(appinstanceid), core::mem::transmute(instanceversionhigh), core::mem::transmute(instanceversionlow)) } #[inline] -pub unsafe fn RegisterClusterNotify(hchange: P0, dwfiltertype: u32, hobject: P2, dwnotifykey: usize) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn RegisterClusterNotify(hchange: HCHANGE, dwfiltertype: u32, hobject: super::super::Foundation::HANDLE, dwnotifykey: usize) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RegisterClusterNotify(hchange : HCHANGE, dwfiltertype : u32, hobject : super::super::Foundation:: HANDLE, dwnotifykey : usize) -> u32); - RegisterClusterNotify(hchange.param().abi(), core::mem::transmute(dwfiltertype), hobject.param().abi(), core::mem::transmute(dwnotifykey)) + RegisterClusterNotify(core::mem::transmute(hchange), core::mem::transmute(dwfiltertype), core::mem::transmute(hobject), core::mem::transmute(dwnotifykey)) } #[inline] -pub unsafe fn RegisterClusterNotifyV2(hchange: P0, filter: NOTIFY_FILTER_AND_TYPE, hobject: P2, dwnotifykey: usize) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn RegisterClusterNotifyV2(hchange: HCHANGE, filter: NOTIFY_FILTER_AND_TYPE, hobject: super::super::Foundation::HANDLE, dwnotifykey: usize) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RegisterClusterNotifyV2(hchange : HCHANGE, filter : NOTIFY_FILTER_AND_TYPE, hobject : super::super::Foundation:: HANDLE, dwnotifykey : usize) -> u32); - RegisterClusterNotifyV2(hchange.param().abi(), core::mem::transmute(filter), hobject.param().abi(), core::mem::transmute(dwnotifykey)) + RegisterClusterNotifyV2(core::mem::transmute(hchange), core::mem::transmute(filter), core::mem::transmute(hobject), core::mem::transmute(dwnotifykey)) } #[inline] -pub unsafe fn RegisterClusterResourceTypeNotifyV2(hchange: P0, hcluster: P1, flags: i64, restypename: P3, dwnotifykey: usize) -> u32 +pub unsafe fn RegisterClusterResourceTypeNotifyV2(hchange: HCHANGE, hcluster: HCLUSTER, flags: i64, restypename: P3, dwnotifykey: usize) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RegisterClusterResourceTypeNotifyV2(hchange : HCHANGE, hcluster : HCLUSTER, flags : i64, restypename : windows_core::PCWSTR, dwnotifykey : usize) -> u32); - RegisterClusterResourceTypeNotifyV2(hchange.param().abi(), hcluster.param().abi(), core::mem::transmute(flags), restypename.param().abi(), core::mem::transmute(dwnotifykey)) + RegisterClusterResourceTypeNotifyV2(core::mem::transmute(hchange), core::mem::transmute(hcluster), core::mem::transmute(flags), restypename.param().abi(), core::mem::transmute(dwnotifykey)) } #[inline] -pub unsafe fn RemoveClusterGroupDependency(hgroup: P0, hdependson: P1) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param
, -{ +pub unsafe fn RemoveClusterGroupDependency(hgroup: HGROUP, hdependson: HGROUP) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterGroupDependency(hgroup : HGROUP, hdependson : HGROUP) -> u32); - RemoveClusterGroupDependency(hgroup.param().abi(), hdependson.param().abi()) + RemoveClusterGroupDependency(core::mem::transmute(hgroup), core::mem::transmute(hdependson)) } #[inline] -pub unsafe fn RemoveClusterGroupDependencyEx(hgroup: P0, hdependson: P1, lpszreason: P2) -> u32 +pub unsafe fn RemoveClusterGroupDependencyEx(hgroup: HGROUP, hdependson: HGROUP, lpszreason: P2) -> u32 where - P0: windows_core::Param
, - P1: windows_core::Param
, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterGroupDependencyEx(hgroup : HGROUP, hdependson : HGROUP, lpszreason : windows_core::PCWSTR) -> u32); - RemoveClusterGroupDependencyEx(hgroup.param().abi(), hdependson.param().abi(), lpszreason.param().abi()) + RemoveClusterGroupDependencyEx(core::mem::transmute(hgroup), core::mem::transmute(hdependson), lpszreason.param().abi()) } #[inline] -pub unsafe fn RemoveClusterGroupSetDependency(hgroupset: P0, hdependson: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RemoveClusterGroupSetDependency(hgroupset: HGROUPSET, hdependson: HGROUPSET) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterGroupSetDependency(hgroupset : HGROUPSET, hdependson : HGROUPSET) -> u32); - RemoveClusterGroupSetDependency(hgroupset.param().abi(), hdependson.param().abi()) + RemoveClusterGroupSetDependency(core::mem::transmute(hgroupset), core::mem::transmute(hdependson)) } #[inline] -pub unsafe fn RemoveClusterGroupSetDependencyEx(hgroupset: P0, hdependson: P1, lpszreason: P2) -> u32 +pub unsafe fn RemoveClusterGroupSetDependencyEx(hgroupset: HGROUPSET, hdependson: HGROUPSET, lpszreason: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterGroupSetDependencyEx(hgroupset : HGROUPSET, hdependson : HGROUPSET, lpszreason : windows_core::PCWSTR) -> u32); - RemoveClusterGroupSetDependencyEx(hgroupset.param().abi(), hdependson.param().abi(), lpszreason.param().abi()) + RemoveClusterGroupSetDependencyEx(core::mem::transmute(hgroupset), core::mem::transmute(hdependson), lpszreason.param().abi()) } #[inline] -pub unsafe fn RemoveClusterGroupToGroupSetDependency(hgroup: P0, hdependson: P1) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param, -{ +pub unsafe fn RemoveClusterGroupToGroupSetDependency(hgroup: HGROUP, hdependson: HGROUPSET) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterGroupToGroupSetDependency(hgroup : HGROUP, hdependson : HGROUPSET) -> u32); - RemoveClusterGroupToGroupSetDependency(hgroup.param().abi(), hdependson.param().abi()) + RemoveClusterGroupToGroupSetDependency(core::mem::transmute(hgroup), core::mem::transmute(hdependson)) } #[inline] -pub unsafe fn RemoveClusterGroupToGroupSetDependencyEx(hgroup: P0, hdependson: P1, lpszreason: P2) -> u32 +pub unsafe fn RemoveClusterGroupToGroupSetDependencyEx(hgroup: HGROUP, hdependson: HGROUPSET, lpszreason: P2) -> u32 where - P0: windows_core::Param
, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterGroupToGroupSetDependencyEx(hgroup : HGROUP, hdependson : HGROUPSET, lpszreason : windows_core::PCWSTR) -> u32); - RemoveClusterGroupToGroupSetDependencyEx(hgroup.param().abi(), hdependson.param().abi(), lpszreason.param().abi()) + RemoveClusterGroupToGroupSetDependencyEx(core::mem::transmute(hgroup), core::mem::transmute(hdependson), lpszreason.param().abi()) } #[inline] -pub unsafe fn RemoveClusterNameAccount(hcluster: P0, bdeletecomputerobjects: P1) -> u32 +pub unsafe fn RemoveClusterNameAccount(hcluster: HCLUSTER, bdeletecomputerobjects: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterNameAccount(hcluster : HCLUSTER, bdeletecomputerobjects : super::super::Foundation:: BOOL) -> u32); - RemoveClusterNameAccount(hcluster.param().abi(), bdeletecomputerobjects.param().abi()) + RemoveClusterNameAccount(core::mem::transmute(hcluster), bdeletecomputerobjects.param().abi()) } #[inline] -pub unsafe fn RemoveClusterResourceDependency(hresource: P0, hdependson: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RemoveClusterResourceDependency(hresource: HRESOURCE, hdependson: HRESOURCE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterResourceDependency(hresource : HRESOURCE, hdependson : HRESOURCE) -> u32); - RemoveClusterResourceDependency(hresource.param().abi(), hdependson.param().abi()) + RemoveClusterResourceDependency(core::mem::transmute(hresource), core::mem::transmute(hdependson)) } #[inline] -pub unsafe fn RemoveClusterResourceDependencyEx(hresource: P0, hdependson: P1, lpszreason: P2) -> u32 +pub unsafe fn RemoveClusterResourceDependencyEx(hresource: HRESOURCE, hdependson: HRESOURCE, lpszreason: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterResourceDependencyEx(hresource : HRESOURCE, hdependson : HRESOURCE, lpszreason : windows_core::PCWSTR) -> u32); - RemoveClusterResourceDependencyEx(hresource.param().abi(), hdependson.param().abi(), lpszreason.param().abi()) + RemoveClusterResourceDependencyEx(core::mem::transmute(hresource), core::mem::transmute(hdependson), lpszreason.param().abi()) } #[inline] -pub unsafe fn RemoveClusterResourceNode(hresource: P0, hnode: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RemoveClusterResourceNode(hresource: HRESOURCE, hnode: HNODE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterResourceNode(hresource : HRESOURCE, hnode : HNODE) -> u32); - RemoveClusterResourceNode(hresource.param().abi(), hnode.param().abi()) + RemoveClusterResourceNode(core::mem::transmute(hresource), core::mem::transmute(hnode)) } #[inline] -pub unsafe fn RemoveClusterResourceNodeEx(hresource: P0, hnode: P1, lpszreason: P2) -> u32 +pub unsafe fn RemoveClusterResourceNodeEx(hresource: HRESOURCE, hnode: HNODE, lpszreason: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterResourceNodeEx(hresource : HRESOURCE, hnode : HNODE, lpszreason : windows_core::PCWSTR) -> u32); - RemoveClusterResourceNodeEx(hresource.param().abi(), hnode.param().abi(), lpszreason.param().abi()) + RemoveClusterResourceNodeEx(core::mem::transmute(hresource), core::mem::transmute(hnode), lpszreason.param().abi()) } #[inline] -pub unsafe fn RemoveClusterStorageNode(hcluster: P0, lpszclusterstorageenclosurename: P1, dwtimeout: u32, dwflags: u32) -> u32 +pub unsafe fn RemoveClusterStorageNode(hcluster: HCLUSTER, lpszclusterstorageenclosurename: P1, dwtimeout: u32, dwflags: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterStorageNode(hcluster : HCLUSTER, lpszclusterstorageenclosurename : windows_core::PCWSTR, dwtimeout : u32, dwflags : u32) -> u32); - RemoveClusterStorageNode(hcluster.param().abi(), lpszclusterstorageenclosurename.param().abi(), core::mem::transmute(dwtimeout), core::mem::transmute(dwflags)) + RemoveClusterStorageNode(core::mem::transmute(hcluster), lpszclusterstorageenclosurename.param().abi(), core::mem::transmute(dwtimeout), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn RemoveCrossClusterGroupSetDependency(hdependentgroupset: P0, lpremoteclustername: P1, lpremotegroupsetname: P2) -> u32 +pub unsafe fn RemoveCrossClusterGroupSetDependency(hdependentgroupset: HGROUPSET, lpremoteclustername: P1, lpremotegroupsetname: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RemoveCrossClusterGroupSetDependency(hdependentgroupset : HGROUPSET, lpremoteclustername : windows_core::PCWSTR, lpremotegroupsetname : windows_core::PCWSTR) -> u32); - RemoveCrossClusterGroupSetDependency(hdependentgroupset.param().abi(), lpremoteclustername.param().abi(), lpremotegroupsetname.param().abi()) + RemoveCrossClusterGroupSetDependency(core::mem::transmute(hdependentgroupset), lpremoteclustername.param().abi(), lpremotegroupsetname.param().abi()) } #[inline] -pub unsafe fn RemoveResourceFromClusterSharedVolumes(hresource: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RemoveResourceFromClusterSharedVolumes(hresource: HRESOURCE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RemoveResourceFromClusterSharedVolumes(hresource : HRESOURCE) -> u32); - RemoveResourceFromClusterSharedVolumes(hresource.param().abi()) + RemoveResourceFromClusterSharedVolumes(core::mem::transmute(hresource)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilAddUnknownProperties(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutpropertylist: *mut core::ffi::c_void, pcboutpropertylistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilAddUnknownProperties(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutpropertylist: *mut core::ffi::c_void, pcboutpropertylistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilAddUnknownProperties(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, poutpropertylist : *mut core::ffi::c_void, pcboutpropertylistsize : u32, pcbbytesreturned : *mut u32, pcbrequired : *mut u32) -> u32); - ResUtilAddUnknownProperties(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytable), core::mem::transmute(poutpropertylist), core::mem::transmute(pcboutpropertylistsize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) + ResUtilAddUnknownProperties(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(poutpropertylist), core::mem::transmute(pcboutpropertylistsize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } #[inline] pub unsafe fn ResUtilCreateDirectoryTree(pszpath: P0) -> u32 @@ -2462,12 +1836,9 @@ where ResUtilCreateDirectoryTree(pszpath.param().abi()) } #[inline] -pub unsafe fn ResUtilDupGroup(group: P0, copy: *mut HGROUP) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn ResUtilDupGroup(group: HGROUP, copy: *mut HGROUP) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilDupGroup(group : HGROUP, copy : *mut HGROUP) -> u32); - ResUtilDupGroup(group.param().abi(), core::mem::transmute(copy)) + ResUtilDupGroup(core::mem::transmute(group), core::mem::transmute(copy)) } #[inline] pub unsafe fn ResUtilDupParameterBlock(poutparams: *mut u8, pinparams: *const u8, ppropertytable: *const RESUTIL_PROPERTY_ITEM) -> u32 { @@ -2475,12 +1846,9 @@ pub unsafe fn ResUtilDupParameterBlock(poutparams: *mut u8, pinparams: *const u8 ResUtilDupParameterBlock(core::mem::transmute(poutparams), core::mem::transmute(pinparams), core::mem::transmute(ppropertytable)) } #[inline] -pub unsafe fn ResUtilDupResource(group: P0, copy: *mut HRESOURCE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilDupResource(group: HRESOURCE, copy: *mut HRESOURCE) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilDupResource(group : HRESOURCE, copy : *mut HRESOURCE) -> u32); - ResUtilDupResource(group.param().abi(), core::mem::transmute(copy)) + ResUtilDupResource(core::mem::transmute(group), core::mem::transmute(copy)) } #[inline] pub unsafe fn ResUtilDupString(pszinstring: P0) -> windows_core::PWSTR @@ -2491,31 +1859,20 @@ where ResUtilDupString(pszinstring.param().abi()) } #[inline] -pub unsafe fn ResUtilEnumGroups(hcluster: P0, hself: P1, prescallback: LPGROUP_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param
, -{ +pub unsafe fn ResUtilEnumGroups(hcluster: HCLUSTER, hself: HGROUP, prescallback: LPGROUP_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilEnumGroups(hcluster : HCLUSTER, hself : HGROUP, prescallback : LPGROUP_CALLBACK_EX, pparameter : *mut core::ffi::c_void) -> u32); - ResUtilEnumGroups(hcluster.param().abi(), hself.param().abi(), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) + ResUtilEnumGroups(core::mem::transmute(hcluster), core::mem::transmute(hself), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) } #[inline] -pub unsafe fn ResUtilEnumGroupsEx(hcluster: P0, hself: P1, grouptype: CLUSGROUP_TYPE, prescallback: LPGROUP_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param
, -{ +pub unsafe fn ResUtilEnumGroupsEx(hcluster: HCLUSTER, hself: HGROUP, grouptype: CLUSGROUP_TYPE, prescallback: LPGROUP_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilEnumGroupsEx(hcluster : HCLUSTER, hself : HGROUP, grouptype : CLUSGROUP_TYPE, prescallback : LPGROUP_CALLBACK_EX, pparameter : *mut core::ffi::c_void) -> u32); - ResUtilEnumGroupsEx(hcluster.param().abi(), hself.param().abi(), core::mem::transmute(grouptype), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) + ResUtilEnumGroupsEx(core::mem::transmute(hcluster), core::mem::transmute(hself), core::mem::transmute(grouptype), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilEnumPrivateProperties(hkeyclusterkey: P0, pszoutproperties: windows_core::PWSTR, cboutpropertiessize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilEnumPrivateProperties(hkeyclusterkey: super::super::System::Registry::HKEY, pszoutproperties: windows_core::PWSTR, cboutpropertiessize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilEnumPrivateProperties(hkeyclusterkey : super::super::System::Registry:: HKEY, pszoutproperties : windows_core::PWSTR, cboutpropertiessize : u32, pcbbytesreturned : *mut u32, pcbrequired : *mut u32) -> u32); - ResUtilEnumPrivateProperties(hkeyclusterkey.param().abi(), core::mem::transmute(pszoutproperties), core::mem::transmute(cboutpropertiessize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) + ResUtilEnumPrivateProperties(core::mem::transmute(hkeyclusterkey), core::mem::transmute(pszoutproperties), core::mem::transmute(cboutpropertiessize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } #[inline] pub unsafe fn ResUtilEnumProperties(ppropertytable: *const RESUTIL_PROPERTY_ITEM, pszoutproperties: windows_core::PWSTR, cboutpropertiessize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { @@ -2523,33 +1880,28 @@ pub unsafe fn ResUtilEnumProperties(ppropertytable: *const RESUTIL_PROPERTY_ITEM ResUtilEnumProperties(core::mem::transmute(ppropertytable), core::mem::transmute(pszoutproperties), core::mem::transmute(cboutpropertiessize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } #[inline] -pub unsafe fn ResUtilEnumResources(hself: P0, lpszrestypename: P1, prescallback: LPRESOURCE_CALLBACK, pparameter: *mut core::ffi::c_void) -> u32 +pub unsafe fn ResUtilEnumResources(hself: HRESOURCE, lpszrestypename: P1, prescallback: LPRESOURCE_CALLBACK, pparameter: *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilEnumResources(hself : HRESOURCE, lpszrestypename : windows_core::PCWSTR, prescallback : LPRESOURCE_CALLBACK, pparameter : *mut core::ffi::c_void) -> u32); - ResUtilEnumResources(hself.param().abi(), lpszrestypename.param().abi(), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) + ResUtilEnumResources(core::mem::transmute(hself), lpszrestypename.param().abi(), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) } #[inline] -pub unsafe fn ResUtilEnumResourcesEx(hcluster: P0, hself: P1, lpszrestypename: P2, prescallback: LPRESOURCE_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 +pub unsafe fn ResUtilEnumResourcesEx(hcluster: HCLUSTER, hself: HRESOURCE, lpszrestypename: P2, prescallback: LPRESOURCE_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilEnumResourcesEx(hcluster : HCLUSTER, hself : HRESOURCE, lpszrestypename : windows_core::PCWSTR, prescallback : LPRESOURCE_CALLBACK_EX, pparameter : *mut core::ffi::c_void) -> u32); - ResUtilEnumResourcesEx(hcluster.param().abi(), hself.param().abi(), lpszrestypename.param().abi(), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) + ResUtilEnumResourcesEx(core::mem::transmute(hcluster), core::mem::transmute(hself), lpszrestypename.param().abi(), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) } #[inline] -pub unsafe fn ResUtilEnumResourcesEx2(hcluster: P0, hself: P1, lpszrestypename: P2, prescallback: LPRESOURCE_CALLBACK_EX, pparameter: *mut core::ffi::c_void, dwdesiredaccess: u32) -> u32 +pub unsafe fn ResUtilEnumResourcesEx2(hcluster: HCLUSTER, hself: HRESOURCE, lpszrestypename: P2, prescallback: LPRESOURCE_CALLBACK_EX, pparameter: *mut core::ffi::c_void, dwdesiredaccess: u32) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilEnumResourcesEx2(hcluster : HCLUSTER, hself : HRESOURCE, lpszrestypename : windows_core::PCWSTR, prescallback : LPRESOURCE_CALLBACK_EX, pparameter : *mut core::ffi::c_void, dwdesiredaccess : u32) -> u32); - ResUtilEnumResourcesEx2(hcluster.param().abi(), hself.param().abi(), lpszrestypename.param().abi(), core::mem::transmute(prescallback), core::mem::transmute(pparameter), core::mem::transmute(dwdesiredaccess)) + ResUtilEnumResourcesEx2(core::mem::transmute(hcluster), core::mem::transmute(hself), lpszrestypename.param().abi(), core::mem::transmute(prescallback), core::mem::transmute(pparameter), core::mem::transmute(dwdesiredaccess)) } #[inline] pub unsafe fn ResUtilExpandEnvironmentStrings(pszsrc: P0) -> windows_core::PWSTR @@ -2565,16 +1917,12 @@ where P2: 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(core::mem::transmute(ppropertylist), core::mem::transmute(cbpropertylistsize), pszpropertyname.param().abi(), core::mem::transmute(pbpropertyvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbpropertyvaluesize.unwrap_or(core::ptr::null_mut()))) + ResUtilFindBinaryProperty(core::mem::transmute(ppropertylist), core::mem::transmute(cbpropertylistsize), pszpropertyname.param().abi(), core::mem::transmute(pbpropertyvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbpropertyvaluesize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ResUtilFindDependentDiskResourceDriveLetter(hcluster: P0, hresource: P1, pszdriveletter: windows_core::PWSTR, pcchdriveletter: *mut u32) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ResUtilFindDependentDiskResourceDriveLetter(hcluster: HCLUSTER, hresource: HRESOURCE, pszdriveletter: windows_core::PWSTR, pcchdriveletter: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilFindDependentDiskResourceDriveLetter(hcluster : HCLUSTER, hresource : HRESOURCE, pszdriveletter : windows_core::PWSTR, pcchdriveletter : *mut u32) -> u32); - ResUtilFindDependentDiskResourceDriveLetter(hcluster.param().abi(), hresource.param().abi(), core::mem::transmute(pszdriveletter), core::mem::transmute(pcchdriveletter)) + ResUtilFindDependentDiskResourceDriveLetter(core::mem::transmute(hcluster), core::mem::transmute(hresource), core::mem::transmute(pszdriveletter), core::mem::transmute(pcchdriveletter)) } #[inline] pub unsafe fn ResUtilFindDwordProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pdwpropertyvalue: *mut u32) -> u32 @@ -2590,7 +1938,7 @@ where P2: 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(core::mem::transmute(ppropertylist), core::mem::transmute(cbpropertylistsize), pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::ptr::null_mut()))) + ResUtilFindExpandSzProperty(core::mem::transmute(ppropertylist), core::mem::transmute(cbpropertylistsize), pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ResUtilFindExpandedSzProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pszpropertyvalue: Option<*mut windows_core::PWSTR>) -> u32 @@ -2598,7 +1946,7 @@ where P2: 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(core::mem::transmute(ppropertylist), core::mem::transmute(cbpropertylistsize), pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::ptr::null_mut()))) + ResUtilFindExpandedSzProperty(core::mem::transmute(ppropertylist), core::mem::transmute(cbpropertylistsize), pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ResUtilFindFileTimeProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, pftpropertyvalue: *mut super::super::Foundation::FILETIME) -> u32 @@ -2630,7 +1978,7 @@ where P2: 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(core::mem::transmute(ppropertylist), core::mem::transmute(cbpropertylistsize), pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::ptr::null_mut()))) + ResUtilFindSzProperty(core::mem::transmute(ppropertylist), core::mem::transmute(cbpropertylistsize), pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ResUtilFindULargeIntegerProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P2, plpropertyvalue: *mut u64) -> u32 @@ -2652,12 +2000,9 @@ pub unsafe fn ResUtilFreeParameterBlock(poutparams: *mut u8, pinparams: *const u } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetAllProperties(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutpropertylist: *mut core::ffi::c_void, cboutpropertylistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetAllProperties(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutpropertylist: *mut core::ffi::c_void, cboutpropertylistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetAllProperties(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, poutpropertylist : *mut core::ffi::c_void, cboutpropertylistsize : u32, pcbbytesreturned : *mut u32, pcbrequired : *mut u32) -> u32); - ResUtilGetAllProperties(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytable), core::mem::transmute(poutpropertylist), core::mem::transmute(cboutpropertylistsize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) + ResUtilGetAllProperties(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(poutpropertylist), core::mem::transmute(cboutpropertylistsize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } #[inline] pub unsafe fn ResUtilGetBinaryProperty(ppboutvalue: *mut *mut u8, pcboutvaluesize: *mut u32, pvaluestruct: *const CLUSPROP_BINARY, pboldvalue: Option<&[u8]>, pppropertylist: *mut *mut u8, pcbpropertylistsize: *mut u32) -> u32 { @@ -2666,61 +2011,42 @@ pub unsafe fn ResUtilGetBinaryProperty(ppboutvalue: *mut *mut u8, pcboutvaluesiz } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetBinaryValue(hkeyclusterkey: P0, pszvaluename: P1, ppboutvalue: *mut *mut u8, pcboutvaluesize: *mut u32) -> u32 +pub unsafe fn ResUtilGetBinaryValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, ppboutvalue: *mut *mut u8, pcboutvaluesize: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetBinaryValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, ppboutvalue : *mut *mut u8, pcboutvaluesize : *mut u32) -> u32); - ResUtilGetBinaryValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), core::mem::transmute(ppboutvalue), core::mem::transmute(pcboutvaluesize)) + ResUtilGetBinaryValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), core::mem::transmute(ppboutvalue), core::mem::transmute(pcboutvaluesize)) } #[inline] -pub unsafe fn ResUtilGetClusterGroupType(hgroup: P0, grouptype: *mut CLUSGROUP_TYPE) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn ResUtilGetClusterGroupType(hgroup: HGROUP, grouptype: *mut CLUSGROUP_TYPE) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetClusterGroupType(hgroup : HGROUP, grouptype : *mut CLUSGROUP_TYPE) -> u32); - ResUtilGetClusterGroupType(hgroup.param().abi(), core::mem::transmute(grouptype)) + ResUtilGetClusterGroupType(core::mem::transmute(hgroup), core::mem::transmute(grouptype)) } #[inline] -pub unsafe fn ResUtilGetClusterId(hcluster: P0, guid: *mut windows_core::GUID) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetClusterId(hcluster: HCLUSTER, guid: *mut windows_core::GUID) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetClusterId(hcluster : HCLUSTER, guid : *mut windows_core::GUID) -> u32); - ResUtilGetClusterId(hcluster.param().abi(), core::mem::transmute(guid)) + ResUtilGetClusterId(core::mem::transmute(hcluster), core::mem::transmute(guid)) } #[inline] -pub unsafe fn ResUtilGetClusterRoleState(hcluster: P0, eclusterrole: CLUSTER_ROLE) -> CLUSTER_ROLE_STATE -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetClusterRoleState(hcluster: HCLUSTER, eclusterrole: CLUSTER_ROLE) -> CLUSTER_ROLE_STATE { windows_targets::link!("resutils.dll" "system" fn ResUtilGetClusterRoleState(hcluster : HCLUSTER, eclusterrole : CLUSTER_ROLE) -> CLUSTER_ROLE_STATE); - ResUtilGetClusterRoleState(hcluster.param().abi(), core::mem::transmute(eclusterrole)) + ResUtilGetClusterRoleState(core::mem::transmute(hcluster), core::mem::transmute(eclusterrole)) } #[inline] -pub unsafe fn ResUtilGetCoreClusterResources(hcluster: P0, phclusternameresource: *mut HRESOURCE, phclusteripaddressresource: *mut HRESOURCE, phclusterquorumresource: *mut HRESOURCE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetCoreClusterResources(hcluster: HCLUSTER, phclusternameresource: *mut HRESOURCE, phclusteripaddressresource: *mut HRESOURCE, phclusterquorumresource: *mut HRESOURCE) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetCoreClusterResources(hcluster : HCLUSTER, phclusternameresource : *mut HRESOURCE, phclusteripaddressresource : *mut HRESOURCE, phclusterquorumresource : *mut HRESOURCE) -> u32); - ResUtilGetCoreClusterResources(hcluster.param().abi(), core::mem::transmute(phclusternameresource), core::mem::transmute(phclusteripaddressresource), core::mem::transmute(phclusterquorumresource)) + ResUtilGetCoreClusterResources(core::mem::transmute(hcluster), core::mem::transmute(phclusternameresource), core::mem::transmute(phclusteripaddressresource), core::mem::transmute(phclusterquorumresource)) } #[inline] -pub unsafe fn ResUtilGetCoreClusterResourcesEx(hclusterin: P0, phclusternameresourceout: Option<*mut HRESOURCE>, phclusterquorumresourceout: Option<*mut HRESOURCE>, dwdesiredaccess: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetCoreClusterResourcesEx(hclusterin: HCLUSTER, phclusternameresourceout: Option<*mut HRESOURCE>, phclusterquorumresourceout: Option<*mut HRESOURCE>, dwdesiredaccess: u32) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(phclusterquorumresourceout.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwdesiredaccess)) + ResUtilGetCoreClusterResourcesEx(core::mem::transmute(hclusterin), core::mem::transmute(phclusternameresourceout.unwrap_or(core::mem::zeroed())), core::mem::transmute(phclusterquorumresourceout.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdesiredaccess)) } #[inline] -pub unsafe fn ResUtilGetCoreGroup(hcluster: P0) -> HGROUP -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetCoreGroup(hcluster: HCLUSTER) -> HGROUP { windows_targets::link!("resutils.dll" "system" fn ResUtilGetCoreGroup(hcluster : HCLUSTER) -> HGROUP); - ResUtilGetCoreGroup(hcluster.param().abi()) + ResUtilGetCoreGroup(core::mem::transmute(hcluster)) } #[inline] pub unsafe fn ResUtilGetDwordProperty(pdwoutvalue: *mut u32, pvaluestruct: *const CLUSPROP_DWORD, dwoldvalue: u32, dwminimum: u32, dwmaximum: u32, pppropertylist: *mut *mut u8, pcbpropertylistsize: *mut u32) -> u32 { @@ -2729,21 +2055,17 @@ pub unsafe fn ResUtilGetDwordProperty(pdwoutvalue: *mut u32, pvaluestruct: *cons } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetDwordValue(hkeyclusterkey: P0, pszvaluename: P1, pdwoutvalue: *mut u32, dwdefaultvalue: u32) -> u32 +pub unsafe fn ResUtilGetDwordValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, pdwoutvalue: *mut u32, dwdefaultvalue: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetDwordValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, pdwoutvalue : *mut u32, dwdefaultvalue : u32) -> u32); - ResUtilGetDwordValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), core::mem::transmute(pdwoutvalue), core::mem::transmute(dwdefaultvalue)) + ResUtilGetDwordValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), core::mem::transmute(pdwoutvalue), core::mem::transmute(dwdefaultvalue)) } #[inline] -pub unsafe fn ResUtilGetEnvironmentWithNetName(hresource: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetEnvironmentWithNetName(hresource: HRESOURCE) -> *mut core::ffi::c_void { windows_targets::link!("resutils.dll" "system" fn ResUtilGetEnvironmentWithNetName(hresource : HRESOURCE) -> *mut core::ffi::c_void); - ResUtilGetEnvironmentWithNetName(hresource.param().abi()) + ResUtilGetEnvironmentWithNetName(core::mem::transmute(hresource)) } #[inline] pub unsafe fn ResUtilGetFileTimeProperty(pftoutvalue: *mut super::super::Foundation::FILETIME, pvaluestruct: *const CLUSPROP_FILETIME, ftoldvalue: super::super::Foundation::FILETIME, ftminimum: super::super::Foundation::FILETIME, ftmaximum: super::super::Foundation::FILETIME, pppropertylist: *mut *mut u8, pcbpropertylistsize: *mut u32) -> u32 { @@ -2765,40 +2087,30 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetPrivateProperties(hkeyclusterkey: P0, poutpropertylist: *mut core::ffi::c_void, cboutpropertylistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetPrivateProperties(hkeyclusterkey: super::super::System::Registry::HKEY, poutpropertylist: *mut core::ffi::c_void, cboutpropertylistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetPrivateProperties(hkeyclusterkey : super::super::System::Registry:: HKEY, poutpropertylist : *mut core::ffi::c_void, cboutpropertylistsize : u32, pcbbytesreturned : *mut u32, pcbrequired : *mut u32) -> u32); - ResUtilGetPrivateProperties(hkeyclusterkey.param().abi(), core::mem::transmute(poutpropertylist), core::mem::transmute(cboutpropertylistsize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) + ResUtilGetPrivateProperties(core::mem::transmute(hkeyclusterkey), core::mem::transmute(poutpropertylist), core::mem::transmute(cboutpropertylistsize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetProperties(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutpropertylist: *mut core::ffi::c_void, cboutpropertylistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetProperties(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutpropertylist: *mut core::ffi::c_void, cboutpropertylistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetProperties(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, poutpropertylist : *mut core::ffi::c_void, cboutpropertylistsize : u32, pcbbytesreturned : *mut u32, pcbrequired : *mut u32) -> u32); - ResUtilGetProperties(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytable), core::mem::transmute(poutpropertylist), core::mem::transmute(cboutpropertylistsize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) + ResUtilGetProperties(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(poutpropertylist), core::mem::transmute(cboutpropertylistsize), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetPropertiesToParameterBlock(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutparams: *mut u8, bcheckforrequiredproperties: P3, psznameofpropinerror: *mut windows_core::PWSTR) -> u32 +pub unsafe fn ResUtilGetPropertiesToParameterBlock(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutparams: *mut u8, bcheckforrequiredproperties: P3, psznameofpropinerror: *mut windows_core::PWSTR) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetPropertiesToParameterBlock(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, poutparams : *mut u8, bcheckforrequiredproperties : super::super::Foundation:: BOOL, psznameofpropinerror : *mut windows_core::PWSTR) -> u32); - ResUtilGetPropertiesToParameterBlock(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytable), core::mem::transmute(poutparams), bcheckforrequiredproperties.param().abi(), core::mem::transmute(psznameofpropinerror)) + ResUtilGetPropertiesToParameterBlock(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(poutparams), bcheckforrequiredproperties.param().abi(), core::mem::transmute(psznameofpropinerror)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetProperty(hkeyclusterkey: P0, ppropertytableitem: *const RESUTIL_PROPERTY_ITEM, poutpropertyitem: *mut *mut core::ffi::c_void, pcboutpropertyitemsize: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetProperty(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytableitem: *const RESUTIL_PROPERTY_ITEM, poutpropertyitem: *mut *mut core::ffi::c_void, pcboutpropertyitemsize: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetProperty(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytableitem : *const RESUTIL_PROPERTY_ITEM, poutpropertyitem : *mut *mut core::ffi::c_void, pcboutpropertyitemsize : *mut u32) -> u32); - ResUtilGetProperty(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytableitem), core::mem::transmute(poutpropertyitem), core::mem::transmute(pcboutpropertyitemsize)) + ResUtilGetProperty(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytableitem), core::mem::transmute(poutpropertyitem), core::mem::transmute(pcboutpropertyitemsize)) } #[inline] pub unsafe fn ResUtilGetPropertyFormats(ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutpropertyformatlist: *mut core::ffi::c_void, cbpropertyformatlistsize: u32, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { @@ -2807,98 +2119,78 @@ pub unsafe fn ResUtilGetPropertyFormats(ppropertytable: *const RESUTIL_PROPERTY_ } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetPropertySize(hkeyclusterkey: P0, ppropertytableitem: *const RESUTIL_PROPERTY_ITEM, pcboutpropertylistsize: *mut u32, pnpropertycount: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetPropertySize(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytableitem: *const RESUTIL_PROPERTY_ITEM, pcboutpropertylistsize: *mut u32, pnpropertycount: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetPropertySize(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytableitem : *const RESUTIL_PROPERTY_ITEM, pcboutpropertylistsize : *mut u32, pnpropertycount : *mut u32) -> u32); - ResUtilGetPropertySize(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytableitem), core::mem::transmute(pcboutpropertylistsize), core::mem::transmute(pnpropertycount)) + ResUtilGetPropertySize(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytableitem), core::mem::transmute(pcboutpropertylistsize), core::mem::transmute(pnpropertycount)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetQwordValue(hkeyclusterkey: P0, pszvaluename: P1, pqwoutvalue: *mut u64, qwdefaultvalue: u64) -> u32 +pub unsafe fn ResUtilGetQwordValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, pqwoutvalue: *mut u64, qwdefaultvalue: u64) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetQwordValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, pqwoutvalue : *mut u64, qwdefaultvalue : u64) -> u32); - ResUtilGetQwordValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), core::mem::transmute(pqwoutvalue), core::mem::transmute(qwdefaultvalue)) + ResUtilGetQwordValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), core::mem::transmute(pqwoutvalue), core::mem::transmute(qwdefaultvalue)) } #[inline] -pub unsafe fn ResUtilGetResourceDependency(hself: P0, lpszresourcetype: P1) -> HRESOURCE +pub unsafe fn ResUtilGetResourceDependency(hself: super::super::Foundation::HANDLE, lpszresourcetype: P1) -> HRESOURCE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependency(hself : super::super::Foundation:: HANDLE, lpszresourcetype : windows_core::PCWSTR) -> HRESOURCE); - ResUtilGetResourceDependency(hself.param().abi(), lpszresourcetype.param().abi()) + ResUtilGetResourceDependency(core::mem::transmute(hself), lpszresourcetype.param().abi()) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyByClass(hcluster: P0, hself: P1, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: P3) -> HRESOURCE +pub unsafe fn ResUtilGetResourceDependencyByClass(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: P3) -> HRESOURCE where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyByClass(hcluster : HCLUSTER, hself : super::super::Foundation:: HANDLE, prci : *mut CLUS_RESOURCE_CLASS_INFO, brecurse : super::super::Foundation:: BOOL) -> HRESOURCE); - ResUtilGetResourceDependencyByClass(hcluster.param().abi(), hself.param().abi(), core::mem::transmute(prci), brecurse.param().abi()) + ResUtilGetResourceDependencyByClass(core::mem::transmute(hcluster), core::mem::transmute(hself), core::mem::transmute(prci), brecurse.param().abi()) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyByClassEx(hcluster: P0, hself: P1, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: P3, dwdesiredaccess: u32) -> HRESOURCE +pub unsafe fn ResUtilGetResourceDependencyByClassEx(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: P3, dwdesiredaccess: u32) -> HRESOURCE where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyByClassEx(hcluster : HCLUSTER, hself : super::super::Foundation:: HANDLE, prci : *mut CLUS_RESOURCE_CLASS_INFO, brecurse : super::super::Foundation:: BOOL, dwdesiredaccess : u32) -> HRESOURCE); - ResUtilGetResourceDependencyByClassEx(hcluster.param().abi(), hself.param().abi(), core::mem::transmute(prci), brecurse.param().abi(), core::mem::transmute(dwdesiredaccess)) + ResUtilGetResourceDependencyByClassEx(core::mem::transmute(hcluster), core::mem::transmute(hself), core::mem::transmute(prci), brecurse.param().abi(), core::mem::transmute(dwdesiredaccess)) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyByName(hcluster: P0, hself: P1, lpszresourcetype: P2, brecurse: P3) -> HRESOURCE +pub unsafe fn ResUtilGetResourceDependencyByName(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, lpszresourcetype: P2, brecurse: P3) -> HRESOURCE where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyByName(hcluster : HCLUSTER, hself : super::super::Foundation:: HANDLE, lpszresourcetype : windows_core::PCWSTR, brecurse : super::super::Foundation:: BOOL) -> HRESOURCE); - ResUtilGetResourceDependencyByName(hcluster.param().abi(), hself.param().abi(), lpszresourcetype.param().abi(), brecurse.param().abi()) + ResUtilGetResourceDependencyByName(core::mem::transmute(hcluster), core::mem::transmute(hself), lpszresourcetype.param().abi(), brecurse.param().abi()) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyByNameEx(hcluster: P0, hself: P1, lpszresourcetype: P2, brecurse: P3, dwdesiredaccess: u32) -> HRESOURCE +pub unsafe fn ResUtilGetResourceDependencyByNameEx(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, lpszresourcetype: P2, brecurse: P3, dwdesiredaccess: u32) -> HRESOURCE where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyByNameEx(hcluster : HCLUSTER, hself : super::super::Foundation:: HANDLE, lpszresourcetype : windows_core::PCWSTR, brecurse : super::super::Foundation:: BOOL, dwdesiredaccess : u32) -> HRESOURCE); - ResUtilGetResourceDependencyByNameEx(hcluster.param().abi(), hself.param().abi(), lpszresourcetype.param().abi(), brecurse.param().abi(), core::mem::transmute(dwdesiredaccess)) + ResUtilGetResourceDependencyByNameEx(core::mem::transmute(hcluster), core::mem::transmute(hself), lpszresourcetype.param().abi(), brecurse.param().abi(), core::mem::transmute(dwdesiredaccess)) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyEx(hself: P0, lpszresourcetype: P1, dwdesiredaccess: u32) -> HRESOURCE +pub unsafe fn ResUtilGetResourceDependencyEx(hself: super::super::Foundation::HANDLE, lpszresourcetype: P1, dwdesiredaccess: u32) -> HRESOURCE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyEx(hself : super::super::Foundation:: HANDLE, lpszresourcetype : windows_core::PCWSTR, dwdesiredaccess : u32) -> HRESOURCE); - ResUtilGetResourceDependencyEx(hself.param().abi(), lpszresourcetype.param().abi(), core::mem::transmute(dwdesiredaccess)) + ResUtilGetResourceDependencyEx(core::mem::transmute(hself), lpszresourcetype.param().abi(), core::mem::transmute(dwdesiredaccess)) } #[inline] -pub unsafe fn ResUtilGetResourceDependentIPAddressProps(hresource: P0, pszaddress: windows_core::PWSTR, pcchaddress: *mut u32, pszsubnetmask: windows_core::PWSTR, pcchsubnetmask: *mut u32, psznetwork: windows_core::PWSTR, pcchnetwork: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetResourceDependentIPAddressProps(hresource: HRESOURCE, pszaddress: windows_core::PWSTR, pcchaddress: *mut u32, pszsubnetmask: windows_core::PWSTR, pcchsubnetmask: *mut u32, psznetwork: windows_core::PWSTR, pcchnetwork: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependentIPAddressProps(hresource : HRESOURCE, pszaddress : windows_core::PWSTR, pcchaddress : *mut u32, pszsubnetmask : windows_core::PWSTR, pcchsubnetmask : *mut u32, psznetwork : windows_core::PWSTR, pcchnetwork : *mut u32) -> u32); - ResUtilGetResourceDependentIPAddressProps(hresource.param().abi(), core::mem::transmute(pszaddress), core::mem::transmute(pcchaddress), core::mem::transmute(pszsubnetmask), core::mem::transmute(pcchsubnetmask), core::mem::transmute(psznetwork), core::mem::transmute(pcchnetwork)) + ResUtilGetResourceDependentIPAddressProps(core::mem::transmute(hresource), core::mem::transmute(pszaddress), core::mem::transmute(pcchaddress), core::mem::transmute(pszsubnetmask), core::mem::transmute(pcchsubnetmask), core::mem::transmute(psznetwork), core::mem::transmute(pcchnetwork)) } #[inline] -pub unsafe fn ResUtilGetResourceName(hresource: P0, pszresourcename: windows_core::PWSTR, pcchresourcenameinout: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilGetResourceName(hresource: HRESOURCE, pszresourcename: windows_core::PWSTR, pcchresourcenameinout: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceName(hresource : HRESOURCE, pszresourcename : windows_core::PWSTR, pcchresourcenameinout : *mut u32) -> u32); - ResUtilGetResourceName(hresource.param().abi(), core::mem::transmute(pszresourcename), core::mem::transmute(pcchresourcenameinout)) + ResUtilGetResourceName(core::mem::transmute(hresource), core::mem::transmute(pszresourcename), core::mem::transmute(pcchresourcenameinout)) } #[inline] pub unsafe fn ResUtilGetResourceNameDependency(lpszresourcename: P0, lpszresourcetype: P1) -> HRESOURCE @@ -2928,22 +2220,17 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetSzValue(hkeyclusterkey: P0, pszvaluename: P1) -> windows_core::PWSTR +pub unsafe fn ResUtilGetSzValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1) -> windows_core::PWSTR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetSzValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR) -> windows_core::PWSTR); - ResUtilGetSzValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi()) + ResUtilGetSzValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi()) } #[inline] -pub unsafe fn ResUtilGroupsEqual(hself: P0, hgroup: P1, pequal: *mut super::super::Foundation::BOOL) -> u32 -where - P0: windows_core::Param
, - P1: windows_core::Param
, -{ +pub unsafe fn ResUtilGroupsEqual(hself: HGROUP, hgroup: HGROUP, pequal: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGroupsEqual(hself : HGROUP, hgroup : HGROUP, pequal : *mut super::super::Foundation:: BOOL) -> u32); - ResUtilGroupsEqual(hself.param().abi(), hgroup.param().abi(), core::mem::transmute(pequal)) + ResUtilGroupsEqual(core::mem::transmute(hself), core::mem::transmute(hgroup), core::mem::transmute(pequal)) } #[inline] pub unsafe fn ResUtilIsPathValid(pszpath: P0) -> super::super::Foundation::BOOL @@ -2954,12 +2241,9 @@ where ResUtilIsPathValid(pszpath.param().abi()) } #[inline] -pub unsafe fn ResUtilIsResourceClassEqual(prci: *mut CLUS_RESOURCE_CLASS_INFO, hresource: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn ResUtilIsResourceClassEqual(prci: *mut CLUS_RESOURCE_CLASS_INFO, hresource: HRESOURCE) -> super::super::Foundation::BOOL { windows_targets::link!("resutils.dll" "system" fn ResUtilIsResourceClassEqual(prci : *mut CLUS_RESOURCE_CLASS_INFO, hresource : HRESOURCE) -> super::super::Foundation:: BOOL); - ResUtilIsResourceClassEqual(core::mem::transmute(prci), hresource.param().abi()) + ResUtilIsResourceClassEqual(core::mem::transmute(prci), core::mem::transmute(hresource)) } #[inline] pub unsafe fn ResUtilLeftPaxosIsLessThanRight(left: *const PaxosTagCStruct, right: *const PaxosTagCStruct) -> super::super::Foundation::BOOL { @@ -2967,12 +2251,9 @@ pub unsafe fn ResUtilLeftPaxosIsLessThanRight(left: *const PaxosTagCStruct, righ ResUtilLeftPaxosIsLessThanRight(core::mem::transmute(left), core::mem::transmute(right)) } #[inline] -pub unsafe fn ResUtilNodeEnum(hcluster: P0, pnodecallback: LPNODE_CALLBACK, pparameter: *mut core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilNodeEnum(hcluster: HCLUSTER, pnodecallback: LPNODE_CALLBACK, pparameter: *mut core::ffi::c_void) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilNodeEnum(hcluster : HCLUSTER, pnodecallback : LPNODE_CALLBACK, pparameter : *mut core::ffi::c_void) -> u32); - ResUtilNodeEnum(hcluster.param().abi(), core::mem::transmute(pnodecallback), core::mem::transmute(pparameter)) + ResUtilNodeEnum(core::mem::transmute(hcluster), core::mem::transmute(pnodecallback), core::mem::transmute(pparameter)) } #[inline] pub unsafe fn ResUtilPaxosComparer(left: *const PaxosTagCStruct, right: *const PaxosTagCStruct) -> super::super::Foundation::BOOL { @@ -2982,7 +2263,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(core::mem::transmute(ppropertytable), core::mem::transmute(poutpropertylist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcboutpropertylistsize), core::mem::transmute(pinparams), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) + ResUtilPropertyListFromParameterBlock(core::mem::transmute(ppropertytable), core::mem::transmute(poutpropertylist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcboutpropertylistsize), core::mem::transmute(pinparams), core::mem::transmute(pcbbytesreturned), core::mem::transmute(pcbrequired)) } #[inline] pub unsafe fn ResUtilRemoveResourceServiceEnvironment(pszservicename: P0, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 @@ -2993,190 +2274,160 @@ where ResUtilRemoveResourceServiceEnvironment(pszservicename.param().abi(), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) } #[inline] -pub unsafe fn ResUtilResourceDepEnum(hself: P0, enumtype: u32, prescallback: LPRESOURCE_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilResourceDepEnum(hself: HRESOURCE, enumtype: u32, prescallback: LPRESOURCE_CALLBACK_EX, pparameter: *mut core::ffi::c_void) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilResourceDepEnum(hself : HRESOURCE, enumtype : u32, prescallback : LPRESOURCE_CALLBACK_EX, pparameter : *mut core::ffi::c_void) -> u32); - ResUtilResourceDepEnum(hself.param().abi(), core::mem::transmute(enumtype), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) + ResUtilResourceDepEnum(core::mem::transmute(hself), core::mem::transmute(enumtype), core::mem::transmute(prescallback), core::mem::transmute(pparameter)) } #[inline] -pub unsafe fn ResUtilResourceTypesEqual(lpszresourcetypename: P0, hresource: P1) -> super::super::Foundation::BOOL +pub unsafe fn ResUtilResourceTypesEqual(lpszresourcetypename: P0, hresource: HRESOURCE) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilResourceTypesEqual(lpszresourcetypename : windows_core::PCWSTR, hresource : HRESOURCE) -> super::super::Foundation:: BOOL); - ResUtilResourceTypesEqual(lpszresourcetypename.param().abi(), hresource.param().abi()) + ResUtilResourceTypesEqual(lpszresourcetypename.param().abi(), core::mem::transmute(hresource)) } #[inline] -pub unsafe fn ResUtilResourcesEqual(hself: P0, hresource: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ResUtilResourcesEqual(hself: HRESOURCE, hresource: HRESOURCE) -> super::super::Foundation::BOOL { windows_targets::link!("resutils.dll" "system" fn ResUtilResourcesEqual(hself : HRESOURCE, hresource : HRESOURCE) -> super::super::Foundation:: BOOL); - ResUtilResourcesEqual(hself.param().abi(), hresource.param().abi()) + ResUtilResourcesEqual(core::mem::transmute(hself), core::mem::transmute(hresource)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetBinaryValue(hkeyclusterkey: P0, pszvaluename: P1, pbnewvalue: &[u8], ppboutvalue: Option<*mut *mut u8>, pcboutvaluesize: *mut u32) -> u32 +pub unsafe fn ResUtilSetBinaryValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, pbnewvalue: &[u8], ppboutvalue: Option<*mut *mut u8>, pcboutvaluesize: *mut u32) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(pcboutvaluesize)) + ResUtilSetBinaryValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), core::mem::transmute(pbnewvalue.as_ptr()), pbnewvalue.len().try_into().unwrap(), core::mem::transmute(ppboutvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcboutvaluesize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetDwordValue(hkeyclusterkey: P0, pszvaluename: P1, dwnewvalue: u32, pdwoutvalue: *mut u32) -> u32 +pub unsafe fn ResUtilSetDwordValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, dwnewvalue: u32, pdwoutvalue: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetDwordValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, dwnewvalue : u32, pdwoutvalue : *mut u32) -> u32); - ResUtilSetDwordValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), core::mem::transmute(dwnewvalue), core::mem::transmute(pdwoutvalue)) + ResUtilSetDwordValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), core::mem::transmute(dwnewvalue), core::mem::transmute(pdwoutvalue)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetExpandSzValue(hkeyclusterkey: P0, pszvaluename: P1, psznewvalue: P2, ppszoutstring: Option<*mut windows_core::PWSTR>) -> u32 +pub unsafe fn ResUtilSetExpandSzValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, psznewvalue: P2, ppszoutstring: Option<*mut windows_core::PWSTR>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut()))) + ResUtilSetExpandSzValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(ppszoutstring.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetMultiSzValue(hkeyclusterkey: P0, pszvaluename: P1, psznewvalue: P2, cbnewvaluesize: u32, ppszoutvalue: Option<*mut windows_core::PWSTR>, pcboutvaluesize: Option<*mut u32>) -> u32 +pub unsafe fn ResUtilSetMultiSzValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, psznewvalue: P2, cbnewvaluesize: u32, ppszoutvalue: Option<*mut windows_core::PWSTR>, pcboutvaluesize: Option<*mut u32>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(cbnewvaluesize), core::mem::transmute(ppszoutvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcboutvaluesize.unwrap_or(core::ptr::null_mut()))) + ResUtilSetMultiSzValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(cbnewvaluesize), core::mem::transmute(ppszoutvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcboutvaluesize.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetPrivatePropertyList(hkeyclusterkey: P0, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilSetPrivatePropertyList(hkeyclusterkey: super::super::System::Registry::HKEY, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilSetPrivatePropertyList(hkeyclusterkey : super::super::System::Registry:: HKEY, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32) -> u32); - ResUtilSetPrivatePropertyList(hkeyclusterkey.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize)) + ResUtilSetPrivatePropertyList(core::mem::transmute(hkeyclusterkey), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetPropertyParameterBlock(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, pinparams: *const u8, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: *mut u8) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilSetPropertyParameterBlock(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, pinparams: *const u8, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: *mut u8) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilSetPropertyParameterBlock(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *mut core::ffi::c_void, pinparams : *const u8, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, poutparams : *mut u8) -> u32); - ResUtilSetPropertyParameterBlock(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), core::mem::transmute(pinparams), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams)) + ResUtilSetPropertyParameterBlock(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), core::mem::transmute(pinparams), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetPropertyParameterBlockEx(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, pinparams: *const u8, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: P6, poutparams: *mut u8) -> u32 +pub unsafe fn ResUtilSetPropertyParameterBlockEx(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, pinparams: *const u8, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: P6, poutparams: *mut u8) -> u32 where - P0: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetPropertyParameterBlockEx(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *mut core::ffi::c_void, pinparams : *const u8, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, bforcewrite : super::super::Foundation:: BOOL, poutparams : *mut u8) -> u32); - ResUtilSetPropertyParameterBlockEx(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), core::mem::transmute(pinparams), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), bforcewrite.param().abi(), core::mem::transmute(poutparams)) + ResUtilSetPropertyParameterBlockEx(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), core::mem::transmute(pinparams), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), bforcewrite.param().abi(), core::mem::transmute(poutparams)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetPropertyTable(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: Option<*const core::ffi::c_void>, ballowunknownproperties: P3, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: Option<*mut u8>) -> u32 +pub unsafe fn ResUtilSetPropertyTable(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: Option<*const core::ffi::c_void>, ballowunknownproperties: P3, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: Option<*mut u8>) -> u32 where - P0: windows_core::Param, P3: 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(), core::mem::transmute(ppropertytable), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams.unwrap_or(core::ptr::null_mut()))) + ResUtilSetPropertyTable(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetPropertyTableEx(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, ballowunknownproperties: P3, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: P6, poutparams: *mut u8) -> u32 +pub unsafe fn ResUtilSetPropertyTableEx(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, ballowunknownproperties: P3, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: P6, poutparams: *mut u8) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetPropertyTableEx(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *mut core::ffi::c_void, ballowunknownproperties : super::super::Foundation:: BOOL, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, bforcewrite : super::super::Foundation:: BOOL, poutparams : *mut u8) -> u32); - ResUtilSetPropertyTableEx(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), bforcewrite.param().abi(), core::mem::transmute(poutparams)) + ResUtilSetPropertyTableEx(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), bforcewrite.param().abi(), core::mem::transmute(poutparams)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetQwordValue(hkeyclusterkey: P0, pszvaluename: P1, qwnewvalue: u64, pqwoutvalue: Option<*mut u64>) -> u32 +pub unsafe fn ResUtilSetQwordValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, qwnewvalue: u64, pqwoutvalue: Option<*mut u64>) -> u32 where - P0: windows_core::Param, 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(), core::mem::transmute(qwnewvalue), core::mem::transmute(pqwoutvalue.unwrap_or(core::ptr::null_mut()))) + ResUtilSetQwordValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), core::mem::transmute(qwnewvalue), core::mem::transmute(pqwoutvalue.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ResUtilSetResourceServiceEnvironment(pszservicename: P0, hresource: P1, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 +pub unsafe fn ResUtilSetResourceServiceEnvironment(pszservicename: P0, hresource: HRESOURCE, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetResourceServiceEnvironment(pszservicename : windows_core::PCWSTR, hresource : HRESOURCE, pfnlogevent : PLOG_EVENT_ROUTINE, hresourcehandle : isize) -> u32); - ResUtilSetResourceServiceEnvironment(pszservicename.param().abi(), hresource.param().abi(), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) + ResUtilSetResourceServiceEnvironment(pszservicename.param().abi(), core::mem::transmute(hresource), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) } #[cfg(feature = "Win32_System_Services")] #[inline] -pub unsafe fn ResUtilSetResourceServiceStartParameters(pszservicename: P0, schscmhandle: P1, phservice: *mut super::super::System::Services::SC_HANDLE, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 +pub unsafe fn ResUtilSetResourceServiceStartParameters(pszservicename: P0, schscmhandle: super::super::System::Services::SC_HANDLE, phservice: *mut super::super::System::Services::SC_HANDLE, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetResourceServiceStartParameters(pszservicename : windows_core::PCWSTR, schscmhandle : super::super::System::Services:: SC_HANDLE, phservice : *mut super::super::System::Services:: SC_HANDLE, pfnlogevent : PLOG_EVENT_ROUTINE, hresourcehandle : isize) -> u32); - ResUtilSetResourceServiceStartParameters(pszservicename.param().abi(), schscmhandle.param().abi(), core::mem::transmute(phservice), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) + ResUtilSetResourceServiceStartParameters(pszservicename.param().abi(), core::mem::transmute(schscmhandle), core::mem::transmute(phservice), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) } #[cfg(feature = "Win32_System_Services")] #[inline] -pub unsafe fn ResUtilSetResourceServiceStartParametersEx(pszservicename: P0, schscmhandle: P1, phservice: *mut super::super::System::Services::SC_HANDLE, dwdesiredaccess: u32, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 +pub unsafe fn ResUtilSetResourceServiceStartParametersEx(pszservicename: P0, schscmhandle: super::super::System::Services::SC_HANDLE, phservice: *mut super::super::System::Services::SC_HANDLE, dwdesiredaccess: u32, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetResourceServiceStartParametersEx(pszservicename : windows_core::PCWSTR, schscmhandle : super::super::System::Services:: SC_HANDLE, phservice : *mut super::super::System::Services:: SC_HANDLE, dwdesiredaccess : u32, pfnlogevent : PLOG_EVENT_ROUTINE, hresourcehandle : isize) -> u32); - ResUtilSetResourceServiceStartParametersEx(pszservicename.param().abi(), schscmhandle.param().abi(), core::mem::transmute(phservice), core::mem::transmute(dwdesiredaccess), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) + ResUtilSetResourceServiceStartParametersEx(pszservicename.param().abi(), core::mem::transmute(schscmhandle), core::mem::transmute(phservice), core::mem::transmute(dwdesiredaccess), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetSzValue(hkeyclusterkey: P0, pszvaluename: P1, psznewvalue: P2, ppszoutstring: Option<*mut windows_core::PWSTR>) -> u32 +pub unsafe fn ResUtilSetSzValue(hkeyclusterkey: super::super::System::Registry::HKEY, pszvaluename: P1, psznewvalue: P2, ppszoutstring: Option<*mut windows_core::PWSTR>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut()))) + ResUtilSetSzValue(core::mem::transmute(hkeyclusterkey), pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(ppszoutstring.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetUnknownProperties(hkeyclusterkey: P0, ppropertytable: *const RESUTIL_PROPERTY_ITEM, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilSetUnknownProperties(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilSetUnknownProperties(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32) -> u32); - ResUtilSetUnknownProperties(hkeyclusterkey.param().abi(), core::mem::transmute(ppropertytable), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize)) + ResUtilSetUnknownProperties(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetValueEx(hkeyclusterkey: P0, valuename: P1, valuetype: u32, valuedata: &[u8], flags: u32) -> u32 +pub unsafe fn ResUtilSetValueEx(hkeyclusterkey: super::super::System::Registry::HKEY, valuename: P1, valuetype: u32, valuedata: &[u8], flags: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetValueEx(hkeyclusterkey : super::super::System::Registry:: HKEY, valuename : windows_core::PCWSTR, valuetype : u32, valuedata : *const u8, valuesize : u32, flags : u32) -> u32); - ResUtilSetValueEx(hkeyclusterkey.param().abi(), valuename.param().abi(), core::mem::transmute(valuetype), core::mem::transmute(valuedata.as_ptr()), valuedata.len().try_into().unwrap(), core::mem::transmute(flags)) + ResUtilSetValueEx(core::mem::transmute(hkeyclusterkey), valuename.param().abi(), core::mem::transmute(valuetype), core::mem::transmute(valuedata.as_ptr()), valuedata.len().try_into().unwrap(), core::mem::transmute(flags)) } #[cfg(feature = "Win32_System_Services")] #[inline] @@ -3197,12 +2448,9 @@ where } #[cfg(feature = "Win32_System_Services")] #[inline] -pub unsafe fn ResUtilStopService(hservicehandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilStopService(hservicehandle: super::super::System::Services::SC_HANDLE) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilStopService(hservicehandle : super::super::System::Services:: SC_HANDLE) -> u32); - ResUtilStopService(hservicehandle.param().abi()) + ResUtilStopService(core::mem::transmute(hservicehandle)) } #[inline] pub unsafe fn ResUtilTerminateServiceProcessFromResDll(dwservicepid: u32, boffline: P1, pdwresourcestate: *mut u32, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 @@ -3223,7 +2471,7 @@ where P2: 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(core::mem::transmute(ppropertytable), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams.unwrap_or(core::ptr::null_mut()))) + ResUtilVerifyPropertyTable(core::mem::transmute(ppropertytable), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ResUtilVerifyResourceService(pszservicename: P0) -> u32 @@ -3235,12 +2483,9 @@ where } #[cfg(feature = "Win32_System_Services")] #[inline] -pub unsafe fn ResUtilVerifyService(hservicehandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResUtilVerifyService(hservicehandle: super::super::System::Services::SC_HANDLE) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilVerifyService(hservicehandle : super::super::System::Services:: SC_HANDLE) -> u32); - ResUtilVerifyService(hservicehandle.param().abi()) + ResUtilVerifyService(core::mem::transmute(hservicehandle)) } #[inline] pub unsafe fn ResUtilVerifyShutdownSafe(flags: u32, reason: u32, presult: *mut u32) -> u32 { @@ -3249,14 +2494,13 @@ pub unsafe fn ResUtilVerifyShutdownSafe(flags: u32, reason: u32, presult: *mut u } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilsDeleteKeyTree(key: P0, keyname: P1, treatnokeyaserror: P2) -> u32 +pub unsafe fn ResUtilsDeleteKeyTree(key: super::super::System::Registry::HKEY, keyname: P1, treatnokeyaserror: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilsDeleteKeyTree(key : super::super::System::Registry:: HKEY, keyname : windows_core::PCWSTR, treatnokeyaserror : super::super::Foundation:: BOOL) -> u32); - ResUtilsDeleteKeyTree(key.param().abi(), keyname.param().abi(), treatnokeyaserror.param().abi()) + ResUtilsDeleteKeyTree(core::mem::transmute(key), keyname.param().abi(), treatnokeyaserror.param().abi()) } #[inline] pub unsafe fn ResetAllAppInstanceVersions() -> u32 { @@ -3264,21 +2508,17 @@ pub unsafe fn ResetAllAppInstanceVersions() -> u32 { ResetAllAppInstanceVersions() } #[inline] -pub unsafe fn RestartClusterResource(hresource: P0, dwflags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RestartClusterResource(hresource: HRESOURCE, dwflags: u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RestartClusterResource(hresource : HRESOURCE, dwflags : u32) -> u32); - RestartClusterResource(hresource.param().abi(), core::mem::transmute(dwflags)) + RestartClusterResource(core::mem::transmute(hresource), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn RestartClusterResourceEx(hresource: P0, dwflags: u32, lpszreason: P2) -> u32 +pub unsafe fn RestartClusterResourceEx(hresource: HRESOURCE, dwflags: u32, lpszreason: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RestartClusterResourceEx(hresource : HRESOURCE, dwflags : u32, lpszreason : windows_core::PCWSTR) -> u32); - RestartClusterResourceEx(hresource.param().abi(), core::mem::transmute(dwflags), lpszreason.param().abi()) + RestartClusterResourceEx(core::mem::transmute(hresource), core::mem::transmute(dwflags), lpszreason.param().abi()) } #[inline] pub unsafe fn RestoreClusterDatabase(lpszpathname: P0, bforce: P1, lpszquorumdriveletter: P2) -> u32 @@ -3291,185 +2531,155 @@ where RestoreClusterDatabase(lpszpathname.param().abi(), bforce.param().abi(), lpszquorumdriveletter.param().abi()) } #[inline] -pub unsafe fn ResumeClusterNode(hnode: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResumeClusterNode(hnode: HNODE) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ResumeClusterNode(hnode : HNODE) -> u32); - ResumeClusterNode(hnode.param().abi()) + ResumeClusterNode(core::mem::transmute(hnode)) } #[inline] -pub unsafe fn ResumeClusterNodeEx(hnode: P0, eresumefailbacktype: CLUSTER_NODE_RESUME_FAILBACK_TYPE, dwresumeflagsreserved: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResumeClusterNodeEx(hnode: HNODE, eresumefailbacktype: CLUSTER_NODE_RESUME_FAILBACK_TYPE, dwresumeflagsreserved: u32) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ResumeClusterNodeEx(hnode : HNODE, eresumefailbacktype : CLUSTER_NODE_RESUME_FAILBACK_TYPE, dwresumeflagsreserved : u32) -> u32); - ResumeClusterNodeEx(hnode.param().abi(), core::mem::transmute(eresumefailbacktype), core::mem::transmute(dwresumeflagsreserved)) + ResumeClusterNodeEx(core::mem::transmute(hnode), core::mem::transmute(eresumefailbacktype), core::mem::transmute(dwresumeflagsreserved)) } #[inline] -pub unsafe fn ResumeClusterNodeEx2(hnode: P0, eresumefailbacktype: CLUSTER_NODE_RESUME_FAILBACK_TYPE, dwresumeflagsreserved: u32, lpszreason: P3) -> u32 +pub unsafe fn ResumeClusterNodeEx2(hnode: HNODE, eresumefailbacktype: CLUSTER_NODE_RESUME_FAILBACK_TYPE, dwresumeflagsreserved: u32, lpszreason: P3) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ResumeClusterNodeEx2(hnode : HNODE, eresumefailbacktype : CLUSTER_NODE_RESUME_FAILBACK_TYPE, dwresumeflagsreserved : u32, lpszreason : windows_core::PCWSTR) -> u32); - ResumeClusterNodeEx2(hnode.param().abi(), core::mem::transmute(eresumefailbacktype), core::mem::transmute(dwresumeflagsreserved), lpszreason.param().abi()) + ResumeClusterNodeEx2(core::mem::transmute(hnode), core::mem::transmute(eresumefailbacktype), core::mem::transmute(dwresumeflagsreserved), lpszreason.param().abi()) } #[inline] -pub unsafe fn SetAppInstanceCsvFlags(processhandle: P0, mask: u32, flags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetAppInstanceCsvFlags(processhandle: super::super::Foundation::HANDLE, mask: u32, flags: u32) -> u32 { windows_targets::link!("ntlanman.dll" "system" fn SetAppInstanceCsvFlags(processhandle : super::super::Foundation:: HANDLE, mask : u32, flags : u32) -> u32); - SetAppInstanceCsvFlags(processhandle.param().abi(), core::mem::transmute(mask), core::mem::transmute(flags)) + SetAppInstanceCsvFlags(core::mem::transmute(processhandle), core::mem::transmute(mask), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SetClusterGroupName(hgroup: P0, lpszgroupname: P1) -> u32 +pub unsafe fn SetClusterGroupName(hgroup: HGROUP, lpszgroupname: P1) -> u32 where - P0: windows_core::Param
, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterGroupName(hgroup : HGROUP, lpszgroupname : windows_core::PCWSTR) -> u32); - SetClusterGroupName(hgroup.param().abi(), lpszgroupname.param().abi()) + SetClusterGroupName(core::mem::transmute(hgroup), lpszgroupname.param().abi()) } #[inline] -pub unsafe fn SetClusterGroupNameEx(hgroup: P0, lpszgroupname: P1, lpszreason: P2) -> u32 +pub unsafe fn SetClusterGroupNameEx(hgroup: HGROUP, lpszgroupname: P1, lpszreason: P2) -> u32 where - P0: windows_core::Param
, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterGroupNameEx(hgroup : HGROUP, lpszgroupname : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> u32); - SetClusterGroupNameEx(hgroup.param().abi(), lpszgroupname.param().abi(), lpszreason.param().abi()) + SetClusterGroupNameEx(core::mem::transmute(hgroup), lpszgroupname.param().abi(), lpszreason.param().abi()) } #[inline] -pub unsafe fn SetClusterGroupNodeList(hgroup: P0, nodelist: Option<&[HNODE]>) -> u32 -where - P0: windows_core::Param
, -{ +pub unsafe fn SetClusterGroupNodeList(hgroup: HGROUP, nodelist: Option<&[HNODE]>) -> u32 { windows_targets::link!("clusapi.dll" "system" fn SetClusterGroupNodeList(hgroup : HGROUP, nodecount : u32, nodelist : *const HNODE) -> u32); - SetClusterGroupNodeList(hgroup.param().abi(), nodelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(nodelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + SetClusterGroupNodeList(core::mem::transmute(hgroup), nodelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(nodelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn SetClusterGroupNodeListEx(hgroup: P0, nodelist: &[HNODE], lpszreason: P3) -> u32 +pub unsafe fn SetClusterGroupNodeListEx(hgroup: HGROUP, nodelist: &[HNODE], lpszreason: P3) -> u32 where - P0: windows_core::Param
, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterGroupNodeListEx(hgroup : HGROUP, nodecount : u32, nodelist : *const HNODE, lpszreason : windows_core::PCWSTR) -> u32); - SetClusterGroupNodeListEx(hgroup.param().abi(), nodelist.len().try_into().unwrap(), core::mem::transmute(nodelist.as_ptr()), lpszreason.param().abi()) + SetClusterGroupNodeListEx(core::mem::transmute(hgroup), nodelist.len().try_into().unwrap(), core::mem::transmute(nodelist.as_ptr()), lpszreason.param().abi()) } #[inline] -pub unsafe fn SetClusterGroupSetDependencyExpression(hgroupset: P0, lpszdependencyexprssion: P1) -> u32 +pub unsafe fn SetClusterGroupSetDependencyExpression(hgroupset: HGROUPSET, lpszdependencyexprssion: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterGroupSetDependencyExpression(hgroupset : HGROUPSET, lpszdependencyexprssion : windows_core::PCWSTR) -> u32); - SetClusterGroupSetDependencyExpression(hgroupset.param().abi(), lpszdependencyexprssion.param().abi()) + SetClusterGroupSetDependencyExpression(core::mem::transmute(hgroupset), lpszdependencyexprssion.param().abi()) } #[inline] -pub unsafe fn SetClusterGroupSetDependencyExpressionEx(hgroupset: P0, lpszdependencyexpression: P1, lpszreason: P2) -> u32 +pub unsafe fn SetClusterGroupSetDependencyExpressionEx(hgroupset: HGROUPSET, lpszdependencyexpression: P1, lpszreason: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterGroupSetDependencyExpressionEx(hgroupset : HGROUPSET, lpszdependencyexpression : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> u32); - SetClusterGroupSetDependencyExpressionEx(hgroupset.param().abi(), lpszdependencyexpression.param().abi(), lpszreason.param().abi()) + SetClusterGroupSetDependencyExpressionEx(core::mem::transmute(hgroupset), lpszdependencyexpression.param().abi(), lpszreason.param().abi()) } #[inline] -pub unsafe fn SetClusterName(hcluster: P0, lpsznewclustername: P1) -> u32 +pub unsafe fn SetClusterName(hcluster: HCLUSTER, lpsznewclustername: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterName(hcluster : HCLUSTER, lpsznewclustername : windows_core::PCWSTR) -> u32); - SetClusterName(hcluster.param().abi(), lpsznewclustername.param().abi()) + SetClusterName(core::mem::transmute(hcluster), lpsznewclustername.param().abi()) } #[inline] -pub unsafe fn SetClusterNameEx(hcluster: P0, lpsznewclustername: P1, lpszreason: P2) -> u32 +pub unsafe fn SetClusterNameEx(hcluster: HCLUSTER, lpsznewclustername: P1, lpszreason: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterNameEx(hcluster : HCLUSTER, lpsznewclustername : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> u32); - SetClusterNameEx(hcluster.param().abi(), lpsznewclustername.param().abi(), lpszreason.param().abi()) + SetClusterNameEx(core::mem::transmute(hcluster), lpsznewclustername.param().abi(), lpszreason.param().abi()) } #[inline] -pub unsafe fn SetClusterNetworkName(hnetwork: P0, lpszname: P1) -> u32 +pub unsafe fn SetClusterNetworkName(hnetwork: HNETWORK, lpszname: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterNetworkName(hnetwork : HNETWORK, lpszname : windows_core::PCWSTR) -> u32); - SetClusterNetworkName(hnetwork.param().abi(), lpszname.param().abi()) + SetClusterNetworkName(core::mem::transmute(hnetwork), lpszname.param().abi()) } #[inline] -pub unsafe fn SetClusterNetworkNameEx(hnetwork: P0, lpszname: P1, lpszreason: P2) -> u32 +pub unsafe fn SetClusterNetworkNameEx(hnetwork: HNETWORK, lpszname: P1, lpszreason: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterNetworkNameEx(hnetwork : HNETWORK, lpszname : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> u32); - SetClusterNetworkNameEx(hnetwork.param().abi(), lpszname.param().abi(), lpszreason.param().abi()) + SetClusterNetworkNameEx(core::mem::transmute(hnetwork), lpszname.param().abi(), lpszreason.param().abi()) } #[inline] -pub unsafe fn SetClusterNetworkPriorityOrder(hcluster: P0, networklist: &[HNETWORK]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetClusterNetworkPriorityOrder(hcluster: HCLUSTER, networklist: &[HNETWORK]) -> u32 { windows_targets::link!("clusapi.dll" "system" fn SetClusterNetworkPriorityOrder(hcluster : HCLUSTER, networkcount : u32, networklist : *const HNETWORK) -> u32); - SetClusterNetworkPriorityOrder(hcluster.param().abi(), networklist.len().try_into().unwrap(), core::mem::transmute(networklist.as_ptr())) + SetClusterNetworkPriorityOrder(core::mem::transmute(hcluster), networklist.len().try_into().unwrap(), core::mem::transmute(networklist.as_ptr())) } #[inline] -pub unsafe fn SetClusterQuorumResource(hresource: P0, lpszdevicename: P1, dwmaxquologsize: u32) -> u32 +pub unsafe fn SetClusterQuorumResource(hresource: HRESOURCE, lpszdevicename: P1, dwmaxquologsize: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterQuorumResource(hresource : HRESOURCE, lpszdevicename : windows_core::PCWSTR, dwmaxquologsize : u32) -> u32); - SetClusterQuorumResource(hresource.param().abi(), lpszdevicename.param().abi(), core::mem::transmute(dwmaxquologsize)) + SetClusterQuorumResource(core::mem::transmute(hresource), lpszdevicename.param().abi(), core::mem::transmute(dwmaxquologsize)) } #[inline] -pub unsafe fn SetClusterQuorumResourceEx(hresource: P0, lpszdevicename: P1, dwmaxquorumlogsize: u32, lpszreason: P3) -> u32 +pub unsafe fn SetClusterQuorumResourceEx(hresource: HRESOURCE, lpszdevicename: P1, dwmaxquorumlogsize: u32, lpszreason: P3) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterQuorumResourceEx(hresource : HRESOURCE, lpszdevicename : windows_core::PCWSTR, dwmaxquorumlogsize : u32, lpszreason : windows_core::PCWSTR) -> u32); - SetClusterQuorumResourceEx(hresource.param().abi(), lpszdevicename.param().abi(), core::mem::transmute(dwmaxquorumlogsize), lpszreason.param().abi()) + SetClusterQuorumResourceEx(core::mem::transmute(hresource), lpszdevicename.param().abi(), core::mem::transmute(dwmaxquorumlogsize), lpszreason.param().abi()) } #[inline] -pub unsafe fn SetClusterResourceDependencyExpression(hresource: P0, lpszdependencyexpression: P1) -> u32 +pub unsafe fn SetClusterResourceDependencyExpression(hresource: HRESOURCE, lpszdependencyexpression: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterResourceDependencyExpression(hresource : HRESOURCE, lpszdependencyexpression : windows_core::PCWSTR) -> u32); - SetClusterResourceDependencyExpression(hresource.param().abi(), lpszdependencyexpression.param().abi()) + SetClusterResourceDependencyExpression(core::mem::transmute(hresource), lpszdependencyexpression.param().abi()) } #[inline] -pub unsafe fn SetClusterResourceName(hresource: P0, lpszresourcename: P1) -> u32 +pub unsafe fn SetClusterResourceName(hresource: HRESOURCE, lpszresourcename: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterResourceName(hresource : HRESOURCE, lpszresourcename : windows_core::PCWSTR) -> u32); - SetClusterResourceName(hresource.param().abi(), lpszresourcename.param().abi()) + SetClusterResourceName(core::mem::transmute(hresource), lpszresourcename.param().abi()) } #[inline] -pub unsafe fn SetClusterResourceNameEx(hresource: P0, lpszresourcename: P1, lpszreason: P2) -> u32 +pub unsafe fn SetClusterResourceNameEx(hresource: HRESOURCE, lpszresourcename: P1, lpszreason: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterResourceNameEx(hresource : HRESOURCE, lpszresourcename : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> u32); - SetClusterResourceNameEx(hresource.param().abi(), lpszresourcename.param().abi(), lpszreason.param().abi()) + SetClusterResourceNameEx(core::mem::transmute(hresource), lpszresourcename.param().abi(), lpszreason.param().abi()) } #[inline] pub unsafe fn SetClusterServiceAccountPassword(lpszclustername: P0, lpsznewpassword: P1, dwflags: u32, lpreturnstatusbuffer: Option<*mut CLUSTER_SET_PASSWORD_STATUS>, lpcbreturnstatusbuffersize: *mut u32) -> u32 @@ -3478,26 +2688,24 @@ 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(), core::mem::transmute(dwflags), core::mem::transmute(lpreturnstatusbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbreturnstatusbuffersize)) + SetClusterServiceAccountPassword(lpszclustername.param().abi(), lpsznewpassword.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpreturnstatusbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbreturnstatusbuffersize)) } #[inline] -pub unsafe fn SetGroupDependencyExpression(hgroup: P0, lpszdependencyexpression: P1) -> u32 +pub unsafe fn SetGroupDependencyExpression(hgroup: HGROUP, lpszdependencyexpression: P1) -> u32 where - P0: windows_core::Param
, P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetGroupDependencyExpression(hgroup : HGROUP, lpszdependencyexpression : windows_core::PCWSTR) -> u32); - SetGroupDependencyExpression(hgroup.param().abi(), lpszdependencyexpression.param().abi()) + SetGroupDependencyExpression(core::mem::transmute(hgroup), lpszdependencyexpression.param().abi()) } #[inline] -pub unsafe fn SetGroupDependencyExpressionEx(hgroup: P0, lpszdependencyexpression: P1, lpszreason: P2) -> u32 +pub unsafe fn SetGroupDependencyExpressionEx(hgroup: HGROUP, lpszdependencyexpression: P1, lpszreason: P2) -> u32 where - P0: windows_core::Param
, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetGroupDependencyExpressionEx(hgroup : HGROUP, lpszdependencyexpression : windows_core::PCWSTR, lpszreason : windows_core::PCWSTR) -> u32); - SetGroupDependencyExpressionEx(hgroup.param().abi(), lpszdependencyexpression.param().abi(), lpszreason.param().abi()) + SetGroupDependencyExpressionEx(core::mem::transmute(hgroup), lpszdependencyexpression.param().abi(), lpszreason.param().abi()) } pub const BitLockerDecrypted: i32 = 4i32; pub const BitLockerDecrypting: i32 = 16i32; 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 8bfab048da..880e8e837a 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs @@ -1,46 +1,38 @@ #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpAddFragmentToCache(requestqueuehandle: P0, urlprefix: P1, datachunk: *const HTTP_DATA_CHUNK, cachepolicy: *const HTTP_CACHE_POLICY, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 +pub unsafe fn HttpAddFragmentToCache(requestqueuehandle: super::super::Foundation::HANDLE, urlprefix: P1, datachunk: *const HTTP_DATA_CHUNK, cachepolicy: *const HTTP_CACHE_POLICY, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 where - P0: windows_core::Param, 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(), core::mem::transmute(datachunk), core::mem::transmute(cachepolicy), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpAddFragmentToCache(core::mem::transmute(requestqueuehandle), urlprefix.param().abi(), core::mem::transmute(datachunk), core::mem::transmute(cachepolicy), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpAddUrl(requestqueuehandle: P0, fullyqualifiedurl: P1, reserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn HttpAddUrl(requestqueuehandle: super::super::Foundation::HANDLE, fullyqualifiedurl: P1, reserved: Option<*const core::ffi::c_void>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null()))) + HttpAddUrl(core::mem::transmute(requestqueuehandle), fullyqualifiedurl.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpAddUrlToUrlGroup(urlgroupid: u64, pfullyqualifiedurl: P1, urlcontext: u64, reserved: u32) -> u32 +pub unsafe fn HttpAddUrlToUrlGroup(urlgroupid: u64, pfullyqualifiedurl: P1, urlcontext: u64, reserved: Option) -> u32 where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpAddUrlToUrlGroup(urlgroupid : u64, pfullyqualifiedurl : windows_core::PCWSTR, urlcontext : u64, reserved : u32) -> u32); - HttpAddUrlToUrlGroup(core::mem::transmute(urlgroupid), pfullyqualifiedurl.param().abi(), core::mem::transmute(urlcontext), core::mem::transmute(reserved)) + HttpAddUrlToUrlGroup(core::mem::transmute(urlgroupid), pfullyqualifiedurl.param().abi(), core::mem::transmute(urlcontext), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpCancelHttpRequest(requestqueuehandle: P0, requestid: u64, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpCancelHttpRequest(requestqueuehandle: super::super::Foundation::HANDLE, requestid: u64, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(requestid), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpCancelHttpRequest(core::mem::transmute(requestqueuehandle), core::mem::transmute(requestid), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpCloseRequestQueue(requestqueuehandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpCloseRequestQueue(requestqueuehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpCloseRequestQueue(requestqueuehandle : super::super::Foundation:: HANDLE) -> u32); - HttpCloseRequestQueue(requestqueuehandle.param().abi()) + HttpCloseRequestQueue(core::mem::transmute(requestqueuehandle)) } #[inline] pub unsafe fn HttpCloseServerSession(serversessionid: u64) -> u32 { @@ -53,75 +45,65 @@ pub unsafe fn HttpCloseUrlGroup(urlgroupid: u64) -> u32 { HttpCloseUrlGroup(core::mem::transmute(urlgroupid)) } #[inline] -pub unsafe fn HttpCreateHttpHandle(requestqueuehandle: *mut super::super::Foundation::HANDLE, reserved: u32) -> u32 { +pub unsafe fn HttpCreateHttpHandle(requestqueuehandle: *mut super::super::Foundation::HANDLE, reserved: Option) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpCreateHttpHandle(requestqueuehandle : *mut super::super::Foundation:: HANDLE, reserved : u32) -> u32); - HttpCreateHttpHandle(core::mem::transmute(requestqueuehandle), core::mem::transmute(reserved)) + HttpCreateHttpHandle(core::mem::transmute(requestqueuehandle), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn HttpCreateRequestQueue(version: HTTPAPI_VERSION, name: P1, securityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: u32, requestqueuehandle: *mut super::super::Foundation::HANDLE) -> u32 +pub unsafe fn HttpCreateRequestQueue(version: HTTPAPI_VERSION, name: P1, securityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: Option, requestqueuehandle: *mut super::super::Foundation::HANDLE) -> u32 where P1: 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(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(requestqueuehandle)) + HttpCreateRequestQueue(core::mem::transmute(version), name.param().abi(), core::mem::transmute(securityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(requestqueuehandle)) } #[inline] -pub unsafe fn HttpCreateServerSession(version: HTTPAPI_VERSION, serversessionid: *mut u64, reserved: u32) -> u32 { +pub unsafe fn HttpCreateServerSession(version: HTTPAPI_VERSION, serversessionid: *mut u64, reserved: Option) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpCreateServerSession(version : HTTPAPI_VERSION, serversessionid : *mut u64, reserved : u32) -> u32); - HttpCreateServerSession(core::mem::transmute(version), core::mem::transmute(serversessionid), core::mem::transmute(reserved)) + HttpCreateServerSession(core::mem::transmute(version), core::mem::transmute(serversessionid), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpCreateUrlGroup(serversessionid: u64, purlgroupid: *mut u64, reserved: u32) -> u32 { +pub unsafe fn HttpCreateUrlGroup(serversessionid: u64, purlgroupid: *mut u64, reserved: Option) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpCreateUrlGroup(serversessionid : u64, purlgroupid : *mut u64, reserved : u32) -> u32); - HttpCreateUrlGroup(core::mem::transmute(serversessionid), core::mem::transmute(purlgroupid), core::mem::transmute(reserved)) + HttpCreateUrlGroup(core::mem::transmute(serversessionid), core::mem::transmute(purlgroupid), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpDeclarePush(requestqueuehandle: P0, requestid: u64, verb: HTTP_VERB, path: P3, query: P4, headers: Option<*const HTTP_REQUEST_HEADERS>) -> u32 +pub unsafe fn HttpDeclarePush(requestqueuehandle: super::super::Foundation::HANDLE, requestid: u64, verb: HTTP_VERB, path: P3, query: P4, headers: Option<*const HTTP_REQUEST_HEADERS>) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, P4: 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(), core::mem::transmute(requestid), core::mem::transmute(verb), path.param().abi(), query.param().abi(), core::mem::transmute(headers.unwrap_or(core::ptr::null()))) + HttpDeclarePush(core::mem::transmute(requestqueuehandle), core::mem::transmute(requestid), core::mem::transmute(verb), path.param().abi(), query.param().abi(), core::mem::transmute(headers.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpDelegateRequestEx(requestqueuehandle: P0, delegatequeuehandle: P1, requestid: u64, delegateurlgroupid: u64, propertyinfosetsize: u32, propertyinfoset: *const HTTP_DELEGATE_REQUEST_PROPERTY_INFO) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn HttpDelegateRequestEx(requestqueuehandle: super::super::Foundation::HANDLE, delegatequeuehandle: super::super::Foundation::HANDLE, requestid: u64, delegateurlgroupid: u64, propertyinfosetsize: u32, propertyinfoset: *const HTTP_DELEGATE_REQUEST_PROPERTY_INFO) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpDelegateRequestEx(requestqueuehandle : super::super::Foundation:: HANDLE, delegatequeuehandle : super::super::Foundation:: HANDLE, requestid : u64, delegateurlgroupid : u64, propertyinfosetsize : u32, propertyinfoset : *const HTTP_DELEGATE_REQUEST_PROPERTY_INFO) -> u32); - HttpDelegateRequestEx(requestqueuehandle.param().abi(), delegatequeuehandle.param().abi(), core::mem::transmute(requestid), core::mem::transmute(delegateurlgroupid), core::mem::transmute(propertyinfosetsize), core::mem::transmute(propertyinfoset)) + HttpDelegateRequestEx(core::mem::transmute(requestqueuehandle), core::mem::transmute(delegatequeuehandle), core::mem::transmute(requestid), core::mem::transmute(delegateurlgroupid), core::mem::transmute(propertyinfosetsize), core::mem::transmute(propertyinfoset)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpDeleteServiceConfiguration(servicehandle: P0, configid: HTTP_SERVICE_CONFIG_ID, pconfiginformation: *const core::ffi::c_void, configinformationlength: u32, poverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpDeleteServiceConfiguration(servicehandle: Option, configid: HTTP_SERVICE_CONFIG_ID, pconfiginformation: *const core::ffi::c_void, configinformationlength: u32, poverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(configid), core::mem::transmute(pconfiginformation), core::mem::transmute(configinformationlength), core::mem::transmute(poverlapped.unwrap_or(core::ptr::null()))) + HttpDeleteServiceConfiguration(core::mem::transmute(servicehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(configid), core::mem::transmute(pconfiginformation), core::mem::transmute(configinformationlength), core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpFindUrlGroupId(fullyqualifiedurl: P0, requestqueuehandle: P1, urlgroupid: *mut u64) -> u32 +pub unsafe fn HttpFindUrlGroupId(fullyqualifiedurl: P0, requestqueuehandle: super::super::Foundation::HANDLE, urlgroupid: *mut u64) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpFindUrlGroupId(fullyqualifiedurl : windows_core::PCWSTR, requestqueuehandle : super::super::Foundation:: HANDLE, urlgroupid : *mut u64) -> u32); - HttpFindUrlGroupId(fullyqualifiedurl.param().abi(), requestqueuehandle.param().abi(), core::mem::transmute(urlgroupid)) + HttpFindUrlGroupId(fullyqualifiedurl.param().abi(), core::mem::transmute(requestqueuehandle), core::mem::transmute(urlgroupid)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpFlushResponseCache(requestqueuehandle: P0, urlprefix: P1, flags: u32, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 +pub unsafe fn HttpFlushResponseCache(requestqueuehandle: super::super::Foundation::HANDLE, urlprefix: P1, flags: u32, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpFlushResponseCache(core::mem::transmute(requestqueuehandle), urlprefix.param().abi(), core::mem::transmute(flags), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn HttpGetExtension(version: HTTPAPI_VERSION, extension: u32, buffer: *mut core::ffi::c_void, buffersize: u32) -> u32 { @@ -131,7 +113,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), core::mem::transmute(flags), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + HttpInitialize(core::mem::transmute(version), core::mem::transmute(flags), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn HttpIsFeatureSupported(featureid: HTTP_FEATURE_ID) -> super::super::Foundation::BOOL { @@ -139,85 +121,68 @@ pub unsafe fn HttpIsFeatureSupported(featureid: HTTP_FEATURE_ID) -> super::super HttpIsFeatureSupported(core::mem::transmute(featureid)) } #[inline] -pub unsafe fn HttpPrepareUrl(reserved: Option<*const core::ffi::c_void>, flags: u32, url: P2, preparedurl: *mut windows_core::PWSTR) -> u32 +pub unsafe fn HttpPrepareUrl(reserved: Option<*const core::ffi::c_void>, flags: Option, url: P2, preparedurl: *mut windows_core::PWSTR) -> u32 where P2: 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(core::ptr::null())), core::mem::transmute(flags), url.param().abi(), core::mem::transmute(preparedurl)) + HttpPrepareUrl(core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), url.param().abi(), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpQueryRequestQueueProperty(requestqueuehandle: super::super::Foundation::HANDLE, property: HTTP_SERVER_PROPERTY, propertyinformation: Option<*mut core::ffi::c_void>, propertyinformationlength: u32, reserved1: Option, returnlength: Option<*mut u32>, reserved2: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(property), core::mem::transmute(propertyinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertyinformationlength), core::mem::transmute(reserved1), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))) + HttpQueryRequestQueueProperty(core::mem::transmute(requestqueuehandle), core::mem::transmute(property), core::mem::transmute(propertyinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyinformationlength), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(serversessionid), core::mem::transmute(property), core::mem::transmute(propertyinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertyinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + HttpQueryServerSessionProperty(core::mem::transmute(serversessionid), core::mem::transmute(property), core::mem::transmute(propertyinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpQueryServiceConfiguration(servicehandle: P0, configid: HTTP_SERVICE_CONFIG_ID, pinput: Option<*const core::ffi::c_void>, inputlength: u32, poutput: Option<*mut core::ffi::c_void>, outputlength: u32, preturnlength: Option<*mut u32>, poverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpQueryServiceConfiguration(servicehandle: Option, configid: HTTP_SERVICE_CONFIG_ID, pinput: Option<*const core::ffi::c_void>, inputlength: u32, poutput: Option<*mut core::ffi::c_void>, outputlength: u32, preturnlength: Option<*mut u32>, poverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(configid), core::mem::transmute(pinput.unwrap_or(core::ptr::null())), core::mem::transmute(inputlength), core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputlength), core::mem::transmute(preturnlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poverlapped.unwrap_or(core::ptr::null()))) + HttpQueryServiceConfiguration(core::mem::transmute(servicehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(configid), core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputlength), core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputlength), core::mem::transmute(preturnlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(urlgroupid), core::mem::transmute(property), core::mem::transmute(propertyinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertyinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + HttpQueryUrlGroupProperty(core::mem::transmute(urlgroupid), core::mem::transmute(property), core::mem::transmute(propertyinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpReadFragmentFromCache(requestqueuehandle: P0, urlprefix: P1, byterange: Option<*const HTTP_BYTE_RANGE>, buffer: *mut core::ffi::c_void, bufferlength: u32, bytesread: Option<*mut u32>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 +pub unsafe fn HttpReadFragmentFromCache(requestqueuehandle: super::super::Foundation::HANDLE, urlprefix: P1, byterange: Option<*const HTTP_BYTE_RANGE>, buffer: *mut core::ffi::c_void, bufferlength: u32, bytesread: Option<*mut u32>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(buffer), core::mem::transmute(bufferlength), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpReadFragmentFromCache(core::mem::transmute(requestqueuehandle), urlprefix.param().abi(), core::mem::transmute(byterange.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer), core::mem::transmute(bufferlength), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpReceiveClientCertificate(requestqueuehandle: P0, connectionid: u64, flags: u32, sslclientcertinfo: *mut HTTP_SSL_CLIENT_CERT_INFO, sslclientcertinfosize: u32, bytesreceived: Option<*mut u32>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpReceiveClientCertificate(requestqueuehandle: super::super::Foundation::HANDLE, connectionid: u64, flags: u32, sslclientcertinfo: *mut HTTP_SSL_CLIENT_CERT_INFO, sslclientcertinfosize: u32, bytesreceived: Option<*mut u32>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(connectionid), core::mem::transmute(flags), core::mem::transmute(sslclientcertinfo), core::mem::transmute(sslclientcertinfosize), core::mem::transmute(bytesreceived.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpReceiveClientCertificate(core::mem::transmute(requestqueuehandle), core::mem::transmute(connectionid), core::mem::transmute(flags), core::mem::transmute(sslclientcertinfo), core::mem::transmute(sslclientcertinfosize), core::mem::transmute(bytesreceived.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn HttpReceiveHttpRequest(requestqueuehandle: P0, requestid: u64, flags: HTTP_RECEIVE_HTTP_REQUEST_FLAGS, requestbuffer: *mut HTTP_REQUEST_V2, requestbufferlength: u32, bytesreturned: Option<*mut u32>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpReceiveHttpRequest(requestqueuehandle: super::super::Foundation::HANDLE, requestid: u64, flags: HTTP_RECEIVE_HTTP_REQUEST_FLAGS, requestbuffer: *mut HTTP_REQUEST_V2, requestbufferlength: u32, bytesreturned: Option<*mut u32>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(requestid), core::mem::transmute(flags), core::mem::transmute(requestbuffer), core::mem::transmute(requestbufferlength), core::mem::transmute(bytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpReceiveHttpRequest(core::mem::transmute(requestqueuehandle), core::mem::transmute(requestid), core::mem::transmute(flags), core::mem::transmute(requestbuffer), core::mem::transmute(requestbufferlength), core::mem::transmute(bytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpReceiveRequestEntityBody(requestqueuehandle: P0, requestid: u64, flags: u32, entitybuffer: *mut core::ffi::c_void, entitybufferlength: u32, bytesreturned: Option<*mut u32>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpReceiveRequestEntityBody(requestqueuehandle: super::super::Foundation::HANDLE, requestid: u64, flags: u32, entitybuffer: *mut core::ffi::c_void, entitybufferlength: u32, bytesreturned: Option<*mut u32>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(requestid), core::mem::transmute(flags), core::mem::transmute(entitybuffer), core::mem::transmute(entitybufferlength), core::mem::transmute(bytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpReceiveRequestEntityBody(core::mem::transmute(requestqueuehandle), core::mem::transmute(requestid), core::mem::transmute(flags), core::mem::transmute(entitybuffer), core::mem::transmute(entitybufferlength), core::mem::transmute(bytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpRemoveUrl(requestqueuehandle: P0, fullyqualifiedurl: P1) -> u32 +pub unsafe fn HttpRemoveUrl(requestqueuehandle: super::super::Foundation::HANDLE, fullyqualifiedurl: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpRemoveUrl(requestqueuehandle : super::super::Foundation:: HANDLE, fullyqualifiedurl : windows_core::PCWSTR) -> u32); - HttpRemoveUrl(requestqueuehandle.param().abi(), fullyqualifiedurl.param().abi()) + HttpRemoveUrl(core::mem::transmute(requestqueuehandle), fullyqualifiedurl.param().abi()) } #[inline] pub unsafe fn HttpRemoveUrlFromUrlGroup(urlgroupid: u64, pfullyqualifiedurl: P1, flags: u32) -> u32 @@ -229,60 +194,48 @@ where } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpSendHttpResponse(requestqueuehandle: P0, requestid: u64, flags: u32, httpresponse: *const HTTP_RESPONSE_V2, cachepolicy: Option<*const HTTP_CACHE_POLICY>, bytessent: Option<*mut u32>, reserved1: Option<*const core::ffi::c_void>, reserved2: u32, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>, logdata: Option<*const HTTP_LOG_DATA>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpSendHttpResponse(requestqueuehandle: super::super::Foundation::HANDLE, requestid: u64, flags: u32, httpresponse: *const HTTP_RESPONSE_V2, cachepolicy: Option<*const HTTP_CACHE_POLICY>, bytessent: Option<*mut u32>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>, logdata: Option<*const HTTP_LOG_DATA>) -> u32 { 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(), + core::mem::transmute(requestqueuehandle), core::mem::transmute(requestid), core::mem::transmute(flags), core::mem::transmute(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())), - core::mem::transmute(reserved2), - core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(logdata.unwrap_or(core::ptr::null())), + core::mem::transmute(cachepolicy.unwrap_or(core::mem::zeroed())), + core::mem::transmute(bytessent.unwrap_or(core::mem::zeroed())), + core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), + core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), + core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), + core::mem::transmute(logdata.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpSendResponseEntityBody(requestqueuehandle: P0, requestid: u64, flags: u32, entitychunks: Option<&[HTTP_DATA_CHUNK]>, bytessent: Option<*mut u32>, reserved1: Option<*const core::ffi::c_void>, reserved2: u32, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>, logdata: Option<*const HTTP_LOG_DATA>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpSendResponseEntityBody(requestqueuehandle: super::super::Foundation::HANDLE, requestid: u64, flags: u32, entitychunks: Option<&[HTTP_DATA_CHUNK]>, bytessent: Option<*mut u32>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>, logdata: Option<*const HTTP_LOG_DATA>) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpSendResponseEntityBody(requestqueuehandle : super::super::Foundation:: HANDLE, requestid : u64, flags : u32, entitychunkcount : u16, entitychunks : *const HTTP_DATA_CHUNK, bytessent : *mut u32, reserved1 : *const core::ffi::c_void, reserved2 : u32, overlapped : *mut super::super::System::IO:: OVERLAPPED, logdata : *const HTTP_LOG_DATA) -> u32); HttpSendResponseEntityBody( - requestqueuehandle.param().abi(), + core::mem::transmute(requestqueuehandle), core::mem::transmute(requestid), core::mem::transmute(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(core::ptr::null_mut())), - core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), - core::mem::transmute(reserved2), - core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(logdata.unwrap_or(core::ptr::null())), + core::mem::transmute(bytessent.unwrap_or(core::mem::zeroed())), + core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), + core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), + core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), + core::mem::transmute(logdata.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpSetRequestProperty(requestqueuehandle: P0, id: u64, propertyid: HTTP_REQUEST_PROPERTY, input: Option<*const core::ffi::c_void>, inputpropertysize: u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpSetRequestProperty(requestqueuehandle: super::super::Foundation::HANDLE, id: u64, propertyid: HTTP_REQUEST_PROPERTY, input: Option<*const core::ffi::c_void>, inputpropertysize: u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { 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(), core::mem::transmute(id), core::mem::transmute(propertyid), core::mem::transmute(input.unwrap_or(core::ptr::null())), core::mem::transmute(inputpropertysize), core::mem::transmute(overlapped)) + HttpSetRequestProperty(core::mem::transmute(requestqueuehandle), core::mem::transmute(id), core::mem::transmute(propertyid), core::mem::transmute(input.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputpropertysize), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpSetRequestQueueProperty(requestqueuehandle: super::super::Foundation::HANDLE, property: HTTP_SERVER_PROPERTY, propertyinformation: *const core::ffi::c_void, propertyinformationlength: u32, reserved1: Option, reserved2: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(property), core::mem::transmute(propertyinformation), core::mem::transmute(propertyinformationlength), core::mem::transmute(reserved1), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))) + HttpSetRequestQueueProperty(core::mem::transmute(requestqueuehandle), core::mem::transmute(property), core::mem::transmute(propertyinformation), core::mem::transmute(propertyinformationlength), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn HttpSetServerSessionProperty(serversessionid: u64, property: HTTP_SERVER_PROPERTY, propertyinformation: *const core::ffi::c_void, propertyinformationlength: u32) -> u32 { @@ -291,12 +244,9 @@ pub unsafe fn HttpSetServerSessionProperty(serversessionid: u64, property: HTTP_ } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpSetServiceConfiguration(servicehandle: P0, configid: HTTP_SERVICE_CONFIG_ID, pconfiginformation: *const core::ffi::c_void, configinformationlength: u32, poverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpSetServiceConfiguration(servicehandle: Option, configid: HTTP_SERVICE_CONFIG_ID, pconfiginformation: *const core::ffi::c_void, configinformationlength: u32, poverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(configid), core::mem::transmute(pconfiginformation), core::mem::transmute(configinformationlength), core::mem::transmute(poverlapped.unwrap_or(core::ptr::null()))) + HttpSetServiceConfiguration(core::mem::transmute(servicehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(configid), core::mem::transmute(pconfiginformation), core::mem::transmute(configinformationlength), core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn HttpSetUrlGroupProperty(urlgroupid: u64, property: HTTP_SERVER_PROPERTY, propertyinformation: *const core::ffi::c_void, propertyinformationlength: u32) -> u32 { @@ -304,53 +254,38 @@ pub unsafe fn HttpSetUrlGroupProperty(urlgroupid: u64, property: HTTP_SERVER_PRO HttpSetUrlGroupProperty(core::mem::transmute(urlgroupid), core::mem::transmute(property), core::mem::transmute(propertyinformation), core::mem::transmute(propertyinformationlength)) } #[inline] -pub unsafe fn HttpShutdownRequestQueue(requestqueuehandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpShutdownRequestQueue(requestqueuehandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpShutdownRequestQueue(requestqueuehandle : super::super::Foundation:: HANDLE) -> u32); - HttpShutdownRequestQueue(requestqueuehandle.param().abi()) + HttpShutdownRequestQueue(core::mem::transmute(requestqueuehandle)) } #[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(core::mem::transmute(flags), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) + HttpTerminate(core::mem::transmute(flags), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpUpdateServiceConfiguration(handle: P0, configid: HTTP_SERVICE_CONFIG_ID, configinfo: *const core::ffi::c_void, configinfolength: u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpUpdateServiceConfiguration(handle: Option, configid: HTTP_SERVICE_CONFIG_ID, configinfo: *const core::ffi::c_void, configinfolength: u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(configid), core::mem::transmute(configinfo), core::mem::transmute(configinfolength), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) + HttpUpdateServiceConfiguration(core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(configid), core::mem::transmute(configinfo), core::mem::transmute(configinfolength), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpWaitForDemandStart(requestqueuehandle: P0, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpWaitForDemandStart(requestqueuehandle: super::super::Foundation::HANDLE, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 { 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(core::ptr::null_mut()))) + HttpWaitForDemandStart(core::mem::transmute(requestqueuehandle), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpWaitForDisconnect(requestqueuehandle: P0, connectionid: u64, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpWaitForDisconnect(requestqueuehandle: super::super::Foundation::HANDLE, connectionid: u64, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(connectionid), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpWaitForDisconnect(core::mem::transmute(requestqueuehandle), core::mem::transmute(connectionid), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn HttpWaitForDisconnectEx(requestqueuehandle: P0, connectionid: u64, reserved: u32, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpWaitForDisconnectEx(requestqueuehandle: super::super::Foundation::HANDLE, connectionid: u64, reserved: Option, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> u32 { 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(), core::mem::transmute(connectionid), core::mem::transmute(reserved), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) + HttpWaitForDisconnectEx(core::mem::transmute(requestqueuehandle), core::mem::transmute(connectionid), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } 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 7216a74cc3..58a26118fc 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs @@ -288,12 +288,9 @@ where ldap_check_filterW(core::mem::transmute(ld), searchfilter.param().abi()) } #[inline] -pub unsafe fn ldap_cleanup(hinstance: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ldap_cleanup(hinstance: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_cleanup(hinstance : super::super::Foundation:: HANDLE) -> u32); - ldap_cleanup(hinstance.param().abi()) + ldap_cleanup(core::mem::transmute(hinstance)) } #[inline] pub unsafe fn ldap_close_extended_op(ld: *mut LDAP, messagenumber: u32) -> u32 { @@ -348,7 +345,7 @@ where P3: 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(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) + ldap_compare_extA(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } #[inline] pub unsafe fn ldap_compare_extW(ld: *mut LDAP, dn: P1, attr: P2, value: P3, data: Option<*const LDAP_BERVAL>, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, messagenumber: *mut u32) -> u32 @@ -358,7 +355,7 @@ where P3: 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(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) + ldap_compare_extW(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols), core::mem::transmute(messagenumber)) } #[inline] pub unsafe fn ldap_compare_ext_s(ld: *mut LDAP, dn: P1, attr: P2, value: P3, data: *mut LDAP_BERVAL, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -378,7 +375,7 @@ where P3: 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(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) + ldap_compare_ext_sA(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } #[inline] pub unsafe fn ldap_compare_ext_sW(ld: *mut LDAP, dn: P1, attr: P2, value: P3, data: Option<*const LDAP_BERVAL>, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW) -> u32 @@ -388,7 +385,7 @@ where P3: 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(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) + ldap_compare_ext_sW(core::mem::transmute(ld), dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), core::mem::transmute(clientcontrols)) } #[inline] pub unsafe fn ldap_compare_s(ld: *mut LDAP, dn: P1, attr: P2, value: P3) -> u32 @@ -473,17 +470,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(core::ptr::null()))) + ldap_count_values(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + ldap_count_valuesA(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + ldap_count_valuesW(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ldap_count_values_len(vals: *mut *mut LDAP_BERVAL) -> u32 { @@ -692,9 +689,9 @@ pub unsafe fn ldap_escape_filter_elementA(sourcefilterelement: &[u8], destfilter ldap_escape_filter_elementA(core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len().try_into().unwrap(), core::mem::transmute(destfilterelement.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), destfilterelement.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn ldap_escape_filter_elementW(sourcefilterelement: &[u8], destfilterelement: windows_core::PWSTR, destlength: u32) -> u32 { +pub unsafe fn ldap_escape_filter_elementW(sourcefilterelement: &[u8], destfilterelement: Option, destlength: u32) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_escape_filter_elementW(sourcefilterelement : windows_core::PCSTR, sourcelength : u32, destfilterelement : windows_core::PWSTR, destlength : u32) -> u32); - ldap_escape_filter_elementW(core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len().try_into().unwrap(), core::mem::transmute(destfilterelement), core::mem::transmute(destlength)) + ldap_escape_filter_elementW(core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len().try_into().unwrap(), core::mem::transmute(destfilterelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(destlength)) } #[inline] pub unsafe fn ldap_explode_dn(dn: P0, notypes: u32) -> *mut windows_core::PSTR @@ -816,20 +813,14 @@ pub unsafe fn ldap_get_dnW(ld: *mut LDAP, entry: *mut LDAPMessage) -> windows_co ldap_get_dnW(core::mem::transmute(ld), core::mem::transmute(entry)) } #[inline] -pub unsafe fn ldap_get_next_page(externalhandle: *mut LDAP, searchhandle: P1, pagesize: u32, messagenumber: *mut u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn ldap_get_next_page(externalhandle: *mut LDAP, searchhandle: PLDAPSearch, pagesize: u32, messagenumber: *mut u32) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_next_page(externalhandle : *mut LDAP, searchhandle : PLDAPSearch, pagesize : u32, messagenumber : *mut u32) -> u32); - ldap_get_next_page(core::mem::transmute(externalhandle), searchhandle.param().abi(), core::mem::transmute(pagesize), core::mem::transmute(messagenumber)) + ldap_get_next_page(core::mem::transmute(externalhandle), core::mem::transmute(searchhandle), core::mem::transmute(pagesize), core::mem::transmute(messagenumber)) } #[inline] -pub unsafe fn ldap_get_next_page_s(externalhandle: *mut LDAP, searchhandle: P1, timeout: *mut LDAP_TIMEVAL, pagesize: u32, totalcount: *mut u32, results: *mut *mut LDAPMessage) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn ldap_get_next_page_s(externalhandle: *mut LDAP, searchhandle: PLDAPSearch, timeout: *mut LDAP_TIMEVAL, pagesize: u32, totalcount: *mut u32, results: *mut *mut LDAPMessage) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_next_page_s(externalhandle : *mut LDAP, searchhandle : PLDAPSearch, timeout : *mut LDAP_TIMEVAL, pagesize : u32, totalcount : *mut u32, results : *mut *mut LDAPMessage) -> u32); - ldap_get_next_page_s(core::mem::transmute(externalhandle), searchhandle.param().abi(), core::mem::transmute(timeout), core::mem::transmute(pagesize), core::mem::transmute(totalcount), core::mem::transmute(results)) + ldap_get_next_page_s(core::mem::transmute(externalhandle), core::mem::transmute(searchhandle), core::mem::transmute(timeout), core::mem::transmute(pagesize), core::mem::transmute(totalcount), core::mem::transmute(results)) } #[inline] pub unsafe fn ldap_get_option(ld: *mut LDAP, option: i32, outvalue: *mut core::ffi::c_void) -> u32 { @@ -842,12 +833,9 @@ pub unsafe fn ldap_get_optionW(ld: *mut LDAP, option: i32, outvalue: *mut core:: ldap_get_optionW(core::mem::transmute(ld), core::mem::transmute(option), core::mem::transmute(outvalue)) } #[inline] -pub unsafe fn ldap_get_paged_count(externalhandle: *mut LDAP, searchblock: P1, totalcount: *mut u32, results: *mut LDAPMessage) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn ldap_get_paged_count(externalhandle: *mut LDAP, searchblock: PLDAPSearch, totalcount: *mut u32, results: *mut LDAPMessage) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_get_paged_count(externalhandle : *mut LDAP, searchblock : PLDAPSearch, totalcount : *mut u32, results : *mut LDAPMessage) -> u32); - ldap_get_paged_count(core::mem::transmute(externalhandle), searchblock.param().abi(), core::mem::transmute(totalcount), core::mem::transmute(results)) + ldap_get_paged_count(core::mem::transmute(externalhandle), core::mem::transmute(searchblock), core::mem::transmute(totalcount), core::mem::transmute(results)) } #[inline] pub unsafe fn ldap_get_values(ld: *mut LDAP, entry: *mut LDAPMessage, attr: P2) -> *mut windows_core::PSTR @@ -1209,7 +1197,7 @@ where P4: 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(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(resultoid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(resultdata), freeit.param().abi()) + ldap_parse_extended_resultA(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(resultoid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P4) -> u32 @@ -1217,7 +1205,7 @@ where P4: 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(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(resultoid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(resultdata), freeit.param().abi()) + ldap_parse_extended_resultW(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(resultoid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +1243,7 @@ where P7: 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(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(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())), core::mem::transmute(servercontrols), freeit.param().abi()) + ldap_parse_result(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P7) -> u32 @@ -1263,7 +1251,7 @@ where P7: 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(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(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())), core::mem::transmute(servercontrols), freeit.param().abi()) + ldap_parse_resultA(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P7) -> u32 @@ -1271,7 +1259,7 @@ where P7: 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(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(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())), core::mem::transmute(servercontrols), freeit.param().abi()) + ldap_parse_resultW(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +1269,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(core::mem::transmute(externalhandle), core::mem::transmute(control), core::mem::transmute(result), core::mem::transmute(attribute.unwrap_or(core::ptr::null_mut()))) + ldap_parse_sort_controlA(core::mem::transmute(externalhandle), core::mem::transmute(control), core::mem::transmute(result), core::mem::transmute(attribute.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(externalhandle), core::mem::transmute(control), core::mem::transmute(result), core::mem::transmute(attribute.unwrap_or(core::ptr::null_mut()))) + ldap_parse_sort_controlW(core::mem::transmute(externalhandle), core::mem::transmute(control), core::mem::transmute(result), core::mem::transmute(attribute.unwrap_or(core::mem::zeroed()))) } #[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 +1357,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(core::mem::transmute(ld), core::mem::transmute(msgid), core::mem::transmute(all), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(res)) + ldap_result(core::mem::transmute(ld), core::mem::transmute(msgid), core::mem::transmute(all), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(res)) } #[inline] pub unsafe fn ldap_result2error(ld: *mut LDAP, res: *mut LDAPMessage, freeit: u32) -> u32 { @@ -1440,12 +1428,9 @@ where ldap_searchW(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly)) } #[inline] -pub unsafe fn ldap_search_abandon_page(externalhandle: *mut LDAP, searchblock: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn ldap_search_abandon_page(externalhandle: *mut LDAP, searchblock: PLDAPSearch) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_abandon_page(externalhandle : *mut LDAP, searchblock : PLDAPSearch) -> u32); - ldap_search_abandon_page(core::mem::transmute(externalhandle), searchblock.param().abi()) + ldap_search_abandon_page(core::mem::transmute(externalhandle), core::mem::transmute(searchblock)) } #[inline] pub unsafe fn ldap_search_ext(ld: *mut LDAP, base: P1, scope: u32, filter: P3, attrs: *const *const i8, attrsonly: u32, servercontrols: Option<*const *const LDAPControlA>, clientcontrols: Option<*const *const LDAPControlA>, timelimit: u32, sizelimit: u32, messagenumber: *mut u32) -> u32 @@ -1454,7 +1439,7 @@ where P3: 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(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), core::mem::transmute(timelimit), core::mem::transmute(sizelimit), core::mem::transmute(messagenumber)) + ldap_search_ext(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timelimit), core::mem::transmute(sizelimit), core::mem::transmute(messagenumber)) } #[inline] pub unsafe fn ldap_search_extA(ld: *mut LDAP, base: P1, scope: u32, filter: P3, 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 +1448,7 @@ where P3: 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(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), core::mem::transmute(timelimit), core::mem::transmute(sizelimit), core::mem::transmute(messagenumber)) + ldap_search_extA(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timelimit), core::mem::transmute(sizelimit), core::mem::transmute(messagenumber)) } #[inline] pub unsafe fn ldap_search_extW(ld: *mut LDAP, base: P1, scope: u32, filter: P3, 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 +1457,7 @@ where P3: 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(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), core::mem::transmute(timelimit), core::mem::transmute(sizelimit), core::mem::transmute(messagenumber)) + ldap_search_extW(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timelimit), core::mem::transmute(sizelimit), core::mem::transmute(messagenumber)) } #[inline] pub unsafe fn ldap_search_ext_s(ld: *mut LDAP, base: P1, scope: u32, filter: P3, 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 +1466,7 @@ where P3: 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(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), core::mem::transmute(timeout), core::mem::transmute(sizelimit), core::mem::transmute(res)) + ldap_search_ext_s(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout), core::mem::transmute(sizelimit), core::mem::transmute(res)) } #[inline] pub unsafe fn ldap_search_ext_sA(ld: *mut LDAP, base: P1, scope: u32, filter: P3, 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 +1475,7 @@ where P3: 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(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), core::mem::transmute(timeout), core::mem::transmute(sizelimit), core::mem::transmute(res)) + ldap_search_ext_sA(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout), core::mem::transmute(sizelimit), core::mem::transmute(res)) } #[inline] pub unsafe fn ldap_search_ext_sW(ld: *mut LDAP, base: P1, scope: u32, filter: P3, 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 +1484,7 @@ where P3: 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(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), core::mem::transmute(timeout), core::mem::transmute(sizelimit), core::mem::transmute(res)) + ldap_search_ext_sW(core::mem::transmute(ld), base.param().abi(), core::mem::transmute(scope), filter.param().abi(), core::mem::transmute(attrs), core::mem::transmute(attrsonly), core::mem::transmute(servercontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(clientcontrols.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout), core::mem::transmute(sizelimit), core::mem::transmute(res)) } #[inline] pub unsafe fn ldap_search_init_page(externalhandle: *mut LDAP, distinguishedname: P1, scopeofsearch: u32, searchfilter: P3, 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 +1722,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(core::ptr::null()))) + ldap_value_free(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + ldap_value_freeA(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + ldap_value_freeW(core::mem::transmute(vals.unwrap_or(core::mem::zeroed()))) } #[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 8a34f3320a..97e38bcb1a 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs @@ -17,7 +17,7 @@ impl IEnumNetworkConnections { (windows_core::Interface::vtable(self)._NewEnum)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -120,7 +120,7 @@ impl IEnumNetworks { (windows_core::Interface::vtable(self)._NewEnum)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -823,11 +823,8 @@ impl INetworkCostManager { pub unsafe fn GetDataPlanStatus(&self, pdataplanstatus: *mut NLM_DATAPLAN_STATUS, pdestipaddr: *const NLM_SOCKADDR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDataPlanStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdataplanstatus), core::mem::transmute(pdestipaddr)).ok() } - pub unsafe fn SetDestinationAddresses(&self, pdestipaddrlist: &[NLM_SOCKADDR], bappend: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDestinationAddresses)(windows_core::Interface::as_raw(self), pdestipaddrlist.len().try_into().unwrap(), core::mem::transmute(pdestipaddrlist.as_ptr()), bappend.param().abi()).ok() + pub unsafe fn SetDestinationAddresses(&self, pdestipaddrlist: &[NLM_SOCKADDR], bappend: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDestinationAddresses)(windows_core::Interface::as_raw(self), pdestipaddrlist.len().try_into().unwrap(), core::mem::transmute(pdestipaddrlist.as_ptr()), core::mem::transmute(bappend)).ok() } } #[repr(C)] 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 22a51050c3..7b3cf67a2c 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs @@ -1,19 +1,13 @@ #[inline] -pub unsafe fn WebSocketAbortHandle(hwebsocket: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn WebSocketAbortHandle(hwebsocket: WEB_SOCKET_HANDLE) { windows_targets::link!("websocket.dll" "system" fn WebSocketAbortHandle(hwebsocket : WEB_SOCKET_HANDLE)); - WebSocketAbortHandle(hwebsocket.param().abi()) + WebSocketAbortHandle(core::mem::transmute(hwebsocket)) } #[inline] -pub unsafe fn WebSocketBeginClientHandshake(hwebsocket: P0, pszsubprotocols: Option<&[windows_core::PCSTR]>, pszextensions: Option<&[windows_core::PCSTR]>, pinitialheaders: Option<&[WEB_SOCKET_HTTP_HEADER]>, padditionalheaders: *mut *mut WEB_SOCKET_HTTP_HEADER, puladditionalheadercount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WebSocketBeginClientHandshake(hwebsocket: WEB_SOCKET_HANDLE, pszsubprotocols: Option<&[windows_core::PCSTR]>, pszextensions: Option<&[windows_core::PCSTR]>, pinitialheaders: Option<&[WEB_SOCKET_HTTP_HEADER]>, padditionalheaders: *mut *mut WEB_SOCKET_HTTP_HEADER, puladditionalheadercount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("websocket.dll" "system" fn WebSocketBeginClientHandshake(hwebsocket : WEB_SOCKET_HANDLE, pszsubprotocols : *const windows_core::PCSTR, ulsubprotocolcount : u32, pszextensions : *const windows_core::PCSTR, ulextensioncount : u32, pinitialheaders : *const WEB_SOCKET_HTTP_HEADER, ulinitialheadercount : u32, padditionalheaders : *mut *mut WEB_SOCKET_HTTP_HEADER, puladditionalheadercount : *mut u32) -> windows_core::HRESULT); WebSocketBeginClientHandshake( - hwebsocket.param().abi(), + core::mem::transmute(hwebsocket), core::mem::transmute(pszsubprotocols.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszsubprotocols.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pszextensions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -26,21 +20,17 @@ where .ok() } #[inline] -pub unsafe fn WebSocketBeginServerHandshake(hwebsocket: P0, pszsubprotocolselected: P1, pszextensionselected: Option<&[windows_core::PCSTR]>, prequestheaders: &[WEB_SOCKET_HTTP_HEADER], presponseheaders: *mut *mut WEB_SOCKET_HTTP_HEADER, pulresponseheadercount: *mut u32) -> windows_core::Result<()> +pub unsafe fn WebSocketBeginServerHandshake(hwebsocket: WEB_SOCKET_HANDLE, pszsubprotocolselected: P1, pszextensionselected: Option<&[windows_core::PCSTR]>, prequestheaders: &[WEB_SOCKET_HTTP_HEADER], presponseheaders: *mut *mut WEB_SOCKET_HTTP_HEADER, pulresponseheadercount: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("websocket.dll" "system" fn WebSocketBeginServerHandshake(hwebsocket : WEB_SOCKET_HANDLE, pszsubprotocolselected : windows_core::PCSTR, pszextensionselected : *const windows_core::PCSTR, ulextensionselectedcount : u32, prequestheaders : *const WEB_SOCKET_HTTP_HEADER, ulrequestheadercount : u32, presponseheaders : *mut *mut WEB_SOCKET_HTTP_HEADER, pulresponseheadercount : *mut u32) -> windows_core::HRESULT); - WebSocketBeginServerHandshake(hwebsocket.param().abi(), pszsubprotocolselected.param().abi(), core::mem::transmute(pszextensionselected.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszextensionselected.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestheaders.as_ptr()), prequestheaders.len().try_into().unwrap(), core::mem::transmute(presponseheaders), core::mem::transmute(pulresponseheadercount)).ok() + WebSocketBeginServerHandshake(core::mem::transmute(hwebsocket), pszsubprotocolselected.param().abi(), core::mem::transmute(pszextensionselected.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszextensionselected.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestheaders.as_ptr()), prequestheaders.len().try_into().unwrap(), core::mem::transmute(presponseheaders), core::mem::transmute(pulresponseheadercount)).ok() } #[inline] -pub unsafe fn WebSocketCompleteAction(hwebsocket: P0, pvactioncontext: *const core::ffi::c_void, ulbytestransferred: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn WebSocketCompleteAction(hwebsocket: WEB_SOCKET_HANDLE, pvactioncontext: *const core::ffi::c_void, ulbytestransferred: u32) { windows_targets::link!("websocket.dll" "system" fn WebSocketCompleteAction(hwebsocket : WEB_SOCKET_HANDLE, pvactioncontext : *const core::ffi::c_void, ulbytestransferred : u32)); - WebSocketCompleteAction(hwebsocket.param().abi(), core::mem::transmute(pvactioncontext), core::mem::transmute(ulbytestransferred)) + WebSocketCompleteAction(core::mem::transmute(hwebsocket), core::mem::transmute(pvactioncontext), core::mem::transmute(ulbytestransferred)) } #[inline] pub unsafe fn WebSocketCreateClientHandle(pproperties: &[WEB_SOCKET_PROPERTY]) -> windows_core::Result { @@ -55,36 +45,24 @@ pub unsafe fn WebSocketCreateServerHandle(pproperties: &[WEB_SOCKET_PROPERTY]) - WebSocketCreateServerHandle(core::mem::transmute(pproperties.as_ptr()), pproperties.len().try_into().unwrap(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WebSocketDeleteHandle(hwebsocket: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn WebSocketDeleteHandle(hwebsocket: WEB_SOCKET_HANDLE) { windows_targets::link!("websocket.dll" "system" fn WebSocketDeleteHandle(hwebsocket : WEB_SOCKET_HANDLE)); - WebSocketDeleteHandle(hwebsocket.param().abi()) + WebSocketDeleteHandle(core::mem::transmute(hwebsocket)) } #[inline] -pub unsafe fn WebSocketEndClientHandshake(hwebsocket: P0, presponseheaders: &[WEB_SOCKET_HTTP_HEADER], pulselectedextensions: Option<*mut u32>, pulselectedextensioncount: Option<*mut u32>, pulselectedsubprotocol: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WebSocketEndClientHandshake(hwebsocket: WEB_SOCKET_HANDLE, presponseheaders: &[WEB_SOCKET_HTTP_HEADER], pulselectedextensions: Option<*mut u32>, pulselectedextensioncount: Option<*mut u32>, pulselectedsubprotocol: Option<*mut u32>) -> windows_core::Result<()> { 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(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() + WebSocketEndClientHandshake(core::mem::transmute(hwebsocket), core::mem::transmute(presponseheaders.as_ptr()), presponseheaders.len().try_into().unwrap(), core::mem::transmute(pulselectedextensions.unwrap_or(core::mem::zeroed())), core::mem::transmute(pulselectedextensioncount.unwrap_or(core::mem::zeroed())), core::mem::transmute(pulselectedsubprotocol.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WebSocketEndServerHandshake(hwebsocket: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WebSocketEndServerHandshake(hwebsocket: WEB_SOCKET_HANDLE) -> windows_core::Result<()> { windows_targets::link!("websocket.dll" "system" fn WebSocketEndServerHandshake(hwebsocket : WEB_SOCKET_HANDLE) -> windows_core::HRESULT); - WebSocketEndServerHandshake(hwebsocket.param().abi()).ok() + WebSocketEndServerHandshake(core::mem::transmute(hwebsocket)).ok() } #[inline] -pub unsafe fn WebSocketGetAction(hwebsocket: P0, 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: Option<*mut *mut core::ffi::c_void>, pvactioncontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut *mut core::ffi::c_void>, pvactioncontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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(), core::mem::transmute(eactionqueue), core::mem::transmute(pdatabuffers), core::mem::transmute(puldatabuffercount), core::mem::transmute(paction), core::mem::transmute(pbuffertype), core::mem::transmute(pvapplicationcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvactioncontext)).ok() + WebSocketGetAction(core::mem::transmute(hwebsocket), core::mem::transmute(eactionqueue), core::mem::transmute(pdatabuffers), core::mem::transmute(puldatabuffercount), core::mem::transmute(paction), core::mem::transmute(pbuffertype), core::mem::transmute(pvapplicationcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvactioncontext)).ok() } #[inline] pub unsafe fn WebSocketGetGlobalProperty(etype: WEB_SOCKET_PROPERTY_TYPE, pvvalue: *mut core::ffi::c_void, ulsize: *mut u32) -> windows_core::Result<()> { @@ -92,20 +70,14 @@ pub unsafe fn WebSocketGetGlobalProperty(etype: WEB_SOCKET_PROPERTY_TYPE, pvvalu WebSocketGetGlobalProperty(core::mem::transmute(etype), core::mem::transmute(pvvalue), core::mem::transmute(ulsize)).ok() } #[inline] -pub unsafe fn WebSocketReceive(hwebsocket: P0, pbuffer: Option<*const WEB_SOCKET_BUFFER>, pvcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WebSocketReceive(hwebsocket: WEB_SOCKET_HANDLE, pbuffer: Option<*const WEB_SOCKET_BUFFER>, pvcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null()))).ok() + WebSocketReceive(core::mem::transmute(hwebsocket), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WebSocketSend(hwebsocket: WEB_SOCKET_HANDLE, buffertype: WEB_SOCKET_BUFFER_TYPE, pbuffer: Option<*const WEB_SOCKET_BUFFER>, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(buffertype), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + WebSocketSend(core::mem::transmute(hwebsocket), core::mem::transmute(buffertype), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } pub const WEB_SOCKET_ABORTED_CLOSE_STATUS: WEB_SOCKET_CLOSE_STATUS = WEB_SOCKET_CLOSE_STATUS(1006i32); #[repr(transparent)] 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 7124bd0224..371663cb07 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs @@ -37,9 +37,9 @@ pub unsafe fn WinHttpCreateProxyResolver(hsession: *const core::ffi::c_void, phr WinHttpCreateProxyResolver(core::mem::transmute(hsession), core::mem::transmute(phresolver)) } #[inline] -pub unsafe fn WinHttpCreateUrl(lpurlcomponents: *const URL_COMPONENTS, dwflags: WIN_HTTP_CREATE_URL_FLAGS, pwszurl: windows_core::PWSTR, pdwurllength: *mut u32) -> windows_core::Result<()> { +pub unsafe fn WinHttpCreateUrl(lpurlcomponents: *const URL_COMPONENTS, dwflags: WIN_HTTP_CREATE_URL_FLAGS, pwszurl: Option, pdwurllength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winhttp.dll" "system" fn WinHttpCreateUrl(lpurlcomponents : *const URL_COMPONENTS, dwflags : WIN_HTTP_CREATE_URL_FLAGS, pwszurl : windows_core::PWSTR, pdwurllength : *mut u32) -> super::super::Foundation:: BOOL); - WinHttpCreateUrl(core::mem::transmute(lpurlcomponents), core::mem::transmute(dwflags), core::mem::transmute(pwszurl), core::mem::transmute(pdwurllength)).ok() + WinHttpCreateUrl(core::mem::transmute(lpurlcomponents), core::mem::transmute(dwflags), core::mem::transmute(pwszurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwurllength)).ok() } #[inline] pub unsafe fn WinHttpDetectAutoProxyConfigUrl(dwautodetectflags: u32, ppwstrautoconfigurl: *mut windows_core::PWSTR) -> windows_core::Result<()> { @@ -90,20 +90,20 @@ where WinHttpGetProxyForUrl(core::mem::transmute(hsession), lpcwszurl.param().abi(), core::mem::transmute(pautoproxyoptions), core::mem::transmute(pproxyinfo)).ok() } #[inline] -pub unsafe fn WinHttpGetProxyForUrlEx(hresolver: *const core::ffi::c_void, pcwszurl: P1, pautoproxyoptions: *const WINHTTP_AUTOPROXY_OPTIONS, pcontext: usize) -> u32 +pub unsafe fn WinHttpGetProxyForUrlEx(hresolver: *const core::ffi::c_void, pcwszurl: P1, pautoproxyoptions: *const WINHTTP_AUTOPROXY_OPTIONS, pcontext: Option) -> u32 where P1: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxyForUrlEx(hresolver : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, pautoproxyoptions : *const WINHTTP_AUTOPROXY_OPTIONS, pcontext : usize) -> u32); - WinHttpGetProxyForUrlEx(core::mem::transmute(hresolver), pcwszurl.param().abi(), core::mem::transmute(pautoproxyoptions), core::mem::transmute(pcontext)) + WinHttpGetProxyForUrlEx(core::mem::transmute(hresolver), pcwszurl.param().abi(), core::mem::transmute(pautoproxyoptions), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WinHttpGetProxyForUrlEx2(hresolver: *const core::ffi::c_void, pcwszurl: P1, pautoproxyoptions: *const WINHTTP_AUTOPROXY_OPTIONS, pinterfaceselectioncontext: Option<&[u8]>, pcontext: usize) -> u32 +pub unsafe fn WinHttpGetProxyForUrlEx2(hresolver: *const core::ffi::c_void, pcwszurl: P1, pautoproxyoptions: *const WINHTTP_AUTOPROXY_OPTIONS, pinterfaceselectioncontext: Option<&[u8]>, pcontext: Option) -> u32 where P1: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxyForUrlEx2(hresolver : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, pautoproxyoptions : *const WINHTTP_AUTOPROXY_OPTIONS, cbinterfaceselectioncontext : u32, pinterfaceselectioncontext : *const u8, pcontext : usize) -> u32); - WinHttpGetProxyForUrlEx2(core::mem::transmute(hresolver), pcwszurl.param().abi(), core::mem::transmute(pautoproxyoptions), pinterfaceselectioncontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pinterfaceselectioncontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcontext)) + WinHttpGetProxyForUrlEx2(core::mem::transmute(hresolver), pcwszurl.param().abi(), core::mem::transmute(pautoproxyoptions), pinterfaceselectioncontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pinterfaceselectioncontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WinHttpGetProxyResult(hresolver: *const core::ffi::c_void, pproxyresult: *mut WINHTTP_PROXY_RESULT) -> u32 { @@ -116,9 +116,9 @@ pub unsafe fn WinHttpGetProxyResultEx(hresolver: *const core::ffi::c_void, pprox WinHttpGetProxyResultEx(core::mem::transmute(hresolver), core::mem::transmute(pproxyresultex)) } #[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 { +pub unsafe fn WinHttpGetProxySettingsEx(hresolver: *const core::ffi::c_void, proxysettingstype: WINHTTP_PROXY_SETTINGS_TYPE, pproxysettingsparam: Option<*const WINHTTP_PROXY_SETTINGS_PARAM>, pcontext: Option) -> 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(core::mem::transmute(hresolver), core::mem::transmute(proxysettingstype), core::mem::transmute(pproxysettingsparam.unwrap_or(core::ptr::null())), core::mem::transmute(pcontext)) + WinHttpGetProxySettingsEx(core::mem::transmute(hresolver), core::mem::transmute(proxysettingstype), core::mem::transmute(pproxysettingsparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hinternet), core::mem::transmute(pguidconnection.unwrap_or(core::ptr::null())), core::mem::transmute(ullflags), core::mem::transmute(ppresult)) + WinHttpQueryConnectionGroup(core::mem::transmute(hinternet), core::mem::transmute(pguidconnection.unwrap_or(core::mem::zeroed())), core::mem::transmute(ullflags), core::mem::transmute(ppresult)) } #[inline] pub unsafe fn WinHttpQueryDataAvailable(hrequest: *mut core::ffi::c_void, lpdwnumberofbytesavailable: *mut u32) -> windows_core::Result<()> { @@ -172,17 +172,17 @@ where P2: 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(core::mem::transmute(hrequest), core::mem::transmute(dwinfolevel), pwszname.param().abi(), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpdwindex)).ok() + WinHttpQueryHeaders(core::mem::transmute(hrequest), core::mem::transmute(dwinfolevel), pwszname.param().abi(), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(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(core::mem::transmute(hrequest), core::mem::transmute(dwinfolevel), core::mem::transmute(ullflags), core::mem::transmute(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())), core::mem::transmute(pdwbufferlength), core::mem::transmute(ppheaders.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwheaderscount)) + WinHttpQueryHeadersEx(core::mem::transmute(hrequest), core::mem::transmute(dwinfolevel), core::mem::transmute(ullflags), core::mem::transmute(uicodepage), core::mem::transmute(pdwindex.unwrap_or(core::mem::zeroed())), core::mem::transmute(pheadername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbufferlength), core::mem::transmute(ppheaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hinternet), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength)).ok() + WinHttpQueryOption(core::mem::transmute(hinternet), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer), core::mem::transmute(dwnumberofbytestoread), core::mem::transmute(lpdwnumberofbytesread), core::mem::transmute(ullflags), core::mem::transmute(cbproperty), core::mem::transmute(pvproperty.unwrap_or(core::ptr::null()))) + WinHttpReadDataEx(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer), core::mem::transmute(dwnumberofbytestoread), core::mem::transmute(lpdwnumberofbytesread), core::mem::transmute(ullflags), core::mem::transmute(cbproperty), core::mem::transmute(pvproperty.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WinHttpReadProxySettings(hsession: *const core::ffi::c_void, pcwszconnectionname: P1, ffallbacktodefaultsettings: P2, fsetautodiscoverfordefaultsettings: P3, 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(core::mem::transmute(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())), core::mem::transmute(dwoptionallength), core::mem::transmute(dwtotallength), core::mem::transmute(dwcontext)).ok() + WinHttpSendRequest(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(dwoptionallength), core::mem::transmute(dwtotallength), core::mem::transmute(dwcontext)).ok() } #[inline] pub unsafe fn WinHttpSetCredentials(hrequest: *mut core::ffi::c_void, authtargets: u32, authscheme: u32, pwszusername: P3, pwszpassword: P4, 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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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,17 +282,17 @@ 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(core::mem::transmute(hwebsocket), core::mem::transmute(usstatus), core::mem::transmute(pvreason.unwrap_or(core::ptr::null())), core::mem::transmute(dwreasonlength)) + WinHttpWebSocketClose(core::mem::transmute(hwebsocket), core::mem::transmute(usstatus), core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreasonlength)) } #[inline] -pub unsafe fn WinHttpWebSocketCompleteUpgrade(hrequest: *const core::ffi::c_void, pcontext: usize) -> *mut core::ffi::c_void { +pub unsafe fn WinHttpWebSocketCompleteUpgrade(hrequest: *const core::ffi::c_void, pcontext: Option) -> *mut core::ffi::c_void { windows_targets::link!("winhttp.dll" "system" fn WinHttpWebSocketCompleteUpgrade(hrequest : *const core::ffi::c_void, pcontext : usize) -> *mut core::ffi::c_void); - WinHttpWebSocketCompleteUpgrade(core::mem::transmute(hrequest), core::mem::transmute(pcontext)) + WinHttpWebSocketCompleteUpgrade(core::mem::transmute(hrequest), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hwebsocket), core::mem::transmute(pusstatus), core::mem::transmute(pvreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwreasonlength), core::mem::transmute(pdwreasonlengthconsumed)) + WinHttpWebSocketQueryCloseStatus(core::mem::transmute(hwebsocket), core::mem::transmute(pusstatus), core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreasonlength), core::mem::transmute(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(core::mem::transmute(hwebsocket), core::mem::transmute(usstatus), core::mem::transmute(pvreason.unwrap_or(core::ptr::null())), core::mem::transmute(dwreasonlength)) + WinHttpWebSocketShutdown(core::mem::transmute(hwebsocket), core::mem::transmute(usstatus), core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(dwnumberofbytestowrite), core::mem::transmute(lpdwnumberofbyteswritten)).ok() + WinHttpWriteData(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwnumberofbytestowrite), core::mem::transmute(lpdwnumberofbyteswritten)).ok() } #[inline] pub unsafe fn WinHttpWriteProxySettings(hsession: *const core::ffi::c_void, fforceupdate: P1, 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 a29824e101..ecf6968559 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(), core::mem::transmute(kbcachelimit), core::mem::transmute(dwcontainertype), core::mem::transmute(dwoptions), core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbbuffer.unwrap_or(core::ptr::null()))).ok() + CreateUrlCacheContainerA(name.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), core::mem::transmute(kbcachelimit), core::mem::transmute(dwcontainertype), core::mem::transmute(dwoptions), core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbuffer.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(kbcachelimit), core::mem::transmute(dwcontainertype), core::mem::transmute(dwoptions), core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbbuffer.unwrap_or(core::ptr::null()))).ok() + CreateUrlCacheContainerW(name.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), core::mem::transmute(kbcachelimit), core::mem::transmute(dwcontainertype), core::mem::transmute(dwoptions), core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbuffer.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CreateUrlCacheEntryA(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P2, lpszfilename: &mut [u8; 260], dwreserved: u32) -> windows_core::Result<()> @@ -199,17 +199,15 @@ 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(core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) + CreateUrlCacheGroup(core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DeleteIE3Cache(hwnd: P0, hinst: P1, lpszcmd: P2, ncmdshow: i32) -> u32 +pub unsafe fn DeleteIE3Cache(hwnd: super::super::Foundation::HWND, hinst: super::super::Foundation::HINSTANCE, lpszcmd: P2, ncmdshow: i32) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn DeleteIE3Cache(hwnd : super::super::Foundation:: HWND, hinst : super::super::Foundation:: HINSTANCE, lpszcmd : windows_core::PCSTR, ncmdshow : i32) -> u32); - DeleteIE3Cache(hwnd.param().abi(), hinst.param().abi(), lpszcmd.param().abi(), core::mem::transmute(ncmdshow)) + DeleteIE3Cache(core::mem::transmute(hwnd), core::mem::transmute(hinst), lpszcmd.param().abi(), core::mem::transmute(ncmdshow)) } #[inline] pub unsafe fn DeleteUrlCacheContainerA(name: P0, dwoptions: u32) -> windows_core::Result<()> @@ -254,7 +252,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(core::mem::transmute(groupid), core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + DeleteUrlCacheGroup(core::mem::transmute(groupid), core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DeleteWpadCacheForNetworks(param0: WPAD_CACHE_DELETE) -> super::super::Foundation::BOOL { @@ -290,12 +288,9 @@ where ExportCookieFileW(szfilename.param().abi(), fappend.param().abi()) } #[inline] -pub unsafe fn FindCloseUrlCache(henumhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindCloseUrlCache(henumhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn FindCloseUrlCache(henumhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FindCloseUrlCache(henumhandle.param().abi()).ok() + FindCloseUrlCache(core::mem::transmute(henumhandle)).ok() } #[inline] pub unsafe fn FindFirstUrlCacheContainerA(pdwmodified: *mut u32, lpcontainerinfo: *mut INTERNET_CACHE_CONTAINER_INFOA, lpcbcontainerinfo: *mut u32, dwoptions: u32) -> super::super::Foundation::HANDLE { @@ -313,7 +308,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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo)); + let result__ = FindFirstUrlCacheEntryA(lpszurlsearchpattern.param().abi(), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -322,7 +317,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(), core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(groupid), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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()))); + let result__ = FindFirstUrlCacheEntryExA(lpszurlsearchpattern.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(groupid), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(lpgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -331,7 +326,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(), core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(groupid), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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()))); + let result__ = FindFirstUrlCacheEntryExW(lpszurlsearchpattern.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(groupid), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(lpgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -340,70 +335,49 @@ 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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo)); + let result__ = FindFirstUrlCacheEntryW(lpszurlsearchpattern.param().abi(), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 { +pub unsafe fn FindFirstUrlCacheGroup(dwflags: u32, dwfilter: u32, lpsearchcondition: Option<*const core::ffi::c_void>, dwsearchcondition: Option, 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(core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(lpsearchcondition.unwrap_or(core::ptr::null())), core::mem::transmute(dwsearchcondition), core::mem::transmute(lpgroupid), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))); + let result__ = FindFirstUrlCacheGroup(core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(lpsearchcondition.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsearchcondition.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpgroupid), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindNextUrlCacheContainerA(henumhandle: P0, lpcontainerinfo: *mut INTERNET_CACHE_CONTAINER_INFOA, lpcbcontainerinfo: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextUrlCacheContainerA(henumhandle: super::super::Foundation::HANDLE, lpcontainerinfo: *mut INTERNET_CACHE_CONTAINER_INFOA, lpcbcontainerinfo: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn FindNextUrlCacheContainerA(henumhandle : super::super::Foundation:: HANDLE, lpcontainerinfo : *mut INTERNET_CACHE_CONTAINER_INFOA, lpcbcontainerinfo : *mut u32) -> super::super::Foundation:: BOOL); - FindNextUrlCacheContainerA(henumhandle.param().abi(), core::mem::transmute(lpcontainerinfo), core::mem::transmute(lpcbcontainerinfo)) + FindNextUrlCacheContainerA(core::mem::transmute(henumhandle), core::mem::transmute(lpcontainerinfo), core::mem::transmute(lpcbcontainerinfo)) } #[inline] -pub unsafe fn FindNextUrlCacheContainerW(henumhandle: P0, lpcontainerinfo: *mut INTERNET_CACHE_CONTAINER_INFOW, lpcbcontainerinfo: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextUrlCacheContainerW(henumhandle: super::super::Foundation::HANDLE, lpcontainerinfo: *mut INTERNET_CACHE_CONTAINER_INFOW, lpcbcontainerinfo: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn FindNextUrlCacheContainerW(henumhandle : super::super::Foundation:: HANDLE, lpcontainerinfo : *mut INTERNET_CACHE_CONTAINER_INFOW, lpcbcontainerinfo : *mut u32) -> super::super::Foundation:: BOOL); - FindNextUrlCacheContainerW(henumhandle.param().abi(), core::mem::transmute(lpcontainerinfo), core::mem::transmute(lpcbcontainerinfo)) + FindNextUrlCacheContainerW(core::mem::transmute(henumhandle), core::mem::transmute(lpcontainerinfo), core::mem::transmute(lpcbcontainerinfo)) } #[inline] -pub unsafe fn FindNextUrlCacheEntryA(henumhandle: P0, lpnextcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextUrlCacheEntryA(henumhandle: super::super::Foundation::HANDLE, lpnextcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo)).ok() + FindNextUrlCacheEntryA(core::mem::transmute(henumhandle), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextUrlCacheEntryExA(henumhandle: super::super::Foundation::HANDLE, 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<()> { 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(core::ptr::null_mut())), core::mem::transmute(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() + FindNextUrlCacheEntryExA(core::mem::transmute(henumhandle), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(lpgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextUrlCacheEntryExW(henumhandle: super::super::Foundation::HANDLE, 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<()> { 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(core::ptr::null_mut())), core::mem::transmute(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() + FindNextUrlCacheEntryExW(core::mem::transmute(henumhandle), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(lpgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FindNextUrlCacheEntryW(henumhandle: P0, lpnextcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextUrlCacheEntryW(henumhandle: super::super::Foundation::HANDLE, lpnextcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo)).ok() + FindNextUrlCacheEntryW(core::mem::transmute(henumhandle), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo)).ok() } #[inline] -pub unsafe fn FindNextUrlCacheGroup(hfind: P0, lpgroupid: *mut i64, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextUrlCacheGroup(hfind: super::super::Foundation::HANDLE, lpgroupid: *mut i64, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpgroupid), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + FindNextUrlCacheGroup(core::mem::transmute(hfind), core::mem::transmute(lpgroupid), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn FindP3PPolicySymbol(pszsymbol: P0) -> i32 @@ -430,22 +404,22 @@ where FreeUrlCacheSpaceW(lpszcachepath.param().abi(), core::mem::transmute(dwsize), core::mem::transmute(dwfilter)).ok() } #[inline] -pub unsafe fn FtpCommandA(hconnect: *const core::ffi::c_void, fexpectresponse: P1, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: usize, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn FtpCommandA(hconnect: *const core::ffi::c_void, fexpectresponse: P1, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: Option, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> where P1: windows_core::Param, P3: 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(core::mem::transmute(hconnect), fexpectresponse.param().abi(), core::mem::transmute(dwflags), lpszcommand.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(phftpcommand.unwrap_or(core::ptr::null_mut()))).ok() + FtpCommandA(core::mem::transmute(hconnect), fexpectresponse.param().abi(), core::mem::transmute(dwflags), lpszcommand.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phftpcommand.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FtpCommandW(hconnect: *const core::ffi::c_void, fexpectresponse: P1, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: usize, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn FtpCommandW(hconnect: *const core::ffi::c_void, fexpectresponse: P1, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: Option, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> where P1: windows_core::Param, P3: 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(core::mem::transmute(hconnect), fexpectresponse.param().abi(), core::mem::transmute(dwflags), lpszcommand.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(phftpcommand.unwrap_or(core::ptr::null_mut()))).ok() + FtpCommandW(core::mem::transmute(hconnect), fexpectresponse.param().abi(), core::mem::transmute(dwflags), lpszcommand.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phftpcommand.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn FtpCreateDirectoryA(hconnect: *const core::ffi::c_void, lpszdirectory: P1) -> windows_core::Result<()> @@ -481,21 +455,21 @@ where } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] -pub unsafe fn FtpFindFirstFileA(hconnect: *const core::ffi::c_void, lpszsearchfile: P1, lpfindfiledata: Option<*mut super::super::Storage::FileSystem::WIN32_FIND_DATAA>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn FtpFindFirstFileA(hconnect: *const core::ffi::c_void, lpszsearchfile: P1, lpfindfiledata: Option<*mut super::super::Storage::FileSystem::WIN32_FIND_DATAA>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: 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(core::mem::transmute(hconnect), lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + FtpFindFirstFileA(core::mem::transmute(hconnect), lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] -pub unsafe fn FtpFindFirstFileW(hconnect: *const core::ffi::c_void, lpszsearchfile: P1, lpfindfiledata: Option<*mut super::super::Storage::FileSystem::WIN32_FIND_DATAW>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn FtpFindFirstFileW(hconnect: *const core::ffi::c_void, lpszsearchfile: P1, lpfindfiledata: Option<*mut super::super::Storage::FileSystem::WIN32_FIND_DATAW>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: 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(core::mem::transmute(hconnect), lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + FtpFindFirstFileW(core::mem::transmute(hconnect), lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FtpGetCurrentDirectoryA(hconnect: *const core::ffi::c_void, lpszcurrentdirectory: windows_core::PSTR, lpdwcurrentdirectory: *mut u32) -> windows_core::Result<()> { @@ -508,82 +482,82 @@ pub unsafe fn FtpGetCurrentDirectoryW(hconnect: *const core::ffi::c_void, lpszcu FtpGetCurrentDirectoryW(core::mem::transmute(hconnect), core::mem::transmute(lpszcurrentdirectory), core::mem::transmute(lpdwcurrentdirectory)).ok() } #[inline] -pub unsafe fn FtpGetFileA(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: usize) -> windows_core::Result<()> +pub unsafe fn FtpGetFileA(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpGetFileA(hconnect : *const core::ffi::c_void, lpszremotefile : windows_core::PCSTR, lpsznewfile : windows_core::PCSTR, ffailifexists : super::super::Foundation:: BOOL, dwflagsandattributes : u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpGetFileA(core::mem::transmute(hconnect), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + FtpGetFileA(core::mem::transmute(hconnect), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FtpGetFileEx(hftpsession: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL +pub unsafe fn FtpGetFileEx(hftpsession: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> super::super::Foundation::BOOL where P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpGetFileEx(hftpsession : *const core::ffi::c_void, lpszremotefile : windows_core::PCSTR, lpsznewfile : windows_core::PCWSTR, ffailifexists : super::super::Foundation:: BOOL, dwflagsandattributes : u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpGetFileEx(core::mem::transmute(hftpsession), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + FtpGetFileEx(core::mem::transmute(hftpsession), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hfile), core::mem::transmute(lpdwfilesizehigh.unwrap_or(core::ptr::null_mut()))) + FtpGetFileSize(core::mem::transmute(hfile), core::mem::transmute(lpdwfilesizehigh.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FtpGetFileW(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: usize) -> windows_core::Result<()> +pub unsafe fn FtpGetFileW(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpGetFileW(hconnect : *const core::ffi::c_void, lpszremotefile : windows_core::PCWSTR, lpsznewfile : windows_core::PCWSTR, ffailifexists : super::super::Foundation:: BOOL, dwflagsandattributes : u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpGetFileW(core::mem::transmute(hconnect), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + FtpGetFileW(core::mem::transmute(hconnect), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FtpOpenFileA(hconnect: *const core::ffi::c_void, lpszfilename: P1, dwaccess: u32, dwflags: FTP_FLAGS, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn FtpOpenFileA(hconnect: *const core::ffi::c_void, lpszfilename: P1, dwaccess: u32, dwflags: FTP_FLAGS, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpOpenFileA(hconnect : *const core::ffi::c_void, lpszfilename : windows_core::PCSTR, dwaccess : u32, dwflags : FTP_FLAGS, dwcontext : usize) -> *mut core::ffi::c_void); - FtpOpenFileA(core::mem::transmute(hconnect), lpszfilename.param().abi(), core::mem::transmute(dwaccess), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + FtpOpenFileA(core::mem::transmute(hconnect), lpszfilename.param().abi(), core::mem::transmute(dwaccess), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FtpOpenFileW(hconnect: *const core::ffi::c_void, lpszfilename: P1, dwaccess: u32, dwflags: FTP_FLAGS, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn FtpOpenFileW(hconnect: *const core::ffi::c_void, lpszfilename: P1, dwaccess: u32, dwflags: FTP_FLAGS, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpOpenFileW(hconnect : *const core::ffi::c_void, lpszfilename : windows_core::PCWSTR, dwaccess : u32, dwflags : FTP_FLAGS, dwcontext : usize) -> *mut core::ffi::c_void); - FtpOpenFileW(core::mem::transmute(hconnect), lpszfilename.param().abi(), core::mem::transmute(dwaccess), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + FtpOpenFileW(core::mem::transmute(hconnect), lpszfilename.param().abi(), core::mem::transmute(dwaccess), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FtpPutFileA(hconnect: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: FTP_FLAGS, dwcontext: usize) -> windows_core::Result<()> +pub unsafe fn FtpPutFileA(hconnect: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: FTP_FLAGS, dwcontext: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpPutFileA(hconnect : *const core::ffi::c_void, lpszlocalfile : windows_core::PCSTR, lpsznewremotefile : windows_core::PCSTR, dwflags : FTP_FLAGS, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpPutFileA(core::mem::transmute(hconnect), lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + FtpPutFileA(core::mem::transmute(hconnect), lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FtpPutFileEx(hftpsession: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL +pub unsafe fn FtpPutFileEx(hftpsession: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: u32, dwcontext: Option) -> super::super::Foundation::BOOL where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpPutFileEx(hftpsession : *const core::ffi::c_void, lpszlocalfile : windows_core::PCWSTR, lpsznewremotefile : windows_core::PCSTR, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpPutFileEx(core::mem::transmute(hftpsession), lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + FtpPutFileEx(core::mem::transmute(hftpsession), lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FtpPutFileW(hconnect: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: FTP_FLAGS, dwcontext: usize) -> windows_core::Result<()> +pub unsafe fn FtpPutFileW(hconnect: *const core::ffi::c_void, lpszlocalfile: P1, lpsznewremotefile: P2, dwflags: FTP_FLAGS, dwcontext: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpPutFileW(hconnect : *const core::ffi::c_void, lpszlocalfile : windows_core::PCWSTR, lpsznewremotefile : windows_core::PCWSTR, dwflags : FTP_FLAGS, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpPutFileW(core::mem::transmute(hconnect), lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + FtpPutFileW(core::mem::transmute(hconnect), lpszlocalfile.param().abi(), lpsznewremotefile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn FtpRemoveDirectoryA(hconnect: *const core::ffi::c_void, lpszdirectory: P1) -> windows_core::Result<()> @@ -641,17 +615,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(core::ptr::null_mut())), core::mem::transmute(pdlavail.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdltotal.unwrap_or(core::ptr::null_mut()))) + GetDiskInfoA(pszpath.param().abi(), core::mem::transmute(pdwclustersize.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdlavail.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdltotal.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(lpcacheconfiginfo), core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(core::ptr::null())), core::mem::transmute(dwfieldcontrol)).ok() + GetUrlCacheConfigInfoA(core::mem::transmute(lpcacheconfiginfo), core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(lpcacheconfiginfo), core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(core::ptr::null())), core::mem::transmute(dwfieldcontrol)).ok() + GetUrlCacheConfigInfoW(core::mem::transmute(lpcacheconfiginfo), core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +641,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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::ptr::null_mut()))).ok() + GetUrlCacheEntryInfoA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn GetUrlCacheEntryInfoExA(lpszurl: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: Option<*mut u32>, lpszredirecturl: P3, lpcbredirecturl: Option<*const u32>, lpreserved: Option<*const core::ffi::c_void>, dwflags: u32) -> windows_core::Result<()> @@ -676,7 +650,7 @@ where P3: 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(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())), core::mem::transmute(dwflags)).ok() + GetUrlCacheEntryInfoExA(lpszurl.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::mem::zeroed())), lpszredirecturl.param().abi(), core::mem::transmute(lpcbredirecturl.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn GetUrlCacheEntryInfoExW(lpszurl: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: Option<*mut u32>, lpszredirecturl: P3, lpcbredirecturl: Option<*const u32>, lpreserved: Option<*const core::ffi::c_void>, dwflags: u32) -> windows_core::Result<()> @@ -685,7 +659,7 @@ where P3: 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(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())), core::mem::transmute(dwflags)).ok() + GetUrlCacheEntryInfoExW(lpszurl.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::mem::zeroed())), lpszredirecturl.param().abi(), core::mem::transmute(lpcbredirecturl.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +667,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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::ptr::null_mut()))).ok() + GetUrlCacheEntryInfoW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::mem::zeroed()))).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<()> { +pub unsafe fn GetUrlCacheGroupAttributeA(gid: i64, dwflags: Option, 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(core::mem::transmute(gid), core::mem::transmute(dwflags), core::mem::transmute(dwattributes), core::mem::transmute(lpgroupinfo), core::mem::transmute(lpcbgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + GetUrlCacheGroupAttributeA(core::mem::transmute(gid), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwattributes), core::mem::transmute(lpgroupinfo), core::mem::transmute(lpcbgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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<()> { +pub unsafe fn GetUrlCacheGroupAttributeW(gid: i64, dwflags: Option, 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(core::mem::transmute(gid), core::mem::transmute(dwflags), core::mem::transmute(dwattributes), core::mem::transmute(lpgroupinfo), core::mem::transmute(lpcbgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + GetUrlCacheGroupAttributeW(core::mem::transmute(gid), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwattributes), core::mem::transmute(lpgroupinfo), core::mem::transmute(lpcbgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn GetUrlCacheHeaderData(nidx: u32, lpdwdata: *mut u32) -> super::super::Foundation::BOOL { @@ -711,60 +685,60 @@ pub unsafe fn GetUrlCacheHeaderData(nidx: u32, lpdwdata: *mut u32) -> super::sup GetUrlCacheHeaderData(core::mem::transmute(nidx), core::mem::transmute(lpdwdata)) } #[inline] -pub unsafe fn GopherCreateLocatorA(lpszhost: P0, nserverport: u16, lpszdisplaystring: P2, lpszselectorstring: P3, dwgophertype: u32, lpszlocator: windows_core::PSTR, lpdwbufferlength: *mut u32) -> windows_core::Result<()> +pub unsafe fn GopherCreateLocatorA(lpszhost: P0, nserverport: u16, lpszdisplaystring: P2, lpszselectorstring: P3, dwgophertype: u32, lpszlocator: Option, lpdwbufferlength: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherCreateLocatorA(lpszhost : windows_core::PCSTR, nserverport : u16, lpszdisplaystring : windows_core::PCSTR, lpszselectorstring : windows_core::PCSTR, dwgophertype : u32, lpszlocator : windows_core::PSTR, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - GopherCreateLocatorA(lpszhost.param().abi(), core::mem::transmute(nserverport), lpszdisplaystring.param().abi(), lpszselectorstring.param().abi(), core::mem::transmute(dwgophertype), core::mem::transmute(lpszlocator), core::mem::transmute(lpdwbufferlength)).ok() + GopherCreateLocatorA(lpszhost.param().abi(), core::mem::transmute(nserverport), lpszdisplaystring.param().abi(), lpszselectorstring.param().abi(), core::mem::transmute(dwgophertype), core::mem::transmute(lpszlocator.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } #[inline] -pub unsafe fn GopherCreateLocatorW(lpszhost: P0, nserverport: u16, lpszdisplaystring: P2, lpszselectorstring: P3, dwgophertype: u32, lpszlocator: windows_core::PWSTR, lpdwbufferlength: *mut u32) -> windows_core::Result<()> +pub unsafe fn GopherCreateLocatorW(lpszhost: P0, nserverport: u16, lpszdisplaystring: P2, lpszselectorstring: P3, dwgophertype: u32, lpszlocator: Option, lpdwbufferlength: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherCreateLocatorW(lpszhost : windows_core::PCWSTR, nserverport : u16, lpszdisplaystring : windows_core::PCWSTR, lpszselectorstring : windows_core::PCWSTR, dwgophertype : u32, lpszlocator : windows_core::PWSTR, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - GopherCreateLocatorW(lpszhost.param().abi(), core::mem::transmute(nserverport), lpszdisplaystring.param().abi(), lpszselectorstring.param().abi(), core::mem::transmute(dwgophertype), core::mem::transmute(lpszlocator), core::mem::transmute(lpdwbufferlength)).ok() + GopherCreateLocatorW(lpszhost.param().abi(), core::mem::transmute(nserverport), lpszdisplaystring.param().abi(), lpszselectorstring.param().abi(), core::mem::transmute(dwgophertype), core::mem::transmute(lpszlocator.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } #[inline] -pub unsafe fn GopherFindFirstFileA(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszsearchstring: P2, lpfinddata: Option<*mut GOPHER_FIND_DATAA>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn GopherFindFirstFileA(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszsearchstring: P2, lpfinddata: Option<*mut GOPHER_FIND_DATAA>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, P2: 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(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + GopherFindFirstFileA(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GopherFindFirstFileW(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszsearchstring: P2, lpfinddata: Option<*mut GOPHER_FIND_DATAW>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn GopherFindFirstFileW(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszsearchstring: P2, lpfinddata: Option<*mut GOPHER_FIND_DATAW>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, P2: 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(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + GopherFindFirstFileW(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GopherGetAttributeA(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszattributename: P2, lpbuffer: &mut [u8], lpdwcharactersreturned: *mut u32, lpfnenumerator: GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext: usize) -> windows_core::Result<()> +pub unsafe fn GopherGetAttributeA(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszattributename: P2, lpbuffer: &mut [u8], lpdwcharactersreturned: *mut u32, lpfnenumerator: Option, dwcontext: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherGetAttributeA(hconnect : *const core::ffi::c_void, lpszlocator : windows_core::PCSTR, lpszattributename : windows_core::PCSTR, lpbuffer : *mut u8, dwbufferlength : u32, lpdwcharactersreturned : *mut u32, lpfnenumerator : GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext : usize) -> super::super::Foundation:: BOOL); - GopherGetAttributeA(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszattributename.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpdwcharactersreturned), core::mem::transmute(lpfnenumerator), core::mem::transmute(dwcontext)).ok() + GopherGetAttributeA(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszattributename.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpdwcharactersreturned), core::mem::transmute(lpfnenumerator.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GopherGetAttributeW(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszattributename: P2, lpbuffer: &mut [u8], lpdwcharactersreturned: *mut u32, lpfnenumerator: GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext: usize) -> windows_core::Result<()> +pub unsafe fn GopherGetAttributeW(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszattributename: P2, lpbuffer: &mut [u8], lpdwcharactersreturned: *mut u32, lpfnenumerator: Option, dwcontext: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherGetAttributeW(hconnect : *const core::ffi::c_void, lpszlocator : windows_core::PCWSTR, lpszattributename : windows_core::PCWSTR, lpbuffer : *mut u8, dwbufferlength : u32, lpdwcharactersreturned : *mut u32, lpfnenumerator : GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext : usize) -> super::super::Foundation:: BOOL); - GopherGetAttributeW(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszattributename.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpdwcharactersreturned), core::mem::transmute(lpfnenumerator), core::mem::transmute(dwcontext)).ok() + GopherGetAttributeW(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszattributename.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpdwcharactersreturned), core::mem::transmute(lpfnenumerator.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn GopherGetLocatorTypeA(lpszlocator: P0, lpdwgophertype: *mut u32) -> windows_core::Result<()> @@ -783,22 +757,22 @@ where GopherGetLocatorTypeW(lpszlocator.param().abi(), core::mem::transmute(lpdwgophertype)).ok() } #[inline] -pub unsafe fn GopherOpenFileA(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszview: P2, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn GopherOpenFileA(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszview: P2, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherOpenFileA(hconnect : *const core::ffi::c_void, lpszlocator : windows_core::PCSTR, lpszview : windows_core::PCSTR, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - GopherOpenFileA(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszview.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + GopherOpenFileA(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszview.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GopherOpenFileW(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszview: P2, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn GopherOpenFileW(hconnect: *const core::ffi::c_void, lpszlocator: P1, lpszview: P2, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherOpenFileW(hconnect : *const core::ffi::c_void, lpszlocator : windows_core::PCWSTR, lpszview : windows_core::PCWSTR, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - GopherOpenFileW(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszview.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + GopherOpenFileW(core::mem::transmute(hconnect), lpszlocator.param().abi(), lpszview.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn HttpAddRequestHeadersA(hrequest: *const core::ffi::c_void, lpszheaders: &[u8], dwmodifiers: HTTP_ADDREQ_FLAG) -> windows_core::Result<()> { @@ -811,24 +785,22 @@ pub unsafe fn HttpAddRequestHeadersW(hrequest: *const core::ffi::c_void, lpszhea HttpAddRequestHeadersW(core::mem::transmute(hrequest), core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len().try_into().unwrap(), core::mem::transmute(dwmodifiers)).ok() } #[inline] -pub unsafe fn HttpCheckDavComplianceA(lpszurl: P0, lpszcompliancetoken: P1, lpffound: *mut super::super::Foundation::BOOL, hwnd: P3, lpvreserved: *const core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn HttpCheckDavComplianceA(lpszurl: P0, lpszcompliancetoken: P1, lpffound: *mut super::super::Foundation::BOOL, hwnd: super::super::Foundation::HWND, lpvreserved: *const core::ffi::c_void) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn HttpCheckDavComplianceA(lpszurl : windows_core::PCSTR, lpszcompliancetoken : windows_core::PCSTR, lpffound : *mut super::super::Foundation:: BOOL, hwnd : super::super::Foundation:: HWND, lpvreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - HttpCheckDavComplianceA(lpszurl.param().abi(), lpszcompliancetoken.param().abi(), core::mem::transmute(lpffound), hwnd.param().abi(), core::mem::transmute(lpvreserved)) + HttpCheckDavComplianceA(lpszurl.param().abi(), lpszcompliancetoken.param().abi(), core::mem::transmute(lpffound), core::mem::transmute(hwnd), core::mem::transmute(lpvreserved)) } #[inline] -pub unsafe fn HttpCheckDavComplianceW(lpszurl: P0, lpszcompliancetoken: P1, lpffound: *mut super::super::Foundation::BOOL, hwnd: P3, lpvreserved: *const core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn HttpCheckDavComplianceW(lpszurl: P0, lpszcompliancetoken: P1, lpffound: *mut super::super::Foundation::BOOL, hwnd: super::super::Foundation::HWND, lpvreserved: *const core::ffi::c_void) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn HttpCheckDavComplianceW(lpszurl : windows_core::PCWSTR, lpszcompliancetoken : windows_core::PCWSTR, lpffound : *mut super::super::Foundation:: BOOL, hwnd : super::super::Foundation:: HWND, lpvreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - HttpCheckDavComplianceW(lpszurl.param().abi(), lpszcompliancetoken.param().abi(), core::mem::transmute(lpffound), hwnd.param().abi(), core::mem::transmute(lpvreserved)) + HttpCheckDavComplianceW(lpszurl.param().abi(), lpszcompliancetoken.param().abi(), core::mem::transmute(lpffound), core::mem::transmute(hwnd), core::mem::transmute(lpvreserved)) } #[inline] pub unsafe fn HttpCloseDependencyHandle(hdependencyhandle: *const core::ffi::c_void) { @@ -841,14 +813,14 @@ pub unsafe fn HttpDuplicateDependencyHandle(hdependencyhandle: *const core::ffi: HttpDuplicateDependencyHandle(core::mem::transmute(hdependencyhandle), core::mem::transmute(phduplicateddependencyhandle)) } #[inline] -pub unsafe fn HttpEndRequestA(hrequest: *const core::ffi::c_void, lpbuffersout: Option<*mut INTERNET_BUFFERSA>, dwflags: u32, dwcontext: usize) -> windows_core::Result<()> { +pub unsafe fn HttpEndRequestA(hrequest: *const core::ffi::c_void, lpbuffersout: Option<*mut INTERNET_BUFFERSA>, dwflags: u32, dwcontext: Option) -> 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(core::mem::transmute(hrequest), core::mem::transmute(lpbuffersout.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + HttpEndRequestA(core::mem::transmute(hrequest), core::mem::transmute(lpbuffersout.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn HttpEndRequestW(hrequest: *const core::ffi::c_void, lpbuffersout: Option<*mut INTERNET_BUFFERSW>, dwflags: u32, dwcontext: usize) -> windows_core::Result<()> { +pub unsafe fn HttpEndRequestW(hrequest: *const core::ffi::c_void, lpbuffersout: Option<*mut INTERNET_BUFFERSW>, dwflags: u32, dwcontext: Option) -> 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(core::mem::transmute(hrequest), core::mem::transmute(lpbuffersout.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + HttpEndRequestW(core::mem::transmute(hrequest), core::mem::transmute(lpbuffersout.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HttpGetServerCredentials(pwszurl: P0, ppwszusername: *mut windows_core::PWSTR, ppwszpassword: *mut windows_core::PWSTR) -> u32 @@ -880,7 +852,7 @@ where HttpOpenDependencyHandle(core::mem::transmute(hrequesthandle), fbackground.param().abi(), core::mem::transmute(phdependencyhandle)) } #[inline] -pub unsafe fn HttpOpenRequestA(hconnect: *const core::ffi::c_void, lpszverb: P1, lpszobjectname: P2, lpszversion: P3, lpszreferrer: P4, lplpszaccepttypes: Option<*const windows_core::PCSTR>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn HttpOpenRequestA(hconnect: *const core::ffi::c_void, lpszverb: P1, lpszobjectname: P2, lpszversion: P3, lpszreferrer: P4, lplpszaccepttypes: Option<*const windows_core::PCSTR>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, P2: windows_core::Param, @@ -888,10 +860,10 @@ where P4: 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(core::mem::transmute(hconnect), lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + HttpOpenRequestA(core::mem::transmute(hconnect), lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpOpenRequestW(hconnect: *const core::ffi::c_void, lpszverb: P1, lpszobjectname: P2, lpszversion: P3, lpszreferrer: P4, lplpszaccepttypes: Option<*const windows_core::PCWSTR>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn HttpOpenRequestW(hconnect: *const core::ffi::c_void, lpszverb: P1, lpszobjectname: P2, lpszversion: P3, lpszreferrer: P4, lplpszaccepttypes: Option<*const windows_core::PCWSTR>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, P2: windows_core::Param, @@ -899,15 +871,12 @@ where P4: 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(core::mem::transmute(hconnect), lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + HttpOpenRequestW(core::mem::transmute(hconnect), lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HttpPushClose(hwait: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn HttpPushClose(hwait: HTTP_PUSH_WAIT_HANDLE) { windows_targets::link!("wininet.dll" "system" fn HttpPushClose(hwait : HTTP_PUSH_WAIT_HANDLE)); - HttpPushClose(hwait.param().abi()) + HttpPushClose(core::mem::transmute(hwait)) } #[inline] pub unsafe fn HttpPushEnable(hrequest: *const core::ffi::c_void, ptransportsetting: *const HTTP_PUSH_TRANSPORT_SETTING, phwait: *mut HTTP_PUSH_WAIT_HANDLE) -> u32 { @@ -915,47 +884,44 @@ pub unsafe fn HttpPushEnable(hrequest: *const core::ffi::c_void, ptransportsetti HttpPushEnable(core::mem::transmute(hrequest), core::mem::transmute(ptransportsetting), core::mem::transmute(phwait)) } #[inline] -pub unsafe fn HttpPushWait(hwait: P0, etype: HTTP_PUSH_WAIT_TYPE, pnotificationstatus: Option<*mut HTTP_PUSH_NOTIFICATION_STATUS>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn HttpPushWait(hwait: HTTP_PUSH_WAIT_HANDLE, etype: HTTP_PUSH_WAIT_TYPE, pnotificationstatus: Option<*mut HTTP_PUSH_NOTIFICATION_STATUS>) -> u32 { 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(), core::mem::transmute(etype), core::mem::transmute(pnotificationstatus.unwrap_or(core::ptr::null_mut()))) + HttpPushWait(core::mem::transmute(hwait), core::mem::transmute(etype), core::mem::transmute(pnotificationstatus.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hrequest), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpdwindex.unwrap_or(core::ptr::null_mut()))).ok() + HttpQueryInfoA(core::mem::transmute(hrequest), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpdwindex.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(hrequest), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpdwindex.unwrap_or(core::ptr::null_mut()))).ok() + HttpQueryInfoW(core::mem::transmute(hrequest), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpdwindex.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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())), core::mem::transmute(dwoptionallength)).ok() + HttpSendRequestA(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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<()> { +pub unsafe fn HttpSendRequestExA(hrequest: *const core::ffi::c_void, lpbuffersin: Option<*const INTERNET_BUFFERSA>, lpbuffersout: Option<*mut INTERNET_BUFFERSA>, dwflags: u32, dwcontext: Option) -> 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(core::mem::transmute(hrequest), core::mem::transmute(lpbuffersin.unwrap_or(core::ptr::null())), core::mem::transmute(lpbuffersout.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + HttpSendRequestExA(core::mem::transmute(hrequest), core::mem::transmute(lpbuffersin.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffersout.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).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<()> { +pub unsafe fn HttpSendRequestExW(hrequest: *const core::ffi::c_void, lpbuffersin: Option<*const INTERNET_BUFFERSW>, lpbuffersout: Option<*mut INTERNET_BUFFERSW>, dwflags: u32, dwcontext: Option) -> 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(core::mem::transmute(hrequest), core::mem::transmute(lpbuffersin.unwrap_or(core::ptr::null())), core::mem::transmute(lpbuffersout.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + HttpSendRequestExW(core::mem::transmute(hrequest), core::mem::transmute(lpbuffersin.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffersout.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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())), core::mem::transmute(dwoptionallength)).ok() + HttpSendRequestW(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hwebsocket), core::mem::transmute(usstatus), core::mem::transmute(pvreason.unwrap_or(core::ptr::null())), core::mem::transmute(dwreasonlength)) + HttpWebSocketClose(core::mem::transmute(hwebsocket), core::mem::transmute(usstatus), core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreasonlength)) } #[inline] pub unsafe fn HttpWebSocketCompleteUpgrade(hrequest: *const core::ffi::c_void, dwcontext: usize) -> *mut core::ffi::c_void { @@ -965,7 +931,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(core::mem::transmute(hwebsocket), core::mem::transmute(pusstatus), core::mem::transmute(pvreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwreasonlength), core::mem::transmute(pdwreasonlengthconsumed)) + HttpWebSocketQueryCloseStatus(core::mem::transmute(hwebsocket), core::mem::transmute(pusstatus), core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreasonlength), core::mem::transmute(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 +941,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(core::mem::transmute(hwebsocket), core::mem::transmute(buffertype), core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(dwbufferlength)) + HttpWebSocketSend(core::mem::transmute(hwebsocket), core::mem::transmute(buffertype), core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hwebsocket), core::mem::transmute(usstatus), core::mem::transmute(pvreason.unwrap_or(core::ptr::null())), core::mem::transmute(dwreasonlength)) + HttpWebSocketShutdown(core::mem::transmute(hwebsocket), core::mem::transmute(usstatus), core::mem::transmute(pvreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreasonlength)) } #[inline] pub unsafe fn ImportCookieFileA(szfilename: P0) -> super::super::Foundation::BOOL @@ -1013,15 +979,15 @@ where } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] -pub unsafe fn InternetAlgIdToStringA(ai: super::super::Security::Cryptography::ALG_ID, lpstr: windows_core::PSTR, lpdwstrlength: *mut u32, dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetAlgIdToStringA(ai: super::super::Security::Cryptography::ALG_ID, lpstr: windows_core::PSTR, lpdwstrlength: *mut u32, dwreserved: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetAlgIdToStringA(ai : super::super::Security::Cryptography:: ALG_ID, lpstr : windows_core::PSTR, lpdwstrlength : *mut u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetAlgIdToStringA(core::mem::transmute(ai), core::mem::transmute(lpstr), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved)) + InternetAlgIdToStringA(core::mem::transmute(ai), core::mem::transmute(lpstr), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] -pub unsafe fn InternetAlgIdToStringW(ai: super::super::Security::Cryptography::ALG_ID, lpstr: windows_core::PWSTR, lpdwstrlength: *mut u32, dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetAlgIdToStringW(ai: super::super::Security::Cryptography::ALG_ID, lpstr: windows_core::PWSTR, lpdwstrlength: *mut u32, dwreserved: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetAlgIdToStringW(ai : super::super::Security::Cryptography:: ALG_ID, lpstr : windows_core::PWSTR, lpdwstrlength : *mut u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetAlgIdToStringW(core::mem::transmute(ai), core::mem::transmute(lpstr), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved)) + InternetAlgIdToStringW(core::mem::transmute(ai), core::mem::transmute(lpstr), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn InternetAttemptConnect(dwreserved: u32) -> u32 { @@ -1029,17 +995,14 @@ pub unsafe fn InternetAttemptConnect(dwreserved: u32) -> u32 { InternetAttemptConnect(core::mem::transmute(dwreserved)) } #[inline] -pub unsafe fn InternetAutodial(dwflags: INTERNET_AUTODIAL, hwndparent: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn InternetAutodial(dwflags: INTERNET_AUTODIAL, hwndparent: Option) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetAutodial(dwflags : INTERNET_AUTODIAL, hwndparent : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - InternetAutodial(core::mem::transmute(dwflags), hwndparent.param().abi()).ok() + InternetAutodial(core::mem::transmute(dwflags), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetAutodialHangup(dwreserved: u32) -> windows_core::Result<()> { +pub unsafe fn InternetAutodialHangup(dwreserved: Option) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetAutodialHangup(dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetAutodialHangup(core::mem::transmute(dwreserved)).ok() + InternetAutodialHangup(core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn InternetCanonicalizeUrlA(lpszurl: P0, lpszbuffer: windows_core::PSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -1102,57 +1065,54 @@ where InternetCombineUrlW(lpszbaseurl.param().abi(), lpszrelativeurl.param().abi(), core::mem::transmute(lpszbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn InternetConfirmZoneCrossing(hwnd: P0, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 +pub unsafe fn InternetConfirmZoneCrossing(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConfirmZoneCrossing(hwnd : super::super::Foundation:: HWND, szurlprev : windows_core::PCSTR, szurlnew : windows_core::PCSTR, bpost : super::super::Foundation:: BOOL) -> u32); - InternetConfirmZoneCrossing(hwnd.param().abi(), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) + InternetConfirmZoneCrossing(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) } #[inline] -pub unsafe fn InternetConfirmZoneCrossingA(hwnd: P0, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 +pub unsafe fn InternetConfirmZoneCrossingA(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConfirmZoneCrossingA(hwnd : super::super::Foundation:: HWND, szurlprev : windows_core::PCSTR, szurlnew : windows_core::PCSTR, bpost : super::super::Foundation:: BOOL) -> u32); - InternetConfirmZoneCrossingA(hwnd.param().abi(), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) + InternetConfirmZoneCrossingA(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) } #[inline] -pub unsafe fn InternetConfirmZoneCrossingW(hwnd: P0, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 +pub unsafe fn InternetConfirmZoneCrossingW(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConfirmZoneCrossingW(hwnd : super::super::Foundation:: HWND, szurlprev : windows_core::PCWSTR, szurlnew : windows_core::PCWSTR, bpost : super::super::Foundation:: BOOL) -> u32); - InternetConfirmZoneCrossingW(hwnd.param().abi(), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) + InternetConfirmZoneCrossingW(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) } #[inline] -pub unsafe fn InternetConnectA(hinternet: *const core::ffi::c_void, lpszservername: P1, nserverport: u16, lpszusername: P3, lpszpassword: P4, dwservice: u32, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn InternetConnectA(hinternet: *const core::ffi::c_void, lpszservername: P1, nserverport: u16, lpszusername: P3, lpszpassword: P4, dwservice: u32, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConnectA(hinternet : *const core::ffi::c_void, lpszservername : windows_core::PCSTR, nserverport : u16, lpszusername : windows_core::PCSTR, lpszpassword : windows_core::PCSTR, dwservice : u32, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - InternetConnectA(core::mem::transmute(hinternet), lpszservername.param().abi(), core::mem::transmute(nserverport), lpszusername.param().abi(), lpszpassword.param().abi(), core::mem::transmute(dwservice), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + InternetConnectA(core::mem::transmute(hinternet), lpszservername.param().abi(), core::mem::transmute(nserverport), lpszusername.param().abi(), lpszpassword.param().abi(), core::mem::transmute(dwservice), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetConnectW(hinternet: *const core::ffi::c_void, lpszservername: P1, nserverport: u16, lpszusername: P3, lpszpassword: P4, dwservice: u32, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn InternetConnectW(hinternet: *const core::ffi::c_void, lpszservername: P1, nserverport: u16, lpszusername: P3, lpszpassword: P4, dwservice: u32, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConnectW(hinternet : *const core::ffi::c_void, lpszservername : windows_core::PCWSTR, nserverport : u16, lpszusername : windows_core::PCWSTR, lpszpassword : windows_core::PCWSTR, dwservice : u32, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - InternetConnectW(core::mem::transmute(hinternet), lpszservername.param().abi(), core::mem::transmute(nserverport), lpszusername.param().abi(), lpszpassword.param().abi(), core::mem::transmute(dwservice), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + InternetConnectW(core::mem::transmute(hinternet), lpszservername.param().abi(), core::mem::transmute(nserverport), lpszusername.param().abi(), lpszpassword.param().abi(), core::mem::transmute(dwservice), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn InternetConvertUrlFromWireToWideChar(pcszurl: &[u8], pcwszbaseurl: P2, dwcodepagehost: u32, dwcodepagepath: u32, fencodepathextra: P5, dwcodepageextra: u32, ppwszconvertedurl: *mut windows_core::PWSTR) -> u32 @@ -1176,41 +1136,38 @@ pub unsafe fn InternetCrackUrlW(lpszurl: &[u16], dwflags: super::WinHttp::WIN_HT InternetCrackUrlW(core::mem::transmute(lpszurl.as_ptr()), lpszurl.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(lpurlcomponents)).ok() } #[inline] -pub unsafe fn InternetCreateUrlA(lpurlcomponents: *const URL_COMPONENTSA, dwflags: u32, lpszurl: windows_core::PSTR, lpdwurllength: *mut u32) -> windows_core::Result<()> { +pub unsafe fn InternetCreateUrlA(lpurlcomponents: *const URL_COMPONENTSA, dwflags: u32, lpszurl: Option, lpdwurllength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetCreateUrlA(lpurlcomponents : *const URL_COMPONENTSA, dwflags : u32, lpszurl : windows_core::PSTR, lpdwurllength : *mut u32) -> super::super::Foundation:: BOOL); - InternetCreateUrlA(core::mem::transmute(lpurlcomponents), core::mem::transmute(dwflags), core::mem::transmute(lpszurl), core::mem::transmute(lpdwurllength)).ok() + InternetCreateUrlA(core::mem::transmute(lpurlcomponents), core::mem::transmute(dwflags), core::mem::transmute(lpszurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwurllength)).ok() } #[inline] -pub unsafe fn InternetCreateUrlW(lpurlcomponents: *const URL_COMPONENTSW, dwflags: u32, lpszurl: windows_core::PWSTR, lpdwurllength: *mut u32) -> windows_core::Result<()> { +pub unsafe fn InternetCreateUrlW(lpurlcomponents: *const URL_COMPONENTSW, dwflags: u32, lpszurl: Option, lpdwurllength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetCreateUrlW(lpurlcomponents : *const URL_COMPONENTSW, dwflags : u32, lpszurl : windows_core::PWSTR, lpdwurllength : *mut u32) -> super::super::Foundation:: BOOL); - InternetCreateUrlW(core::mem::transmute(lpurlcomponents), core::mem::transmute(dwflags), core::mem::transmute(lpszurl), core::mem::transmute(lpdwurllength)).ok() + InternetCreateUrlW(core::mem::transmute(lpurlcomponents), core::mem::transmute(dwflags), core::mem::transmute(lpszurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwurllength)).ok() } #[inline] -pub unsafe fn InternetDial(hwndparent: P0, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut u32, dwreserved: u32) -> u32 +pub unsafe fn InternetDial(hwndparent: super::super::Foundation::HWND, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut u32, dwreserved: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetDial(hwndparent : super::super::Foundation:: HWND, lpszconnectoid : windows_core::PCSTR, dwflags : u32, lpdwconnection : *mut u32, dwreserved : u32) -> u32); - InternetDial(hwndparent.param().abi(), lpszconnectoid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpdwconnection), core::mem::transmute(dwreserved)) + InternetDial(core::mem::transmute(hwndparent), lpszconnectoid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpdwconnection), core::mem::transmute(dwreserved)) } #[inline] -pub unsafe fn InternetDialA(hwndparent: P0, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut usize, dwreserved: u32) -> u32 +pub unsafe fn InternetDialA(hwndparent: super::super::Foundation::HWND, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut usize, dwreserved: Option) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetDialA(hwndparent : super::super::Foundation:: HWND, lpszconnectoid : windows_core::PCSTR, dwflags : u32, lpdwconnection : *mut usize, dwreserved : u32) -> u32); - InternetDialA(hwndparent.param().abi(), lpszconnectoid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpdwconnection), core::mem::transmute(dwreserved)) + InternetDialA(core::mem::transmute(hwndparent), lpszconnectoid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpdwconnection), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetDialW(hwndparent: P0, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut usize, dwreserved: u32) -> u32 +pub unsafe fn InternetDialW(hwndparent: super::super::Foundation::HWND, lpszconnectoid: P1, dwflags: u32, lpdwconnection: *mut usize, dwreserved: Option) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetDialW(hwndparent : super::super::Foundation:: HWND, lpszconnectoid : windows_core::PCWSTR, dwflags : u32, lpdwconnection : *mut usize, dwreserved : u32) -> u32); - InternetDialW(hwndparent.param().abi(), lpszconnectoid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpdwconnection), core::mem::transmute(dwreserved)) + InternetDialW(core::mem::transmute(hwndparent), lpszconnectoid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpdwconnection), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn InternetEnumPerSiteCookieDecisionA(pszsitename: windows_core::PSTR, pcsitenamesize: *mut u32, pdwdecision: *mut u32, dwindex: u32) -> super::super::Foundation::BOOL { @@ -1223,12 +1180,9 @@ pub unsafe fn InternetEnumPerSiteCookieDecisionW(pszsitename: windows_core::PWST InternetEnumPerSiteCookieDecisionW(core::mem::transmute(pszsitename), core::mem::transmute(pcsitenamesize), core::mem::transmute(pdwdecision), core::mem::transmute(dwindex)) } #[inline] -pub unsafe fn InternetErrorDlg(hwnd: P0, hrequest: Option<*mut core::ffi::c_void>, dwerror: u32, dwflags: u32, lppvdata: Option<*mut *mut core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn InternetErrorDlg(hwnd: super::super::Foundation::HWND, hrequest: Option<*mut core::ffi::c_void>, dwerror: u32, dwflags: u32, lppvdata: Option<*mut *mut core::ffi::c_void>) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(dwerror), core::mem::transmute(dwflags), core::mem::transmute(lppvdata.unwrap_or(core::ptr::null_mut()))) + InternetErrorDlg(core::mem::transmute(hwnd), core::mem::transmute(hrequest.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwerror), core::mem::transmute(dwflags), core::mem::transmute(lppvdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn InternetFindNextFileA(hfind: *const core::ffi::c_void, lpvfinddata: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1241,17 +1195,14 @@ pub unsafe fn InternetFindNextFileW(hfind: *const core::ffi::c_void, lpvfinddata InternetFindNextFileW(core::mem::transmute(hfind), core::mem::transmute(lpvfinddata)).ok() } #[inline] -pub unsafe fn InternetFortezzaCommand(dwcommand: u32, hwnd: P1, dwreserved: usize) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn InternetFortezzaCommand(dwcommand: u32, hwnd: super::super::Foundation::HWND, dwreserved: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetFortezzaCommand(dwcommand : u32, hwnd : super::super::Foundation:: HWND, dwreserved : usize) -> super::super::Foundation:: BOOL); - InternetFortezzaCommand(core::mem::transmute(dwcommand), hwnd.param().abi(), core::mem::transmute(dwreserved)) + InternetFortezzaCommand(core::mem::transmute(dwcommand), core::mem::transmute(hwnd), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(dwcookiecount)) + InternetFreeCookies(core::mem::transmute(pcookies.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcookiecount)) } #[inline] pub unsafe fn InternetFreeProxyInfoList(pproxyinfolist: *mut WININET_PROXY_INFO_LIST) { @@ -1259,9 +1210,9 @@ pub unsafe fn InternetFreeProxyInfoList(pproxyinfolist: *mut WININET_PROXY_INFO_ InternetFreeProxyInfoList(core::mem::transmute(pproxyinfolist)) } #[inline] -pub unsafe fn InternetGetConnectedState(lpdwflags: *mut INTERNET_CONNECTION, dwreserved: u32) -> windows_core::Result<()> { +pub unsafe fn InternetGetConnectedState(lpdwflags: *mut INTERNET_CONNECTION, dwreserved: Option) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedState(lpdwflags : *mut INTERNET_CONNECTION, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetGetConnectedState(core::mem::transmute(lpdwflags), core::mem::transmute(dwreserved)).ok() + InternetGetConnectedState(core::mem::transmute(lpdwflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn InternetGetConnectedStateEx(lpdwflags: *mut INTERNET_CONNECTION, lpszconnectionname: Option<&mut [u8]>, dwreserved: u32) -> windows_core::Result<()> { @@ -1269,23 +1220,23 @@ pub unsafe fn InternetGetConnectedStateEx(lpdwflags: *mut INTERNET_CONNECTION, l InternetGetConnectedStateEx(core::mem::transmute(lpdwflags), core::mem::transmute(lpszconnectionname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwreserved)).ok() } #[inline] -pub unsafe fn InternetGetConnectedStateExA(lpdwflags: Option<*mut INTERNET_CONNECTION>, lpszconnectionname: Option<&mut [u8]>, dwreserved: u32) -> windows_core::Result<()> { +pub unsafe fn InternetGetConnectedStateExA(lpdwflags: Option<*mut INTERNET_CONNECTION>, lpszconnectionname: Option<&mut [u8]>, dwreserved: Option) -> 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(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()), core::mem::transmute(dwreserved)).ok() + InternetGetConnectedStateExA(core::mem::transmute(lpdwflags.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetGetConnectedStateExW(lpdwflags: Option<*mut INTERNET_CONNECTION>, lpszconnectionname: Option<&mut [u16]>, dwreserved: u32) -> windows_core::Result<()> { +pub unsafe fn InternetGetConnectedStateExW(lpdwflags: Option<*mut INTERNET_CONNECTION>, lpszconnectionname: Option<&mut [u16]>, dwreserved: Option) -> 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(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()), core::mem::transmute(dwreserved)).ok() + InternetGetConnectedStateExW(core::mem::transmute(lpdwflags.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetGetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: windows_core::PSTR, lpdwsize: *mut u32) -> windows_core::Result<()> +pub unsafe fn InternetGetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: Option, lpdwsize: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetCookieA(lpszurl : windows_core::PCSTR, lpszcookiename : windows_core::PCSTR, lpszcookiedata : windows_core::PSTR, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - InternetGetCookieA(lpszurl.param().abi(), lpszcookiename.param().abi(), core::mem::transmute(lpszcookiedata), core::mem::transmute(lpdwsize)).ok() + InternetGetCookieA(lpszurl.param().abi(), lpszcookiename.param().abi(), core::mem::transmute(lpszcookiedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsize)).ok() } #[inline] pub unsafe fn InternetGetCookieEx2(pcwszurl: P0, pcwszcookiename: P1, dwflags: u32, ppcookies: *mut *mut INTERNET_COOKIE2, pdwcookiecount: *mut u32) -> u32 @@ -1304,7 +1255,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(), core::mem::transmute(lpdwsize), core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + InternetGetCookieExA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(lpdwsize), core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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,26 +1265,26 @@ 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(), core::mem::transmute(lpdwsize), core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + InternetGetCookieExW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(lpdwsize), core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetGetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: windows_core::PWSTR, lpdwsize: *mut u32) -> windows_core::Result<()> +pub unsafe fn InternetGetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: Option, lpdwsize: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGetCookieW(lpszurl : windows_core::PCWSTR, lpszcookiename : windows_core::PCWSTR, lpszcookiedata : windows_core::PWSTR, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - InternetGetCookieW(lpszurl.param().abi(), lpszcookiename.param().abi(), core::mem::transmute(lpszcookiedata), core::mem::transmute(lpdwsize)).ok() + InternetGetCookieW(lpszurl.param().abi(), lpszcookiename.param().abi(), core::mem::transmute(lpszcookiedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsize)).ok() } #[inline] -pub unsafe fn InternetGetLastResponseInfoA(lpdwerror: *mut u32, lpszbuffer: windows_core::PSTR, lpdwbufferlength: *mut u32) -> windows_core::Result<()> { +pub unsafe fn InternetGetLastResponseInfoA(lpdwerror: *mut u32, lpszbuffer: Option, lpdwbufferlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetGetLastResponseInfoA(lpdwerror : *mut u32, lpszbuffer : windows_core::PSTR, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - InternetGetLastResponseInfoA(core::mem::transmute(lpdwerror), core::mem::transmute(lpszbuffer), core::mem::transmute(lpdwbufferlength)).ok() + InternetGetLastResponseInfoA(core::mem::transmute(lpdwerror), core::mem::transmute(lpszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } #[inline] -pub unsafe fn InternetGetLastResponseInfoW(lpdwerror: *mut u32, lpszbuffer: windows_core::PWSTR, lpdwbufferlength: *mut u32) -> windows_core::Result<()> { +pub unsafe fn InternetGetLastResponseInfoW(lpdwerror: *mut u32, lpszbuffer: Option, lpdwbufferlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetGetLastResponseInfoW(lpdwerror : *mut u32, lpszbuffer : windows_core::PWSTR, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - InternetGetLastResponseInfoW(core::mem::transmute(lpdwerror), core::mem::transmute(lpszbuffer), core::mem::transmute(lpdwbufferlength)).ok() + InternetGetLastResponseInfoW(core::mem::transmute(lpdwerror), core::mem::transmute(lpszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } #[inline] pub unsafe fn InternetGetPerSiteCookieDecisionA(pchhostname: P0, presult: *mut u32) -> super::super::Foundation::BOOL @@ -1387,36 +1338,33 @@ where InternetGetSecurityInfoByURLW(lpszurl.param().abi(), core::mem::transmute(ppcertchain), core::mem::transmute(pdwsecureflags)) } #[inline] -pub unsafe fn InternetGoOnline(lpszurl: P0, hwndparent: P1, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn InternetGoOnline(lpszurl: P0, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGoOnline(lpszurl : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetGoOnline(lpszurl.param().abi(), hwndparent.param().abi(), core::mem::transmute(dwflags)).ok() + InternetGoOnline(lpszurl.param().abi(), core::mem::transmute(hwndparent), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn InternetGoOnlineA(lpszurl: P0, hwndparent: P1, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn InternetGoOnlineA(lpszurl: P0, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGoOnlineA(lpszurl : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetGoOnlineA(lpszurl.param().abi(), hwndparent.param().abi(), core::mem::transmute(dwflags)).ok() + InternetGoOnlineA(lpszurl.param().abi(), core::mem::transmute(hwndparent), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn InternetGoOnlineW(lpszurl: P0, hwndparent: P1, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn InternetGoOnlineW(lpszurl: P0, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetGoOnlineW(lpszurl : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetGoOnlineW(lpszurl.param().abi(), hwndparent.param().abi(), core::mem::transmute(dwflags)).ok() + InternetGoOnlineW(lpszurl.param().abi(), core::mem::transmute(hwndparent), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn InternetHangUp(dwconnection: usize, dwreserved: u32) -> u32 { +pub unsafe fn InternetHangUp(dwconnection: usize, dwreserved: Option) -> u32 { windows_targets::link!("wininet.dll" "system" fn InternetHangUp(dwconnection : usize, dwreserved : u32) -> u32); - InternetHangUp(core::mem::transmute(dwconnection), core::mem::transmute(dwreserved)) + InternetHangUp(core::mem::transmute(dwconnection), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn InternetInitializeAutoProxyDll(dwreserved: u32) -> windows_core::Result<()> { @@ -1439,20 +1387,20 @@ where InternetOpenA(lpszagent.param().abi(), core::mem::transmute(dwaccesstype), lpszproxy.param().abi(), lpszproxybypass.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn InternetOpenUrlA(hinternet: *const core::ffi::c_void, lpszurl: P1, lpszheaders: Option<&[u8]>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn InternetOpenUrlA(hinternet: *const core::ffi::c_void, lpszurl: P1, lpszheaders: Option<&[u8]>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetOpenUrlA(hinternet : *const core::ffi::c_void, lpszurl : windows_core::PCSTR, lpszheaders : windows_core::PCSTR, dwheaderslength : u32, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - InternetOpenUrlA(core::mem::transmute(hinternet), lpszurl.param().abi(), 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(dwflags), core::mem::transmute(dwcontext)) + InternetOpenUrlA(core::mem::transmute(hinternet), lpszurl.param().abi(), 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(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetOpenUrlW(hinternet: *const core::ffi::c_void, lpszurl: P1, lpszheaders: Option<&[u16]>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void +pub unsafe fn InternetOpenUrlW(hinternet: *const core::ffi::c_void, lpszurl: P1, lpszheaders: Option<&[u16]>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetOpenUrlW(hinternet : *const core::ffi::c_void, lpszurl : windows_core::PCWSTR, lpszheaders : windows_core::PCWSTR, dwheaderslength : u32, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - InternetOpenUrlW(core::mem::transmute(hinternet), lpszurl.param().abi(), 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(dwflags), core::mem::transmute(dwcontext)) + InternetOpenUrlW(core::mem::transmute(hinternet), lpszurl.param().abi(), 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(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn InternetOpenW(lpszagent: P0, dwaccesstype: u32, lpszproxy: P2, lpszproxybypass: P3, dwflags: u32) -> *mut core::ffi::c_void @@ -1465,24 +1413,24 @@ where InternetOpenW(lpszagent.param().abi(), core::mem::transmute(dwaccesstype), lpszproxy.param().abi(), lpszproxybypass.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn InternetQueryDataAvailable(hfile: *const core::ffi::c_void, lpdwnumberofbytesavailable: Option<*mut u32>, dwflags: u32, dwcontext: usize) -> windows_core::Result<()> { +pub unsafe fn InternetQueryDataAvailable(hfile: *const core::ffi::c_void, lpdwnumberofbytesavailable: Option<*mut u32>, dwflags: u32, dwcontext: Option) -> 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(core::mem::transmute(hfile), core::mem::transmute(lpdwnumberofbytesavailable.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + InternetQueryDataAvailable(core::mem::transmute(hfile), core::mem::transmute(lpdwnumberofbytesavailable.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetQueryFortezzaStatus(pdwstatus: *mut u32, dwreserved: usize) -> super::super::Foundation::BOOL { +pub unsafe fn InternetQueryFortezzaStatus(pdwstatus: *mut u32, dwreserved: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetQueryFortezzaStatus(pdwstatus : *mut u32, dwreserved : usize) -> super::super::Foundation:: BOOL); - InternetQueryFortezzaStatus(core::mem::transmute(pdwstatus), core::mem::transmute(dwreserved)) + InternetQueryFortezzaStatus(core::mem::transmute(pdwstatus), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength)).ok() + InternetQueryOptionA(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength)).ok() + InternetQueryOptionW(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { @@ -1490,24 +1438,24 @@ pub unsafe fn InternetReadFile(hfile: *const core::ffi::c_void, lpbuffer: *mut c InternetReadFile(core::mem::transmute(hfile), core::mem::transmute(lpbuffer), core::mem::transmute(dwnumberofbytestoread), core::mem::transmute(lpdwnumberofbytesread)).ok() } #[inline] -pub unsafe fn InternetReadFileExA(hfile: *const core::ffi::c_void, lpbuffersout: *mut INTERNET_BUFFERSA, dwflags: u32, dwcontext: usize) -> windows_core::Result<()> { +pub unsafe fn InternetReadFileExA(hfile: *const core::ffi::c_void, lpbuffersout: *mut INTERNET_BUFFERSA, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetReadFileExA(hfile : *const core::ffi::c_void, lpbuffersout : *mut INTERNET_BUFFERSA, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - InternetReadFileExA(core::mem::transmute(hfile), core::mem::transmute(lpbuffersout), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + InternetReadFileExA(core::mem::transmute(hfile), core::mem::transmute(lpbuffersout), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetReadFileExW(hfile: *const core::ffi::c_void, lpbuffersout: *mut INTERNET_BUFFERSW, dwflags: u32, dwcontext: usize) -> windows_core::Result<()> { +pub unsafe fn InternetReadFileExW(hfile: *const core::ffi::c_void, lpbuffersout: *mut INTERNET_BUFFERSW, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn InternetReadFileExW(hfile : *const core::ffi::c_void, lpbuffersout : *mut INTERNET_BUFFERSW, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - InternetReadFileExW(core::mem::transmute(hfile), core::mem::transmute(lpbuffersout), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)).ok() + InternetReadFileExW(core::mem::transmute(hfile), core::mem::transmute(lpbuffersout), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetSecurityProtocolToStringA(dwprotocol: u32, lpstr: windows_core::PSTR, lpdwstrlength: *mut u32, dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetSecurityProtocolToStringA(dwprotocol: u32, lpstr: Option, lpdwstrlength: *mut u32, dwreserved: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetSecurityProtocolToStringA(dwprotocol : u32, lpstr : windows_core::PSTR, lpdwstrlength : *mut u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetSecurityProtocolToStringA(core::mem::transmute(dwprotocol), core::mem::transmute(lpstr), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved)) + InternetSecurityProtocolToStringA(core::mem::transmute(dwprotocol), core::mem::transmute(lpstr.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetSecurityProtocolToStringW(dwprotocol: u32, lpstr: windows_core::PWSTR, lpdwstrlength: *mut u32, dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetSecurityProtocolToStringW(dwprotocol: u32, lpstr: Option, lpdwstrlength: *mut u32, dwreserved: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetSecurityProtocolToStringW(dwprotocol : u32, lpstr : windows_core::PWSTR, lpdwstrlength : *mut u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetSecurityProtocolToStringW(core::mem::transmute(dwprotocol), core::mem::transmute(lpstr), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved)) + InternetSecurityProtocolToStringW(core::mem::transmute(dwprotocol), core::mem::transmute(lpstr.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwstrlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn InternetSetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2) -> windows_core::Result<()> @@ -1529,24 +1477,24 @@ where InternetSetCookieEx2(pcwszurl.param().abi(), core::mem::transmute(pcookie), pcwszp3ppolicy.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pdwcookiestate)) } #[inline] -pub unsafe fn InternetSetCookieExA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, dwflags: u32, dwreserved: usize) -> u32 +pub unsafe fn InternetSetCookieExA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, dwflags: u32, dwreserved: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetSetCookieExA(lpszurl : windows_core::PCSTR, lpszcookiename : windows_core::PCSTR, lpszcookiedata : windows_core::PCSTR, dwflags : u32, dwreserved : usize) -> u32); - InternetSetCookieExA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved)) + InternetSetCookieExA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetSetCookieExW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, dwflags: u32, dwreserved: usize) -> u32 +pub unsafe fn InternetSetCookieExW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, dwflags: u32, dwreserved: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetSetCookieExW(lpszurl : windows_core::PCWSTR, lpszcookiename : windows_core::PCWSTR, lpszcookiedata : windows_core::PCWSTR, dwflags : u32, dwreserved : usize) -> u32); - InternetSetCookieExW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved)) + InternetSetCookieExW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn InternetSetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2) -> windows_core::Result<()> @@ -1567,45 +1515,45 @@ where InternetSetDialState(lpszconnectoid.param().abi(), core::mem::transmute(dwstate), core::mem::transmute(dwreserved)) } #[inline] -pub unsafe fn InternetSetDialStateA(lpszconnectoid: P0, dwstate: u32, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetSetDialStateA(lpszconnectoid: P0, dwstate: u32, dwreserved: Option) -> super::super::Foundation::BOOL where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetSetDialStateA(lpszconnectoid : windows_core::PCSTR, dwstate : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetSetDialStateA(lpszconnectoid.param().abi(), core::mem::transmute(dwstate), core::mem::transmute(dwreserved)) + InternetSetDialStateA(lpszconnectoid.param().abi(), core::mem::transmute(dwstate), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetSetDialStateW(lpszconnectoid: P0, dwstate: u32, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetSetDialStateW(lpszconnectoid: P0, dwstate: u32, dwreserved: Option) -> super::super::Foundation::BOOL where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetSetDialStateW(lpszconnectoid : windows_core::PCWSTR, dwstate : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetSetDialStateW(lpszconnectoid.param().abi(), core::mem::transmute(dwstate), core::mem::transmute(dwreserved)) + InternetSetDialStateW(lpszconnectoid.param().abi(), core::mem::transmute(dwstate), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetSetFilePointer(hfile: *const core::ffi::c_void, ldistancetomove: i32, lpdistancetomovehigh: Option<*mut i32>, dwmovemethod: u32, dwcontext: usize) -> u32 { +pub unsafe fn InternetSetFilePointer(hfile: *const core::ffi::c_void, ldistancetomove: i32, lpdistancetomovehigh: Option<*mut i32>, dwmovemethod: u32, dwcontext: Option) -> 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(core::mem::transmute(hfile), core::mem::transmute(ldistancetomove), core::mem::transmute(lpdistancetomovehigh.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwmovemethod), core::mem::transmute(dwcontext)) + InternetSetFilePointer(core::mem::transmute(hfile), core::mem::transmute(ldistancetomove), core::mem::transmute(lpdistancetomovehigh.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmovemethod), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(dwbufferlength)).ok() + InternetSetOptionA(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(dwbufferlength), core::mem::transmute(dwflags)) + InternetSetOptionExA(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbufferlength), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(dwbufferlength), core::mem::transmute(dwflags)) + InternetSetOptionExW(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbufferlength), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(dwbufferlength)).ok() + InternetSetOptionW(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbufferlength)).ok() } #[inline] pub unsafe fn InternetSetPerSiteCookieDecisionA(pchhostname: P0, dwdecision: u32) -> super::super::Foundation::BOOL @@ -1624,46 +1572,43 @@ where InternetSetPerSiteCookieDecisionW(pchhostname.param().abi(), core::mem::transmute(dwdecision)) } #[inline] -pub unsafe fn InternetSetStatusCallback(hinternet: *const core::ffi::c_void, lpfninternetcallback: LPINTERNET_STATUS_CALLBACK) -> LPINTERNET_STATUS_CALLBACK { +pub unsafe fn InternetSetStatusCallback(hinternet: *const core::ffi::c_void, lpfninternetcallback: Option) -> LPINTERNET_STATUS_CALLBACK { windows_targets::link!("wininet.dll" "system" fn InternetSetStatusCallback(hinternet : *const core::ffi::c_void, lpfninternetcallback : LPINTERNET_STATUS_CALLBACK) -> LPINTERNET_STATUS_CALLBACK); - InternetSetStatusCallback(core::mem::transmute(hinternet), core::mem::transmute(lpfninternetcallback)) + InternetSetStatusCallback(core::mem::transmute(hinternet), core::mem::transmute(lpfninternetcallback.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetSetStatusCallbackA(hinternet: *const core::ffi::c_void, lpfninternetcallback: LPINTERNET_STATUS_CALLBACK) -> LPINTERNET_STATUS_CALLBACK { +pub unsafe fn InternetSetStatusCallbackA(hinternet: *const core::ffi::c_void, lpfninternetcallback: Option) -> LPINTERNET_STATUS_CALLBACK { windows_targets::link!("wininet.dll" "system" fn InternetSetStatusCallbackA(hinternet : *const core::ffi::c_void, lpfninternetcallback : LPINTERNET_STATUS_CALLBACK) -> LPINTERNET_STATUS_CALLBACK); - InternetSetStatusCallbackA(core::mem::transmute(hinternet), core::mem::transmute(lpfninternetcallback)) + InternetSetStatusCallbackA(core::mem::transmute(hinternet), core::mem::transmute(lpfninternetcallback.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetSetStatusCallbackW(hinternet: *const core::ffi::c_void, lpfninternetcallback: LPINTERNET_STATUS_CALLBACK) -> LPINTERNET_STATUS_CALLBACK { +pub unsafe fn InternetSetStatusCallbackW(hinternet: *const core::ffi::c_void, lpfninternetcallback: Option) -> LPINTERNET_STATUS_CALLBACK { windows_targets::link!("wininet.dll" "system" fn InternetSetStatusCallbackW(hinternet : *const core::ffi::c_void, lpfninternetcallback : LPINTERNET_STATUS_CALLBACK) -> LPINTERNET_STATUS_CALLBACK); - InternetSetStatusCallbackW(core::mem::transmute(hinternet), core::mem::transmute(lpfninternetcallback)) + InternetSetStatusCallbackW(core::mem::transmute(hinternet), core::mem::transmute(lpfninternetcallback.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetShowSecurityInfoByURL(lpszurl: P0, hwndparent: P1) -> super::super::Foundation::BOOL +pub unsafe fn InternetShowSecurityInfoByURL(lpszurl: P0, hwndparent: super::super::Foundation::HWND) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetShowSecurityInfoByURL(lpszurl : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - InternetShowSecurityInfoByURL(lpszurl.param().abi(), hwndparent.param().abi()) + InternetShowSecurityInfoByURL(lpszurl.param().abi(), core::mem::transmute(hwndparent)) } #[inline] -pub unsafe fn InternetShowSecurityInfoByURLA(lpszurl: P0, hwndparent: P1) -> super::super::Foundation::BOOL +pub unsafe fn InternetShowSecurityInfoByURLA(lpszurl: P0, hwndparent: super::super::Foundation::HWND) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetShowSecurityInfoByURLA(lpszurl : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - InternetShowSecurityInfoByURLA(lpszurl.param().abi(), hwndparent.param().abi()) + InternetShowSecurityInfoByURLA(lpszurl.param().abi(), core::mem::transmute(hwndparent)) } #[inline] -pub unsafe fn InternetShowSecurityInfoByURLW(lpszurl: P0, hwndparent: P1) -> super::super::Foundation::BOOL +pub unsafe fn InternetShowSecurityInfoByURLW(lpszurl: P0, hwndparent: super::super::Foundation::HWND) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetShowSecurityInfoByURLW(lpszurl : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - InternetShowSecurityInfoByURLW(lpszurl.param().abi(), hwndparent.param().abi()) + InternetShowSecurityInfoByURLW(lpszurl.param().abi(), core::mem::transmute(hwndparent)) } #[inline] pub unsafe fn InternetTimeFromSystemTime(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: &mut [u8]) -> windows_core::Result<()> { @@ -1681,28 +1626,28 @@ pub unsafe fn InternetTimeFromSystemTimeW(pst: *const super::super::Foundation:: InternetTimeFromSystemTimeW(core::mem::transmute(pst), core::mem::transmute(dwrfc), core::mem::transmute(lpsztime), core::mem::transmute(cbtime)).ok() } #[inline] -pub unsafe fn InternetTimeToSystemTime(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn InternetTimeToSystemTime(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetTimeToSystemTime(lpsztime : windows_core::PCSTR, pst : *mut super::super::Foundation:: SYSTEMTIME, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetTimeToSystemTime(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved)).ok() + InternetTimeToSystemTime(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetTimeToSystemTimeA(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn InternetTimeToSystemTimeA(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetTimeToSystemTimeA(lpsztime : windows_core::PCSTR, pst : *mut super::super::Foundation:: SYSTEMTIME, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetTimeToSystemTimeA(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved)).ok() + InternetTimeToSystemTimeA(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn InternetTimeToSystemTimeW(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn InternetTimeToSystemTimeW(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetTimeToSystemTimeW(lpsztime : windows_core::PCWSTR, pst : *mut super::super::Foundation:: SYSTEMTIME, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetTimeToSystemTimeW(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved)).ok() + InternetTimeToSystemTimeW(lpsztime.param().abi(), core::mem::transmute(pst), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn InternetUnlockRequestFile(hlockrequestinfo: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -1715,14 +1660,14 @@ pub unsafe fn InternetWriteFile(hfile: *const core::ffi::c_void, lpbuffer: *cons InternetWriteFile(core::mem::transmute(hfile), core::mem::transmute(lpbuffer), core::mem::transmute(dwnumberofbytestowrite), core::mem::transmute(lpdwnumberofbyteswritten)).ok() } #[inline] -pub unsafe fn InternetWriteFileExA(hfile: *const core::ffi::c_void, lpbuffersin: *const INTERNET_BUFFERSA, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn InternetWriteFileExA(hfile: *const core::ffi::c_void, lpbuffersin: *const INTERNET_BUFFERSA, dwflags: u32, dwcontext: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetWriteFileExA(hfile : *const core::ffi::c_void, lpbuffersin : *const INTERNET_BUFFERSA, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - InternetWriteFileExA(core::mem::transmute(hfile), core::mem::transmute(lpbuffersin), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + InternetWriteFileExA(core::mem::transmute(hfile), core::mem::transmute(lpbuffersin), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetWriteFileExW(hfile: *const core::ffi::c_void, lpbuffersin: *const INTERNET_BUFFERSW, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn InternetWriteFileExW(hfile: *const core::ffi::c_void, lpbuffersin: *const INTERNET_BUFFERSW, dwflags: u32, dwcontext: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetWriteFileExW(hfile : *const core::ffi::c_void, lpbuffersin : *const INTERNET_BUFFERSW, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - InternetWriteFileExW(core::mem::transmute(hfile), core::mem::transmute(lpbuffersin), core::mem::transmute(dwflags), core::mem::transmute(dwcontext)) + InternetWriteFileExW(core::mem::transmute(hfile), core::mem::transmute(lpbuffersin), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn IsDomainLegalCookieDomainA(pchdomain: P0, pchfulldomain: P1) -> super::super::Foundation::BOOL @@ -1774,9 +1719,9 @@ pub unsafe fn LoadUrlCacheContent() -> super::super::Foundation::BOOL { LoadUrlCacheContent() } #[inline] -pub unsafe fn ParseX509EncodedCertificateForListBoxEntry(lpcert: &[u8], lpszlistboxentry: windows_core::PSTR, lpdwlistboxentry: *mut u32) -> u32 { +pub unsafe fn ParseX509EncodedCertificateForListBoxEntry(lpcert: &[u8], lpszlistboxentry: Option, lpdwlistboxentry: *mut u32) -> u32 { windows_targets::link!("wininet.dll" "system" fn ParseX509EncodedCertificateForListBoxEntry(lpcert : *const u8, cbcert : u32, lpszlistboxentry : windows_core::PSTR, lpdwlistboxentry : *mut u32) -> u32); - ParseX509EncodedCertificateForListBoxEntry(core::mem::transmute(lpcert.as_ptr()), lpcert.len().try_into().unwrap(), core::mem::transmute(lpszlistboxentry), core::mem::transmute(lpdwlistboxentry)) + ParseX509EncodedCertificateForListBoxEntry(core::mem::transmute(lpcert.as_ptr()), lpcert.len().try_into().unwrap(), core::mem::transmute(lpszlistboxentry.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwlistboxentry)) } #[inline] pub unsafe fn PerformOperationOverUrlCacheA(pszurlsearchpattern: P0, dwflags: u32, dwfilter: u32, groupid: i64, preserved1: Option<*const core::ffi::c_void>, pdwreserved2: Option<*const u32>, preserved3: Option<*const core::ffi::c_void>, op: CACHE_OPERATOR, poperatordata: *mut core::ffi::c_void) -> super::super::Foundation::BOOL @@ -1784,12 +1729,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(), core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(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())), core::mem::transmute(op), core::mem::transmute(poperatordata)) + PerformOperationOverUrlCacheA(pszurlsearchpattern.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(groupid), core::mem::transmute(preserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwreserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved3.unwrap_or(core::mem::zeroed())), core::mem::transmute(op), core::mem::transmute(poperatordata)) } #[inline] -pub unsafe fn PrivacyGetZonePreferenceW(dwzone: u32, dwtype: u32, pdwtemplate: Option<*mut u32>, pszbuffer: windows_core::PWSTR, pdwbufferlength: Option<*mut u32>) -> u32 { +pub unsafe fn PrivacyGetZonePreferenceW(dwzone: u32, dwtype: u32, pdwtemplate: Option<*mut u32>, pszbuffer: Option, 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(core::mem::transmute(dwzone), core::mem::transmute(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()))) + PrivacyGetZonePreferenceW(core::mem::transmute(dwzone), core::mem::transmute(dwtype), core::mem::transmute(pdwtemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbufferlength.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PrivacySetZonePreferenceW(dwzone: u32, dwtype: u32, dwtemplate: u32, pszpreference: P3) -> u32 @@ -1802,31 +1747,22 @@ 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 * mut core::ffi::c_void, pppwszgwmacs : *mut *mut windows_core::PWSTR, pcgatewaymacs : *mut u32, pdwflags : *mut u32) -> super::super::Foundation:: BOOL); - 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()))) + ReadGuidsForConnectedNetworks(core::mem::transmute(pcnetworks.unwrap_or(core::mem::zeroed())), core::mem::transmute(pppwsznetworkguids.unwrap_or(core::mem::zeroed())), core::mem::transmute(pppbstrnetworknames.unwrap_or(core::mem::zeroed())), core::mem::transmute(pppwszgwmacs.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcgatewaymacs.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReadUrlCacheEntryStream(hurlcachestream: P0, dwlocation: u32, lpbuffer: *mut core::ffi::c_void, lpdwlen: *mut u32, reserved: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadUrlCacheEntryStream(hurlcachestream: super::super::Foundation::HANDLE, dwlocation: u32, lpbuffer: *mut core::ffi::c_void, lpdwlen: *mut u32, reserved: Option) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn ReadUrlCacheEntryStream(hurlcachestream : super::super::Foundation:: HANDLE, dwlocation : u32, lpbuffer : *mut core::ffi::c_void, lpdwlen : *mut u32, reserved : u32) -> super::super::Foundation:: BOOL); - ReadUrlCacheEntryStream(hurlcachestream.param().abi(), core::mem::transmute(dwlocation), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwlen), core::mem::transmute(reserved)).ok() + ReadUrlCacheEntryStream(core::mem::transmute(hurlcachestream), core::mem::transmute(dwlocation), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwlen), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn ReadUrlCacheEntryStreamEx(hurlcachestream: P0, qwlocation: u64, lpbuffer: *mut core::ffi::c_void, lpdwlen: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ReadUrlCacheEntryStreamEx(hurlcachestream: super::super::Foundation::HANDLE, qwlocation: u64, lpbuffer: *mut core::ffi::c_void, lpdwlen: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn ReadUrlCacheEntryStreamEx(hurlcachestream : super::super::Foundation:: HANDLE, qwlocation : u64, lpbuffer : *mut core::ffi::c_void, lpdwlen : *mut u32) -> super::super::Foundation:: BOOL); - ReadUrlCacheEntryStreamEx(hurlcachestream.param().abi(), core::mem::transmute(qwlocation), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwlen)) + ReadUrlCacheEntryStreamEx(core::mem::transmute(hurlcachestream), core::mem::transmute(qwlocation), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwlen)) } #[inline] -pub unsafe fn RegisterUrlCacheNotification(hwnd: P0, umsg: u32, gid: i64, dwopsfilter: u32, dwreserved: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterUrlCacheNotification(hwnd: Option, umsg: u32, gid: i64, dwopsfilter: u32, dwreserved: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn RegisterUrlCacheNotification(hwnd : super::super::Foundation:: HWND, umsg : u32, gid : i64, dwopsfilter : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - RegisterUrlCacheNotification(hwnd.param().abi(), core::mem::transmute(umsg), core::mem::transmute(gid), core::mem::transmute(dwopsfilter), core::mem::transmute(dwreserved)) + RegisterUrlCacheNotification(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(umsg), core::mem::transmute(gid), core::mem::transmute(dwopsfilter), core::mem::transmute(dwreserved)) } #[inline] pub unsafe fn ResumeSuspendedDownload(hrequest: *const core::ffi::c_void, dwresultcode: u32) -> windows_core::Result<()> { @@ -1834,50 +1770,48 @@ pub unsafe fn ResumeSuspendedDownload(hrequest: *const core::ffi::c_void, dwresu ResumeSuspendedDownload(core::mem::transmute(hrequest), core::mem::transmute(dwresultcode)).ok() } #[inline] -pub unsafe fn RetrieveUrlCacheEntryFileA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn RetrieveUrlCacheEntryFileA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, dwreserved: Option) -> windows_core::Result<()> 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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(dwreserved)).ok() + RetrieveUrlCacheEntryFileA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RetrieveUrlCacheEntryFileW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn RetrieveUrlCacheEntryFileW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, dwreserved: Option) -> windows_core::Result<()> 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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(dwreserved)).ok() + RetrieveUrlCacheEntryFileW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RetrieveUrlCacheEntryStreamA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, frandomread: P3, dwreserved: u32) -> windows_core::Result +pub unsafe fn RetrieveUrlCacheEntryStreamA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, frandomread: P3, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, P3: 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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo), frandomread.param().abi(), core::mem::transmute(dwreserved)); + let result__ = RetrieveUrlCacheEntryStreamA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), frandomread.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn RetrieveUrlCacheEntryStreamW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, frandomread: P3, dwreserved: u32) -> windows_core::Result +pub unsafe fn RetrieveUrlCacheEntryStreamW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, frandomread: P3, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, P3: 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(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo), frandomread.param().abi(), core::mem::transmute(dwreserved)); + let result__ = RetrieveUrlCacheEntryStreamW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), frandomread.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn RunOnceUrlCache(hwnd: P0, hinst: P1, lpszcmd: P2, ncmdshow: i32) -> u32 +pub unsafe fn RunOnceUrlCache(hwnd: super::super::Foundation::HWND, hinst: super::super::Foundation::HINSTANCE, lpszcmd: P2, ncmdshow: i32) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn RunOnceUrlCache(hwnd : super::super::Foundation:: HWND, hinst : super::super::Foundation:: HINSTANCE, lpszcmd : windows_core::PCSTR, ncmdshow : i32) -> u32); - RunOnceUrlCache(hwnd.param().abi(), hinst.param().abi(), lpszcmd.param().abi(), core::mem::transmute(ncmdshow)) + RunOnceUrlCache(core::mem::transmute(hwnd), core::mem::transmute(hinst), lpszcmd.param().abi(), core::mem::transmute(ncmdshow)) } #[inline] pub unsafe fn SetUrlCacheConfigInfoA(lpcacheconfiginfo: *const INTERNET_CACHE_CONFIG_INFOA, dwfieldcontrol: u32) -> super::super::Foundation::BOOL { @@ -1890,28 +1824,28 @@ pub unsafe fn SetUrlCacheConfigInfoW(lpcacheconfiginfo: *const INTERNET_CACHE_CO SetUrlCacheConfigInfoW(core::mem::transmute(lpcacheconfiginfo), core::mem::transmute(dwfieldcontrol)) } #[inline] -pub unsafe fn SetUrlCacheEntryGroup(lpszurlname: P0, dwflags: u32, groupid: i64, pbgroupattributes: Option<*const u8>, cbgroupattributes: u32, lpreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetUrlCacheEntryGroup(lpszurlname: P0, dwflags: u32, groupid: i64, pbgroupattributes: Option<*const u8>, cbgroupattributes: Option, lpreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL 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(), core::mem::transmute(dwflags), core::mem::transmute(groupid), core::mem::transmute(pbgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(cbgroupattributes), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) + SetUrlCacheEntryGroup(lpszurlname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(groupid), core::mem::transmute(pbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn SetUrlCacheEntryGroupA(lpszurlname: P0, dwflags: u32, groupid: i64, pbgroupattributes: Option<*const u8>, cbgroupattributes: Option, lpreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL 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(), core::mem::transmute(dwflags), core::mem::transmute(groupid), core::mem::transmute(pbgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(cbgroupattributes), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) + SetUrlCacheEntryGroupA(lpszurlname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(groupid), core::mem::transmute(pbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn SetUrlCacheEntryGroupW(lpszurlname: P0, dwflags: u32, groupid: i64, pbgroupattributes: Option<*const u8>, cbgroupattributes: Option, lpreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL 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(), core::mem::transmute(dwflags), core::mem::transmute(groupid), core::mem::transmute(pbgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(cbgroupattributes), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) + SetUrlCacheEntryGroupW(lpszurlname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(groupid), core::mem::transmute(pbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbgroupattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetUrlCacheEntryInfoA(lpszurlname: P0, lpcacheentryinfo: *const INTERNET_CACHE_ENTRY_INFOA, dwfieldcontrol: u32) -> windows_core::Result<()> @@ -1930,14 +1864,14 @@ where SetUrlCacheEntryInfoW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo), core::mem::transmute(dwfieldcontrol)).ok() } #[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<()> { +pub unsafe fn SetUrlCacheGroupAttributeA(gid: i64, dwflags: Option, 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(core::mem::transmute(gid), core::mem::transmute(dwflags), core::mem::transmute(dwattributes), core::mem::transmute(lpgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + SetUrlCacheGroupAttributeA(core::mem::transmute(gid), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwattributes), core::mem::transmute(lpgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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<()> { +pub unsafe fn SetUrlCacheGroupAttributeW(gid: i64, dwflags: Option, 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(core::mem::transmute(gid), core::mem::transmute(dwflags), core::mem::transmute(dwattributes), core::mem::transmute(lpgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + SetUrlCacheGroupAttributeW(core::mem::transmute(gid), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwattributes), core::mem::transmute(lpgroupinfo), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetUrlCacheHeaderData(nidx: u32, dwdata: u32) -> super::super::Foundation::BOOL { @@ -1945,61 +1879,49 @@ pub unsafe fn SetUrlCacheHeaderData(nidx: u32, dwdata: u32) -> super::super::Fou SetUrlCacheHeaderData(core::mem::transmute(nidx), core::mem::transmute(dwdata)) } #[inline] -pub unsafe fn ShowClientAuthCerts(hwndparent: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ShowClientAuthCerts(hwndparent: super::super::Foundation::HWND) -> u32 { windows_targets::link!("wininet.dll" "system" fn ShowClientAuthCerts(hwndparent : super::super::Foundation:: HWND) -> u32); - ShowClientAuthCerts(hwndparent.param().abi()) + ShowClientAuthCerts(core::mem::transmute(hwndparent)) } #[cfg(all(feature = "Win32_Security_Authentication_Identity", feature = "Win32_Security_Cryptography"))] #[inline] -pub unsafe fn ShowSecurityInfo(hwndparent: P0, psecurityinfo: *const INTERNET_SECURITY_INFO) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ShowSecurityInfo(hwndparent: super::super::Foundation::HWND, psecurityinfo: *const INTERNET_SECURITY_INFO) -> u32 { windows_targets::link!("wininet.dll" "system" fn ShowSecurityInfo(hwndparent : super::super::Foundation:: HWND, psecurityinfo : *const INTERNET_SECURITY_INFO) -> u32); - ShowSecurityInfo(hwndparent.param().abi(), core::mem::transmute(psecurityinfo)) + ShowSecurityInfo(core::mem::transmute(hwndparent), core::mem::transmute(psecurityinfo)) } #[inline] -pub unsafe fn ShowX509EncodedCertificate(hwndparent: P0, lpcert: &[u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ShowX509EncodedCertificate(hwndparent: super::super::Foundation::HWND, lpcert: &[u8]) -> u32 { windows_targets::link!("wininet.dll" "system" fn ShowX509EncodedCertificate(hwndparent : super::super::Foundation:: HWND, lpcert : *const u8, cbcert : u32) -> u32); - ShowX509EncodedCertificate(hwndparent.param().abi(), core::mem::transmute(lpcert.as_ptr()), lpcert.len().try_into().unwrap()) + ShowX509EncodedCertificate(core::mem::transmute(hwndparent), core::mem::transmute(lpcert.as_ptr()), lpcert.len().try_into().unwrap()) } #[inline] -pub unsafe fn UnlockUrlCacheEntryFile(lpszurlname: P0, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn UnlockUrlCacheEntryFile(lpszurlname: P0, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFile(lpszurlname : windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - UnlockUrlCacheEntryFile(lpszurlname.param().abi(), core::mem::transmute(dwreserved)).ok() + UnlockUrlCacheEntryFile(lpszurlname.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn UnlockUrlCacheEntryFileA(lpszurlname: P0, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn UnlockUrlCacheEntryFileA(lpszurlname: P0, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFileA(lpszurlname : windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - UnlockUrlCacheEntryFileA(lpszurlname.param().abi(), core::mem::transmute(dwreserved)).ok() + UnlockUrlCacheEntryFileA(lpszurlname.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn UnlockUrlCacheEntryFileW(lpszurlname: P0, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn UnlockUrlCacheEntryFileW(lpszurlname: P0, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFileW(lpszurlname : windows_core::PCWSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - UnlockUrlCacheEntryFileW(lpszurlname.param().abi(), core::mem::transmute(dwreserved)).ok() + UnlockUrlCacheEntryFileW(lpszurlname.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn UnlockUrlCacheEntryStream(hurlcachestream: P0, reserved: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnlockUrlCacheEntryStream(hurlcachestream: super::super::Foundation::HANDLE, reserved: Option) -> windows_core::Result<()> { windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryStream(hurlcachestream : super::super::Foundation:: HANDLE, reserved : u32) -> super::super::Foundation:: BOOL); - UnlockUrlCacheEntryStream(hurlcachestream.param().abi(), core::mem::transmute(reserved)).ok() + UnlockUrlCacheEntryStream(core::mem::transmute(hurlcachestream), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn UpdateUrlCacheContentPath(sznewpath: P0) -> super::super::Foundation::BOOL @@ -2046,12 +1968,9 @@ where UrlCacheFindFirstEntry(pwszprefix.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwfilter), core::mem::transmute(groupid), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phfind)) } #[inline] -pub unsafe fn UrlCacheFindNextEntry(hfind: P0, pcacheentryinfo: *mut URLCACHE_ENTRY_INFO) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn UrlCacheFindNextEntry(hfind: super::super::Foundation::HANDLE, pcacheentryinfo: *mut URLCACHE_ENTRY_INFO) -> u32 { windows_targets::link!("wininet.dll" "system" fn UrlCacheFindNextEntry(hfind : super::super::Foundation:: HANDLE, pcacheentryinfo : *mut URLCACHE_ENTRY_INFO) -> u32); - UrlCacheFindNextEntry(hfind.param().abi(), core::mem::transmute(pcacheentryinfo)) + UrlCacheFindNextEntry(core::mem::transmute(hfind), core::mem::transmute(pcacheentryinfo)) } #[inline] pub unsafe fn UrlCacheFreeEntryInfo(pcacheentryinfo: *mut URLCACHE_ENTRY_INFO) { @@ -2074,7 +1993,7 @@ where P1: 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(core::ptr::null())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo.unwrap_or(core::ptr::null_mut()))) + UrlCacheGetEntryInfo(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn UrlCacheGetGlobalCacheSize(dwfilter: u32, pullsize: *mut u64, pulllimit: *mut u64) -> u32 { @@ -2102,7 +2021,7 @@ where P1: 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(core::ptr::null())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentryfile)) + UrlCacheRetrieveEntryFile(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentryfile)) } #[inline] pub unsafe fn UrlCacheRetrieveEntryStream(happcache: Option<*const core::ffi::c_void>, pcwszurl: P1, frandomread: P2, pcacheentryinfo: *mut URLCACHE_ENTRY_INFO, phentrystream: *mut *mut core::ffi::c_void) -> u32 @@ -2111,7 +2030,7 @@ where P2: 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(core::ptr::null())), pcwszurl.param().abi(), frandomread.param().abi(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentrystream)) + UrlCacheRetrieveEntryStream(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), frandomread.param().abi(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentrystream)) } #[inline] pub unsafe fn UrlCacheServer() -> u32 { @@ -2129,7 +2048,7 @@ where P1: 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(core::ptr::null())), pcwszurl.param().abi(), core::mem::transmute(pbextradata.as_ptr()), pbextradata.len().try_into().unwrap()) + UrlCacheUpdateEntryExtraData(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), core::mem::transmute(pbextradata.as_ptr()), pbextradata.len().try_into().unwrap()) } pub const ANY_CACHE_ENTRY: u32 = 4294967295u32; #[repr(C)] 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 e34c3966ad..eadcc96e87 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs @@ -1,37 +1,33 @@ #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn AcceptEx(slistensocket: P0, sacceptsocket: P1, lpoutputbuffer: *mut core::ffi::c_void, dwreceivedatalength: u32, dwlocaladdresslength: u32, dwremoteaddresslength: u32, lpdwbytesreceived: *mut u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AcceptEx(slistensocket: SOCKET, sacceptsocket: SOCKET, lpoutputbuffer: *mut core::ffi::c_void, dwreceivedatalength: u32, dwlocaladdresslength: u32, dwremoteaddresslength: u32, lpdwbytesreceived: *mut u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { windows_targets::link!("mswsock.dll" "system" fn AcceptEx(slistensocket : SOCKET, sacceptsocket : SOCKET, lpoutputbuffer : *mut core::ffi::c_void, dwreceivedatalength : u32, dwlocaladdresslength : u32, dwremoteaddresslength : u32, lpdwbytesreceived : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - AcceptEx(slistensocket.param().abi(), sacceptsocket.param().abi(), core::mem::transmute(lpoutputbuffer), core::mem::transmute(dwreceivedatalength), core::mem::transmute(dwlocaladdresslength), core::mem::transmute(dwremoteaddresslength), core::mem::transmute(lpdwbytesreceived), core::mem::transmute(lpoverlapped)) + AcceptEx(core::mem::transmute(slistensocket), core::mem::transmute(sacceptsocket), core::mem::transmute(lpoutputbuffer), core::mem::transmute(dwreceivedatalength), core::mem::transmute(dwlocaladdresslength), core::mem::transmute(dwremoteaddresslength), core::mem::transmute(lpdwbytesreceived), core::mem::transmute(lpoverlapped)) } #[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(core::ptr::null())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(lpdwbufferlength)) + EnumProtocolsA(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(lpdwbufferlength)) + EnumProtocolsW(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(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(core::ptr::null()))) + FreeAddrInfoEx(core::mem::transmute(paddrinfoex.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + FreeAddrInfoExW(core::mem::transmute(paddrinfoex.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + FreeAddrInfoW(core::mem::transmute(paddrinfo.unwrap_or(core::mem::zeroed()))) } #[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) { @@ -40,13 +36,24 @@ pub unsafe fn GetAcceptExSockaddrs(lpoutputbuffer: *const core::ffi::c_void, dwr } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn GetAddrInfoExA(pname: P0, pservicename: P1, dwnamespace: u32, lpnspid: Option<*const windows_core::GUID>, hints: Option<*const ADDRINFOEXA>, ppresult: *mut *mut ADDRINFOEXA, timeout: Option<*const TIMEVAL>, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle: Option<*mut super::super::Foundation::HANDLE>) -> i32 +pub unsafe fn GetAddrInfoExA(pname: P0, pservicename: P1, dwnamespace: u32, lpnspid: Option<*const windows_core::GUID>, hints: Option<*const ADDRINFOEXA>, ppresult: *mut *mut ADDRINFOEXA, timeout: Option<*const TIMEVAL>, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option, lpnamehandle: Option<*mut super::super::Foundation::HANDLE>) -> i32 where P0: windows_core::Param, 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(), core::mem::transmute(dwnamespace), core::mem::transmute(lpnspid.unwrap_or(core::ptr::null())), core::mem::transmute(hints.unwrap_or(core::ptr::null())), core::mem::transmute(ppresult), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null())), core::mem::transmute(lpcompletionroutine), core::mem::transmute(lpnamehandle.unwrap_or(core::ptr::null_mut()))) + GetAddrInfoExA( + pname.param().abi(), + pservicename.param().abi(), + core::mem::transmute(dwnamespace), + core::mem::transmute(lpnspid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(hints.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppresult), + core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpnamehandle.unwrap_or(core::mem::zeroed())), + ) } #[inline] pub unsafe fn GetAddrInfoExCancel(lphandle: *const super::super::Foundation::HANDLE) -> i32 { @@ -61,13 +68,24 @@ pub unsafe fn GetAddrInfoExOverlappedResult(lpoverlapped: *const super::super::S } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn GetAddrInfoExW(pname: P0, pservicename: P1, dwnamespace: u32, lpnspid: Option<*const windows_core::GUID>, hints: Option<*const ADDRINFOEXW>, ppresult: *mut *mut ADDRINFOEXW, timeout: Option<*const TIMEVAL>, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPLOOKUPSERVICE_COMPLETION_ROUTINE, lphandle: Option<*mut super::super::Foundation::HANDLE>) -> i32 +pub unsafe fn GetAddrInfoExW(pname: P0, pservicename: P1, dwnamespace: u32, lpnspid: Option<*const windows_core::GUID>, hints: Option<*const ADDRINFOEXW>, ppresult: *mut *mut ADDRINFOEXW, timeout: Option<*const TIMEVAL>, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option, lphandle: Option<*mut super::super::Foundation::HANDLE>) -> i32 where P0: windows_core::Param, 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(), core::mem::transmute(dwnamespace), core::mem::transmute(lpnspid.unwrap_or(core::ptr::null())), core::mem::transmute(hints.unwrap_or(core::ptr::null())), core::mem::transmute(ppresult), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null())), core::mem::transmute(lpcompletionroutine), core::mem::transmute(lphandle.unwrap_or(core::ptr::null_mut()))) + GetAddrInfoExW( + pname.param().abi(), + pservicename.param().abi(), + core::mem::transmute(dwnamespace), + core::mem::transmute(lpnspid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(hints.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppresult), + core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lphandle.unwrap_or(core::mem::zeroed())), + ) } #[inline] pub unsafe fn GetAddrInfoW(pnodename: P0, pservicename: P1, phints: Option<*const ADDRINFOW>, ppresult: *mut *mut ADDRINFOW) -> i32 @@ -76,23 +94,23 @@ 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(core::ptr::null())), core::mem::transmute(ppresult)) + GetAddrInfoW(pnodename.param().abi(), pservicename.param().abi(), core::mem::transmute(phints.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppresult)) } #[inline] -pub unsafe fn GetAddressByNameA(dwnamespace: u32, lpservicetype: *const windows_core::GUID, lpservicename: P2, 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 +pub unsafe fn GetAddressByNameA(dwnamespace: u32, lpservicetype: *const windows_core::GUID, lpservicename: P2, lpiprotocols: Option<*const i32>, dwresolution: u32, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>, lpcsaddrbuffer: *mut core::ffi::c_void, lpdwbufferlength: *mut u32, lpaliasbuffer: Option, lpdwaliasbufferlength: *mut u32) -> i32 where P2: 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(core::mem::transmute(dwnamespace), core::mem::transmute(lpservicetype), lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), core::mem::transmute(dwresolution), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpcsaddrbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpaliasbuffer), core::mem::transmute(lpdwaliasbufferlength)) + GetAddressByNameA(core::mem::transmute(dwnamespace), core::mem::transmute(lpservicetype), lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwresolution), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcsaddrbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpaliasbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwaliasbufferlength)) } #[inline] -pub unsafe fn GetAddressByNameW(dwnamespace: u32, lpservicetype: *const windows_core::GUID, lpservicename: P2, 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 +pub unsafe fn GetAddressByNameW(dwnamespace: u32, lpservicetype: *const windows_core::GUID, lpservicename: P2, lpiprotocols: Option<*const i32>, dwresolution: u32, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>, lpcsaddrbuffer: *mut core::ffi::c_void, lpdwbufferlength: *mut u32, lpaliasbuffer: Option, lpdwaliasbufferlength: *mut u32) -> i32 where P2: 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(core::mem::transmute(dwnamespace), core::mem::transmute(lpservicetype), lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), core::mem::transmute(dwresolution), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpcsaddrbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpaliasbuffer), core::mem::transmute(lpdwaliasbufferlength)) + GetAddressByNameW(core::mem::transmute(dwnamespace), core::mem::transmute(lpservicetype), lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwresolution), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcsaddrbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpaliasbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwaliasbufferlength)) } #[inline] pub unsafe fn GetHostNameW(name: &mut [u16]) -> i32 { @@ -110,12 +128,9 @@ pub unsafe fn GetNameByTypeW(lpservicetype: *const windows_core::GUID, lpservice GetNameByTypeW(core::mem::transmute(lpservicetype), core::mem::transmute(lpservicename), core::mem::transmute(dwnamelength)) } #[inline] -pub unsafe fn GetNameInfoW(psockaddr: *const SOCKADDR, sockaddrlength: P1, pnodebuffer: Option<&mut [u16]>, pservicebuffer: Option<&mut [u16]>, flags: i32) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn GetNameInfoW(psockaddr: *const SOCKADDR, sockaddrlength: socklen_t, pnodebuffer: Option<&mut [u16]>, pservicebuffer: Option<&mut [u16]>, flags: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn GetNameInfoW(psockaddr : *const SOCKADDR, sockaddrlength : socklen_t, pnodebuffer : windows_core::PWSTR, nodebuffersize : u32, pservicebuffer : windows_core::PWSTR, servicebuffersize : u32, flags : i32) -> i32); - GetNameInfoW(core::mem::transmute(psockaddr), sockaddrlength.param().abi(), core::mem::transmute(pnodebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pnodebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pservicebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pservicebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) + GetNameInfoW(core::mem::transmute(psockaddr), core::mem::transmute(sockaddrlength), core::mem::transmute(pnodebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pnodebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pservicebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pservicebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) } #[inline] pub unsafe fn GetServiceA(dwnamespace: u32, lpguid: *const windows_core::GUID, lpservicename: P2, dwproperties: u32, lpbuffer: *mut core::ffi::c_void, lpdwbuffersize: *mut u32, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>) -> i32 @@ -123,7 +138,7 @@ where P2: 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(core::mem::transmute(dwnamespace), core::mem::transmute(lpguid), lpservicename.param().abi(), core::mem::transmute(dwproperties), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null()))) + GetServiceA(core::mem::transmute(dwnamespace), core::mem::transmute(lpguid), lpservicename.param().abi(), core::mem::transmute(dwproperties), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetServiceW(dwnamespace: u32, lpguid: *const windows_core::GUID, lpservicename: P2, dwproperties: u32, lpbuffer: *mut core::ffi::c_void, lpdwbuffersize: *mut u32, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>) -> i32 @@ -131,7 +146,7 @@ where P2: 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(core::mem::transmute(dwnamespace), core::mem::transmute(lpguid), lpservicename.param().abi(), core::mem::transmute(dwproperties), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null()))) + GetServiceW(core::mem::transmute(dwnamespace), core::mem::transmute(lpguid), lpservicename.param().abi(), core::mem::transmute(dwproperties), core::mem::transmute(lpbuffer), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetTypeByNameA(lpservicename: P0, lpservicetype: *mut windows_core::GUID) -> i32 @@ -164,19 +179,16 @@ where } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ProcessSocketNotifications(completionport: P0, registrationinfos: Option<&mut [SOCK_NOTIFY_REGISTRATION]>, timeoutms: u32, completionportentries: Option<&mut [super::super::System::IO::OVERLAPPED_ENTRY]>, receivedentrycount: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ProcessSocketNotifications(completionport: super::super::Foundation::HANDLE, registrationinfos: Option<&mut [SOCK_NOTIFY_REGISTRATION]>, timeoutms: u32, completionportentries: Option<&mut [super::super::System::IO::OVERLAPPED_ENTRY]>, receivedentrycount: Option<*mut u32>) -> u32 { windows_targets::link!("ws2_32.dll" "system" fn ProcessSocketNotifications(completionport : super::super::Foundation:: HANDLE, registrationcount : u32, registrationinfos : *mut SOCK_NOTIFY_REGISTRATION, timeoutms : u32, completioncount : u32, completionportentries : *mut super::super::System::IO:: OVERLAPPED_ENTRY, receivedentrycount : *mut u32) -> u32); ProcessSocketNotifications( - completionport.param().abi(), + core::mem::transmute(completionport), registrationinfos.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(registrationinfos.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(receivedentrycount.unwrap_or(core::mem::zeroed())), ) } #[inline] @@ -315,7 +327,7 @@ where } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn SetAddrInfoExA(pname: P0, pservicename: P1, paddresses: Option<*const SOCKET_ADDRESS>, dwaddresscount: u32, lpblob: Option<*const super::super::System::Com::BLOB>, dwflags: u32, dwnamespace: u32, lpnspid: Option<*const windows_core::GUID>, timeout: Option<*const TIMEVAL>, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle: Option<*mut super::super::Foundation::HANDLE>) -> i32 +pub unsafe fn SetAddrInfoExA(pname: P0, pservicename: P1, paddresses: Option<*const SOCKET_ADDRESS>, dwaddresscount: u32, lpblob: Option<*const super::super::System::Com::BLOB>, dwflags: u32, dwnamespace: u32, lpnspid: Option<*const windows_core::GUID>, timeout: Option<*const TIMEVAL>, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option, lpnamehandle: Option<*mut super::super::Foundation::HANDLE>) -> i32 where P0: windows_core::Param, P1: windows_core::Param, @@ -324,21 +336,21 @@ where SetAddrInfoExA( pname.param().abi(), pservicename.param().abi(), - core::mem::transmute(paddresses.unwrap_or(core::ptr::null())), + core::mem::transmute(paddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwaddresscount), - core::mem::transmute(lpblob.unwrap_or(core::ptr::null())), + core::mem::transmute(lpblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(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())), - core::mem::transmute(lpcompletionroutine), - core::mem::transmute(lpnamehandle.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpnspid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpnamehandle.unwrap_or(core::mem::zeroed())), ) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn SetAddrInfoExW(pname: P0, pservicename: P1, paddresses: Option<*const SOCKET_ADDRESS>, dwaddresscount: u32, lpblob: Option<*const super::super::System::Com::BLOB>, dwflags: u32, dwnamespace: u32, lpnspid: Option<*const windows_core::GUID>, timeout: Option<*const TIMEVAL>, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle: Option<*mut super::super::Foundation::HANDLE>) -> i32 +pub unsafe fn SetAddrInfoExW(pname: P0, pservicename: P1, paddresses: Option<*const SOCKET_ADDRESS>, dwaddresscount: u32, lpblob: Option<*const super::super::System::Com::BLOB>, dwflags: u32, dwnamespace: u32, lpnspid: Option<*const windows_core::GUID>, timeout: Option<*const TIMEVAL>, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option, lpnamehandle: Option<*mut super::super::Foundation::HANDLE>) -> i32 where P0: windows_core::Param, P1: windows_core::Param, @@ -347,29 +359,29 @@ where SetAddrInfoExW( pname.param().abi(), pservicename.param().abi(), - core::mem::transmute(paddresses.unwrap_or(core::ptr::null())), + core::mem::transmute(paddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwaddresscount), - core::mem::transmute(lpblob.unwrap_or(core::ptr::null())), + core::mem::transmute(lpblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(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())), - core::mem::transmute(lpcompletionroutine), - core::mem::transmute(lpnamehandle.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpnspid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpnamehandle.unwrap_or(core::mem::zeroed())), ) } #[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(core::mem::transmute(dwnamespace), core::mem::transmute(dwoperation), core::mem::transmute(dwflags), core::mem::transmute(lpserviceinfo), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpdwstatusflags)) + SetServiceA(core::mem::transmute(dwnamespace), core::mem::transmute(dwoperation), core::mem::transmute(dwflags), core::mem::transmute(lpserviceinfo), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dwnamespace), core::mem::transmute(dwoperation), core::mem::transmute(dwflags), core::mem::transmute(lpserviceinfo), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpdwstatusflags)) + SetServiceW(core::mem::transmute(dwnamespace), core::mem::transmute(dwoperation), core::mem::transmute(dwflags), core::mem::transmute(lpserviceinfo), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwstatusflags)) } #[inline] pub unsafe fn SetSocketMediaStreamingMode(value: P0) -> windows_core::Result<()> @@ -381,41 +393,31 @@ where } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn TransmitFile(hsocket: P0, hfile: P1, nnumberofbytestowrite: u32, nnumberofbytespersend: u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lptransmitbuffers: Option<*const TRANSMIT_FILE_BUFFERS>, dwreserved: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn TransmitFile(hsocket: SOCKET, hfile: super::super::Foundation::HANDLE, nnumberofbytestowrite: u32, nnumberofbytespersend: u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lptransmitbuffers: Option<*const TRANSMIT_FILE_BUFFERS>, dwreserved: u32) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(nnumberofbytestowrite), core::mem::transmute(nnumberofbytespersend), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptransmitbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(dwreserved)) + TransmitFile(core::mem::transmute(hsocket), core::mem::transmute(hfile), core::mem::transmute(nnumberofbytestowrite), core::mem::transmute(nnumberofbytespersend), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptransmitbuffers.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreserved)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WPUCompleteOverlappedRequest(s: P0, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, dwerror: u32, cbtransferred: u32, lperrno: *mut i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WPUCompleteOverlappedRequest(s: SOCKET, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, dwerror: u32, cbtransferred: u32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WPUCompleteOverlappedRequest(s : SOCKET, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, dwerror : u32, cbtransferred : u32, lperrno : *mut i32) -> i32); - WPUCompleteOverlappedRequest(s.param().abi(), core::mem::transmute(lpoverlapped), core::mem::transmute(dwerror), core::mem::transmute(cbtransferred), core::mem::transmute(lperrno)) + WPUCompleteOverlappedRequest(core::mem::transmute(s), core::mem::transmute(lpoverlapped), core::mem::transmute(dwerror), core::mem::transmute(cbtransferred), core::mem::transmute(lperrno)) } #[inline] -pub unsafe fn WSAAccept(s: P0, addr: Option<*mut SOCKADDR>, addrlen: Option<*mut i32>, lpfncondition: LPCONDITIONPROC, dwcallbackdata: usize) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WSAAccept(s: SOCKET, addr: Option<*mut SOCKADDR>, addrlen: Option<*mut i32>, lpfncondition: Option, dwcallbackdata: Option) -> windows_core::Result { 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(core::ptr::null_mut())), core::mem::transmute(addrlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpfncondition), core::mem::transmute(dwcallbackdata)); + let result__ = WSAAccept(core::mem::transmute(s), core::mem::transmute(addr.unwrap_or(core::mem::zeroed())), core::mem::transmute(addrlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfncondition.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcallbackdata.unwrap_or(core::mem::zeroed()))); (!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(core::mem::transmute(lpsaaddress), core::mem::transmute(dwaddresslength), core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpszaddressstring), core::mem::transmute(lpdwaddressstringlength)) + WSAAddressToStringA(core::mem::transmute(lpsaaddress), core::mem::transmute(dwaddresslength), core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpszaddressstring), core::mem::transmute(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(core::mem::transmute(lpsaaddress), core::mem::transmute(dwaddresslength), core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpszaddressstring), core::mem::transmute(lpdwaddressstringlength)) + WSAAddressToStringW(core::mem::transmute(lpsaaddress), core::mem::transmute(dwaddresslength), core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpszaddressstring), core::mem::transmute(lpdwaddressstringlength)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -424,80 +426,63 @@ pub unsafe fn WSAAdvertiseProvider(puuidproviderid: *const windows_core::GUID, p WSAAdvertiseProvider(core::mem::transmute(puuidproviderid), core::mem::transmute(pnspv2routine)) } #[inline] -pub unsafe fn WSAAsyncGetHostByAddr(hwnd: P0, wmsg: u32, addr: &[u8], r#type: i32, buf: &mut [u8]) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WSAAsyncGetHostByAddr(hwnd: super::super::Foundation::HWND, wmsg: u32, addr: &[u8], r#type: i32, buf: &mut [u8]) -> windows_core::Result { windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetHostByAddr(hwnd : super::super::Foundation:: HWND, wmsg : u32, addr : windows_core::PCSTR, len : i32, r#type : i32, buf : windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetHostByAddr(hwnd.param().abi(), core::mem::transmute(wmsg), core::mem::transmute(addr.as_ptr()), addr.len().try_into().unwrap(), core::mem::transmute(r#type), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); + let result__ = WSAAsyncGetHostByAddr(core::mem::transmute(hwnd), core::mem::transmute(wmsg), core::mem::transmute(addr.as_ptr()), addr.len().try_into().unwrap(), core::mem::transmute(r#type), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn WSAAsyncGetHostByName(hwnd: P0, wmsg: u32, name: P2, buf: &mut [u8]) -> windows_core::Result +pub unsafe fn WSAAsyncGetHostByName(hwnd: super::super::Foundation::HWND, wmsg: u32, name: P2, buf: &mut [u8]) -> windows_core::Result where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetHostByName(hwnd : super::super::Foundation:: HWND, wmsg : u32, name : windows_core::PCSTR, buf : windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetHostByName(hwnd.param().abi(), core::mem::transmute(wmsg), name.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); + let result__ = WSAAsyncGetHostByName(core::mem::transmute(hwnd), core::mem::transmute(wmsg), name.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn WSAAsyncGetProtoByName(hwnd: P0, wmsg: u32, name: P2, buf: &mut [u8]) -> windows_core::Result +pub unsafe fn WSAAsyncGetProtoByName(hwnd: super::super::Foundation::HWND, wmsg: u32, name: P2, buf: &mut [u8]) -> windows_core::Result where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetProtoByName(hwnd : super::super::Foundation:: HWND, wmsg : u32, name : windows_core::PCSTR, buf : windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetProtoByName(hwnd.param().abi(), core::mem::transmute(wmsg), name.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); + let result__ = WSAAsyncGetProtoByName(core::mem::transmute(hwnd), core::mem::transmute(wmsg), name.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn WSAAsyncGetProtoByNumber(hwnd: P0, wmsg: u32, number: i32, buf: &mut [u8]) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WSAAsyncGetProtoByNumber(hwnd: super::super::Foundation::HWND, wmsg: u32, number: i32, buf: &mut [u8]) -> windows_core::Result { windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetProtoByNumber(hwnd : super::super::Foundation:: HWND, wmsg : u32, number : i32, buf : windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetProtoByNumber(hwnd.param().abi(), core::mem::transmute(wmsg), core::mem::transmute(number), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); + let result__ = WSAAsyncGetProtoByNumber(core::mem::transmute(hwnd), core::mem::transmute(wmsg), core::mem::transmute(number), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn WSAAsyncGetServByName(hwnd: P0, wmsg: u32, name: P2, proto: P3, buf: &mut [u8]) -> windows_core::Result +pub unsafe fn WSAAsyncGetServByName(hwnd: super::super::Foundation::HWND, wmsg: u32, name: P2, proto: P3, buf: &mut [u8]) -> windows_core::Result where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetServByName(hwnd : super::super::Foundation:: HWND, wmsg : u32, name : windows_core::PCSTR, proto : windows_core::PCSTR, buf : windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetServByName(hwnd.param().abi(), core::mem::transmute(wmsg), name.param().abi(), proto.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); + let result__ = WSAAsyncGetServByName(core::mem::transmute(hwnd), core::mem::transmute(wmsg), name.param().abi(), proto.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn WSAAsyncGetServByPort(hwnd: P0, wmsg: u32, port: i32, proto: P3, buf: &mut [u8]) -> windows_core::Result +pub unsafe fn WSAAsyncGetServByPort(hwnd: super::super::Foundation::HWND, wmsg: u32, port: i32, proto: P3, buf: &mut [u8]) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetServByPort(hwnd : super::super::Foundation:: HWND, wmsg : u32, port : i32, proto : windows_core::PCSTR, buf : windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetServByPort(hwnd.param().abi(), core::mem::transmute(wmsg), core::mem::transmute(port), proto.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); + let result__ = WSAAsyncGetServByPort(core::mem::transmute(hwnd), core::mem::transmute(wmsg), core::mem::transmute(port), proto.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn WSAAsyncSelect(s: P0, hwnd: P1, wmsg: u32, levent: i32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn WSAAsyncSelect(s: SOCKET, hwnd: super::super::Foundation::HWND, wmsg: u32, levent: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncSelect(s : SOCKET, hwnd : super::super::Foundation:: HWND, wmsg : u32, levent : i32) -> i32); - WSAAsyncSelect(s.param().abi(), hwnd.param().abi(), core::mem::transmute(wmsg), core::mem::transmute(levent)) + WSAAsyncSelect(core::mem::transmute(s), core::mem::transmute(hwnd), core::mem::transmute(wmsg), core::mem::transmute(levent)) } #[inline] -pub unsafe fn WSACancelAsyncRequest(hasynctaskhandle: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSACancelAsyncRequest(hasynctaskhandle: super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSACancelAsyncRequest(hasynctaskhandle : super::super::Foundation:: HANDLE) -> i32); - WSACancelAsyncRequest(hasynctaskhandle.param().abi()) + WSACancelAsyncRequest(core::mem::transmute(hasynctaskhandle)) } #[inline] pub unsafe fn WSACancelBlockingCall() -> i32 { @@ -510,51 +495,62 @@ pub unsafe fn WSACleanup() -> i32 { WSACleanup() } #[inline] -pub unsafe fn WSACloseEvent(hevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WSACloseEvent(hevent: WSAEVENT) -> windows_core::Result<()> { windows_targets::link!("ws2_32.dll" "system" fn WSACloseEvent(hevent : WSAEVENT) -> super::super::Foundation:: BOOL); - WSACloseEvent(hevent.param().abi()).ok() + WSACloseEvent(core::mem::transmute(hevent)).ok() } #[inline] -pub unsafe fn WSAConnect(s: P0, name: *const SOCKADDR, namelen: i32, lpcallerdata: Option<*const WSABUF>, lpcalleedata: Option<*mut WSABUF>, lpsqos: Option<*const QOS>, lpgqos: Option<*const QOS>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSAConnect(s: SOCKET, name: *const SOCKADDR, namelen: i32, lpcallerdata: Option<*const WSABUF>, lpcalleedata: Option<*mut WSABUF>, lpsqos: Option<*const QOS>, lpgqos: Option<*const QOS>) -> i32 { 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(), core::mem::transmute(name), core::mem::transmute(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()))) + WSAConnect(core::mem::transmute(s), core::mem::transmute(name), core::mem::transmute(namelen), core::mem::transmute(lpcallerdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcalleedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsqos.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpgqos.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSAConnectByList(s: P0, socketaddress: *const SOCKET_ADDRESS_LIST, localaddresslength: Option<*mut u32>, localaddress: Option<*mut SOCKADDR>, remoteaddresslength: Option<*mut u32>, remoteaddress: Option<*mut SOCKADDR>, timeout: Option<*const TIMEVAL>, reserved: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WSAConnectByList(s: SOCKET, socketaddress: *const SOCKET_ADDRESS_LIST, localaddresslength: Option<*mut u32>, localaddress: Option<*mut SOCKADDR>, remoteaddresslength: Option<*mut u32>, remoteaddress: Option<*mut SOCKADDR>, timeout: Option<*const TIMEVAL>, reserved: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(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() + WSAConnectByList(core::mem::transmute(s), core::mem::transmute(socketaddress), core::mem::transmute(localaddresslength.unwrap_or(core::mem::zeroed())), core::mem::transmute(localaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(remoteaddresslength.unwrap_or(core::mem::zeroed())), core::mem::transmute(remoteaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSAConnectByNameA(s: P0, nodename: P1, servicename: P2, localaddresslength: Option<*mut u32>, localaddress: Option<*mut SOCKADDR>, remoteaddresslength: Option<*mut u32>, remoteaddress: Option<*mut SOCKADDR>, timeout: Option<*const TIMEVAL>, reserved: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> +pub unsafe fn WSAConnectByNameA(s: SOCKET, nodename: P1, servicename: P2, localaddresslength: Option<*mut u32>, localaddress: Option<*mut SOCKADDR>, remoteaddresslength: Option<*mut u32>, remoteaddress: Option<*mut SOCKADDR>, timeout: Option<*const TIMEVAL>, reserved: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(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() + WSAConnectByNameA( + core::mem::transmute(s), + nodename.param().abi(), + servicename.param().abi(), + core::mem::transmute(localaddresslength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(localaddress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(remoteaddresslength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(remoteaddress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), + ) + .ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSAConnectByNameW(s: P0, nodename: P1, servicename: P2, localaddresslength: Option<*mut u32>, localaddress: Option<*mut SOCKADDR>, remoteaddresslength: Option<*mut u32>, remoteaddress: Option<*mut SOCKADDR>, timeout: Option<*const TIMEVAL>, reserved: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> +pub unsafe fn WSAConnectByNameW(s: SOCKET, nodename: P1, servicename: P2, localaddresslength: Option<*mut u32>, localaddress: Option<*mut SOCKADDR>, remoteaddresslength: Option<*mut u32>, remoteaddress: Option<*mut SOCKADDR>, timeout: Option<*const TIMEVAL>, reserved: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(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() + WSAConnectByNameW( + core::mem::transmute(s), + nodename.param().abi(), + servicename.param().abi(), + core::mem::transmute(localaddresslength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(localaddress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(remoteaddresslength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(remoteaddress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), + core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), + ) + .ok() } #[inline] pub unsafe fn WSACreateEvent() -> windows_core::Result { @@ -564,28 +560,19 @@ pub unsafe fn WSACreateEvent() -> windows_core::Result { } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSADeleteSocketPeerTargetName(socket: P0, peeraddr: *const SOCKADDR, peeraddrlen: u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, completionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSADeleteSocketPeerTargetName(socket: SOCKET, peeraddr: *const SOCKADDR, peeraddrlen: u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, completionroutine: Option) -> i32 { 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(), core::mem::transmute(peeraddr), core::mem::transmute(peeraddrlen), core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine)) + WSADeleteSocketPeerTargetName(core::mem::transmute(socket), core::mem::transmute(peeraddr), core::mem::transmute(peeraddrlen), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WSADuplicateSocketA(s: P0, dwprocessid: u32, lpprotocolinfo: *mut WSAPROTOCOL_INFOA) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSADuplicateSocketA(s: SOCKET, dwprocessid: u32, lpprotocolinfo: *mut WSAPROTOCOL_INFOA) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSADuplicateSocketA(s : SOCKET, dwprocessid : u32, lpprotocolinfo : *mut WSAPROTOCOL_INFOA) -> i32); - WSADuplicateSocketA(s.param().abi(), core::mem::transmute(dwprocessid), core::mem::transmute(lpprotocolinfo)) + WSADuplicateSocketA(core::mem::transmute(s), core::mem::transmute(dwprocessid), core::mem::transmute(lpprotocolinfo)) } #[inline] -pub unsafe fn WSADuplicateSocketW(s: P0, dwprocessid: u32, lpprotocolinfo: *mut WSAPROTOCOL_INFOW) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSADuplicateSocketW(s: SOCKET, dwprocessid: u32, lpprotocolinfo: *mut WSAPROTOCOL_INFOW) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSADuplicateSocketW(s : SOCKET, dwprocessid : u32, lpprotocolinfo : *mut WSAPROTOCOL_INFOW) -> i32); - WSADuplicateSocketW(s.param().abi(), core::mem::transmute(dwprocessid), core::mem::transmute(lpprotocolinfo)) + WSADuplicateSocketW(core::mem::transmute(s), core::mem::transmute(dwprocessid), core::mem::transmute(lpprotocolinfo)) } #[inline] pub unsafe fn WSAEnumNameSpaceProvidersA(lpdwbufferlength: *mut u32, lpnspbuffer: *mut WSANAMESPACE_INFOA) -> i32 { @@ -610,32 +597,24 @@ pub unsafe fn WSAEnumNameSpaceProvidersW(lpdwbufferlength: *mut u32, lpnspbuffer WSAEnumNameSpaceProvidersW(core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpnspbuffer)) } #[inline] -pub unsafe fn WSAEnumNetworkEvents(s: P0, heventobject: P1, lpnetworkevents: *mut WSANETWORKEVENTS) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn WSAEnumNetworkEvents(s: SOCKET, heventobject: WSAEVENT, lpnetworkevents: *mut WSANETWORKEVENTS) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAEnumNetworkEvents(s : SOCKET, heventobject : WSAEVENT, lpnetworkevents : *mut WSANETWORKEVENTS) -> i32); - WSAEnumNetworkEvents(s.param().abi(), heventobject.param().abi(), core::mem::transmute(lpnetworkevents)) + WSAEnumNetworkEvents(core::mem::transmute(s), core::mem::transmute(heventobject), core::mem::transmute(lpnetworkevents)) } #[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(core::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength)) + WSAEnumProtocolsA(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength)) + WSAEnumProtocolsW(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)) } #[inline] -pub unsafe fn WSAEventSelect(s: P0, heventobject: P1, lnetworkevents: i32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn WSAEventSelect(s: SOCKET, heventobject: Option, lnetworkevents: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAEventSelect(s : SOCKET, heventobject : WSAEVENT, lnetworkevents : i32) -> i32); - WSAEventSelect(s.param().abi(), heventobject.param().abi(), core::mem::transmute(lnetworkevents)) + WSAEventSelect(core::mem::transmute(s), core::mem::transmute(heventobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(lnetworkevents)) } #[inline] pub unsafe fn WSAGetLastError() -> WSA_ERROR { @@ -644,21 +623,17 @@ pub unsafe fn WSAGetLastError() -> WSA_ERROR { } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSAGetOverlappedResult(s: P0, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpcbtransfer: *mut u32, fwait: P3, lpdwflags: *mut u32) -> windows_core::Result<()> +pub unsafe fn WSAGetOverlappedResult(s: SOCKET, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpcbtransfer: *mut u32, fwait: P3, lpdwflags: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAGetOverlappedResult(s : SOCKET, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcbtransfer : *mut u32, fwait : super::super::Foundation:: BOOL, lpdwflags : *mut u32) -> super::super::Foundation:: BOOL); - WSAGetOverlappedResult(s.param().abi(), core::mem::transmute(lpoverlapped), core::mem::transmute(lpcbtransfer), fwait.param().abi(), core::mem::transmute(lpdwflags)).ok() + WSAGetOverlappedResult(core::mem::transmute(s), core::mem::transmute(lpoverlapped), core::mem::transmute(lpcbtransfer), fwait.param().abi(), core::mem::transmute(lpdwflags)).ok() } #[inline] -pub unsafe fn WSAGetQOSByName(s: P0, lpqosname: *const WSABUF, lpqos: *mut QOS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WSAGetQOSByName(s: SOCKET, lpqosname: *const WSABUF, lpqos: *mut QOS) -> windows_core::Result<()> { windows_targets::link!("ws2_32.dll" "system" fn WSAGetQOSByName(s : SOCKET, lpqosname : *const WSABUF, lpqos : *mut QOS) -> super::super::Foundation:: BOOL); - WSAGetQOSByName(s.param().abi(), core::mem::transmute(lpqosname), core::mem::transmute(lpqos)).ok() + WSAGetQOSByName(core::mem::transmute(s), core::mem::transmute(lpqosname), core::mem::transmute(lpqos)).ok() } #[inline] pub unsafe fn WSAGetServiceClassInfoA(lpproviderid: *const windows_core::GUID, lpserviceclassid: *const windows_core::GUID, lpdwbufsize: *mut u32, lpserviceclassinfo: *mut WSASERVICECLASSINFOA) -> i32 { @@ -681,28 +656,19 @@ pub unsafe fn WSAGetServiceClassNameByClassIdW(lpserviceclassid: *const windows_ WSAGetServiceClassNameByClassIdW(core::mem::transmute(lpserviceclassid), core::mem::transmute(lpszserviceclassname), core::mem::transmute(lpdwbufferlength)) } #[inline] -pub unsafe fn WSAHtonl(s: P0, hostlong: u32, lpnetlong: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSAHtonl(s: SOCKET, hostlong: u32, lpnetlong: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAHtonl(s : SOCKET, hostlong : u32, lpnetlong : *mut u32) -> i32); - WSAHtonl(s.param().abi(), core::mem::transmute(hostlong), core::mem::transmute(lpnetlong)) + WSAHtonl(core::mem::transmute(s), core::mem::transmute(hostlong), core::mem::transmute(lpnetlong)) } #[inline] -pub unsafe fn WSAHtons(s: P0, hostshort: u16, lpnetshort: *mut u16) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSAHtons(s: SOCKET, hostshort: u16, lpnetshort: *mut u16) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAHtons(s : SOCKET, hostshort : u16, lpnetshort : *mut u16) -> i32); - WSAHtons(s.param().abi(), core::mem::transmute(hostshort), core::mem::transmute(lpnetshort)) + WSAHtons(core::mem::transmute(s), core::mem::transmute(hostshort), core::mem::transmute(lpnetshort)) } #[inline] -pub unsafe fn WSAImpersonateSocketPeer(socket: P0, peeraddr: Option<*const SOCKADDR>, peeraddrlen: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSAImpersonateSocketPeer(socket: SOCKET, peeraddr: Option<*const SOCKADDR>, peeraddrlen: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(peeraddrlen)) + WSAImpersonateSocketPeer(core::mem::transmute(socket), core::mem::transmute(peeraddr.unwrap_or(core::mem::zeroed())), core::mem::transmute(peeraddrlen)) } #[inline] pub unsafe fn WSAInstallServiceClassA(lpserviceclassinfo: *const WSASERVICECLASSINFOA) -> i32 { @@ -716,12 +682,9 @@ pub unsafe fn WSAInstallServiceClassW(lpserviceclassinfo: *const WSASERVICECLASS } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSAIoctl(s: P0, dwiocontrolcode: u32, lpvinbuffer: Option<*const core::ffi::c_void>, cbinbuffer: u32, lpvoutbuffer: Option<*mut core::ffi::c_void>, cboutbuffer: u32, lpcbbytesreturned: *mut u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSAIoctl(s: SOCKET, dwiocontrolcode: u32, lpvinbuffer: Option<*const core::ffi::c_void>, cbinbuffer: u32, lpvoutbuffer: Option<*mut core::ffi::c_void>, cboutbuffer: u32, lpcbbytesreturned: *mut u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> i32 { 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(), core::mem::transmute(dwiocontrolcode), core::mem::transmute(lpvinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffer), core::mem::transmute(lpvoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffer), core::mem::transmute(lpcbbytesreturned), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcompletionroutine)) + WSAIoctl(core::mem::transmute(s), core::mem::transmute(dwiocontrolcode), core::mem::transmute(lpvinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffer), core::mem::transmute(lpvoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffer), core::mem::transmute(lpcbbytesreturned), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WSAIsBlocking() -> windows_core::Result<()> { @@ -729,12 +692,9 @@ pub unsafe fn WSAIsBlocking() -> windows_core::Result<()> { WSAIsBlocking().ok() } #[inline] -pub unsafe fn WSAJoinLeaf(s: P0, name: *const SOCKADDR, namelen: i32, lpcallerdata: Option<*const WSABUF>, lpcalleedata: Option<*mut WSABUF>, lpsqos: Option<*const QOS>, lpgqos: Option<*const QOS>, dwflags: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WSAJoinLeaf(s: SOCKET, name: *const SOCKADDR, namelen: i32, lpcallerdata: Option<*const WSABUF>, lpcalleedata: Option<*mut WSABUF>, lpsqos: Option<*const QOS>, lpgqos: Option<*const QOS>, dwflags: u32) -> windows_core::Result { 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(), core::mem::transmute(name), core::mem::transmute(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())), core::mem::transmute(dwflags)); + let result__ = WSAJoinLeaf(core::mem::transmute(s), core::mem::transmute(name), core::mem::transmute(namelen), core::mem::transmute(lpcallerdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcalleedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsqos.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpgqos.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Com")] @@ -750,55 +710,37 @@ pub unsafe fn WSALookupServiceBeginW(lpqsrestrictions: *const WSAQUERYSETW, dwco WSALookupServiceBeginW(core::mem::transmute(lpqsrestrictions), core::mem::transmute(dwcontrolflags), core::mem::transmute(lphlookup)) } #[inline] -pub unsafe fn WSALookupServiceEnd(hlookup: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSALookupServiceEnd(hlookup: super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSALookupServiceEnd(hlookup : super::super::Foundation:: HANDLE) -> i32); - WSALookupServiceEnd(hlookup.param().abi()) + WSALookupServiceEnd(core::mem::transmute(hlookup)) } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn WSALookupServiceNextA(hlookup: P0, dwcontrolflags: u32, lpdwbufferlength: *mut u32, lpqsresults: *mut WSAQUERYSETA) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSALookupServiceNextA(hlookup: super::super::Foundation::HANDLE, dwcontrolflags: u32, lpdwbufferlength: *mut u32, lpqsresults: *mut WSAQUERYSETA) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSALookupServiceNextA(hlookup : super::super::Foundation:: HANDLE, dwcontrolflags : u32, lpdwbufferlength : *mut u32, lpqsresults : *mut WSAQUERYSETA) -> i32); - WSALookupServiceNextA(hlookup.param().abi(), core::mem::transmute(dwcontrolflags), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpqsresults)) + WSALookupServiceNextA(core::mem::transmute(hlookup), core::mem::transmute(dwcontrolflags), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpqsresults)) } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn WSALookupServiceNextW(hlookup: P0, dwcontrolflags: u32, lpdwbufferlength: *mut u32, lpqsresults: Option<*mut WSAQUERYSETW>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSALookupServiceNextW(hlookup: super::super::Foundation::HANDLE, dwcontrolflags: u32, lpdwbufferlength: *mut u32, lpqsresults: Option<*mut WSAQUERYSETW>) -> i32 { 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(), core::mem::transmute(dwcontrolflags), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpqsresults.unwrap_or(core::ptr::null_mut()))) + WSALookupServiceNextW(core::mem::transmute(hlookup), core::mem::transmute(dwcontrolflags), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lpqsresults.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSANSPIoctl(hlookup: P0, dwcontrolcode: u32, lpvinbuffer: Option<*const core::ffi::c_void>, cbinbuffer: u32, lpvoutbuffer: Option<*mut core::ffi::c_void>, cboutbuffer: u32, lpcbbytesreturned: *mut u32, lpcompletion: Option<*const WSACOMPLETION>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSANSPIoctl(hlookup: super::super::Foundation::HANDLE, dwcontrolcode: u32, lpvinbuffer: Option<*const core::ffi::c_void>, cbinbuffer: u32, lpvoutbuffer: Option<*mut core::ffi::c_void>, cboutbuffer: u32, lpcbbytesreturned: *mut u32, lpcompletion: Option<*const WSACOMPLETION>) -> i32 { 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(), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpvinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbinbuffer), core::mem::transmute(lpvoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboutbuffer), core::mem::transmute(lpcbbytesreturned), core::mem::transmute(lpcompletion.unwrap_or(core::ptr::null()))) + WSANSPIoctl(core::mem::transmute(hlookup), core::mem::transmute(dwcontrolcode), core::mem::transmute(lpvinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinbuffer), core::mem::transmute(lpvoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuffer), core::mem::transmute(lpcbbytesreturned), core::mem::transmute(lpcompletion.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WSANtohl(s: P0, netlong: u32, lphostlong: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSANtohl(s: SOCKET, netlong: u32, lphostlong: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSANtohl(s : SOCKET, netlong : u32, lphostlong : *mut u32) -> i32); - WSANtohl(s.param().abi(), core::mem::transmute(netlong), core::mem::transmute(lphostlong)) + WSANtohl(core::mem::transmute(s), core::mem::transmute(netlong), core::mem::transmute(lphostlong)) } #[inline] -pub unsafe fn WSANtohs(s: P0, netshort: u16, lphostshort: *mut u16) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSANtohs(s: SOCKET, netshort: u16, lphostshort: *mut u16) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSANtohs(s : SOCKET, netshort : u16, lphostshort : *mut u16) -> i32); - WSANtohs(s.param().abi(), core::mem::transmute(netshort), core::mem::transmute(lphostshort)) + WSANtohs(core::mem::transmute(s), core::mem::transmute(netshort), core::mem::transmute(lphostshort)) } #[inline] pub unsafe fn WSAPoll(fdarray: *mut WSAPOLLFD, fds: u32, timeout: i32) -> i32 { @@ -806,61 +748,43 @@ pub unsafe fn WSAPoll(fdarray: *mut WSAPOLLFD, fds: u32, timeout: i32) -> i32 { WSAPoll(core::mem::transmute(fdarray), core::mem::transmute(fds), core::mem::transmute(timeout)) } #[inline] -pub unsafe fn WSAProviderCompleteAsyncCall(hasynccall: P0, iretcode: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSAProviderCompleteAsyncCall(hasynccall: super::super::Foundation::HANDLE, iretcode: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAProviderCompleteAsyncCall(hasynccall : super::super::Foundation:: HANDLE, iretcode : i32) -> i32); - WSAProviderCompleteAsyncCall(hasynccall.param().abi(), core::mem::transmute(iretcode)) + WSAProviderCompleteAsyncCall(core::mem::transmute(hasynccall), core::mem::transmute(iretcode)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSAProviderConfigChange(lpnotificationhandle: *mut super::super::Foundation::HANDLE, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 { +pub unsafe fn WSAProviderConfigChange(lpnotificationhandle: *mut super::super::Foundation::HANDLE, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> 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(core::mem::transmute(lpnotificationhandle), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcompletionroutine)) + WSAProviderConfigChange(core::mem::transmute(lpnotificationhandle), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSAQuerySocketSecurity(socket: P0, securityquerytemplate: Option<*const SOCKET_SECURITY_QUERY_TEMPLATE>, securityquerytemplatelen: u32, securityqueryinfo: Option<*mut SOCKET_SECURITY_QUERY_INFO>, securityqueryinfolen: *mut u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, completionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSAQuerySocketSecurity(socket: SOCKET, securityquerytemplate: Option<*const SOCKET_SECURITY_QUERY_TEMPLATE>, securityquerytemplatelen: u32, securityqueryinfo: Option<*mut SOCKET_SECURITY_QUERY_INFO>, securityqueryinfolen: *mut u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, completionroutine: Option) -> i32 { 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(core::ptr::null())), core::mem::transmute(securityquerytemplatelen), core::mem::transmute(securityqueryinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(securityqueryinfolen), core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine)) + WSAQuerySocketSecurity(core::mem::transmute(socket), core::mem::transmute(securityquerytemplate.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityquerytemplatelen), core::mem::transmute(securityqueryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(securityqueryinfolen), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSARecv(s: P0, lpbuffers: &[WSABUF], lpnumberofbytesrecvd: Option<*mut u32>, lpflags: *mut u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSARecv(s: SOCKET, lpbuffers: &[WSABUF], lpnumberofbytesrecvd: Option<*mut u32>, lpflags: *mut u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(lpflags), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcompletionroutine)) + WSARecv(core::mem::transmute(s), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpflags), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WSARecvDisconnect(s: P0, lpinbounddisconnectdata: Option<*const WSABUF>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSARecvDisconnect(s: SOCKET, lpinbounddisconnectdata: Option<*const WSABUF>) -> i32 { 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(core::ptr::null()))) + WSARecvDisconnect(core::mem::transmute(s), core::mem::transmute(lpinbounddisconnectdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WSARecvEx(s: P0, buf: &mut [u8], flags: *mut i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSARecvEx(s: SOCKET, buf: &mut [u8], flags: *mut i32) -> i32 { windows_targets::link!("mswsock.dll" "system" fn WSARecvEx(s : SOCKET, buf : windows_core::PSTR, len : i32, flags : *mut i32) -> i32); - WSARecvEx(s.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags)) + WSARecvEx(core::mem::transmute(s), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSARecvFrom(s: P0, lpbuffers: &[WSABUF], lpnumberofbytesrecvd: Option<*mut u32>, lpflags: *mut u32, lpfrom: Option<*mut SOCKADDR>, lpfromlen: Option<*mut i32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSARecvFrom(s: SOCKET, lpbuffers: &[WSABUF], lpnumberofbytesrecvd: Option<*mut u32>, lpflags: *mut u32, lpfrom: Option<*mut SOCKADDR>, lpfromlen: Option<*mut i32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(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())), core::mem::transmute(lpcompletionroutine)) + WSARecvFrom(core::mem::transmute(s), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpflags), core::mem::transmute(lpfrom.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfromlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WSARemoveServiceClass(lpserviceclassid: *const windows_core::GUID) -> i32 { @@ -868,12 +792,9 @@ pub unsafe fn WSARemoveServiceClass(lpserviceclassid: *const windows_core::GUID) WSARemoveServiceClass(core::mem::transmute(lpserviceclassid)) } #[inline] -pub unsafe fn WSAResetEvent(hevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WSAResetEvent(hevent: WSAEVENT) -> windows_core::Result<()> { windows_targets::link!("ws2_32.dll" "system" fn WSAResetEvent(hevent : WSAEVENT) -> super::super::Foundation:: BOOL); - WSAResetEvent(hevent.param().abi()).ok() + WSAResetEvent(core::mem::transmute(hevent)).ok() } #[inline] pub unsafe fn WSARevertImpersonation() -> i32 { @@ -882,38 +803,26 @@ pub unsafe fn WSARevertImpersonation() -> i32 { } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSASend(s: P0, lpbuffers: &[WSABUF], lpnumberofbytessent: Option<*mut u32>, dwflags: u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSASend(s: SOCKET, lpbuffers: &[WSABUF], lpnumberofbytessent: Option<*mut u32>, dwflags: u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcompletionroutine)) + WSASend(core::mem::transmute(s), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytessent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WSASendDisconnect(s: P0, lpoutbounddisconnectdata: Option<*const WSABUF>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSASendDisconnect(s: SOCKET, lpoutbounddisconnectdata: Option<*const WSABUF>) -> i32 { 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(core::ptr::null()))) + WSASendDisconnect(core::mem::transmute(s), core::mem::transmute(lpoutbounddisconnectdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSASendMsg(handle: P0, lpmsg: *const WSAMSG, dwflags: u32, lpnumberofbytessent: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSASendMsg(handle: SOCKET, lpmsg: *const WSAMSG, dwflags: u32, lpnumberofbytessent: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> i32 { 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(), core::mem::transmute(lpmsg), core::mem::transmute(dwflags), core::mem::transmute(lpnumberofbytessent.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcompletionroutine)) + WSASendMsg(core::mem::transmute(handle), core::mem::transmute(lpmsg), core::mem::transmute(dwflags), core::mem::transmute(lpnumberofbytessent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSASendTo(s: P0, lpbuffers: &[WSABUF], lpnumberofbytessent: Option<*mut u32>, dwflags: u32, lpto: Option<*const SOCKADDR>, itolen: i32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSASendTo(s: SOCKET, lpbuffers: &[WSABUF], lpnumberofbytessent: Option<*mut u32>, dwflags: u32, lpto: Option<*const SOCKADDR>, itolen: i32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(lpto.unwrap_or(core::ptr::null())), core::mem::transmute(itolen), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcompletionroutine)) + WSASendTo(core::mem::transmute(s), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytessent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(lpto.unwrap_or(core::mem::zeroed())), core::mem::transmute(itolen), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WSASetBlockingHook(lpblockfunc: super::super::Foundation::FARPROC) -> super::super::Foundation::FARPROC { @@ -921,12 +830,9 @@ pub unsafe fn WSASetBlockingHook(lpblockfunc: super::super::Foundation::FARPROC) WSASetBlockingHook(core::mem::transmute(lpblockfunc)) } #[inline] -pub unsafe fn WSASetEvent(hevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WSASetEvent(hevent: WSAEVENT) -> windows_core::Result<()> { windows_targets::link!("ws2_32.dll" "system" fn WSASetEvent(hevent : WSAEVENT) -> super::super::Foundation:: BOOL); - WSASetEvent(hevent.param().abi()).ok() + WSASetEvent(core::mem::transmute(hevent)).ok() } #[inline] pub unsafe fn WSASetLastError(ierror: i32) { @@ -947,32 +853,26 @@ pub unsafe fn WSASetServiceW(lpqsreginfo: *const WSAQUERYSETW, essoperation: WSA } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSASetSocketPeerTargetName(socket: P0, peertargetname: *const SOCKET_PEER_TARGET_NAME, peertargetnamelen: u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, completionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSASetSocketPeerTargetName(socket: SOCKET, peertargetname: *const SOCKET_PEER_TARGET_NAME, peertargetnamelen: u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, completionroutine: Option) -> i32 { 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(), core::mem::transmute(peertargetname), core::mem::transmute(peertargetnamelen), core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine)) + WSASetSocketPeerTargetName(core::mem::transmute(socket), core::mem::transmute(peertargetname), core::mem::transmute(peertargetnamelen), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSASetSocketSecurity(socket: P0, securitysettings: Option<*const SOCKET_SECURITY_SETTINGS>, securitysettingslen: u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, completionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSASetSocketSecurity(socket: SOCKET, securitysettings: Option<*const SOCKET_SECURITY_SETTINGS>, securitysettingslen: u32, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, completionroutine: Option) -> i32 { 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(core::ptr::null())), core::mem::transmute(securitysettingslen), core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), core::mem::transmute(completionroutine)) + WSASetSocketSecurity(core::mem::transmute(socket), core::mem::transmute(securitysettings.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitysettingslen), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionroutine.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(af), core::mem::transmute(r#type), core::mem::transmute(protocol), core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), core::mem::transmute(g), core::mem::transmute(dwflags)); + let result__ = WSASocketA(core::mem::transmute(af), core::mem::transmute(r#type), core::mem::transmute(protocol), core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(g), core::mem::transmute(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(core::mem::transmute(af), core::mem::transmute(r#type), core::mem::transmute(protocol), core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), core::mem::transmute(g), core::mem::transmute(dwflags)); + let result__ = WSASocketW(core::mem::transmute(af), core::mem::transmute(r#type), core::mem::transmute(protocol), core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(g), core::mem::transmute(dwflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -986,7 +886,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(), core::mem::transmute(addressfamily), core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpaddress), core::mem::transmute(lpaddresslength)) + WSAStringToAddressA(addressstring.param().abi(), core::mem::transmute(addressfamily), core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpaddress), core::mem::transmute(lpaddresslength)) } #[inline] pub unsafe fn WSAStringToAddressW(addressstring: P0, addressfamily: i32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOW>, lpaddress: *mut SOCKADDR, lpaddresslength: *mut i32) -> i32 @@ -994,7 +894,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(), core::mem::transmute(addressfamily), core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpaddress), core::mem::transmute(lpaddresslength)) + WSAStringToAddressW(addressstring.param().abi(), core::mem::transmute(addressfamily), core::mem::transmute(lpprotocolinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpaddress), core::mem::transmute(lpaddresslength)) } #[inline] pub unsafe fn WSAUnadvertiseProvider(puuidproviderid: *const windows_core::GUID) -> i32 { @@ -1059,13 +959,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(core::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lperrno)) + WSCEnumProtocols(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lperrno)) + WSCEnumProtocols32(core::mem::transmute(lpiprotocols.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprotocolbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(lperrno)) } #[inline] pub unsafe fn WSCGetApplicationCategory(path: &[u16], extra: Option<&[u16]>, ppermittedlspcategories: *mut u32, lperrno: *mut i32) -> i32 { @@ -1160,12 +1060,12 @@ where P3: 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(core::mem::transmute(lpproviderid), lpszproviderdllpath.param().abi(), lpszproviderdllpath32.param().abi(), lpszlspname.param().abi(), core::mem::transmute(dwserviceflags), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lpdwcatalogentryid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lperrno)) + WSCInstallProviderAndChains64_32(core::mem::transmute(lpproviderid), lpszproviderdllpath.param().abi(), lpszproviderdllpath32.param().abi(), lpszlspname.param().abi(), core::mem::transmute(dwserviceflags), core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lpdwcatalogentryid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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()), core::mem::transmute(permittedlspcategories), core::mem::transmute(pprevpermlspcat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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()), core::mem::transmute(permittedlspcategories), core::mem::transmute(pprevpermlspcat.unwrap_or(core::mem::zeroed())), core::mem::transmute(lperrno)) } #[inline] pub unsafe fn WSCSetProviderInfo(lpproviderid: *const windows_core::GUID, infotype: WSC_PROVIDER_INFO_TYPE, info: &[u8], flags: u32, lperrno: *mut i32) -> i32 { @@ -1229,50 +1129,35 @@ pub unsafe fn WSCWriteProviderOrder32(lpwdcatalogentryid: *mut u32, dwnumberofen WSCWriteProviderOrder32(core::mem::transmute(lpwdcatalogentryid), core::mem::transmute(dwnumberofentries)) } #[inline] -pub unsafe fn __WSAFDIsSet(fd: P0, param1: *mut FD_SET) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn __WSAFDIsSet(fd: SOCKET, param1: *mut FD_SET) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn __WSAFDIsSet(fd : SOCKET, param1 : *mut FD_SET) -> i32); - __WSAFDIsSet(fd.param().abi(), core::mem::transmute(param1)) + __WSAFDIsSet(core::mem::transmute(fd), core::mem::transmute(param1)) } #[inline] -pub unsafe fn accept(s: P0, addr: Option<*mut SOCKADDR>, addrlen: Option<*mut i32>) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn accept(s: SOCKET, addr: Option<*mut SOCKADDR>, addrlen: Option<*mut i32>) -> windows_core::Result { 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(core::ptr::null_mut())), core::mem::transmute(addrlen.unwrap_or(core::ptr::null_mut()))); + let result__ = accept(core::mem::transmute(s), core::mem::transmute(addr.unwrap_or(core::mem::zeroed())), core::mem::transmute(addrlen.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn bind(s: P0, name: *const SOCKADDR, namelen: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn bind(s: SOCKET, name: *const SOCKADDR, namelen: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn bind(s : SOCKET, name : *const SOCKADDR, namelen : i32) -> i32); - bind(s.param().abi(), core::mem::transmute(name), core::mem::transmute(namelen)) + bind(core::mem::transmute(s), core::mem::transmute(name), core::mem::transmute(namelen)) } #[inline] -pub unsafe fn closesocket(s: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn closesocket(s: SOCKET) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn closesocket(s : SOCKET) -> i32); - closesocket(s.param().abi()) + closesocket(core::mem::transmute(s)) } #[inline] -pub unsafe fn connect(s: P0, name: *const SOCKADDR, namelen: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn connect(s: SOCKET, name: *const SOCKADDR, namelen: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn connect(s : SOCKET, name : *const SOCKADDR, namelen : i32) -> i32); - connect(s.param().abi(), core::mem::transmute(name), core::mem::transmute(namelen)) + connect(core::mem::transmute(s), core::mem::transmute(name), core::mem::transmute(namelen)) } #[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(core::ptr::null()))) + freeaddrinfo(core::mem::transmute(paddrinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn getaddrinfo(pnodename: P0, pservicename: P1, phints: Option<*const ADDRINFOA>, ppresult: *mut *mut ADDRINFOA) -> i32 @@ -1281,7 +1166,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(core::ptr::null())), core::mem::transmute(ppresult)) + getaddrinfo(pnodename.param().abi(), pservicename.param().abi(), core::mem::transmute(phints.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppresult)) } #[inline] pub unsafe fn gethostbyaddr(addr: &[u8], r#type: i32) -> *mut HOSTENT { @@ -1302,20 +1187,14 @@ pub unsafe fn gethostname(name: &mut [u8]) -> i32 { gethostname(core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap()) } #[inline] -pub unsafe fn getnameinfo(psockaddr: *const SOCKADDR, sockaddrlength: P1, pnodebuffer: Option<&mut [u8]>, pservicebuffer: Option<&mut [u8]>, flags: i32) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn getnameinfo(psockaddr: *const SOCKADDR, sockaddrlength: socklen_t, pnodebuffer: Option<&mut [u8]>, pservicebuffer: Option<&mut [u8]>, flags: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn getnameinfo(psockaddr : *const SOCKADDR, sockaddrlength : socklen_t, pnodebuffer : windows_core::PSTR, nodebuffersize : u32, pservicebuffer : windows_core::PSTR, servicebuffersize : u32, flags : i32) -> i32); - getnameinfo(core::mem::transmute(psockaddr), sockaddrlength.param().abi(), core::mem::transmute(pnodebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pnodebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pservicebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pservicebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) + getnameinfo(core::mem::transmute(psockaddr), core::mem::transmute(sockaddrlength), core::mem::transmute(pnodebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pnodebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pservicebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pservicebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) } #[inline] -pub unsafe fn getpeername(s: P0, name: *mut SOCKADDR, namelen: *mut i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn getpeername(s: SOCKET, name: *mut SOCKADDR, namelen: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn getpeername(s : SOCKET, name : *mut SOCKADDR, namelen : *mut i32) -> i32); - getpeername(s.param().abi(), core::mem::transmute(name), core::mem::transmute(namelen)) + getpeername(core::mem::transmute(s), core::mem::transmute(name), core::mem::transmute(namelen)) } #[inline] pub unsafe fn getprotobyname(name: P0) -> *mut PROTOENT @@ -1348,20 +1227,14 @@ where getservbyport(core::mem::transmute(port), proto.param().abi()) } #[inline] -pub unsafe fn getsockname(s: P0, name: *mut SOCKADDR, namelen: *mut i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn getsockname(s: SOCKET, name: *mut SOCKADDR, namelen: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn getsockname(s : SOCKET, name : *mut SOCKADDR, namelen : *mut i32) -> i32); - getsockname(s.param().abi(), core::mem::transmute(name), core::mem::transmute(namelen)) + getsockname(core::mem::transmute(s), core::mem::transmute(name), core::mem::transmute(namelen)) } #[inline] -pub unsafe fn getsockopt(s: P0, level: i32, optname: i32, optval: windows_core::PSTR, optlen: *mut i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn getsockopt(s: SOCKET, level: i32, optname: i32, optval: windows_core::PSTR, optlen: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn getsockopt(s : SOCKET, level : i32, optname : i32, optval : windows_core::PSTR, optlen : *mut i32) -> i32); - getsockopt(s.param().abi(), core::mem::transmute(level), core::mem::transmute(optname), core::mem::transmute(optval), core::mem::transmute(optlen)) + getsockopt(core::mem::transmute(s), core::mem::transmute(level), core::mem::transmute(optname), core::mem::transmute(optval), core::mem::transmute(optlen)) } #[inline] pub unsafe fn htonl(hostlong: u32) -> u32 { @@ -1400,20 +1273,14 @@ where inet_pton(core::mem::transmute(family), pszaddrstring.param().abi(), core::mem::transmute(paddrbuf)) } #[inline] -pub unsafe fn ioctlsocket(s: P0, cmd: i32, argp: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ioctlsocket(s: SOCKET, cmd: i32, argp: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn ioctlsocket(s : SOCKET, cmd : i32, argp : *mut u32) -> i32); - ioctlsocket(s.param().abi(), core::mem::transmute(cmd), core::mem::transmute(argp)) + ioctlsocket(core::mem::transmute(s), core::mem::transmute(cmd), core::mem::transmute(argp)) } #[inline] -pub unsafe fn listen(s: P0, backlog: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn listen(s: SOCKET, backlog: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn listen(s : SOCKET, backlog : i32) -> i32); - listen(s.param().abi(), core::mem::transmute(backlog)) + listen(core::mem::transmute(s), core::mem::transmute(backlog)) } #[inline] pub unsafe fn ntohl(netlong: u32) -> u32 { @@ -1426,57 +1293,39 @@ pub unsafe fn ntohs(netshort: u16) -> u16 { ntohs(core::mem::transmute(netshort)) } #[inline] -pub unsafe fn recv(s: P0, buf: &mut [u8], flags: SEND_RECV_FLAGS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn recv(s: SOCKET, buf: &mut [u8], flags: SEND_RECV_FLAGS) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn recv(s : SOCKET, buf : windows_core::PSTR, len : i32, flags : SEND_RECV_FLAGS) -> i32); - recv(s.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags)) + recv(core::mem::transmute(s), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn recvfrom(s: P0, buf: &mut [u8], flags: i32, from: Option<*mut SOCKADDR>, fromlen: Option<*mut i32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn recvfrom(s: SOCKET, buf: &mut [u8], flags: i32, from: Option<*mut SOCKADDR>, fromlen: Option<*mut i32>) -> i32 { 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(), core::mem::transmute(flags), core::mem::transmute(from.unwrap_or(core::ptr::null_mut())), core::mem::transmute(fromlen.unwrap_or(core::ptr::null_mut()))) + recvfrom(core::mem::transmute(s), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags), core::mem::transmute(from.unwrap_or(core::mem::zeroed())), core::mem::transmute(fromlen.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(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()))) + select(core::mem::transmute(nfds), core::mem::transmute(readfds.unwrap_or(core::mem::zeroed())), core::mem::transmute(writefds.unwrap_or(core::mem::zeroed())), core::mem::transmute(exceptfds.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn send(s: P0, buf: &[u8], flags: SEND_RECV_FLAGS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn send(s: SOCKET, buf: &[u8], flags: SEND_RECV_FLAGS) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn send(s : SOCKET, buf : windows_core::PCSTR, len : i32, flags : SEND_RECV_FLAGS) -> i32); - send(s.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags)) + send(core::mem::transmute(s), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn sendto(s: P0, buf: &[u8], flags: i32, to: *const SOCKADDR, tolen: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn sendto(s: SOCKET, buf: &[u8], flags: i32, to: *const SOCKADDR, tolen: i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn sendto(s : SOCKET, buf : windows_core::PCSTR, len : i32, flags : i32, to : *const SOCKADDR, tolen : i32) -> i32); - sendto(s.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags), core::mem::transmute(to), core::mem::transmute(tolen)) + sendto(core::mem::transmute(s), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), core::mem::transmute(flags), core::mem::transmute(to), core::mem::transmute(tolen)) } #[inline] -pub unsafe fn setsockopt(s: P0, level: i32, optname: i32, optval: Option<&[u8]>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn setsockopt(s: SOCKET, level: i32, optname: i32, optval: Option<&[u8]>) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn setsockopt(s : SOCKET, level : i32, optname : i32, optval : windows_core::PCSTR, optlen : i32) -> i32); - setsockopt(s.param().abi(), core::mem::transmute(level), core::mem::transmute(optname), core::mem::transmute(optval.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), optval.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + setsockopt(core::mem::transmute(s), core::mem::transmute(level), core::mem::transmute(optname), core::mem::transmute(optval.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), optval.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn shutdown(s: P0, how: WINSOCK_SHUTDOWN_HOW) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn shutdown(s: SOCKET, how: WINSOCK_SHUTDOWN_HOW) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn shutdown(s : SOCKET, how : WINSOCK_SHUTDOWN_HOW) -> i32); - shutdown(s.param().abi(), core::mem::transmute(how)) + shutdown(core::mem::transmute(s), core::mem::transmute(how)) } #[inline] pub unsafe fn socket(af: i32, r#type: WINSOCK_SOCKET_TYPE, protocol: i32) -> windows_core::Result { 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 91d9991d5a..3e1a3ebc16 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs @@ -1,21 +1,17 @@ #[inline] -pub unsafe fn WebAuthNAuthenticatorGetAssertion(hwnd: P0, pwszrpid: P1, pwebauthnclientdata: *const WEBAUTHN_CLIENT_DATA, pwebauthngetassertionoptions: Option<*const WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS>) -> windows_core::Result<*mut WEBAUTHN_ASSERTION> +pub unsafe fn WebAuthNAuthenticatorGetAssertion(hwnd: super::super::Foundation::HWND, pwszrpid: P1, pwebauthnclientdata: *const WEBAUTHN_CLIENT_DATA, pwebauthngetassertionoptions: Option<*const WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS>) -> windows_core::Result<*mut WEBAUTHN_ASSERTION> where - P0: windows_core::Param, P1: windows_core::Param, { 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(), core::mem::transmute(pwebauthnclientdata), core::mem::transmute(pwebauthngetassertionoptions.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + WebAuthNAuthenticatorGetAssertion(core::mem::transmute(hwnd), pwszrpid.param().abi(), core::mem::transmute(pwebauthnclientdata), core::mem::transmute(pwebauthngetassertionoptions.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(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> -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*const WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS>) -> windows_core::Result<*mut WEBAUTHN_CREDENTIAL_ATTESTATION> { 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(), core::mem::transmute(prpinformation), core::mem::transmute(puserinformation), core::mem::transmute(ppubkeycredparams), core::mem::transmute(pwebauthnclientdata), core::mem::transmute(pwebauthnmakecredentialoptions.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + WebAuthNAuthenticatorMakeCredential(core::mem::transmute(hwnd), core::mem::transmute(prpinformation), core::mem::transmute(puserinformation), core::mem::transmute(ppubkeycredparams), core::mem::transmute(pwebauthnclientdata), core::mem::transmute(pwebauthnmakecredentialoptions.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn WebAuthNCancelCurrentOperation(pcancellationid: *const windows_core::GUID) -> windows_core::Result<()> { @@ -35,7 +31,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(core::ptr::null()))) + WebAuthNFreeCredentialAttestation(core::mem::transmute(pwebauthncredentialattestation.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WebAuthNFreePlatformCredentialList(pcredentialdetailslist: *const WEBAUTHN_CREDENTIAL_DETAILS_LIST) { @@ -78,42 +74,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(core::mem::transmute(serviceproxy), core::mem::transmute(callid), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAbandonCall(core::mem::transmute(serviceproxy), core::mem::transmute(callid), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAbandonMessage(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAbortChannel(core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(listener), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAbortListener(core::mem::transmute(listener), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(servicehost), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAbortServiceHost(core::mem::transmute(servicehost), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(serviceproxy), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAbortServiceProxy(core::mem::transmute(serviceproxy), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(listener), core::mem::transmute(channel), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAcceptChannel(core::mem::transmute(listener), core::mem::transmute(channel), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(headerdescription), core::mem::transmute(writeoption), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(headerattributes), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAddCustomHeader(core::mem::transmute(message), core::mem::transmute(headerdescription), core::mem::transmute(writeoption), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(headerattributes), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsAddErrorString(error: *const WS_ERROR, string: *const WS_STRING) -> windows_core::Result<()> { @@ -123,57 +119,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(core::mem::transmute(message), core::mem::transmute(headername), core::mem::transmute(valuetype), core::mem::transmute(writeoption), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAddMappedHeader(core::mem::transmute(message), core::mem::transmute(headername), core::mem::transmute(valuetype), core::mem::transmute(writeoption), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(address.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAddressMessage(core::mem::transmute(message), core::mem::transmute(address.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(heap), core::mem::transmute(size), core::mem::transmute(ptr), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsAlloc(core::mem::transmute(heap), core::mem::transmute(size), core::mem::transmute(ptr), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(asyncstate), core::mem::transmute(operation), core::mem::transmute(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() + WsAsyncExecute(core::mem::transmute(asyncstate), core::mem::transmute(operation), core::mem::transmute(callbackmodel), core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(serviceproxy), core::mem::transmute(operation), core::mem::transmute(arguments.unwrap_or(core::ptr::null())), core::mem::transmute(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() + WsCall(core::mem::transmute(serviceproxy), core::mem::transmute(operation), core::mem::transmute(arguments.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCheckMustUnderstandHeaders(core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCloseChannel(core::mem::transmute(channel), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(listener), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCloseListener(core::mem::transmute(listener), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(servicehost), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCloseServiceHost(core::mem::transmute(servicehost), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(serviceproxy), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCloseServiceProxy(core::mem::transmute(serviceproxy), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(baseurl), core::mem::transmute(referenceurl), core::mem::transmute(flags), core::mem::transmute(heap), core::mem::transmute(resulturl), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCombineUrl(core::mem::transmute(baseurl), core::mem::transmute(referenceurl), core::mem::transmute(flags), core::mem::transmute(heap), core::mem::transmute(resulturl), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsCopyError(source: *const WS_ERROR, destination: *const WS_ERROR) -> windows_core::Result<()> { @@ -183,17 +179,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(core::mem::transmute(writer), core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCopyNode(core::mem::transmute(writer), core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channeltype), core::mem::transmute(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())), core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCreateChannel(core::mem::transmute(channeltype), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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()), core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCreateChannelForListener(core::mem::transmute(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()), core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsCreateError(properties: Option<&[WS_ERROR_PROPERTY]>) -> windows_core::Result<*mut WS_ERROR> { @@ -209,58 +205,58 @@ 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(core::mem::transmute(maxsize), core::mem::transmute(trimsize), core::mem::transmute(properties.unwrap_or(core::ptr::null())), core::mem::transmute(propertycount), core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCreateHeap(core::mem::transmute(maxsize), core::mem::transmute(trimsize), core::mem::transmute(properties.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertycount), core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channeltype), core::mem::transmute(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())), core::mem::transmute(listener), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCreateListener(core::mem::transmute(channeltype), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(listener), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(envelopeversion), core::mem::transmute(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()), core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCreateMessage(core::mem::transmute(envelopeversion), core::mem::transmute(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()), core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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()), core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCreateMessageForChannel(core::mem::transmute(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()), core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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()), core::mem::transmute(metadata), core::mem::transmute(error.unwrap_or(core::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()), core::mem::transmute(metadata), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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()), core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::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()), core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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<()> { +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: Option, 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<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateServiceEndpointFromTemplate(channeltype : WS_CHANNEL_TYPE, properties : *const WS_SERVICE_ENDPOINT_PROPERTY, propertycount : u32, addressurl : *const WS_STRING, contract : *const WS_SERVICE_CONTRACT, authorizationcallback : WS_SERVICE_SECURITY_CALLBACK, heap : *const WS_HEAP, templatetype : WS_BINDING_TEMPLATE_TYPE, templatevalue : *const core::ffi::c_void, templatesize : u32, templatedescription : *const core::ffi::c_void, templatedescriptionsize : u32, serviceendpoint : *mut *mut WS_SERVICE_ENDPOINT, error : *const WS_ERROR) -> windows_core::HRESULT); WsCreateServiceEndpointFromTemplate( core::mem::transmute(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(core::ptr::null())), + core::mem::transmute(addressurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(contract), - core::mem::transmute(authorizationcallback), + core::mem::transmute(authorizationcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(heap), core::mem::transmute(templatetype), - core::mem::transmute(templatevalue.unwrap_or(core::ptr::null())), + core::mem::transmute(templatevalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(templatesize), core::mem::transmute(templatedescription), core::mem::transmute(templatedescriptionsize), core::mem::transmute(serviceendpoint), - core::mem::transmute(error.unwrap_or(core::ptr::null())), + core::mem::transmute(error.unwrap_or(core::mem::zeroed())), ) .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()), core::mem::transmute(servicehost), core::mem::transmute(error.unwrap_or(core::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()), core::mem::transmute(servicehost), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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,13 +264,13 @@ pub unsafe fn WsCreateServiceProxy(channeltype: WS_CHANNEL_TYPE, channelbinding: WsCreateServiceProxy( core::mem::transmute(channeltype), core::mem::transmute(channelbinding), - core::mem::transmute(securitydescription.unwrap_or(core::ptr::null())), + core::mem::transmute(securitydescription.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(serviceproxy), - core::mem::transmute(error.unwrap_or(core::ptr::null())), + core::mem::transmute(error.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -286,69 +282,69 @@ pub unsafe fn WsCreateServiceProxyFromTemplate(channeltype: WS_CHANNEL_TYPE, pro 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(templatetype), - core::mem::transmute(templatevalue.unwrap_or(core::ptr::null())), + core::mem::transmute(templatevalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(templatesize), core::mem::transmute(templatedescription), core::mem::transmute(templatedescriptionsize), core::mem::transmute(serviceproxy), - core::mem::transmute(error.unwrap_or(core::ptr::null())), + core::mem::transmute(error.unwrap_or(core::mem::zeroed())), ) .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()), core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::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()), core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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()), core::mem::transmute(buffer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCreateXmlBuffer(core::mem::transmute(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()), core::mem::transmute(buffer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(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()), core::mem::transmute(token), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsCreateXmlSecurityToken(core::mem::transmute(tokenxml.unwrap_or(core::mem::zeroed())), core::mem::transmute(tokenkey.unwrap_or(core::mem::zeroed())), 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(token), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(datetime), core::mem::transmute(filetime), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsDateTimeToFileTime(core::mem::transmute(datetime), core::mem::transmute(filetime), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(url), core::mem::transmute(flags), core::mem::transmute(heap), core::mem::transmute(outurl), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsDecodeUrl(core::mem::transmute(url), core::mem::transmute(flags), core::mem::transmute(heap), core::mem::transmute(outurl), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(url), core::mem::transmute(flags), core::mem::transmute(heap), core::mem::transmute(outurl), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsEncodeUrl(core::mem::transmute(url), core::mem::transmute(flags), core::mem::transmute(heap), core::mem::transmute(outurl), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsEndReaderCanonicalization(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsEndWriterCanonicalization(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(filetime), core::mem::transmute(datetime), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsFileTimeToDateTime(core::mem::transmute(filetime), core::mem::transmute(datetime), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsFillBody(core::mem::transmute(message), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsFillReader(core::mem::transmute(reader), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsFindAttribute(reader: *const WS_XML_READER, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, required: P3, attributeindex: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -356,17 +352,17 @@ where P3: 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(core::mem::transmute(reader), core::mem::transmute(localname), core::mem::transmute(ns), required.param().abi(), core::mem::transmute(attributeindex), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsFindAttribute(core::mem::transmute(reader), core::mem::transmute(localname), core::mem::transmute(ns), required.param().abi(), core::mem::transmute(attributeindex), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsFlushBody(core::mem::transmute(message), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsFlushWriter(core::mem::transmute(writer), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsFreeChannel(channel: *const WS_CHANNEL) { @@ -426,17 +422,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(core::mem::transmute(channel), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetChannelProperty(core::mem::transmute(channel), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(customheaderdescription), core::mem::transmute(repeatingoption), core::mem::transmute(headerindex), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(headerattributes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetCustomHeader(core::mem::transmute(message), core::mem::transmute(customheaderdescription), core::mem::transmute(repeatingoption), core::mem::transmute(headerindex), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(headerattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(encoding), core::mem::transmute(dictionary), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetDictionary(core::mem::transmute(encoding), core::mem::transmute(dictionary), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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<()> { @@ -452,7 +448,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(core::mem::transmute(error), core::mem::transmute(faultdetaildescription), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value), core::mem::transmute(valuesize)).ok() + WsGetFaultErrorDetail(core::mem::transmute(error), core::mem::transmute(faultdetaildescription), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(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<()> { @@ -462,47 +458,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(core::mem::transmute(message), core::mem::transmute(headertype), core::mem::transmute(valuetype), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetHeader(core::mem::transmute(message), core::mem::transmute(headertype), core::mem::transmute(valuetype), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(reader), core::mem::transmute(headerattributes), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetHeaderAttributes(core::mem::transmute(message), core::mem::transmute(reader), core::mem::transmute(headerattributes), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(heap), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetHeapProperty(core::mem::transmute(heap), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(listener), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetListenerProperty(core::mem::transmute(listener), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(headername), core::mem::transmute(repeatingoption), core::mem::transmute(headerindex), core::mem::transmute(valuetype), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetMappedHeader(core::mem::transmute(message), core::mem::transmute(headername), core::mem::transmute(repeatingoption), core::mem::transmute(headerindex), core::mem::transmute(valuetype), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetMessageProperty(core::mem::transmute(message), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(metadata), core::mem::transmute(endpoints), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetMetadataEndpoints(core::mem::transmute(metadata), core::mem::transmute(endpoints), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(metadata), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetMetadataProperty(core::mem::transmute(metadata), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(metadata), core::mem::transmute(address), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetMissingMetadataDocumentAddress(core::mem::transmute(metadata), core::mem::transmute(address), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsGetNamespaceFromPrefix(reader: *const WS_XML_READER, prefix: *const WS_XML_STRING, required: P2, ns: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -510,22 +506,22 @@ where P2: 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(core::mem::transmute(reader), core::mem::transmute(prefix), required.param().abi(), core::mem::transmute(ns), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetNamespaceFromPrefix(core::mem::transmute(reader), core::mem::transmute(prefix), required.param().abi(), core::mem::transmute(ns), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(context), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetOperationContextProperty(core::mem::transmute(context), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(policy), core::mem::transmute(count), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetPolicyAlternativeCount(core::mem::transmute(policy), core::mem::transmute(count), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(policy), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetPolicyProperty(core::mem::transmute(policy), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsGetPrefixFromNamespace(writer: *const WS_XML_WRITER, ns: *const WS_XML_STRING, required: P2, prefix: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -533,67 +529,67 @@ where P2: 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(core::mem::transmute(writer), core::mem::transmute(ns), required.param().abi(), core::mem::transmute(prefix), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetPrefixFromNamespace(core::mem::transmute(writer), core::mem::transmute(ns), required.param().abi(), core::mem::transmute(prefix), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(xmlreader), core::mem::transmute(node), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetReaderNode(core::mem::transmute(xmlreader), core::mem::transmute(node), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetReaderPosition(core::mem::transmute(reader), core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetReaderProperty(core::mem::transmute(reader), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(securitycontext), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetSecurityContextProperty(core::mem::transmute(securitycontext), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(securitytoken), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetSecurityTokenProperty(core::mem::transmute(securitytoken), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(servicehost), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetServiceHostProperty(core::mem::transmute(servicehost), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(serviceproxy), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetServiceProxyProperty(core::mem::transmute(serviceproxy), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetWriterPosition(core::mem::transmute(writer), core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetWriterProperty(core::mem::transmute(writer), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(localname), core::mem::transmute(heap), core::mem::transmute(valuechars.unwrap_or(core::ptr::null_mut())), core::mem::transmute(valuecharcount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsGetXmlAttribute(core::mem::transmute(reader), core::mem::transmute(localname), core::mem::transmute(heap), core::mem::transmute(valuechars.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuecharcount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(initialization), core::mem::transmute(sourcemessage.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsInitializeMessage(core::mem::transmute(message), core::mem::transmute(initialization), core::mem::transmute(sourcemessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(headerposition), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsMarkHeaderAsUnderstood(core::mem::transmute(message), core::mem::transmute(headerposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsMatchPolicyAlternative(policy: *const WS_POLICY, alternativeindex: u32, policyconstraints: *const WS_POLICY_CONSTRAINTS, matchrequired: P3, heap: *const WS_HEAP, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -601,167 +597,167 @@ where P3: 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(core::mem::transmute(policy), core::mem::transmute(alternativeindex), core::mem::transmute(policyconstraints), matchrequired.param().abi(), core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsMatchPolicyAlternative(core::mem::transmute(policy), core::mem::transmute(alternativeindex), core::mem::transmute(policyconstraints), matchrequired.param().abi(), core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(moveto), core::mem::transmute(found.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsMoveReader(core::mem::transmute(reader), core::mem::transmute(moveto), core::mem::transmute(found.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(moveto), core::mem::transmute(found.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsMoveWriter(core::mem::transmute(writer), core::mem::transmute(moveto), core::mem::transmute(found.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(endpointaddress), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsOpenChannel(core::mem::transmute(channel), core::mem::transmute(endpointaddress), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(listener), core::mem::transmute(url), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsOpenListener(core::mem::transmute(listener), core::mem::transmute(url), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(servicehost), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsOpenServiceHost(core::mem::transmute(servicehost), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(serviceproxy), core::mem::transmute(address), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsOpenServiceProxy(core::mem::transmute(serviceproxy), core::mem::transmute(address), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(callback), core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsPullBytes(core::mem::transmute(writer), core::mem::transmute(callback), core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(callback), core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsPushBytes(core::mem::transmute(writer), core::mem::transmute(callback), core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(localname), core::mem::transmute(ns), core::mem::transmute(valuetype), core::mem::transmute(array.unwrap_or(core::ptr::null_mut())), core::mem::transmute(arraysize), core::mem::transmute(itemoffset), core::mem::transmute(itemcount), core::mem::transmute(actualitemcount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadArray(core::mem::transmute(reader), core::mem::transmute(localname), core::mem::transmute(ns), core::mem::transmute(valuetype), core::mem::transmute(array.unwrap_or(core::mem::zeroed())), core::mem::transmute(arraysize), core::mem::transmute(itemoffset), core::mem::transmute(itemcount), core::mem::transmute(actualitemcount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(attributedescription), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadAttribute(core::mem::transmute(reader), core::mem::transmute(attributedescription), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(bodydescription), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadBody(core::mem::transmute(message), core::mem::transmute(bodydescription), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(bytes), core::mem::transmute(maxbytecount), core::mem::transmute(actualbytecount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadBytes(core::mem::transmute(reader), core::mem::transmute(bytes), core::mem::transmute(maxbytecount), core::mem::transmute(actualbytecount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), core::mem::transmute(actualcharcount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadChars(core::mem::transmute(reader), core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), core::mem::transmute(actualcharcount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), core::mem::transmute(actualbytecount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadCharsUtf8(core::mem::transmute(reader), core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), core::mem::transmute(actualbytecount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(elementdescription), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadElement(core::mem::transmute(reader), core::mem::transmute(elementdescription), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadEndAttribute(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadEndElement(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(endpointaddress), core::mem::transmute(extensiontype), core::mem::transmute(readoption), core::mem::transmute(heap), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadEndpointAddressExtension(core::mem::transmute(reader), core::mem::transmute(endpointaddress), core::mem::transmute(extensiontype), core::mem::transmute(readoption), core::mem::transmute(heap), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadEnvelopeEnd(core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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<()> { +pub unsafe fn WsReadEnvelopeStart(message: *const WS_MESSAGE, reader: *const WS_XML_READER, donecallback: Option, 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(core::mem::transmute(message), core::mem::transmute(reader), core::mem::transmute(donecallback), core::mem::transmute(donecallbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadEnvelopeStart(core::mem::transmute(message), core::mem::transmute(reader), core::mem::transmute(donecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(donecallbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadMessageEnd(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadMessageStart(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(metadata), core::mem::transmute(reader), core::mem::transmute(url), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadMetadata(core::mem::transmute(metadata), core::mem::transmute(reader), core::mem::transmute(url), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadNode(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(heap), core::mem::transmute(prefix.unwrap_or(core::ptr::null_mut())), core::mem::transmute(localname), core::mem::transmute(ns.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadQualifiedName(core::mem::transmute(reader), core::mem::transmute(heap), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(localname), core::mem::transmute(ns.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(attributeindex), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadStartAttribute(core::mem::transmute(reader), core::mem::transmute(attributeindex), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadStartElement(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + WsReadToStartElement(core::mem::transmute(reader), core::mem::transmute(localname.unwrap_or(core::mem::zeroed())), core::mem::transmute(ns.unwrap_or(core::mem::zeroed())), core::mem::transmute(found.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(typemapping), core::mem::transmute(r#type), core::mem::transmute(typedescription.unwrap_or(core::ptr::null())), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadType(core::mem::transmute(reader), core::mem::transmute(typemapping), core::mem::transmute(r#type), core::mem::transmute(typedescription.unwrap_or(core::mem::zeroed())), core::mem::transmute(readoption), core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(valuetype), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadValue(core::mem::transmute(reader), core::mem::transmute(valuetype), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(heap), core::mem::transmute(xmlbuffer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadXmlBuffer(core::mem::transmute(reader), core::mem::transmute(heap), core::mem::transmute(xmlbuffer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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()), core::mem::transmute(bytes), core::mem::transmute(bytecount), core::mem::transmute(heap), core::mem::transmute(xmlbuffer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsReadXmlBufferFromBytes(core::mem::transmute(reader), core::mem::transmute(encoding.unwrap_or(core::mem::zeroed())), 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(bytes), core::mem::transmute(bytecount), core::mem::transmute(heap), core::mem::transmute(xmlbuffer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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<()> { @@ -773,39 +769,39 @@ pub unsafe fn WsReceiveMessage(channel: *const WS_CHANNEL, message: *const WS_ME messagedescriptions.len().try_into().unwrap(), core::mem::transmute(receiveoption), core::mem::transmute(readbodyoption), - core::mem::transmute(heap.unwrap_or(core::ptr::null())), + core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), core::mem::transmute(value), core::mem::transmute(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())), + core::mem::transmute(index.unwrap_or(core::mem::zeroed())), + core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(error.unwrap_or(core::mem::zeroed())), ) .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<()> { +pub unsafe fn WsRegisterOperationForCancel(context: *const WS_OPERATION_CONTEXT, cancelcallback: WS_OPERATION_CANCEL_CALLBACK, freestatecallback: Option, 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(core::mem::transmute(context), core::mem::transmute(cancelcallback), core::mem::transmute(freestatecallback), core::mem::transmute(userstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsRegisterOperationForCancel(core::mem::transmute(context), core::mem::transmute(cancelcallback), core::mem::transmute(freestatecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(userstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(headername), core::mem::transmute(headerns), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsRemoveCustomHeader(core::mem::transmute(message), core::mem::transmute(headername), core::mem::transmute(headerns), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(headertype), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsRemoveHeader(core::mem::transmute(message), core::mem::transmute(headertype), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(headername), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsRemoveMappedHeader(core::mem::transmute(message), core::mem::transmute(headername), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsRemoveNode(core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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<()> { @@ -815,28 +811,28 @@ pub unsafe fn WsRequestReply(channel: *const WS_CHANNEL, requestmessage: *const core::mem::transmute(requestmessage), core::mem::transmute(requestmessagedescription), core::mem::transmute(writeoption), - core::mem::transmute(requestbodyvalue.unwrap_or(core::ptr::null())), + core::mem::transmute(requestbodyvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(requestbodyvaluesize), core::mem::transmute(replymessage), core::mem::transmute(replymessagedescription), core::mem::transmute(readoption), - core::mem::transmute(heap.unwrap_or(core::ptr::null())), - core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(heap.unwrap_or(core::mem::zeroed())), + core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuesize), - core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), - core::mem::transmute(error.unwrap_or(core::ptr::null())), + core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(error.unwrap_or(core::mem::zeroed())), ) .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(core::mem::transmute(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()), core::mem::transmute(token), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsRequestSecurityToken(core::mem::transmute(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()), core::mem::transmute(token), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsResetChannel(core::mem::transmute(channel), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsResetError(error: *const WS_ERROR) -> windows_core::Result<()> { @@ -846,57 +842,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(core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsResetHeap(core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(listener), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsResetListener(core::mem::transmute(listener), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsResetMessage(core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(metadata), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsResetMetadata(core::mem::transmute(metadata), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(servicehost), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsResetServiceHost(core::mem::transmute(servicehost), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(serviceproxy), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsResetServiceProxy(core::mem::transmute(serviceproxy), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(securitycontext), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsRevokeSecurityContext(core::mem::transmute(securitycontext), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(replymessage), core::mem::transmute(faulterror), core::mem::transmute(faulterrorcode), core::mem::transmute(faultdisclosure), core::mem::transmute(requestmessage), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSendFaultMessageForError(core::mem::transmute(channel), core::mem::transmute(replymessage), core::mem::transmute(faulterror), core::mem::transmute(faulterrorcode), core::mem::transmute(faultdisclosure), core::mem::transmute(requestmessage), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(messagedescription), core::mem::transmute(writeoption), core::mem::transmute(bodyvalue.unwrap_or(core::ptr::null())), core::mem::transmute(bodyvaluesize), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSendMessage(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(messagedescription), core::mem::transmute(writeoption), core::mem::transmute(bodyvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(bodyvaluesize), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(replymessage), core::mem::transmute(replymessagedescription), core::mem::transmute(writeoption), core::mem::transmute(replybodyvalue.unwrap_or(core::ptr::null())), core::mem::transmute(replybodyvaluesize), core::mem::transmute(requestmessage), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSendReplyMessage(core::mem::transmute(channel), core::mem::transmute(replymessage), core::mem::transmute(replymessagedescription), core::mem::transmute(writeoption), core::mem::transmute(replybodyvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(replybodyvaluesize), core::mem::transmute(requestmessage), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSetChannelProperty(core::mem::transmute(channel), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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<()> { @@ -906,7 +902,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(core::mem::transmute(error), core::mem::transmute(faultdetaildescription), core::mem::transmute(writeoption), core::mem::transmute(value.unwrap_or(core::ptr::null())), core::mem::transmute(valuesize)).ok() + WsSetFaultErrorDetail(core::mem::transmute(error), core::mem::transmute(faultdetaildescription), core::mem::transmute(writeoption), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { @@ -916,162 +912,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(core::mem::transmute(message), core::mem::transmute(headertype), core::mem::transmute(valuetype), core::mem::transmute(writeoption), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSetHeader(core::mem::transmute(message), core::mem::transmute(headertype), core::mem::transmute(valuetype), core::mem::transmute(writeoption), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + WsSetInput(core::mem::transmute(reader), core::mem::transmute(encoding.unwrap_or(core::mem::zeroed())), core::mem::transmute(input.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(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() + WsSetInputToBuffer(core::mem::transmute(reader), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(listener), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSetListenerProperty(core::mem::transmute(listener), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSetMessageProperty(core::mem::transmute(message), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + WsSetOutput(core::mem::transmute(writer), core::mem::transmute(encoding.unwrap_or(core::mem::zeroed())), core::mem::transmute(output.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(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() + WsSetOutputToBuffer(core::mem::transmute(writer), core::mem::transmute(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::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSetReaderPosition(core::mem::transmute(reader), core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSetWriterPosition(core::mem::transmute(writer), core::mem::transmute(nodeposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsShutdownSessionChannel(core::mem::transmute(channel), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsSkipNode(core::mem::transmute(reader), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(reader), core::mem::transmute(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() + WsStartReaderCanonicalization(core::mem::transmute(reader), core::mem::transmute(writecallback), core::mem::transmute(writecallbackstate.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(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() + WsStartWriterCanonicalization(core::mem::transmute(writer), core::mem::transmute(writecallback), core::mem::transmute(writecallbackstate.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).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(), core::mem::transmute(trimmedchars), core::mem::transmute(trimmedcount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsTrimXmlWhitespace(core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), core::mem::transmute(trimmedchars), core::mem::transmute(trimmedcount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::ptr::null()))).ok() + WsVerifyXmlNCName(core::mem::transmute(ncnamechars.as_ptr()), ncnamechars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(localname), core::mem::transmute(ns), core::mem::transmute(valuetype), core::mem::transmute(array.unwrap_or(core::ptr::null())), core::mem::transmute(arraysize), core::mem::transmute(itemoffset), core::mem::transmute(itemcount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteArray(core::mem::transmute(writer), core::mem::transmute(localname), core::mem::transmute(ns), core::mem::transmute(valuetype), core::mem::transmute(array.unwrap_or(core::mem::zeroed())), core::mem::transmute(arraysize), core::mem::transmute(itemoffset), core::mem::transmute(itemcount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(attributedescription), core::mem::transmute(writeoption), core::mem::transmute(value.unwrap_or(core::ptr::null())), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteAttribute(core::mem::transmute(writer), core::mem::transmute(attributedescription), core::mem::transmute(writeoption), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(bodydescription), core::mem::transmute(writeoption), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteBody(core::mem::transmute(message), core::mem::transmute(bodydescription), core::mem::transmute(writeoption), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(bytes), core::mem::transmute(bytecount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteBytes(core::mem::transmute(writer), core::mem::transmute(bytes), core::mem::transmute(bytecount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteChars(core::mem::transmute(writer), core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteCharsUtf8(core::mem::transmute(writer), core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(elementdescription), core::mem::transmute(writeoption), core::mem::transmute(value.unwrap_or(core::ptr::null())), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteElement(core::mem::transmute(writer), core::mem::transmute(elementdescription), core::mem::transmute(writeoption), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteEndAttribute(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteEndCData(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteEndElement(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteEndStartElement(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteEnvelopeEnd(core::mem::transmute(message), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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<()> { +pub unsafe fn WsWriteEnvelopeStart(message: *const WS_MESSAGE, writer: *const WS_XML_WRITER, donecallback: Option, 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(core::mem::transmute(message), core::mem::transmute(writer), core::mem::transmute(donecallback), core::mem::transmute(donecallbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteEnvelopeStart(core::mem::transmute(message), core::mem::transmute(writer), core::mem::transmute(donecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(donecallbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteMessageEnd(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteMessageStart(core::mem::transmute(channel), core::mem::transmute(message), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(node), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteNode(core::mem::transmute(writer), core::mem::transmute(node), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::ptr::null())), core::mem::transmute(localname), core::mem::transmute(ns.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteQualifiedName(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(localname), core::mem::transmute(ns.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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: P4, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -1079,42 +1075,42 @@ where P4: 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(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::ptr::null())), core::mem::transmute(localname), core::mem::transmute(ns), singlequote.param().abi(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteStartAttribute(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(localname), core::mem::transmute(ns), singlequote.param().abi(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteStartCData(core::mem::transmute(writer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::ptr::null())), core::mem::transmute(localname), core::mem::transmute(ns), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteStartElement(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(localname), core::mem::transmute(ns), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(text), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteText(core::mem::transmute(writer), core::mem::transmute(text), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(typemapping), core::mem::transmute(r#type), core::mem::transmute(typedescription.unwrap_or(core::ptr::null())), core::mem::transmute(writeoption), core::mem::transmute(value.unwrap_or(core::ptr::null())), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteType(core::mem::transmute(writer), core::mem::transmute(typemapping), core::mem::transmute(r#type), core::mem::transmute(typedescription.unwrap_or(core::mem::zeroed())), core::mem::transmute(writeoption), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(valuetype), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteValue(core::mem::transmute(writer), core::mem::transmute(valuetype), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(xmlbuffer), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteXmlBuffer(core::mem::transmute(writer), core::mem::transmute(xmlbuffer), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(writer), core::mem::transmute(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()), core::mem::transmute(heap), core::mem::transmute(bytes), core::mem::transmute(bytecount), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteXmlBufferToBytes(core::mem::transmute(writer), core::mem::transmute(xmlbuffer), core::mem::transmute(encoding.unwrap_or(core::mem::zeroed())), 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(heap), core::mem::transmute(bytes), core::mem::transmute(bytecount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsWriteXmlnsAttribute(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, ns: *const WS_XML_STRING, singlequote: P3, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -1122,12 +1118,12 @@ where P3: 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(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::ptr::null())), core::mem::transmute(ns), singlequote.param().abi(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsWriteXmlnsAttribute(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(ns), singlequote.param().abi(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(string1), core::mem::transmute(string2), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() + WsXmlStringEquals(core::mem::transmute(string1), core::mem::transmute(string2), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 ef51bedaa8..18fdcc54b6 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs @@ -1,65 +1,51 @@ #[inline] -pub unsafe fn SaferCloseLevel(hlevelhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SaferCloseLevel(hlevelhandle: super::SAFER_LEVEL_HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SaferCloseLevel(hlevelhandle : super:: SAFER_LEVEL_HANDLE) -> super::super::Foundation:: BOOL); - SaferCloseLevel(hlevelhandle.param().abi()).ok() + SaferCloseLevel(core::mem::transmute(hlevelhandle)).ok() } #[inline] -pub unsafe fn SaferComputeTokenFromLevel(levelhandle: P0, inaccesstoken: P1, outaccesstoken: *mut super::super::Foundation::HANDLE, dwflags: SAFER_COMPUTE_TOKEN_FROM_LEVEL_FLAGS, lpreserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SaferComputeTokenFromLevel(levelhandle: super::SAFER_LEVEL_HANDLE, inaccesstoken: Option, outaccesstoken: *mut super::super::Foundation::HANDLE, dwflags: SAFER_COMPUTE_TOKEN_FROM_LEVEL_FLAGS, lpreserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(outaccesstoken), core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null_mut()))).ok() + SaferComputeTokenFromLevel(core::mem::transmute(levelhandle), core::mem::transmute(inaccesstoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(outaccesstoken), core::mem::transmute(dwflags), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(dwscopeid), core::mem::transmute(dwlevelid), core::mem::transmute(openflags), core::mem::transmute(plevelhandle), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + SaferCreateLevel(core::mem::transmute(dwscopeid), core::mem::transmute(dwlevelid), core::mem::transmute(openflags), core::mem::transmute(plevelhandle), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SaferGetLevelInformation(levelhandle: super::SAFER_LEVEL_HANDLE, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: Option<*mut core::ffi::c_void>, dwinbuffersize: u32, lpdwoutbuffersize: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dwinfotype), core::mem::transmute(lpquerybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwinbuffersize), core::mem::transmute(lpdwoutbuffersize)).ok() + SaferGetLevelInformation(core::mem::transmute(levelhandle), core::mem::transmute(dwinfotype), core::mem::transmute(lpquerybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinbuffersize), core::mem::transmute(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(core::mem::transmute(dwscopeid), core::mem::transmute(saferpolicyinfoclass), core::mem::transmute(infobuffersize), core::mem::transmute(infobuffer), core::mem::transmute(infobufferretsize), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + SaferGetPolicyInformation(core::mem::transmute(dwscopeid), core::mem::transmute(saferpolicyinfoclass), core::mem::transmute(infobuffersize), core::mem::transmute(infobuffer), core::mem::transmute(infobufferretsize), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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())), core::mem::transmute(plevelhandle), core::mem::transmute(lpreserved.unwrap_or(core::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())), core::mem::transmute(plevelhandle), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SaferRecordEventLogEntry(hlevel: P0, sztargetpath: P1, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SaferRecordEventLogEntry(hlevel: super::SAFER_LEVEL_HANDLE, sztargetpath: P1, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(core::ptr::null()))).ok() + SaferRecordEventLogEntry(core::mem::transmute(hlevel), sztargetpath.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SaferSetLevelInformation(levelhandle: P0, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: *const core::ffi::c_void, dwinbuffersize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SaferSetLevelInformation(levelhandle: super::SAFER_LEVEL_HANDLE, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: *const core::ffi::c_void, dwinbuffersize: u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SaferSetLevelInformation(levelhandle : super:: SAFER_LEVEL_HANDLE, dwinfotype : SAFER_OBJECT_INFO_CLASS, lpquerybuffer : *const core::ffi::c_void, dwinbuffersize : u32) -> super::super::Foundation:: BOOL); - SaferSetLevelInformation(levelhandle.param().abi(), core::mem::transmute(dwinfotype), core::mem::transmute(lpquerybuffer), core::mem::transmute(dwinbuffersize)).ok() + SaferSetLevelInformation(core::mem::transmute(levelhandle), core::mem::transmute(dwinfotype), core::mem::transmute(lpquerybuffer), core::mem::transmute(dwinbuffersize)).ok() } #[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(core::mem::transmute(dwscopeid), core::mem::transmute(saferpolicyinfoclass), core::mem::transmute(infobuffersize), core::mem::transmute(infobuffer), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + SaferSetPolicyInformation(core::mem::transmute(dwscopeid), core::mem::transmute(saferpolicyinfoclass), core::mem::transmute(infobuffersize), core::mem::transmute(infobuffer), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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 8e7673a19f..5cf0935d92 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 @@ -4,33 +4,28 @@ pub struct ACCOUNT_STATE(pub i32); windows_core::imp::define_interface!(AsyncIAssociatedIdentityProvider, AsyncIAssociatedIdentityProvider_Vtbl, 0x2834d6ed_297e_4e72_8a51_961e86f05152); windows_core::imp::interface_hierarchy!(AsyncIAssociatedIdentityProvider, windows_core::IUnknown); impl AsyncIAssociatedIdentityProvider { - pub unsafe fn Begin_AssociateIdentity(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Begin_AssociateIdentity)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn Begin_AssociateIdentity(&self, hwndparent: super::super::super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Begin_AssociateIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Finish_AssociateIdentity(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Finish_AssociateIdentity)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Begin_DisassociateIdentity(&self, hwndparent: P0, lpszuniqueid: P1) -> windows_core::Result<()> + pub unsafe fn Begin_DisassociateIdentity(&self, hwndparent: super::super::super::super::Foundation::HWND, lpszuniqueid: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Begin_DisassociateIdentity)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), lpszuniqueid.param().abi()).ok() + (windows_core::Interface::vtable(self).Begin_DisassociateIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), lpszuniqueid.param().abi()).ok() } pub unsafe fn Finish_DisassociateIdentity(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Finish_DisassociateIdentity)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Begin_ChangeCredential(&self, hwndparent: P0, lpszuniqueid: P1) -> windows_core::Result<()> + pub unsafe fn Begin_ChangeCredential(&self, hwndparent: super::super::super::super::Foundation::HWND, lpszuniqueid: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Begin_ChangeCredential)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), lpszuniqueid.param().abi()).ok() + (windows_core::Interface::vtable(self).Begin_ChangeCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), lpszuniqueid.param().abi()).ok() } pub unsafe fn Finish_ChangeCredential(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Finish_ChangeCredential)(windows_core::Interface::as_raw(self)).ok() @@ -311,11 +306,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(core::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::mem::zeroed()))).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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Finish_ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(ppidentityproperties.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -377,7 +372,7 @@ windows_core::imp::interface_hierarchy!(AsyncIIdentityProvider, windows_core::IU impl AsyncIIdentityProvider { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn Begin_GetIdentityEnum(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: Option<*const super::super::super::super::Foundation::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), core::mem::transmute(eidentitytype), core::mem::transmute(pfilterkey.unwrap_or(core::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Begin_GetIdentityEnum)(windows_core::Interface::as_raw(self), core::mem::transmute(eidentitytype), core::mem::transmute(pfilterkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Finish_GetIdentityEnum(&self) -> windows_core::Result { @@ -649,10 +644,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), core::mem::transmute(dwprovider), core::mem::transmute(pprovguid.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Begin_GetAt)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprovider), core::mem::transmute(pprovguid.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed())), core::mem::transmute(ppidentityprovider)).ok() } pub unsafe fn Begin_AddToCache(&self, lpszuniqueid: P0, providerguid: *const windows_core::GUID) -> windows_core::Result<()> where @@ -667,14 +662,14 @@ impl AsyncIIdentityStore { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Begin_ConvertToSid)(windows_core::Interface::as_raw(self), lpszuniqueid.param().abi(), core::mem::transmute(providerguid), core::mem::transmute(cbsid), core::mem::transmute(psid.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Begin_ConvertToSid)(windows_core::Interface::as_raw(self), lpszuniqueid.param().abi(), core::mem::transmute(providerguid), core::mem::transmute(cbsid), core::mem::transmute(psid.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(pcbrequiredsid)).ok() + (windows_core::Interface::vtable(self).Finish_ConvertToSid)(windows_core::Interface::as_raw(self), core::mem::transmute(psid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbrequiredsid)).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn Begin_EnumerateIdentities(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: Option<*const super::super::super::super::Foundation::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), core::mem::transmute(eidentitytype), core::mem::transmute(pfilterkey.unwrap_or(core::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Begin_EnumerateIdentities)(windows_core::Interface::as_raw(self), core::mem::transmute(eidentitytype), core::mem::transmute(pfilterkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Finish_EnumerateIdentities(&self) -> windows_core::Result { @@ -886,26 +881,21 @@ windows_core::imp::define_interface!(IAssociatedIdentityProvider, IAssociatedIde windows_core::imp::interface_hierarchy!(IAssociatedIdentityProvider, windows_core::IUnknown); impl IAssociatedIdentityProvider { #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] - pub unsafe fn AssociateIdentity(&self, hwndparent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn AssociateIdentity(&self, hwndparent: super::super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AssociateIdentity)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).AssociateIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn DisassociateIdentity(&self, hwndparent: P0, lpszuniqueid: P1) -> windows_core::Result<()> + pub unsafe fn DisassociateIdentity(&self, hwndparent: super::super::super::super::Foundation::HWND, lpszuniqueid: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DisassociateIdentity)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), lpszuniqueid.param().abi()).ok() + (windows_core::Interface::vtable(self).DisassociateIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), lpszuniqueid.param().abi()).ok() } - pub unsafe fn ChangeCredential(&self, hwndparent: P0, lpszuniqueid: P1) -> windows_core::Result<()> + pub unsafe fn ChangeCredential(&self, hwndparent: super::super::super::super::Foundation::HWND, lpszuniqueid: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ChangeCredential)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), lpszuniqueid.param().abi()).ok() + (windows_core::Interface::vtable(self).ChangeCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), lpszuniqueid.param().abi()).ok() } } #[repr(C)] @@ -1119,7 +1109,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -1165,7 +1155,7 @@ impl IIdentityProvider { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetIdentityEnum(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: Option<*const super::super::super::super::Foundation::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), core::mem::transmute(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__)) + (windows_core::Interface::vtable(self).GetIdentityEnum)(windows_core::Interface::as_raw(self), core::mem::transmute(eidentitytype), core::mem::transmute(pfilterkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::mem::zeroed())), &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<()> @@ -1338,7 +1328,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), core::mem::transmute(dwprovider), core::mem::transmute(pprovguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppidentityprovider)).ok() + (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprovider), core::mem::transmute(pprovguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppidentityprovider)).ok() } pub unsafe fn AddToCache(&self, lpszuniqueid: P0, providerguid: *const windows_core::GUID) -> windows_core::Result<()> where @@ -1355,7 +1345,7 @@ impl IIdentityStore { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn EnumerateIdentities(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: Option<*const super::super::super::super::Foundation::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), core::mem::transmute(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__)) + (windows_core::Interface::vtable(self).EnumerateIdentities)(windows_core::Interface::as_raw(self), core::mem::transmute(eidentitytype), core::mem::transmute(pfilterkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::mem::zeroed())), &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 bb70383151..54ec2b233c 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 @@ -5,56 +5,56 @@ pub mod Provider; 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(core::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), - core::mem::transmute(pinput.unwrap_or(core::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(fcontextreq), core::mem::transmute(targetdatarep), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] -pub unsafe fn AcquireCredentialsHandleA(pszprincipal: P0, pszpackage: P1, fcredentialuse: SECPKG_CRED, pvlogonid: Option<*const core::ffi::c_void>, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: SEC_GET_KEY_FN, pvgetkeyargument: Option<*const core::ffi::c_void>, phcredential: *mut super::super::Credentials::SecHandle, ptsexpiry: Option<*mut i64>) -> windows_core::Result<()> +pub unsafe fn AcquireCredentialsHandleA(pszprincipal: P0, pszpackage: P1, fcredentialuse: SECPKG_CRED, pvlogonid: Option<*const core::ffi::c_void>, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: Option, pvgetkeyargument: Option<*const core::ffi::c_void>, phcredential: *mut super::super::Credentials::SecHandle, ptsexpiry: Option<*mut i64>) -> windows_core::Result<()> where P0: windows_core::Param, 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(), core::mem::transmute(fcredentialuse), core::mem::transmute(pvlogonid.unwrap_or(core::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), core::mem::transmute(pgetkeyfn), core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), core::mem::transmute(phcredential), core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))).ok() + AcquireCredentialsHandleA(pszprincipal.param().abi(), pszpackage.param().abi(), core::mem::transmute(fcredentialuse), core::mem::transmute(pvlogonid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgetkeyfn.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvgetkeyargument.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcredential), core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] -pub unsafe fn AcquireCredentialsHandleW(pszprincipal: P0, pszpackage: P1, fcredentialuse: SECPKG_CRED, pvlogonid: Option<*const core::ffi::c_void>, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: SEC_GET_KEY_FN, pvgetkeyargument: Option<*const core::ffi::c_void>, phcredential: *mut super::super::Credentials::SecHandle, ptsexpiry: Option<*mut i64>) -> windows_core::Result<()> +pub unsafe fn AcquireCredentialsHandleW(pszprincipal: P0, pszpackage: P1, fcredentialuse: SECPKG_CRED, pvlogonid: Option<*const core::ffi::c_void>, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: Option, pvgetkeyargument: Option<*const core::ffi::c_void>, phcredential: *mut super::super::Credentials::SecHandle, ptsexpiry: Option<*mut i64>) -> windows_core::Result<()> where P0: windows_core::Param, 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(), core::mem::transmute(fcredentialuse), core::mem::transmute(pvlogonid.unwrap_or(core::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), core::mem::transmute(pgetkeyfn), core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), core::mem::transmute(phcredential), core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))).ok() + AcquireCredentialsHandleW(pszprincipal.param().abi(), pszpackage.param().abi(), core::mem::transmute(fcredentialuse), core::mem::transmute(pvlogonid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgetkeyfn.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvgetkeyargument.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcredential), core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] -pub unsafe fn AddCredentialsA(hcredentials: *const super::super::Credentials::SecHandle, pszprincipal: P1, pszpackage: P2, fcredentialuse: u32, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: SEC_GET_KEY_FN, pvgetkeyargument: Option<*const core::ffi::c_void>, ptsexpiry: Option<*mut i64>) -> windows_core::Result<()> +pub unsafe fn AddCredentialsA(hcredentials: *const super::super::Credentials::SecHandle, pszprincipal: P1, pszpackage: P2, fcredentialuse: u32, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: Option, pvgetkeyargument: Option<*const core::ffi::c_void>, ptsexpiry: Option<*mut i64>) -> windows_core::Result<()> where P1: windows_core::Param, P2: 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(core::mem::transmute(hcredentials), pszprincipal.param().abi(), pszpackage.param().abi(), core::mem::transmute(fcredentialuse), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), core::mem::transmute(pgetkeyfn), core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))).ok() + AddCredentialsA(core::mem::transmute(hcredentials), pszprincipal.param().abi(), pszpackage.param().abi(), core::mem::transmute(fcredentialuse), core::mem::transmute(pauthdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgetkeyfn.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvgetkeyargument.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] -pub unsafe fn AddCredentialsW(hcredentials: *const super::super::Credentials::SecHandle, pszprincipal: P1, pszpackage: P2, fcredentialuse: u32, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: SEC_GET_KEY_FN, pvgetkeyargument: Option<*const core::ffi::c_void>, ptsexpiry: Option<*mut i64>) -> windows_core::Result<()> +pub unsafe fn AddCredentialsW(hcredentials: *const super::super::Credentials::SecHandle, pszprincipal: P1, pszpackage: P2, fcredentialuse: u32, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: Option, pvgetkeyargument: Option<*const core::ffi::c_void>, ptsexpiry: Option<*mut i64>) -> windows_core::Result<()> where P1: windows_core::Param, P2: 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(core::mem::transmute(hcredentials), pszprincipal.param().abi(), pszpackage.param().abi(), core::mem::transmute(fcredentialuse), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), core::mem::transmute(pgetkeyfn), core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))).ok() + AddCredentialsW(core::mem::transmute(hcredentials), pszprincipal.param().abi(), pszpackage.param().abi(), core::mem::transmute(fcredentialuse), core::mem::transmute(pauthdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgetkeyfn.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvgetkeyargument.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AddSecurityPackageA(pszpackagename: P0, poptions: Option<*const SECURITY_PACKAGE_OPTIONS>) -> windows_core::Result<()> @@ -62,7 +62,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(core::ptr::null()))).ok() + AddSecurityPackageA(pszpackagename.param().abi(), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AddSecurityPackageW(pszpackagename: P0, poptions: Option<*const SECURITY_PACKAGE_OPTIONS>) -> windows_core::Result<()> @@ -70,7 +70,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(core::ptr::null()))).ok() + AddSecurityPackageW(pszpackagename.param().abi(), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -79,20 +79,14 @@ pub unsafe fn ApplyControlToken(phcontext: *const super::super::Credentials::Sec ApplyControlToken(core::mem::transmute(phcontext), core::mem::transmute(pinput)).ok() } #[inline] -pub unsafe fn AuditComputeEffectivePolicyBySid(psid: P0, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn AuditComputeEffectivePolicyBySid(psid: super::super::PSID, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("advapi32.dll" "system" fn AuditComputeEffectivePolicyBySid(psid : super::super:: PSID, psubcategoryguids : *const windows_core::GUID, dwpolicycount : u32, ppauditpolicy : *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation:: BOOLEAN); - AuditComputeEffectivePolicyBySid(psid.param().abi(), core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) + AuditComputeEffectivePolicyBySid(core::mem::transmute(psid), core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) } #[inline] -pub unsafe fn AuditComputeEffectivePolicyByToken(htokenhandle: P0, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn AuditComputeEffectivePolicyByToken(htokenhandle: super::super::super::Foundation::HANDLE, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("advapi32.dll" "system" fn AuditComputeEffectivePolicyByToken(htokenhandle : super::super::super::Foundation:: HANDLE, psubcategoryguids : *const windows_core::GUID, dwpolicycount : u32, ppauditpolicy : *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation:: BOOLEAN); - AuditComputeEffectivePolicyByToken(htokenhandle.param().abi(), core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) + AuditComputeEffectivePolicyByToken(core::mem::transmute(htokenhandle), core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) } #[inline] pub unsafe fn AuditEnumerateCategories(ppauditcategoriesarray: *mut *mut windows_core::GUID, pdwcountreturned: *mut u32) -> super::super::super::Foundation::BOOLEAN { @@ -110,7 +104,7 @@ where P1: 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(core::ptr::null())), bretrieveallsubcategories.param().abi(), core::mem::transmute(ppauditsubcategoriesarray), core::mem::transmute(pdwcountreturned)) + AuditEnumerateSubCategories(core::mem::transmute(pauditcategoryguid.unwrap_or(core::mem::zeroed())), bretrieveallsubcategories.param().abi(), core::mem::transmute(ppauditsubcategoriesarray), core::mem::transmute(pdwcountreturned)) } #[inline] pub unsafe fn AuditFree(buffer: *const core::ffi::c_void) { @@ -164,12 +158,9 @@ where AuditQueryGlobalSaclW(objecttypename.param().abi(), core::mem::transmute(acl)) } #[inline] -pub unsafe fn AuditQueryPerUserPolicy(psid: P0, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn AuditQueryPerUserPolicy(psid: super::super::PSID, psubcategoryguids: &[windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("advapi32.dll" "system" fn AuditQueryPerUserPolicy(psid : super::super:: PSID, psubcategoryguids : *const windows_core::GUID, dwpolicycount : u32, ppauditpolicy : *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation:: BOOLEAN); - AuditQueryPerUserPolicy(psid.param().abi(), core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) + AuditQueryPerUserPolicy(core::mem::transmute(psid), core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), core::mem::transmute(ppauditpolicy)) } #[inline] pub unsafe fn AuditQuerySecurity(securityinformation: super::super::OBJECT_SECURITY_INFORMATION, ppsecuritydescriptor: *mut super::super::PSECURITY_DESCRIPTOR) -> super::super::super::Foundation::BOOLEAN { @@ -187,7 +178,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(core::ptr::null()))) + AuditSetGlobalSaclA(objecttypename.param().abi(), core::mem::transmute(acl.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn AuditSetGlobalSaclW(objecttypename: P0, acl: Option<*const super::super::ACL>) -> super::super::super::Foundation::BOOLEAN @@ -195,23 +186,17 @@ 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(core::ptr::null()))) + AuditSetGlobalSaclW(objecttypename.param().abi(), core::mem::transmute(acl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn AuditSetPerUserPolicy(psid: P0, pauditpolicy: &[AUDIT_POLICY_INFORMATION]) -> super::super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn AuditSetPerUserPolicy(psid: super::super::PSID, pauditpolicy: &[AUDIT_POLICY_INFORMATION]) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("advapi32.dll" "system" fn AuditSetPerUserPolicy(psid : super::super:: PSID, pauditpolicy : *const AUDIT_POLICY_INFORMATION, dwpolicycount : u32) -> super::super::super::Foundation:: BOOLEAN); - AuditSetPerUserPolicy(psid.param().abi(), core::mem::transmute(pauditpolicy.as_ptr()), pauditpolicy.len().try_into().unwrap()) + AuditSetPerUserPolicy(core::mem::transmute(psid), core::mem::transmute(pauditpolicy.as_ptr()), pauditpolicy.len().try_into().unwrap()) } #[inline] -pub unsafe fn AuditSetSecurity(securityinformation: super::super::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P1) -> super::super::super::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn AuditSetSecurity(securityinformation: super::super::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::PSECURITY_DESCRIPTOR) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("advapi32.dll" "system" fn AuditSetSecurity(securityinformation : super::super:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super:: PSECURITY_DESCRIPTOR) -> super::super::super::Foundation:: BOOLEAN); - AuditSetSecurity(core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()) + AuditSetSecurity(core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)) } #[inline] pub unsafe fn AuditSetSystemPolicy(pauditpolicy: &[AUDIT_POLICY_INFORMATION]) -> super::super::super::Foundation::BOOLEAN { @@ -250,13 +235,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(core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(rettargetinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(retactualsize.unwrap_or(core::ptr::null_mut()))) + CredUnmarshalTargetInfo(core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(rettargetinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(retactualsize.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(phcontext), core::mem::transmute(pmessage), core::mem::transmute(messageseqno), core::mem::transmute(pfqop.unwrap_or(core::ptr::null_mut()))) + DecryptMessage(core::mem::transmute(phcontext), core::mem::transmute(pmessage), core::mem::transmute(messageseqno), core::mem::transmute(pfqop.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -314,24 +299,24 @@ pub unsafe fn FreeCredentialsHandle(phcredential: *const super::super::Credentia FreeCredentialsHandle(core::mem::transmute(phcredential)).ok() } #[inline] -pub unsafe fn GetComputerObjectNameA(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: windows_core::PSTR, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN { +pub unsafe fn GetComputerObjectNameA(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: Option, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("secur32.dll" "system" fn GetComputerObjectNameA(nameformat : EXTENDED_NAME_FORMAT, lpnamebuffer : windows_core::PSTR, nsize : *mut u32) -> super::super::super::Foundation:: BOOLEAN); - GetComputerObjectNameA(core::mem::transmute(nameformat), core::mem::transmute(lpnamebuffer), core::mem::transmute(nsize)) + GetComputerObjectNameA(core::mem::transmute(nameformat), core::mem::transmute(lpnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } #[inline] -pub unsafe fn GetComputerObjectNameW(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: windows_core::PWSTR, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN { +pub unsafe fn GetComputerObjectNameW(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: Option, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("secur32.dll" "system" fn GetComputerObjectNameW(nameformat : EXTENDED_NAME_FORMAT, lpnamebuffer : windows_core::PWSTR, nsize : *mut u32) -> super::super::super::Foundation:: BOOLEAN); - GetComputerObjectNameW(core::mem::transmute(nameformat), core::mem::transmute(lpnamebuffer), core::mem::transmute(nsize)) + GetComputerObjectNameW(core::mem::transmute(nameformat), core::mem::transmute(lpnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } #[inline] -pub unsafe fn GetUserNameExA(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: windows_core::PSTR, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN { +pub unsafe fn GetUserNameExA(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: Option, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("secur32.dll" "system" fn GetUserNameExA(nameformat : EXTENDED_NAME_FORMAT, lpnamebuffer : windows_core::PSTR, nsize : *mut u32) -> super::super::super::Foundation:: BOOLEAN); - GetUserNameExA(core::mem::transmute(nameformat), core::mem::transmute(lpnamebuffer), core::mem::transmute(nsize)) + GetUserNameExA(core::mem::transmute(nameformat), core::mem::transmute(lpnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } #[inline] -pub unsafe fn GetUserNameExW(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: windows_core::PWSTR, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN { +pub unsafe fn GetUserNameExW(nameformat: EXTENDED_NAME_FORMAT, lpnamebuffer: Option, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("secur32.dll" "system" fn GetUserNameExW(nameformat : EXTENDED_NAME_FORMAT, lpnamebuffer : windows_core::PWSTR, nsize : *mut u32) -> super::super::super::Foundation:: BOOLEAN); - GetUserNameExW(core::mem::transmute(nameformat), core::mem::transmute(lpnamebuffer), core::mem::transmute(nsize)) + GetUserNameExW(core::mem::transmute(nameformat), core::mem::transmute(lpnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -376,18 +361,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(core::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), - core::mem::transmute(psztargetname.unwrap_or(core::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psztargetname.unwrap_or(core::mem::zeroed())), core::mem::transmute(fcontextreq), core::mem::transmute(reserved1), core::mem::transmute(targetdatarep), - core::mem::transmute(pinput.unwrap_or(core::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_Security_Credentials")] @@ -395,44 +380,34 @@ 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(core::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), - core::mem::transmute(psztargetname.unwrap_or(core::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psztargetname.unwrap_or(core::mem::zeroed())), core::mem::transmute(fcontextreq), core::mem::transmute(reserved1), core::mem::transmute(targetdatarep), - core::mem::transmute(pinput.unwrap_or(core::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn LsaAddAccountRights(policyhandle: P0, accountsid: P1, userrights: &[LSA_UNICODE_STRING]) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn LsaAddAccountRights(policyhandle: LSA_HANDLE, accountsid: super::super::PSID, userrights: &[LSA_UNICODE_STRING]) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaAddAccountRights(policyhandle : LSA_HANDLE, accountsid : super::super:: PSID, userrights : *const LSA_UNICODE_STRING, countofrights : u32) -> super::super::super::Foundation:: NTSTATUS); - LsaAddAccountRights(policyhandle.param().abi(), accountsid.param().abi(), core::mem::transmute(userrights.as_ptr()), userrights.len().try_into().unwrap()) + LsaAddAccountRights(core::mem::transmute(policyhandle), core::mem::transmute(accountsid), core::mem::transmute(userrights.as_ptr()), userrights.len().try_into().unwrap()) } #[inline] -pub unsafe fn LsaCallAuthenticationPackage(lsahandle: P0, authenticationpackage: u32, protocolsubmitbuffer: *const core::ffi::c_void, submitbufferlength: u32, protocolreturnbuffer: Option<*mut *mut core::ffi::c_void>, returnbufferlength: Option<*mut u32>, protocolstatus: Option<*mut i32>) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaCallAuthenticationPackage(lsahandle: super::super::super::Foundation::HANDLE, authenticationpackage: u32, protocolsubmitbuffer: *const core::ffi::c_void, submitbufferlength: u32, protocolreturnbuffer: Option<*mut *mut core::ffi::c_void>, returnbufferlength: Option<*mut u32>, protocolstatus: Option<*mut i32>) -> super::super::super::Foundation::NTSTATUS { 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(), core::mem::transmute(authenticationpackage), core::mem::transmute(protocolsubmitbuffer), core::mem::transmute(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()))) + LsaCallAuthenticationPackage(core::mem::transmute(lsahandle), core::mem::transmute(authenticationpackage), core::mem::transmute(protocolsubmitbuffer), core::mem::transmute(submitbufferlength), core::mem::transmute(protocolreturnbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnbufferlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(protocolstatus.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn LsaClose(objecthandle: P0) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaClose(objecthandle: LSA_HANDLE) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaClose(objecthandle : LSA_HANDLE) -> super::super::super::Foundation:: NTSTATUS); - LsaClose(objecthandle.param().abi()) + LsaClose(core::mem::transmute(objecthandle)) } #[inline] pub unsafe fn LsaConnectUntrusted(lsahandle: *mut super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::NTSTATUS { @@ -440,46 +415,29 @@ pub unsafe fn LsaConnectUntrusted(lsahandle: *mut super::super::super::Foundatio LsaConnectUntrusted(core::mem::transmute(lsahandle)) } #[inline] -pub unsafe fn LsaCreateTrustedDomainEx(policyhandle: P0, trusteddomaininformation: *const TRUSTED_DOMAIN_INFORMATION_EX, authenticationinformation: *const TRUSTED_DOMAIN_AUTH_INFORMATION, desiredaccess: u32, trusteddomainhandle: *mut LSA_HANDLE) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaCreateTrustedDomainEx(policyhandle: LSA_HANDLE, trusteddomaininformation: *const TRUSTED_DOMAIN_INFORMATION_EX, authenticationinformation: *const TRUSTED_DOMAIN_AUTH_INFORMATION, desiredaccess: u32, trusteddomainhandle: *mut LSA_HANDLE) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaCreateTrustedDomainEx(policyhandle : LSA_HANDLE, trusteddomaininformation : *const TRUSTED_DOMAIN_INFORMATION_EX, authenticationinformation : *const TRUSTED_DOMAIN_AUTH_INFORMATION, desiredaccess : u32, trusteddomainhandle : *mut LSA_HANDLE) -> super::super::super::Foundation:: NTSTATUS); - LsaCreateTrustedDomainEx(policyhandle.param().abi(), core::mem::transmute(trusteddomaininformation), core::mem::transmute(authenticationinformation), core::mem::transmute(desiredaccess), core::mem::transmute(trusteddomainhandle)) + LsaCreateTrustedDomainEx(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomaininformation), core::mem::transmute(authenticationinformation), core::mem::transmute(desiredaccess), core::mem::transmute(trusteddomainhandle)) } #[inline] -pub unsafe fn LsaDeleteTrustedDomain(policyhandle: P0, trusteddomainsid: P1) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn LsaDeleteTrustedDomain(policyhandle: LSA_HANDLE, trusteddomainsid: super::super::PSID) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaDeleteTrustedDomain(policyhandle : LSA_HANDLE, trusteddomainsid : super::super:: PSID) -> super::super::super::Foundation:: NTSTATUS); - LsaDeleteTrustedDomain(policyhandle.param().abi(), trusteddomainsid.param().abi()) + LsaDeleteTrustedDomain(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainsid)) } #[inline] -pub unsafe fn LsaDeregisterLogonProcess(lsahandle: P0) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaDeregisterLogonProcess(lsahandle: super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn LsaDeregisterLogonProcess(lsahandle : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: NTSTATUS); - LsaDeregisterLogonProcess(lsahandle.param().abi()) + LsaDeregisterLogonProcess(core::mem::transmute(lsahandle)) } #[inline] -pub unsafe fn LsaEnumerateAccountRights(policyhandle: P0, accountsid: P1, userrights: *mut *mut LSA_UNICODE_STRING, countofrights: *mut u32) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn LsaEnumerateAccountRights(policyhandle: LSA_HANDLE, accountsid: super::super::PSID, userrights: *mut *mut LSA_UNICODE_STRING, countofrights: *mut u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaEnumerateAccountRights(policyhandle : LSA_HANDLE, accountsid : super::super:: PSID, userrights : *mut *mut LSA_UNICODE_STRING, countofrights : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - LsaEnumerateAccountRights(policyhandle.param().abi(), accountsid.param().abi(), core::mem::transmute(userrights), core::mem::transmute(countofrights)) + LsaEnumerateAccountRights(core::mem::transmute(policyhandle), core::mem::transmute(accountsid), core::mem::transmute(userrights), core::mem::transmute(countofrights)) } #[inline] -pub unsafe fn LsaEnumerateAccountsWithUserRight(policyhandle: P0, userright: Option<*const LSA_UNICODE_STRING>, buffer: *mut *mut core::ffi::c_void, countreturned: *mut u32) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaEnumerateAccountsWithUserRight(policyhandle: LSA_HANDLE, userright: Option<*const LSA_UNICODE_STRING>, buffer: *mut *mut core::ffi::c_void, countreturned: *mut u32) -> super::super::super::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(buffer), core::mem::transmute(countreturned)) + LsaEnumerateAccountsWithUserRight(core::mem::transmute(policyhandle), core::mem::transmute(userright.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer), core::mem::transmute(countreturned)) } #[inline] pub unsafe fn LsaEnumerateLogonSessions(logonsessioncount: *mut u32, logonsessionlist: *mut *mut super::super::super::Foundation::LUID) -> super::super::super::Foundation::NTSTATUS { @@ -487,25 +445,19 @@ pub unsafe fn LsaEnumerateLogonSessions(logonsessioncount: *mut u32, logonsessio LsaEnumerateLogonSessions(core::mem::transmute(logonsessioncount), core::mem::transmute(logonsessionlist)) } #[inline] -pub unsafe fn LsaEnumerateTrustedDomains(policyhandle: P0, enumerationcontext: *mut u32, buffer: *mut *mut core::ffi::c_void, preferedmaximumlength: u32, countreturned: *mut u32) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaEnumerateTrustedDomains(policyhandle: LSA_HANDLE, enumerationcontext: *mut u32, buffer: *mut *mut core::ffi::c_void, preferedmaximumlength: u32, countreturned: *mut u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaEnumerateTrustedDomains(policyhandle : LSA_HANDLE, enumerationcontext : *mut u32, buffer : *mut *mut core::ffi::c_void, preferedmaximumlength : u32, countreturned : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - LsaEnumerateTrustedDomains(policyhandle.param().abi(), core::mem::transmute(enumerationcontext), core::mem::transmute(buffer), core::mem::transmute(preferedmaximumlength), core::mem::transmute(countreturned)) + LsaEnumerateTrustedDomains(core::mem::transmute(policyhandle), core::mem::transmute(enumerationcontext), core::mem::transmute(buffer), core::mem::transmute(preferedmaximumlength), core::mem::transmute(countreturned)) } #[inline] -pub unsafe fn LsaEnumerateTrustedDomainsEx(policyhandle: P0, enumerationcontext: *mut u32, buffer: *mut *mut core::ffi::c_void, preferedmaximumlength: u32, countreturned: *mut u32) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaEnumerateTrustedDomainsEx(policyhandle: LSA_HANDLE, enumerationcontext: *mut u32, buffer: *mut *mut core::ffi::c_void, preferedmaximumlength: u32, countreturned: *mut u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaEnumerateTrustedDomainsEx(policyhandle : LSA_HANDLE, enumerationcontext : *mut u32, buffer : *mut *mut core::ffi::c_void, preferedmaximumlength : u32, countreturned : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - LsaEnumerateTrustedDomainsEx(policyhandle.param().abi(), core::mem::transmute(enumerationcontext), core::mem::transmute(buffer), core::mem::transmute(preferedmaximumlength), core::mem::transmute(countreturned)) + LsaEnumerateTrustedDomainsEx(core::mem::transmute(policyhandle), core::mem::transmute(enumerationcontext), core::mem::transmute(buffer), core::mem::transmute(preferedmaximumlength), core::mem::transmute(countreturned)) } #[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(core::ptr::null()))) + LsaFreeMemory(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn LsaFreeReturnBuffer(buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { @@ -515,7 +467,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(core::ptr::null())), core::mem::transmute(capids), core::mem::transmute(capidcount)) + LsaGetAppliedCAPIDs(core::mem::transmute(systemname.unwrap_or(core::mem::zeroed())), core::mem::transmute(capids), core::mem::transmute(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 { @@ -523,19 +475,16 @@ pub unsafe fn LsaGetLogonSessionData(logonid: *const super::super::super::Founda LsaGetLogonSessionData(core::mem::transmute(logonid), core::mem::transmute(pplogonsessiondata)) } #[inline] -pub unsafe fn LsaLogonUser(lsahandle: P0, originname: *const LSA_STRING, logontype: SECURITY_LOGON_TYPE, authenticationpackage: u32, authenticationinformation: *const core::ffi::c_void, authenticationinformationlength: u32, localgroups: Option<*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 -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*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 { 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(), + core::mem::transmute(lsahandle), core::mem::transmute(originname), core::mem::transmute(logontype), core::mem::transmute(authenticationpackage), core::mem::transmute(authenticationinformation), core::mem::transmute(authenticationinformationlength), - core::mem::transmute(localgroups.unwrap_or(core::ptr::null())), + core::mem::transmute(localgroups.unwrap_or(core::mem::zeroed())), core::mem::transmute(sourcecontext), core::mem::transmute(profilebuffer), core::mem::transmute(profilebufferlength), @@ -546,65 +495,44 @@ where ) } #[inline] -pub unsafe fn LsaLookupAuthenticationPackage(lsahandle: P0, packagename: *const LSA_STRING, authenticationpackage: *mut u32) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaLookupAuthenticationPackage(lsahandle: super::super::super::Foundation::HANDLE, packagename: *const LSA_STRING, authenticationpackage: *mut u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn LsaLookupAuthenticationPackage(lsahandle : super::super::super::Foundation:: HANDLE, packagename : *const LSA_STRING, authenticationpackage : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - LsaLookupAuthenticationPackage(lsahandle.param().abi(), core::mem::transmute(packagename), core::mem::transmute(authenticationpackage)) + LsaLookupAuthenticationPackage(core::mem::transmute(lsahandle), core::mem::transmute(packagename), core::mem::transmute(authenticationpackage)) } #[inline] -pub unsafe fn LsaLookupNames(policyhandle: P0, count: u32, names: *const LSA_UNICODE_STRING, referenceddomains: *mut *mut LSA_REFERENCED_DOMAIN_LIST, sids: *mut *mut LSA_TRANSLATED_SID) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaLookupNames(policyhandle: LSA_HANDLE, count: u32, names: *const LSA_UNICODE_STRING, referenceddomains: *mut *mut LSA_REFERENCED_DOMAIN_LIST, sids: *mut *mut LSA_TRANSLATED_SID) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaLookupNames(policyhandle : LSA_HANDLE, count : u32, names : *const LSA_UNICODE_STRING, referenceddomains : *mut *mut LSA_REFERENCED_DOMAIN_LIST, sids : *mut *mut LSA_TRANSLATED_SID) -> super::super::super::Foundation:: NTSTATUS); - LsaLookupNames(policyhandle.param().abi(), core::mem::transmute(count), core::mem::transmute(names), core::mem::transmute(referenceddomains), core::mem::transmute(sids)) + LsaLookupNames(core::mem::transmute(policyhandle), core::mem::transmute(count), core::mem::transmute(names), core::mem::transmute(referenceddomains), core::mem::transmute(sids)) } #[inline] -pub unsafe fn LsaLookupNames2(policyhandle: P0, flags: u32, count: u32, names: *const LSA_UNICODE_STRING, referenceddomains: *mut *mut LSA_REFERENCED_DOMAIN_LIST, sids: *mut *mut LSA_TRANSLATED_SID2) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaLookupNames2(policyhandle: LSA_HANDLE, flags: u32, count: u32, names: *const LSA_UNICODE_STRING, referenceddomains: *mut *mut LSA_REFERENCED_DOMAIN_LIST, sids: *mut *mut LSA_TRANSLATED_SID2) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaLookupNames2(policyhandle : LSA_HANDLE, flags : u32, count : u32, names : *const LSA_UNICODE_STRING, referenceddomains : *mut *mut LSA_REFERENCED_DOMAIN_LIST, sids : *mut *mut LSA_TRANSLATED_SID2) -> super::super::super::Foundation:: NTSTATUS); - LsaLookupNames2(policyhandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(count), core::mem::transmute(names), core::mem::transmute(referenceddomains), core::mem::transmute(sids)) + LsaLookupNames2(core::mem::transmute(policyhandle), core::mem::transmute(flags), core::mem::transmute(count), core::mem::transmute(names), core::mem::transmute(referenceddomains), core::mem::transmute(sids)) } #[inline] -pub unsafe fn LsaLookupSids(policyhandle: P0, count: u32, sids: *const super::super::PSID, referenceddomains: *mut *mut LSA_REFERENCED_DOMAIN_LIST, names: *mut *mut LSA_TRANSLATED_NAME) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaLookupSids(policyhandle: LSA_HANDLE, count: u32, sids: *const super::super::PSID, referenceddomains: *mut *mut LSA_REFERENCED_DOMAIN_LIST, names: *mut *mut LSA_TRANSLATED_NAME) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaLookupSids(policyhandle : LSA_HANDLE, count : u32, sids : *const super::super:: PSID, referenceddomains : *mut *mut LSA_REFERENCED_DOMAIN_LIST, names : *mut *mut LSA_TRANSLATED_NAME) -> super::super::super::Foundation:: NTSTATUS); - LsaLookupSids(policyhandle.param().abi(), core::mem::transmute(count), core::mem::transmute(sids), core::mem::transmute(referenceddomains), core::mem::transmute(names)) + LsaLookupSids(core::mem::transmute(policyhandle), core::mem::transmute(count), core::mem::transmute(sids), core::mem::transmute(referenceddomains), core::mem::transmute(names)) } #[inline] -pub unsafe fn LsaLookupSids2(policyhandle: P0, lookupoptions: u32, count: u32, sids: *const super::super::PSID, referenceddomains: *mut *mut LSA_REFERENCED_DOMAIN_LIST, names: *mut *mut LSA_TRANSLATED_NAME) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaLookupSids2(policyhandle: LSA_HANDLE, lookupoptions: u32, count: u32, sids: *const super::super::PSID, referenceddomains: *mut *mut LSA_REFERENCED_DOMAIN_LIST, names: *mut *mut LSA_TRANSLATED_NAME) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaLookupSids2(policyhandle : LSA_HANDLE, lookupoptions : u32, count : u32, sids : *const super::super:: PSID, referenceddomains : *mut *mut LSA_REFERENCED_DOMAIN_LIST, names : *mut *mut LSA_TRANSLATED_NAME) -> super::super::super::Foundation:: NTSTATUS); - LsaLookupSids2(policyhandle.param().abi(), core::mem::transmute(lookupoptions), core::mem::transmute(count), core::mem::transmute(sids), core::mem::transmute(referenceddomains), core::mem::transmute(names)) + LsaLookupSids2(core::mem::transmute(policyhandle), core::mem::transmute(lookupoptions), core::mem::transmute(count), core::mem::transmute(sids), core::mem::transmute(referenceddomains), core::mem::transmute(names)) } #[inline] -pub unsafe fn LsaNtStatusToWinError(status: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn LsaNtStatusToWinError(status: super::super::super::Foundation::NTSTATUS) -> u32 { windows_targets::link!("advapi32.dll" "system" fn LsaNtStatusToWinError(status : super::super::super::Foundation:: NTSTATUS) -> u32); - LsaNtStatusToWinError(status.param().abi()) + LsaNtStatusToWinError(core::mem::transmute(status)) } #[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(core::ptr::null())), core::mem::transmute(objectattributes), core::mem::transmute(desiredaccess), core::mem::transmute(policyhandle)) + LsaOpenPolicy(core::mem::transmute(systemname.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectattributes), core::mem::transmute(desiredaccess), core::mem::transmute(policyhandle)) } #[inline] -pub unsafe fn LsaOpenTrustedDomainByName(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, desiredaccess: u32, trusteddomainhandle: *mut LSA_HANDLE) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaOpenTrustedDomainByName(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, desiredaccess: u32, trusteddomainhandle: *mut LSA_HANDLE) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaOpenTrustedDomainByName(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, desiredaccess : u32, trusteddomainhandle : *mut LSA_HANDLE) -> super::super::super::Foundation:: NTSTATUS); - LsaOpenTrustedDomainByName(policyhandle.param().abi(), core::mem::transmute(trusteddomainname), core::mem::transmute(desiredaccess), core::mem::transmute(trusteddomainhandle)) + LsaOpenTrustedDomainByName(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(desiredaccess), core::mem::transmute(trusteddomainhandle)) } #[inline] pub unsafe fn LsaQueryCAPs(capids: Option<&[super::super::PSID]>, caps: *mut *mut CENTRAL_ACCESS_POLICY, capcount: *mut u32) -> super::super::super::Foundation::NTSTATUS { @@ -612,53 +540,34 @@ pub unsafe fn LsaQueryCAPs(capids: Option<&[super::super::PSID]>, caps: *mut *mu LsaQueryCAPs(core::mem::transmute(capids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), capids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(caps), core::mem::transmute(capcount)) } #[inline] -pub unsafe fn LsaQueryDomainInformationPolicy(policyhandle: P0, informationclass: POLICY_DOMAIN_INFORMATION_CLASS, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaQueryDomainInformationPolicy(policyhandle: LSA_HANDLE, informationclass: POLICY_DOMAIN_INFORMATION_CLASS, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaQueryDomainInformationPolicy(policyhandle : LSA_HANDLE, informationclass : POLICY_DOMAIN_INFORMATION_CLASS, buffer : *mut *mut core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaQueryDomainInformationPolicy(policyhandle.param().abi(), core::mem::transmute(informationclass), core::mem::transmute(buffer)) + LsaQueryDomainInformationPolicy(core::mem::transmute(policyhandle), core::mem::transmute(informationclass), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn LsaQueryForestTrustInformation(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, foresttrustinfo: *mut *mut LSA_FOREST_TRUST_INFORMATION) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaQueryForestTrustInformation(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, foresttrustinfo: *mut *mut LSA_FOREST_TRUST_INFORMATION) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaQueryForestTrustInformation(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, foresttrustinfo : *mut *mut LSA_FOREST_TRUST_INFORMATION) -> super::super::super::Foundation:: NTSTATUS); - LsaQueryForestTrustInformation(policyhandle.param().abi(), core::mem::transmute(trusteddomainname), core::mem::transmute(foresttrustinfo)) + LsaQueryForestTrustInformation(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(foresttrustinfo)) } #[inline] -pub unsafe fn LsaQueryForestTrustInformation2(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, highestrecordtype: LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo: *mut *mut LSA_FOREST_TRUST_INFORMATION2) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaQueryForestTrustInformation2(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, highestrecordtype: LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo: *mut *mut LSA_FOREST_TRUST_INFORMATION2) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaQueryForestTrustInformation2(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, highestrecordtype : LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo : *mut *mut LSA_FOREST_TRUST_INFORMATION2) -> super::super::super::Foundation:: NTSTATUS); - LsaQueryForestTrustInformation2(policyhandle.param().abi(), core::mem::transmute(trusteddomainname), core::mem::transmute(highestrecordtype), core::mem::transmute(foresttrustinfo)) + LsaQueryForestTrustInformation2(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(highestrecordtype), core::mem::transmute(foresttrustinfo)) } #[inline] -pub unsafe fn LsaQueryInformationPolicy(policyhandle: P0, informationclass: POLICY_INFORMATION_CLASS, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaQueryInformationPolicy(policyhandle: LSA_HANDLE, informationclass: POLICY_INFORMATION_CLASS, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaQueryInformationPolicy(policyhandle : LSA_HANDLE, informationclass : POLICY_INFORMATION_CLASS, buffer : *mut *mut core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaQueryInformationPolicy(policyhandle.param().abi(), core::mem::transmute(informationclass), core::mem::transmute(buffer)) + LsaQueryInformationPolicy(core::mem::transmute(policyhandle), core::mem::transmute(informationclass), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn LsaQueryTrustedDomainInfo(policyhandle: P0, trusteddomainsid: P1, informationclass: TRUSTED_INFORMATION_CLASS, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn LsaQueryTrustedDomainInfo(policyhandle: LSA_HANDLE, trusteddomainsid: super::super::PSID, informationclass: TRUSTED_INFORMATION_CLASS, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaQueryTrustedDomainInfo(policyhandle : LSA_HANDLE, trusteddomainsid : super::super:: PSID, informationclass : TRUSTED_INFORMATION_CLASS, buffer : *mut *mut core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaQueryTrustedDomainInfo(policyhandle.param().abi(), trusteddomainsid.param().abi(), core::mem::transmute(informationclass), core::mem::transmute(buffer)) + LsaQueryTrustedDomainInfo(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainsid), core::mem::transmute(informationclass), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn LsaQueryTrustedDomainInfoByName(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, informationclass: TRUSTED_INFORMATION_CLASS, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaQueryTrustedDomainInfoByName(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, informationclass: TRUSTED_INFORMATION_CLASS, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaQueryTrustedDomainInfoByName(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, informationclass : TRUSTED_INFORMATION_CLASS, buffer : *mut *mut core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaQueryTrustedDomainInfoByName(policyhandle.param().abi(), core::mem::transmute(trusteddomainname), core::mem::transmute(informationclass), core::mem::transmute(buffer)) + LsaQueryTrustedDomainInfoByName(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(informationclass), core::mem::transmute(buffer)) } #[inline] pub unsafe fn LsaRegisterLogonProcess(logonprocessname: *const LSA_STRING, lsahandle: *mut super::super::super::Foundation::HANDLE, securitymode: *mut u32) -> super::super::super::Foundation::NTSTATUS { @@ -666,30 +575,22 @@ pub unsafe fn LsaRegisterLogonProcess(logonprocessname: *const LSA_STRING, lsaha LsaRegisterLogonProcess(core::mem::transmute(logonprocessname), core::mem::transmute(lsahandle), core::mem::transmute(securitymode)) } #[inline] -pub unsafe fn LsaRegisterPolicyChangeNotification(informationclass: POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle: P1) -> super::super::super::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn LsaRegisterPolicyChangeNotification(informationclass: POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle: super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn LsaRegisterPolicyChangeNotification(informationclass : POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: NTSTATUS); - LsaRegisterPolicyChangeNotification(core::mem::transmute(informationclass), notificationeventhandle.param().abi()) + LsaRegisterPolicyChangeNotification(core::mem::transmute(informationclass), core::mem::transmute(notificationeventhandle)) } #[inline] -pub unsafe fn LsaRemoveAccountRights(policyhandle: P0, accountsid: P1, allrights: P2, userrights: Option<&[LSA_UNICODE_STRING]>) -> super::super::super::Foundation::NTSTATUS +pub unsafe fn LsaRemoveAccountRights(policyhandle: LSA_HANDLE, accountsid: super::super::PSID, allrights: P2, userrights: Option<&[LSA_UNICODE_STRING]>) -> super::super::super::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LsaRemoveAccountRights(policyhandle : LSA_HANDLE, accountsid : super::super:: PSID, allrights : super::super::super::Foundation:: BOOLEAN, userrights : *const LSA_UNICODE_STRING, countofrights : u32) -> super::super::super::Foundation:: NTSTATUS); - LsaRemoveAccountRights(policyhandle.param().abi(), accountsid.param().abi(), allrights.param().abi(), core::mem::transmute(userrights.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), userrights.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + LsaRemoveAccountRights(core::mem::transmute(policyhandle), core::mem::transmute(accountsid), allrights.param().abi(), core::mem::transmute(userrights.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), userrights.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn LsaRetrievePrivateData(policyhandle: P0, keyname: *const LSA_UNICODE_STRING, privatedata: *mut *mut LSA_UNICODE_STRING) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaRetrievePrivateData(policyhandle: LSA_HANDLE, keyname: *const LSA_UNICODE_STRING, privatedata: *mut *mut LSA_UNICODE_STRING) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaRetrievePrivateData(policyhandle : LSA_HANDLE, keyname : *const LSA_UNICODE_STRING, privatedata : *mut *mut LSA_UNICODE_STRING) -> super::super::super::Foundation:: NTSTATUS); - LsaRetrievePrivateData(policyhandle.param().abi(), core::mem::transmute(keyname), core::mem::transmute(privatedata)) + LsaRetrievePrivateData(core::mem::transmute(policyhandle), core::mem::transmute(keyname), core::mem::transmute(privatedata)) } #[inline] pub unsafe fn LsaSetCAPs(capdns: Option<&[LSA_UNICODE_STRING]>, flags: u32) -> super::super::super::Foundation::NTSTATUS { @@ -697,71 +598,50 @@ pub unsafe fn LsaSetCAPs(capdns: Option<&[LSA_UNICODE_STRING]>, flags: u32) -> s LsaSetCAPs(core::mem::transmute(capdns.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), capdns.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) } #[inline] -pub unsafe fn LsaSetDomainInformationPolicy(policyhandle: P0, informationclass: POLICY_DOMAIN_INFORMATION_CLASS, buffer: Option<*const core::ffi::c_void>) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaSetDomainInformationPolicy(policyhandle: LSA_HANDLE, informationclass: POLICY_DOMAIN_INFORMATION_CLASS, buffer: Option<*const core::ffi::c_void>) -> super::super::super::Foundation::NTSTATUS { 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(), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::ptr::null()))) + LsaSetDomainInformationPolicy(core::mem::transmute(policyhandle), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn LsaSetForestTrustInformation(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION, checkonly: P3, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS +pub unsafe fn LsaSetForestTrustInformation(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION, checkonly: P3, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LsaSetForestTrustInformation(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, foresttrustinfo : *const LSA_FOREST_TRUST_INFORMATION, checkonly : super::super::super::Foundation:: BOOLEAN, collisioninfo : *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation:: NTSTATUS); - LsaSetForestTrustInformation(policyhandle.param().abi(), core::mem::transmute(trusteddomainname), core::mem::transmute(foresttrustinfo), checkonly.param().abi(), core::mem::transmute(collisioninfo)) + LsaSetForestTrustInformation(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(foresttrustinfo), checkonly.param().abi(), core::mem::transmute(collisioninfo)) } #[inline] -pub unsafe fn LsaSetForestTrustInformation2(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, highestrecordtype: LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION2, checkonly: P4, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS +pub unsafe fn LsaSetForestTrustInformation2(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, highestrecordtype: LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION2, checkonly: P4, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LsaSetForestTrustInformation2(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, highestrecordtype : LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo : *const LSA_FOREST_TRUST_INFORMATION2, checkonly : super::super::super::Foundation:: BOOLEAN, collisioninfo : *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation:: NTSTATUS); - LsaSetForestTrustInformation2(policyhandle.param().abi(), core::mem::transmute(trusteddomainname), core::mem::transmute(highestrecordtype), core::mem::transmute(foresttrustinfo), checkonly.param().abi(), core::mem::transmute(collisioninfo)) + LsaSetForestTrustInformation2(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(highestrecordtype), core::mem::transmute(foresttrustinfo), checkonly.param().abi(), core::mem::transmute(collisioninfo)) } #[inline] -pub unsafe fn LsaSetInformationPolicy(policyhandle: P0, informationclass: POLICY_INFORMATION_CLASS, buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaSetInformationPolicy(policyhandle: LSA_HANDLE, informationclass: POLICY_INFORMATION_CLASS, buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaSetInformationPolicy(policyhandle : LSA_HANDLE, informationclass : POLICY_INFORMATION_CLASS, buffer : *const core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaSetInformationPolicy(policyhandle.param().abi(), core::mem::transmute(informationclass), core::mem::transmute(buffer)) + LsaSetInformationPolicy(core::mem::transmute(policyhandle), core::mem::transmute(informationclass), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn LsaSetTrustedDomainInfoByName(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, informationclass: TRUSTED_INFORMATION_CLASS, buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaSetTrustedDomainInfoByName(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, informationclass: TRUSTED_INFORMATION_CLASS, buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaSetTrustedDomainInfoByName(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, informationclass : TRUSTED_INFORMATION_CLASS, buffer : *const core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaSetTrustedDomainInfoByName(policyhandle.param().abi(), core::mem::transmute(trusteddomainname), core::mem::transmute(informationclass), core::mem::transmute(buffer)) + LsaSetTrustedDomainInfoByName(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(informationclass), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn LsaSetTrustedDomainInformation(policyhandle: P0, trusteddomainsid: P1, informationclass: TRUSTED_INFORMATION_CLASS, buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn LsaSetTrustedDomainInformation(policyhandle: LSA_HANDLE, trusteddomainsid: super::super::PSID, informationclass: TRUSTED_INFORMATION_CLASS, buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaSetTrustedDomainInformation(policyhandle : LSA_HANDLE, trusteddomainsid : super::super:: PSID, informationclass : TRUSTED_INFORMATION_CLASS, buffer : *const core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaSetTrustedDomainInformation(policyhandle.param().abi(), trusteddomainsid.param().abi(), core::mem::transmute(informationclass), core::mem::transmute(buffer)) + LsaSetTrustedDomainInformation(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainsid), core::mem::transmute(informationclass), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn LsaStorePrivateData(policyhandle: P0, keyname: *const LSA_UNICODE_STRING, privatedata: Option<*const LSA_UNICODE_STRING>) -> super::super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn LsaStorePrivateData(policyhandle: LSA_HANDLE, keyname: *const LSA_UNICODE_STRING, privatedata: Option<*const LSA_UNICODE_STRING>) -> super::super::super::Foundation::NTSTATUS { 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(), core::mem::transmute(keyname), core::mem::transmute(privatedata.unwrap_or(core::ptr::null()))) + LsaStorePrivateData(core::mem::transmute(policyhandle), core::mem::transmute(keyname), core::mem::transmute(privatedata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn LsaUnregisterPolicyChangeNotification(informationclass: POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle: P1) -> super::super::super::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn LsaUnregisterPolicyChangeNotification(informationclass: POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle: super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn LsaUnregisterPolicyChangeNotification(informationclass : POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: NTSTATUS); - LsaUnregisterPolicyChangeNotification(core::mem::transmute(informationclass), notificationeventhandle.param().abi()) + LsaUnregisterPolicyChangeNotification(core::mem::transmute(informationclass), core::mem::transmute(notificationeventhandle)) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -873,12 +753,12 @@ where SLAcquireGenuineTicket(core::mem::transmute(ppticketblob), core::mem::transmute(pcbticketblob), pwsztemplateid.param().abi(), pwszserverurl.param().abi(), pwszclienttoken.param().abi()).ok() } #[inline] -pub unsafe fn SLActivateProduct(hslc: *const core::ffi::c_void, pproductskuid: *const windows_core::GUID, cbappspecificdata: u32, pvappspecificdata: Option<*const core::ffi::c_void>, pactivationinfo: Option<*const SL_ACTIVATION_INFO_HEADER>, pwszproxyserver: P5, wproxyport: u16) -> windows_core::Result<()> +pub unsafe fn SLActivateProduct(hslc: *const core::ffi::c_void, pproductskuid: *const windows_core::GUID, cbappspecificdata: Option, pvappspecificdata: Option<*const core::ffi::c_void>, pactivationinfo: Option<*const SL_ACTIVATION_INFO_HEADER>, pwszproxyserver: P5, wproxyport: Option) -> windows_core::Result<()> where P5: 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(core::mem::transmute(hslc), core::mem::transmute(pproductskuid), core::mem::transmute(cbappspecificdata), core::mem::transmute(pvappspecificdata.unwrap_or(core::ptr::null())), core::mem::transmute(pactivationinfo.unwrap_or(core::ptr::null())), pwszproxyserver.param().abi(), core::mem::transmute(wproxyport)).ok() + SLActivateProduct(core::mem::transmute(hslc), core::mem::transmute(pproductskuid), core::mem::transmute(cbappspecificdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvappspecificdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pactivationinfo.unwrap_or(core::mem::zeroed())), pwszproxyserver.param().abi(), core::mem::transmute(wproxyport.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SLClose(hslc: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -891,7 +771,7 @@ where P3: 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(core::mem::transmute(hslc), core::mem::transmute(pappid), core::mem::transmute(pproductskuid.unwrap_or(core::ptr::null())), pwszrightname.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() + SLConsumeRight(core::mem::transmute(hslc), core::mem::transmute(pappid), core::mem::transmute(pproductskuid.unwrap_or(core::mem::zeroed())), pwszrightname.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SLDepositOfflineConfirmationId(hslc: *const core::ffi::c_void, pproductskuid: *const windows_core::GUID, pwszinstallationid: P2, pwszconfirmationid: P3) -> windows_core::Result<()> @@ -909,7 +789,7 @@ where P4: 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(core::mem::transmute(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() + SLDepositOfflineConfirmationIdEx(core::mem::transmute(hslc), core::mem::transmute(pproductskuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pactivationinfo.unwrap_or(core::mem::zeroed())), pwszinstallationid.param().abi(), pwszconfirmationid.param().abi()).ok() } #[inline] pub unsafe fn SLFireEvent(hslc: *const core::ffi::c_void, pwszeventid: P1, papplicationid: *const windows_core::GUID) -> windows_core::Result<()> @@ -929,7 +809,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(core::mem::transmute(hslc), core::mem::transmute(pproductskuid.unwrap_or(core::ptr::null())), core::mem::transmute(pactivationinfo.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + SLGenerateOfflineInstallationIdEx(core::mem::transmute(hslc), core::mem::transmute(pproductskuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pactivationinfo.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn SLGetApplicationInformation(hslc: *const core::ffi::c_void, papplicationid: *const windows_core::GUID, pwszvaluename: P2, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -937,7 +817,7 @@ where P2: 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(core::mem::transmute(hslc), core::mem::transmute(papplicationid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() + SLGetApplicationInformation(core::mem::transmute(hslc), core::mem::transmute(papplicationid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } #[inline] pub unsafe fn SLGetGenuineInformation(pqueryid: *const windows_core::GUID, pwszvaluename: P1, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -945,7 +825,7 @@ where P1: 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(core::mem::transmute(pqueryid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() + SLGetGenuineInformation(core::mem::transmute(pqueryid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(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<()> { @@ -969,7 +849,7 @@ where P2: 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(core::mem::transmute(hslc), core::mem::transmute(psllicenseid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() + SLGetLicenseInformation(core::mem::transmute(hslc), core::mem::transmute(psllicenseid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(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: P3, pnstatuscount: *mut u32, pplicensingstatus: *mut *mut SL_LICENSING_STATUS) -> windows_core::Result<()> @@ -977,7 +857,7 @@ where P3: 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(core::mem::transmute(hslc), core::mem::transmute(pappid.unwrap_or(core::ptr::null())), core::mem::transmute(pproductskuid.unwrap_or(core::ptr::null())), pwszrightname.param().abi(), core::mem::transmute(pnstatuscount), core::mem::transmute(pplicensingstatus)).ok() + SLGetLicensingStatusInformation(core::mem::transmute(hslc), core::mem::transmute(pappid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pproductskuid.unwrap_or(core::mem::zeroed())), pwszrightname.param().abi(), core::mem::transmute(pnstatuscount), core::mem::transmute(pplicensingstatus)).ok() } #[inline] pub unsafe fn SLGetPKeyId(hslc: *const core::ffi::c_void, pwszpkeyalgorithm: P1, pwszpkeystring: P2, pbpkeyspecificdata: Option<&[u8]>) -> windows_core::Result @@ -995,7 +875,7 @@ where P2: 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(core::mem::transmute(hslc), core::mem::transmute(ppkeyid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() + SLGetPKeyInformation(core::mem::transmute(hslc), core::mem::transmute(ppkeyid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } #[inline] pub unsafe fn SLGetPolicyInformation(hslc: *const core::ffi::c_void, pwszvaluename: P1, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -1003,7 +883,7 @@ where P1: 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(core::mem::transmute(hslc), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() + SLGetPolicyInformation(core::mem::transmute(hslc), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } #[inline] pub unsafe fn SLGetPolicyInformationDWORD(hslc: *const core::ffi::c_void, pwszvaluename: P1) -> windows_core::Result @@ -1020,7 +900,7 @@ where P2: 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(core::mem::transmute(hslc), core::mem::transmute(pproductskuid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() + SLGetProductSkuInformation(core::mem::transmute(hslc), core::mem::transmute(pproductskuid), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } #[inline] pub unsafe fn SLGetReferralInformation(hslc: *const core::ffi::c_void, ereferraltype: SLREFERRALTYPE, pskuorappid: *const windows_core::GUID, pwszvaluename: P3) -> windows_core::Result @@ -1034,10 +914,10 @@ 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(core::mem::transmute(hslc), core::mem::transmute(equeryidtype), core::mem::transmute(pqueryid.unwrap_or(core::ptr::null())), core::mem::transmute(ereturnidtype), core::mem::transmute(pnreturnids), core::mem::transmute(ppreturnids)).ok() + SLGetSLIDList(core::mem::transmute(hslc), core::mem::transmute(equeryidtype), core::mem::transmute(pqueryid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ereturnidtype), core::mem::transmute(pnreturnids), core::mem::transmute(ppreturnids)).ok() } #[inline] -pub unsafe fn SLGetServerStatus(pwszserverurl: P0, pwszacquisitiontype: P1, pwszproxyserver: P2, wproxyport: u16) -> windows_core::Result +pub unsafe fn SLGetServerStatus(pwszserverurl: P0, pwszacquisitiontype: P1, pwszproxyserver: P2, wproxyport: Option) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, @@ -1045,7 +925,7 @@ where { windows_targets::link!("slcext.dll" "system" fn SLGetServerStatus(pwszserverurl : windows_core::PCWSTR, pwszacquisitiontype : windows_core::PCWSTR, pwszproxyserver : windows_core::PCWSTR, wproxyport : u16, phrstatus : *mut windows_core::HRESULT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SLGetServerStatus(pwszserverurl.param().abi(), pwszacquisitiontype.param().abi(), pwszproxyserver.param().abi(), core::mem::transmute(wproxyport), &mut result__).map(|| core::mem::transmute(result__)) + SLGetServerStatus(pwszserverurl.param().abi(), pwszacquisitiontype.param().abi(), pwszproxyserver.param().abi(), core::mem::transmute(wproxyport.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn SLGetServiceInformation(hslc: *const core::ffi::c_void, pwszvaluename: P1, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -1053,7 +933,7 @@ where P1: 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(core::mem::transmute(hslc), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() + SLGetServiceInformation(core::mem::transmute(hslc), pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } #[inline] pub unsafe fn SLGetWindowsInformation(pwszvaluename: P0, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -1061,7 +941,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(core::ptr::null_mut())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() + SLGetWindowsInformation(pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue)).ok() } #[inline] pub unsafe fn SLGetWindowsInformationDWORD(pwszvaluename: P0) -> windows_core::Result @@ -1091,7 +971,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(core::mem::transmute(pappid), core::mem::transmute(pgenuinestate), core::mem::transmute(puioptions.unwrap_or(core::ptr::null_mut()))).ok() + SLIsGenuineLocal(core::mem::transmute(pappid), core::mem::transmute(pgenuinestate), core::mem::transmute(puioptions.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SLOpen(phslc: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1104,16 +984,15 @@ 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(core::ptr::null_mut())), core::mem::transmute(databuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(datasize), core::mem::transmute(resultdatasize)).ok() + SLQueryLicenseValueFromApp(valuename.param().abi(), core::mem::transmute(valuetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(databuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(datasize), core::mem::transmute(resultdatasize)).ok() } #[inline] -pub unsafe fn SLRegisterEvent(hslc: Option<*const core::ffi::c_void>, pwszeventid: P1, papplicationid: *const windows_core::GUID, hevent: P3) -> windows_core::Result<()> +pub unsafe fn SLRegisterEvent(hslc: Option<*const core::ffi::c_void>, pwszeventid: P1, papplicationid: *const windows_core::GUID, hevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> where P1: windows_core::Param, - P3: 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(core::ptr::null())), pwszeventid.param().abi(), core::mem::transmute(papplicationid), hevent.param().abi()).ok() + SLRegisterEvent(core::mem::transmute(hslc.unwrap_or(core::mem::zeroed())), pwszeventid.param().abi(), core::mem::transmute(papplicationid), core::mem::transmute(hevent)).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<()> { @@ -1139,28 +1018,27 @@ pub unsafe fn SLUninstallProofOfPurchase(hslc: *const core::ffi::c_void, ppkeyid SLUninstallProofOfPurchase(core::mem::transmute(hslc), core::mem::transmute(ppkeyid)).ok() } #[inline] -pub unsafe fn SLUnregisterEvent(hslc: Option<*const core::ffi::c_void>, pwszeventid: P1, papplicationid: *const windows_core::GUID, hevent: P3) -> windows_core::Result<()> +pub unsafe fn SLUnregisterEvent(hslc: Option<*const core::ffi::c_void>, pwszeventid: P1, papplicationid: *const windows_core::GUID, hevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> where P1: windows_core::Param, - P3: 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(core::ptr::null())), pwszeventid.param().abi(), core::mem::transmute(papplicationid), hevent.param().abi()).ok() + SLUnregisterEvent(core::mem::transmute(hslc.unwrap_or(core::mem::zeroed())), pwszeventid.param().abi(), core::mem::transmute(papplicationid), core::mem::transmute(hevent)).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(core::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), - core::mem::transmute(pinput.unwrap_or(core::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(fcontextreq), core::mem::transmute(targetdatarep), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) } #[inline] @@ -1177,7 +1055,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(core::mem::transmute(contexthandle), core::mem::transmute(option), core::mem::transmute(value), core::mem::transmute(size), core::mem::transmute(needed.unwrap_or(core::ptr::null_mut()))).ok() + SaslGetContextOption(core::mem::transmute(contexthandle), core::mem::transmute(option), core::mem::transmute(value), core::mem::transmute(size), core::mem::transmute(needed.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SaslGetProfilePackageA(profilename: P0) -> windows_core::Result<*mut SecPkgInfoA> @@ -1217,18 +1095,18 @@ where { 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(core::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), psztargetname.param().abi(), core::mem::transmute(fcontextreq), core::mem::transmute(reserved1), core::mem::transmute(targetdatarep), - core::mem::transmute(pinput.unwrap_or(core::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_Security_Credentials")] @@ -1239,18 +1117,18 @@ where { 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(core::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcontext.unwrap_or(core::mem::zeroed())), psztargetname.param().abi(), core::mem::transmute(fcontextreq), core::mem::transmute(reserved1), core::mem::transmute(targetdatarep), - core::mem::transmute(pinput.unwrap_or(core::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), - core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(phnewcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcontextattr), - core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ptsexpiry.unwrap_or(core::mem::zeroed())), ) } #[cfg(feature = "Win32_Security_Credentials")] @@ -1349,7 +1227,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(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() + SspiCompareAuthIdentities(core::mem::transmute(authidentity1.unwrap_or(core::mem::zeroed())), core::mem::transmute(authidentity2.unwrap_or(core::mem::zeroed())), core::mem::transmute(samesupplieduser.unwrap_or(core::mem::zeroed())), core::mem::transmute(samesuppliedidentity.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SspiCopyAuthIdentity(authdata: *const core::ffi::c_void, authdatacopy: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1369,7 +1247,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(core::mem::transmute(pauthidentity), core::mem::transmute(ppszusername), core::mem::transmute(ppszdomainname), core::mem::transmute(ppszpackedcredentialsstring.unwrap_or(core::ptr::null_mut()))).ok() + SspiEncodeAuthIdentityAsStrings(core::mem::transmute(pauthidentity), core::mem::transmute(ppszusername), core::mem::transmute(ppszdomainname), core::mem::transmute(ppszpackedcredentialsstring.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SspiEncodeStringsAsAuthIdentity(pszusername: P0, pszdomainname: P1, pszpackedcredentialsstring: P2, ppauthidentity: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1397,12 +1275,12 @@ where P1: 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(core::ptr::null())), pszpackagename.param().abi(), core::mem::transmute(ppnewauthidentity)).ok() + SspiExcludePackage(core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), pszpackagename.param().abi(), core::mem::transmute(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(core::ptr::null()))) + SspiFreeAuthIdentity(core::mem::transmute(authdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SspiGetTargetHostName(psztargetname: P0) -> windows_core::Result @@ -1426,7 +1304,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(core::ptr::null()))) + SspiLocalFree(core::mem::transmute(databuffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SspiMarshalAuthIdentity(authidentity: *const core::ffi::c_void, authidentitylength: *mut u32, authidentitybytearray: *mut *mut i8) -> windows_core::Result<()> { @@ -1456,7 +1334,7 @@ where P3: 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(core::ptr::null())), core::mem::transmute(dwautherror), pszpackage.param().abi(), core::mem::transmute(pinputauthidentity.unwrap_or(core::ptr::null())), core::mem::transmute(ppauthidentity), core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)) + SspiPromptForCredentialsA(psztargetname.param().abi(), core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwautherror), pszpackage.param().abi(), core::mem::transmute(pinputauthidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppauthidentity), core::mem::transmute(pfsave.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn SspiPromptForCredentialsW(psztargetname: P0, puiinfo: Option<*const core::ffi::c_void>, dwautherror: u32, pszpackage: P3, pinputauthidentity: Option<*const core::ffi::c_void>, ppauthidentity: *mut *mut core::ffi::c_void, pfsave: Option<*mut i32>, dwflags: u32) -> u32 @@ -1465,7 +1343,7 @@ where P3: 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(core::ptr::null())), core::mem::transmute(dwautherror), pszpackage.param().abi(), core::mem::transmute(pinputauthidentity.unwrap_or(core::ptr::null())), core::mem::transmute(ppauthidentity), core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)) + SspiPromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwautherror), pszpackage.param().abi(), core::mem::transmute(pinputauthidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppauthidentity), core::mem::transmute(pfsave.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn SspiSetChannelBindingFlags(pbindings: *mut SecPkgContext_Bindings, flags: u32) -> windows_core::Result<()> { @@ -1485,7 +1363,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(core::ptr::null()))) + SspiZeroAuthIdentity(core::mem::transmute(authdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn TokenBindingDeleteAllBindings() -> windows_core::Result<()> { @@ -1506,7 +1384,7 @@ where P1: 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(core::mem::transmute(keytype), targeturl.param().abi(), core::mem::transmute(bindingtype), core::mem::transmute(tlsekm), core::mem::transmute(tlsekmsize), core::mem::transmute(extensionformat), core::mem::transmute(extensiondata), core::mem::transmute(tokenbinding), core::mem::transmute(tokenbindingsize), core::mem::transmute(resultdata.unwrap_or(core::ptr::null_mut()))).ok() + TokenBindingGenerateBinding(core::mem::transmute(keytype), targeturl.param().abi(), core::mem::transmute(bindingtype), core::mem::transmute(tlsekm), core::mem::transmute(tlsekmsize), core::mem::transmute(extensionformat), core::mem::transmute(extensiondata), core::mem::transmute(tokenbinding), core::mem::transmute(tokenbindingsize), core::mem::transmute(resultdata.unwrap_or(core::mem::zeroed()))).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> { @@ -1552,20 +1430,20 @@ pub unsafe fn TokenBindingVerifyMessage(tokenbindingmessage: *const core::ffi::c TokenBindingVerifyMessage(core::mem::transmute(tokenbindingmessage), core::mem::transmute(tokenbindingmessagesize), core::mem::transmute(keytype), core::mem::transmute(tlsekm), core::mem::transmute(tlsekmsize), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn TranslateNameA(lpaccountname: P0, accountnameformat: EXTENDED_NAME_FORMAT, desirednameformat: EXTENDED_NAME_FORMAT, lptranslatedname: windows_core::PSTR, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN +pub unsafe fn TranslateNameA(lpaccountname: P0, accountnameformat: EXTENDED_NAME_FORMAT, desirednameformat: EXTENDED_NAME_FORMAT, lptranslatedname: Option, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn TranslateNameA(lpaccountname : windows_core::PCSTR, accountnameformat : EXTENDED_NAME_FORMAT, desirednameformat : EXTENDED_NAME_FORMAT, lptranslatedname : windows_core::PSTR, nsize : *mut u32) -> super::super::super::Foundation:: BOOLEAN); - TranslateNameA(lpaccountname.param().abi(), core::mem::transmute(accountnameformat), core::mem::transmute(desirednameformat), core::mem::transmute(lptranslatedname), core::mem::transmute(nsize)) + TranslateNameA(lpaccountname.param().abi(), core::mem::transmute(accountnameformat), core::mem::transmute(desirednameformat), core::mem::transmute(lptranslatedname.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } #[inline] -pub unsafe fn TranslateNameW(lpaccountname: P0, accountnameformat: EXTENDED_NAME_FORMAT, desirednameformat: EXTENDED_NAME_FORMAT, lptranslatedname: windows_core::PWSTR, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN +pub unsafe fn TranslateNameW(lpaccountname: P0, accountnameformat: EXTENDED_NAME_FORMAT, desirednameformat: EXTENDED_NAME_FORMAT, lptranslatedname: Option, nsize: *mut u32) -> super::super::super::Foundation::BOOLEAN where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn TranslateNameW(lpaccountname : windows_core::PCWSTR, accountnameformat : EXTENDED_NAME_FORMAT, desirednameformat : EXTENDED_NAME_FORMAT, lptranslatedname : windows_core::PWSTR, nsize : *mut u32) -> super::super::super::Foundation:: BOOLEAN); - TranslateNameW(lpaccountname.param().abi(), core::mem::transmute(accountnameformat), core::mem::transmute(desirednameformat), core::mem::transmute(lptranslatedname), core::mem::transmute(nsize)) + TranslateNameW(lpaccountname.param().abi(), core::mem::transmute(accountnameformat), core::mem::transmute(desirednameformat), core::mem::transmute(lptranslatedname.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] 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 d6649dd881..b9f6542863 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 @@ -9,22 +9,20 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EditSecurity(hwndowner: P0, psi: P1) -> windows_core::Result<()> +pub unsafe fn EditSecurity(hwndowner: super::super::super::Foundation::HWND, psi: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("aclui.dll" "system" fn EditSecurity(hwndowner : super::super::super::Foundation:: HWND, psi : * mut core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EditSecurity(hwndowner.param().abi(), psi.param().abi()).ok() + EditSecurity(core::mem::transmute(hwndowner), psi.param().abi()).ok() } #[inline] -pub unsafe fn EditSecurityAdvanced(hwndowner: P0, psi: P1, usipage: SI_PAGE_TYPE) -> windows_core::Result<()> +pub unsafe fn EditSecurityAdvanced(hwndowner: super::super::super::Foundation::HWND, psi: P1, usipage: SI_PAGE_TYPE) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("aclui.dll" "system" fn EditSecurityAdvanced(hwndowner : super::super::super::Foundation:: HWND, psi : * mut core::ffi::c_void, usipage : SI_PAGE_TYPE) -> windows_core::HRESULT); - EditSecurityAdvanced(hwndowner.param().abi(), psi.param().abi(), core::mem::transmute(usipage)).ok() + EditSecurityAdvanced(core::mem::transmute(hwndowner), psi.param().abi(), core::mem::transmute(usipage)).ok() } pub const CFSTR_ACLUI_SID_INFO_LIST: windows_core::PCWSTR = windows_core::w!("CFSTR_ACLUI_SID_INFO_LIST"); pub const DOBJ_COND_NTACLS: i32 = 8i32; @@ -51,13 +49,11 @@ impl windows_core::TypeKind for EFFPERM_RESULT_LIST { windows_core::imp::define_interface!(IEffectivePermission, IEffectivePermission_Vtbl, 0x3853dc76_9f35_407c_88a1_d19344365fbc); windows_core::imp::interface_hierarchy!(IEffectivePermission, windows_core::IUnknown); impl IEffectivePermission { - pub unsafe fn GetEffectivePermission(&self, pguidobjecttype: *const windows_core::GUID, pusersid: P1, pszservername: P2, psd: P3, ppobjecttypelist: *mut *mut super::super::OBJECT_TYPE_LIST, pcobjecttypelistlength: *mut u32, ppgrantedaccesslist: *mut *mut u32, pcgrantedaccesslistlength: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetEffectivePermission(&self, pguidobjecttype: *const windows_core::GUID, pusersid: super::super::PSID, pszservername: P2, psd: super::super::PSECURITY_DESCRIPTOR, ppobjecttypelist: *mut *mut super::super::OBJECT_TYPE_LIST, pcobjecttypelistlength: *mut u32, ppgrantedaccesslist: *mut *mut u32, pcgrantedaccesslistlength: *mut u32) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEffectivePermission)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidobjecttype), pusersid.param().abi(), pszservername.param().abi(), psd.param().abi(), core::mem::transmute(ppobjecttypelist), core::mem::transmute(pcobjecttypelistlength), core::mem::transmute(ppgrantedaccesslist), core::mem::transmute(pcgrantedaccesslistlength)).ok() + (windows_core::Interface::vtable(self).GetEffectivePermission)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidobjecttype), core::mem::transmute(pusersid), pszservername.param().abi(), core::mem::transmute(psd), core::mem::transmute(ppobjecttypelist), core::mem::transmute(pcobjecttypelistlength), core::mem::transmute(ppgrantedaccesslist), core::mem::transmute(pcgrantedaccesslistlength)).ok() } } #[repr(C)] @@ -84,10 +80,10 @@ impl windows_core::RuntimeName for IEffectivePermission {} windows_core::imp::define_interface!(IEffectivePermission2, IEffectivePermission2_Vtbl, 0x941fabca_dd47_4fca_90bb_b0e10255f20d); windows_core::imp::interface_hierarchy!(IEffectivePermission2, windows_core::IUnknown); impl IEffectivePermission2 { - pub unsafe fn ComputeEffectivePermissionWithSecondarySecurity( + pub unsafe fn ComputeEffectivePermissionWithSecondarySecurity( &self, - psid: P0, - pdevicesid: P1, + psid: super::super::PSID, + pdevicesid: Option, pszservername: P2, psecurityobjects: *mut SECURITY_OBJECT, dwsecurityobjectcount: u32, @@ -102,25 +98,23 @@ impl IEffectivePermission2 { peffpermresultlists: *mut EFFPERM_RESULT_LIST, ) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { (windows_core::Interface::vtable(self).ComputeEffectivePermissionWithSecondarySecurity)( windows_core::Interface::as_raw(self), - psid.param().abi(), - pdevicesid.param().abi(), + core::mem::transmute(psid), + core::mem::transmute(pdevicesid.unwrap_or(core::mem::zeroed())), pszservername.param().abi(), core::mem::transmute(psecurityobjects), core::mem::transmute(dwsecurityobjectcount), - 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())), + core::mem::transmute(pusergroups.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthzusergroupsoperations.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdevicegroups.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthzdevicegroupsoperations.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthzuserclaims.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthzuserclaimsoperations.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthzdeviceclaims.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthzdeviceclaimsoperations.unwrap_or(core::mem::zeroed())), core::mem::transmute(peffpermresultlists), ) .ok() @@ -211,11 +205,8 @@ impl ISecurityInformation { { (windows_core::Interface::vtable(self).GetSecurity)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedinformation), core::mem::transmute(ppsecuritydescriptor), fdefault.param().abi()).ok() } - pub unsafe fn SetSecurity(&self, securityinformation: super::super::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSecurity)(windows_core::Interface::as_raw(self), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()).ok() + pub unsafe fn SetSecurity(&self, securityinformation: super::super::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::PSECURITY_DESCRIPTOR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSecurity)(windows_core::Interface::as_raw(self), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)).ok() } pub unsafe fn GetAccessRights(&self, pguidobjecttype: *const windows_core::GUID, dwflags: SECURITY_INFO_PAGE_FLAGS, ppaccess: *mut *mut SI_ACCESS, pcaccesses: *mut u32, pidefaultaccess: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAccessRights)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidobjecttype), core::mem::transmute(dwflags), core::mem::transmute(ppaccess), core::mem::transmute(pcaccesses), core::mem::transmute(pidefaultaccess)).ok() @@ -227,11 +218,8 @@ impl ISecurityInformation { (windows_core::Interface::vtable(self).GetInheritTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(ppinherittypes), core::mem::transmute(pcinherittypes)).ok() } #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn PropertySheetPageCallback(&self, hwnd: P0, umsg: super::super::super::UI::Controls::PSPCB_MESSAGE, upage: SI_PAGE_TYPE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PropertySheetPageCallback)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(umsg), core::mem::transmute(upage)).ok() + pub unsafe fn PropertySheetPageCallback(&self, hwnd: super::super::super::Foundation::HWND, umsg: super::super::super::UI::Controls::PSPCB_MESSAGE, upage: SI_PAGE_TYPE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PropertySheetPageCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(umsg), core::mem::transmute(upage)).ok() } } #[repr(C)] @@ -368,11 +356,8 @@ impl ISecurityInformation3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetFullResourceName)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn OpenElevatedEditor(&self, hwnd: P0, upage: SI_PAGE_TYPE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OpenElevatedEditor)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(upage)).ok() + pub unsafe fn OpenElevatedEditor(&self, hwnd: super::super::super::Foundation::HWND, upage: SI_PAGE_TYPE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OpenElevatedEditor)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(upage)).ok() } } #[repr(C)] 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 75179ca920..81b96627d1 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs @@ -1,31 +1,30 @@ #[cfg(feature = "Win32_Security_Authorization_UI")] pub mod UI; #[inline] -pub unsafe fn AuthzAccessCheck(flags: AUTHZ_ACCESS_CHECK_FLAGS, hauthzclientcontext: P1, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P3, psecuritydescriptor: P4, optionalsecuritydescriptorarray: Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *mut AUTHZ_ACCESS_REPLY, phaccesscheckresults: Option<*mut AUTHZ_ACCESS_CHECK_RESULTS_HANDLE>) -> windows_core::Result<()> -where - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn AuthzAccessCheck(flags: AUTHZ_ACCESS_CHECK_FLAGS, hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: Option, psecuritydescriptor: super::PSECURITY_DESCRIPTOR, optionalsecuritydescriptorarray: Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *mut AUTHZ_ACCESS_REPLY, phaccesscheckresults: Option<*mut AUTHZ_ACCESS_CHECK_RESULTS_HANDLE>) -> windows_core::Result<()> { 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(core::mem::transmute(flags), hauthzclientcontext.param().abi(), core::mem::transmute(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()), core::mem::transmute(preply), core::mem::transmute(phaccesscheckresults.unwrap_or(core::ptr::null_mut()))).ok() + AuthzAccessCheck( + core::mem::transmute(flags), + core::mem::transmute(hauthzclientcontext), + core::mem::transmute(prequest), + core::mem::transmute(hauditevent.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psecuritydescriptor), + 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()), + core::mem::transmute(preply), + core::mem::transmute(phaccesscheckresults.unwrap_or(core::mem::zeroed())), + ) + .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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzAddSidsToContext(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, 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<()> { 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(core::ptr::null())), core::mem::transmute(sidcount), core::mem::transmute(restrictedsids.unwrap_or(core::ptr::null())), core::mem::transmute(restrictedsidcount), core::mem::transmute(phnewauthzclientcontext)).ok() + AuthzAddSidsToContext(core::mem::transmute(hauthzclientcontext), core::mem::transmute(sids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidcount), core::mem::transmute(restrictedsids.unwrap_or(core::mem::zeroed())), core::mem::transmute(restrictedsidcount), core::mem::transmute(phnewauthzclientcontext)).ok() } #[inline] -pub unsafe fn AuthzCachedAccessCheck(flags: u32, haccesscheckresults: P1, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P3, preply: *mut AUTHZ_ACCESS_REPLY) -> windows_core::Result<()> -where - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn AuthzCachedAccessCheck(flags: u32, haccesscheckresults: AUTHZ_ACCESS_CHECK_RESULTS_HANDLE, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: Option, preply: *mut AUTHZ_ACCESS_REPLY) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzCachedAccessCheck(flags : u32, haccesscheckresults : AUTHZ_ACCESS_CHECK_RESULTS_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, hauditevent : AUTHZ_AUDIT_EVENT_HANDLE, preply : *mut AUTHZ_ACCESS_REPLY) -> super::super::Foundation:: BOOL); - AuthzCachedAccessCheck(core::mem::transmute(flags), haccesscheckresults.param().abi(), core::mem::transmute(prequest), hauditevent.param().abi(), core::mem::transmute(preply)).ok() + AuthzCachedAccessCheck(core::mem::transmute(flags), core::mem::transmute(haccesscheckresults), core::mem::transmute(prequest), core::mem::transmute(hauditevent.unwrap_or(core::mem::zeroed())), core::mem::transmute(preply)).ok() } #[inline] pub unsafe fn AuthzEnumerateSecurityEventSources(dwflags: u32, buffer: *mut AUTHZ_SOURCE_SCHEMA_REGISTRATION, pdwcount: *mut u32, pdwlength: *mut u32) -> windows_core::Result<()> { @@ -33,21 +32,17 @@ pub unsafe fn AuthzEnumerateSecurityEventSources(dwflags: u32, buffer: *mut AUTH AuthzEnumerateSecurityEventSources(core::mem::transmute(dwflags), core::mem::transmute(buffer), core::mem::transmute(pdwcount), core::mem::transmute(pdwlength)).ok() } #[inline] -pub unsafe fn AuthzEvaluateSacl(authzclientcontext: P0, prequest: *const AUTHZ_ACCESS_REQUEST, sacl: *const super::ACL, grantedaccess: u32, accessgranted: P4, pbgenerateaudit: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn AuthzEvaluateSacl(authzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, prequest: *const AUTHZ_ACCESS_REQUEST, sacl: *const super::ACL, grantedaccess: u32, accessgranted: P4, pbgenerateaudit: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("authz.dll" "system" fn AuthzEvaluateSacl(authzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, sacl : *const super:: ACL, grantedaccess : u32, accessgranted : super::super::Foundation:: BOOL, pbgenerateaudit : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - AuthzEvaluateSacl(authzclientcontext.param().abi(), core::mem::transmute(prequest), core::mem::transmute(sacl), core::mem::transmute(grantedaccess), accessgranted.param().abi(), core::mem::transmute(pbgenerateaudit)) + AuthzEvaluateSacl(core::mem::transmute(authzclientcontext), core::mem::transmute(prequest), core::mem::transmute(sacl), core::mem::transmute(grantedaccess), accessgranted.param().abi(), core::mem::transmute(pbgenerateaudit)) } #[inline] -pub unsafe fn AuthzFreeAuditEvent(hauditevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzFreeAuditEvent(hauditevent: AUTHZ_AUDIT_EVENT_HANDLE) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzFreeAuditEvent(hauditevent : AUTHZ_AUDIT_EVENT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzFreeAuditEvent(hauditevent.param().abi()).ok() + AuthzFreeAuditEvent(core::mem::transmute(hauditevent)).ok() } #[inline] pub unsafe fn AuthzFreeCentralAccessPolicyCache() -> windows_core::Result<()> { @@ -55,12 +50,9 @@ pub unsafe fn AuthzFreeCentralAccessPolicyCache() -> windows_core::Result<()> { AuthzFreeCentralAccessPolicyCache().ok() } #[inline] -pub unsafe fn AuthzFreeContext(hauthzclientcontext: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzFreeContext(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzFreeContext(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzFreeContext(hauthzclientcontext.param().abi()).ok() + AuthzFreeContext(core::mem::transmute(hauthzclientcontext)).ok() } #[inline] pub unsafe fn AuthzFreeHandle(haccesscheckresults: AUTHZ_ACCESS_CHECK_RESULTS_HANDLE) -> windows_core::Result<()> { @@ -68,72 +60,49 @@ pub unsafe fn AuthzFreeHandle(haccesscheckresults: AUTHZ_ACCESS_CHECK_RESULTS_HA AuthzFreeHandle(core::mem::transmute(haccesscheckresults)).ok() } #[inline] -pub unsafe fn AuthzFreeResourceManager(hauthzresourcemanager: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzFreeResourceManager(hauthzresourcemanager: AUTHZ_RESOURCE_MANAGER_HANDLE) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzFreeResourceManager(hauthzresourcemanager : AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation:: BOOL); - AuthzFreeResourceManager(hauthzresourcemanager.param().abi()).ok() + AuthzFreeResourceManager(core::mem::transmute(hauthzresourcemanager)).ok() } #[inline] -pub unsafe fn AuthzGetInformationFromContext(hauthzclientcontext: P0, infoclass: AUTHZ_CONTEXT_INFORMATION_CLASS, buffersize: u32, psizerequired: *mut u32, buffer: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzGetInformationFromContext(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, infoclass: AUTHZ_CONTEXT_INFORMATION_CLASS, buffersize: u32, psizerequired: *mut u32, buffer: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzGetInformationFromContext(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, infoclass : AUTHZ_CONTEXT_INFORMATION_CLASS, buffersize : u32, psizerequired : *mut u32, buffer : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - AuthzGetInformationFromContext(hauthzclientcontext.param().abi(), core::mem::transmute(infoclass), core::mem::transmute(buffersize), core::mem::transmute(psizerequired), core::mem::transmute(buffer)).ok() + AuthzGetInformationFromContext(core::mem::transmute(hauthzclientcontext), core::mem::transmute(infoclass), core::mem::transmute(buffersize), core::mem::transmute(psizerequired), core::mem::transmute(buffer)).ok() } #[inline] -pub unsafe fn AuthzInitializeCompoundContext(usercontext: P0, devicecontext: P1, phcompoundcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AuthzInitializeCompoundContext(usercontext: AUTHZ_CLIENT_CONTEXT_HANDLE, devicecontext: AUTHZ_CLIENT_CONTEXT_HANDLE, phcompoundcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzInitializeCompoundContext(usercontext : AUTHZ_CLIENT_CONTEXT_HANDLE, devicecontext : AUTHZ_CLIENT_CONTEXT_HANDLE, phcompoundcontext : *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeCompoundContext(usercontext.param().abi(), devicecontext.param().abi(), core::mem::transmute(phcompoundcontext)).ok() + AuthzInitializeCompoundContext(core::mem::transmute(usercontext), core::mem::transmute(devicecontext), core::mem::transmute(phcompoundcontext)).ok() } #[inline] -pub unsafe fn AuthzInitializeContextFromAuthzContext(flags: u32, hauthzclientcontext: P1, pexpirationtime: Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: *const core::ffi::c_void, phnewauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn AuthzInitializeContextFromAuthzContext(flags: u32, hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, pexpirationtime: Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: *const core::ffi::c_void, phnewauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> windows_core::Result<()> { 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(core::mem::transmute(flags), hauthzclientcontext.param().abi(), core::mem::transmute(pexpirationtime.unwrap_or(core::ptr::null())), core::mem::transmute(identifier), core::mem::transmute(dynamicgroupargs), core::mem::transmute(phnewauthzclientcontext)).ok() + AuthzInitializeContextFromAuthzContext(core::mem::transmute(flags), core::mem::transmute(hauthzclientcontext), core::mem::transmute(pexpirationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(identifier), core::mem::transmute(dynamicgroupargs), core::mem::transmute(phnewauthzclientcontext)).ok() } #[inline] -pub unsafe fn AuthzInitializeContextFromSid(flags: u32, usersid: P1, hauthzresourcemanager: P2, 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<()> -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn AuthzInitializeContextFromSid(flags: u32, usersid: super::PSID, hauthzresourcemanager: AUTHZ_RESOURCE_MANAGER_HANDLE, 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<()> { 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(core::mem::transmute(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())), core::mem::transmute(phauthzclientcontext)).ok() + AuthzInitializeContextFromSid(core::mem::transmute(flags), core::mem::transmute(usersid), core::mem::transmute(hauthzresourcemanager), core::mem::transmute(pexpirationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(identifier), core::mem::transmute(dynamicgroupargs.unwrap_or(core::mem::zeroed())), core::mem::transmute(phauthzclientcontext)).ok() } #[inline] -pub unsafe fn AuthzInitializeContextFromToken(flags: u32, tokenhandle: P1, hauthzresourcemanager: P2, 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<()> -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn AuthzInitializeContextFromToken(flags: u32, tokenhandle: super::super::Foundation::HANDLE, hauthzresourcemanager: AUTHZ_RESOURCE_MANAGER_HANDLE, 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<()> { 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(core::mem::transmute(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())), core::mem::transmute(phauthzclientcontext)).ok() + AuthzInitializeContextFromToken(core::mem::transmute(flags), core::mem::transmute(tokenhandle), core::mem::transmute(hauthzresourcemanager), core::mem::transmute(pexpirationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(identifier), core::mem::transmute(dynamicgroupargs.unwrap_or(core::mem::zeroed())), core::mem::transmute(phauthzclientcontext)).ok() } #[inline] -pub unsafe fn AuthzInitializeObjectAccessAuditEvent(flags: AUTHZ_INITIALIZE_OBJECT_ACCESS_AUDIT_EVENT_FLAGS, hauditeventtype: P1, szoperationtype: P2, szobjecttype: P3, szobjectname: P4, szadditionalinfo: P5, phauditevent: *mut AUTHZ_AUDIT_EVENT_HANDLE, dwadditionalparametercount: u32) -> windows_core::Result<()> +pub unsafe fn AuthzInitializeObjectAccessAuditEvent(flags: AUTHZ_INITIALIZE_OBJECT_ACCESS_AUDIT_EVENT_FLAGS, hauditeventtype: AUTHZ_AUDIT_EVENT_TYPE_HANDLE, szoperationtype: P2, szobjecttype: P3, szobjectname: P4, szadditionalinfo: P5, phauditevent: *mut AUTHZ_AUDIT_EVENT_HANDLE, dwadditionalparametercount: u32) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("authz.dll" "cdecl" fn AuthzInitializeObjectAccessAuditEvent(flags : AUTHZ_INITIALIZE_OBJECT_ACCESS_AUDIT_EVENT_FLAGS, hauditeventtype : AUTHZ_AUDIT_EVENT_TYPE_HANDLE, szoperationtype : windows_core::PCWSTR, szobjecttype : windows_core::PCWSTR, szobjectname : windows_core::PCWSTR, szadditionalinfo : windows_core::PCWSTR, phauditevent : *mut AUTHZ_AUDIT_EVENT_HANDLE, dwadditionalparametercount : u32) -> super::super::Foundation:: BOOL); - AuthzInitializeObjectAccessAuditEvent(core::mem::transmute(flags), hauditeventtype.param().abi(), szoperationtype.param().abi(), szobjecttype.param().abi(), szobjectname.param().abi(), szadditionalinfo.param().abi(), core::mem::transmute(phauditevent), core::mem::transmute(dwadditionalparametercount)).ok() + AuthzInitializeObjectAccessAuditEvent(core::mem::transmute(flags), core::mem::transmute(hauditeventtype), szoperationtype.param().abi(), szobjecttype.param().abi(), szobjectname.param().abi(), szadditionalinfo.param().abi(), core::mem::transmute(phauditevent), core::mem::transmute(dwadditionalparametercount)).ok() } #[inline] -pub unsafe fn AuthzInitializeObjectAccessAuditEvent2(flags: u32, hauditeventtype: P1, szoperationtype: P2, szobjecttype: P3, szobjectname: P4, szadditionalinfo: P5, szadditionalinfo2: P6, phauditevent: *mut AUTHZ_AUDIT_EVENT_HANDLE, dwadditionalparametercount: u32) -> windows_core::Result<()> +pub unsafe fn AuthzInitializeObjectAccessAuditEvent2(flags: u32, hauditeventtype: AUTHZ_AUDIT_EVENT_TYPE_HANDLE, szoperationtype: P2, szobjecttype: P3, szobjectname: P4, szadditionalinfo: P5, szadditionalinfo2: P6, phauditevent: *mut AUTHZ_AUDIT_EVENT_HANDLE, dwadditionalparametercount: u32) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, @@ -141,7 +110,7 @@ where P6: windows_core::Param, { windows_targets::link!("authz.dll" "cdecl" fn AuthzInitializeObjectAccessAuditEvent2(flags : u32, hauditeventtype : AUTHZ_AUDIT_EVENT_TYPE_HANDLE, szoperationtype : windows_core::PCWSTR, szobjecttype : windows_core::PCWSTR, szobjectname : windows_core::PCWSTR, szadditionalinfo : windows_core::PCWSTR, szadditionalinfo2 : windows_core::PCWSTR, phauditevent : *mut AUTHZ_AUDIT_EVENT_HANDLE, dwadditionalparametercount : u32) -> super::super::Foundation:: BOOL); - AuthzInitializeObjectAccessAuditEvent2(core::mem::transmute(flags), hauditeventtype.param().abi(), szoperationtype.param().abi(), szobjecttype.param().abi(), szobjectname.param().abi(), szadditionalinfo.param().abi(), szadditionalinfo2.param().abi(), core::mem::transmute(phauditevent), core::mem::transmute(dwadditionalparametercount)).ok() + AuthzInitializeObjectAccessAuditEvent2(core::mem::transmute(flags), core::mem::transmute(hauditeventtype), szoperationtype.param().abi(), szobjecttype.param().abi(), szobjectname.param().abi(), szadditionalinfo.param().abi(), szadditionalinfo2.param().abi(), core::mem::transmute(phauditevent), core::mem::transmute(dwadditionalparametercount)).ok() } #[inline] pub unsafe fn AuthzInitializeRemoteResourceManager(prpcinitinfo: *const AUTHZ_RPC_INIT_INFO_CLIENT, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> windows_core::Result<()> { @@ -149,17 +118,17 @@ pub unsafe fn AuthzInitializeRemoteResourceManager(prpcinitinfo: *const AUTHZ_RP AuthzInitializeRemoteResourceManager(core::mem::transmute(prpcinitinfo), core::mem::transmute(phauthzresourcemanager)).ok() } #[inline] -pub unsafe fn AuthzInitializeResourceManager(flags: u32, pfndynamicaccesscheck: PFN_AUTHZ_DYNAMIC_ACCESS_CHECK, pfncomputedynamicgroups: PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS, pfnfreedynamicgroups: PFN_AUTHZ_FREE_DYNAMIC_GROUPS, szresourcemanagername: P4, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> windows_core::Result<()> +pub unsafe fn AuthzInitializeResourceManager(flags: u32, pfndynamicaccesscheck: Option, pfncomputedynamicgroups: Option, pfnfreedynamicgroups: Option, szresourcemanagername: P4, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> windows_core::Result<()> where P4: windows_core::Param, { windows_targets::link!("authz.dll" "system" fn AuthzInitializeResourceManager(flags : u32, pfndynamicaccesscheck : PFN_AUTHZ_DYNAMIC_ACCESS_CHECK, pfncomputedynamicgroups : PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS, pfnfreedynamicgroups : PFN_AUTHZ_FREE_DYNAMIC_GROUPS, szresourcemanagername : windows_core::PCWSTR, phauthzresourcemanager : *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeResourceManager(core::mem::transmute(flags), core::mem::transmute(pfndynamicaccesscheck), core::mem::transmute(pfncomputedynamicgroups), core::mem::transmute(pfnfreedynamicgroups), szresourcemanagername.param().abi(), core::mem::transmute(phauthzresourcemanager)).ok() + AuthzInitializeResourceManager(core::mem::transmute(flags), core::mem::transmute(pfndynamicaccesscheck.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfncomputedynamicgroups.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnfreedynamicgroups.unwrap_or(core::mem::zeroed())), szresourcemanagername.param().abi(), core::mem::transmute(phauthzresourcemanager)).ok() } #[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<()> { +pub unsafe fn AuthzInitializeResourceManagerEx(flags: Option, 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(core::mem::transmute(flags), core::mem::transmute(pauthzinitinfo.unwrap_or(core::ptr::null())), core::mem::transmute(phauthzresourcemanager)).ok() + AuthzInitializeResourceManagerEx(core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthzinitinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(phauthzresourcemanager)).ok() } #[inline] pub unsafe fn AuthzInstallSecurityEventSource(dwflags: u32, pregistration: *const AUTHZ_SOURCE_SCHEMA_REGISTRATION) -> windows_core::Result<()> { @@ -167,44 +136,30 @@ pub unsafe fn AuthzInstallSecurityEventSource(dwflags: u32, pregistration: *cons AuthzInstallSecurityEventSource(core::mem::transmute(dwflags), core::mem::transmute(pregistration)).ok() } #[inline] -pub unsafe fn AuthzModifyClaims(hauthzclientcontext: P0, claimclass: AUTHZ_CONTEXT_INFORMATION_CLASS, pclaimoperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pclaims: Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzModifyClaims(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, claimclass: AUTHZ_CONTEXT_INFORMATION_CLASS, pclaimoperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pclaims: Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> windows_core::Result<()> { 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(), core::mem::transmute(claimclass), core::mem::transmute(pclaimoperations), core::mem::transmute(pclaims.unwrap_or(core::ptr::null()))).ok() + AuthzModifyClaims(core::mem::transmute(hauthzclientcontext), core::mem::transmute(claimclass), core::mem::transmute(pclaimoperations), core::mem::transmute(pclaims.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn AuthzModifySecurityAttributes(hauthzclientcontext: P0, poperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pattributes: Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzModifySecurityAttributes(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, poperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pattributes: Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> windows_core::Result<()> { 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(), core::mem::transmute(poperations), core::mem::transmute(pattributes.unwrap_or(core::ptr::null()))).ok() + AuthzModifySecurityAttributes(core::mem::transmute(hauthzclientcontext), core::mem::transmute(poperations), core::mem::transmute(pattributes.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzModifySids(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, sidclass: AUTHZ_CONTEXT_INFORMATION_CLASS, psidoperations: *const AUTHZ_SID_OPERATION, psids: Option<*const super::TOKEN_GROUPS>) -> windows_core::Result<()> { 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(), core::mem::transmute(sidclass), core::mem::transmute(psidoperations), core::mem::transmute(psids.unwrap_or(core::ptr::null()))).ok() + AuthzModifySids(core::mem::transmute(hauthzclientcontext), core::mem::transmute(sidclass), core::mem::transmute(psidoperations), core::mem::transmute(psids.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn AuthzOpenObjectAudit(flags: u32, hauthzclientcontext: P1, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P3, psecuritydescriptor: P4, optionalsecuritydescriptorarray: Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *const AUTHZ_ACCESS_REPLY) -> windows_core::Result<()> -where - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn AuthzOpenObjectAudit(flags: u32, hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: AUTHZ_AUDIT_EVENT_HANDLE, psecuritydescriptor: super::PSECURITY_DESCRIPTOR, optionalsecuritydescriptorarray: Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *const AUTHZ_ACCESS_REPLY) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzOpenObjectAudit(flags : u32, hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, hauditevent : AUTHZ_AUDIT_EVENT_HANDLE, psecuritydescriptor : super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorarray : *const super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorcount : u32, preply : *const AUTHZ_ACCESS_REPLY) -> super::super::Foundation:: BOOL); - AuthzOpenObjectAudit(core::mem::transmute(flags), hauthzclientcontext.param().abi(), core::mem::transmute(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()), core::mem::transmute(preply)).ok() + AuthzOpenObjectAudit(core::mem::transmute(flags), core::mem::transmute(hauthzclientcontext), core::mem::transmute(prequest), core::mem::transmute(hauditevent), core::mem::transmute(psecuritydescriptor), 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()), core::mem::transmute(preply)).ok() } #[cfg(feature = "Win32_System_Threading")] #[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(core::mem::transmute(phcapchangesubscription), core::mem::transmute(pfncapchangecallback), core::mem::transmute(pcallbackcontext.unwrap_or(core::ptr::null()))).ok() + AuthzRegisterCapChangeNotification(core::mem::transmute(phcapchangesubscription), core::mem::transmute(pfncapchangecallback), core::mem::transmute(pcallbackcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AuthzRegisterSecurityEventSource(dwflags: u32, szeventsourcename: P1, pheventprovider: *mut AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE) -> windows_core::Result<()> @@ -215,29 +170,19 @@ where AuthzRegisterSecurityEventSource(core::mem::transmute(dwflags), szeventsourcename.param().abi(), core::mem::transmute(pheventprovider)).ok() } #[inline] -pub unsafe fn AuthzReportSecurityEvent(dwflags: u32, heventprovider: AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE, dwauditid: u32, pusersid: P3, dwcount: u32) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn AuthzReportSecurityEvent(dwflags: u32, heventprovider: AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE, dwauditid: u32, pusersid: Option, dwcount: u32) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "cdecl" fn AuthzReportSecurityEvent(dwflags : u32, heventprovider : AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE, dwauditid : u32, pusersid : super:: PSID, dwcount : u32) -> super::super::Foundation:: BOOL); - AuthzReportSecurityEvent(core::mem::transmute(dwflags), core::mem::transmute(heventprovider), core::mem::transmute(dwauditid), pusersid.param().abi(), core::mem::transmute(dwcount)).ok() + AuthzReportSecurityEvent(core::mem::transmute(dwflags), core::mem::transmute(heventprovider), core::mem::transmute(dwauditid), core::mem::transmute(pusersid.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcount)).ok() } #[inline] -pub unsafe fn AuthzReportSecurityEventFromParams(dwflags: u32, heventprovider: AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE, dwauditid: u32, pusersid: P3, pparams: *const AUDIT_PARAMS) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn AuthzReportSecurityEventFromParams(dwflags: u32, heventprovider: AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE, dwauditid: u32, pusersid: Option, pparams: *const AUDIT_PARAMS) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzReportSecurityEventFromParams(dwflags : u32, heventprovider : AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE, dwauditid : u32, pusersid : super:: PSID, pparams : *const AUDIT_PARAMS) -> super::super::Foundation:: BOOL); - AuthzReportSecurityEventFromParams(core::mem::transmute(dwflags), core::mem::transmute(heventprovider), core::mem::transmute(dwauditid), pusersid.param().abi(), core::mem::transmute(pparams)).ok() + AuthzReportSecurityEventFromParams(core::mem::transmute(dwflags), core::mem::transmute(heventprovider), core::mem::transmute(dwauditid), core::mem::transmute(pusersid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pparams)).ok() } #[inline] -pub unsafe fn AuthzSetAppContainerInformation(hauthzclientcontext: P0, pappcontainersid: P1, pcapabilitysids: Option<&[super::SID_AND_ATTRIBUTES]>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AuthzSetAppContainerInformation(hauthzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, pappcontainersid: super::PSID, pcapabilitysids: Option<&[super::SID_AND_ATTRIBUTES]>) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzSetAppContainerInformation(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, pappcontainersid : super:: PSID, capabilitycount : u32, pcapabilitysids : *const super:: SID_AND_ATTRIBUTES) -> super::super::Foundation:: BOOL); - AuthzSetAppContainerInformation(hauthzclientcontext.param().abi(), pappcontainersid.param().abi(), pcapabilitysids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcapabilitysids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + AuthzSetAppContainerInformation(core::mem::transmute(hauthzclientcontext), core::mem::transmute(pappcontainersid), pcapabilitysids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcapabilitysids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[inline] pub unsafe fn AuthzUninstallSecurityEventSource(dwflags: u32, szeventsourcename: P1) -> windows_core::Result<()> @@ -248,12 +193,9 @@ where AuthzUninstallSecurityEventSource(core::mem::transmute(dwflags), szeventsourcename.param().abi()).ok() } #[inline] -pub unsafe fn AuthzUnregisterCapChangeNotification(hcapchangesubscription: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AuthzUnregisterCapChangeNotification(hcapchangesubscription: AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzUnregisterCapChangeNotification(hcapchangesubscription : AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE) -> super::super::Foundation:: BOOL); - AuthzUnregisterCapChangeNotification(hcapchangesubscription.param().abi()).ok() + AuthzUnregisterCapChangeNotification(core::mem::transmute(hcapchangesubscription)).ok() } #[inline] pub unsafe fn AuthzUnregisterSecurityEventSource(dwflags: u32, pheventprovider: *mut AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE) -> windows_core::Result<()> { @@ -282,7 +224,7 @@ where P1: 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(core::mem::transmute(pexplicitaccess), ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(core::ptr::null())), core::mem::transmute(accesspermissions), core::mem::transmute(accessmode), core::mem::transmute(inheritance)) + BuildImpersonateExplicitAccessWithNameA(core::mem::transmute(pexplicitaccess), ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed())), core::mem::transmute(accesspermissions), core::mem::transmute(accessmode), core::mem::transmute(inheritance)) } #[inline] pub unsafe fn BuildImpersonateExplicitAccessWithNameW(pexplicitaccess: *mut EXPLICIT_ACCESS_W, ptrusteename: P1, ptrustee: Option<*const TRUSTEE_W>, accesspermissions: u32, accessmode: ACCESS_MODE, inheritance: u32) @@ -290,50 +232,44 @@ where P1: 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(core::mem::transmute(pexplicitaccess), ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(core::ptr::null())), core::mem::transmute(accesspermissions), core::mem::transmute(accessmode), core::mem::transmute(inheritance)) + BuildImpersonateExplicitAccessWithNameW(core::mem::transmute(pexplicitaccess), ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed())), core::mem::transmute(accesspermissions), core::mem::transmute(accessmode), core::mem::transmute(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(core::mem::transmute(ptrustee), core::mem::transmute(pimpersonatetrustee.unwrap_or(core::ptr::null()))) + BuildImpersonateTrusteeA(core::mem::transmute(ptrustee), core::mem::transmute(pimpersonatetrustee.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(ptrustee), core::mem::transmute(pimpersonatetrustee.unwrap_or(core::ptr::null()))) + BuildImpersonateTrusteeW(core::mem::transmute(ptrustee), core::mem::transmute(pimpersonatetrustee.unwrap_or(core::mem::zeroed()))) } #[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: P6, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR -where - P6: windows_core::Param, -{ +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: Option, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), - core::mem::transmute(pgroup.unwrap_or(core::ptr::null())), + core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(plistofauditentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - poldsd.param().abi(), + core::mem::transmute(poldsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(psizenewsd), core::mem::transmute(pnewsd), ) } #[inline] -pub unsafe fn BuildSecurityDescriptorW(powner: Option<*const TRUSTEE_W>, pgroup: Option<*const TRUSTEE_W>, plistofaccessentries: Option<&[EXPLICIT_ACCESS_W]>, plistofauditentries: Option<&[EXPLICIT_ACCESS_W]>, poldsd: P6, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR -where - P6: windows_core::Param, -{ +pub unsafe fn BuildSecurityDescriptorW(powner: Option<*const TRUSTEE_W>, pgroup: Option<*const TRUSTEE_W>, plistofaccessentries: Option<&[EXPLICIT_ACCESS_W]>, plistofauditentries: Option<&[EXPLICIT_ACCESS_W]>, poldsd: Option, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), - core::mem::transmute(pgroup.unwrap_or(core::ptr::null())), + core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(plistofauditentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - poldsd.param().abi(), + core::mem::transmute(poldsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(psizenewsd), core::mem::transmute(pnewsd), ) @@ -355,88 +291,64 @@ where BuildTrusteeWithNameW(core::mem::transmute(ptrustee), pname.param().abi()) } #[inline] -pub unsafe fn BuildTrusteeWithObjectsAndNameA(ptrustee: *mut TRUSTEE_A, pobjname: Option<*const OBJECTS_AND_NAME_A>, objecttype: SE_OBJECT_TYPE, objecttypename: P3, inheritedobjecttypename: P4, name: P5) +pub unsafe fn BuildTrusteeWithObjectsAndNameA(ptrustee: *mut TRUSTEE_A, pobjname: Option<*const OBJECTS_AND_NAME_A>, objecttype: Option, objecttypename: P3, inheritedobjecttypename: P4, name: P5) where P3: windows_core::Param, P4: windows_core::Param, P5: 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(core::mem::transmute(ptrustee), core::mem::transmute(pobjname.unwrap_or(core::ptr::null())), core::mem::transmute(objecttype), objecttypename.param().abi(), inheritedobjecttypename.param().abi(), name.param().abi()) + BuildTrusteeWithObjectsAndNameA(core::mem::transmute(ptrustee), core::mem::transmute(pobjname.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), 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: P3, inheritedobjecttypename: P4, name: P5) +pub unsafe fn BuildTrusteeWithObjectsAndNameW(ptrustee: *mut TRUSTEE_W, pobjname: Option<*const OBJECTS_AND_NAME_W>, objecttype: Option, objecttypename: P3, inheritedobjecttypename: P4, name: P5) where P3: windows_core::Param, P4: windows_core::Param, P5: 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(core::mem::transmute(ptrustee), core::mem::transmute(pobjname.unwrap_or(core::ptr::null())), core::mem::transmute(objecttype), objecttypename.param().abi(), inheritedobjecttypename.param().abi(), name.param().abi()) + BuildTrusteeWithObjectsAndNameW(core::mem::transmute(ptrustee), core::mem::transmute(pobjname.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), 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: P4) -where - P4: windows_core::Param, -{ +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: Option) { 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(core::mem::transmute(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()) + BuildTrusteeWithObjectsAndSidA(core::mem::transmute(ptrustee), core::mem::transmute(pobjsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pobjectguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinheritedobjectguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid.unwrap_or(core::mem::zeroed()))) } #[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: P4) -where - P4: windows_core::Param, -{ +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: Option) { 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(core::mem::transmute(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()) + BuildTrusteeWithObjectsAndSidW(core::mem::transmute(ptrustee), core::mem::transmute(pobjsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pobjectguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinheritedobjectguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BuildTrusteeWithSidA(ptrustee: *mut TRUSTEE_A, psid: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn BuildTrusteeWithSidA(ptrustee: *mut TRUSTEE_A, psid: Option) { windows_targets::link!("advapi32.dll" "system" fn BuildTrusteeWithSidA(ptrustee : *mut TRUSTEE_A, psid : super:: PSID)); - BuildTrusteeWithSidA(core::mem::transmute(ptrustee), psid.param().abi()) + BuildTrusteeWithSidA(core::mem::transmute(ptrustee), core::mem::transmute(psid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BuildTrusteeWithSidW(ptrustee: *mut TRUSTEE_W, psid: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn BuildTrusteeWithSidW(ptrustee: *mut TRUSTEE_W, psid: Option) { windows_targets::link!("advapi32.dll" "system" fn BuildTrusteeWithSidW(ptrustee : *mut TRUSTEE_W, psid : super:: PSID)); - BuildTrusteeWithSidW(core::mem::transmute(ptrustee), psid.param().abi()) + BuildTrusteeWithSidW(core::mem::transmute(ptrustee), core::mem::transmute(psid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor: P0, requestedstringsdrevision: u32, securityinformation: super::OBJECT_SECURITY_INFORMATION, stringsecuritydescriptor: *mut windows_core::PSTR, stringsecuritydescriptorlen: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor: super::PSECURITY_DESCRIPTOR, requestedstringsdrevision: u32, securityinformation: super::OBJECT_SECURITY_INFORMATION, stringsecuritydescriptor: *mut windows_core::PSTR, stringsecuritydescriptorlen: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(requestedstringsdrevision), core::mem::transmute(securityinformation), core::mem::transmute(stringsecuritydescriptor), core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(core::ptr::null_mut()))).ok() + ConvertSecurityDescriptorToStringSecurityDescriptorA(core::mem::transmute(securitydescriptor), core::mem::transmute(requestedstringsdrevision), core::mem::transmute(securityinformation), core::mem::transmute(stringsecuritydescriptor), core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor: super::PSECURITY_DESCRIPTOR, requestedstringsdrevision: u32, securityinformation: super::OBJECT_SECURITY_INFORMATION, stringsecuritydescriptor: *mut windows_core::PWSTR, stringsecuritydescriptorlen: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(requestedstringsdrevision), core::mem::transmute(securityinformation), core::mem::transmute(stringsecuritydescriptor), core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(core::ptr::null_mut()))).ok() + ConvertSecurityDescriptorToStringSecurityDescriptorW(core::mem::transmute(securitydescriptor), core::mem::transmute(requestedstringsdrevision), core::mem::transmute(securityinformation), core::mem::transmute(stringsecuritydescriptor), core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn ConvertSidToStringSidA(sid: P0, stringsid: *mut windows_core::PSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ConvertSidToStringSidA(sid: super::PSID, stringsid: *mut windows_core::PSTR) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ConvertSidToStringSidA(sid : super:: PSID, stringsid : *mut windows_core::PSTR) -> super::super::Foundation:: BOOL); - ConvertSidToStringSidA(sid.param().abi(), core::mem::transmute(stringsid)).ok() + ConvertSidToStringSidA(core::mem::transmute(sid), core::mem::transmute(stringsid)).ok() } #[inline] -pub unsafe fn ConvertSidToStringSidW(sid: P0, stringsid: *mut windows_core::PWSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ConvertSidToStringSidW(sid: super::PSID, stringsid: *mut windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ConvertSidToStringSidW(sid : super:: PSID, stringsid : *mut windows_core::PWSTR) -> super::super::Foundation:: BOOL); - ConvertSidToStringSidW(sid.param().abi(), core::mem::transmute(stringsid)).ok() + ConvertSidToStringSidW(core::mem::transmute(sid), core::mem::transmute(stringsid)).ok() } #[inline] pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: Option<*mut u32>) -> windows_core::Result<()> @@ -444,7 +356,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(), core::mem::transmute(stringsdrevision), core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorsize.unwrap_or(core::ptr::null_mut()))).ok() + ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor.param().abi(), core::mem::transmute(stringsdrevision), core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: Option<*mut u32>) -> windows_core::Result<()> @@ -452,7 +364,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(), core::mem::transmute(stringsdrevision), core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorsize.unwrap_or(core::ptr::null_mut()))).ok() + ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor.param().abi(), core::mem::transmute(stringsdrevision), core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ConvertStringSidToSidA(stringsid: P0, sid: *mut super::PSID) -> windows_core::Result<()> @@ -473,7 +385,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(core::ptr::null()))) + FreeInheritedFromArray(core::mem::transmute(pinheritarray.as_ptr()), pinheritarray.len().try_into().unwrap(), core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed()))) } #[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 +424,7 @@ where P3: 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(), core::mem::transmute(objecttype), core::mem::transmute(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()), core::mem::transmute(pacl), core::mem::transmute(pfnarray.unwrap_or(core::ptr::null())), core::mem::transmute(pgenericmapping), core::mem::transmute(pinheritarray)) + GetInheritanceSourceA(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(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()), core::mem::transmute(pacl), core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgenericmapping), core::mem::transmute(pinheritarray)) } #[inline] pub unsafe fn GetInheritanceSourceW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, container: P3, 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 +433,27 @@ where P3: 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(), core::mem::transmute(objecttype), core::mem::transmute(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()), core::mem::transmute(pacl), core::mem::transmute(pfnarray.unwrap_or(core::ptr::null())), core::mem::transmute(pgenericmapping), core::mem::transmute(pinheritarray)) + GetInheritanceSourceW(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(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()), core::mem::transmute(pacl), core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgenericmapping), core::mem::transmute(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(core::ptr::null()))) + GetMultipleTrusteeA(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + GetMultipleTrusteeOperationA(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + GetMultipleTrusteeOperationW(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + GetMultipleTrusteeW(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } #[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 +461,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(), core::mem::transmute(objecttype), core::mem::transmute(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)) + GetNamedSecurityInfoA(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), core::mem::transmute(ppsidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(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,15 +469,12 @@ 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(), core::mem::transmute(objecttype), core::mem::transmute(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)) + GetNamedSecurityInfoW(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), core::mem::transmute(ppsidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSecurityInfo(handle: super::super::Foundation::HANDLE, 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 { 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(), core::mem::transmute(objecttype), core::mem::transmute(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()))) + GetSecurityInfo(core::mem::transmute(handle), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), core::mem::transmute(ppsidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsecuritydescriptor.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetTrusteeFormA(ptrustee: *const TRUSTEE_A) -> TRUSTEE_FORM { @@ -590,110 +499,135 @@ 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(core::ptr::null()))) + GetTrusteeTypeA(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + GetTrusteeTypeW(core::mem::transmute(ptrustee.unwrap_or(core::mem::zeroed()))) } #[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: P6) -> super::super::Foundation::WIN32_ERROR -where - P6: windows_core::Param, -{ +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: super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(ppgroup.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pccountofaccessentries.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pplistofaccessentries), core::mem::transmute(pccountofauditentries.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pplistofauditentries), psd.param().abi()) + LookupSecurityDescriptorPartsA(core::mem::transmute(ppowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(pccountofaccessentries.unwrap_or(core::mem::zeroed())), core::mem::transmute(pplistofaccessentries), core::mem::transmute(pccountofauditentries.unwrap_or(core::mem::zeroed())), core::mem::transmute(pplistofauditentries), core::mem::transmute(psd)) } #[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: P6) -> super::super::Foundation::WIN32_ERROR -where - P6: windows_core::Param, -{ +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: super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(ppgroup.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pccountofaccessentries.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pplistofaccessentries), core::mem::transmute(pccountofauditentries.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pplistofauditentries), psd.param().abi()) + LookupSecurityDescriptorPartsW(core::mem::transmute(ppowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(pccountofaccessentries.unwrap_or(core::mem::zeroed())), core::mem::transmute(pplistofaccessentries), core::mem::transmute(pccountofauditentries.unwrap_or(core::mem::zeroed())), core::mem::transmute(pplistofauditentries), core::mem::transmute(psd)) } #[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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(newacl)) } #[inline] -pub unsafe fn SetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P3, psidgroup: P4, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: Option, psidgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P3: windows_core::Param, - P4: 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(), core::mem::transmute(objecttype), core::mem::transmute(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()))) + SetNamedSecurityInfoA(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), core::mem::transmute(psidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(psidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P3, psidgroup: P4, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: Option, psidgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P3: windows_core::Param, - P4: 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(), core::mem::transmute(objecttype), core::mem::transmute(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()))) + SetNamedSecurityInfoW(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), core::mem::transmute(psidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(psidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetSecurityInfo(handle: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P3, psidgroup: P4, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn SetSecurityInfo(handle: super::super::Foundation::HANDLE, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: Option, psidgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(objecttype), core::mem::transmute(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()))) + SetSecurityInfo(core::mem::transmute(handle), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), core::mem::transmute(psidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(psidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn TreeResetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: P3, pgroup: P4, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: P7, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TreeResetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: Option, pgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: P7, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, P7: 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(), core::mem::transmute(objecttype), core::mem::transmute(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(), core::mem::transmute(fnprogress), core::mem::transmute(progressinvokesetting), core::mem::transmute(args.unwrap_or(core::ptr::null()))) + TreeResetNamedSecurityInfoA( + pobjectname.param().abi(), + core::mem::transmute(objecttype), + core::mem::transmute(securityinfo), + core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), + keepexplicit.param().abi(), + core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(progressinvokesetting), + core::mem::transmute(args.unwrap_or(core::mem::zeroed())), + ) } #[inline] -pub unsafe fn TreeResetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: P3, pgroup: P4, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: P7, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TreeResetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: Option, pgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: P7, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, P7: 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(), core::mem::transmute(objecttype), core::mem::transmute(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(), core::mem::transmute(fnprogress), core::mem::transmute(progressinvokesetting), core::mem::transmute(args.unwrap_or(core::ptr::null()))) + TreeResetNamedSecurityInfoW( + pobjectname.param().abi(), + core::mem::transmute(objecttype), + core::mem::transmute(securityinfo), + core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), + keepexplicit.param().abi(), + core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(progressinvokesetting), + core::mem::transmute(args.unwrap_or(core::mem::zeroed())), + ) } #[inline] -pub unsafe fn TreeSetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: P3, pgroup: P4, 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 +pub unsafe fn TreeSetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: Option, pgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, dwaction: TREE_SEC_INFO, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P3: windows_core::Param, - P4: 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(), core::mem::transmute(objecttype), core::mem::transmute(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())), core::mem::transmute(dwaction), core::mem::transmute(fnprogress), core::mem::transmute(progressinvokesetting), core::mem::transmute(args.unwrap_or(core::ptr::null()))) + TreeSetNamedSecurityInfoA( + pobjectname.param().abi(), + core::mem::transmute(objecttype), + core::mem::transmute(securityinfo), + core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwaction), + core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(progressinvokesetting), + core::mem::transmute(args.unwrap_or(core::mem::zeroed())), + ) } #[inline] -pub unsafe fn TreeSetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: P3, pgroup: P4, 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 +pub unsafe fn TreeSetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: Option, pgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, dwaction: TREE_SEC_INFO, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P3: windows_core::Param, - P4: 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(), core::mem::transmute(objecttype), core::mem::transmute(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())), core::mem::transmute(dwaction), core::mem::transmute(fnprogress), core::mem::transmute(progressinvokesetting), core::mem::transmute(args.unwrap_or(core::ptr::null()))) + TreeSetNamedSecurityInfoW( + pobjectname.param().abi(), + core::mem::transmute(objecttype), + core::mem::transmute(securityinfo), + core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwaction), + core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(progressinvokesetting), + core::mem::transmute(args.unwrap_or(core::mem::zeroed())), + ) } pub const ACCCTRL_DEFAULT_PROVIDER: windows_core::PCWSTR = windows_core::w!("Windows NT Access Provider"); pub const ACCCTRL_DEFAULT_PROVIDERA: windows_core::PCSTR = windows_core::s!("Windows NT Access Provider"); @@ -3047,11 +2981,8 @@ impl IAzApplication3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).BizRulesEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBizRulesEnabled(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBizRulesEnabled)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetBizRulesEnabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBizRulesEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -3798,12 +3729,9 @@ impl IAzApplicationGroup2 { pub unsafe fn SetBizRuleImportedPath(&self, bstrprop: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetBizRuleImportedPath)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprop)).ok() } - pub unsafe fn RoleAssignments(&self, bstrscopename: &windows_core::BSTR, brecursive: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn RoleAssignments(&self, bstrscopename: &windows_core::BSTR, brecursive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RoleAssignments)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrscopename), brecursive.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RoleAssignments)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrscopename), core::mem::transmute(brecursive), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -6058,11 +5986,8 @@ windows_core::imp::interface_hierarchy!(IAzObjectPicker, windows_core::IUnknown, #[cfg(feature = "Win32_System_Com")] impl IAzObjectPicker { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn GetPrincipals(&self, hparentwnd: P0, bstrtitle: &windows_core::BSTR, pvsidtypes: *mut super::super::System::Variant::VARIANT, pvnames: *mut super::super::System::Variant::VARIANT, pvsids: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetPrincipals)(windows_core::Interface::as_raw(self), hparentwnd.param().abi(), core::mem::transmute_copy(bstrtitle), core::mem::transmute(pvsidtypes), core::mem::transmute(pvnames), core::mem::transmute(pvsids)).ok() + pub unsafe fn GetPrincipals(&self, hparentwnd: super::super::Foundation::HWND, bstrtitle: &windows_core::BSTR, pvsidtypes: *mut super::super::System::Variant::VARIANT, pvnames: *mut super::super::System::Variant::VARIANT, pvsids: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetPrincipals)(windows_core::Interface::as_raw(self), core::mem::transmute(hparentwnd), core::mem::transmute_copy(bstrtitle), core::mem::transmute(pvsidtypes), core::mem::transmute(pvnames), core::mem::transmute(pvsids)).ok() } pub unsafe fn Name(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6335,12 +6260,9 @@ impl core::ops::Deref for IAzOperation2 { windows_core::imp::interface_hierarchy!(IAzOperation2, windows_core::IUnknown, super::super::System::Com::IDispatch, IAzOperation); #[cfg(feature = "Win32_System_Com")] impl IAzOperation2 { - pub unsafe fn RoleAssignments(&self, bstrscopename: &windows_core::BSTR, brecursive: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn RoleAssignments(&self, bstrscopename: &windows_core::BSTR, brecursive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RoleAssignments)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrscopename), brecursive.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RoleAssignments)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrscopename), core::mem::transmute(brecursive), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -7180,12 +7102,9 @@ impl core::ops::Deref for IAzRoleDefinition { windows_core::imp::interface_hierarchy!(IAzRoleDefinition, windows_core::IUnknown, super::super::System::Com::IDispatch, IAzTask); #[cfg(feature = "Win32_System_Com")] impl IAzRoleDefinition { - pub unsafe fn RoleAssignments(&self, bstrscopename: &windows_core::BSTR, brecursive: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn RoleAssignments(&self, bstrscopename: &windows_core::BSTR, brecursive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RoleAssignments)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrscopename), brecursive.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RoleAssignments)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrscopename), core::mem::transmute(brecursive), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn AddRoleDefinition(&self, bstrroledefinition: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddRoleDefinition)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrroledefinition)).ok() @@ -8777,12 +8696,9 @@ impl core::ops::Deref for IAzTask2 { windows_core::imp::interface_hierarchy!(IAzTask2, windows_core::IUnknown, super::super::System::Com::IDispatch, IAzTask); #[cfg(feature = "Win32_System_Com")] impl IAzTask2 { - pub unsafe fn RoleAssignments(&self, bstrscopename: &windows_core::BSTR, brecursive: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn RoleAssignments(&self, bstrscopename: &windows_core::BSTR, brecursive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RoleAssignments)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrscopename), brecursive.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RoleAssignments)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrscopename), core::mem::transmute(brecursive), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs index 2ce9d3a247..f14ae3877b 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs @@ -1,34 +1,34 @@ #[inline] -pub unsafe fn CredDeleteA(targetname: P0, r#type: CRED_TYPE, flags: u32) -> windows_core::Result<()> +pub unsafe fn CredDeleteA(targetname: P0, r#type: CRED_TYPE, flags: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredDeleteA(targetname : windows_core::PCSTR, r#type : CRED_TYPE, flags : u32) -> super::super::Foundation:: BOOL); - CredDeleteA(targetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags)).ok() + CredDeleteA(targetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CredDeleteW(targetname: P0, r#type: CRED_TYPE, flags: u32) -> windows_core::Result<()> +pub unsafe fn CredDeleteW(targetname: P0, r#type: CRED_TYPE, flags: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredDeleteW(targetname : windows_core::PCWSTR, r#type : CRED_TYPE, flags : u32) -> super::super::Foundation:: BOOL); - CredDeleteW(targetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags)).ok() + CredDeleteW(targetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CredEnumerateA(filter: P0, flags: CRED_ENUMERATE_FLAGS, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> windows_core::Result<()> +pub unsafe fn CredEnumerateA(filter: P0, flags: Option, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredEnumerateA(filter : windows_core::PCSTR, flags : CRED_ENUMERATE_FLAGS, count : *mut u32, credential : *mut *mut *mut CREDENTIALA) -> super::super::Foundation:: BOOL); - CredEnumerateA(filter.param().abi(), core::mem::transmute(flags), core::mem::transmute(count), core::mem::transmute(credential)).ok() + CredEnumerateA(filter.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(count), core::mem::transmute(credential)).ok() } #[inline] -pub unsafe fn CredEnumerateW(filter: P0, flags: CRED_ENUMERATE_FLAGS, count: *mut u32, credential: *mut *mut *mut CREDENTIALW) -> windows_core::Result<()> +pub unsafe fn CredEnumerateW(filter: P0, flags: Option, count: *mut u32, credential: *mut *mut *mut CREDENTIALW) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredEnumerateW(filter : windows_core::PCWSTR, flags : CRED_ENUMERATE_FLAGS, count : *mut u32, credential : *mut *mut *mut CREDENTIALW) -> super::super::Foundation:: BOOL); - CredEnumerateW(filter.param().abi(), core::mem::transmute(flags), core::mem::transmute(count), core::mem::transmute(credential)).ok() + CredEnumerateW(filter.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(count), core::mem::transmute(credential)).ok() } #[inline] pub unsafe fn CredFindBestCredentialA(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALA) -> windows_core::Result<()> @@ -121,7 +121,7 @@ where P2: 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(core::mem::transmute(dwflags), pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbpackedcredentials)).ok() + CredPackAuthenticationBufferA(core::mem::transmute(dwflags), pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbpackedcredentials)).ok() } #[inline] pub unsafe fn CredPackAuthenticationBufferW(dwflags: CRED_PACK_FLAGS, pszusername: P1, pszpassword: P2, ppackedcredentials: Option<*mut u8>, pcbpackedcredentials: *mut u32) -> windows_core::Result<()> @@ -130,7 +130,7 @@ where P2: 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(core::mem::transmute(dwflags), pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbpackedcredentials)).ok() + CredPackAuthenticationBufferW(core::mem::transmute(dwflags), pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(pcchmaxchars), core::mem::transmute(protectiontype.unwrap_or(core::ptr::null_mut()))).ok() + CredProtectA(fasself.param().abi(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), core::mem::transmute(pcchmaxchars), core::mem::transmute(protectiontype.unwrap_or(core::mem::zeroed()))).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,15 +146,15 @@ 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), core::mem::transmute(pcchmaxchars), core::mem::transmute(protectiontype.unwrap_or(core::ptr::null_mut()))).ok() + CredProtectW(fasself.param().abi(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), core::mem::transmute(pcchmaxchars), core::mem::transmute(protectiontype.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CredReadA(targetname: P0, r#type: CRED_TYPE, flags: u32, credential: *mut *mut CREDENTIALA) -> windows_core::Result<()> +pub unsafe fn CredReadA(targetname: P0, r#type: CRED_TYPE, flags: Option, credential: *mut *mut CREDENTIALA) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredReadA(targetname : windows_core::PCSTR, r#type : CRED_TYPE, flags : u32, credential : *mut *mut CREDENTIALA) -> super::super::Foundation:: BOOL); - CredReadA(targetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags), core::mem::transmute(credential)).ok() + CredReadA(targetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(credential)).ok() } #[inline] pub unsafe fn CredReadDomainCredentialsA(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONA, flags: u32, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> windows_core::Result<()> { @@ -167,30 +167,30 @@ pub unsafe fn CredReadDomainCredentialsW(targetinfo: *const CREDENTIAL_TARGET_IN CredReadDomainCredentialsW(core::mem::transmute(targetinfo), core::mem::transmute(flags), core::mem::transmute(count), core::mem::transmute(credential)).ok() } #[inline] -pub unsafe fn CredReadW(targetname: P0, r#type: CRED_TYPE, flags: u32, credential: *mut *mut CREDENTIALW) -> windows_core::Result<()> +pub unsafe fn CredReadW(targetname: P0, r#type: CRED_TYPE, flags: Option, credential: *mut *mut CREDENTIALW) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredReadW(targetname : windows_core::PCWSTR, r#type : CRED_TYPE, flags : u32, credential : *mut *mut CREDENTIALW) -> super::super::Foundation:: BOOL); - CredReadW(targetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags), core::mem::transmute(credential)).ok() + CredReadW(targetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(credential)).ok() } #[inline] -pub unsafe fn CredRenameA(oldtargetname: P0, newtargetname: P1, r#type: CRED_TYPE, flags: u32) -> windows_core::Result<()> +pub unsafe fn CredRenameA(oldtargetname: P0, newtargetname: P1, r#type: CRED_TYPE, flags: Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredRenameA(oldtargetname : windows_core::PCSTR, newtargetname : windows_core::PCSTR, r#type : CRED_TYPE, flags : u32) -> super::super::Foundation:: BOOL); - CredRenameA(oldtargetname.param().abi(), newtargetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags)).ok() + CredRenameA(oldtargetname.param().abi(), newtargetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CredRenameW(oldtargetname: P0, newtargetname: P1, r#type: CRED_TYPE, flags: u32) -> windows_core::Result<()> +pub unsafe fn CredRenameW(oldtargetname: P0, newtargetname: P1, r#type: CRED_TYPE, flags: Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredRenameW(oldtargetname : windows_core::PCWSTR, newtargetname : windows_core::PCWSTR, r#type : CRED_TYPE, flags : u32) -> super::super::Foundation:: BOOL); - CredRenameW(oldtargetname.param().abi(), newtargetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags)).ok() + CredRenameW(oldtargetname.param().abi(), newtargetname.param().abi(), core::mem::transmute(r#type), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CredUICmdLinePromptForCredentialsA(psztargetname: P0, pcontext: Option<*const SecHandle>, dwautherror: u32, username: &mut [u8], pszpassword: &mut [u8], pfsave: Option<*mut super::super::Foundation::BOOL>, dwflags: CREDUI_FLAGS) -> u32 @@ -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(core::ptr::null())), core::mem::transmute(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())), core::mem::transmute(dwflags)) + CredUICmdLinePromptForCredentialsA(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(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())), core::mem::transmute(dwflags)) + CredUICmdLinePromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn CredUIConfirmCredentialsA(psztargetname: P0, bconfirm: P1) -> u32 @@ -249,7 +249,7 @@ where P1: 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(core::ptr::null())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), core::mem::transmute(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())), core::mem::transmute(dwflags)) + CredUIPromptForCredentialsA(core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(dwflags)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -258,19 +258,19 @@ where P1: 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(core::ptr::null())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), core::mem::transmute(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())), core::mem::transmute(dwflags)) + CredUIPromptForCredentialsW(core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(dwautherror), core::mem::transmute(pulauthpackage), core::mem::transmute(pvinauthbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ulinauthbuffersize), core::mem::transmute(ppvoutauthbuffer), core::mem::transmute(puloutauthbuffersize), core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)) + CredUIPromptForWindowsCredentialsA(core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwautherror), core::mem::transmute(pulauthpackage), core::mem::transmute(pvinauthbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulinauthbuffersize), core::mem::transmute(ppvoutauthbuffer), core::mem::transmute(puloutauthbuffersize), core::mem::transmute(pfsave.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(dwautherror), core::mem::transmute(pulauthpackage), core::mem::transmute(pvinauthbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ulinauthbuffersize), core::mem::transmute(ppvoutauthbuffer), core::mem::transmute(puloutauthbuffersize), core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)) + CredUIPromptForWindowsCredentialsW(core::mem::transmute(puiinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwautherror), core::mem::transmute(pulauthpackage), core::mem::transmute(pvinauthbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulinauthbuffersize), core::mem::transmute(ppvoutauthbuffer), core::mem::transmute(puloutauthbuffersize), core::mem::transmute(pfsave.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn CredUIReadSSOCredW(pszrealm: P0, ppszusername: *mut windows_core::PWSTR) -> u32 @@ -292,14 +292,14 @@ where CredUIStoreSSOCredW(pszrealm.param().abi(), pszusername.param().abi(), pszpassword.param().abi(), bpersist.param().abi()) } #[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<()> { +pub unsafe fn CredUnPackAuthenticationBufferA(dwflags: CRED_PACK_FLAGS, pauthbuffer: *const core::ffi::c_void, cbauthbuffer: u32, pszusername: Option, pcchlmaxusername: *mut u32, pszdomainname: Option, pcchmaxdomainname: Option<*mut u32>, pszpassword: Option, 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(core::mem::transmute(dwflags), core::mem::transmute(pauthbuffer), core::mem::transmute(cbauthbuffer), core::mem::transmute(pszusername), core::mem::transmute(pcchlmaxusername), core::mem::transmute(pszdomainname), core::mem::transmute(pcchmaxdomainname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszpassword), core::mem::transmute(pcchmaxpassword)).ok() + CredUnPackAuthenticationBufferA(core::mem::transmute(dwflags), core::mem::transmute(pauthbuffer), core::mem::transmute(cbauthbuffer), core::mem::transmute(pszusername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlmaxusername), core::mem::transmute(pszdomainname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxdomainname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpassword.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { +pub unsafe fn CredUnPackAuthenticationBufferW(dwflags: CRED_PACK_FLAGS, pauthbuffer: *const core::ffi::c_void, cbauthbuffer: u32, pszusername: Option, pcchmaxusername: *mut u32, pszdomainname: Option, pcchmaxdomainname: Option<*mut u32>, pszpassword: Option, 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(core::mem::transmute(dwflags), core::mem::transmute(pauthbuffer), core::mem::transmute(cbauthbuffer), core::mem::transmute(pszusername), core::mem::transmute(pcchmaxusername), core::mem::transmute(pszdomainname), core::mem::transmute(pcchmaxdomainname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszpassword), core::mem::transmute(pcchmaxpassword)).ok() + CredUnPackAuthenticationBufferW(core::mem::transmute(dwflags), core::mem::transmute(pauthbuffer), core::mem::transmute(cbauthbuffer), core::mem::transmute(pszusername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxusername), core::mem::transmute(pszdomainname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxdomainname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpassword.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxpassword)).ok() } #[inline] pub unsafe fn CredUnmarshalCredentialA(marshaledcredential: P0, credtype: *mut CRED_MARSHAL_TYPE, credential: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -318,20 +318,20 @@ where CredUnmarshalCredentialW(marshaledcredential.param().abi(), core::mem::transmute(credtype), core::mem::transmute(credential)).ok() } #[inline] -pub unsafe fn CredUnprotectA(fasself: P0, pszprotectedcredentials: &[u8], pszcredentials: windows_core::PSTR, pcchmaxchars: *mut u32) -> windows_core::Result<()> +pub unsafe fn CredUnprotectA(fasself: P0, pszprotectedcredentials: &[u8], pszcredentials: Option, pcchmaxchars: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredUnprotectA(fasself : super::super::Foundation:: BOOL, pszprotectedcredentials : windows_core::PCSTR, cchprotectedcredentials : u32, pszcredentials : windows_core::PSTR, pcchmaxchars : *mut u32) -> super::super::Foundation:: BOOL); - CredUnprotectA(fasself.param().abi(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), core::mem::transmute(pszcredentials), core::mem::transmute(pcchmaxchars)).ok() + CredUnprotectA(fasself.param().abi(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), core::mem::transmute(pszcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxchars)).ok() } #[inline] -pub unsafe fn CredUnprotectW(fasself: P0, pszprotectedcredentials: &[u16], pszcredentials: windows_core::PWSTR, pcchmaxchars: *mut u32) -> windows_core::Result<()> +pub unsafe fn CredUnprotectW(fasself: P0, pszprotectedcredentials: &[u16], pszcredentials: Option, pcchmaxchars: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CredUnprotectW(fasself : super::super::Foundation:: BOOL, pszprotectedcredentials : windows_core::PCWSTR, cchprotectedcredentials : u32, pszcredentials : windows_core::PWSTR, pcchmaxchars : *mut u32) -> super::super::Foundation:: BOOL); - CredUnprotectW(fasself.param().abi(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), core::mem::transmute(pszcredentials), core::mem::transmute(pcchmaxchars)).ok() + CredUnprotectW(fasself.param().abi(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), core::mem::transmute(pszcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxchars)).ok() } #[inline] pub unsafe fn CredWriteA(credential: *const CREDENTIALA, flags: u32) -> windows_core::Result<()> { @@ -380,12 +380,9 @@ pub unsafe fn KeyCredentialManagerGetOperationErrorStates(keycredentialmanagerop KeyCredentialManagerGetOperationErrorStates(core::mem::transmute(keycredentialmanageroperationtype), core::mem::transmute(isready), core::mem::transmute(keycredentialmanageroperationerrorstates)).ok() } #[inline] -pub unsafe fn KeyCredentialManagerShowUIOperation(hwndowner: P0, keycredentialmanageroperationtype: KeyCredentialManagerOperationType) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn KeyCredentialManagerShowUIOperation(hwndowner: super::super::Foundation::HWND, keycredentialmanageroperationtype: KeyCredentialManagerOperationType) -> windows_core::Result<()> { windows_targets::link!("keycredmgr.dll" "system" fn KeyCredentialManagerShowUIOperation(hwndowner : super::super::Foundation:: HWND, keycredentialmanageroperationtype : KeyCredentialManagerOperationType) -> windows_core::HRESULT); - KeyCredentialManagerShowUIOperation(hwndowner.param().abi(), core::mem::transmute(keycredentialmanageroperationtype)).ok() + KeyCredentialManagerShowUIOperation(core::mem::transmute(hwndowner), core::mem::transmute(keycredentialmanageroperationtype)).ok() } #[inline] pub unsafe fn SCardAccessStartedEvent() -> windows_core::Result { @@ -465,7 +462,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(core::mem::transmute(dwscope), core::mem::transmute(pvreserved1.unwrap_or(core::ptr::null())), core::mem::transmute(pvreserved2.unwrap_or(core::ptr::null())), core::mem::transmute(phcontext)) + SCardEstablishContext(core::mem::transmute(dwscope), core::mem::transmute(pvreserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcontext)) } #[inline] pub unsafe fn SCardForgetCardTypeA(hcontext: usize, szcardname: P1) -> i32 @@ -523,7 +520,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(core::mem::transmute(hcard), core::mem::transmute(dwattrid), core::mem::transmute(pbattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbattrlen)) + SCardGetAttrib(core::mem::transmute(hcard), core::mem::transmute(dwattrid), core::mem::transmute(pbattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbattrlen)) } #[inline] pub unsafe fn SCardGetCardTypeProviderNameA(hcontext: usize, szcardname: P1, dwproviderid: u32, szprovider: windows_core::PSTR, pcchprovider: *mut u32) -> i32 @@ -574,20 +571,20 @@ where SCardGetProviderIdW(core::mem::transmute(hcontext), szcard.param().abi(), core::mem::transmute(pguidproviderid)) } #[inline] -pub unsafe fn SCardGetReaderDeviceInstanceIdA(hcontext: usize, szreadername: P1, szdeviceinstanceid: windows_core::PSTR, pcchdeviceinstanceid: *mut u32) -> i32 +pub unsafe fn SCardGetReaderDeviceInstanceIdA(hcontext: usize, szreadername: P1, szdeviceinstanceid: Option, pcchdeviceinstanceid: *mut u32) -> i32 where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetReaderDeviceInstanceIdA(hcontext : usize, szreadername : windows_core::PCSTR, szdeviceinstanceid : windows_core::PSTR, pcchdeviceinstanceid : *mut u32) -> i32); - SCardGetReaderDeviceInstanceIdA(core::mem::transmute(hcontext), szreadername.param().abi(), core::mem::transmute(szdeviceinstanceid), core::mem::transmute(pcchdeviceinstanceid)) + SCardGetReaderDeviceInstanceIdA(core::mem::transmute(hcontext), szreadername.param().abi(), core::mem::transmute(szdeviceinstanceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchdeviceinstanceid)) } #[inline] -pub unsafe fn SCardGetReaderDeviceInstanceIdW(hcontext: usize, szreadername: P1, szdeviceinstanceid: windows_core::PWSTR, pcchdeviceinstanceid: *mut u32) -> i32 +pub unsafe fn SCardGetReaderDeviceInstanceIdW(hcontext: usize, szreadername: P1, szdeviceinstanceid: Option, pcchdeviceinstanceid: *mut u32) -> i32 where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardGetReaderDeviceInstanceIdW(hcontext : usize, szreadername : windows_core::PCWSTR, szdeviceinstanceid : windows_core::PWSTR, pcchdeviceinstanceid : *mut u32) -> i32); - SCardGetReaderDeviceInstanceIdW(core::mem::transmute(hcontext), szreadername.param().abi(), core::mem::transmute(szdeviceinstanceid), core::mem::transmute(pcchdeviceinstanceid)) + SCardGetReaderDeviceInstanceIdW(core::mem::transmute(hcontext), szreadername.param().abi(), core::mem::transmute(szdeviceinstanceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchdeviceinstanceid)) } #[inline] pub unsafe fn SCardGetReaderIconA(hcontext: usize, szreadername: P1, pbicon: *mut u8, pcbicon: *mut u32) -> i32 @@ -626,7 +623,7 @@ where P1: 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(core::mem::transmute(hcontext), szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(core::ptr::null())), core::mem::transmute(rgguidinterfaces.unwrap_or(core::ptr::null())), core::mem::transmute(dwinterfacecount), core::mem::transmute(pbatr), core::mem::transmute(pbatrmask), core::mem::transmute(cbatrlen)) + SCardIntroduceCardTypeA(core::mem::transmute(hcontext), szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgguidinterfaces.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinterfacecount), core::mem::transmute(pbatr), core::mem::transmute(pbatrmask), core::mem::transmute(cbatrlen)) } #[inline] pub unsafe fn SCardIntroduceCardTypeW(hcontext: usize, szcardname: P1, 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 +631,7 @@ where P1: 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(core::mem::transmute(hcontext), szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(core::ptr::null())), core::mem::transmute(rgguidinterfaces.unwrap_or(core::ptr::null())), core::mem::transmute(dwinterfacecount), core::mem::transmute(pbatr), core::mem::transmute(pbatrmask), core::mem::transmute(cbatrlen)) + SCardIntroduceCardTypeW(core::mem::transmute(hcontext), szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgguidinterfaces.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinterfacecount), core::mem::transmute(pbatr), core::mem::transmute(pbatrmask), core::mem::transmute(cbatrlen)) } #[inline] pub unsafe fn SCardIntroduceReaderA(hcontext: usize, szreadername: P1, szdevicename: P2) -> i32 @@ -676,14 +673,14 @@ pub unsafe fn SCardIsValidContext(hcontext: usize) -> i32 { SCardIsValidContext(core::mem::transmute(hcontext)) } #[inline] -pub unsafe fn SCardListCardsA(hcontext: usize, pbatr: Option<*const u8>, rgquidinterfaces: Option<&[windows_core::GUID]>, mszcards: windows_core::PSTR, pcchcards: *mut u32) -> i32 { +pub unsafe fn SCardListCardsA(hcontext: usize, pbatr: Option<*const u8>, rgquidinterfaces: Option<&[windows_core::GUID]>, mszcards: Option, 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(core::mem::transmute(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), core::mem::transmute(pcchcards)) + SCardListCardsA(core::mem::transmute(hcontext), core::mem::transmute(pbatr.unwrap_or(core::mem::zeroed())), 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.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 { +pub unsafe fn SCardListCardsW(hcontext: usize, pbatr: Option<*const u8>, rgquidinterfaces: Option<&[windows_core::GUID]>, mszcards: Option, 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(core::mem::transmute(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), core::mem::transmute(pcchcards)) + SCardListCardsW(core::mem::transmute(hcontext), core::mem::transmute(pbatr.unwrap_or(core::mem::zeroed())), 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.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcards)) } #[inline] pub unsafe fn SCardListInterfacesA(hcontext: usize, szcard: P1, pguidinterfaces: *mut windows_core::GUID, pcguidinterfaces: *mut u32) -> i32 @@ -702,46 +699,46 @@ where SCardListInterfacesW(core::mem::transmute(hcontext), szcard.param().abi(), core::mem::transmute(pguidinterfaces), core::mem::transmute(pcguidinterfaces)) } #[inline] -pub unsafe fn SCardListReaderGroupsA(hcontext: usize, mszgroups: windows_core::PSTR, pcchgroups: *mut u32) -> i32 { +pub unsafe fn SCardListReaderGroupsA(hcontext: usize, mszgroups: Option, pcchgroups: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardListReaderGroupsA(hcontext : usize, mszgroups : windows_core::PSTR, pcchgroups : *mut u32) -> i32); - SCardListReaderGroupsA(core::mem::transmute(hcontext), core::mem::transmute(mszgroups), core::mem::transmute(pcchgroups)) + SCardListReaderGroupsA(core::mem::transmute(hcontext), core::mem::transmute(mszgroups.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchgroups)) } #[inline] -pub unsafe fn SCardListReaderGroupsW(hcontext: usize, mszgroups: windows_core::PWSTR, pcchgroups: *mut u32) -> i32 { +pub unsafe fn SCardListReaderGroupsW(hcontext: usize, mszgroups: Option, pcchgroups: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardListReaderGroupsW(hcontext : usize, mszgroups : windows_core::PWSTR, pcchgroups : *mut u32) -> i32); - SCardListReaderGroupsW(core::mem::transmute(hcontext), core::mem::transmute(mszgroups), core::mem::transmute(pcchgroups)) + SCardListReaderGroupsW(core::mem::transmute(hcontext), core::mem::transmute(mszgroups.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchgroups)) } #[inline] -pub unsafe fn SCardListReadersA(hcontext: usize, mszgroups: P1, mszreaders: windows_core::PSTR, pcchreaders: *mut u32) -> i32 +pub unsafe fn SCardListReadersA(hcontext: usize, mszgroups: P1, mszreaders: Option, pcchreaders: *mut u32) -> i32 where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardListReadersA(hcontext : usize, mszgroups : windows_core::PCSTR, mszreaders : windows_core::PSTR, pcchreaders : *mut u32) -> i32); - SCardListReadersA(core::mem::transmute(hcontext), mszgroups.param().abi(), core::mem::transmute(mszreaders), core::mem::transmute(pcchreaders)) + SCardListReadersA(core::mem::transmute(hcontext), mszgroups.param().abi(), core::mem::transmute(mszreaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaders)) } #[inline] -pub unsafe fn SCardListReadersW(hcontext: usize, mszgroups: P1, mszreaders: windows_core::PWSTR, pcchreaders: *mut u32) -> i32 +pub unsafe fn SCardListReadersW(hcontext: usize, mszgroups: P1, mszreaders: Option, pcchreaders: *mut u32) -> i32 where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardListReadersW(hcontext : usize, mszgroups : windows_core::PCWSTR, mszreaders : windows_core::PWSTR, pcchreaders : *mut u32) -> i32); - SCardListReadersW(core::mem::transmute(hcontext), mszgroups.param().abi(), core::mem::transmute(mszreaders), core::mem::transmute(pcchreaders)) + SCardListReadersW(core::mem::transmute(hcontext), mszgroups.param().abi(), core::mem::transmute(mszreaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaders)) } #[inline] -pub unsafe fn SCardListReadersWithDeviceInstanceIdA(hcontext: usize, szdeviceinstanceid: P1, mszreaders: windows_core::PSTR, pcchreaders: *mut u32) -> i32 +pub unsafe fn SCardListReadersWithDeviceInstanceIdA(hcontext: usize, szdeviceinstanceid: P1, mszreaders: Option, pcchreaders: *mut u32) -> i32 where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardListReadersWithDeviceInstanceIdA(hcontext : usize, szdeviceinstanceid : windows_core::PCSTR, mszreaders : windows_core::PSTR, pcchreaders : *mut u32) -> i32); - SCardListReadersWithDeviceInstanceIdA(core::mem::transmute(hcontext), szdeviceinstanceid.param().abi(), core::mem::transmute(mszreaders), core::mem::transmute(pcchreaders)) + SCardListReadersWithDeviceInstanceIdA(core::mem::transmute(hcontext), szdeviceinstanceid.param().abi(), core::mem::transmute(mszreaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaders)) } #[inline] -pub unsafe fn SCardListReadersWithDeviceInstanceIdW(hcontext: usize, szdeviceinstanceid: P1, mszreaders: windows_core::PWSTR, pcchreaders: *mut u32) -> i32 +pub unsafe fn SCardListReadersWithDeviceInstanceIdW(hcontext: usize, szdeviceinstanceid: P1, mszreaders: Option, pcchreaders: *mut u32) -> i32 where P1: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardListReadersWithDeviceInstanceIdW(hcontext : usize, szdeviceinstanceid : windows_core::PCWSTR, mszreaders : windows_core::PWSTR, pcchreaders : *mut u32) -> i32); - SCardListReadersWithDeviceInstanceIdW(core::mem::transmute(hcontext), szdeviceinstanceid.param().abi(), core::mem::transmute(mszreaders), core::mem::transmute(pcchreaders)) + SCardListReadersWithDeviceInstanceIdW(core::mem::transmute(hcontext), szdeviceinstanceid.param().abi(), core::mem::transmute(mszreaders.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaders)) } #[inline] pub unsafe fn SCardLocateCardsA(hcontext: usize, mszcards: P1, rgreaderstates: *mut SCARD_READERSTATEA, creaders: u32) -> i32 @@ -788,7 +785,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(core::mem::transmute(hcard), core::mem::transmute(dwsharemode), core::mem::transmute(dwpreferredprotocols), core::mem::transmute(dwinitialization), core::mem::transmute(pdwactiveprotocol.unwrap_or(core::ptr::null_mut()))) + SCardReconnect(core::mem::transmute(hcard), core::mem::transmute(dwsharemode), core::mem::transmute(dwpreferredprotocols), core::mem::transmute(dwinitialization), core::mem::transmute(pdwactiveprotocol.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SCardReleaseContext(hcontext: usize) -> i32 { @@ -847,19 +844,19 @@ pub unsafe fn SCardState(hcard: usize, pdwstate: *mut u32, pdwprotocol: *mut u32 SCardState(core::mem::transmute(hcard), core::mem::transmute(pdwstate), core::mem::transmute(pdwprotocol), core::mem::transmute(pbatr), core::mem::transmute(pcbatrlen)) } #[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 { +pub unsafe fn SCardStatusA(hcard: usize, mszreadernames: Option, 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(core::mem::transmute(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()))) + SCardStatusA(core::mem::transmute(hcard), core::mem::transmute(mszreadernames.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaderlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwprotocol.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbatr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbatrlen.unwrap_or(core::mem::zeroed()))) } #[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 { +pub unsafe fn SCardStatusW(hcard: usize, mszreadernames: Option, 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(core::mem::transmute(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()))) + SCardStatusW(core::mem::transmute(hcard), core::mem::transmute(mszreadernames.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchreaderlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwprotocol.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbatr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbatrlen.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hcard), core::mem::transmute(piosendpci), core::mem::transmute(pbsendbuffer.as_ptr()), pbsendbuffer.len().try_into().unwrap(), core::mem::transmute(piorecvpci.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbrecvbuffer), core::mem::transmute(pcbrecvlength)) + SCardTransmit(core::mem::transmute(hcard), core::mem::transmute(piosendpci), core::mem::transmute(pbsendbuffer.as_ptr()), pbsendbuffer.len().try_into().unwrap(), core::mem::transmute(piorecvpci.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbrecvbuffer), core::mem::transmute(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 5c27caad68..32e70c5b0c 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,15 +1,15 @@ #[inline] -pub unsafe fn CryptCATAdminAcquireContext(phcatadmin: *mut isize, pgsubsystem: Option<*const windows_core::GUID>, dwflags: u32) -> windows_core::Result<()> { +pub unsafe fn CryptCATAdminAcquireContext(phcatadmin: *mut isize, pgsubsystem: Option<*const windows_core::GUID>, dwflags: Option) -> 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(core::mem::transmute(phcatadmin), core::mem::transmute(pgsubsystem.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + CryptCATAdminAcquireContext(core::mem::transmute(phcatadmin), core::mem::transmute(pgsubsystem.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CryptCATAdminAcquireContext2(phcatadmin: *mut isize, pgsubsystem: Option<*const windows_core::GUID>, pwszhashalgorithm: P2, pstronghashpolicy: Option<*const super::CERT_STRONG_SIGN_PARA>, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn CryptCATAdminAcquireContext2(phcatadmin: *mut isize, pgsubsystem: Option<*const windows_core::GUID>, pwszhashalgorithm: P2, pstronghashpolicy: Option<*const super::CERT_STRONG_SIGN_PARA>, dwflags: Option) -> windows_core::Result<()> where P2: 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(core::mem::transmute(phcatadmin), core::mem::transmute(pgsubsystem.unwrap_or(core::ptr::null())), pwszhashalgorithm.param().abi(), core::mem::transmute(pstronghashpolicy.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + CryptCATAdminAcquireContext2(core::mem::transmute(phcatadmin), core::mem::transmute(pgsubsystem.unwrap_or(core::mem::zeroed())), pwszhashalgorithm.param().abi(), core::mem::transmute(pstronghashpolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptCATAdminAddCatalog(hcatadmin: isize, pwszcatalogfile: P1, pwszselectbasename: P2, dwflags: u32) -> isize @@ -21,25 +21,19 @@ where CryptCATAdminAddCatalog(core::mem::transmute(hcatadmin), pwszcatalogfile.param().abi(), pwszselectbasename.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn CryptCATAdminCalcHashFromFileHandle(hfile: P0, pcbhash: *mut u32, pbhash: Option<*mut u8>, dwflags: u32) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCATAdminCalcHashFromFileHandle(hfile: super::super::super::Foundation::HANDLE, pcbhash: *mut u32, pbhash: Option<*mut u8>, dwflags: Option) -> super::super::super::Foundation::BOOL { 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(), core::mem::transmute(pcbhash), core::mem::transmute(pbhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)) + CryptCATAdminCalcHashFromFileHandle(core::mem::transmute(hfile), core::mem::transmute(pcbhash), core::mem::transmute(pbhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CryptCATAdminCalcHashFromFileHandle2(hcatadmin: isize, hfile: P1, pcbhash: *mut u32, pbhash: Option<*mut u8>, dwflags: u32) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn CryptCATAdminCalcHashFromFileHandle2(hcatadmin: isize, hfile: super::super::super::Foundation::HANDLE, pcbhash: *mut u32, pbhash: Option<*mut u8>, dwflags: Option) -> windows_core::Result<()> { 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(core::mem::transmute(hcatadmin), hfile.param().abi(), core::mem::transmute(pcbhash), core::mem::transmute(pbhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)).ok() + CryptCATAdminCalcHashFromFileHandle2(core::mem::transmute(hcatadmin), core::mem::transmute(hfile), core::mem::transmute(pcbhash), core::mem::transmute(pbhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CryptCATAdminEnumCatalogFromHash(hcatadmin: isize, pbhash: &[u8], dwflags: u32, phprevcatinfo: Option<*mut isize>) -> isize { +pub unsafe fn CryptCATAdminEnumCatalogFromHash(hcatadmin: isize, pbhash: &[u8], dwflags: Option, 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(core::mem::transmute(hcatadmin), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(phprevcatinfo.unwrap_or(core::ptr::null_mut()))) + CryptCATAdminEnumCatalogFromHash(core::mem::transmute(hcatadmin), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(phprevcatinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CryptCATAdminPauseServiceForBackup(dwflags: u32, fresume: P1) -> super::super::super::Foundation::BOOL @@ -77,13 +71,12 @@ where } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATAllocSortedMemberInfo(hcatalog: P0, pwszreferencetag: P1) -> *mut CRYPTCATMEMBER +pub unsafe fn CryptCATAllocSortedMemberInfo(hcatalog: super::super::super::Foundation::HANDLE, pwszreferencetag: P1) -> *mut CRYPTCATMEMBER where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATAllocSortedMemberInfo(hcatalog : super::super::super::Foundation:: HANDLE, pwszreferencetag : windows_core::PCWSTR) -> *mut CRYPTCATMEMBER); - CryptCATAllocSortedMemberInfo(hcatalog.param().abi(), pwszreferencetag.param().abi()) + CryptCATAllocSortedMemberInfo(core::mem::transmute(hcatalog), pwszreferencetag.param().abi()) } #[inline] pub unsafe fn CryptCATCDFClose(pcdf: *mut CRYPTCATCDF) -> super::super::super::Foundation::BOOL { @@ -126,12 +119,12 @@ where CryptCATCDFEnumMembersByCDFTagEx(core::mem::transmute(pcdf), core::mem::transmute(pwszprevcdftag), core::mem::transmute(pfnparseerror), core::mem::transmute(ppmember), fcontinueonerror.param().abi(), core::mem::transmute(pvreserved)) } #[inline] -pub unsafe fn CryptCATCDFOpen(pwszfilepath: P0, pfnparseerror: PFN_CDF_PARSE_ERROR_CALLBACK) -> *mut CRYPTCATCDF +pub unsafe fn CryptCATCDFOpen(pwszfilepath: P0, pfnparseerror: Option) -> *mut CRYPTCATCDF where P0: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATCDFOpen(pwszfilepath : windows_core::PCWSTR, pfnparseerror : PFN_CDF_PARSE_ERROR_CALLBACK) -> *mut CRYPTCATCDF); - CryptCATCDFOpen(pwszfilepath.param().abi(), core::mem::transmute(pfnparseerror)) + CryptCATCDFOpen(pwszfilepath.param().abi(), core::mem::transmute(pfnparseerror.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CryptCATCatalogInfoFromContext(hcatinfo: isize, pscatinfo: *mut CATALOG_INFO, dwflags: u32) -> windows_core::Result<()> { @@ -139,76 +132,58 @@ pub unsafe fn CryptCATCatalogInfoFromContext(hcatinfo: isize, pscatinfo: *mut CA CryptCATCatalogInfoFromContext(core::mem::transmute(hcatinfo), core::mem::transmute(pscatinfo), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CryptCATClose(hcatalog: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCATClose(hcatalog: super::super::super::Foundation::HANDLE) -> super::super::super::Foundation::BOOL { windows_targets::link!("wintrust.dll" "system" fn CryptCATClose(hcatalog : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - CryptCATClose(hcatalog.param().abi()) + CryptCATClose(core::mem::transmute(hcatalog)) } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATEnumerateAttr(hcatalog: P0, pcatmember: *mut CRYPTCATMEMBER, pprevattr: *mut CRYPTCATATTRIBUTE) -> *mut CRYPTCATATTRIBUTE -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCATEnumerateAttr(hcatalog: super::super::super::Foundation::HANDLE, pcatmember: *mut CRYPTCATMEMBER, pprevattr: *mut CRYPTCATATTRIBUTE) -> *mut CRYPTCATATTRIBUTE { windows_targets::link!("wintrust.dll" "system" fn CryptCATEnumerateAttr(hcatalog : super::super::super::Foundation:: HANDLE, pcatmember : *mut CRYPTCATMEMBER, pprevattr : *mut CRYPTCATATTRIBUTE) -> *mut CRYPTCATATTRIBUTE); - CryptCATEnumerateAttr(hcatalog.param().abi(), core::mem::transmute(pcatmember), core::mem::transmute(pprevattr)) + CryptCATEnumerateAttr(core::mem::transmute(hcatalog), core::mem::transmute(pcatmember), core::mem::transmute(pprevattr)) } #[inline] -pub unsafe fn CryptCATEnumerateCatAttr(hcatalog: P0, pprevattr: *mut CRYPTCATATTRIBUTE) -> *mut CRYPTCATATTRIBUTE -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCATEnumerateCatAttr(hcatalog: super::super::super::Foundation::HANDLE, pprevattr: *mut CRYPTCATATTRIBUTE) -> *mut CRYPTCATATTRIBUTE { windows_targets::link!("wintrust.dll" "system" fn CryptCATEnumerateCatAttr(hcatalog : super::super::super::Foundation:: HANDLE, pprevattr : *mut CRYPTCATATTRIBUTE) -> *mut CRYPTCATATTRIBUTE); - CryptCATEnumerateCatAttr(hcatalog.param().abi(), core::mem::transmute(pprevattr)) + CryptCATEnumerateCatAttr(core::mem::transmute(hcatalog), core::mem::transmute(pprevattr)) } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATEnumerateMember(hcatalog: P0, pprevmember: *mut CRYPTCATMEMBER) -> *mut CRYPTCATMEMBER -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCATEnumerateMember(hcatalog: super::super::super::Foundation::HANDLE, pprevmember: *mut CRYPTCATMEMBER) -> *mut CRYPTCATMEMBER { windows_targets::link!("wintrust.dll" "system" fn CryptCATEnumerateMember(hcatalog : super::super::super::Foundation:: HANDLE, pprevmember : *mut CRYPTCATMEMBER) -> *mut CRYPTCATMEMBER); - CryptCATEnumerateMember(hcatalog.param().abi(), core::mem::transmute(pprevmember)) + CryptCATEnumerateMember(core::mem::transmute(hcatalog), core::mem::transmute(pprevmember)) } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATFreeSortedMemberInfo(hcatalog: P0, pcatmember: *mut CRYPTCATMEMBER) -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCATFreeSortedMemberInfo(hcatalog: super::super::super::Foundation::HANDLE, pcatmember: *mut CRYPTCATMEMBER) { windows_targets::link!("wintrust.dll" "system" fn CryptCATFreeSortedMemberInfo(hcatalog : super::super::super::Foundation:: HANDLE, pcatmember : *mut CRYPTCATMEMBER)); - CryptCATFreeSortedMemberInfo(hcatalog.param().abi(), core::mem::transmute(pcatmember)) + CryptCATFreeSortedMemberInfo(core::mem::transmute(hcatalog), core::mem::transmute(pcatmember)) } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATGetAttrInfo(hcatalog: P0, pcatmember: *mut CRYPTCATMEMBER, pwszreferencetag: P2) -> *mut CRYPTCATATTRIBUTE +pub unsafe fn CryptCATGetAttrInfo(hcatalog: super::super::super::Foundation::HANDLE, pcatmember: *mut CRYPTCATMEMBER, pwszreferencetag: P2) -> *mut CRYPTCATATTRIBUTE where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATGetAttrInfo(hcatalog : super::super::super::Foundation:: HANDLE, pcatmember : *mut CRYPTCATMEMBER, pwszreferencetag : windows_core::PCWSTR) -> *mut CRYPTCATATTRIBUTE); - CryptCATGetAttrInfo(hcatalog.param().abi(), core::mem::transmute(pcatmember), pwszreferencetag.param().abi()) + CryptCATGetAttrInfo(core::mem::transmute(hcatalog), core::mem::transmute(pcatmember), pwszreferencetag.param().abi()) } #[inline] -pub unsafe fn CryptCATGetCatAttrInfo(hcatalog: P0, pwszreferencetag: P1) -> *mut CRYPTCATATTRIBUTE +pub unsafe fn CryptCATGetCatAttrInfo(hcatalog: super::super::super::Foundation::HANDLE, pwszreferencetag: P1) -> *mut CRYPTCATATTRIBUTE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATGetCatAttrInfo(hcatalog : super::super::super::Foundation:: HANDLE, pwszreferencetag : windows_core::PCWSTR) -> *mut CRYPTCATATTRIBUTE); - CryptCATGetCatAttrInfo(hcatalog.param().abi(), pwszreferencetag.param().abi()) + CryptCATGetCatAttrInfo(core::mem::transmute(hcatalog), pwszreferencetag.param().abi()) } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATGetMemberInfo(hcatalog: P0, pwszreferencetag: P1) -> *mut CRYPTCATMEMBER +pub unsafe fn CryptCATGetMemberInfo(hcatalog: super::super::super::Foundation::HANDLE, pwszreferencetag: P1) -> *mut CRYPTCATMEMBER where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATGetMemberInfo(hcatalog : super::super::super::Foundation:: HANDLE, pwszreferencetag : windows_core::PCWSTR) -> *mut CRYPTCATMEMBER); - CryptCATGetMemberInfo(hcatalog.param().abi(), pwszreferencetag.param().abi()) + CryptCATGetMemberInfo(core::mem::transmute(hcatalog), pwszreferencetag.param().abi()) } #[inline] pub unsafe fn CryptCATHandleFromStore(pcatstore: *mut CRYPTCATSTORE) -> super::super::super::Foundation::HANDLE { @@ -224,59 +199,49 @@ where CryptCATOpen(pwszfilename.param().abi(), core::mem::transmute(fdwopenflags), core::mem::transmute(hprov), core::mem::transmute(dwpublicversion), core::mem::transmute(dwencodingtype)) } #[inline] -pub unsafe fn CryptCATPersistStore(hcatalog: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCATPersistStore(hcatalog: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wintrust.dll" "system" fn CryptCATPersistStore(hcatalog : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - CryptCATPersistStore(hcatalog.param().abi()).ok() + CryptCATPersistStore(core::mem::transmute(hcatalog)).ok() } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATPutAttrInfo(hcatalog: P0, pcatmember: *mut CRYPTCATMEMBER, pwszreferencetag: P2, dwattrtypeandaction: u32, cbdata: u32, pbdata: *mut u8) -> *mut CRYPTCATATTRIBUTE +pub unsafe fn CryptCATPutAttrInfo(hcatalog: super::super::super::Foundation::HANDLE, pcatmember: *mut CRYPTCATMEMBER, pwszreferencetag: P2, dwattrtypeandaction: u32, cbdata: u32, pbdata: *mut u8) -> *mut CRYPTCATATTRIBUTE where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATPutAttrInfo(hcatalog : super::super::super::Foundation:: HANDLE, pcatmember : *mut CRYPTCATMEMBER, pwszreferencetag : windows_core::PCWSTR, dwattrtypeandaction : u32, cbdata : u32, pbdata : *mut u8) -> *mut CRYPTCATATTRIBUTE); - CryptCATPutAttrInfo(hcatalog.param().abi(), core::mem::transmute(pcatmember), pwszreferencetag.param().abi(), core::mem::transmute(dwattrtypeandaction), core::mem::transmute(cbdata), core::mem::transmute(pbdata)) + CryptCATPutAttrInfo(core::mem::transmute(hcatalog), core::mem::transmute(pcatmember), pwszreferencetag.param().abi(), core::mem::transmute(dwattrtypeandaction), core::mem::transmute(cbdata), core::mem::transmute(pbdata)) } #[inline] -pub unsafe fn CryptCATPutCatAttrInfo(hcatalog: P0, pwszreferencetag: P1, dwattrtypeandaction: u32, cbdata: u32, pbdata: *mut u8) -> *mut CRYPTCATATTRIBUTE +pub unsafe fn CryptCATPutCatAttrInfo(hcatalog: super::super::super::Foundation::HANDLE, pwszreferencetag: P1, dwattrtypeandaction: u32, cbdata: u32, pbdata: *mut u8) -> *mut CRYPTCATATTRIBUTE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATPutCatAttrInfo(hcatalog : super::super::super::Foundation:: HANDLE, pwszreferencetag : windows_core::PCWSTR, dwattrtypeandaction : u32, cbdata : u32, pbdata : *mut u8) -> *mut CRYPTCATATTRIBUTE); - CryptCATPutCatAttrInfo(hcatalog.param().abi(), pwszreferencetag.param().abi(), core::mem::transmute(dwattrtypeandaction), core::mem::transmute(cbdata), core::mem::transmute(pbdata)) + CryptCATPutCatAttrInfo(core::mem::transmute(hcatalog), pwszreferencetag.param().abi(), core::mem::transmute(dwattrtypeandaction), core::mem::transmute(cbdata), core::mem::transmute(pbdata)) } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATPutMemberInfo(hcatalog: P0, pwszfilename: P1, pwszreferencetag: P2, pgsubjecttype: *mut windows_core::GUID, dwcertversion: u32, cbsipindirectdata: u32, pbsipindirectdata: *mut u8) -> *mut CRYPTCATMEMBER +pub unsafe fn CryptCATPutMemberInfo(hcatalog: super::super::super::Foundation::HANDLE, pwszfilename: P1, pwszreferencetag: P2, pgsubjecttype: *mut windows_core::GUID, dwcertversion: u32, cbsipindirectdata: u32, pbsipindirectdata: *mut u8) -> *mut CRYPTCATMEMBER where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATPutMemberInfo(hcatalog : super::super::super::Foundation:: HANDLE, pwszfilename : windows_core::PCWSTR, pwszreferencetag : windows_core::PCWSTR, pgsubjecttype : *mut windows_core::GUID, dwcertversion : u32, cbsipindirectdata : u32, pbsipindirectdata : *mut u8) -> *mut CRYPTCATMEMBER); - CryptCATPutMemberInfo(hcatalog.param().abi(), pwszfilename.param().abi(), pwszreferencetag.param().abi(), core::mem::transmute(pgsubjecttype), core::mem::transmute(dwcertversion), core::mem::transmute(cbsipindirectdata), core::mem::transmute(pbsipindirectdata)) + CryptCATPutMemberInfo(core::mem::transmute(hcatalog), pwszfilename.param().abi(), pwszreferencetag.param().abi(), core::mem::transmute(pgsubjecttype), core::mem::transmute(dwcertversion), core::mem::transmute(cbsipindirectdata), core::mem::transmute(pbsipindirectdata)) } #[inline] -pub unsafe fn CryptCATStoreFromHandle(hcatalog: P0) -> *mut CRYPTCATSTORE -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCATStoreFromHandle(hcatalog: super::super::super::Foundation::HANDLE) -> *mut CRYPTCATSTORE { windows_targets::link!("wintrust.dll" "system" fn CryptCATStoreFromHandle(hcatalog : super::super::super::Foundation:: HANDLE) -> *mut CRYPTCATSTORE); - CryptCATStoreFromHandle(hcatalog.param().abi()) + CryptCATStoreFromHandle(core::mem::transmute(hcatalog)) } #[inline] -pub unsafe fn IsCatalogFile(hfile: P0, pwszfilename: P1) -> super::super::super::Foundation::BOOL +pub unsafe fn IsCatalogFile(hfile: super::super::super::Foundation::HANDLE, pwszfilename: P1) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn IsCatalogFile(hfile : super::super::super::Foundation:: HANDLE, pwszfilename : windows_core::PCWSTR) -> super::super::super::Foundation:: BOOL); - IsCatalogFile(hfile.param().abi(), pwszfilename.param().abi()) + IsCatalogFile(core::mem::transmute(hfile), pwszfilename.param().abi()) } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 5dd71e361f..b8ca8e0ac3 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(core::mem::transmute(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())), core::mem::transmute(pptrustedissuers)) + PstGetTrustAnchorsEx(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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 P1: 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(core::ptr::null())), bisclient.param().abi(), core::mem::transmute(prequestedissuancepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(phadditionalcertstore.unwrap_or(core::ptr::null())), core::mem::transmute(pcert), core::mem::transmute(pprovguid.unwrap_or(core::ptr::null_mut()))) + PstValidate(core::mem::transmute(ptargetname.unwrap_or(core::mem::zeroed())), bisclient.param().abi(), core::mem::transmute(prequestedissuancepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(phadditionalcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcert), core::mem::transmute(pprovguid.unwrap_or(core::mem::zeroed()))) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -1014,12 +1014,11 @@ impl IAlternativeName { pub unsafe fn InitializeFromRawData(&self, r#type: AlternativeNameType, encoding: EncodingType, strrawdata: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeFromRawData)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), core::mem::transmute(encoding), core::mem::transmute_copy(strrawdata)).ok() } - pub unsafe fn InitializeFromOtherName(&self, pobjectid: P0, encoding: EncodingType, strrawdata: &windows_core::BSTR, tobewrapped: P3) -> windows_core::Result<()> + pub unsafe fn InitializeFromOtherName(&self, pobjectid: P0, encoding: EncodingType, strrawdata: &windows_core::BSTR, tobewrapped: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeFromOtherName)(windows_core::Interface::as_raw(self), pobjectid.param().abi(), core::mem::transmute(encoding), core::mem::transmute_copy(strrawdata), tobewrapped.param().abi()).ok() + (windows_core::Interface::vtable(self).InitializeFromOtherName)(windows_core::Interface::as_raw(self), pobjectid.param().abi(), core::mem::transmute(encoding), core::mem::transmute_copy(strrawdata), core::mem::transmute(tobewrapped)).ok() } pub unsafe fn Type(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5187,11 +5186,8 @@ impl ICertProperties { pub unsafe fn Clear(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn InitializeFromCertificate(&self, machinecontext: P0, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeFromCertificate)(windows_core::Interface::as_raw(self), machinecontext.param().abi(), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() + pub unsafe fn InitializeFromCertificate(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeFromCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(machinecontext), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5295,11 +5291,8 @@ impl core::ops::Deref for ICertProperty { windows_core::imp::interface_hierarchy!(ICertProperty, windows_core::IUnknown, super::super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl ICertProperty { - pub unsafe fn InitializeFromCertificate(&self, machinecontext: P0, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeFromCertificate)(windows_core::Interface::as_raw(self), machinecontext.param().abi(), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() + pub unsafe fn InitializeFromCertificate(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeFromCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(machinecontext), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() } pub unsafe fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeDecode)(windows_core::Interface::as_raw(self), core::mem::transmute(encoding), core::mem::transmute_copy(strencodeddata)).ok() @@ -5315,17 +5308,11 @@ impl ICertProperty { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_RawData)(windows_core::Interface::as_raw(self), core::mem::transmute(encoding), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn RemoveFromCertificate(&self, machinecontext: P0, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemoveFromCertificate)(windows_core::Interface::as_raw(self), machinecontext.param().abi(), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() + pub unsafe fn RemoveFromCertificate(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemoveFromCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(machinecontext), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() } - pub unsafe fn SetValueOnCertificate(&self, machinecontext: P0, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetValueOnCertificate)(windows_core::Interface::as_raw(self), machinecontext.param().abi(), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() + pub unsafe fn SetValueOnCertificate(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetValueOnCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(machinecontext), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5423,11 +5410,8 @@ impl core::ops::Deref for ICertPropertyArchived { windows_core::imp::interface_hierarchy!(ICertPropertyArchived, windows_core::IUnknown, super::super::super::System::Com::IDispatch, ICertProperty); #[cfg(feature = "Win32_System_Com")] impl ICertPropertyArchived { - pub unsafe fn Initialize(&self, archivedvalue: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), archivedvalue.param().abi()).ok() + pub unsafe fn Initialize(&self, archivedvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(archivedvalue)).ok() } pub unsafe fn Archived(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5608,17 +5592,11 @@ impl core::ops::Deref for ICertPropertyBackedUp { windows_core::imp::interface_hierarchy!(ICertPropertyBackedUp, windows_core::IUnknown, super::super::super::System::Com::IDispatch, ICertProperty); #[cfg(feature = "Win32_System_Com")] impl ICertPropertyBackedUp { - pub unsafe fn InitializeFromCurrentTime(&self, backedupvalue: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeFromCurrentTime)(windows_core::Interface::as_raw(self), backedupvalue.param().abi()).ok() + pub unsafe fn InitializeFromCurrentTime(&self, backedupvalue: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeFromCurrentTime)(windows_core::Interface::as_raw(self), core::mem::transmute(backedupvalue)).ok() } - pub unsafe fn Initialize(&self, backedupvalue: P0, date: f64) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), backedupvalue.param().abi(), core::mem::transmute(date)).ok() + pub unsafe fn Initialize(&self, backedupvalue: super::super::super::Foundation::VARIANT_BOOL, date: f64) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(backedupvalue), core::mem::transmute(date)).ok() } pub unsafe fn BackedUpValue(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6181,11 +6159,8 @@ impl ICertPropertyRenewal { pub unsafe fn Initialize(&self, encoding: EncodingType, strrenewalvalue: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(encoding), core::mem::transmute_copy(strrenewalvalue)).ok() } - pub unsafe fn InitializeFromCertificateHash(&self, machinecontext: P0, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeFromCertificateHash)(windows_core::Interface::as_raw(self), machinecontext.param().abi(), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() + pub unsafe fn InitializeFromCertificateHash(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeFromCertificateHash)(windows_core::Interface::as_raw(self), core::mem::transmute(machinecontext), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() } pub unsafe fn get_Renewal(&self, encoding: EncodingType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8718,12 +8693,11 @@ impl ICspInformation { pub unsafe fn InitializeFromName(&self, strname: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeFromName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname)).ok() } - pub unsafe fn InitializeFromType(&self, r#type: X509ProviderType, palgorithm: P1, machinecontext: P2) -> windows_core::Result<()> + pub unsafe fn InitializeFromType(&self, r#type: X509ProviderType, palgorithm: P1, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeFromType)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), palgorithm.param().abi(), machinecontext.param().abi()).ok() + (windows_core::Interface::vtable(self).InitializeFromType)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), palgorithm.param().abi(), core::mem::transmute(machinecontext)).ok() } pub unsafe fn CspAlgorithms(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8773,12 +8747,9 @@ impl ICspInformation { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsSmartCard)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetDefaultSecurityDescriptor(&self, machinecontext: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetDefaultSecurityDescriptor(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetDefaultSecurityDescriptor)(windows_core::Interface::as_raw(self), machinecontext.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetDefaultSecurityDescriptor)(windows_core::Interface::as_raw(self), core::mem::transmute(machinecontext), &mut result__).map(|| core::mem::transmute(result__)) } pub unsafe fn LegacyCsp(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10419,29 +10390,17 @@ impl IEnroll2 { pub unsafe fn HashAlgID(&self, hashalgid: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HashAlgID)(windows_core::Interface::as_raw(self), core::mem::transmute(hashalgid)).ok() } - pub unsafe fn SetHStoreMy(&self, hstore: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHStoreMy)(windows_core::Interface::as_raw(self), hstore.param().abi()).ok() + pub unsafe fn SetHStoreMy(&self, hstore: super::HCERTSTORE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHStoreMy)(windows_core::Interface::as_raw(self), core::mem::transmute(hstore)).ok() } - pub unsafe fn SetHStoreCA(&self, hstore: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHStoreCA)(windows_core::Interface::as_raw(self), hstore.param().abi()).ok() + pub unsafe fn SetHStoreCA(&self, hstore: super::HCERTSTORE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHStoreCA)(windows_core::Interface::as_raw(self), core::mem::transmute(hstore)).ok() } - pub unsafe fn SetHStoreROOT(&self, hstore: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHStoreROOT)(windows_core::Interface::as_raw(self), hstore.param().abi()).ok() + pub unsafe fn SetHStoreROOT(&self, hstore: super::HCERTSTORE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHStoreROOT)(windows_core::Interface::as_raw(self), core::mem::transmute(hstore)).ok() } - pub unsafe fn SetHStoreRequest(&self, hstore: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHStoreRequest)(windows_core::Interface::as_raw(self), hstore.param().abi()).ok() + pub unsafe fn SetHStoreRequest(&self, hstore: super::HCERTSTORE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHStoreRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(hstore)).ok() } pub unsafe fn SetLimitExchangeKeyToEncipherment(&self, flimitexchangekeytoencipherment: P0) -> windows_core::Result<()> where @@ -11641,17 +11600,11 @@ impl IOCSPAdmin { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OCSPCAConfigurationCollection)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetConfiguration(&self, bstrservername: &windows_core::BSTR, bforce: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrservername), bforce.param().abi()).ok() + pub unsafe fn GetConfiguration(&self, bstrservername: &windows_core::BSTR, bforce: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrservername), core::mem::transmute(bforce)).ok() } - pub unsafe fn SetConfiguration(&self, bstrservername: &windows_core::BSTR, bforce: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrservername), bforce.param().abi()).ok() + pub unsafe fn SetConfiguration(&self, bstrservername: &windows_core::BSTR, bforce: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrservername), core::mem::transmute(bforce)).ok() } pub unsafe fn GetMyRoles(&self, bstrservername: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13170,11 +13123,8 @@ impl core::ops::Deref for ISignerCertificate { windows_core::imp::interface_hierarchy!(ISignerCertificate, windows_core::IUnknown, super::super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl ISignerCertificate { - pub unsafe fn Initialize(&self, machinecontext: P0, verifytype: X509PrivateKeyVerify, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), machinecontext.param().abi(), core::mem::transmute(verifytype), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() + pub unsafe fn Initialize(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL, verifytype: X509PrivateKeyVerify, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(machinecontext), core::mem::transmute(verifytype), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() } pub unsafe fn get_Certificate(&self, encoding: EncodingType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13188,11 +13138,8 @@ impl ISignerCertificate { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Silent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSilent(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetSilent(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ParentWindow(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13532,11 +13479,8 @@ impl ISmimeCapabilities { { (windows_core::Interface::vtable(self).AddFromCsp)(windows_core::Interface::as_raw(self), pvalue.param().abi()).ok() } - pub unsafe fn AddAvailableSmimeCapabilities(&self, machinecontext: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddAvailableSmimeCapabilities)(windows_core::Interface::as_raw(self), machinecontext.param().abi()).ok() + pub unsafe fn AddAvailableSmimeCapabilities(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddAvailableSmimeCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(machinecontext)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -14674,11 +14618,8 @@ impl IX509CertificateRequest { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Silent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSilent(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetSilent(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ParentWindow(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14698,11 +14639,8 @@ impl IX509CertificateRequest { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SuppressDefaults)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSuppressDefaults(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSuppressDefaults)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetSuppressDefaults(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSuppressDefaults)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn get_RenewalCertificate(&self, encoding: EncodingType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14742,11 +14680,8 @@ impl IX509CertificateRequest { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAlternateSignatureAlgorithm(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAlternateSignatureAlgorithm(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn get_RawData(&self, encoding: EncodingType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15383,11 +15318,8 @@ impl IX509CertificateRequestCmc { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ArchivePrivateKey)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetArchivePrivateKey(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetArchivePrivateKey)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetArchivePrivateKey(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetArchivePrivateKey)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn get_KeyArchivalCertificate(&self, encoding: EncodingType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15739,12 +15671,11 @@ impl IX509CertificateRequestCmc2 { pub unsafe fn CheckSignature(&self, allowedsignaturetypes: Pkcs10AllowedSignatureTypes) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(allowedsignaturetypes)).ok() } - pub unsafe fn CheckCertificateSignature(&self, psignercertificate: P0, validatecertificatechain: P1) -> windows_core::Result<()> + pub unsafe fn CheckCertificateSignature(&self, psignercertificate: P0, validatecertificatechain: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CheckCertificateSignature)(windows_core::Interface::as_raw(self), psignercertificate.param().abi(), validatecertificatechain.param().abi()).ok() + (windows_core::Interface::vtable(self).CheckCertificateSignature)(windows_core::Interface::as_raw(self), psignercertificate.param().abi(), core::mem::transmute(validatecertificatechain)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -15905,11 +15836,8 @@ impl IX509CertificateRequestPkcs10 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SmimeCapabilities)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSmimeCapabilities(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSmimeCapabilities)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetSmimeCapabilities(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSmimeCapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn SignatureInformation(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16412,11 +16340,8 @@ impl IX509CertificateRequestPkcs10V3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AttestPrivateKey)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAttestPrivateKey(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAttestPrivateKey)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAttestPrivateKey(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAttestPrivateKey)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn get_AttestationEncryptionCertificate(&self, encoding: EncodingType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16612,11 +16537,8 @@ impl IX509CertificateRequestPkcs10V4 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AttestPrivateKeyPreferred)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAttestPrivateKeyPreferred(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAttestPrivateKeyPreferred)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAttestPrivateKeyPreferred(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAttestPrivateKeyPreferred)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -16696,11 +16618,8 @@ impl IX509CertificateRequestPkcs7 { pub unsafe fn InitializeFromTemplateName(&self, context: X509CertificateEnrollmentContext, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeFromTemplateName)(windows_core::Interface::as_raw(self), core::mem::transmute(context), core::mem::transmute_copy(strtemplatename)).ok() } - pub unsafe fn InitializeFromCertificate(&self, context: X509CertificateEnrollmentContext, renewalrequest: P1, strcertificate: &windows_core::BSTR, encoding: EncodingType, inheritoptions: X509RequestInheritOptions) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeFromCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(context), renewalrequest.param().abi(), core::mem::transmute_copy(strcertificate), core::mem::transmute(encoding), core::mem::transmute(inheritoptions)).ok() + pub unsafe fn InitializeFromCertificate(&self, context: X509CertificateEnrollmentContext, renewalrequest: super::super::super::Foundation::VARIANT_BOOL, strcertificate: &windows_core::BSTR, encoding: EncodingType, inheritoptions: X509RequestInheritOptions) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeFromCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(context), core::mem::transmute(renewalrequest), core::mem::transmute_copy(strcertificate), core::mem::transmute(encoding), core::mem::transmute(inheritoptions)).ok() } pub unsafe fn InitializeFromInnerRequest(&self, pinnerrequest: P0) -> windows_core::Result<()> where @@ -16846,11 +16765,8 @@ impl IX509CertificateRequestPkcs7V2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Template)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CheckCertificateSignature(&self, validatecertificatechain: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CheckCertificateSignature)(windows_core::Interface::as_raw(self), validatecertificatechain.param().abi()).ok() + pub unsafe fn CheckCertificateSignature(&self, validatecertificatechain: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CheckCertificateSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(validatecertificatechain)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -17030,11 +16946,8 @@ impl IX509CertificateRevocationList { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAlternateSignatureAlgorithm(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAlternateSignatureAlgorithm(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn SignatureInformation(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -18035,19 +17948,13 @@ impl IX509EndorsementKey { pub unsafe fn RemoveCertificate(&self, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemoveCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(encoding), core::mem::transmute_copy(strcertificate)).ok() } - pub unsafe fn GetCertificateByIndex(&self, manufactureronly: P0, dwindex: i32, encoding: EncodingType) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetCertificateByIndex(&self, manufactureronly: super::super::super::Foundation::VARIANT_BOOL, dwindex: i32, encoding: EncodingType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCertificateByIndex)(windows_core::Interface::as_raw(self), manufactureronly.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(encoding), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetCertificateByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(manufactureronly), core::mem::transmute(dwindex), core::mem::transmute(encoding), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn GetCertificateCount(&self, manufactureronly: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetCertificateCount(&self, manufactureronly: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCertificateCount)(windows_core::Interface::as_raw(self), manufactureronly.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetCertificateCount)(windows_core::Interface::as_raw(self), core::mem::transmute(manufactureronly), &mut result__).map(|| result__) } pub unsafe fn ExportPublicKey(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -18241,11 +18148,8 @@ impl IX509Enrollment { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Silent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSilent(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetSilent(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ParentWindow(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -18768,11 +18672,8 @@ impl core::ops::Deref for IX509EnrollmentPolicyServer { windows_core::imp::interface_hierarchy!(IX509EnrollmentPolicyServer, windows_core::IUnknown, super::super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl IX509EnrollmentPolicyServer { - pub unsafe fn Initialize(&self, bstrpolicyserverurl: &windows_core::BSTR, bstrpolicyserverid: &windows_core::BSTR, authflags: X509EnrollmentAuthFlags, fisuntrusted: P3, context: X509CertificateEnrollmentContext) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpolicyserverurl), core::mem::transmute_copy(bstrpolicyserverid), core::mem::transmute(authflags), fisuntrusted.param().abi(), core::mem::transmute(context)).ok() + pub unsafe fn Initialize(&self, bstrpolicyserverurl: &windows_core::BSTR, bstrpolicyserverid: &windows_core::BSTR, authflags: X509EnrollmentAuthFlags, fisuntrusted: super::super::super::Foundation::VARIANT_BOOL, context: X509CertificateEnrollmentContext) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpolicyserverurl), core::mem::transmute_copy(bstrpolicyserverid), core::mem::transmute(authflags), core::mem::transmute(fisuntrusted), core::mem::transmute(context)).ok() } pub unsafe fn LoadPolicy(&self, option: X509EnrollmentPolicyLoadOption) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).LoadPolicy)(windows_core::Interface::as_raw(self), core::mem::transmute(option)).ok() @@ -19447,11 +19348,8 @@ impl IX509Extension { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Critical)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetCritical(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCritical)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetCritical(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCritical)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -19688,11 +19586,8 @@ impl core::ops::Deref for IX509ExtensionBasicConstraints { windows_core::imp::interface_hierarchy!(IX509ExtensionBasicConstraints, windows_core::IUnknown, super::super::super::System::Com::IDispatch, IX509Extension); #[cfg(feature = "Win32_System_Com")] impl IX509ExtensionBasicConstraints { - pub unsafe fn InitializeEncode(&self, isca: P0, pathlenconstraint: i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeEncode)(windows_core::Interface::as_raw(self), isca.param().abi(), core::mem::transmute(pathlenconstraint)).ok() + pub unsafe fn InitializeEncode(&self, isca: super::super::super::Foundation::VARIANT_BOOL, pathlenconstraint: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeEncode)(windows_core::Interface::as_raw(self), core::mem::transmute(isca), core::mem::transmute(pathlenconstraint)).ok() } pub unsafe fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeDecode)(windows_core::Interface::as_raw(self), core::mem::transmute(encoding), core::mem::transmute_copy(strencodeddata)).ok() @@ -20947,11 +20842,8 @@ impl IX509PolicyServerUrl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Default)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDefault(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDefault)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetDefault(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDefault)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn Flags(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21248,11 +21140,8 @@ impl IX509PrivateKey { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LegacyCsp)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLegacyCsp(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLegacyCsp)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetLegacyCsp(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLegacyCsp)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn Algorithm(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21303,11 +21192,8 @@ impl IX509PrivateKey { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MachineContext)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMachineContext(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMachineContext)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetMachineContext(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMachineContext)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn SecurityDescriptor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21339,21 +21225,15 @@ impl IX509PrivateKey { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Existing)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetExisting(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetExisting)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetExisting(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetExisting)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn Silent(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Silent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSilent(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetSilent(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ParentWindow(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -22390,11 +22270,8 @@ impl IX509SCEPEnrollment { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Silent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSilent(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetSilent(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn DeleteRequest(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteRequest)(windows_core::Interface::as_raw(self)).ok() @@ -22953,11 +22830,8 @@ impl IX509SignatureInformation { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAlternateSignatureAlgorithm(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAlternateSignatureAlgorithm(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAlternateSignatureAlgorithm)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn AlternateSignatureAlgorithmSet(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -22967,19 +22841,12 @@ impl IX509SignatureInformation { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).NullSigned)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNullSigned(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNullSigned)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetNullSigned(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNullSigned)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } - pub unsafe fn GetSignatureAlgorithm(&self, pkcs7signature: P0, signaturekey: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn GetSignatureAlgorithm(&self, pkcs7signature: super::super::super::Foundation::VARIANT_BOOL, signaturekey: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSignatureAlgorithm)(windows_core::Interface::as_raw(self), pkcs7signature.param().abi(), signaturekey.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSignatureAlgorithm)(windows_core::Interface::as_raw(self), core::mem::transmute(pkcs7signature), core::mem::transmute(signaturekey), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn SetDefaultValues(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDefaultValues)(windows_core::Interface::as_raw(self)).ok() 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 4b940b976d..02876728c8 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(core::mem::transmute(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())), core::mem::transmute(pcbdigest)) + CryptSIPGetSealedDigest(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(pcbdigest)) } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] @@ -51,22 +51,20 @@ pub unsafe fn CryptSIPRemoveSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, dw CryptSIPRemoveSignedDataMsg(core::mem::transmute(psubjectinfo), core::mem::transmute(dwindex)).ok() } #[inline] -pub unsafe fn CryptSIPRetrieveSubjectGuid(filename: P0, hfilein: P1, pgsubject: *mut windows_core::GUID) -> windows_core::Result<()> +pub unsafe fn CryptSIPRetrieveSubjectGuid(filename: P0, hfilein: super::super::super::Foundation::HANDLE, pgsubject: *mut windows_core::GUID) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptSIPRetrieveSubjectGuid(filename : windows_core::PCWSTR, hfilein : super::super::super::Foundation:: HANDLE, pgsubject : *mut windows_core::GUID) -> super::super::super::Foundation:: BOOL); - CryptSIPRetrieveSubjectGuid(filename.param().abi(), hfilein.param().abi(), core::mem::transmute(pgsubject)).ok() + CryptSIPRetrieveSubjectGuid(filename.param().abi(), core::mem::transmute(hfilein), core::mem::transmute(pgsubject)).ok() } #[inline] -pub unsafe fn CryptSIPRetrieveSubjectGuidForCatalogFile(filename: P0, hfilein: P1, pgsubject: *mut windows_core::GUID) -> windows_core::Result<()> +pub unsafe fn CryptSIPRetrieveSubjectGuidForCatalogFile(filename: P0, hfilein: super::super::super::Foundation::HANDLE, pgsubject: *mut windows_core::GUID) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptSIPRetrieveSubjectGuidForCatalogFile(filename : windows_core::PCWSTR, hfilein : super::super::super::Foundation:: HANDLE, pgsubject : *mut windows_core::GUID) -> super::super::super::Foundation:: BOOL); - CryptSIPRetrieveSubjectGuidForCatalogFile(filename.param().abi(), hfilein.param().abi(), core::mem::transmute(pgsubject)).ok() + CryptSIPRetrieveSubjectGuidForCatalogFile(filename.param().abi(), core::mem::transmute(hfilein), core::mem::transmute(pgsubject)).ok() } #[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 528b1585c2..4fea3939cf 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 @@ -9,15 +9,13 @@ pub unsafe fn CryptUIDlgCertMgr(pcryptuicertmgr: *const CRYPTUI_CERT_MGR_STRUCT) CryptUIDlgCertMgr(core::mem::transmute(pcryptuicertmgr)) } #[inline] -pub unsafe fn CryptUIDlgSelectCertificateFromStore(hcertstore: P0, hwnd: P1, pwsztitle: P2, pwszdisplaystring: P3, dwdontusecolumn: u32, dwflags: u32, pvreserved: *const core::ffi::c_void) -> *mut super::CERT_CONTEXT +pub unsafe fn CryptUIDlgSelectCertificateFromStore(hcertstore: super::HCERTSTORE, hwnd: Option, pwsztitle: P2, pwszdisplaystring: P3, dwdontusecolumn: u32, dwflags: u32, pvreserved: *const core::ffi::c_void) -> *mut super::CERT_CONTEXT where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("cryptui.dll" "system" fn CryptUIDlgSelectCertificateFromStore(hcertstore : super:: HCERTSTORE, hwnd : super::super::super::Foundation:: HWND, pwsztitle : windows_core::PCWSTR, pwszdisplaystring : windows_core::PCWSTR, dwdontusecolumn : u32, dwflags : u32, pvreserved : *const core::ffi::c_void) -> *mut super:: CERT_CONTEXT); - CryptUIDlgSelectCertificateFromStore(hcertstore.param().abi(), hwnd.param().abi(), pwsztitle.param().abi(), pwszdisplaystring.param().abi(), core::mem::transmute(dwdontusecolumn), core::mem::transmute(dwflags), core::mem::transmute(pvreserved)) + CryptUIDlgSelectCertificateFromStore(core::mem::transmute(hcertstore), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pwsztitle.param().abi(), pwszdisplaystring.param().abi(), core::mem::transmute(dwdontusecolumn), core::mem::transmute(dwflags), core::mem::transmute(pvreserved)) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip", feature = "Win32_Security_WinTrust", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] @@ -32,31 +30,28 @@ pub unsafe fn CryptUIDlgViewCertificateW(pcertviewinfo: *const CRYPTUI_VIEWCERTI CryptUIDlgViewCertificateW(core::mem::transmute(pcertviewinfo), core::mem::transmute(pfpropertieschanged)).ok() } #[inline] -pub unsafe fn CryptUIDlgViewContext(dwcontexttype: u32, pvcontext: *const core::ffi::c_void, hwnd: P2, pwsztitle: P3, dwflags: u32, pvreserved: *const core::ffi::c_void) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptUIDlgViewContext(dwcontexttype: u32, pvcontext: *const core::ffi::c_void, hwnd: Option, pwsztitle: P3, dwflags: u32, pvreserved: *const core::ffi::c_void) -> super::super::super::Foundation::BOOL where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("cryptui.dll" "system" fn CryptUIDlgViewContext(dwcontexttype : u32, pvcontext : *const core::ffi::c_void, hwnd : super::super::super::Foundation:: HWND, pwsztitle : windows_core::PCWSTR, dwflags : u32, pvreserved : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - CryptUIDlgViewContext(core::mem::transmute(dwcontexttype), core::mem::transmute(pvcontext), hwnd.param().abi(), pwsztitle.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvreserved)) + CryptUIDlgViewContext(core::mem::transmute(dwcontexttype), core::mem::transmute(pvcontext), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pwsztitle.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvreserved)) } #[inline] -pub unsafe fn CryptUIWizDigitalSign(dwflags: u32, hwndparent: P1, pwszwizardtitle: P2, pdigitalsigninfo: *const CRYPTUI_WIZ_DIGITAL_SIGN_INFO, ppsigncontext: Option<*mut *mut CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT>) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptUIWizDigitalSign(dwflags: u32, hwndparent: Option, pwszwizardtitle: P2, pdigitalsigninfo: *const CRYPTUI_WIZ_DIGITAL_SIGN_INFO, ppsigncontext: Option<*mut *mut CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT>) -> super::super::super::Foundation::BOOL where - P1: windows_core::Param, P2: 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(core::mem::transmute(dwflags), hwndparent.param().abi(), pwszwizardtitle.param().abi(), core::mem::transmute(pdigitalsigninfo), core::mem::transmute(ppsigncontext.unwrap_or(core::ptr::null_mut()))) + CryptUIWizDigitalSign(core::mem::transmute(dwflags), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pwszwizardtitle.param().abi(), core::mem::transmute(pdigitalsigninfo), core::mem::transmute(ppsigncontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CryptUIWizExport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: P1, pwszwizardtitle: P2, pexportinfo: *const CRYPTUI_WIZ_EXPORT_INFO, pvoid: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn CryptUIWizExport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: Option, pwszwizardtitle: P2, pexportinfo: *const CRYPTUI_WIZ_EXPORT_INFO, pvoid: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P1: windows_core::Param, P2: 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(core::mem::transmute(dwflags), hwndparent.param().abi(), pwszwizardtitle.param().abi(), core::mem::transmute(pexportinfo), core::mem::transmute(pvoid.unwrap_or(core::ptr::null()))).ok() + CryptUIWizExport(core::mem::transmute(dwflags), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pwszwizardtitle.param().abi(), core::mem::transmute(pexportinfo), core::mem::transmute(pvoid.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptUIWizFreeDigitalSignContext(psigncontext: *const CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT) -> super::super::super::Foundation::BOOL { @@ -64,14 +59,12 @@ pub unsafe fn CryptUIWizFreeDigitalSignContext(psigncontext: *const CRYPTUI_WIZ_ CryptUIWizFreeDigitalSignContext(core::mem::transmute(psigncontext)) } #[inline] -pub unsafe fn CryptUIWizImport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: P1, pwszwizardtitle: P2, pimportsrc: Option<*const CRYPTUI_WIZ_IMPORT_SRC_INFO>, hdestcertstore: P4) -> windows_core::Result<()> +pub unsafe fn CryptUIWizImport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: Option, pwszwizardtitle: P2, pimportsrc: Option<*const CRYPTUI_WIZ_IMPORT_SRC_INFO>, hdestcertstore: Option) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, - P4: 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(core::mem::transmute(dwflags), hwndparent.param().abi(), pwszwizardtitle.param().abi(), core::mem::transmute(pimportsrc.unwrap_or(core::ptr::null())), hdestcertstore.param().abi()).ok() + CryptUIWizImport(core::mem::transmute(dwflags), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pwszwizardtitle.param().abi(), core::mem::transmute(pimportsrc.unwrap_or(core::mem::zeroed())), core::mem::transmute(hdestcertstore.unwrap_or(core::mem::zeroed()))).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 2aa10cc549..fbec06e64e 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs @@ -53,7 +53,7 @@ where P1: 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(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(pconfig.unwrap_or(core::ptr::null()))) + BCryptCreateContext(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(pconfig.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -72,7 +72,7 @@ pub unsafe fn BCryptDecrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: Option<&[u8]>, ppa core::mem::transmute(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(core::ptr::null())), + core::mem::transmute(ppaddinginfo.unwrap_or(core::mem::zeroed())), 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())), @@ -90,31 +90,23 @@ where BCryptDeleteContext(core::mem::transmute(dwtable), pszcontext.param().abi()) } #[inline] -pub unsafe fn BCryptDeriveKey(hsharedsecret: P0, pwszkdf: P1, pparameterlist: Option<*const BCryptBufferDesc>, pbderivedkey: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS +pub unsafe fn BCryptDeriveKey(hsharedsecret: BCRYPT_SECRET_HANDLE, pwszkdf: P1, pparameterlist: Option<*const BCryptBufferDesc>, pbderivedkey: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS where - P0: windows_core::Param, 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(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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) + BCryptDeriveKey(core::mem::transmute(hsharedsecret), pwszkdf.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn BCryptDeriveKeyCapi(hhash: P0, htargetalg: P1, pbderivedkey: &mut [u8], dwflags: u32) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn BCryptDeriveKeyCapi(hhash: BCRYPT_HASH_HANDLE, htargetalg: Option, pbderivedkey: &mut [u8], dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptDeriveKeyCapi(hhash : BCRYPT_HASH_HANDLE, htargetalg : BCRYPT_ALG_HANDLE, pbderivedkey : *mut u8, cbderivedkey : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDeriveKeyCapi(hhash.param().abi(), htargetalg.param().abi(), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), core::mem::transmute(dwflags)) + BCryptDeriveKeyCapi(core::mem::transmute(hhash), core::mem::transmute(htargetalg.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn BCryptDeriveKeyPBKDF2(hprf: P0, pbpassword: Option<&[u8]>, pbsalt: Option<&[u8]>, citerations: u64, pbderivedkey: &mut [u8], dwflags: u32) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn BCryptDeriveKeyPBKDF2(hprf: BCRYPT_ALG_HANDLE, pbpassword: Option<&[u8]>, pbsalt: Option<&[u8]>, citerations: u64, pbderivedkey: &mut [u8], dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptDeriveKeyPBKDF2(hprf : BCRYPT_ALG_HANDLE, pbpassword : *const u8, cbpassword : u32, pbsalt : *const u8, cbsalt : u32, citerations : u64, pbderivedkey : *mut u8, cbderivedkey : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); BCryptDeriveKeyPBKDF2( - hprf.param().abi(), + core::mem::transmute(hprf), core::mem::transmute(pbpassword.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbpassword.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbsalt.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -141,20 +133,14 @@ pub unsafe fn BCryptDestroySecret(hsecret: BCRYPT_SECRET_HANDLE) -> super::super BCryptDestroySecret(core::mem::transmute(hsecret)) } #[inline] -pub unsafe fn BCryptDuplicateHash(hhash: P0, phnewhash: *mut BCRYPT_HASH_HANDLE, pbhashobject: Option<&mut [u8]>, dwflags: u32) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn BCryptDuplicateHash(hhash: BCRYPT_HASH_HANDLE, phnewhash: *mut BCRYPT_HASH_HANDLE, pbhashobject: Option<&mut [u8]>, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptDuplicateHash(hhash : BCRYPT_HASH_HANDLE, phnewhash : *mut BCRYPT_HASH_HANDLE, pbhashobject : *mut u8, cbhashobject : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDuplicateHash(hhash.param().abi(), core::mem::transmute(phnewhash), core::mem::transmute(pbhashobject.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbhashobject.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwflags)) + BCryptDuplicateHash(core::mem::transmute(hhash), core::mem::transmute(phnewhash), core::mem::transmute(pbhashobject.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbhashobject.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn BCryptDuplicateKey(hkey: P0, phnewkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: Option<&mut [u8]>, dwflags: u32) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn BCryptDuplicateKey(hkey: BCRYPT_KEY_HANDLE, phnewkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: Option<&mut [u8]>, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptDuplicateKey(hkey : BCRYPT_KEY_HANDLE, phnewkey : *mut BCRYPT_KEY_HANDLE, pbkeyobject : *mut u8, cbkeyobject : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDuplicateKey(hkey.param().abi(), core::mem::transmute(phnewkey), core::mem::transmute(pbkeyobject.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbkeyobject.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwflags)) + BCryptDuplicateKey(core::mem::transmute(hkey), core::mem::transmute(phnewkey), core::mem::transmute(pbkeyobject.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbkeyobject.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn BCryptEncrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: Option<&[u8]>, ppaddinginfo: Option<*const core::ffi::c_void>, pbiv: Option<&mut [u8]>, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: BCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS { @@ -163,7 +149,7 @@ pub unsafe fn BCryptEncrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: Option<&[u8]>, ppa core::mem::transmute(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(core::ptr::null())), + core::mem::transmute(ppaddinginfo.unwrap_or(core::mem::zeroed())), 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())), @@ -184,7 +170,7 @@ where P3: 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(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), pszfunction.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) + BCryptEnumContextFunctionProviders(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), pszfunction.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn BCryptEnumContextFunctions(dwtable: BCRYPT_TABLE, pszcontext: P1, dwinterface: BCRYPT_INTERFACE, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_CONTEXT_FUNCTIONS>) -> super::super::Foundation::NTSTATUS @@ -192,12 +178,12 @@ where P1: 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(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) + BCryptEnumContextFunctions(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dwtable), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) + BCryptEnumContexts(core::mem::transmute(dwtable), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn BCryptEnumProviders(pszalgid: P0, pimplcount: *mut u32, ppimpllist: *mut *mut BCRYPT_PROVIDER_NAME, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -210,17 +196,15 @@ 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(core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) + BCryptEnumRegisteredProviders(core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BCryptExportKey(hkey: P0, hexportkey: P1, pszblobtype: P2, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS +pub unsafe fn BCryptExportKey(hkey: BCRYPT_KEY_HANDLE, hexportkey: Option, pszblobtype: P2, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptExportKey(hkey : BCRYPT_KEY_HANDLE, hexportkey : BCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptExportKey(hkey.param().abi(), hexportkey.param().abi(), pszblobtype.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) + BCryptExportKey(core::mem::transmute(hkey), core::mem::transmute(hexportkey.unwrap_or(core::mem::zeroed())), pszblobtype.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn BCryptFinalizeKeyPair(hkey: BCRYPT_KEY_HANDLE, dwflags: u32) -> super::super::Foundation::NTSTATUS { @@ -238,12 +222,9 @@ pub unsafe fn BCryptFreeBuffer(pvbuffer: *const core::ffi::c_void) { BCryptFreeBuffer(core::mem::transmute(pvbuffer)) } #[inline] -pub unsafe fn BCryptGenRandom(halgorithm: P0, pbbuffer: &mut [u8], dwflags: BCRYPTGENRANDOM_FLAGS) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn BCryptGenRandom(halgorithm: Option, pbbuffer: &mut [u8], dwflags: BCRYPTGENRANDOM_FLAGS) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptGenRandom(halgorithm : BCRYPT_ALG_HANDLE, pbbuffer : *mut u8, cbbuffer : u32, dwflags : BCRYPTGENRANDOM_FLAGS) -> super::super::Foundation:: NTSTATUS); - BCryptGenRandom(halgorithm.param().abi(), core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap(), core::mem::transmute(dwflags)) + BCryptGenRandom(core::mem::transmute(halgorithm.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn BCryptGenerateKeyPair(halgorithm: BCRYPT_ALG_HANDLE, phkey: *mut BCRYPT_KEY_HANDLE, dwlength: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS { @@ -261,13 +242,12 @@ pub unsafe fn BCryptGetFipsAlgorithmMode(pfenabled: *mut u8) -> super::super::Fo BCryptGetFipsAlgorithmMode(core::mem::transmute(pfenabled)) } #[inline] -pub unsafe fn BCryptGetProperty(hobject: P0, pszproperty: P1, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS +pub unsafe fn BCryptGetProperty(hobject: BCRYPT_HANDLE, pszproperty: P1, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptGetProperty(hobject : BCRYPT_HANDLE, pszproperty : windows_core::PCWSTR, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptGetProperty(hobject.param().abi(), pszproperty.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) + BCryptGetProperty(core::mem::transmute(hobject), pszproperty.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn BCryptHash(halgorithm: BCRYPT_ALG_HANDLE, pbsecret: Option<&[u8]>, pbinput: &[u8], pboutput: &mut [u8]) -> super::super::Foundation::NTSTATUS { @@ -280,32 +260,25 @@ pub unsafe fn BCryptHashData(hhash: BCRYPT_HASH_HANDLE, pbinput: &[u8], dwflags: BCryptHashData(core::mem::transmute(hhash), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn BCryptImportKey(halgorithm: P0, himportkey: P1, pszblobtype: P2, phkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: Option<&mut [u8]>, pbinput: &[u8], dwflags: u32) -> super::super::Foundation::NTSTATUS +pub unsafe fn BCryptImportKey(halgorithm: BCRYPT_ALG_HANDLE, himportkey: Option, pszblobtype: P2, phkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: Option<&mut [u8]>, pbinput: &[u8], dwflags: u32) -> super::super::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptImportKey(halgorithm : BCRYPT_ALG_HANDLE, himportkey : BCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, phkey : *mut BCRYPT_KEY_HANDLE, pbkeyobject : *mut u8, cbkeyobject : u32, pbinput : *const u8, cbinput : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptImportKey(halgorithm.param().abi(), himportkey.param().abi(), pszblobtype.param().abi(), core::mem::transmute(phkey), core::mem::transmute(pbkeyobject.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbkeyobject.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)) + BCryptImportKey(core::mem::transmute(halgorithm), core::mem::transmute(himportkey.unwrap_or(core::mem::zeroed())), pszblobtype.param().abi(), core::mem::transmute(phkey), core::mem::transmute(pbkeyobject.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbkeyobject.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn BCryptImportKeyPair(halgorithm: P0, himportkey: P1, pszblobtype: P2, phkey: *mut BCRYPT_KEY_HANDLE, pbinput: &[u8], dwflags: u32) -> super::super::Foundation::NTSTATUS +pub unsafe fn BCryptImportKeyPair(halgorithm: BCRYPT_ALG_HANDLE, himportkey: Option, pszblobtype: P2, phkey: *mut BCRYPT_KEY_HANDLE, pbinput: &[u8], dwflags: u32) -> super::super::Foundation::NTSTATUS where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptImportKeyPair(halgorithm : BCRYPT_ALG_HANDLE, himportkey : BCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, phkey : *mut BCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptImportKeyPair(halgorithm.param().abi(), himportkey.param().abi(), pszblobtype.param().abi(), core::mem::transmute(phkey), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)) + BCryptImportKeyPair(core::mem::transmute(halgorithm), core::mem::transmute(himportkey.unwrap_or(core::mem::zeroed())), pszblobtype.param().abi(), core::mem::transmute(phkey), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn BCryptKeyDerivation(hkey: P0, pparameterlist: Option<*const BCryptBufferDesc>, pbderivedkey: &mut [u8], pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn BCryptKeyDerivation(hkey: BCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, pbderivedkey: &mut [u8], pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS { 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(core::ptr::null())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) + BCryptKeyDerivation(core::mem::transmute(hkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn BCryptOpenAlgorithmProvider(phalgorithm: *mut BCRYPT_ALG_HANDLE, pszalgid: P1, pszimplementation: P2, dwflags: BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS) -> super::super::Foundation::NTSTATUS @@ -327,7 +300,7 @@ where P1: 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(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) + BCryptQueryContextConfiguration(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn BCryptQueryContextFunctionConfiguration(dwtable: BCRYPT_TABLE, pszcontext: P1, dwinterface: BCRYPT_INTERFACE, pszfunction: P3, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_CONTEXT_FUNCTION_CONFIG>) -> super::super::Foundation::NTSTATUS @@ -336,7 +309,7 @@ where P3: 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(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), pszfunction.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) + BCryptQueryContextFunctionConfiguration(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), pszfunction.param().abi(), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn BCryptQueryContextFunctionProperty(dwtable: BCRYPT_TABLE, pszcontext: P1, dwinterface: BCRYPT_INTERFACE, pszfunction: P3, pszproperty: P4, pcbvalue: *mut u32, ppbvalue: Option<*mut *mut u8>) -> super::super::Foundation::NTSTATUS @@ -346,7 +319,7 @@ where P4: 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(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), pszfunction.param().abi(), pszproperty.param().abi(), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue.unwrap_or(core::ptr::null_mut()))) + BCryptQueryContextFunctionProperty(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), pszfunction.param().abi(), pszproperty.param().abi(), core::mem::transmute(pcbvalue), core::mem::transmute(ppbvalue.unwrap_or(core::mem::zeroed()))) } #[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 @@ -354,7 +327,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(), core::mem::transmute(dwmode), core::mem::transmute(dwinterface), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) + BCryptQueryProviderRegistration(pszprovider.param().abi(), core::mem::transmute(dwmode), core::mem::transmute(dwinterface), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn BCryptRegisterConfigChangeNotify(phevent: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::NTSTATUS { @@ -389,23 +362,19 @@ where BCryptRemoveContextFunctionProvider(core::mem::transmute(dwtable), pszcontext.param().abi(), core::mem::transmute(dwinterface), pszfunction.param().abi(), pszprovider.param().abi()) } #[inline] -pub unsafe fn BCryptResolveProviders(pszcontext: P0, dwinterface: u32, pszfunction: P2, pszprovider: P3, dwmode: BCRYPT_QUERY_PROVIDER_MODE, dwflags: BCRYPT_RESOLVE_PROVIDERS_FLAGS, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_PROVIDER_REFS>) -> super::super::Foundation::NTSTATUS +pub unsafe fn BCryptResolveProviders(pszcontext: P0, dwinterface: Option, pszfunction: P2, pszprovider: P3, dwmode: BCRYPT_QUERY_PROVIDER_MODE, dwflags: BCRYPT_RESOLVE_PROVIDERS_FLAGS, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_PROVIDER_REFS>) -> super::super::Foundation::NTSTATUS where P0: windows_core::Param, P2: windows_core::Param, P3: 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(), core::mem::transmute(dwinterface), pszfunction.param().abi(), pszprovider.param().abi(), core::mem::transmute(dwmode), core::mem::transmute(dwflags), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) + BCryptResolveProviders(pszcontext.param().abi(), core::mem::transmute(dwinterface.unwrap_or(core::mem::zeroed())), pszfunction.param().abi(), pszprovider.param().abi(), core::mem::transmute(dwmode), core::mem::transmute(dwflags), core::mem::transmute(pcbbuffer), core::mem::transmute(ppbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BCryptSecretAgreement(hprivkey: P0, hpubkey: P1, phagreedsecret: *mut BCRYPT_SECRET_HANDLE, dwflags: u32) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn BCryptSecretAgreement(hprivkey: BCRYPT_KEY_HANDLE, hpubkey: BCRYPT_KEY_HANDLE, phagreedsecret: *mut BCRYPT_SECRET_HANDLE, dwflags: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptSecretAgreement(hprivkey : BCRYPT_KEY_HANDLE, hpubkey : BCRYPT_KEY_HANDLE, phagreedsecret : *mut BCRYPT_SECRET_HANDLE, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptSecretAgreement(hprivkey.param().abi(), hpubkey.param().abi(), core::mem::transmute(phagreedsecret), core::mem::transmute(dwflags)) + BCryptSecretAgreement(core::mem::transmute(hprivkey), core::mem::transmute(hpubkey), core::mem::transmute(phagreedsecret), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn BCryptSetContextFunctionProperty(dwtable: BCRYPT_TABLE, pszcontext: P1, dwinterface: BCRYPT_INTERFACE, pszfunction: P3, pszproperty: P4, pbvalue: Option<&[u8]>) -> super::super::Foundation::NTSTATUS @@ -426,20 +395,14 @@ where BCryptSetProperty(core::mem::transmute(hobject), pszproperty.param().abi(), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn BCryptSignHash(hkey: P0, ppaddinginfo: Option<*const core::ffi::c_void>, pbinput: &[u8], pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: BCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn BCryptSignHash(hkey: BCRYPT_KEY_HANDLE, ppaddinginfo: Option<*const core::ffi::c_void>, pbinput: &[u8], pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: BCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS { 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(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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) + BCryptSignHash(core::mem::transmute(hkey), core::mem::transmute(ppaddinginfo.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn BCryptUnregisterConfigChangeNotify(hevent: P0) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn BCryptUnregisterConfigChangeNotify(hevent: super::super::Foundation::HANDLE) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptUnregisterConfigChangeNotify(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: NTSTATUS); - BCryptUnregisterConfigChangeNotify(hevent.param().abi()) + BCryptUnregisterConfigChangeNotify(core::mem::transmute(hevent)) } #[inline] pub unsafe fn BCryptUnregisterProvider(pszprovider: P0) -> super::super::Foundation::NTSTATUS @@ -450,84 +413,54 @@ where BCryptUnregisterProvider(pszprovider.param().abi()) } #[inline] -pub unsafe fn BCryptVerifySignature(hkey: P0, ppaddinginfo: Option<*const core::ffi::c_void>, pbhash: &[u8], pbsignature: &[u8], dwflags: BCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn BCryptVerifySignature(hkey: BCRYPT_KEY_HANDLE, ppaddinginfo: Option<*const core::ffi::c_void>, pbhash: &[u8], pbsignature: &[u8], dwflags: BCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS { 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(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(), core::mem::transmute(dwflags)) + BCryptVerifySignature(core::mem::transmute(hkey), core::mem::transmute(ppaddinginfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn CertAddCRLContextToStore(hcertstore: P0, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CRL_CONTEXT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddCRLContextToStore(hcertstore: Option, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CRL_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(pcrlcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddCRLContextToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcrlcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CertAddCRLLinkToStore(hcertstore: P0, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CRL_CONTEXT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddCRLLinkToStore(hcertstore: HCERTSTORE, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CRL_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(pcrlcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddCRLLinkToStore(core::mem::transmute(hcertstore), core::mem::transmute(pcrlcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CertAddCTLContextToStore(hcertstore: P0, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CTL_CONTEXT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddCTLContextToStore(hcertstore: Option, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CTL_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(pctlcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddCTLContextToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pctlcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CertAddCTLLinkToStore(hcertstore: P0, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CTL_CONTEXT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddCTLLinkToStore(hcertstore: HCERTSTORE, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CTL_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(pctlcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddCTLLinkToStore(core::mem::transmute(hcertstore), core::mem::transmute(pctlcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CertAddCertificateContextToStore(hcertstore: P0, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddCertificateContextToStore(hcertstore: Option, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(pcertcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddCertificateContextToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcertcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CertAddCertificateLinkToStore(hcertstore: P0, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddCertificateLinkToStore(hcertstore: HCERTSTORE, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(pcertcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddCertificateLinkToStore(core::mem::transmute(hcertstore), core::mem::transmute(pcertcontext), core::mem::transmute(dwadddisposition), core::mem::transmute(ppstorecontext.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddEncodedCRLToStore(hcertstore: Option, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcrlencoded: &[u8], dwadddisposition: u32, ppcrlcontext: Option<*mut *mut CRL_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len().try_into().unwrap(), core::mem::transmute(dwadddisposition), core::mem::transmute(ppcrlcontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddEncodedCRLToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len().try_into().unwrap(), core::mem::transmute(dwadddisposition), core::mem::transmute(ppcrlcontext.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddEncodedCTLToStore(hcertstore: Option, dwmsgandcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbctlencoded: &[u8], dwadddisposition: u32, ppctlcontext: Option<*mut *mut CTL_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwmsgandcertencodingtype), core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len().try_into().unwrap(), core::mem::transmute(dwadddisposition), core::mem::transmute(ppctlcontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddEncodedCTLToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmsgandcertencodingtype), core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len().try_into().unwrap(), core::mem::transmute(dwadddisposition), core::mem::transmute(ppctlcontext.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddEncodedCertificateToStore(hcertstore: Option, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcertencoded: &[u8], dwadddisposition: u32, ppcertcontext: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap(), core::mem::transmute(dwadddisposition), core::mem::transmute(ppcertcontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddEncodedCertificateToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap(), core::mem::transmute(dwadddisposition), core::mem::transmute(ppcertcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CertAddEncodedCertificateToSystemStoreA(szcertstorename: P0, pbcertencoded: &[u8]) -> windows_core::Result<()> @@ -556,29 +489,22 @@ 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(core::ptr::null()))) + CertAddRefServerOcspResponse(core::mem::transmute(hserverocspresponse.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + CertAddRefServerOcspResponseContext(core::mem::transmute(pserverocspresponsecontext.unwrap_or(core::mem::zeroed()))) } #[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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertAddSerializedElementToStore(hcertstore: Option, pbelement: &[u8], dwadddisposition: u32, dwflags: u32, dwcontexttypeflags: u32, pdwcontexttype: Option<*mut u32>, ppvcontext: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwadddisposition), core::mem::transmute(dwflags), core::mem::transmute(dwcontexttypeflags), core::mem::transmute(pdwcontexttype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppvcontext.unwrap_or(core::ptr::null_mut()))).ok() + CertAddSerializedElementToStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbelement.as_ptr()), pbelement.len().try_into().unwrap(), core::mem::transmute(dwadddisposition), core::mem::transmute(dwflags), core::mem::transmute(dwcontexttypeflags), core::mem::transmute(pdwcontexttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppvcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CertAddStoreToCollection(hcollectionstore: P0, hsiblingstore: P1, dwupdateflags: u32, dwpriority: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CertAddStoreToCollection(hcollectionstore: HCERTSTORE, hsiblingstore: Option, dwupdateflags: u32, dwpriority: u32) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertAddStoreToCollection(hcollectionstore : HCERTSTORE, hsiblingstore : HCERTSTORE, dwupdateflags : u32, dwpriority : u32) -> super::super::Foundation:: BOOL); - CertAddStoreToCollection(hcollectionstore.param().abi(), hsiblingstore.param().abi(), core::mem::transmute(dwupdateflags), core::mem::transmute(dwpriority)) + CertAddStoreToCollection(core::mem::transmute(hcollectionstore), core::mem::transmute(hsiblingstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwupdateflags), core::mem::transmute(dwpriority)) } #[inline] pub unsafe fn CertAlgIdToOID(dwalgid: u32) -> windows_core::PCSTR { @@ -588,15 +514,12 @@ 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(core::ptr::null())), core::mem::transmute(dwflags)) + CertCloseServerOcspResponse(core::mem::transmute(hserverocspresponse.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn CertCloseStore(hcertstore: P0, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertCloseStore(hcertstore: Option, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CertCloseStore(hcertstore : HCERTSTORE, dwflags : u32) -> super::super::Foundation:: BOOL); - CertCloseStore(hcertstore.param().abi(), core::mem::transmute(dwflags)).ok() + CertCloseStore(core::mem::transmute(hcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn CertCompareCertificate(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertid1: *const CERT_INFO, pcertid2: *const CERT_INFO) -> super::super::Foundation::BOOL { @@ -619,12 +542,9 @@ pub unsafe fn CertComparePublicKeyInfo(dwcertencodingtype: CERT_QUERY_ENCODING_T CertComparePublicKeyInfo(core::mem::transmute(dwcertencodingtype), core::mem::transmute(ppublickey1), core::mem::transmute(ppublickey2)) } #[inline] -pub unsafe fn CertControlStore(hcertstore: P0, dwflags: CERT_CONTROL_STORE_FLAGS, dwctrltype: u32, pvctrlpara: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertControlStore(hcertstore: HCERTSTORE, dwflags: CERT_CONTROL_STORE_FLAGS, dwctrltype: u32, pvctrlpara: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwflags), core::mem::transmute(dwctrltype), core::mem::transmute(pvctrlpara.unwrap_or(core::ptr::null()))).ok() + CertControlStore(core::mem::transmute(hcertstore), core::mem::transmute(dwflags), core::mem::transmute(dwctrltype), core::mem::transmute(pvctrlpara.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CertCreateCRLContext(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcrlencoded: &[u8]) -> *mut CRL_CONTEXT { @@ -639,7 +559,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(core::mem::transmute(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())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pctlentry.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbctlentry)).ok() + CertCreateCTLEntryFromCertificateContextProperties(core::mem::transmute(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())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pctlentry.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbctlentry)).ok() } #[inline] pub unsafe fn CertCreateCertificateChainEngine(pconfig: *const CERT_CHAIN_ENGINE_CONFIG, phchainengine: *mut HCERTCHAINENGINE) -> windows_core::Result<()> { @@ -654,15 +574,21 @@ 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(core::mem::transmute(dwcontexttype), core::mem::transmute(dwencodingtype), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pcreatepara.unwrap_or(core::ptr::null()))) + CertCreateContext(core::mem::transmute(dwcontexttype), core::mem::transmute(dwencodingtype), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pcreatepara.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn CertCreateSelfSignCertificate(hcryptprovorncryptkey: Option, 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 { 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(), core::mem::transmute(psubjectissuerblob), core::mem::transmute(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()))) + CertCreateSelfSignCertificate( + core::mem::transmute(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psubjectissuerblob), + core::mem::transmute(dwflags), + core::mem::transmute(pkeyprovinfo.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psignaturealgorithm.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pstarttime.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pendtime.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pextensions.unwrap_or(core::mem::zeroed())), + ) } #[inline] pub unsafe fn CertDeleteCRLFromStore(pcrlcontext: *const CRL_CONTEXT) -> windows_core::Result<()> { @@ -682,12 +608,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(core::ptr::null()))) + CertDuplicateCRLContext(core::mem::transmute(pcrlcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + CertDuplicateCTLContext(core::mem::transmute(pctlcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertDuplicateCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) -> *mut CERT_CHAIN_CONTEXT { @@ -697,15 +623,12 @@ 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(core::ptr::null()))) + CertDuplicateCertificateContext(core::mem::transmute(pcertcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CertDuplicateStore(hcertstore: P0) -> HCERTSTORE -where - P0: windows_core::Param, -{ +pub unsafe fn CertDuplicateStore(hcertstore: HCERTSTORE) -> HCERTSTORE { windows_targets::link!("crypt32.dll" "system" fn CertDuplicateStore(hcertstore : HCERTSTORE) -> HCERTSTORE); - CertDuplicateStore(hcertstore.param().abi()) + CertDuplicateStore(core::mem::transmute(hcertstore)) } #[inline] pub unsafe fn CertEnumCRLContextProperties(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32) -> u32 { @@ -713,12 +636,9 @@ pub unsafe fn CertEnumCRLContextProperties(pcrlcontext: *const CRL_CONTEXT, dwpr CertEnumCRLContextProperties(core::mem::transmute(pcrlcontext), core::mem::transmute(dwpropid)) } #[inline] -pub unsafe fn CertEnumCRLsInStore(hcertstore: P0, pprevcrlcontext: Option<*const CRL_CONTEXT>) -> *mut CRL_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn CertEnumCRLsInStore(hcertstore: HCERTSTORE, pprevcrlcontext: Option<*const CRL_CONTEXT>) -> *mut CRL_CONTEXT { 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(core::ptr::null()))) + CertEnumCRLsInStore(core::mem::transmute(hcertstore), core::mem::transmute(pprevcrlcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertEnumCTLContextProperties(pctlcontext: *const CTL_CONTEXT, dwpropid: u32) -> u32 { @@ -726,12 +646,9 @@ pub unsafe fn CertEnumCTLContextProperties(pctlcontext: *const CTL_CONTEXT, dwpr CertEnumCTLContextProperties(core::mem::transmute(pctlcontext), core::mem::transmute(dwpropid)) } #[inline] -pub unsafe fn CertEnumCTLsInStore(hcertstore: P0, pprevctlcontext: Option<*const CTL_CONTEXT>) -> *mut CTL_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn CertEnumCTLsInStore(hcertstore: HCERTSTORE, pprevctlcontext: Option<*const CTL_CONTEXT>) -> *mut CTL_CONTEXT { 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(core::ptr::null()))) + CertEnumCTLsInStore(core::mem::transmute(hcertstore), core::mem::transmute(pprevctlcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertEnumCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, dwpropid: u32) -> u32 { @@ -739,32 +656,29 @@ pub unsafe fn CertEnumCertificateContextProperties(pcertcontext: *const CERT_CON CertEnumCertificateContextProperties(core::mem::transmute(pcertcontext), core::mem::transmute(dwpropid)) } #[inline] -pub unsafe fn CertEnumCertificatesInStore(hcertstore: P0, pprevcertcontext: Option<*const CERT_CONTEXT>) -> *mut CERT_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn CertEnumCertificatesInStore(hcertstore: HCERTSTORE, pprevcertcontext: Option<*const CERT_CONTEXT>) -> *mut CERT_CONTEXT { 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(core::ptr::null()))) + CertEnumCertificatesInStore(core::mem::transmute(hcertstore), core::mem::transmute(pprevcertcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(pvsystemstore), core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnenum)).ok() + CertEnumPhysicalStore(core::mem::transmute(pvsystemstore), core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pctlcontext), core::mem::transmute(ppvnextsubject), core::mem::transmute(psubjectidentifier.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pencodedattributes.unwrap_or(core::ptr::null_mut()))) + CertEnumSubjectInSortedCTL(core::mem::transmute(pctlcontext), core::mem::transmute(ppvnextsubject), core::mem::transmute(psubjectidentifier.unwrap_or(core::mem::zeroed())), core::mem::transmute(pencodedattributes.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dwflags), core::mem::transmute(pvsystemstorelocationpara.unwrap_or(core::ptr::null())), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnenum)) + CertEnumSystemStore(core::mem::transmute(dwflags), core::mem::transmute(pvsystemstorelocationpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnenum)) + CertEnumSystemStoreLocation(core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnenum)) } #[inline] pub unsafe fn CertFindAttribute(pszobjid: P0, rgattr: &[CRYPT_ATTRIBUTE]) -> *mut CRYPT_ATTRIBUTE @@ -775,41 +689,29 @@ where CertFindAttribute(pszobjid.param().abi(), rgattr.len().try_into().unwrap(), core::mem::transmute(rgattr.as_ptr())) } #[inline] -pub unsafe fn CertFindCRLInStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwfindflags: u32, dwfindtype: u32, pvfindpara: Option<*const core::ffi::c_void>, pprevcrlcontext: Option<*const CRL_CONTEXT>) -> *mut CRL_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn CertFindCRLInStore(hcertstore: HCERTSTORE, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwfindflags: u32, dwfindtype: u32, pvfindpara: Option<*const core::ffi::c_void>, pprevcrlcontext: Option<*const CRL_CONTEXT>) -> *mut CRL_CONTEXT { 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(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwfindflags), core::mem::transmute(dwfindtype), core::mem::transmute(pvfindpara.unwrap_or(core::ptr::null())), core::mem::transmute(pprevcrlcontext.unwrap_or(core::ptr::null()))) + CertFindCRLInStore(core::mem::transmute(hcertstore), core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwfindflags), core::mem::transmute(dwfindtype), core::mem::transmute(pvfindpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevcrlcontext.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn CertFindCTLInStore(hcertstore: HCERTSTORE, dwmsgandcertencodingtype: u32, dwfindflags: u32, dwfindtype: CERT_FIND_TYPE, pvfindpara: Option<*const core::ffi::c_void>, pprevctlcontext: Option<*const CTL_CONTEXT>) -> *mut CTL_CONTEXT { 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(), core::mem::transmute(dwmsgandcertencodingtype), core::mem::transmute(dwfindflags), core::mem::transmute(dwfindtype), core::mem::transmute(pvfindpara.unwrap_or(core::ptr::null())), core::mem::transmute(pprevctlcontext.unwrap_or(core::ptr::null()))) + CertFindCTLInStore(core::mem::transmute(hcertstore), core::mem::transmute(dwmsgandcertencodingtype), core::mem::transmute(dwfindflags), core::mem::transmute(dwfindtype), core::mem::transmute(pvfindpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevctlcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(pcert), core::mem::transmute(pcrlcontext), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppcrlentry)) + CertFindCertificateInCRL(core::mem::transmute(pcert), core::mem::transmute(pcrlcontext), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn CertFindCertificateInStore(hcertstore: HCERTSTORE, 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 { 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(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwfindflags), core::mem::transmute(dwfindtype), core::mem::transmute(pvfindpara.unwrap_or(core::ptr::null())), core::mem::transmute(pprevcertcontext.unwrap_or(core::ptr::null()))) + CertFindCertificateInStore(core::mem::transmute(hcertstore), core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwfindflags), core::mem::transmute(dwfindtype), core::mem::transmute(pvfindpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevcertcontext.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn CertFindChainInStore(hcertstore: HCERTSTORE, 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 { 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(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwfindflags), core::mem::transmute(dwfindtype), core::mem::transmute(pvfindpara.unwrap_or(core::ptr::null())), core::mem::transmute(pprevchaincontext.unwrap_or(core::ptr::null()))) + CertFindChainInStore(core::mem::transmute(hcertstore), core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwfindflags), core::mem::transmute(dwfindtype), core::mem::transmute(pvfindpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevchaincontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertFindExtension(pszobjid: P0, rgextensions: &[CERT_EXTENSION]) -> *mut CERT_EXTENSION @@ -835,17 +737,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(core::mem::transmute(psubjectidentifier), core::mem::transmute(pctlcontext), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pencodedattributes.unwrap_or(core::ptr::null_mut()))) + CertFindSubjectInSortedCTL(core::mem::transmute(psubjectidentifier), core::mem::transmute(pctlcontext), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pencodedattributes.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + CertFreeCRLContext(core::mem::transmute(pcrlcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + CertFreeCTLContext(core::mem::transmute(pctlcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertFreeCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) { @@ -853,12 +755,9 @@ pub unsafe fn CertFreeCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) CertFreeCertificateChain(core::mem::transmute(pchaincontext)) } #[inline] -pub unsafe fn CertFreeCertificateChainEngine(hchainengine: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CertFreeCertificateChainEngine(hchainengine: Option) { windows_targets::link!("crypt32.dll" "system" fn CertFreeCertificateChainEngine(hchainengine : HCERTCHAINENGINE)); - CertFreeCertificateChainEngine(hchainengine.param().abi()) + CertFreeCertificateChainEngine(core::mem::transmute(hchainengine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertFreeCertificateChainList(prgpselection: *const *const CERT_CHAIN_CONTEXT) { @@ -868,49 +767,42 @@ 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(core::ptr::null()))) + CertFreeCertificateContext(core::mem::transmute(pcertcontext.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + CertFreeServerOcspResponseContext(core::mem::transmute(pserverocspresponsecontext.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(pcrlcontext), core::mem::transmute(dwpropid), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata)).ok() + CertGetCRLContextProperty(core::mem::transmute(pcrlcontext), core::mem::transmute(dwpropid), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn CertGetCRLFromStore(hcertstore: HCERTSTORE, pissuercontext: Option<*const CERT_CONTEXT>, pprevcrlcontext: Option<*const CRL_CONTEXT>, pdwflags: *mut u32) -> *mut CRL_CONTEXT { 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(core::ptr::null())), core::mem::transmute(pprevcrlcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pdwflags)) + CertGetCRLFromStore(core::mem::transmute(hcertstore), core::mem::transmute(pissuercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprevcrlcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pctlcontext), core::mem::transmute(dwpropid), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata)).ok() + CertGetCTLContextProperty(core::mem::transmute(pctlcontext), core::mem::transmute(dwpropid), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata)).ok() } #[inline] -pub unsafe fn CertGetCertificateChain(hchainengine: P0, pcertcontext: *const CERT_CONTEXT, ptime: Option<*const super::super::Foundation::FILETIME>, hadditionalstore: P3, pchainpara: *const CERT_CHAIN_PARA, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, ppchaincontext: *mut *mut CERT_CHAIN_CONTEXT) -> windows_core::Result<()> -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn CertGetCertificateChain(hchainengine: Option, pcertcontext: *const CERT_CONTEXT, ptime: Option<*const super::super::Foundation::FILETIME>, hadditionalstore: Option, pchainpara: *const CERT_CHAIN_PARA, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, ppchaincontext: *mut *mut CERT_CHAIN_CONTEXT) -> windows_core::Result<()> { 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(), core::mem::transmute(pcertcontext), core::mem::transmute(ptime.unwrap_or(core::ptr::null())), hadditionalstore.param().abi(), core::mem::transmute(pchainpara), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppchaincontext)).ok() + CertGetCertificateChain(core::mem::transmute(hchainengine.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcertcontext), core::mem::transmute(ptime.unwrap_or(core::mem::zeroed())), core::mem::transmute(hadditionalstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pchainpara), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pcertcontext), core::mem::transmute(dwpropid), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata)).ok() + CertGetCertificateContextProperty(core::mem::transmute(pcertcontext), core::mem::transmute(dwpropid), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pcertcontext), core::mem::transmute(dwflags), core::mem::transmute(pusage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbusage)).ok() + CertGetEnhancedKeyUsage(core::mem::transmute(pcertcontext), core::mem::transmute(dwflags), core::mem::transmute(pusage.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbusage)).ok() } #[inline] pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertinfo: *const CERT_INFO, pbkeyusage: &mut [u8]) -> windows_core::Result<()> { @@ -918,22 +810,19 @@ pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: CERT_QUERY_ENCODING_TY CertGetIntendedKeyUsage(core::mem::transmute(dwcertencodingtype), core::mem::transmute(pcertinfo), core::mem::transmute(pbkeyusage.as_ptr()), pbkeyusage.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn CertGetIssuerCertificateFromStore(hcertstore: P0, psubjectcontext: *const CERT_CONTEXT, pprevissuercontext: Option<*const CERT_CONTEXT>, pdwflags: *mut u32) -> *mut CERT_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn CertGetIssuerCertificateFromStore(hcertstore: HCERTSTORE, psubjectcontext: *const CERT_CONTEXT, pprevissuercontext: Option<*const CERT_CONTEXT>, pdwflags: *mut u32) -> *mut CERT_CONTEXT { 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(), core::mem::transmute(psubjectcontext), core::mem::transmute(pprevissuercontext.unwrap_or(core::ptr::null())), core::mem::transmute(pdwflags)) + CertGetIssuerCertificateFromStore(core::mem::transmute(hcertstore), core::mem::transmute(psubjectcontext), core::mem::transmute(pprevissuercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pcertcontext), core::mem::transmute(dwtype), core::mem::transmute(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())) + CertGetNameStringA(core::mem::transmute(pcertcontext), core::mem::transmute(dwtype), core::mem::transmute(dwflags), core::mem::transmute(pvtypepara.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(pcertcontext), core::mem::transmute(dwtype), core::mem::transmute(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())) + CertGetNameStringW(core::mem::transmute(pcertcontext), core::mem::transmute(dwtype), core::mem::transmute(dwflags), core::mem::transmute(pvtypepara.unwrap_or(core::mem::zeroed())), 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 { @@ -943,28 +832,22 @@ 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(core::mem::transmute(hserverocspresponse), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + CertGetServerOcspResponseContext(core::mem::transmute(hserverocspresponse), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CertGetStoreProperty(hcertstore: P0, dwpropid: u32, pvdata: Option<*mut core::ffi::c_void>, pcbdata: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertGetStoreProperty(hcertstore: HCERTSTORE, dwpropid: u32, pvdata: Option<*mut core::ffi::c_void>, pcbdata: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dwpropid), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata)).ok() + CertGetStoreProperty(core::mem::transmute(hcertstore), core::mem::transmute(dwpropid), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata)).ok() } #[inline] -pub unsafe fn CertGetSubjectCertificateFromStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertid: *const CERT_INFO) -> *mut CERT_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn CertGetSubjectCertificateFromStore(hcertstore: HCERTSTORE, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertid: *const CERT_INFO) -> *mut CERT_CONTEXT { windows_targets::link!("crypt32.dll" "system" fn CertGetSubjectCertificateFromStore(hcertstore : HCERTSTORE, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pcertid : *const CERT_INFO) -> *mut CERT_CONTEXT); - CertGetSubjectCertificateFromStore(hcertstore.param().abi(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pcertid)) + CertGetSubjectCertificateFromStore(core::mem::transmute(hcertstore), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pcertid)) } #[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()), core::mem::transmute(cnumoids), core::mem::transmute(rghoids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcboids)).ok() + CertGetValidUsages(rghcerts.len().try_into().unwrap(), core::mem::transmute(rghcerts.as_ptr()), core::mem::transmute(cnumoids), core::mem::transmute(rghoids.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { @@ -977,12 +860,12 @@ where P1: 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(core::mem::transmute(pstrongsignpara), pwszcnghashalgid.param().abi(), core::mem::transmute(psigningcert.unwrap_or(core::ptr::null()))).ok() + CertIsStrongHashToSign(core::mem::transmute(pstrongsignpara), pwszcnghashalgid.param().abi(), core::mem::transmute(psigningcert.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pcert), core::mem::transmute(pcrl), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + CertIsValidCRLForCertificate(core::mem::transmute(pcert), core::mem::transmute(pcrl), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertIsWeakHash(dwhashusetype: u32, pwszcnghashalgid: P1, dwchainflags: u32, psignerchaincontext: Option<*const CERT_CHAIN_CONTEXT>, ptimestamp: Option<*const super::super::Foundation::FILETIME>, pwszfilename: P5) -> super::super::Foundation::BOOL @@ -991,7 +874,7 @@ where P5: 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(core::mem::transmute(dwhashusetype), pwszcnghashalgid.param().abi(), core::mem::transmute(dwchainflags), core::mem::transmute(psignerchaincontext.unwrap_or(core::ptr::null())), core::mem::transmute(ptimestamp.unwrap_or(core::ptr::null())), pwszfilename.param().abi()) + CertIsWeakHash(core::mem::transmute(dwhashusetype), pwszcnghashalgid.param().abi(), core::mem::transmute(dwchainflags), core::mem::transmute(psignerchaincontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptimestamp.unwrap_or(core::mem::zeroed())), 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 { @@ -1014,36 +897,33 @@ 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(core::mem::transmute(pchaincontext), core::mem::transmute(dwflags), core::mem::transmute(popenpara.unwrap_or(core::ptr::null()))) + CertOpenServerOcspResponse(core::mem::transmute(pchaincontext), core::mem::transmute(dwflags), core::mem::transmute(popenpara.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CertOpenStore(lpszstoreprovider: P0, dwencodingtype: CERT_QUERY_ENCODING_TYPE, hcryptprov: P2, dwflags: CERT_OPEN_STORE_FLAGS, pvpara: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn CertOpenStore(lpszstoreprovider: P0, dwencodingtype: CERT_QUERY_ENCODING_TYPE, hcryptprov: Option, dwflags: CERT_OPEN_STORE_FLAGS, pvpara: Option<*const core::ffi::c_void>) -> windows_core::Result where P0: windows_core::Param, - P2: 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(), core::mem::transmute(dwencodingtype), hcryptprov.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvpara.unwrap_or(core::ptr::null()))); + let result__ = CertOpenStore(lpszstoreprovider.param().abi(), core::mem::transmute(dwencodingtype), core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pvpara.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CertOpenSystemStoreA(hprov: P0, szsubsystemprotocol: P1) -> windows_core::Result +pub unsafe fn CertOpenSystemStoreA(hprov: Option, szsubsystemprotocol: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertOpenSystemStoreA(hprov : HCRYPTPROV_LEGACY, szsubsystemprotocol : windows_core::PCSTR) -> HCERTSTORE); - let result__ = CertOpenSystemStoreA(hprov.param().abi(), szsubsystemprotocol.param().abi()); + let result__ = CertOpenSystemStoreA(core::mem::transmute(hprov.unwrap_or(core::mem::zeroed())), szsubsystemprotocol.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CertOpenSystemStoreW(hprov: P0, szsubsystemprotocol: P1) -> windows_core::Result +pub unsafe fn CertOpenSystemStoreW(hprov: Option, szsubsystemprotocol: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertOpenSystemStoreW(hprov : HCRYPTPROV_LEGACY, szsubsystemprotocol : windows_core::PCWSTR) -> HCERTSTORE); - let result__ = CertOpenSystemStoreW(hprov.param().abi(), szsubsystemprotocol.param().abi()); + let result__ = CertOpenSystemStoreW(core::mem::transmute(hprov.unwrap_or(core::mem::zeroed())), szsubsystemprotocol.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1062,12 +942,12 @@ where P2: 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(core::mem::transmute(pvsystemstore), core::mem::transmute(dwflags), pwszstorename.param().abi(), core::mem::transmute(pstoreinfo), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + CertRegisterPhysicalStore(core::mem::transmute(pvsystemstore), core::mem::transmute(dwflags), pwszstorename.param().abi(), core::mem::transmute(pstoreinfo), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(pvsystemstore), core::mem::transmute(dwflags), core::mem::transmute(pstoreinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + CertRegisterSystemStore(core::mem::transmute(pvsystemstore), core::mem::transmute(dwflags), core::mem::transmute(pstoreinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertRemoveEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: P1) -> windows_core::Result<()> @@ -1078,21 +958,14 @@ where CertRemoveEnhancedKeyUsageIdentifier(core::mem::transmute(pcertcontext), pszusageidentifier.param().abi()).ok() } #[inline] -pub unsafe fn CertRemoveStoreFromCollection(hcollectionstore: P0, hsiblingstore: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CertRemoveStoreFromCollection(hcollectionstore: HCERTSTORE, hsiblingstore: HCERTSTORE) { windows_targets::link!("crypt32.dll" "system" fn CertRemoveStoreFromCollection(hcollectionstore : HCERTSTORE, hsiblingstore : HCERTSTORE)); - CertRemoveStoreFromCollection(hcollectionstore.param().abi(), hsiblingstore.param().abi()) + CertRemoveStoreFromCollection(core::mem::transmute(hcollectionstore), core::mem::transmute(hsiblingstore)) } #[inline] -pub unsafe fn CertResyncCertificateChainEngine(hchainengine: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertResyncCertificateChainEngine(hchainengine: Option) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CertResyncCertificateChainEngine(hchainengine : HCERTCHAINENGINE) -> super::super::Foundation:: BOOL); - CertResyncCertificateChainEngine(hchainengine.param().abi()).ok() + CertResyncCertificateChainEngine(core::mem::transmute(hchainengine.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CertRetrieveLogoOrBiometricInfo(pcertcontext: *const CERT_CONTEXT, lpszlogoorbiometrictype: P1, dwretrievalflags: u32, dwtimeout: u32, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, ppbdata: *mut *mut u8, pcbdata: *mut u32, ppwszmimetype: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -1100,48 +973,42 @@ where P1: 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(core::mem::transmute(pcertcontext), lpszlogoorbiometrictype.param().abi(), core::mem::transmute(dwretrievalflags), core::mem::transmute(dwtimeout), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppbdata), core::mem::transmute(pcbdata), core::mem::transmute(ppwszmimetype.unwrap_or(core::ptr::null_mut()))).ok() + CertRetrieveLogoOrBiometricInfo(core::mem::transmute(pcertcontext), lpszlogoorbiometrictype.param().abi(), core::mem::transmute(dwretrievalflags), core::mem::transmute(dwtimeout), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppbdata), core::mem::transmute(pcbdata), core::mem::transmute(ppwszmimetype.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CertSaveStore(hcertstore: HCERTSTORE, dwencodingtype: CERT_QUERY_ENCODING_TYPE, dwsaveas: CERT_STORE_SAVE_AS, dwsaveto: CERT_STORE_SAVE_TO, pvsavetopara: *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CertSaveStore(hcertstore : HCERTSTORE, dwencodingtype : CERT_QUERY_ENCODING_TYPE, dwsaveas : CERT_STORE_SAVE_AS, dwsaveto : CERT_STORE_SAVE_TO, pvsavetopara : *mut core::ffi::c_void, dwflags : u32) -> super::super::Foundation:: BOOL); - CertSaveStore(hcertstore.param().abi(), core::mem::transmute(dwencodingtype), core::mem::transmute(dwsaveas), core::mem::transmute(dwsaveto), core::mem::transmute(pvsavetopara), core::mem::transmute(dwflags)).ok() + CertSaveStore(core::mem::transmute(hcertstore), core::mem::transmute(dwencodingtype), core::mem::transmute(dwsaveas), core::mem::transmute(dwsaveto), core::mem::transmute(pvsavetopara), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CertSelectCertificateChains(pselectioncontext: Option<*const windows_core::GUID>, dwflags: u32, pchainparameters: Option<*const CERT_SELECT_CHAIN_PARA>, rgpcriteria: Option<&[CERT_SELECT_CRITERIA]>, hstore: P5, pcselection: *mut u32, pprgpselection: *mut *mut *mut CERT_CHAIN_CONTEXT) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn CertSelectCertificateChains(pselectioncontext: Option<*const windows_core::GUID>, dwflags: u32, pchainparameters: Option<*const CERT_SELECT_CHAIN_PARA>, rgpcriteria: Option<&[CERT_SELECT_CRITERIA]>, hstore: HCERTSTORE, pcselection: *mut u32, pprgpselection: *mut *mut *mut CERT_CHAIN_CONTEXT) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(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(), core::mem::transmute(pcselection), core::mem::transmute(pprgpselection)).ok() + CertSelectCertificateChains(core::mem::transmute(pselectioncontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pchainparameters.unwrap_or(core::mem::zeroed())), 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(hstore), core::mem::transmute(pcselection), core::mem::transmute(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(core::mem::transmute(pcrlcontext), core::mem::transmute(dwflags), core::mem::transmute(pbelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbelement)).ok() + CertSerializeCRLStoreElement(core::mem::transmute(pcrlcontext), core::mem::transmute(dwflags), core::mem::transmute(pbelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pctlcontext), core::mem::transmute(dwflags), core::mem::transmute(pbelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbelement)).ok() + CertSerializeCTLStoreElement(core::mem::transmute(pctlcontext), core::mem::transmute(dwflags), core::mem::transmute(pbelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pcertcontext), core::mem::transmute(dwflags), core::mem::transmute(pbelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbelement)).ok() + CertSerializeCertificateStoreElement(core::mem::transmute(pcertcontext), core::mem::transmute(dwflags), core::mem::transmute(pbelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pcrlcontext), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))).ok() + CertSetCRLContextProperty(core::mem::transmute(pcrlcontext), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pctlcontext), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))).ok() + CertSetCTLContextProperty(core::mem::transmute(pctlcontext), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext: *const CERT_CONTEXT, pctlentry: *const CTL_ENTRY, dwflags: u32) -> windows_core::Result<()> { @@ -1151,20 +1018,17 @@ 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(core::mem::transmute(pcertcontext), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))).ok() + CertSetCertificateContextProperty(core::mem::transmute(pcertcontext), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pcertcontext), core::mem::transmute(pusage.unwrap_or(core::ptr::null()))).ok() + CertSetEnhancedKeyUsage(core::mem::transmute(pcertcontext), core::mem::transmute(pusage.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CertSetStoreProperty(hcertstore: P0, dwpropid: u32, dwflags: u32, pvdata: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CertSetStoreProperty(hcertstore: HCERTSTORE, dwpropid: u32, dwflags: u32, pvdata: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))) + CertSetStoreProperty(core::mem::transmute(hcertstore), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CertStrToNameA(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszx500: P1, 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<()> @@ -1172,7 +1036,7 @@ where P1: 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(core::mem::transmute(dwcertencodingtype), pszx500.param().abi(), core::mem::transmute(dwstrtype), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbencoded), core::mem::transmute(ppszerror.unwrap_or(core::ptr::null_mut()))).ok() + CertStrToNameA(core::mem::transmute(dwcertencodingtype), pszx500.param().abi(), core::mem::transmute(dwstrtype), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded), core::mem::transmute(ppszerror.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CertStrToNameW(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszx500: P1, 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<()> @@ -1180,7 +1044,7 @@ where P1: 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(core::mem::transmute(dwcertencodingtype), pszx500.param().abi(), core::mem::transmute(dwstrtype), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbencoded), core::mem::transmute(ppszerror.unwrap_or(core::ptr::null_mut()))).ok() + CertStrToNameW(core::mem::transmute(dwcertencodingtype), pszx500.param().abi(), core::mem::transmute(dwstrtype), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded), core::mem::transmute(ppszerror.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CertUnregisterPhysicalStore(pvsystemstore: *const core::ffi::c_void, dwflags: u32, pwszstorename: P2) -> super::super::Foundation::BOOL @@ -1203,12 +1067,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(core::ptr::null())), core::mem::transmute(pcrlinfo)) + CertVerifyCRLTimeValidity(core::mem::transmute(ptimetoverify.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dwencodingtype), core::mem::transmute(dwsubjecttype), core::mem::transmute(pvsubject), core::mem::transmute(psubjectusage), core::mem::transmute(dwflags), core::mem::transmute(pverifyusagepara.unwrap_or(core::ptr::null())), core::mem::transmute(pverifyusagestatus)).ok() + CertVerifyCTLUsage(core::mem::transmute(dwencodingtype), core::mem::transmute(dwsubjecttype), core::mem::transmute(pvsubject), core::mem::transmute(psubjectusage), core::mem::transmute(dwflags), core::mem::transmute(pverifyusagepara.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 @@ -1221,17 +1085,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(core::mem::transmute(dwencodingtype), core::mem::transmute(dwrevtype), rgpvcontext.len().try_into().unwrap(), core::mem::transmute(rgpvcontext.as_ptr()), core::mem::transmute(dwflags), core::mem::transmute(prevpara.unwrap_or(core::ptr::null())), core::mem::transmute(prevstatus)).ok() + CertVerifyRevocation(core::mem::transmute(dwencodingtype), core::mem::transmute(dwrevtype), rgpvcontext.len().try_into().unwrap(), core::mem::transmute(rgpvcontext.as_ptr()), core::mem::transmute(dwflags), core::mem::transmute(prevpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(psubject), core::mem::transmute(pissuer.unwrap_or(core::ptr::null())), core::mem::transmute(pdwflags)).ok() + CertVerifySubjectCertificateContext(core::mem::transmute(psubject), core::mem::transmute(pissuer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(pcertinfo)) + CertVerifyTimeValidity(core::mem::transmute(ptimetoverify.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcertinfo)) } #[inline] pub unsafe fn CertVerifyValidityNesting(psubjectinfo: *const CERT_INFO, pissuerinfo: *const CERT_INFO) -> super::super::Foundation::BOOL { @@ -1246,7 +1110,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(core::mem::transmute(pcert), core::mem::transmute(dwflags), core::mem::transmute(pvparameters.unwrap_or(core::ptr::null())), core::mem::transmute(phcryptprovorncryptkey), core::mem::transmute(pdwkeyspec.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfcallerfreeprovorncryptkey.unwrap_or(core::ptr::null_mut()))).ok() + CryptAcquireCertificatePrivateKey(core::mem::transmute(pcert), core::mem::transmute(dwflags), core::mem::transmute(pvparameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcryptprovorncryptkey), core::mem::transmute(pdwkeyspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfcallerfreeprovorncryptkey.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptAcquireContextA(phprov: *mut usize, szcontainer: P1, szprovider: P2, dwprovtype: u32, dwflags: u32) -> windows_core::Result<()> @@ -1267,27 +1131,24 @@ where CryptAcquireContextW(core::mem::transmute(phprov), szcontainer.param().abi(), szprovider.param().abi(), core::mem::transmute(dwprovtype), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CryptBinaryToStringA(pbbinary: &[u8], dwflags: CRYPT_STRING, pszstring: windows_core::PSTR, pcchstring: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptBinaryToStringA(pbbinary: &[u8], dwflags: CRYPT_STRING, pszstring: Option, pcchstring: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CryptBinaryToStringA(pbbinary : *const u8, cbbinary : u32, dwflags : CRYPT_STRING, pszstring : windows_core::PSTR, pcchstring : *mut u32) -> super::super::Foundation:: BOOL); - CryptBinaryToStringA(core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pszstring), core::mem::transmute(pcchstring)) + CryptBinaryToStringA(core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pszstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchstring)) } #[inline] -pub unsafe fn CryptBinaryToStringW(pbbinary: &[u8], dwflags: CRYPT_STRING, pszstring: windows_core::PWSTR, pcchstring: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptBinaryToStringW(pbbinary: &[u8], dwflags: CRYPT_STRING, pszstring: Option, pcchstring: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CryptBinaryToStringW(pbbinary : *const u8, cbbinary : u32, dwflags : CRYPT_STRING, pszstring : windows_core::PWSTR, pcchstring : *mut u32) -> super::super::Foundation:: BOOL); - CryptBinaryToStringW(core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pszstring), core::mem::transmute(pcchstring)) + CryptBinaryToStringW(core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pszstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchstring)) } #[inline] -pub unsafe fn CryptCloseAsyncHandle(hasync: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CryptCloseAsyncHandle(hasync: Option) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CryptCloseAsyncHandle(hasync : HCRYPTASYNC) -> super::super::Foundation:: BOOL); - CryptCloseAsyncHandle(hasync.param().abi()) + CryptCloseAsyncHandle(core::mem::transmute(hasync.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hprov), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + CryptContextAddRef(core::mem::transmute(hprov), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn CryptCreateAsyncHandle(dwflags: u32, phasync: *mut HCRYPTASYNC) -> super::super::Foundation::BOOL { @@ -1305,25 +1166,25 @@ where P1: 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(core::mem::transmute(dwcertencodingtype), pszpubkeyoid.param().abi(), core::mem::transmute(ppubkeystruc), core::mem::transmute(cbpubkeystruc), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pbhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbhash)).ok() + CryptCreateKeyIdentifierFromCSP(core::mem::transmute(dwcertencodingtype), pszpubkeyoid.param().abi(), core::mem::transmute(ppubkeystruc), core::mem::transmute(cbpubkeystruc), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(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( core::mem::transmute(dwmsgtypeflags), - core::mem::transmute(pdecryptpara.unwrap_or(core::ptr::null())), - core::mem::transmute(pverifypara.unwrap_or(core::ptr::null())), + core::mem::transmute(pdecryptpara.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pverifypara.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsignerindex), core::mem::transmute(pbencodedblob.as_ptr()), pbencodedblob.len().try_into().unwrap(), core::mem::transmute(dwprevinnercontenttype), - 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())), + core::mem::transmute(pdwmsgtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwinnercontenttype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pbdecoded.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbdecoded.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppxchgcert.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppsignercert.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -1333,7 +1194,7 @@ where P1: 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(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pvstructinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbstructinfo)).ok() + CryptDecodeObject(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pvstructinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbstructinfo)).ok() } #[inline] pub unsafe fn CryptDecodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P1, pbencoded: &[u8], dwflags: u32, pdecodepara: Option<*const CRYPT_DECODE_PARA>, pvstructinfo: Option<*mut core::ffi::c_void>, pcbstructinfo: *mut u32) -> windows_core::Result<()> @@ -1341,7 +1202,7 @@ where P1: 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(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pdecodepara.unwrap_or(core::ptr::null())), core::mem::transmute(pvstructinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbstructinfo)).ok() + CryptDecodeObjectEx(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pdecodepara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvstructinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbstructinfo)).ok() } #[inline] pub unsafe fn CryptDecrypt(hkey: usize, hhash: usize, r#final: P2, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> windows_core::Result<()> @@ -1354,12 +1215,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(core::mem::transmute(pdecryptpara), core::mem::transmute(pverifypara), core::mem::transmute(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() + CryptDecryptAndVerifyMessageSignature(core::mem::transmute(pdecryptpara), core::mem::transmute(pverifypara), core::mem::transmute(dwsignerindex), core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len().try_into().unwrap(), core::mem::transmute(pbdecrypted.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdecrypted.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppxchgcert.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsignercert.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + CryptDecryptMessage(core::mem::transmute(pdecryptpara), core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len().try_into().unwrap(), core::mem::transmute(pbdecrypted.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdecrypted.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppxchgcert.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptDeriveKey(hprov: usize, algid: ALG_ID, hbasedata: usize, dwflags: u32, phkey: *mut usize) -> windows_core::Result<()> { @@ -1379,12 +1240,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(core::mem::transmute(hhash), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(phhash)).ok() + CryptDuplicateHash(core::mem::transmute(hhash), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(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(core::mem::transmute(hkey), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(phkey)).ok() + CryptDuplicateKey(core::mem::transmute(hkey), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(phkey)).ok() } #[inline] pub unsafe fn CryptEncodeObject(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P1, pvstructinfo: *const core::ffi::c_void, pbencoded: Option<*mut u8>, pcbencoded: *mut u32) -> windows_core::Result<()> @@ -1392,7 +1253,7 @@ where P1: 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(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pvstructinfo), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbencoded)).ok() + CryptEncodeObject(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pvstructinfo), core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } #[inline] pub unsafe fn CryptEncodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P1, 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<()> @@ -1400,7 +1261,7 @@ where P1: 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(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pvstructinfo), core::mem::transmute(dwflags), core::mem::transmute(pencodepara.unwrap_or(core::ptr::null())), core::mem::transmute(pvencoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbencoded)).ok() + CryptEncodeObjectEx(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pvstructinfo), core::mem::transmute(dwflags), core::mem::transmute(pencodepara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } #[inline] pub unsafe fn CryptEncrypt(hkey: usize, hhash: usize, r#final: P2, dwflags: u32, pbdata: Option<&mut [u8]>, pdwdatalen: *mut u32) -> windows_core::Result<()> @@ -1413,7 +1274,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(core::mem::transmute(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())), core::mem::transmute(pcbencryptedblob)).ok() + CryptEncryptMessage(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(pcbencryptedblob)).ok() } #[inline] pub unsafe fn CryptEnumKeyIdentifierProperties(pkeyidentifier: Option<*const CRYPT_INTEGER_BLOB>, dwpropid: u32, dwflags: u32, pwszcomputername: P3, pvreserved: Option<*const core::ffi::c_void>, pvarg: Option<*mut core::ffi::c_void>, pfnenum: PFN_CRYPT_ENUM_KEYID_PROP) -> windows_core::Result<()> @@ -1421,7 +1282,7 @@ where P3: 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(core::ptr::null())), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnenum)).ok() + CryptEnumKeyIdentifierProperties(core::mem::transmute(pkeyidentifier.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnenum)).ok() } #[inline] pub unsafe fn CryptEnumOIDFunction(dwencodingtype: u32, pszfuncname: P1, pszoid: P2, dwflags: u32, pvarg: Option<*mut core::ffi::c_void>, pfnenumoidfunc: PFN_CRYPT_ENUM_OID_FUNC) -> windows_core::Result<()> @@ -1430,37 +1291,37 @@ where P2: 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(core::mem::transmute(dwencodingtype), pszfuncname.param().abi(), pszoid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnenumoidfunc)).ok() + CryptEnumOIDFunction(core::mem::transmute(dwencodingtype), pszfuncname.param().abi(), pszoid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dwgroupid), core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnenumoidinfo)) + CryptEnumOIDInfo(core::mem::transmute(dwgroupid), core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { +pub unsafe fn CryptEnumProviderTypesA(dwindex: u32, pdwreserved: Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, sztypename: Option, 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(core::mem::transmute(dwindex), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pdwprovtype), core::mem::transmute(sztypename), core::mem::transmute(pcbtypename)).ok() + CryptEnumProviderTypesA(core::mem::transmute(dwindex), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pdwprovtype), core::mem::transmute(sztypename.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { +pub unsafe fn CryptEnumProviderTypesW(dwindex: u32, pdwreserved: Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, sztypename: Option, 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(core::mem::transmute(dwindex), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pdwprovtype), core::mem::transmute(sztypename), core::mem::transmute(pcbtypename)).ok() + CryptEnumProviderTypesW(core::mem::transmute(dwindex), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pdwprovtype), core::mem::transmute(sztypename.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { +pub unsafe fn CryptEnumProvidersA(dwindex: u32, pdwreserved: Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, szprovname: Option, 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(core::mem::transmute(dwindex), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pdwprovtype), core::mem::transmute(szprovname), core::mem::transmute(pcbprovname)).ok() + CryptEnumProvidersA(core::mem::transmute(dwindex), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pdwprovtype), core::mem::transmute(szprovname.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { +pub unsafe fn CryptEnumProvidersW(dwindex: u32, pdwreserved: Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, szprovname: Option, 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(core::mem::transmute(dwindex), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pdwprovtype), core::mem::transmute(szprovname), core::mem::transmute(pcbprovname)).ok() + CryptEnumProvidersW(core::mem::transmute(dwindex), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pdwprovtype), core::mem::transmute(szprovname.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hkey), core::mem::transmute(hexpkey), core::mem::transmute(dwblobtype), core::mem::transmute(dwflags), core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwdatalen)).ok() + CryptExportKey(core::mem::transmute(hkey), core::mem::transmute(hexpkey), core::mem::transmute(dwblobtype), core::mem::transmute(dwflags), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatalen)).ok() } #[inline] pub unsafe fn CryptExportPKCS8(hcryptprov: usize, dwkeyspec: u32, pszprivatekeyobjid: P2, dwflags: u32, pvauxinfo: Option<*const core::ffi::c_void>, pbprivatekeyblob: Option<*mut u8>, pcbprivatekeyblob: *mut u32) -> windows_core::Result<()> @@ -1468,38 +1329,33 @@ where P2: 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(core::mem::transmute(hcryptprov), core::mem::transmute(dwkeyspec), pszprivatekeyobjid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbprivatekeyblob.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbprivatekeyblob)).ok() + CryptExportPKCS8(core::mem::transmute(hcryptprov), core::mem::transmute(dwkeyspec), pszprivatekeyobjid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbprivatekeyblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptExportPublicKeyInfo(hcryptprovorncryptkey: HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, dwkeyspec: Option, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dwkeyspec), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbinfo)).ok() + CryptExportPublicKeyInfo(core::mem::transmute(hcryptprovorncryptkey), core::mem::transmute(dwkeyspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbinfo)).ok() } #[inline] -pub unsafe fn CryptExportPublicKeyInfoEx(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid: P3, dwflags: u32, pvauxinfo: Option<*const core::ffi::c_void>, pinfo: Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> windows_core::Result<()> +pub unsafe fn CryptExportPublicKeyInfoEx(hcryptprovorncryptkey: HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, dwkeyspec: Option, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid: P3, dwflags: u32, pvauxinfo: Option<*const core::ffi::c_void>, pinfo: Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P3: 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(), core::mem::transmute(dwkeyspec), core::mem::transmute(dwcertencodingtype), pszpublickeyobjid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbinfo)).ok() + CryptExportPublicKeyInfoEx(core::mem::transmute(hcryptprovorncryptkey), core::mem::transmute(dwkeyspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertencodingtype), pszpublickeyobjid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbinfo)).ok() } #[inline] -pub unsafe fn CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid: P2, dwflags: u32, pvauxinfo: Option<*const core::ffi::c_void>, pinfo: Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey: BCRYPT_KEY_HANDLE, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid: P2, dwflags: u32, pvauxinfo: Option<*const core::ffi::c_void>, pinfo: Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: 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(), core::mem::transmute(dwcertencodingtype), pszpublickeyobjid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbinfo)) + CryptExportPublicKeyInfoFromBCryptKeyHandle(core::mem::transmute(hbcryptkey), core::mem::transmute(dwcertencodingtype), pszpublickeyobjid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pcert), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() + CryptFindCertificateKeyProvInfo(core::mem::transmute(pcert), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptFindLocalizedName(pwszcryptname: P0) -> windows_core::PCWSTR @@ -1520,7 +1376,7 @@ where P4: 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(core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwformattype), core::mem::transmute(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())), core::mem::transmute(pcbformat)).ok() + CryptFormatObject(core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwformattype), core::mem::transmute(dwformatstrtype), core::mem::transmute(pformatstruct.unwrap_or(core::mem::zeroed())), lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbformat.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbformat)).ok() } #[inline] pub unsafe fn CryptFreeOIDFunctionAddress(hfuncaddr: *const core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL { @@ -1538,18 +1394,17 @@ pub unsafe fn CryptGenRandom(hprov: usize, pbbuffer: &mut [u8]) -> windows_core: CryptGenRandom(core::mem::transmute(hprov), pbbuffer.len().try_into().unwrap(), core::mem::transmute(pbbuffer.as_ptr())).ok() } #[inline] -pub unsafe fn CryptGetAsyncParam(hasync: P0, pszparamoid: P1, ppvparam: Option<*mut *mut core::ffi::c_void>, ppfnfree: Option<*mut PFN_CRYPT_ASYNC_PARAM_FREE_FUNC>) -> super::super::Foundation::BOOL +pub unsafe fn CryptGetAsyncParam(hasync: HCRYPTASYNC, pszparamoid: P1, ppvparam: Option<*mut *mut core::ffi::c_void>, ppfnfree: Option<*mut PFN_CRYPT_ASYNC_PARAM_FREE_FUNC>) -> super::super::Foundation::BOOL where - P0: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(ppfnfree.unwrap_or(core::ptr::null_mut()))) + CryptGetAsyncParam(core::mem::transmute(hasync), pszparamoid.param().abi(), core::mem::transmute(ppvparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppfnfree.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CryptGetDefaultOIDDllList(hfuncset: *const core::ffi::c_void, dwencodingtype: u32, pwszdlllist: windows_core::PWSTR, pcchdlllist: *mut u32) -> windows_core::Result<()> { +pub unsafe fn CryptGetDefaultOIDDllList(hfuncset: *const core::ffi::c_void, dwencodingtype: u32, pwszdlllist: Option, pcchdlllist: *mut u32) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptGetDefaultOIDDllList(hfuncset : *const core::ffi::c_void, dwencodingtype : u32, pwszdlllist : windows_core::PWSTR, pcchdlllist : *mut u32) -> super::super::Foundation:: BOOL); - CryptGetDefaultOIDDllList(core::mem::transmute(hfuncset), core::mem::transmute(dwencodingtype), core::mem::transmute(pwszdlllist), core::mem::transmute(pcchdlllist)).ok() + CryptGetDefaultOIDDllList(core::mem::transmute(hfuncset), core::mem::transmute(dwencodingtype), core::mem::transmute(pwszdlllist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchdlllist)).ok() } #[inline] pub unsafe fn CryptGetDefaultOIDFunctionAddress(hfuncset: *const core::ffi::c_void, dwencodingtype: u32, pwszdll: P2, dwflags: u32, ppvfuncaddr: *mut *mut core::ffi::c_void, phfuncaddr: *mut *mut core::ffi::c_void) -> super::super::Foundation::BOOL @@ -1560,19 +1415,19 @@ where CryptGetDefaultOIDFunctionAddress(core::mem::transmute(hfuncset), core::mem::transmute(dwencodingtype), pwszdll.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ppvfuncaddr), core::mem::transmute(phfuncaddr)) } #[inline] -pub unsafe fn CryptGetDefaultProviderA(dwprovtype: u32, pdwreserved: Option<*const u32>, dwflags: u32, pszprovname: windows_core::PSTR, pcbprovname: *mut u32) -> windows_core::Result<()> { +pub unsafe fn CryptGetDefaultProviderA(dwprovtype: u32, pdwreserved: Option<*const u32>, dwflags: u32, pszprovname: Option, 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(core::mem::transmute(dwprovtype), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pszprovname), core::mem::transmute(pcbprovname)).ok() + CryptGetDefaultProviderA(core::mem::transmute(dwprovtype), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pszprovname.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { +pub unsafe fn CryptGetDefaultProviderW(dwprovtype: u32, pdwreserved: Option<*const u32>, dwflags: u32, pszprovname: Option, 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(core::mem::transmute(dwprovtype), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pszprovname), core::mem::transmute(pcbprovname)).ok() + CryptGetDefaultProviderW(core::mem::transmute(dwprovtype), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pszprovname.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hhash), core::mem::transmute(dwparam), core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwdatalen), core::mem::transmute(dwflags)).ok() + CryptGetHashParam(core::mem::transmute(hhash), core::mem::transmute(dwparam), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatalen), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn CryptGetKeyIdentifierProperty(pkeyidentifier: *const CRYPT_INTEGER_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: P3, pvreserved: Option<*const core::ffi::c_void>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: *mut u32) -> windows_core::Result<()> @@ -1580,20 +1435,17 @@ where P3: 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(core::mem::transmute(pkeyidentifier), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata)).ok() + CryptGetKeyIdentifierProperty(core::mem::transmute(pkeyidentifier), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hkey), core::mem::transmute(dwparam), core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwdatalen), core::mem::transmute(dwflags)).ok() + CryptGetKeyParam(core::mem::transmute(hkey), core::mem::transmute(dwparam), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatalen), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CryptGetMessageCertificates(dwmsgandcertencodingtype: u32, hcryptprov: P1, dwflags: u32, pbsignedblob: &[u8]) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn CryptGetMessageCertificates(dwmsgandcertencodingtype: u32, hcryptprov: Option, dwflags: u32, pbsignedblob: &[u8]) -> windows_core::Result { windows_targets::link!("crypt32.dll" "system" fn CryptGetMessageCertificates(dwmsgandcertencodingtype : u32, hcryptprov : HCRYPTPROV_LEGACY, dwflags : u32, pbsignedblob : *const u8, cbsignedblob : u32) -> HCERTSTORE); - let result__ = CryptGetMessageCertificates(core::mem::transmute(dwmsgandcertencodingtype), hcryptprov.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap()); + let result__ = CryptGetMessageCertificates(core::mem::transmute(dwmsgandcertencodingtype), core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1617,7 +1469,7 @@ where P3: 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(core::mem::transmute(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() + CryptGetOIDFunctionValue(core::mem::transmute(dwencodingtype), pszfuncname.param().abi(), pszoid.param().abi(), pwszvaluename.param().abi(), core::mem::transmute(pdwvaluetype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbvaluedata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbvaluedata.unwrap_or(core::mem::zeroed()))).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<()> @@ -1625,12 +1477,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(), core::mem::transmute(pvpara), core::mem::transmute(dwflags), core::mem::transmute(purlarray.unwrap_or(core::ptr::null_mut())), core::mem::transmute(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() + CryptGetObjectUrl(pszurloid.param().abi(), core::mem::transmute(pvpara), core::mem::transmute(dwflags), core::mem::transmute(purlarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcburlarray), core::mem::transmute(purlinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcburlinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(hprov), core::mem::transmute(dwparam), core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwdatalen), core::mem::transmute(dwflags)).ok() + CryptGetProvParam(core::mem::transmute(hprov), core::mem::transmute(dwparam), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatalen), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn CryptGetUserKey(hprov: usize, dwkeyspec: u32, phuserkey: *mut usize) -> windows_core::Result<()> { @@ -1638,12 +1490,9 @@ pub unsafe fn CryptGetUserKey(hprov: usize, dwkeyspec: u32, phuserkey: *mut usiz CryptGetUserKey(core::mem::transmute(hprov), core::mem::transmute(dwkeyspec), core::mem::transmute(phuserkey)).ok() } #[inline] -pub unsafe fn CryptHashCertificate(hcryptprov: P0, algid: ALG_ID, dwflags: u32, pbencoded: &[u8], pbcomputedhash: Option<*mut u8>, pcbcomputedhash: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptHashCertificate(hcryptprov: Option, algid: ALG_ID, dwflags: u32, pbencoded: &[u8], pbcomputedhash: Option<*mut u8>, pcbcomputedhash: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(algid), core::mem::transmute(dwflags), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcomputedhash)).ok() + CryptHashCertificate(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(algid), core::mem::transmute(dwflags), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> @@ -1651,7 +1500,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(), core::mem::transmute(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())), core::mem::transmute(pcbcomputedhash)).ok() + CryptHashCertificate2(pwszcnghashalgid.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(pcbcomputedhash)).ok() } #[inline] pub unsafe fn CryptHashData(hhash: usize, pbdata: &[u8], dwflags: u32) -> windows_core::Result<()> { @@ -1664,15 +1513,12 @@ where P1: 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(core::mem::transmute(phashpara), fdetachedhash.param().abi(), core::mem::transmute(ctobehashed), core::mem::transmute(rgpbtobehashed), core::mem::transmute(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() + CryptHashMessage(core::mem::transmute(phashpara), fdetachedhash.param().abi(), core::mem::transmute(ctobehashed), core::mem::transmute(rgpbtobehashed), core::mem::transmute(rgcbtobehashed), core::mem::transmute(pbhashedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbhashedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptHashPublicKeyInfo(hcryptprov: Option, 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<()> { 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(), core::mem::transmute(algid), core::mem::transmute(dwflags), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pinfo), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcomputedhash)).ok() + CryptHashPublicKeyInfo(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(algid), core::mem::transmute(dwflags), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pinfo), core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash)).ok() } #[inline] pub unsafe fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> windows_core::Result<()> { @@ -1680,12 +1526,9 @@ pub unsafe fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> wi CryptHashSessionKey(core::mem::transmute(hhash), core::mem::transmute(hkey), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CryptHashToBeSigned(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], pbcomputedhash: Option<*mut u8>, pcbcomputedhash: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptHashToBeSigned(hcryptprov: Option, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], pbcomputedhash: Option<*mut u8>, pcbcomputedhash: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcomputedhash)).ok() + CryptHashToBeSigned(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash)).ok() } #[inline] pub unsafe fn CryptImportKey(hprov: usize, pbdata: &[u8], hpubkey: usize, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> windows_core::Result<()> { @@ -1695,7 +1538,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), core::mem::transmute(dwflags), core::mem::transmute(phcryptprov.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null()))).ok() + CryptImportPKCS8(core::mem::transmute(sprivatekeyandparams), core::mem::transmute(dwflags), core::mem::transmute(phcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed()))).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<()> { @@ -1705,12 +1548,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(core::mem::transmute(hcryptprov), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pinfo), core::mem::transmute(aikeyalg), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(phkey)).ok() + CryptImportPublicKeyInfoEx(core::mem::transmute(hcryptprov), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pinfo), core::mem::transmute(aikeyalg), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dwcertencodingtype), core::mem::transmute(pinfo), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(phkey)).ok() + CryptImportPublicKeyInfoEx2(core::mem::transmute(dwcertencodingtype), core::mem::transmute(pinfo), core::mem::transmute(dwflags), core::mem::transmute(pvauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkey)).ok() } #[inline] pub unsafe fn CryptInitOIDFunctionSet(pszfuncname: P0, dwflags: u32) -> *mut core::ffi::c_void @@ -1723,21 +1566,20 @@ 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(core::mem::transmute(pfncancel), core::mem::transmute(pvarg.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + CryptInstallCancelRetrieval(core::mem::transmute(pfncancel), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hcryptprov), core::mem::transmute(dwdefaulttype), core::mem::transmute(pvdefaultpara.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(phdefaultcontext)).ok() + CryptInstallDefaultContext(core::mem::transmute(hcryptprov), core::mem::transmute(dwdefaulttype), core::mem::transmute(pvdefaultpara.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(phdefaultcontext)).ok() } #[inline] -pub unsafe fn CryptInstallOIDFunctionAddress(hmodule: P0, dwencodingtype: u32, pszfuncname: P2, rgfuncentry: &[CRYPT_OID_FUNC_ENTRY], dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptInstallOIDFunctionAddress(hmodule: Option, dwencodingtype: u32, pszfuncname: P2, rgfuncentry: &[CRYPT_OID_FUNC_ENTRY], dwflags: u32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptInstallOIDFunctionAddress(hmodule : super::super::Foundation:: HMODULE, dwencodingtype : u32, pszfuncname : windows_core::PCSTR, cfuncentry : u32, rgfuncentry : *const CRYPT_OID_FUNC_ENTRY, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptInstallOIDFunctionAddress(hmodule.param().abi(), core::mem::transmute(dwencodingtype), pszfuncname.param().abi(), rgfuncentry.len().try_into().unwrap(), core::mem::transmute(rgfuncentry.as_ptr()), core::mem::transmute(dwflags)) + CryptInstallOIDFunctionAddress(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencodingtype), pszfuncname.param().abi(), rgfuncentry.len().try_into().unwrap(), core::mem::transmute(rgfuncentry.as_ptr()), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn CryptMemAlloc(cbsize: u32) -> *mut core::ffi::c_void { @@ -1747,12 +1589,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(core::ptr::null()))) + CryptMemFree(core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(cbsize)) + CryptMemRealloc(core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize)) } #[inline] pub unsafe fn CryptMsgCalculateEncodedLength(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, pvmsgencodeinfo: *const core::ffi::c_void, pszinnercontentobjid: P4, cbdata: u32) -> u32 @@ -1765,12 +1607,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(core::ptr::null()))).ok() + CryptMsgClose(core::mem::transmute(hcryptmsg.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(hcryptmsg), core::mem::transmute(dwflags), core::mem::transmute(dwctrltype), core::mem::transmute(pvctrlpara.unwrap_or(core::ptr::null()))).ok() + CryptMsgControl(core::mem::transmute(hcryptmsg), core::mem::transmute(dwflags), core::mem::transmute(dwctrltype), core::mem::transmute(pvctrlpara.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptMsgCountersign(hcryptmsg: *const core::ffi::c_void, dwindex: u32, rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO]) -> windows_core::Result<()> { @@ -1780,35 +1622,32 @@ 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(core::mem::transmute(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())), core::mem::transmute(pcbcountersignature)).ok() + CryptMsgCountersignEncoded(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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(core::ptr::null()))) + CryptMsgDuplicate(core::mem::transmute(hcryptmsg.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(pctlinfo), core::mem::transmute(psigninfo), core::mem::transmute(dwflags), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbencoded)).ok() + CryptMsgEncodeAndSignCTL(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(pctlinfo), core::mem::transmute(psigninfo), core::mem::transmute(dwflags), core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(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())), core::mem::transmute(dwflags), core::mem::transmute(ppsigner.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwsignerindex.unwrap_or(core::ptr::null_mut()))).ok() + CryptMsgGetAndVerifySigner(core::mem::transmute(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())), core::mem::transmute(dwflags), core::mem::transmute(ppsigner.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsignerindex.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(hcryptmsg), core::mem::transmute(dwparamtype), core::mem::transmute(dwindex), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata)).ok() + CryptMsgGetParam(core::mem::transmute(hcryptmsg), core::mem::transmute(dwparamtype), core::mem::transmute(dwindex), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata)).ok() } #[inline] -pub unsafe fn CryptMsgOpenToDecode(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, hcryptprov: P3, precipientinfo: Option<*const CERT_INFO>, pstreaminfo: Option<*const CMSG_STREAM_INFO>) -> *mut core::ffi::c_void -where - P3: windows_core::Param, -{ +pub unsafe fn CryptMsgOpenToDecode(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, hcryptprov: Option, precipientinfo: Option<*const CERT_INFO>, pstreaminfo: Option<*const CMSG_STREAM_INFO>) -> *mut core::ffi::c_void { 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(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(dwflags), core::mem::transmute(dwmsgtype), hcryptprov.param().abi(), core::mem::transmute(precipientinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pstreaminfo.unwrap_or(core::ptr::null()))) + CryptMsgOpenToDecode(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(dwflags), core::mem::transmute(dwmsgtype), core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(precipientinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstreaminfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CryptMsgOpenToEncode(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: CRYPT_MSG_TYPE, pvmsgencodeinfo: *const core::ffi::c_void, pszinnercontentobjid: P4, pstreaminfo: Option<*const CMSG_STREAM_INFO>) -> *mut core::ffi::c_void @@ -1816,12 +1655,12 @@ where P4: 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(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(dwflags), core::mem::transmute(dwmsgtype), core::mem::transmute(pvmsgencodeinfo), pszinnercontentobjid.param().abi(), core::mem::transmute(pstreaminfo.unwrap_or(core::ptr::null()))) + CryptMsgOpenToEncode(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(dwflags), core::mem::transmute(dwmsgtype), core::mem::transmute(pvmsgencodeinfo), pszinnercontentobjid.param().abi(), core::mem::transmute(pstreaminfo.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len().try_into().unwrap(), core::mem::transmute(psigninfo), core::mem::transmute(dwflags), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbencoded)).ok() + CryptMsgSignCTL(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len().try_into().unwrap(), core::mem::transmute(psigninfo), core::mem::transmute(dwflags), core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } #[inline] pub unsafe fn CryptMsgUpdate(hcryptmsg: *const core::ffi::c_void, pbdata: Option<&[u8]>, ffinal: P3) -> windows_core::Result<()> @@ -1832,20 +1671,14 @@ where CryptMsgUpdate(core::mem::transmute(hcryptmsg), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ffinal.param().abi()).ok() } #[inline] -pub unsafe fn CryptMsgVerifyCountersignatureEncoded(hcryptprov: P0, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], pcicountersigner: *const CERT_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptMsgVerifyCountersignatureEncoded(hcryptprov: Option, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], pcicountersigner: *const CERT_INFO) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptMsgVerifyCountersignatureEncoded(hcryptprov : HCRYPTPROV_LEGACY, dwencodingtype : u32, pbsignerinfo : *const u8, cbsignerinfo : u32, pbsignerinfocountersignature : *const u8, cbsignerinfocountersignature : u32, pcicountersigner : *const CERT_INFO) -> super::super::Foundation:: BOOL); - CryptMsgVerifyCountersignatureEncoded(hcryptprov.param().abi(), core::mem::transmute(dwencodingtype), core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), core::mem::transmute(pcicountersigner)).ok() + CryptMsgVerifyCountersignatureEncoded(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencodingtype), core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), core::mem::transmute(pcicountersigner)).ok() } #[inline] -pub unsafe fn CryptMsgVerifyCountersignatureEncodedEx(hcryptprov: P0, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], dwsignertype: u32, pvsigner: *const core::ffi::c_void, dwflags: u32, pvextra: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptMsgVerifyCountersignatureEncodedEx(hcryptprov: Option, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], dwsignertype: u32, pvsigner: *const core::ffi::c_void, dwflags: u32, pvextra: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwencodingtype), core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), core::mem::transmute(dwsignertype), core::mem::transmute(pvsigner), core::mem::transmute(dwflags), core::mem::transmute(pvextra.unwrap_or(core::ptr::null_mut()))).ok() + CryptMsgVerifyCountersignatureEncodedEx(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwencodingtype), core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), core::mem::transmute(dwsignertype), core::mem::transmute(pvsigner), core::mem::transmute(dwflags), core::mem::transmute(pvextra.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptProtectData(pdatain: *const CRYPT_INTEGER_BLOB, szdatadescr: P1, 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<()> @@ -1853,7 +1686,7 @@ where P1: 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(core::mem::transmute(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())), core::mem::transmute(dwflags), core::mem::transmute(pdataout)).ok() + CryptProtectData(core::mem::transmute(pdatain), szdatadescr.param().abi(), core::mem::transmute(poptionalentropy.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppromptstruct.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pdataout)).ok() } #[inline] pub unsafe fn CryptProtectMemory(pdatain: *mut core::ffi::c_void, cbdatain: u32, dwflags: u32) -> windows_core::Result<()> { @@ -1869,12 +1702,12 @@ pub unsafe fn CryptQueryObject(dwobjecttype: CERT_QUERY_OBJECT_TYPE, pvobject: * core::mem::transmute(dwexpectedcontenttypeflags), core::mem::transmute(dwexpectedformattypeflags), core::mem::transmute(dwflags), - 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())), + core::mem::transmute(pdwmsgandcertencodingtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwcontenttype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwformattype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phcertstore.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phmsg.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppvcontext.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -1909,24 +1742,22 @@ pub unsafe fn CryptReleaseContext(hprov: usize, dwflags: u32) -> windows_core::R CryptReleaseContext(core::mem::transmute(hprov), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CryptRetrieveObjectByUrlA(pszurl: P0, pszobjectoid: P1, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut core::ffi::c_void, hasyncretrieve: P5, pcredentials: Option<*const CRYPT_CREDENTIALS>, pvverify: Option<*const core::ffi::c_void>, pauxinfo: Option<*mut CRYPT_RETRIEVE_AUX_INFO>) -> super::super::Foundation::BOOL +pub unsafe fn CryptRetrieveObjectByUrlA(pszurl: P0, pszobjectoid: P1, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut core::ffi::c_void, hasyncretrieve: Option, pcredentials: Option<*const CRYPT_CREDENTIALS>, pvverify: Option<*const core::ffi::c_void>, pauxinfo: Option<*mut CRYPT_RETRIEVE_AUX_INFO>) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P5: 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(), core::mem::transmute(dwretrievalflags), core::mem::transmute(dwtimeout), core::mem::transmute(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()))) + CryptRetrieveObjectByUrlA(pszurl.param().abi(), pszobjectoid.param().abi(), core::mem::transmute(dwretrievalflags), core::mem::transmute(dwtimeout), core::mem::transmute(ppvobject), core::mem::transmute(hasyncretrieve.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvverify.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauxinfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CryptRetrieveObjectByUrlW(pszurl: P0, pszobjectoid: P1, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut core::ffi::c_void, hasyncretrieve: P5, pcredentials: Option<*const CRYPT_CREDENTIALS>, pvverify: Option<*const core::ffi::c_void>, pauxinfo: Option<*mut CRYPT_RETRIEVE_AUX_INFO>) -> super::super::Foundation::BOOL +pub unsafe fn CryptRetrieveObjectByUrlW(pszurl: P0, pszobjectoid: P1, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut core::ffi::c_void, hasyncretrieve: Option, pcredentials: Option<*const CRYPT_CREDENTIALS>, pvverify: Option<*const core::ffi::c_void>, pauxinfo: Option<*mut CRYPT_RETRIEVE_AUX_INFO>) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P5: 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(), core::mem::transmute(dwretrievalflags), core::mem::transmute(dwtimeout), core::mem::transmute(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()))) + CryptRetrieveObjectByUrlW(pszurl.param().abi(), pszobjectoid.param().abi(), core::mem::transmute(dwretrievalflags), core::mem::transmute(dwtimeout), core::mem::transmute(ppvobject), core::mem::transmute(hasyncretrieve.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvverify.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauxinfo.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CryptRetrieveTimeStamp(wszurl: P0, dwretrievalflags: u32, dwtimeout: u32, pszhashid: P3, 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<()> @@ -1935,16 +1766,15 @@ where P3: 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(), core::mem::transmute(dwretrievalflags), core::mem::transmute(dwtimeout), pszhashid.param().abi(), core::mem::transmute(ppara.unwrap_or(core::ptr::null())), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(pptscontext), core::mem::transmute(pptssigner), core::mem::transmute(phstore.unwrap_or(core::ptr::null_mut()))).ok() + CryptRetrieveTimeStamp(wszurl.param().abi(), core::mem::transmute(dwretrievalflags), core::mem::transmute(dwtimeout), pszhashid.param().abi(), core::mem::transmute(ppara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(pptscontext), core::mem::transmute(pptssigner), core::mem::transmute(phstore.unwrap_or(core::mem::zeroed()))).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 +pub unsafe fn CryptSetAsyncParam(hasync: HCRYPTASYNC, pszparamoid: P1, pvparam: Option<*const core::ffi::c_void>, pfnfree: PFN_CRYPT_ASYNC_PARAM_FREE_FUNC) -> super::super::Foundation::BOOL where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(pfnfree)) + CryptSetAsyncParam(core::mem::transmute(hasync), pszparamoid.param().abi(), core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnfree)) } #[inline] pub unsafe fn CryptSetHashParam(hhash: usize, dwparam: CRYPT_SET_HASH_PARAM, pbdata: *const u8, dwflags: u32) -> windows_core::Result<()> { @@ -1957,7 +1787,7 @@ where P3: 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(core::mem::transmute(pkeyidentifier), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))).ok() + CryptSetKeyIdentifierProperty(core::mem::transmute(pkeyidentifier), core::mem::transmute(dwpropid), core::mem::transmute(dwflags), pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptSetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *const u8, dwflags: u32) -> windows_core::Result<()> { @@ -1994,7 +1824,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(), core::mem::transmute(dwprovtype), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + CryptSetProviderExA(pszprovname.param().abi(), core::mem::transmute(dwprovtype), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn CryptSetProviderExW(pszprovname: P0, dwprovtype: u32, pdwreserved: Option<*const u32>, dwflags: u32) -> windows_core::Result<()> @@ -2002,7 +1832,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(), core::mem::transmute(dwprovtype), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + CryptSetProviderExW(pszprovname.param().abi(), core::mem::transmute(dwprovtype), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn CryptSetProviderW(pszprovname: P0, dwprovtype: u32) -> windows_core::Result<()> @@ -2013,26 +1843,33 @@ where CryptSetProviderW(pszprovname.param().abi(), core::mem::transmute(dwprovtype)).ok() } #[inline] -pub unsafe fn CryptSignAndEncodeCertificate(hcryptprovorncryptkey: P0, dwkeyspec: CERT_KEY_SPEC, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P3, pvstructinfo: *const core::ffi::c_void, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: Option<*const core::ffi::c_void>, pbencoded: Option<*mut u8>, pcbencoded: *mut u32) -> windows_core::Result<()> +pub unsafe fn CryptSignAndEncodeCertificate(hcryptprovorncryptkey: Option, dwkeyspec: Option, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P3, pvstructinfo: *const core::ffi::c_void, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: Option<*const core::ffi::c_void>, pbencoded: Option<*mut u8>, pcbencoded: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P3: 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(), core::mem::transmute(dwkeyspec), core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pvstructinfo), core::mem::transmute(psignaturealgorithm), core::mem::transmute(pvhashauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbencoded)).ok() + CryptSignAndEncodeCertificate(core::mem::transmute(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwkeyspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pvstructinfo), core::mem::transmute(psignaturealgorithm), core::mem::transmute(pvhashauxinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(psignpara), core::mem::transmute(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())), core::mem::transmute(pcbsignedandencryptedblob)).ok() + CryptSignAndEncryptMessage(core::mem::transmute(psignpara), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptSignCertificate(hcryptprovorncryptkey: Option, dwkeyspec: Option, 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<()> { 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(), core::mem::transmute(dwkeyspec), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len().try_into().unwrap(), core::mem::transmute(psignaturealgorithm), core::mem::transmute(pvhashauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbsignature.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbsignature)).ok() + CryptSignCertificate( + core::mem::transmute(hcryptprovorncryptkey.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwkeyspec.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwcertencodingtype), + core::mem::transmute(pbencodedtobesigned.as_ptr()), + pbencodedtobesigned.len().try_into().unwrap(), + core::mem::transmute(psignaturealgorithm), + core::mem::transmute(pvhashauxinfo.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pbsignature.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbsignature), + ) + .ok() } #[inline] pub unsafe fn CryptSignHashA(hhash: usize, dwkeyspec: u32, szdescription: P2, dwflags: u32, pbsignature: Option<*mut u8>, pdwsiglen: *mut u32) -> windows_core::Result<()> @@ -2040,7 +1877,7 @@ where P2: 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(core::mem::transmute(hhash), core::mem::transmute(dwkeyspec), szdescription.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pbsignature.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwsiglen)).ok() + CryptSignHashA(core::mem::transmute(hhash), core::mem::transmute(dwkeyspec), szdescription.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pbsignature.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsiglen)).ok() } #[inline] pub unsafe fn CryptSignHashW(hhash: usize, dwkeyspec: u32, szdescription: P2, dwflags: u32, pbsignature: Option<*mut u8>, pdwsiglen: *mut u32) -> windows_core::Result<()> @@ -2048,7 +1885,7 @@ where P2: 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(core::mem::transmute(hhash), core::mem::transmute(dwkeyspec), szdescription.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pbsignature.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwsiglen)).ok() + CryptSignHashW(core::mem::transmute(hhash), core::mem::transmute(dwkeyspec), szdescription.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pbsignature.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsiglen)).ok() } #[inline] pub unsafe fn CryptSignMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: P1, ctobesigned: u32, rgpbtobesigned: Option<*const *const u8>, rgcbtobesigned: *const u32, pbsignedblob: Option<*mut u8>, pcbsignedblob: *mut u32) -> windows_core::Result<()> @@ -2056,37 +1893,37 @@ where P1: 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(core::mem::transmute(psignpara), fdetachedsignature.param().abi(), core::mem::transmute(ctobesigned), core::mem::transmute(rgpbtobesigned.unwrap_or(core::ptr::null())), core::mem::transmute(rgcbtobesigned), core::mem::transmute(pbsignedblob.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbsignedblob)).ok() + CryptSignMessage(core::mem::transmute(psignpara), fdetachedsignature.param().abi(), core::mem::transmute(ctobesigned), core::mem::transmute(rgpbtobesigned.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgcbtobesigned), core::mem::transmute(pbsignedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(psignpara), core::mem::transmute(pbtobesigned.as_ptr()), pbtobesigned.len().try_into().unwrap(), core::mem::transmute(pbsignedblob.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbsignedblob)).ok() + CryptSignMessageWithKey(core::mem::transmute(psignpara), core::mem::transmute(pbtobesigned.as_ptr()), pbtobesigned.len().try_into().unwrap(), core::mem::transmute(pbsignedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(dwflags), core::mem::transmute(pbbinary.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbbinary), core::mem::transmute(pdwskip.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() + CryptStringToBinaryA(core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pbbinary.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbbinary), core::mem::transmute(pdwskip.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(dwflags), core::mem::transmute(pbbinary.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbbinary), core::mem::transmute(pdwskip.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() + CryptStringToBinaryW(core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pbbinary.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbbinary), core::mem::transmute(pdwskip.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + CryptUninstallCancelRetrieval(core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() + CryptUninstallDefaultContext(core::mem::transmute(hdefaultcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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())), core::mem::transmute(dwflags), core::mem::transmute(pdataout)).ok() + CryptUnprotectData(core::mem::transmute(pdatain), core::mem::transmute(ppszdatadescr.unwrap_or(core::mem::zeroed())), core::mem::transmute(poptionalentropy.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppromptstruct.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pdataout)).ok() } #[inline] pub unsafe fn CryptUnprotectMemory(pdatain: *mut core::ffi::c_void, cbdatain: u32, dwflags: u32) -> windows_core::Result<()> { @@ -2117,54 +1954,47 @@ pub unsafe fn CryptUnregisterOIDInfo(pinfo: *const CRYPT_OID_INFO) -> super::sup CryptUnregisterOIDInfo(core::mem::transmute(pinfo)) } #[inline] -pub unsafe fn CryptUpdateProtectedState(poldsid: P0, pwszoldpassword: P1, dwflags: u32, pdwsuccesscount: Option<*mut u32>, pdwfailurecount: Option<*mut u32>) -> windows_core::Result<()> +pub unsafe fn CryptUpdateProtectedState(poldsid: Option, pwszoldpassword: P1, dwflags: u32, pdwsuccesscount: Option<*mut u32>, pdwfailurecount: Option<*mut u32>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(dwflags), core::mem::transmute(pdwsuccesscount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwfailurecount.unwrap_or(core::ptr::null_mut()))).ok() + CryptUpdateProtectedState(core::mem::transmute(poldsid.unwrap_or(core::mem::zeroed())), pwszoldpassword.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pdwsuccesscount.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwfailurecount.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CryptVerifyCertificateSignature(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], ppublickey: *const CERT_PUBLIC_KEY_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptVerifyCertificateSignature(hcryptprov: Option, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], ppublickey: *const CERT_PUBLIC_KEY_INFO) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptVerifyCertificateSignature(hcryptprov : HCRYPTPROV_LEGACY, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbencoded : *const u8, cbencoded : u32, ppublickey : *const CERT_PUBLIC_KEY_INFO) -> super::super::Foundation:: BOOL); - CryptVerifyCertificateSignature(hcryptprov.param().abi(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(ppublickey)).ok() + CryptVerifyCertificateSignature(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertencodingtype), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(ppublickey)).ok() } #[inline] -pub unsafe fn CryptVerifyCertificateSignatureEx(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwsubjecttype: u32, pvsubject: *const core::ffi::c_void, dwissuertype: u32, pvissuer: Option<*const core::ffi::c_void>, dwflags: CRYPT_VERIFY_CERT_FLAGS, pvextra: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CryptVerifyCertificateSignatureEx(hcryptprov: Option, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwsubjecttype: u32, pvsubject: *const core::ffi::c_void, dwissuertype: u32, pvissuer: Option<*const core::ffi::c_void>, dwflags: CRYPT_VERIFY_CERT_FLAGS, pvextra: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwsubjecttype), core::mem::transmute(pvsubject), core::mem::transmute(dwissuertype), core::mem::transmute(pvissuer.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(pvextra.unwrap_or(core::ptr::null_mut()))).ok() + CryptVerifyCertificateSignatureEx(core::mem::transmute(hcryptprov.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertencodingtype), core::mem::transmute(dwsubjecttype), core::mem::transmute(pvsubject), core::mem::transmute(dwissuertype), core::mem::transmute(pvissuer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pvextra.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(phashpara), core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len().try_into().unwrap(), core::mem::transmute(ctobehashed), core::mem::transmute(rgpbtobehashed), core::mem::transmute(rgcbtobehashed), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::ptr::null_mut()))).ok() + CryptVerifyDetachedMessageHash(core::mem::transmute(phashpara), core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len().try_into().unwrap(), core::mem::transmute(ctobehashed), core::mem::transmute(rgpbtobehashed), core::mem::transmute(rgcbtobehashed), core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pverifypara), core::mem::transmute(dwsignerindex), core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len().try_into().unwrap(), core::mem::transmute(ctobesigned), core::mem::transmute(rgpbtobesigned), core::mem::transmute(rgcbtobesigned), core::mem::transmute(ppsignercert.unwrap_or(core::ptr::null_mut()))).ok() + CryptVerifyDetachedMessageSignature(core::mem::transmute(pverifypara), core::mem::transmute(dwsignerindex), core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len().try_into().unwrap(), core::mem::transmute(ctobesigned), core::mem::transmute(rgpbtobesigned), core::mem::transmute(rgcbtobesigned), core::mem::transmute(ppsignercert.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + CryptVerifyMessageHash(core::mem::transmute(phashpara), core::mem::transmute(pbhashedblob.as_ptr()), pbhashedblob.len().try_into().unwrap(), core::mem::transmute(pbtobehashed.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbtobehashed.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pverifypara), core::mem::transmute(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() + CryptVerifyMessageSignature(core::mem::transmute(pverifypara), core::mem::transmute(dwsignerindex), core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap(), core::mem::transmute(pbdecoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdecoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsignercert.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + CryptVerifyMessageSignatureWithKey(core::mem::transmute(pverifypara), core::mem::transmute(ppublickeyinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap(), core::mem::transmute(pbdecoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdecoded.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptVerifySignatureA(hhash: usize, pbsignature: &[u8], hpubkey: usize, szdescription: P4, dwflags: u32) -> windows_core::Result<()> @@ -2183,12 +2013,9 @@ where CryptVerifySignatureW(core::mem::transmute(hhash), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), core::mem::transmute(hpubkey), szdescription.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CryptVerifyTimeStampSignature(pbtscontentinfo: &[u8], pbdata: Option<&[u8]>, hadditionalstore: P4, pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: Option<*mut HCERTSTORE>) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn CryptVerifyTimeStampSignature(pbtscontentinfo: &[u8], pbdata: Option<&[u8]>, hadditionalstore: Option, pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: Option<*mut HCERTSTORE>) -> windows_core::Result<()> { 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(), core::mem::transmute(pptscontext), core::mem::transmute(pptssigner), core::mem::transmute(phstore.unwrap_or(core::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()), core::mem::transmute(hadditionalstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptscontext), core::mem::transmute(pptssigner), core::mem::transmute(phstore.unwrap_or(core::mem::zeroed()))).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> { @@ -2224,7 +2051,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(core::mem::transmute(dwgroupid), core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnenumalginfo)).ok() + CryptXmlEnumAlgorithmInfo(core::mem::transmute(dwgroupid), core::mem::transmute(dwflags), core::mem::transmute(pvarg.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnenumalginfo)).ok() } #[inline] pub unsafe fn CryptXmlFindAlgorithmInfo(dwfindbytype: u32, pvfindby: *const core::ffi::c_void, dwgroupid: u32, dwflags: u32) -> *mut CRYPT_XML_ALGORITHM_INFO { @@ -2276,7 +2103,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(core::ptr::null())), core::mem::transmute(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()), core::mem::transmute(pencoded), core::mem::transmute(phcryptxml)).ok() + CryptXmlOpenToDecode(core::mem::transmute(pconfig.unwrap_or(core::mem::zeroed())), core::mem::transmute(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()), core::mem::transmute(pencoded), core::mem::transmute(phcryptxml)).ok() } #[inline] pub unsafe fn CryptXmlOpenToEncode(pconfig: Option<*const CRYPT_XML_TRANSFORM_CHAIN_CONFIG>, dwflags: CRYPT_XML_FLAGS, wszid: P2, rgproperty: Option<&[CRYPT_XML_PROPERTY]>, pencoded: Option<*const CRYPT_XML_BLOB>, phsignature: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -2284,7 +2111,7 @@ where P2: 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(core::ptr::null())), core::mem::transmute(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())), core::mem::transmute(phsignature)).ok() + CryptXmlOpenToEncode(core::mem::transmute(pconfig.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(phsignature)).ok() } #[inline] pub unsafe fn CryptXmlSetHMACSecret(hsignature: *const core::ffi::c_void, pbsecret: &[u8]) -> windows_core::Result<()> { @@ -2292,20 +2119,14 @@ pub unsafe fn CryptXmlSetHMACSecret(hsignature: *const core::ffi::c_void, pbsecr CryptXmlSetHMACSecret(core::mem::transmute(hsignature), core::mem::transmute(pbsecret.as_ptr()), pbsecret.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn CryptXmlSign(hsignature: *const core::ffi::c_void, hkey: P1, dwkeyspec: CERT_KEY_SPEC, dwflags: CRYPT_XML_FLAGS, dwkeyinfospec: CRYPT_XML_KEYINFO_SPEC, pvkeyinfospec: Option<*const core::ffi::c_void>, psignaturemethod: *const CRYPT_XML_ALGORITHM, pcanonicalization: *const CRYPT_XML_ALGORITHM) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn CryptXmlSign(hsignature: *const core::ffi::c_void, hkey: Option, dwkeyspec: CERT_KEY_SPEC, dwflags: CRYPT_XML_FLAGS, dwkeyinfospec: CRYPT_XML_KEYINFO_SPEC, pvkeyinfospec: Option<*const core::ffi::c_void>, psignaturemethod: *const CRYPT_XML_ALGORITHM, pcanonicalization: *const CRYPT_XML_ALGORITHM) -> windows_core::Result<()> { 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(core::mem::transmute(hsignature), hkey.param().abi(), core::mem::transmute(dwkeyspec), core::mem::transmute(dwflags), core::mem::transmute(dwkeyinfospec), core::mem::transmute(pvkeyinfospec.unwrap_or(core::ptr::null())), core::mem::transmute(psignaturemethod), core::mem::transmute(pcanonicalization)).ok() + CryptXmlSign(core::mem::transmute(hsignature), core::mem::transmute(hkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwkeyspec), core::mem::transmute(dwflags), core::mem::transmute(dwkeyinfospec), core::mem::transmute(pvkeyinfospec.unwrap_or(core::mem::zeroed())), core::mem::transmute(psignaturemethod), core::mem::transmute(pcanonicalization)).ok() } #[inline] -pub unsafe fn CryptXmlVerifySignature(hsignature: *const core::ffi::c_void, hkey: P1, dwflags: CRYPT_XML_FLAGS) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn CryptXmlVerifySignature(hsignature: *const core::ffi::c_void, hkey: Option, dwflags: CRYPT_XML_FLAGS) -> windows_core::Result<()> { windows_targets::link!("cryptxml.dll" "system" fn CryptXmlVerifySignature(hsignature : *const core::ffi::c_void, hkey : BCRYPT_KEY_HANDLE, dwflags : CRYPT_XML_FLAGS) -> windows_core::HRESULT); - CryptXmlVerifySignature(core::mem::transmute(hsignature), hkey.param().abi(), core::mem::transmute(dwflags)).ok() + CryptXmlVerifySignature(core::mem::transmute(hsignature), core::mem::transmute(hkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn Decrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: P1, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> @@ -2329,7 +2150,7 @@ where P5: 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(core::ptr::null_mut())), core::mem::transmute(pcbcertchains), core::mem::transmute(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(), core::mem::transmute(dwkeyspec)).ok() + FindCertsByIssuer(core::mem::transmute(pcertchains.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcertchains), core::mem::transmute(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(), core::mem::transmute(dwkeyspec)).ok() } #[inline] pub unsafe fn FreeToken(pallocmemory: *const GENERIC_XML_TOKEN) -> super::super::Foundation::BOOL { @@ -2356,7 +2177,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(core::mem::transmute(dwparamtype), core::mem::transmute(pparam), core::mem::transmute(pcbtoken.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptoken.unwrap_or(core::ptr::null_mut()))).ok() + GetBrowserToken(core::mem::transmute(dwparamtype), core::mem::transmute(pparam), core::mem::transmute(pcbtoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptoken.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn GetCipherInterface(pszprovidername: P0, pszalgid: P1, ppfunctiontable: *mut *mut BCRYPT_CIPHER_FUNCTION_TABLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -2468,31 +2289,23 @@ pub unsafe fn ManageCardSpace() -> windows_core::Result<()> { ManageCardSpace().ok() } #[inline] -pub unsafe fn NCryptCloseProtectionDescriptor(hdescriptor: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptCloseProtectionDescriptor(hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptCloseProtectionDescriptor(hdescriptor : super:: NCRYPT_DESCRIPTOR_HANDLE) -> windows_core::HRESULT); - NCryptCloseProtectionDescriptor(hdescriptor.param().abi()).ok() + NCryptCloseProtectionDescriptor(core::mem::transmute(hdescriptor)).ok() } #[inline] -pub unsafe fn NCryptCreateClaim(hsubjectkey: P0, hauthoritykey: P1, dwclaimtype: u32, pparameterlist: Option<*const BCryptBufferDesc>, pbclaimblob: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NCryptCreateClaim(hsubjectkey: Option, hauthoritykey: Option, dwclaimtype: u32, pparameterlist: Option<*const BCryptBufferDesc>, pbclaimblob: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + NCryptCreateClaim(core::mem::transmute(hsubjectkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(hauthoritykey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwclaimtype), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptCreatePersistedKey(hprovider: P0, phkey: *mut NCRYPT_KEY_HANDLE, pszalgid: P2, pszkeyname: P3, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> +pub unsafe fn NCryptCreatePersistedKey(hprovider: NCRYPT_PROV_HANDLE, phkey: *mut NCRYPT_KEY_HANDLE, pszalgid: P2, pszkeyname: P3, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptCreatePersistedKey(hprovider : NCRYPT_PROV_HANDLE, phkey : *mut NCRYPT_KEY_HANDLE, pszalgid : windows_core::PCWSTR, pszkeyname : windows_core::PCWSTR, dwlegacykeyspec : CERT_KEY_SPEC, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptCreatePersistedKey(hprovider.param().abi(), core::mem::transmute(phkey), pszalgid.param().abi(), pszkeyname.param().abi(), core::mem::transmute(dwlegacykeyspec), core::mem::transmute(dwflags)).ok() + NCryptCreatePersistedKey(core::mem::transmute(hprovider), core::mem::transmute(phkey), pszalgid.param().abi(), pszkeyname.param().abi(), core::mem::transmute(dwlegacykeyspec), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn NCryptCreateProtectionDescriptor(pwszdescriptorstring: P0, dwflags: u32) -> windows_core::Result @@ -2504,54 +2317,60 @@ where NCryptCreateProtectionDescriptor(pwszdescriptorstring.param().abi(), core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn NCryptDecrypt(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptDecrypt(hkey: NCRYPT_KEY_HANDLE, pbinput: Option<&[u8]>, ppaddinginfo: Option<*const core::ffi::c_void>, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> { 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(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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + NCryptDecrypt( + core::mem::transmute(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(core::mem::zeroed())), + 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()), + core::mem::transmute(pcbresult), + core::mem::transmute(dwflags), + ) + .ok() } #[inline] -pub unsafe fn NCryptDeleteKey(hkey: P0, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptDeleteKey(hkey: NCRYPT_KEY_HANDLE, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptDeleteKey(hkey : NCRYPT_KEY_HANDLE, dwflags : u32) -> windows_core::HRESULT); - NCryptDeleteKey(hkey.param().abi(), core::mem::transmute(dwflags)).ok() + NCryptDeleteKey(core::mem::transmute(hkey), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptDeriveKey(hsharedsecret: P0, pwszkdf: P1, pparameterlist: Option<*const BCryptBufferDesc>, pbderivedkey: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn NCryptDeriveKey(hsharedsecret: NCRYPT_SECRET_HANDLE, pwszkdf: P1, pparameterlist: Option<*const BCryptBufferDesc>, pbderivedkey: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, 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(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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + NCryptDeriveKey(core::mem::transmute(hsharedsecret), pwszkdf.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(pcbresult), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptEncrypt(hkey: NCRYPT_KEY_HANDLE, pbinput: Option<&[u8]>, ppaddinginfo: Option<*const core::ffi::c_void>, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> { 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(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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + NCryptEncrypt( + core::mem::transmute(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(core::mem::zeroed())), + 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()), + core::mem::transmute(pcbresult), + core::mem::transmute(dwflags), + ) + .ok() } #[inline] -pub unsafe fn NCryptEnumAlgorithms(hprovider: P0, dwalgoperations: NCRYPT_OPERATION, pdwalgcount: *mut u32, ppalglist: *mut *mut NCryptAlgorithmName, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptEnumAlgorithms(hprovider: NCRYPT_PROV_HANDLE, dwalgoperations: NCRYPT_OPERATION, pdwalgcount: *mut u32, ppalglist: *mut *mut NCryptAlgorithmName, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptEnumAlgorithms(hprovider : NCRYPT_PROV_HANDLE, dwalgoperations : NCRYPT_OPERATION, pdwalgcount : *mut u32, ppalglist : *mut *mut NCryptAlgorithmName, dwflags : u32) -> windows_core::HRESULT); - NCryptEnumAlgorithms(hprovider.param().abi(), core::mem::transmute(dwalgoperations), core::mem::transmute(pdwalgcount), core::mem::transmute(ppalglist), core::mem::transmute(dwflags)).ok() + NCryptEnumAlgorithms(core::mem::transmute(hprovider), core::mem::transmute(dwalgoperations), core::mem::transmute(pdwalgcount), core::mem::transmute(ppalglist), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptEnumKeys(hprovider: P0, pszscope: P1, ppkeyname: *mut *mut NCryptKeyName, ppenumstate: *mut *mut core::ffi::c_void, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> +pub unsafe fn NCryptEnumKeys(hprovider: NCRYPT_PROV_HANDLE, pszscope: P1, ppkeyname: *mut *mut NCryptKeyName, ppenumstate: *mut *mut core::ffi::c_void, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptEnumKeys(hprovider : NCRYPT_PROV_HANDLE, pszscope : windows_core::PCWSTR, ppkeyname : *mut *mut NCryptKeyName, ppenumstate : *mut *mut core::ffi::c_void, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptEnumKeys(hprovider.param().abi(), pszscope.param().abi(), core::mem::transmute(ppkeyname), core::mem::transmute(ppenumstate), core::mem::transmute(dwflags)).ok() + NCryptEnumKeys(core::mem::transmute(hprovider), pszscope.param().abi(), core::mem::transmute(ppkeyname), core::mem::transmute(ppenumstate), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn NCryptEnumStorageProviders(pdwprovidercount: *mut u32, ppproviderlist: *mut *mut NCryptProviderName, dwflags: u32) -> windows_core::Result<()> { @@ -2559,22 +2378,17 @@ pub unsafe fn NCryptEnumStorageProviders(pdwprovidercount: *mut u32, ppproviderl NCryptEnumStorageProviders(core::mem::transmute(pdwprovidercount), core::mem::transmute(ppproviderlist), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptExportKey(hkey: P0, hexportkey: P1, pszblobtype: P2, pparameterlist: Option<*const BCryptBufferDesc>, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> +pub unsafe fn NCryptExportKey(hkey: NCRYPT_KEY_HANDLE, hexportkey: Option, pszblobtype: P2, pparameterlist: Option<*const BCryptBufferDesc>, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, 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(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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + NCryptExportKey(core::mem::transmute(hkey), core::mem::transmute(hexportkey.unwrap_or(core::mem::zeroed())), pszblobtype.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptFinalizeKey(hkey: P0, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptFinalizeKey(hkey: NCRYPT_KEY_HANDLE, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptFinalizeKey(hkey : NCRYPT_KEY_HANDLE, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptFinalizeKey(hkey.param().abi(), core::mem::transmute(dwflags)).ok() + NCryptFinalizeKey(core::mem::transmute(hkey), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn NCryptFreeBuffer(pvinput: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -2582,81 +2396,61 @@ pub unsafe fn NCryptFreeBuffer(pvinput: *mut core::ffi::c_void) -> windows_core: NCryptFreeBuffer(core::mem::transmute(pvinput)).ok() } #[inline] -pub unsafe fn NCryptFreeObject(hobject: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptFreeObject(hobject: NCRYPT_HANDLE) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptFreeObject(hobject : NCRYPT_HANDLE) -> windows_core::HRESULT); - NCryptFreeObject(hobject.param().abi()).ok() + NCryptFreeObject(core::mem::transmute(hobject)).ok() } #[inline] -pub unsafe fn NCryptGetProperty(hobject: P0, pszproperty: P1, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: super::OBJECT_SECURITY_INFORMATION) -> windows_core::Result<()> +pub unsafe fn NCryptGetProperty(hobject: NCRYPT_HANDLE, pszproperty: P1, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: super::OBJECT_SECURITY_INFORMATION) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptGetProperty(hobject : NCRYPT_HANDLE, pszproperty : windows_core::PCWSTR, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : super:: OBJECT_SECURITY_INFORMATION) -> windows_core::HRESULT); - NCryptGetProperty(hobject.param().abi(), pszproperty.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + NCryptGetProperty(core::mem::transmute(hobject), pszproperty.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptGetProtectionDescriptorInfo(hdescriptor: P0, pmempara: Option<*const NCRYPT_ALLOC_PARA>, dwinfotype: u32, ppvinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptGetProtectionDescriptorInfo(hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE, pmempara: Option<*const NCRYPT_ALLOC_PARA>, dwinfotype: u32, ppvinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(dwinfotype), core::mem::transmute(ppvinfo)).ok() + NCryptGetProtectionDescriptorInfo(core::mem::transmute(hdescriptor), core::mem::transmute(pmempara.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinfotype), core::mem::transmute(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<()> +pub unsafe fn NCryptImportKey(hprovider: NCRYPT_PROV_HANDLE, himportkey: Option, pszblobtype: P2, pparameterlist: Option<*const BCryptBufferDesc>, phkey: *mut NCRYPT_KEY_HANDLE, pbdata: &[u8], dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(phkey), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() + NCryptImportKey(core::mem::transmute(hprovider), core::mem::transmute(himportkey.unwrap_or(core::mem::zeroed())), pszblobtype.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkey), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptIsAlgSupported(hprovider: P0, pszalgid: P1, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn NCryptIsAlgSupported(hprovider: NCRYPT_PROV_HANDLE, pszalgid: P1, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptIsAlgSupported(hprovider : NCRYPT_PROV_HANDLE, pszalgid : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - NCryptIsAlgSupported(hprovider.param().abi(), pszalgid.param().abi(), core::mem::transmute(dwflags)).ok() + NCryptIsAlgSupported(core::mem::transmute(hprovider), pszalgid.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptIsKeyHandle(hkey: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptIsKeyHandle(hkey: NCRYPT_KEY_HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("ncrypt.dll" "system" fn NCryptIsKeyHandle(hkey : NCRYPT_KEY_HANDLE) -> super::super::Foundation:: BOOL); - NCryptIsKeyHandle(hkey.param().abi()) + NCryptIsKeyHandle(core::mem::transmute(hkey)) } #[inline] -pub unsafe fn NCryptKeyDerivation(hkey: P0, pparameterlist: Option<*const BCryptBufferDesc>, pbderivedkey: &mut [u8], pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptKeyDerivation(hkey: NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, pbderivedkey: &mut [u8], pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + NCryptKeyDerivation(core::mem::transmute(hkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptNotifyChangeKey(hprovider: P0, phevent: *mut super::super::Foundation::HANDLE, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptNotifyChangeKey(hprovider: NCRYPT_PROV_HANDLE, phevent: *mut super::super::Foundation::HANDLE, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptNotifyChangeKey(hprovider : NCRYPT_PROV_HANDLE, phevent : *mut super::super::Foundation:: HANDLE, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptNotifyChangeKey(hprovider.param().abi(), core::mem::transmute(phevent), core::mem::transmute(dwflags)).ok() + NCryptNotifyChangeKey(core::mem::transmute(hprovider), core::mem::transmute(phevent), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptOpenKey(hprovider: P0, phkey: *mut NCRYPT_KEY_HANDLE, pszkeyname: P2, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> +pub unsafe fn NCryptOpenKey(hprovider: NCRYPT_PROV_HANDLE, phkey: *mut NCRYPT_KEY_HANDLE, pszkeyname: P2, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptOpenKey(hprovider : NCRYPT_PROV_HANDLE, phkey : *mut NCRYPT_KEY_HANDLE, pszkeyname : windows_core::PCWSTR, dwlegacykeyspec : CERT_KEY_SPEC, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptOpenKey(hprovider.param().abi(), core::mem::transmute(phkey), pszkeyname.param().abi(), core::mem::transmute(dwlegacykeyspec), core::mem::transmute(dwflags)).ok() + NCryptOpenKey(core::mem::transmute(hprovider), core::mem::transmute(phkey), pszkeyname.param().abi(), core::mem::transmute(dwlegacykeyspec), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn NCryptOpenStorageProvider(phprovider: *mut NCRYPT_PROV_HANDLE, pszprovidername: P1, dwflags: u32) -> windows_core::Result<()> @@ -2667,21 +2461,17 @@ where NCryptOpenStorageProvider(core::mem::transmute(phprovider), pszprovidername.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptProtectSecret(hdescriptor: P0, dwflags: u32, pbdata: &[u8], pmempara: Option<*const NCRYPT_ALLOC_PARA>, hwnd: P5, ppbprotectedblob: *mut *mut u8, pcbprotectedblob: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn NCryptProtectSecret(hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE, dwflags: u32, pbdata: &[u8], pmempara: Option<*const NCRYPT_ALLOC_PARA>, hwnd: Option, ppbprotectedblob: *mut *mut u8, pcbprotectedblob: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dwflags), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(pmempara.unwrap_or(core::ptr::null())), hwnd.param().abi(), core::mem::transmute(ppbprotectedblob), core::mem::transmute(pcbprotectedblob)).ok() + NCryptProtectSecret(core::mem::transmute(hdescriptor), core::mem::transmute(dwflags), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(pmempara.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppbprotectedblob), core::mem::transmute(pcbprotectedblob)).ok() } #[inline] -pub unsafe fn NCryptQueryProtectionDescriptorName(pwszname: P0, pwszdescriptorstring: windows_core::PWSTR, pcdescriptorstring: *mut usize, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn NCryptQueryProtectionDescriptorName(pwszname: P0, pwszdescriptorstring: Option, pcdescriptorstring: *mut usize, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptQueryProtectionDescriptorName(pwszname : windows_core::PCWSTR, pwszdescriptorstring : windows_core::PWSTR, pcdescriptorstring : *mut usize, dwflags : u32) -> windows_core::HRESULT); - NCryptQueryProtectionDescriptorName(pwszname.param().abi(), core::mem::transmute(pwszdescriptorstring), core::mem::transmute(pcdescriptorstring), core::mem::transmute(dwflags)).ok() + NCryptQueryProtectionDescriptorName(pwszname.param().abi(), core::mem::transmute(pwszdescriptorstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcdescriptorstring), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn NCryptRegisterProtectionDescriptorName(pwszname: P0, pwszdescriptorstring: P1, dwflags: u32) -> windows_core::Result<()> @@ -2693,123 +2483,89 @@ where NCryptRegisterProtectionDescriptorName(pwszname.param().abi(), pwszdescriptorstring.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptSecretAgreement(hprivkey: P0, hpubkey: P1, phagreedsecret: *mut NCRYPT_SECRET_HANDLE, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NCryptSecretAgreement(hprivkey: NCRYPT_KEY_HANDLE, hpubkey: NCRYPT_KEY_HANDLE, phagreedsecret: *mut NCRYPT_SECRET_HANDLE, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptSecretAgreement(hprivkey : NCRYPT_KEY_HANDLE, hpubkey : NCRYPT_KEY_HANDLE, phagreedsecret : *mut NCRYPT_SECRET_HANDLE, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptSecretAgreement(hprivkey.param().abi(), hpubkey.param().abi(), core::mem::transmute(phagreedsecret), core::mem::transmute(dwflags)).ok() + NCryptSecretAgreement(core::mem::transmute(hprivkey), core::mem::transmute(hpubkey), core::mem::transmute(phagreedsecret), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptSetProperty(hobject: P0, pszproperty: P1, pbinput: &[u8], dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> +pub unsafe fn NCryptSetProperty(hobject: NCRYPT_HANDLE, pszproperty: P1, pbinput: &[u8], dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptSetProperty(hobject : NCRYPT_HANDLE, pszproperty : windows_core::PCWSTR, pbinput : *const u8, cbinput : u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptSetProperty(hobject.param().abi(), pszproperty.param().abi(), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() + NCryptSetProperty(core::mem::transmute(hobject), pszproperty.param().abi(), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptSignHash(hkey: P0, ppaddinginfo: Option<*const core::ffi::c_void>, pbhashvalue: &[u8], pbsignature: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptSignHash(hkey: NCRYPT_KEY_HANDLE, ppaddinginfo: Option<*const core::ffi::c_void>, pbhashvalue: &[u8], pbsignature: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> { 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(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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + NCryptSignHash(core::mem::transmute(hkey), core::mem::transmute(ppaddinginfo.unwrap_or(core::mem::zeroed())), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn NCryptStreamClose(hstream: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptStreamClose(hstream: super::NCRYPT_STREAM_HANDLE) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptStreamClose(hstream : super:: NCRYPT_STREAM_HANDLE) -> windows_core::HRESULT); - NCryptStreamClose(hstream.param().abi()).ok() + NCryptStreamClose(core::mem::transmute(hstream)).ok() } #[inline] -pub unsafe fn NCryptStreamOpenToProtect(hdescriptor: P0, dwflags: u32, hwnd: P2, pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO) -> windows_core::Result -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn NCryptStreamOpenToProtect(hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE, dwflags: u32, hwnd: Option, pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO) -> windows_core::Result { windows_targets::link!("ncrypt.dll" "system" fn NCryptStreamOpenToProtect(hdescriptor : super:: NCRYPT_DESCRIPTOR_HANDLE, dwflags : u32, hwnd : super::super::Foundation:: HWND, pstreaminfo : *const NCRYPT_PROTECT_STREAM_INFO, phstream : *mut super:: NCRYPT_STREAM_HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - NCryptStreamOpenToProtect(hdescriptor.param().abi(), core::mem::transmute(dwflags), hwnd.param().abi(), core::mem::transmute(pstreaminfo), &mut result__).map(|| core::mem::transmute(result__)) + NCryptStreamOpenToProtect(core::mem::transmute(hdescriptor), core::mem::transmute(dwflags), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pstreaminfo), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn NCryptStreamOpenToUnprotect(pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO, dwflags: u32, hwnd: P2) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn NCryptStreamOpenToUnprotect(pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO, dwflags: u32, hwnd: Option) -> windows_core::Result { windows_targets::link!("ncrypt.dll" "system" fn NCryptStreamOpenToUnprotect(pstreaminfo : *const NCRYPT_PROTECT_STREAM_INFO, dwflags : u32, hwnd : super::super::Foundation:: HWND, phstream : *mut super:: NCRYPT_STREAM_HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - NCryptStreamOpenToUnprotect(core::mem::transmute(pstreaminfo), core::mem::transmute(dwflags), hwnd.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + NCryptStreamOpenToUnprotect(core::mem::transmute(pstreaminfo), core::mem::transmute(dwflags), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn NCryptStreamOpenToUnprotectEx(pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO_EX, dwflags: u32, hwnd: P2) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn NCryptStreamOpenToUnprotectEx(pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO_EX, dwflags: u32, hwnd: Option) -> windows_core::Result { windows_targets::link!("ncrypt.dll" "system" fn NCryptStreamOpenToUnprotectEx(pstreaminfo : *const NCRYPT_PROTECT_STREAM_INFO_EX, dwflags : u32, hwnd : super::super::Foundation:: HWND, phstream : *mut super:: NCRYPT_STREAM_HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - NCryptStreamOpenToUnprotectEx(core::mem::transmute(pstreaminfo), core::mem::transmute(dwflags), hwnd.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + NCryptStreamOpenToUnprotectEx(core::mem::transmute(pstreaminfo), core::mem::transmute(dwflags), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn NCryptStreamUpdate(hstream: P0, pbdata: &[u8], ffinal: P3) -> windows_core::Result<()> +pub unsafe fn NCryptStreamUpdate(hstream: super::NCRYPT_STREAM_HANDLE, pbdata: &[u8], ffinal: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptStreamUpdate(hstream : super:: NCRYPT_STREAM_HANDLE, pbdata : *const u8, cbdata : usize, ffinal : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - NCryptStreamUpdate(hstream.param().abi(), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), ffinal.param().abi()).ok() + NCryptStreamUpdate(core::mem::transmute(hstream), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), ffinal.param().abi()).ok() } #[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<()> { +pub unsafe fn NCryptTranslateHandle(phprovider: Option<*mut NCRYPT_PROV_HANDLE>, phkey: *mut NCRYPT_KEY_HANDLE, hlegacyprov: usize, hlegacykey: Option, dwlegacykeyspec: Option, 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(core::ptr::null_mut())), core::mem::transmute(phkey), core::mem::transmute(hlegacyprov), core::mem::transmute(hlegacykey), core::mem::transmute(dwlegacykeyspec), core::mem::transmute(dwflags)).ok() + NCryptTranslateHandle(core::mem::transmute(phprovider.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkey), core::mem::transmute(hlegacyprov), core::mem::transmute(hlegacykey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwlegacykeyspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P5, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn NCryptUnprotectSecret(phdescriptor: Option<*mut super::NCRYPT_DESCRIPTOR_HANDLE>, dwflags: NCRYPT_FLAGS, pbprotectedblob: &[u8], pmempara: Option<*const NCRYPT_ALLOC_PARA>, hwnd: Option, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(dwflags), core::mem::transmute(pbprotectedblob.as_ptr()), pbprotectedblob.len().try_into().unwrap(), core::mem::transmute(pmempara.unwrap_or(core::ptr::null())), hwnd.param().abi(), core::mem::transmute(ppbdata), core::mem::transmute(pcbdata)).ok() + NCryptUnprotectSecret(core::mem::transmute(phdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pbprotectedblob.as_ptr()), pbprotectedblob.len().try_into().unwrap(), core::mem::transmute(pmempara.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppbdata), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NCryptVerifyClaim(hsubjectkey: NCRYPT_KEY_HANDLE, hauthoritykey: Option, dwclaimtype: u32, pparameterlist: Option<*const BCryptBufferDesc>, pbclaimblob: &[u8], poutput: *mut BCryptBufferDesc, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dwclaimtype), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(pbclaimblob.as_ptr()), pbclaimblob.len().try_into().unwrap(), core::mem::transmute(poutput), core::mem::transmute(dwflags)).ok() + NCryptVerifyClaim(core::mem::transmute(hsubjectkey), core::mem::transmute(hauthoritykey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwclaimtype), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbclaimblob.as_ptr()), pbclaimblob.len().try_into().unwrap(), core::mem::transmute(poutput), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NCryptVerifySignature(hkey: NCRYPT_KEY_HANDLE, ppaddinginfo: Option<*const core::ffi::c_void>, pbhashvalue: &[u8], pbsignature: &[u8], dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> { 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(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(), core::mem::transmute(dwflags)).ok() + NCryptVerifySignature(core::mem::transmute(hkey), core::mem::transmute(ppaddinginfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn PFXExportCertStore(hstore: P0, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P2, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn PFXExportCertStore(hstore: HCERTSTORE, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P2, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn PFXExportCertStore(hstore : HCERTSTORE, ppfx : *mut CRYPT_INTEGER_BLOB, szpassword : windows_core::PCWSTR, dwflags : u32) -> super::super::Foundation:: BOOL); - PFXExportCertStore(hstore.param().abi(), core::mem::transmute(ppfx), szpassword.param().abi(), core::mem::transmute(dwflags)).ok() + PFXExportCertStore(core::mem::transmute(hstore), core::mem::transmute(ppfx), szpassword.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn PFXExportCertStoreEx(hstore: P0, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P2, pvpara: *const core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn PFXExportCertStoreEx(hstore: HCERTSTORE, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P2, pvpara: *const core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn PFXExportCertStoreEx(hstore : HCERTSTORE, ppfx : *mut CRYPT_INTEGER_BLOB, szpassword : windows_core::PCWSTR, pvpara : *const core::ffi::c_void, dwflags : u32) -> super::super::Foundation:: BOOL); - PFXExportCertStoreEx(hstore.param().abi(), core::mem::transmute(ppfx), szpassword.param().abi(), core::mem::transmute(pvpara), core::mem::transmute(dwflags)).ok() + PFXExportCertStoreEx(core::mem::transmute(hstore), core::mem::transmute(ppfx), szpassword.param().abi(), core::mem::transmute(pvpara), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn PFXImportCertStore(ppfx: *const CRYPT_INTEGER_BLOB, szpassword: P1, dwflags: CRYPT_KEY_FLAGS) -> windows_core::Result @@ -2862,7 +2618,7 @@ where P4: 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(core::mem::transmute(psubjectinfo), core::mem::transmute(psignercert), core::mem::transmute(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() + SignerSign(core::mem::transmute(psubjectinfo), core::mem::transmute(psignercert), core::mem::transmute(psignatureinfo), core::mem::transmute(pproviderinfo.unwrap_or(core::mem::zeroed())), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::mem::zeroed())), core::mem::transmute(psipdata.unwrap_or(core::mem::zeroed()))).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: P5, psrequest: Option<*const CRYPT_ATTRIBUTES>, psipdata: Option<*const core::ffi::c_void>) -> windows_core::Result<*mut SIGNER_CONTEXT> @@ -2871,10 +2627,10 @@ 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(core::mem::transmute(dwflags), core::mem::transmute(psubjectinfo), core::mem::transmute(psignercert), core::mem::transmute(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(|| core::mem::transmute(result__)) + SignerSignEx(core::mem::transmute(dwflags), core::mem::transmute(psubjectinfo), core::mem::transmute(psignercert), core::mem::transmute(psignatureinfo), core::mem::transmute(pproviderinfo.unwrap_or(core::mem::zeroed())), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::mem::zeroed())), core::mem::transmute(psipdata.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(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: P6, pwszhttptimestamp: P7, 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<()> +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: Option, psztimestampalgorithmoid: P6, pwszhttptimestamp: P7, 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<()> where P6: windows_core::Param, P7: windows_core::Param, @@ -2885,20 +2641,20 @@ where core::mem::transmute(psubjectinfo), core::mem::transmute(psignercert), core::mem::transmute(psignatureinfo), - core::mem::transmute(pproviderinfo.unwrap_or(core::ptr::null())), - core::mem::transmute(dwtimestampflags), + core::mem::transmute(pproviderinfo.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwtimestampflags.unwrap_or(core::mem::zeroed())), psztimestampalgorithmoid.param().abi(), pwszhttptimestamp.param().abi(), - core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), - core::mem::transmute(psipdata.unwrap_or(core::ptr::null())), + core::mem::transmute(psrequest.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psipdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsignercontext), - core::mem::transmute(pcryptopolicy.unwrap_or(core::ptr::null())), - core::mem::transmute(preserved.unwrap_or(core::ptr::null())), + core::mem::transmute(pcryptopolicy.unwrap_or(core::mem::zeroed())), + core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), ) .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: P6, pwszhttptimestamp: P7, 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<()> +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: Option, psztimestampalgorithmoid: P6, pwszhttptimestamp: P7, 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<()> where P6: windows_core::Param, P7: windows_core::Param, @@ -2909,16 +2665,16 @@ where core::mem::transmute(psubjectinfo), core::mem::transmute(psignercert), core::mem::transmute(psignatureinfo), - core::mem::transmute(pproviderinfo.unwrap_or(core::ptr::null())), - core::mem::transmute(dwtimestampflags), + core::mem::transmute(pproviderinfo.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwtimestampflags.unwrap_or(core::mem::zeroed())), psztimestampalgorithmoid.param().abi(), pwszhttptimestamp.param().abi(), - core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), - core::mem::transmute(psipdata.unwrap_or(core::ptr::null())), + core::mem::transmute(psrequest.unwrap_or(core::mem::zeroed())), + core::mem::transmute(psipdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsignercontext), - 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())), + core::mem::transmute(pcryptopolicy.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdigestsigninfo.unwrap_or(core::mem::zeroed())), + core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -2928,25 +2684,25 @@ where P1: 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(core::mem::transmute(psubjectinfo), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), core::mem::transmute(psipdata.unwrap_or(core::ptr::null()))).ok() + SignerTimeStamp(core::mem::transmute(psubjectinfo), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::mem::zeroed())), core::mem::transmute(psipdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SignerTimeStampEx(dwflags: u32, psubjectinfo: *const SIGNER_SUBJECT_INFO, pwszhttptimestamp: P2, psrequest: *const CRYPT_ATTRIBUTES, psipdata: *const core::ffi::c_void) -> windows_core::Result<*mut SIGNER_CONTEXT> +pub unsafe fn SignerTimeStampEx(dwflags: Option, psubjectinfo: *const SIGNER_SUBJECT_INFO, pwszhttptimestamp: P2, psrequest: *const CRYPT_ATTRIBUTES, psipdata: *const core::ffi::c_void) -> windows_core::Result<*mut SIGNER_CONTEXT> where P2: windows_core::Param, { windows_targets::link!("mssign32.dll" "system" fn SignerTimeStampEx(dwflags : u32, psubjectinfo : *const SIGNER_SUBJECT_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(); - SignerTimeStampEx(core::mem::transmute(dwflags), core::mem::transmute(psubjectinfo), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest), core::mem::transmute(psipdata), &mut result__).map(|| core::mem::transmute(result__)) + SignerTimeStampEx(core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(psubjectinfo), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest), core::mem::transmute(psipdata), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn SignerTimeStampEx2(dwflags: SIGNER_TIMESTAMP_FLAGS, psubjectinfo: *const SIGNER_SUBJECT_INFO, pwszhttptimestamp: P2, dwalgid: ALG_ID, psrequest: *const CRYPT_ATTRIBUTES, psipdata: *const core::ffi::c_void) -> windows_core::Result<*mut SIGNER_CONTEXT> +pub unsafe fn SignerTimeStampEx2(dwflags: Option, psubjectinfo: *const SIGNER_SUBJECT_INFO, pwszhttptimestamp: P2, dwalgid: ALG_ID, psrequest: *const CRYPT_ATTRIBUTES, psipdata: *const core::ffi::c_void) -> windows_core::Result<*mut SIGNER_CONTEXT> where P2: windows_core::Param, { windows_targets::link!("mssign32.dll" "system" fn SignerTimeStampEx2(dwflags : SIGNER_TIMESTAMP_FLAGS, psubjectinfo : *const SIGNER_SUBJECT_INFO, pwszhttptimestamp : windows_core::PCWSTR, dwalgid : ALG_ID, psrequest : *const CRYPT_ATTRIBUTES, psipdata : *const core::ffi::c_void, ppsignercontext : *mut *mut SIGNER_CONTEXT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SignerTimeStampEx2(core::mem::transmute(dwflags), core::mem::transmute(psubjectinfo), pwszhttptimestamp.param().abi(), core::mem::transmute(dwalgid), core::mem::transmute(psrequest), core::mem::transmute(psipdata), &mut result__).map(|| core::mem::transmute(result__)) + SignerTimeStampEx2(core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(psubjectinfo), pwszhttptimestamp.param().abi(), core::mem::transmute(dwalgid), core::mem::transmute(psrequest), core::mem::transmute(psipdata), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn SignerTimeStampEx3(dwflags: SIGNER_TIMESTAMP_FLAGS, dwindex: u32, psubjectinfo: *const SIGNER_SUBJECT_INFO, pwszhttptimestamp: P3, pszalgorithmoid: P4, 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<()> @@ -2955,140 +2711,88 @@ where P4: 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(core::mem::transmute(dwflags), core::mem::transmute(dwindex), core::mem::transmute(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())), core::mem::transmute(ppsignercontext), core::mem::transmute(pcryptopolicy.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))).ok() + SignerTimeStampEx3(core::mem::transmute(dwflags), core::mem::transmute(dwindex), core::mem::transmute(psubjectinfo), pwszhttptimestamp.param().abi(), pszalgorithmoid.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::mem::zeroed())), core::mem::transmute(psipdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsignercontext), core::mem::transmute(pcryptopolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SslChangeNotify(hevent: P0, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslChangeNotify(hevent: super::super::Foundation::HANDLE, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslChangeNotify(hevent : super::super::Foundation:: HANDLE, dwflags : u32) -> windows_core::HRESULT); - SslChangeNotify(hevent.param().abi(), core::mem::transmute(dwflags)).ok() + SslChangeNotify(core::mem::transmute(hevent), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslComputeClientAuthHash(hsslprovider: P0, hmasterkey: P1, hhandshakehash: P2, pszalgid: P3, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SslComputeClientAuthHash(hsslprovider: NCRYPT_PROV_HANDLE, hmasterkey: NCRYPT_KEY_HANDLE, hhandshakehash: NCRYPT_HASH_HANDLE, pszalgid: P3, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslComputeClientAuthHash(hsslprovider : NCRYPT_PROV_HANDLE, hmasterkey : NCRYPT_KEY_HANDLE, hhandshakehash : NCRYPT_HASH_HANDLE, pszalgid : windows_core::PCWSTR, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - SslComputeClientAuthHash(hsslprovider.param().abi(), hmasterkey.param().abi(), hhandshakehash.param().abi(), pszalgid.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + SslComputeClientAuthHash(core::mem::transmute(hsslprovider), core::mem::transmute(hmasterkey), core::mem::transmute(hhandshakehash), pszalgid.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslComputeEapKeyBlock(hsslprovider: P0, hmasterkey: P1, pbrandoms: &[u8], pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslComputeEapKeyBlock(hsslprovider: NCRYPT_PROV_HANDLE, hmasterkey: NCRYPT_KEY_HANDLE, pbrandoms: &[u8], pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslComputeEapKeyBlock(hsslprovider : NCRYPT_PROV_HANDLE, hmasterkey : NCRYPT_KEY_HANDLE, pbrandoms : *const u8, cbrandoms : u32, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - SslComputeEapKeyBlock(hsslprovider.param().abi(), hmasterkey.param().abi(), core::mem::transmute(pbrandoms.as_ptr()), pbrandoms.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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + SslComputeEapKeyBlock(core::mem::transmute(hsslprovider), core::mem::transmute(hmasterkey), core::mem::transmute(pbrandoms.as_ptr()), pbrandoms.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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslComputeFinishedHash(hsslprovider: P0, hmasterkey: P1, hhandshakehash: P2, pboutput: &mut [u8], dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SslComputeFinishedHash(hsslprovider: NCRYPT_PROV_HANDLE, hmasterkey: NCRYPT_KEY_HANDLE, hhandshakehash: NCRYPT_HASH_HANDLE, pboutput: &mut [u8], dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslComputeFinishedHash(hsslprovider : NCRYPT_PROV_HANDLE, hmasterkey : NCRYPT_KEY_HANDLE, hhandshakehash : NCRYPT_HASH_HANDLE, pboutput : *mut u8, cboutput : u32, dwflags : u32) -> windows_core::HRESULT); - SslComputeFinishedHash(hsslprovider.param().abi(), hmasterkey.param().abi(), hhandshakehash.param().abi(), core::mem::transmute(pboutput.as_ptr()), pboutput.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() + SslComputeFinishedHash(core::mem::transmute(hsslprovider), core::mem::transmute(hmasterkey), core::mem::transmute(hhandshakehash), core::mem::transmute(pboutput.as_ptr()), pboutput.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslComputeSessionHash(hsslprovider: P0, hhandshakehash: P1, dwprotocol: u32, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslComputeSessionHash(hsslprovider: NCRYPT_PROV_HANDLE, hhandshakehash: NCRYPT_HASH_HANDLE, dwprotocol: u32, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslComputeSessionHash(hsslprovider : NCRYPT_PROV_HANDLE, hhandshakehash : NCRYPT_HASH_HANDLE, dwprotocol : u32, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - SslComputeSessionHash(hsslprovider.param().abi(), hhandshakehash.param().abi(), core::mem::transmute(dwprotocol), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + SslComputeSessionHash(core::mem::transmute(hsslprovider), core::mem::transmute(hhandshakehash), core::mem::transmute(dwprotocol), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslCreateClientAuthHash(hsslprovider: P0, phhandshakehash: *mut NCRYPT_HASH_HANDLE, dwprotocol: u32, dwciphersuite: u32, pszhashalgid: P4, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SslCreateClientAuthHash(hsslprovider: NCRYPT_PROV_HANDLE, phhandshakehash: *mut NCRYPT_HASH_HANDLE, dwprotocol: u32, dwciphersuite: u32, pszhashalgid: P4, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslCreateClientAuthHash(hsslprovider : NCRYPT_PROV_HANDLE, phhandshakehash : *mut NCRYPT_HASH_HANDLE, dwprotocol : u32, dwciphersuite : u32, pszhashalgid : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - SslCreateClientAuthHash(hsslprovider.param().abi(), core::mem::transmute(phhandshakehash), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), pszhashalgid.param().abi(), core::mem::transmute(dwflags)).ok() + SslCreateClientAuthHash(core::mem::transmute(hsslprovider), core::mem::transmute(phhandshakehash), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), pszhashalgid.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslCreateEphemeralKey(hsslprovider: P0, phephemeralkey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, dwkeybitlen: u32, pbparams: Option<&[u8]>, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslCreateEphemeralKey(hsslprovider: NCRYPT_PROV_HANDLE, phephemeralkey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, dwkeybitlen: u32, pbparams: Option<&[u8]>, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslCreateEphemeralKey(hsslprovider : NCRYPT_PROV_HANDLE, phephemeralkey : *mut NCRYPT_KEY_HANDLE, dwprotocol : u32, dwciphersuite : u32, dwkeytype : u32, dwkeybitlen : u32, pbparams : *const u8, cbparams : u32, dwflags : u32) -> windows_core::HRESULT); - SslCreateEphemeralKey(hsslprovider.param().abi(), core::mem::transmute(phephemeralkey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwkeytype), core::mem::transmute(dwkeybitlen), core::mem::transmute(pbparams.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbparams.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwflags)).ok() + SslCreateEphemeralKey(core::mem::transmute(hsslprovider), core::mem::transmute(phephemeralkey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwkeytype), core::mem::transmute(dwkeybitlen), core::mem::transmute(pbparams.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbparams.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslCreateHandshakeHash(hsslprovider: P0, phhandshakehash: *mut NCRYPT_HASH_HANDLE, dwprotocol: u32, dwciphersuite: u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslCreateHandshakeHash(hsslprovider: NCRYPT_PROV_HANDLE, phhandshakehash: *mut NCRYPT_HASH_HANDLE, dwprotocol: u32, dwciphersuite: u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslCreateHandshakeHash(hsslprovider : NCRYPT_PROV_HANDLE, phhandshakehash : *mut NCRYPT_HASH_HANDLE, dwprotocol : u32, dwciphersuite : u32, dwflags : u32) -> windows_core::HRESULT); - SslCreateHandshakeHash(hsslprovider.param().abi(), core::mem::transmute(phhandshakehash), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwflags)).ok() + SslCreateHandshakeHash(core::mem::transmute(hsslprovider), core::mem::transmute(phhandshakehash), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslDecrementProviderReferenceCount(hsslprovider: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslDecrementProviderReferenceCount(hsslprovider: NCRYPT_PROV_HANDLE) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslDecrementProviderReferenceCount(hsslprovider : NCRYPT_PROV_HANDLE) -> windows_core::HRESULT); - SslDecrementProviderReferenceCount(hsslprovider.param().abi()).ok() + SslDecrementProviderReferenceCount(core::mem::transmute(hsslprovider)).ok() } #[inline] -pub unsafe fn SslDecryptPacket(hsslprovider: P0, hkey: P1, pbinput: &[u8], pboutput: Option<&mut [u8]>, pcbresult: *mut u32, sequencenumber: u64, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslDecryptPacket(hsslprovider: NCRYPT_PROV_HANDLE, hkey: NCRYPT_KEY_HANDLE, pbinput: &[u8], pboutput: Option<&mut [u8]>, pcbresult: *mut u32, sequencenumber: u64, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslDecryptPacket(hsslprovider : NCRYPT_PROV_HANDLE, hkey : NCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, sequencenumber : u64, dwflags : u32) -> windows_core::HRESULT); - SslDecryptPacket(hsslprovider.param().abi(), hkey.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(sequencenumber), core::mem::transmute(dwflags)).ok() + SslDecryptPacket(core::mem::transmute(hsslprovider), core::mem::transmute(hkey), 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()), core::mem::transmute(pcbresult), core::mem::transmute(sequencenumber), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslDuplicateTranscriptHash(hsslprovider: P0, htranscripthash: P1, phtranscripthash: *mut NCRYPT_HASH_HANDLE, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslDuplicateTranscriptHash(hsslprovider: NCRYPT_PROV_HANDLE, htranscripthash: NCRYPT_HASH_HANDLE, phtranscripthash: *mut NCRYPT_HASH_HANDLE, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslDuplicateTranscriptHash(hsslprovider : NCRYPT_PROV_HANDLE, htranscripthash : NCRYPT_HASH_HANDLE, phtranscripthash : *mut NCRYPT_HASH_HANDLE, dwflags : u32) -> windows_core::HRESULT); - SslDuplicateTranscriptHash(hsslprovider.param().abi(), htranscripthash.param().abi(), core::mem::transmute(phtranscripthash), core::mem::transmute(dwflags)).ok() + SslDuplicateTranscriptHash(core::mem::transmute(hsslprovider), core::mem::transmute(htranscripthash), core::mem::transmute(phtranscripthash), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslEncryptPacket(hsslprovider: P0, hkey: P1, pbinput: &[u8], pboutput: Option<&mut [u8]>, pcbresult: *mut u32, sequencenumber: u64, dwcontenttype: u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslEncryptPacket(hsslprovider: NCRYPT_PROV_HANDLE, hkey: NCRYPT_KEY_HANDLE, pbinput: &[u8], pboutput: Option<&mut [u8]>, pcbresult: *mut u32, sequencenumber: u64, dwcontenttype: u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslEncryptPacket(hsslprovider : NCRYPT_PROV_HANDLE, hkey : NCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, sequencenumber : u64, dwcontenttype : u32, dwflags : u32) -> windows_core::HRESULT); - SslEncryptPacket(hsslprovider.param().abi(), hkey.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(sequencenumber), core::mem::transmute(dwcontenttype), core::mem::transmute(dwflags)).ok() + SslEncryptPacket(core::mem::transmute(hsslprovider), core::mem::transmute(hkey), 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()), core::mem::transmute(pcbresult), core::mem::transmute(sequencenumber), core::mem::transmute(dwcontenttype), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslEnumCipherSuites(hsslprovider: P0, hprivatekey: P1, ppciphersuite: *mut *mut NCRYPT_SSL_CIPHER_SUITE, ppenumstate: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslEnumCipherSuites(hsslprovider: NCRYPT_PROV_HANDLE, hprivatekey: Option, ppciphersuite: *mut *mut NCRYPT_SSL_CIPHER_SUITE, ppenumstate: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslEnumCipherSuites(hsslprovider : NCRYPT_PROV_HANDLE, hprivatekey : NCRYPT_KEY_HANDLE, ppciphersuite : *mut *mut NCRYPT_SSL_CIPHER_SUITE, ppenumstate : *mut *mut core::ffi::c_void, dwflags : u32) -> windows_core::HRESULT); - SslEnumCipherSuites(hsslprovider.param().abi(), hprivatekey.param().abi(), core::mem::transmute(ppciphersuite), core::mem::transmute(ppenumstate), core::mem::transmute(dwflags)).ok() + SslEnumCipherSuites(core::mem::transmute(hsslprovider), core::mem::transmute(hprivatekey.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppciphersuite), core::mem::transmute(ppenumstate), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslEnumCipherSuitesEx(hsslprovider: P0, hprivatekey: P1, ppciphersuite: *mut *mut NCRYPT_SSL_CIPHER_SUITE_EX, ppenumstate: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslEnumCipherSuitesEx(hsslprovider: NCRYPT_PROV_HANDLE, hprivatekey: Option, ppciphersuite: *mut *mut NCRYPT_SSL_CIPHER_SUITE_EX, ppenumstate: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslEnumCipherSuitesEx(hsslprovider : NCRYPT_PROV_HANDLE, hprivatekey : NCRYPT_KEY_HANDLE, ppciphersuite : *mut *mut NCRYPT_SSL_CIPHER_SUITE_EX, ppenumstate : *mut *mut core::ffi::c_void, dwflags : u32) -> windows_core::HRESULT); - SslEnumCipherSuitesEx(hsslprovider.param().abi(), hprivatekey.param().abi(), core::mem::transmute(ppciphersuite), core::mem::transmute(ppenumstate), core::mem::transmute(dwflags)).ok() + SslEnumCipherSuitesEx(core::mem::transmute(hsslprovider), core::mem::transmute(hprivatekey.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppciphersuite), core::mem::transmute(ppenumstate), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslEnumEccCurves(hsslprovider: P0, pecccurvecount: *mut u32, ppecccurve: *mut *mut NCRYPT_SSL_ECC_CURVE, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslEnumEccCurves(hsslprovider: NCRYPT_PROV_HANDLE, pecccurvecount: *mut u32, ppecccurve: *mut *mut NCRYPT_SSL_ECC_CURVE, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslEnumEccCurves(hsslprovider : NCRYPT_PROV_HANDLE, pecccurvecount : *mut u32, ppecccurve : *mut *mut NCRYPT_SSL_ECC_CURVE, dwflags : u32) -> windows_core::HRESULT); - SslEnumEccCurves(hsslprovider.param().abi(), core::mem::transmute(pecccurvecount), core::mem::transmute(ppecccurve), core::mem::transmute(dwflags)).ok() + SslEnumEccCurves(core::mem::transmute(hsslprovider), core::mem::transmute(pecccurvecount), core::mem::transmute(ppecccurve), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn SslEnumProtocolProviders(pdwprovidercount: *mut u32, ppproviderlist: *mut *mut NCryptProviderName, dwflags: u32) -> windows_core::Result<()> { @@ -3096,83 +2800,52 @@ pub unsafe fn SslEnumProtocolProviders(pdwprovidercount: *mut u32, ppproviderlis SslEnumProtocolProviders(core::mem::transmute(pdwprovidercount), core::mem::transmute(ppproviderlist), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslExpandBinderKey(hsslprovider: P0, hearlykey: P1, phbinderkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslExpandBinderKey(hsslprovider: NCRYPT_PROV_HANDLE, hearlykey: NCRYPT_KEY_HANDLE, phbinderkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(phbinderkey), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExpandBinderKey(core::mem::transmute(hsslprovider), core::mem::transmute(hearlykey), core::mem::transmute(phbinderkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SslExpandExporterMasterKey(hsslprovider: NCRYPT_PROV_HANDLE, hbasekey: NCRYPT_KEY_HANDLE, hhashvalue: NCRYPT_HASH_HANDLE, phexportermasterkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(phexportermasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExpandExporterMasterKey(core::mem::transmute(hsslprovider), core::mem::transmute(hbasekey), core::mem::transmute(hhashvalue), core::mem::transmute(phexportermasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslExpandPreSharedKey(hsslprovider: NCRYPT_PROV_HANDLE, hresumptionmasterkey: NCRYPT_KEY_HANDLE, pbticketnonce: Option<&[u8]>, phpresharedkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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()), core::mem::transmute(phpresharedkey), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExpandPreSharedKey(core::mem::transmute(hsslprovider), core::mem::transmute(hresumptionmasterkey), 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()), core::mem::transmute(phpresharedkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SslExpandResumptionMasterKey(hsslprovider: NCRYPT_PROV_HANDLE, hmasterkey: NCRYPT_KEY_HANDLE, hhashvalue: NCRYPT_HASH_HANDLE, phresumptionmasterkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(phresumptionmasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExpandResumptionMasterKey(core::mem::transmute(hsslprovider), core::mem::transmute(hmasterkey), core::mem::transmute(hhashvalue), core::mem::transmute(phresumptionmasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SslExpandTrafficKeys(hsslprovider: NCRYPT_PROV_HANDLE, hbasekey: NCRYPT_KEY_HANDLE, hhashvalue: NCRYPT_HASH_HANDLE, phclienttraffickey: Option<*mut NCRYPT_KEY_HANDLE>, phservertraffickey: Option<*mut NCRYPT_KEY_HANDLE>, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(phservertraffickey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExpandTrafficKeys(core::mem::transmute(hsslprovider), core::mem::transmute(hbasekey), core::mem::transmute(hhashvalue), core::mem::transmute(phclienttraffickey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phservertraffickey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslExpandWriteKey(hsslprovider: NCRYPT_PROV_HANDLE, hbasetraffickey: NCRYPT_KEY_HANDLE, phwritekey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(phwritekey), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExpandWriteKey(core::mem::transmute(hsslprovider), core::mem::transmute(hbasetraffickey), core::mem::transmute(phwritekey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> +pub unsafe fn SslExportKey(hsslprovider: NCRYPT_PROV_HANDLE, hkey: NCRYPT_KEY_HANDLE, pszblobtype: P2, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExportKey(hsslprovider : NCRYPT_PROV_HANDLE, hkey : NCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - SslExportKey(hsslprovider.param().abi(), hkey.param().abi(), pszblobtype.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + SslExportKey(core::mem::transmute(hsslprovider), core::mem::transmute(hkey), pszblobtype.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslExportKeyingMaterial(hsslprovider: P0, hmasterkey: P1, slabel: P2, pbrandoms: Option<&[u8]>, pbcontextvalue: Option<&[u8]>, pboutput: &mut [u8], dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SslExportKeyingMaterial(hsslprovider: NCRYPT_PROV_HANDLE, hmasterkey: NCRYPT_KEY_HANDLE, slabel: P2, pbrandoms: Option<&[u8]>, pbcontextvalue: Option<&[u8]>, pboutput: &mut [u8], dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExportKeyingMaterial(hsslprovider : NCRYPT_PROV_HANDLE, hmasterkey : NCRYPT_KEY_HANDLE, slabel : windows_core::PCSTR, pbrandoms : *const u8, cbrandoms : u32, pbcontextvalue : *const u8, cbcontextvalue : u16, pboutput : *mut u8, cboutput : u32, dwflags : u32) -> windows_core::HRESULT); SslExportKeyingMaterial( - hsslprovider.param().abi(), - hmasterkey.param().abi(), + core::mem::transmute(hsslprovider), + core::mem::transmute(hmasterkey), slabel.param().abi(), core::mem::transmute(pbrandoms.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbrandoms.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -3185,33 +2858,19 @@ where .ok() } #[inline] -pub unsafe fn SslExtractEarlyKey(hsslprovider: P0, hpresharedkey: P1, phearlykey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslExtractEarlyKey(hsslprovider: NCRYPT_PROV_HANDLE, hpresharedkey: Option, phearlykey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(phearlykey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExtractEarlyKey(core::mem::transmute(hsslprovider), core::mem::transmute(hpresharedkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phearlykey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SslExtractHandshakeKey(hsslprovider: NCRYPT_PROV_HANDLE, hprivatekey: NCRYPT_KEY_HANDLE, hpublickey: NCRYPT_KEY_HANDLE, hearlykey: NCRYPT_KEY_HANDLE, phhandshakekey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(phhandshakekey), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExtractHandshakeKey(core::mem::transmute(hsslprovider), core::mem::transmute(hprivatekey), core::mem::transmute(hpublickey), core::mem::transmute(hearlykey), core::mem::transmute(phhandshakekey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslExtractMasterKey(hsslprovider: NCRYPT_PROV_HANDLE, hhandshakekey: NCRYPT_KEY_HANDLE, phmasterkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(phmasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + SslExtractMasterKey(core::mem::transmute(hsslprovider), core::mem::transmute(hhandshakekey), core::mem::transmute(phmasterkey), core::mem::transmute(pparameterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn SslFreeBuffer(pvinput: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -3219,125 +2878,96 @@ pub unsafe fn SslFreeBuffer(pvinput: *mut core::ffi::c_void) -> windows_core::Re SslFreeBuffer(core::mem::transmute(pvinput)).ok() } #[inline] -pub unsafe fn SslFreeObject(hobject: P0, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslFreeObject(hobject: NCRYPT_HANDLE, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslFreeObject(hobject : NCRYPT_HANDLE, dwflags : u32) -> windows_core::HRESULT); - SslFreeObject(hobject.param().abi(), core::mem::transmute(dwflags)).ok() + SslFreeObject(core::mem::transmute(hobject), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslGenerateMasterKey(hsslprovider: P0, hprivatekey: P1, hpublickey: P2, phmasterkey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, pparameterlist: *const BCryptBufferDesc, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SslGenerateMasterKey(hsslprovider: NCRYPT_PROV_HANDLE, hprivatekey: Option, hpublickey: NCRYPT_KEY_HANDLE, phmasterkey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, pparameterlist: *const BCryptBufferDesc, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslGenerateMasterKey(hsslprovider : NCRYPT_PROV_HANDLE, hprivatekey : NCRYPT_KEY_HANDLE, hpublickey : NCRYPT_KEY_HANDLE, phmasterkey : *mut NCRYPT_KEY_HANDLE, dwprotocol : u32, dwciphersuite : u32, pparameterlist : *const BCryptBufferDesc, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - SslGenerateMasterKey(hsslprovider.param().abi(), hprivatekey.param().abi(), hpublickey.param().abi(), core::mem::transmute(phmasterkey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(pparameterlist), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + SslGenerateMasterKey( + core::mem::transmute(hsslprovider), + core::mem::transmute(hprivatekey.unwrap_or(core::mem::zeroed())), + core::mem::transmute(hpublickey), + core::mem::transmute(phmasterkey), + core::mem::transmute(dwprotocol), + core::mem::transmute(dwciphersuite), + core::mem::transmute(pparameterlist), + 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()), + core::mem::transmute(pcbresult), + core::mem::transmute(dwflags), + ) + .ok() } #[inline] -pub unsafe fn SslGeneratePreMasterKey(hsslprovider: P0, hpublickey: P1, phpremasterkey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, pparameterlist: *const BCryptBufferDesc, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslGeneratePreMasterKey(hsslprovider: NCRYPT_PROV_HANDLE, hpublickey: NCRYPT_KEY_HANDLE, phpremasterkey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, pparameterlist: *const BCryptBufferDesc, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslGeneratePreMasterKey(hsslprovider : NCRYPT_PROV_HANDLE, hpublickey : NCRYPT_KEY_HANDLE, phpremasterkey : *mut NCRYPT_KEY_HANDLE, dwprotocol : u32, dwciphersuite : u32, pparameterlist : *const BCryptBufferDesc, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - SslGeneratePreMasterKey(hsslprovider.param().abi(), hpublickey.param().abi(), core::mem::transmute(phpremasterkey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(pparameterlist), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + SslGeneratePreMasterKey(core::mem::transmute(hsslprovider), core::mem::transmute(hpublickey), core::mem::transmute(phpremasterkey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(pparameterlist), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslGenerateSessionKeys(hsslprovider: P0, hmasterkey: P1, phreadkey: *mut NCRYPT_KEY_HANDLE, phwritekey: *mut NCRYPT_KEY_HANDLE, pparameterlist: *const BCryptBufferDesc, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslGenerateSessionKeys(hsslprovider: NCRYPT_PROV_HANDLE, hmasterkey: NCRYPT_KEY_HANDLE, phreadkey: *mut NCRYPT_KEY_HANDLE, phwritekey: *mut NCRYPT_KEY_HANDLE, pparameterlist: *const BCryptBufferDesc, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslGenerateSessionKeys(hsslprovider : NCRYPT_PROV_HANDLE, hmasterkey : NCRYPT_KEY_HANDLE, phreadkey : *mut NCRYPT_KEY_HANDLE, phwritekey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslGenerateSessionKeys(hsslprovider.param().abi(), hmasterkey.param().abi(), core::mem::transmute(phreadkey), core::mem::transmute(phwritekey), core::mem::transmute(pparameterlist), core::mem::transmute(dwflags)).ok() + SslGenerateSessionKeys(core::mem::transmute(hsslprovider), core::mem::transmute(hmasterkey), core::mem::transmute(phreadkey), core::mem::transmute(phwritekey), core::mem::transmute(pparameterlist), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslGetCipherSuitePRFHashAlgorithm(hsslprovider: P0, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, szprfhash: &mut [u16; 64], dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslGetCipherSuitePRFHashAlgorithm(hsslprovider: NCRYPT_PROV_HANDLE, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, szprfhash: &mut [u16; 64], dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslGetCipherSuitePRFHashAlgorithm(hsslprovider : NCRYPT_PROV_HANDLE, dwprotocol : u32, dwciphersuite : u32, dwkeytype : u32, szprfhash : windows_core::PWSTR, dwflags : u32) -> windows_core::HRESULT); - SslGetCipherSuitePRFHashAlgorithm(hsslprovider.param().abi(), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwkeytype), core::mem::transmute(szprfhash.as_ptr()), core::mem::transmute(dwflags)).ok() + SslGetCipherSuitePRFHashAlgorithm(core::mem::transmute(hsslprovider), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwkeytype), core::mem::transmute(szprfhash.as_ptr()), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslGetKeyProperty(hkey: P0, pszproperty: P1, ppboutput: *mut *mut u8, pcboutput: *mut u32, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SslGetKeyProperty(hkey: NCRYPT_KEY_HANDLE, pszproperty: P1, ppboutput: *mut *mut u8, pcboutput: *mut u32, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslGetKeyProperty(hkey : NCRYPT_KEY_HANDLE, pszproperty : windows_core::PCWSTR, ppboutput : *mut *mut u8, pcboutput : *mut u32, dwflags : u32) -> windows_core::HRESULT); - SslGetKeyProperty(hkey.param().abi(), pszproperty.param().abi(), core::mem::transmute(ppboutput), core::mem::transmute(pcboutput), core::mem::transmute(dwflags)).ok() + SslGetKeyProperty(core::mem::transmute(hkey), pszproperty.param().abi(), core::mem::transmute(ppboutput), core::mem::transmute(pcboutput), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslGetProviderProperty(hsslprovider: P0, pszproperty: P1, ppboutput: *mut *mut u8, pcboutput: *mut u32, ppenumstate: Option<*mut *mut core::ffi::c_void>, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SslGetProviderProperty(hsslprovider: NCRYPT_PROV_HANDLE, pszproperty: P1, ppboutput: *mut *mut u8, pcboutput: *mut u32, ppenumstate: Option<*mut *mut core::ffi::c_void>, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(ppboutput), core::mem::transmute(pcboutput), core::mem::transmute(ppenumstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)).ok() + SslGetProviderProperty(core::mem::transmute(hsslprovider), pszproperty.param().abi(), core::mem::transmute(ppboutput), core::mem::transmute(pcboutput), core::mem::transmute(ppenumstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslHashHandshake(hsslprovider: P0, hhandshakehash: P1, pbinput: &[u8], dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslHashHandshake(hsslprovider: NCRYPT_PROV_HANDLE, hhandshakehash: NCRYPT_HASH_HANDLE, pbinput: &[u8], dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslHashHandshake(hsslprovider : NCRYPT_PROV_HANDLE, hhandshakehash : NCRYPT_HASH_HANDLE, pbinput : *const u8, cbinput : u32, dwflags : u32) -> windows_core::HRESULT); - SslHashHandshake(hsslprovider.param().abi(), hhandshakehash.param().abi(), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() + SslHashHandshake(core::mem::transmute(hsslprovider), core::mem::transmute(hhandshakehash), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslImportKey(hsslprovider: P0, phkey: *mut NCRYPT_KEY_HANDLE, pszblobtype: P2, pbkeyblob: &[u8], dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SslImportKey(hsslprovider: NCRYPT_PROV_HANDLE, phkey: *mut NCRYPT_KEY_HANDLE, pszblobtype: P2, pbkeyblob: &[u8], dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslImportKey(hsslprovider : NCRYPT_PROV_HANDLE, phkey : *mut NCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, pbkeyblob : *const u8, cbkeyblob : u32, dwflags : u32) -> windows_core::HRESULT); - SslImportKey(hsslprovider.param().abi(), core::mem::transmute(phkey), pszblobtype.param().abi(), core::mem::transmute(pbkeyblob.as_ptr()), pbkeyblob.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() + SslImportKey(core::mem::transmute(hsslprovider), core::mem::transmute(phkey), pszblobtype.param().abi(), core::mem::transmute(pbkeyblob.as_ptr()), pbkeyblob.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslImportMasterKey(hsslprovider: P0, hprivatekey: P1, phmasterkey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, pparameterlist: *const BCryptBufferDesc, pbencryptedkey: &[u8], dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslImportMasterKey(hsslprovider: NCRYPT_PROV_HANDLE, hprivatekey: NCRYPT_KEY_HANDLE, phmasterkey: *mut NCRYPT_KEY_HANDLE, dwprotocol: u32, dwciphersuite: u32, pparameterlist: *const BCryptBufferDesc, pbencryptedkey: &[u8], dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslImportMasterKey(hsslprovider : NCRYPT_PROV_HANDLE, hprivatekey : NCRYPT_KEY_HANDLE, phmasterkey : *mut NCRYPT_KEY_HANDLE, dwprotocol : u32, dwciphersuite : u32, pparameterlist : *const BCryptBufferDesc, pbencryptedkey : *const u8, cbencryptedkey : u32, dwflags : u32) -> windows_core::HRESULT); - SslImportMasterKey(hsslprovider.param().abi(), hprivatekey.param().abi(), core::mem::transmute(phmasterkey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(pparameterlist), core::mem::transmute(pbencryptedkey.as_ptr()), pbencryptedkey.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() + SslImportMasterKey(core::mem::transmute(hsslprovider), core::mem::transmute(hprivatekey), core::mem::transmute(phmasterkey), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(pparameterlist), core::mem::transmute(pbencryptedkey.as_ptr()), pbencryptedkey.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslIncrementProviderReferenceCount(hsslprovider: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslIncrementProviderReferenceCount(hsslprovider: NCRYPT_PROV_HANDLE) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslIncrementProviderReferenceCount(hsslprovider : NCRYPT_PROV_HANDLE) -> windows_core::HRESULT); - SslIncrementProviderReferenceCount(hsslprovider.param().abi()).ok() + SslIncrementProviderReferenceCount(core::mem::transmute(hsslprovider)).ok() } #[inline] -pub unsafe fn SslLookupCipherLengths(hsslprovider: P0, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, pcipherlengths: *mut NCRYPT_SSL_CIPHER_LENGTHS, cbcipherlengths: u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslLookupCipherLengths(hsslprovider: NCRYPT_PROV_HANDLE, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, pcipherlengths: *mut NCRYPT_SSL_CIPHER_LENGTHS, cbcipherlengths: u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslLookupCipherLengths(hsslprovider : NCRYPT_PROV_HANDLE, dwprotocol : u32, dwciphersuite : u32, dwkeytype : u32, pcipherlengths : *mut NCRYPT_SSL_CIPHER_LENGTHS, cbcipherlengths : u32, dwflags : u32) -> windows_core::HRESULT); - SslLookupCipherLengths(hsslprovider.param().abi(), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwkeytype), core::mem::transmute(pcipherlengths), core::mem::transmute(cbcipherlengths), core::mem::transmute(dwflags)).ok() + SslLookupCipherLengths(core::mem::transmute(hsslprovider), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwkeytype), core::mem::transmute(pcipherlengths), core::mem::transmute(cbcipherlengths), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslLookupCipherSuiteInfo(hsslprovider: P0, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, pciphersuite: *mut NCRYPT_SSL_CIPHER_SUITE, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslLookupCipherSuiteInfo(hsslprovider: NCRYPT_PROV_HANDLE, dwprotocol: u32, dwciphersuite: u32, dwkeytype: u32, pciphersuite: *mut NCRYPT_SSL_CIPHER_SUITE, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslLookupCipherSuiteInfo(hsslprovider : NCRYPT_PROV_HANDLE, dwprotocol : u32, dwciphersuite : u32, dwkeytype : u32, pciphersuite : *mut NCRYPT_SSL_CIPHER_SUITE, dwflags : u32) -> windows_core::HRESULT); - SslLookupCipherSuiteInfo(hsslprovider.param().abi(), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwkeytype), core::mem::transmute(pciphersuite), core::mem::transmute(dwflags)).ok() + SslLookupCipherSuiteInfo(core::mem::transmute(hsslprovider), core::mem::transmute(dwprotocol), core::mem::transmute(dwciphersuite), core::mem::transmute(dwkeytype), core::mem::transmute(pciphersuite), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslOpenPrivateKey(hsslprovider: P0, phprivatekey: *mut NCRYPT_KEY_HANDLE, pcertcontext: *const CERT_CONTEXT, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SslOpenPrivateKey(hsslprovider: NCRYPT_PROV_HANDLE, phprivatekey: *mut NCRYPT_KEY_HANDLE, pcertcontext: *const CERT_CONTEXT, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslOpenPrivateKey(hsslprovider : NCRYPT_PROV_HANDLE, phprivatekey : *mut NCRYPT_KEY_HANDLE, pcertcontext : *const CERT_CONTEXT, dwflags : u32) -> windows_core::HRESULT); - SslOpenPrivateKey(hsslprovider.param().abi(), core::mem::transmute(phprivatekey), core::mem::transmute(pcertcontext), core::mem::transmute(dwflags)).ok() + SslOpenPrivateKey(core::mem::transmute(hsslprovider), core::mem::transmute(phprivatekey), core::mem::transmute(pcertcontext), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn SslOpenProvider(phsslprovider: *mut NCRYPT_PROV_HANDLE, pszprovidername: P1, dwflags: u32) -> windows_core::Result<()> @@ -3348,22 +2978,14 @@ where SslOpenProvider(core::mem::transmute(phsslprovider), pszprovidername.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslSignHash(hsslprovider: P0, hprivatekey: P1, pbhashvalue: &[u8], pbsignature: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslSignHash(hsslprovider: NCRYPT_PROV_HANDLE, hprivatekey: NCRYPT_KEY_HANDLE, pbhashvalue: &[u8], pbsignature: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslSignHash(hsslprovider : NCRYPT_PROV_HANDLE, hprivatekey : NCRYPT_KEY_HANDLE, pbhashvalue : *const u8, cbhashvalue : u32, pbsignature : *mut u8, cbsignature : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - SslSignHash(hsslprovider.param().abi(), hprivatekey.param().abi(), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() + SslSignHash(core::mem::transmute(hsslprovider), core::mem::transmute(hprivatekey), 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()), core::mem::transmute(pcbresult), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SslVerifySignature(hsslprovider: P0, hpublickey: P1, pbhashvalue: &[u8], pbsignature: &[u8], dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SslVerifySignature(hsslprovider: NCRYPT_PROV_HANDLE, hpublickey: NCRYPT_KEY_HANDLE, pbhashvalue: &[u8], pbsignature: &[u8], dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn SslVerifySignature(hsslprovider : NCRYPT_PROV_HANDLE, hpublickey : NCRYPT_KEY_HANDLE, pbhashvalue : *const u8, cbhashvalue : u32, pbsignature : *const u8, cbsignature : u32, dwflags : u32) -> windows_core::HRESULT); - SslVerifySignature(hsslprovider.param().abi(), hpublickey.param().abi(), core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() + SslVerifySignature(core::mem::transmute(hsslprovider), core::mem::transmute(hpublickey), core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn SystemPrng(pbrandomdata: &mut [u8]) -> super::super::Foundation::BOOL { @@ -13074,12 +12696,8 @@ impl ICertSrvSetup { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CAErrorString)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn InitializeDefaults(&self, bserver: P0, bclient: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeDefaults)(windows_core::Interface::as_raw(self), bserver.param().abi(), bclient.param().abi()).ok() + pub unsafe fn InitializeDefaults(&self, bserver: super::super::Foundation::VARIANT_BOOL, bclient: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeDefaults)(windows_core::Interface::as_raw(self), core::mem::transmute(bserver), core::mem::transmute(bclient)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetCASetupProperty(&self, propertyid: CASetupProperty) -> windows_core::Result { @@ -13123,26 +12741,15 @@ impl ICertSrvSetup { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetExistingCACertificates)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CAImportPFX(&self, bstrfilename: &windows_core::BSTR, bstrpasswd: &windows_core::BSTR, boverwriteexistingkey: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn CAImportPFX(&self, bstrfilename: &windows_core::BSTR, bstrpasswd: &windows_core::BSTR, boverwriteexistingkey: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CAImportPFX)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfilename), core::mem::transmute_copy(bstrpasswd), boverwriteexistingkey.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CAImportPFX)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfilename), core::mem::transmute_copy(bstrpasswd), core::mem::transmute(boverwriteexistingkey), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetCADistinguishedName(&self, bstrcadn: &windows_core::BSTR, bignoreunicode: P1, boverwriteexistingkey: P2, boverwriteexistingcainds: P3) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCADistinguishedName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrcadn), bignoreunicode.param().abi(), boverwriteexistingkey.param().abi(), boverwriteexistingcainds.param().abi()).ok() + pub unsafe fn SetCADistinguishedName(&self, bstrcadn: &windows_core::BSTR, bignoreunicode: super::super::Foundation::VARIANT_BOOL, boverwriteexistingkey: super::super::Foundation::VARIANT_BOOL, boverwriteexistingcainds: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCADistinguishedName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrcadn), core::mem::transmute(bignoreunicode), core::mem::transmute(boverwriteexistingkey), core::mem::transmute(boverwriteexistingcainds)).ok() } - pub unsafe fn SetDatabaseInformation(&self, bstrdbdirectory: &windows_core::BSTR, bstrlogdirectory: &windows_core::BSTR, bstrsharedfolder: &windows_core::BSTR, bforceoverwrite: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDatabaseInformation)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdbdirectory), core::mem::transmute_copy(bstrlogdirectory), core::mem::transmute_copy(bstrsharedfolder), bforceoverwrite.param().abi()).ok() + pub unsafe fn SetDatabaseInformation(&self, bstrdbdirectory: &windows_core::BSTR, bstrlogdirectory: &windows_core::BSTR, bstrsharedfolder: &windows_core::BSTR, bforceoverwrite: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDatabaseInformation)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdbdirectory), core::mem::transmute_copy(bstrlogdirectory), core::mem::transmute_copy(bstrsharedfolder), core::mem::transmute(bforceoverwrite)).ok() } pub unsafe fn SetParentCAInformation(&self, bstrcaconfiguration: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetParentCAInformation)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrcaconfiguration)).ok() @@ -13153,11 +12760,8 @@ impl ICertSrvSetup { pub unsafe fn Install(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Install)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn PreUnInstall(&self, bclientonly: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PreUnInstall)(windows_core::Interface::as_raw(self), bclientonly.param().abi()).ok() + pub unsafe fn PreUnInstall(&self, bclientonly: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PreUnInstall)(windows_core::Interface::as_raw(self), core::mem::transmute(bclientonly)).ok() } pub unsafe fn PostUnInstall(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).PostUnInstall)(windows_core::Interface::as_raw(self)).ok() @@ -13442,11 +13046,8 @@ impl ICertSrvSetupKeyInformation { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Existing)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetExisting(&self, bval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetExisting)(windows_core::Interface::as_raw(self), bval.param().abi()).ok() + pub unsafe fn SetExisting(&self, bval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetExisting)(windows_core::Interface::as_raw(self), core::mem::transmute(bval)).ok() } pub unsafe fn ContainerName(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14018,20 +13619,14 @@ impl IMSCEPSetup { (windows_core::Interface::vtable(self).IsMSCEPStoreEmpty)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn GetProviderNameList(&self, bexchange: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetProviderNameList(&self, bexchange: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetProviderNameList)(windows_core::Interface::as_raw(self), bexchange.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetProviderNameList)(windows_core::Interface::as_raw(self), core::mem::transmute(bexchange), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn GetKeyLengthList(&self, bexchange: P0, bstrprovidername: &windows_core::BSTR) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetKeyLengthList(&self, bexchange: super::super::Foundation::VARIANT_BOOL, bstrprovidername: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetKeyLengthList)(windows_core::Interface::as_raw(self), bexchange.param().abi(), core::mem::transmute_copy(bstrprovidername), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetKeyLengthList)(windows_core::Interface::as_raw(self), core::mem::transmute(bexchange), core::mem::transmute_copy(bstrprovidername), &mut result__).map(|| core::mem::transmute(result__)) } pub unsafe fn Install(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Install)(windows_core::Interface::as_raw(self)).ok() 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 f141444914..81adef78b3 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs @@ -1,18 +1,12 @@ #[inline] -pub unsafe fn DdqCancelDiagnosticRecordOperation(hsession: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqCancelDiagnosticRecordOperation(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqCancelDiagnosticRecordOperation(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION) -> windows_core::HRESULT); - DdqCancelDiagnosticRecordOperation(hsession.param().abi()).ok() + DdqCancelDiagnosticRecordOperation(core::mem::transmute(hsession)).ok() } #[inline] -pub unsafe fn DdqCloseSession(hsession: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqCloseSession(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqCloseSession(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION) -> windows_core::HRESULT); - DdqCloseSession(hsession.param().abi()).ok() + DdqCloseSession(core::mem::transmute(hsession)).ok() } #[inline] pub unsafe fn DdqCreateSession(accesslevel: DdqAccessLevel) -> windows_core::Result { @@ -21,54 +15,38 @@ pub unsafe fn DdqCreateSession(accesslevel: DdqAccessLevel) -> windows_core::Res DdqCreateSession(core::mem::transmute(accesslevel), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqExtractDiagnosticReport(hsession: P0, reportstoretype: u32, reportkey: P2, destinationpath: P3) -> windows_core::Result<()> +pub unsafe fn DdqExtractDiagnosticReport(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, reportstoretype: u32, reportkey: P2, destinationpath: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqExtractDiagnosticReport(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, reportstoretype : u32, reportkey : windows_core::PCWSTR, destinationpath : windows_core::PCWSTR) -> windows_core::HRESULT); - DdqExtractDiagnosticReport(hsession.param().abi(), core::mem::transmute(reportstoretype), reportkey.param().abi(), destinationpath.param().abi()).ok() + DdqExtractDiagnosticReport(core::mem::transmute(hsession), core::mem::transmute(reportstoretype), reportkey.param().abi(), destinationpath.param().abi()).ok() } #[inline] -pub unsafe fn DdqFreeDiagnosticRecordLocaleTags(htagdescription: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqFreeDiagnosticRecordLocaleTags(htagdescription: HDIAGNOSTIC_EVENT_TAG_DESCRIPTION) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqFreeDiagnosticRecordLocaleTags(htagdescription : HDIAGNOSTIC_EVENT_TAG_DESCRIPTION) -> windows_core::HRESULT); - DdqFreeDiagnosticRecordLocaleTags(htagdescription.param().abi()).ok() + DdqFreeDiagnosticRecordLocaleTags(core::mem::transmute(htagdescription)).ok() } #[inline] -pub unsafe fn DdqFreeDiagnosticRecordPage(hrecord: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqFreeDiagnosticRecordPage(hrecord: HDIAGNOSTIC_RECORD) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqFreeDiagnosticRecordPage(hrecord : HDIAGNOSTIC_RECORD) -> windows_core::HRESULT); - DdqFreeDiagnosticRecordPage(hrecord.param().abi()).ok() + DdqFreeDiagnosticRecordPage(core::mem::transmute(hrecord)).ok() } #[inline] -pub unsafe fn DdqFreeDiagnosticRecordProducerCategories(hcategorydescription: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqFreeDiagnosticRecordProducerCategories(hcategorydescription: HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqFreeDiagnosticRecordProducerCategories(hcategorydescription : HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION) -> windows_core::HRESULT); - DdqFreeDiagnosticRecordProducerCategories(hcategorydescription.param().abi()).ok() + DdqFreeDiagnosticRecordProducerCategories(core::mem::transmute(hcategorydescription)).ok() } #[inline] -pub unsafe fn DdqFreeDiagnosticRecordProducers(hproducerdescription: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqFreeDiagnosticRecordProducers(hproducerdescription: HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqFreeDiagnosticRecordProducers(hproducerdescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION) -> windows_core::HRESULT); - DdqFreeDiagnosticRecordProducers(hproducerdescription.param().abi()).ok() + DdqFreeDiagnosticRecordProducers(core::mem::transmute(hproducerdescription)).ok() } #[inline] -pub unsafe fn DdqFreeDiagnosticReport(hreport: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqFreeDiagnosticReport(hreport: HDIAGNOSTIC_REPORT) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqFreeDiagnosticReport(hreport : HDIAGNOSTIC_REPORT) -> windows_core::HRESULT); - DdqFreeDiagnosticReport(hreport.param().abi()).ok() + DdqFreeDiagnosticReport(core::mem::transmute(hreport)).ok() } #[inline] pub unsafe fn DdqGetDiagnosticDataAccessLevelAllowed() -> windows_core::Result { @@ -77,226 +55,157 @@ pub unsafe fn DdqGetDiagnosticDataAccessLevelAllowed() -> windows_core::Result(hrecord: P0, index: u32, record: *mut DIAGNOSTIC_DATA_RECORD) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordAtIndex(hrecord: HDIAGNOSTIC_RECORD, index: u32, record: *mut DIAGNOSTIC_DATA_RECORD) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordAtIndex(hrecord : HDIAGNOSTIC_RECORD, index : u32, record : *mut DIAGNOSTIC_DATA_RECORD) -> windows_core::HRESULT); - DdqGetDiagnosticRecordAtIndex(hrecord.param().abi(), core::mem::transmute(index), core::mem::transmute(record)).ok() + DdqGetDiagnosticRecordAtIndex(core::mem::transmute(hrecord), core::mem::transmute(index), core::mem::transmute(record)).ok() } #[inline] -pub unsafe fn DdqGetDiagnosticRecordBinaryDistribution(hsession: P0, producernames: &[windows_core::PCWSTR], topnbinaries: u32, binarystats: *mut *mut DIAGNOSTIC_DATA_EVENT_BINARY_STATS, statcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordBinaryDistribution(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, producernames: &[windows_core::PCWSTR], topnbinaries: u32, binarystats: *mut *mut DIAGNOSTIC_DATA_EVENT_BINARY_STATS, statcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordBinaryDistribution(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, producernames : *const windows_core::PCWSTR, producernamecount : u32, topnbinaries : u32, binarystats : *mut *mut DIAGNOSTIC_DATA_EVENT_BINARY_STATS, statcount : *mut u32) -> windows_core::HRESULT); - DdqGetDiagnosticRecordBinaryDistribution(hsession.param().abi(), core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), core::mem::transmute(topnbinaries), core::mem::transmute(binarystats), core::mem::transmute(statcount)).ok() + DdqGetDiagnosticRecordBinaryDistribution(core::mem::transmute(hsession), core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), core::mem::transmute(topnbinaries), core::mem::transmute(binarystats), core::mem::transmute(statcount)).ok() } #[inline] -pub unsafe fn DdqGetDiagnosticRecordCategoryAtIndex(hcategorydescription: P0, index: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordCategoryAtIndex(hcategorydescription: HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION, index: u32) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordCategoryAtIndex(hcategorydescription : HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION, index : u32, categorydescription : *mut DIAGNOSTIC_DATA_EVENT_CATEGORY_DESCRIPTION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordCategoryAtIndex(hcategorydescription.param().abi(), core::mem::transmute(index), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordCategoryAtIndex(core::mem::transmute(hcategorydescription), core::mem::transmute(index), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordCategoryCount(hcategorydescription: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordCategoryCount(hcategorydescription: HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordCategoryCount(hcategorydescription : HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION, categorydescriptioncount : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordCategoryCount(hcategorydescription.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordCategoryCount(core::mem::transmute(hcategorydescription), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordCount(hrecord: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordCount(hrecord: HDIAGNOSTIC_RECORD) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordCount(hrecord : HDIAGNOSTIC_RECORD, recordcount : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordCount(hrecord.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordCount(core::mem::transmute(hrecord), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordLocaleTagAtIndex(htagdescription: P0, index: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordLocaleTagAtIndex(htagdescription: HDIAGNOSTIC_EVENT_TAG_DESCRIPTION, index: u32) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordLocaleTagAtIndex(htagdescription : HDIAGNOSTIC_EVENT_TAG_DESCRIPTION, index : u32, tagdescription : *mut DIAGNOSTIC_DATA_EVENT_TAG_DESCRIPTION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordLocaleTagAtIndex(htagdescription.param().abi(), core::mem::transmute(index), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordLocaleTagAtIndex(core::mem::transmute(htagdescription), core::mem::transmute(index), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordLocaleTagCount(htagdescription: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordLocaleTagCount(htagdescription: HDIAGNOSTIC_EVENT_TAG_DESCRIPTION) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordLocaleTagCount(htagdescription : HDIAGNOSTIC_EVENT_TAG_DESCRIPTION, tagdescriptioncount : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordLocaleTagCount(htagdescription.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordLocaleTagCount(core::mem::transmute(htagdescription), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordLocaleTags(hsession: P0, locale: P1) -> windows_core::Result +pub unsafe fn DdqGetDiagnosticRecordLocaleTags(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, locale: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordLocaleTags(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, locale : windows_core::PCWSTR, htagdescription : *mut HDIAGNOSTIC_EVENT_TAG_DESCRIPTION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordLocaleTags(hsession.param().abi(), locale.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordLocaleTags(core::mem::transmute(hsession), locale.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordPage(hsession: P0, searchcriteria: *const DIAGNOSTIC_DATA_SEARCH_CRITERIA, offset: u32, pagerecordcount: u32, baserowid: i64) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordPage(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, searchcriteria: *const DIAGNOSTIC_DATA_SEARCH_CRITERIA, offset: u32, pagerecordcount: u32, baserowid: i64) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordPage(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, searchcriteria : *const DIAGNOSTIC_DATA_SEARCH_CRITERIA, offset : u32, pagerecordcount : u32, baserowid : i64, hrecord : *mut HDIAGNOSTIC_RECORD) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordPage(hsession.param().abi(), core::mem::transmute(searchcriteria), core::mem::transmute(offset), core::mem::transmute(pagerecordcount), core::mem::transmute(baserowid), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordPage(core::mem::transmute(hsession), core::mem::transmute(searchcriteria), core::mem::transmute(offset), core::mem::transmute(pagerecordcount), core::mem::transmute(baserowid), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordPayload(hsession: P0, rowid: i64) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordPayload(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, rowid: i64) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordPayload(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, rowid : i64, payload : *mut windows_core::PCWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordPayload(hsession.param().abi(), core::mem::transmute(rowid), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordPayload(core::mem::transmute(hsession), core::mem::transmute(rowid), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordProducerAtIndex(hproducerdescription: P0, index: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordProducerAtIndex(hproducerdescription: HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION, index: u32) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordProducerAtIndex(hproducerdescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION, index : u32, producerdescription : *mut DIAGNOSTIC_DATA_EVENT_PRODUCER_DESCRIPTION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordProducerAtIndex(hproducerdescription.param().abi(), core::mem::transmute(index), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordProducerAtIndex(core::mem::transmute(hproducerdescription), core::mem::transmute(index), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordProducerCategories(hsession: P0, producername: P1) -> windows_core::Result +pub unsafe fn DdqGetDiagnosticRecordProducerCategories(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, producername: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordProducerCategories(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, producername : windows_core::PCWSTR, hcategorydescription : *mut HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordProducerCategories(hsession.param().abi(), producername.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordProducerCategories(core::mem::transmute(hsession), producername.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordProducerCount(hproducerdescription: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordProducerCount(hproducerdescription: HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordProducerCount(hproducerdescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION, producerdescriptioncount : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordProducerCount(hproducerdescription.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordProducerCount(core::mem::transmute(hproducerdescription), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordProducers(hsession: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordProducers(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordProducers(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, hproducerdescription : *mut HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticRecordProducers(hsession.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticRecordProducers(core::mem::transmute(hsession), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticRecordStats(hsession: P0, searchcriteria: *const DIAGNOSTIC_DATA_SEARCH_CRITERIA, recordcount: *mut u32, minrowid: *mut i64, maxrowid: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordStats(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, searchcriteria: *const DIAGNOSTIC_DATA_SEARCH_CRITERIA, recordcount: *mut u32, minrowid: *mut i64, maxrowid: *mut i64) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordStats(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, searchcriteria : *const DIAGNOSTIC_DATA_SEARCH_CRITERIA, recordcount : *mut u32, minrowid : *mut i64, maxrowid : *mut i64) -> windows_core::HRESULT); - DdqGetDiagnosticRecordStats(hsession.param().abi(), core::mem::transmute(searchcriteria), core::mem::transmute(recordcount), core::mem::transmute(minrowid), core::mem::transmute(maxrowid)).ok() + DdqGetDiagnosticRecordStats(core::mem::transmute(hsession), core::mem::transmute(searchcriteria), core::mem::transmute(recordcount), core::mem::transmute(minrowid), core::mem::transmute(maxrowid)).ok() } #[inline] -pub unsafe fn DdqGetDiagnosticRecordSummary(hsession: P0, producernames: &[windows_core::PCWSTR], generalstats: *mut DIAGNOSTIC_DATA_GENERAL_STATS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordSummary(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, producernames: &[windows_core::PCWSTR], generalstats: *mut DIAGNOSTIC_DATA_GENERAL_STATS) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordSummary(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, producernames : *const windows_core::PCWSTR, producernamecount : u32, generalstats : *mut DIAGNOSTIC_DATA_GENERAL_STATS) -> windows_core::HRESULT); - DdqGetDiagnosticRecordSummary(hsession.param().abi(), core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), core::mem::transmute(generalstats)).ok() + DdqGetDiagnosticRecordSummary(core::mem::transmute(hsession), core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), core::mem::transmute(generalstats)).ok() } #[inline] -pub unsafe fn DdqGetDiagnosticRecordTagDistribution(hsession: P0, producernames: &[windows_core::PCWSTR], tagstats: *mut *mut DIAGNOSTIC_DATA_EVENT_TAG_STATS, statcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticRecordTagDistribution(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, producernames: &[windows_core::PCWSTR], tagstats: *mut *mut DIAGNOSTIC_DATA_EVENT_TAG_STATS, statcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordTagDistribution(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, producernames : *const windows_core::PCWSTR, producernamecount : u32, tagstats : *mut *mut DIAGNOSTIC_DATA_EVENT_TAG_STATS, statcount : *mut u32) -> windows_core::HRESULT); - DdqGetDiagnosticRecordTagDistribution(hsession.param().abi(), core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), core::mem::transmute(tagstats), core::mem::transmute(statcount)).ok() + DdqGetDiagnosticRecordTagDistribution(core::mem::transmute(hsession), core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), core::mem::transmute(tagstats), core::mem::transmute(statcount)).ok() } #[inline] -pub unsafe fn DdqGetDiagnosticReport(hsession: P0, reportstoretype: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticReport(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, reportstoretype: u32) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticReport(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, reportstoretype : u32, hreport : *mut HDIAGNOSTIC_REPORT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticReport(hsession.param().abi(), core::mem::transmute(reportstoretype), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticReport(core::mem::transmute(hsession), core::mem::transmute(reportstoretype), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticReportAtIndex(hreport: P0, index: u32, report: *mut DIAGNOSTIC_REPORT_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticReportAtIndex(hreport: HDIAGNOSTIC_REPORT, index: u32, report: *mut DIAGNOSTIC_REPORT_DATA) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticReportAtIndex(hreport : HDIAGNOSTIC_REPORT, index : u32, report : *mut DIAGNOSTIC_REPORT_DATA) -> windows_core::HRESULT); - DdqGetDiagnosticReportAtIndex(hreport.param().abi(), core::mem::transmute(index), core::mem::transmute(report)).ok() + DdqGetDiagnosticReportAtIndex(core::mem::transmute(hreport), core::mem::transmute(index), core::mem::transmute(report)).ok() } #[inline] -pub unsafe fn DdqGetDiagnosticReportCount(hreport: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticReportCount(hreport: HDIAGNOSTIC_REPORT) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticReportCount(hreport : HDIAGNOSTIC_REPORT, reportcount : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticReportCount(hreport.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticReportCount(core::mem::transmute(hreport), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetDiagnosticReportStoreReportCount(hsession: P0, reportstoretype: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetDiagnosticReportStoreReportCount(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, reportstoretype: u32) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticReportStoreReportCount(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, reportstoretype : u32, reportcount : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetDiagnosticReportStoreReportCount(hsession.param().abi(), core::mem::transmute(reportstoretype), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetDiagnosticReportStoreReportCount(core::mem::transmute(hsession), core::mem::transmute(reportstoretype), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetSessionAccessLevel(hsession: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetSessionAccessLevel(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetSessionAccessLevel(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, accesslevel : *mut DdqAccessLevel) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetSessionAccessLevel(hsession.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetSessionAccessLevel(core::mem::transmute(hsession), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqGetTranscriptConfiguration(hsession: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DdqGetTranscriptConfiguration(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION) -> windows_core::Result { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetTranscriptConfiguration(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, currentconfig : *mut DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqGetTranscriptConfiguration(hsession.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DdqGetTranscriptConfiguration(core::mem::transmute(hsession), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqIsDiagnosticRecordSampledIn(hsession: P0, providergroup: *const windows_core::GUID, providerid: Option<*const windows_core::GUID>, providername: P3, eventid: Option<*const u32>, eventname: P5, eventversion: Option<*const u32>, eventkeywords: Option<*const u64>) -> windows_core::Result +pub unsafe fn DdqIsDiagnosticRecordSampledIn(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, providergroup: *const windows_core::GUID, providerid: Option<*const windows_core::GUID>, providername: P3, eventid: Option<*const u32>, eventname: P5, eventversion: Option<*const u32>, eventkeywords: Option<*const u64>) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, P5: windows_core::Param, { 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(), core::mem::transmute(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(|| core::mem::transmute(result__)) + DdqIsDiagnosticRecordSampledIn(core::mem::transmute(hsession), core::mem::transmute(providergroup), core::mem::transmute(providerid.unwrap_or(core::mem::zeroed())), providername.param().abi(), core::mem::transmute(eventid.unwrap_or(core::mem::zeroed())), eventname.param().abi(), core::mem::transmute(eventversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventkeywords.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DdqSetTranscriptConfiguration(hsession: P0, desiredconfig: *const DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdqSetTranscriptConfiguration(hsession: HDIAGNOSTIC_DATA_QUERY_SESSION, desiredconfig: *const DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION) -> windows_core::Result<()> { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqSetTranscriptConfiguration(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, desiredconfig : *const DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION) -> windows_core::HRESULT); - DdqSetTranscriptConfiguration(hsession.param().abi(), core::mem::transmute(desiredconfig)).ok() + DdqSetTranscriptConfiguration(core::mem::transmute(hsession), core::mem::transmute(desiredconfig)).ok() } pub const AllUserData: DdqAccessLevel = DdqAccessLevel(2i32); pub const CurrentUserData: DdqAccessLevel = DdqAccessLevel(1i32); diff --git a/crates/libs/windows/src/Windows/Win32/Security/DirectoryServices/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/DirectoryServices/mod.rs index 3a6613ddd1..f73122abd2 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/DirectoryServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/DirectoryServices/mod.rs @@ -1,50 +1,45 @@ #[cfg(feature = "Win32_Security_Authorization_UI")] #[inline] -pub unsafe fn DSCreateISecurityInfoObject(pwszobjectpath: P0, pwszobjectclass: P1, dwflags: u32, ppsi: *mut Option, pfnreadsd: PFNREADOBJECTSECURITY, pfnwritesd: PFNWRITEOBJECTSECURITY, lpcontext: P6) -> windows_core::Result<()> +pub unsafe fn DSCreateISecurityInfoObject(pwszobjectpath: P0, pwszobjectclass: P1, dwflags: u32, ppsi: *mut Option, pfnreadsd: Option, pfnwritesd: Option, lpcontext: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("dssec.dll" "system" fn DSCreateISecurityInfoObject(pwszobjectpath : windows_core::PCWSTR, pwszobjectclass : windows_core::PCWSTR, dwflags : u32, ppsi : *mut * mut core::ffi::c_void, pfnreadsd : PFNREADOBJECTSECURITY, pfnwritesd : PFNWRITEOBJECTSECURITY, lpcontext : super::super::Foundation:: LPARAM) -> windows_core::HRESULT); - DSCreateISecurityInfoObject(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ppsi), core::mem::transmute(pfnreadsd), core::mem::transmute(pfnwritesd), lpcontext.param().abi()).ok() + DSCreateISecurityInfoObject(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ppsi), core::mem::transmute(pfnreadsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwritesd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcontext)).ok() } #[cfg(feature = "Win32_Security_Authorization_UI")] #[inline] -pub unsafe fn DSCreateISecurityInfoObjectEx(pwszobjectpath: P0, pwszobjectclass: P1, pwszserver: P2, pwszusername: P3, pwszpassword: P4, dwflags: u32, ppsi: *mut Option, pfnreadsd: PFNREADOBJECTSECURITY, pfnwritesd: PFNWRITEOBJECTSECURITY, lpcontext: P9) -> windows_core::Result<()> +pub unsafe fn DSCreateISecurityInfoObjectEx(pwszobjectpath: P0, pwszobjectclass: P1, pwszserver: P2, pwszusername: P3, pwszpassword: P4, dwflags: u32, ppsi: *mut Option, pfnreadsd: Option, pfnwritesd: Option, lpcontext: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, - P9: windows_core::Param, { windows_targets::link!("dssec.dll" "system" fn DSCreateISecurityInfoObjectEx(pwszobjectpath : windows_core::PCWSTR, pwszobjectclass : windows_core::PCWSTR, pwszserver : windows_core::PCWSTR, pwszusername : windows_core::PCWSTR, pwszpassword : windows_core::PCWSTR, dwflags : u32, ppsi : *mut * mut core::ffi::c_void, pfnreadsd : PFNREADOBJECTSECURITY, pfnwritesd : PFNWRITEOBJECTSECURITY, lpcontext : super::super::Foundation:: LPARAM) -> windows_core::HRESULT); - DSCreateISecurityInfoObjectEx(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), pwszserver.param().abi(), pwszusername.param().abi(), pwszpassword.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ppsi), core::mem::transmute(pfnreadsd), core::mem::transmute(pfnwritesd), lpcontext.param().abi()).ok() + DSCreateISecurityInfoObjectEx(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), pwszserver.param().abi(), pwszusername.param().abi(), pwszpassword.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ppsi), core::mem::transmute(pfnreadsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwritesd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcontext)).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn DSCreateSecurityPage(pwszobjectpath: P0, pwszobjectclass: P1, dwflags: u32, phpage: *mut super::super::UI::Controls::HPROPSHEETPAGE, pfnreadsd: PFNREADOBJECTSECURITY, pfnwritesd: PFNWRITEOBJECTSECURITY, lpcontext: P6) -> windows_core::Result<()> +pub unsafe fn DSCreateSecurityPage(pwszobjectpath: P0, pwszobjectclass: P1, dwflags: u32, phpage: *mut super::super::UI::Controls::HPROPSHEETPAGE, pfnreadsd: Option, pfnwritesd: Option, lpcontext: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("dssec.dll" "system" fn DSCreateSecurityPage(pwszobjectpath : windows_core::PCWSTR, pwszobjectclass : windows_core::PCWSTR, dwflags : u32, phpage : *mut super::super::UI::Controls:: HPROPSHEETPAGE, pfnreadsd : PFNREADOBJECTSECURITY, pfnwritesd : PFNWRITEOBJECTSECURITY, lpcontext : super::super::Foundation:: LPARAM) -> windows_core::HRESULT); - DSCreateSecurityPage(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phpage), core::mem::transmute(pfnreadsd), core::mem::transmute(pfnwritesd), lpcontext.param().abi()).ok() + DSCreateSecurityPage(pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phpage), core::mem::transmute(pfnreadsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwritesd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcontext)).ok() } #[inline] -pub unsafe fn DSEditSecurity(hwndowner: P0, pwszobjectpath: P1, pwszobjectclass: P2, dwflags: u32, pwszcaption: P4, pfnreadsd: PFNREADOBJECTSECURITY, pfnwritesd: PFNWRITEOBJECTSECURITY, lpcontext: P7) -> windows_core::Result<()> +pub unsafe fn DSEditSecurity(hwndowner: super::super::Foundation::HWND, pwszobjectpath: P1, pwszobjectclass: P2, dwflags: u32, pwszcaption: P4, pfnreadsd: Option, pfnwritesd: Option, lpcontext: super::super::Foundation::LPARAM) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, - P7: windows_core::Param, { windows_targets::link!("dssec.dll" "system" fn DSEditSecurity(hwndowner : super::super::Foundation:: HWND, pwszobjectpath : windows_core::PCWSTR, pwszobjectclass : windows_core::PCWSTR, dwflags : u32, pwszcaption : windows_core::PCWSTR, pfnreadsd : PFNREADOBJECTSECURITY, pfnwritesd : PFNWRITEOBJECTSECURITY, lpcontext : super::super::Foundation:: LPARAM) -> windows_core::HRESULT); - DSEditSecurity(hwndowner.param().abi(), pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), core::mem::transmute(dwflags), pwszcaption.param().abi(), core::mem::transmute(pfnreadsd), core::mem::transmute(pfnwritesd), lpcontext.param().abi()).ok() + DSEditSecurity(core::mem::transmute(hwndowner), pwszobjectpath.param().abi(), pwszobjectclass.param().abi(), core::mem::transmute(dwflags), pwszcaption.param().abi(), core::mem::transmute(pfnreadsd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwritesd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcontext)).ok() } pub const DSSI_IS_ROOT: u32 = 16u32; pub const DSSI_NO_ACCESS_CHECK: u32 = 2u32; 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 2cc139b646..5a2c774538 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs @@ -42,21 +42,15 @@ where SrpEnablePermissiveModeFileEncryption(enterpriseid.param().abi()).ok() } #[inline] -pub unsafe fn SrpGetEnterpriseIds(tokenhandle: P0, numberofbytes: Option<*mut u32>, enterpriseids: Option<*mut windows_core::PCWSTR>, enterpriseidcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SrpGetEnterpriseIds(tokenhandle: super::super::Foundation::HANDLE, numberofbytes: Option<*mut u32>, enterpriseids: Option<*mut windows_core::PCWSTR>, enterpriseidcount: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(enterpriseids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(enterpriseidcount)).ok() + SrpGetEnterpriseIds(core::mem::transmute(tokenhandle), core::mem::transmute(numberofbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(enterpriseids.unwrap_or(core::mem::zeroed())), core::mem::transmute(enterpriseidcount)).ok() } #[inline] -pub unsafe fn SrpGetEnterprisePolicy(tokenhandle: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn SrpGetEnterprisePolicy(tokenhandle: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("srpapi.dll" "system" fn SrpGetEnterprisePolicy(tokenhandle : super::super::Foundation:: HANDLE, policyflags : *mut ENTERPRISE_DATA_POLICIES) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SrpGetEnterprisePolicy(tokenhandle.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + SrpGetEnterprisePolicy(core::mem::transmute(tokenhandle), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn SrpHostingInitialize(version: SRPHOSTING_VERSION, r#type: SRPHOSTING_TYPE, pvdata: *const core::ffi::c_void, cbdata: u32) -> windows_core::Result<()> { @@ -69,21 +63,17 @@ pub unsafe fn SrpHostingTerminate(r#type: SRPHOSTING_TYPE) { SrpHostingTerminate(core::mem::transmute(r#type)) } #[inline] -pub unsafe fn SrpIsTokenService(tokenhandle: P0, istokenservice: *mut u8) -> super::super::Foundation::NTSTATUS -where - P0: windows_core::Param, -{ +pub unsafe fn SrpIsTokenService(tokenhandle: super::super::Foundation::HANDLE, istokenservice: *mut u8) -> super::super::Foundation::NTSTATUS { windows_targets::link!("srpapi.dll" "system" fn SrpIsTokenService(tokenhandle : super::super::Foundation:: HANDLE, istokenservice : *mut u8) -> super::super::Foundation:: NTSTATUS); - SrpIsTokenService(tokenhandle.param().abi(), core::mem::transmute(istokenservice)) + SrpIsTokenService(core::mem::transmute(tokenhandle), core::mem::transmute(istokenservice)) } #[inline] -pub unsafe fn SrpSetTokenEnterpriseId(tokenhandle: P0, enterpriseid: P1) -> windows_core::Result<()> +pub unsafe fn SrpSetTokenEnterpriseId(tokenhandle: super::super::Foundation::HANDLE, enterpriseid: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("srpapi.dll" "system" fn SrpSetTokenEnterpriseId(tokenhandle : super::super::Foundation:: HANDLE, enterpriseid : windows_core::PCWSTR) -> windows_core::HRESULT); - SrpSetTokenEnterpriseId(tokenhandle.param().abi(), enterpriseid.param().abi()).ok() + SrpSetTokenEnterpriseId(core::mem::transmute(tokenhandle), enterpriseid.param().abi()).ok() } #[inline] pub unsafe fn UnprotectFile(fileorfolderpath: P0, options: Option<*const FILE_UNPROTECT_OPTIONS>) -> windows_core::Result<()> @@ -91,7 +81,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(core::ptr::null()))).ok() + UnprotectFile(fileorfolderpath.param().abi(), core::mem::transmute(options.unwrap_or(core::mem::zeroed()))).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -163,21 +153,19 @@ impl windows_core::TypeKind for HTHREAD_NETWORK_CONTEXT { windows_core::imp::define_interface!(IProtectionPolicyManagerInterop, IProtectionPolicyManagerInterop_Vtbl, 0x4652651d_c1fe_4ba1_9f0a_c0f56596f721); windows_core::imp::interface_hierarchy!(IProtectionPolicyManagerInterop, windows_core::IUnknown, windows_core::IInspectable); impl IProtectionPolicyManagerInterop { - pub unsafe fn RequestAccessForWindowAsync(&self, appwindow: P0, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING) -> windows_core::Result + pub unsafe fn RequestAccessForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(targetidentity), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(targetidentity), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -214,49 +202,44 @@ impl windows_core::RuntimeName for IProtectionPolicyManagerInterop {} windows_core::imp::define_interface!(IProtectionPolicyManagerInterop2, IProtectionPolicyManagerInterop2_Vtbl, 0x157cfbe4_a78d_4156_b384_61fdac41e686); windows_core::imp::interface_hierarchy!(IProtectionPolicyManagerInterop2, windows_core::IUnknown, windows_core::IInspectable); impl IProtectionPolicyManagerInterop2 { - pub unsafe fn RequestAccessForAppWithWindowAsync(&self, appwindow: P0, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING) -> windows_core::Result + pub unsafe fn RequestAccessForAppWithWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessForAppWithWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(apppackagefamilyname), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessForAppWithWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(apppackagefamilyname), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessWithAuditingInfoForWindowAsync(&self, appwindow: P0, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: P3) -> windows_core::Result + pub unsafe fn RequestAccessWithAuditingInfoForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: P3) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessWithAuditingInfoForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(targetidentity), auditinfounk.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessWithAuditingInfoForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(targetidentity), auditinfounk.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessWithMessageForWindowAsync(&self, appwindow: P0, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING) -> windows_core::Result + pub unsafe fn RequestAccessWithMessageForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessWithMessageForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(targetidentity), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessWithMessageForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(targetidentity), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessForAppWithAuditingInfoForWindowAsync(&self, appwindow: P0, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3) -> windows_core::Result + pub unsafe fn RequestAccessForAppWithAuditingInfoForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessForAppWithAuditingInfoForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessForAppWithAuditingInfoForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessForAppWithMessageForWindowAsync(&self, appwindow: P0, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING) -> windows_core::Result + pub unsafe fn RequestAccessForAppWithMessageForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessForAppWithMessageForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessForAppWithMessageForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -314,63 +297,57 @@ impl windows_core::RuntimeName for IProtectionPolicyManagerInterop2 {} windows_core::imp::define_interface!(IProtectionPolicyManagerInterop3, IProtectionPolicyManagerInterop3_Vtbl, 0xc1c03933_b398_4d93_b0fd_2972adf802c2); windows_core::imp::interface_hierarchy!(IProtectionPolicyManagerInterop3, windows_core::IUnknown, windows_core::IInspectable); impl IProtectionPolicyManagerInterop3 { - pub unsafe fn RequestAccessWithBehaviorForWindowAsync(&self, appwindow: P0, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING, behavior: u32) -> windows_core::Result + pub unsafe fn RequestAccessWithBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING, behavior: u32) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessWithBehaviorForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(targetidentity), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), core::mem::transmute(behavior), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessWithBehaviorForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(targetidentity), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), core::mem::transmute(behavior), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessForAppWithBehaviorForWindowAsync(&self, appwindow: P0, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING, behavior: u32) -> windows_core::Result + pub unsafe fn RequestAccessForAppWithBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING, behavior: u32) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessForAppWithBehaviorForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), core::mem::transmute(behavior), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessForAppWithBehaviorForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(sourceidentity), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), core::mem::transmute(behavior), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessToFilesForAppForWindowAsync(&self, appwindow: P0, sourceitemlistunk: P1, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3) -> windows_core::Result + pub unsafe fn RequestAccessToFilesForAppForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: P1, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessToFilesForAppForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), sourceitemlistunk.param().abi(), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessToFilesForAppForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), sourceitemlistunk.param().abi(), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(&self, appwindow: P0, sourceitemlistunk: P1, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING, behavior: u32) -> windows_core::Result + pub unsafe fn RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: P1, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: P3, messagefromapp: &windows_core::HSTRING, behavior: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), sourceitemlistunk.param().abi(), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), core::mem::transmute(behavior), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), sourceitemlistunk.param().abi(), core::mem::transmute_copy(apppackagefamilyname), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), core::mem::transmute(behavior), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessToFilesForProcessForWindowAsync(&self, appwindow: P0, sourceitemlistunk: P1, processid: u32, auditinfounk: P3) -> windows_core::Result + pub unsafe fn RequestAccessToFilesForProcessForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: P1, processid: u32, auditinfounk: P3) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessToFilesForProcessForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), sourceitemlistunk.param().abi(), core::mem::transmute(processid), auditinfounk.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessToFilesForProcessForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), sourceitemlistunk.param().abi(), core::mem::transmute(processid), auditinfounk.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(&self, appwindow: P0, sourceitemlistunk: P1, processid: u32, auditinfounk: P3, messagefromapp: &windows_core::HSTRING, behavior: u32) -> windows_core::Result + pub unsafe fn RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: P1, processid: u32, auditinfounk: P3, messagefromapp: &windows_core::HSTRING, behavior: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), sourceitemlistunk.param().abi(), core::mem::transmute(processid), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), core::mem::transmute(behavior), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), sourceitemlistunk.param().abi(), core::mem::transmute(processid), auditinfounk.param().abi(), core::mem::transmute_copy(messagefromapp), core::mem::transmute(behavior), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs index 4b8ce7cd2f..9d9c5a99a2 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs @@ -1,14 +1,11 @@ #[inline] -pub unsafe fn EapHostPeerBeginSession(dwflags: u32, eaptype: EAP_METHOD_TYPE, pattributearray: *const EAP_ATTRIBUTES, htokenimpersonateuser: P3, dwsizeofconnectiondata: u32, pconnectiondata: *const u8, dwsizeofuserdata: u32, puserdata: *const u8, dwmaxsendpacketsize: u32, pconnectionid: *const windows_core::GUID, func: NotificationHandler, pcontextdata: *mut core::ffi::c_void, psessionid: *mut u32, ppeaperror: *mut *mut EAP_ERROR) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn EapHostPeerBeginSession(dwflags: u32, eaptype: EAP_METHOD_TYPE, pattributearray: *const EAP_ATTRIBUTES, htokenimpersonateuser: super::super::Foundation::HANDLE, dwsizeofconnectiondata: u32, pconnectiondata: *const u8, dwsizeofuserdata: u32, puserdata: *const u8, dwmaxsendpacketsize: u32, pconnectionid: *const windows_core::GUID, func: NotificationHandler, pcontextdata: *mut core::ffi::c_void, psessionid: *mut u32, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerBeginSession(dwflags : u32, eaptype : EAP_METHOD_TYPE, pattributearray : *const EAP_ATTRIBUTES, htokenimpersonateuser : super::super::Foundation:: HANDLE, dwsizeofconnectiondata : u32, pconnectiondata : *const u8, dwsizeofuserdata : u32, puserdata : *const u8, dwmaxsendpacketsize : u32, pconnectionid : *const windows_core::GUID, func : NotificationHandler, pcontextdata : *mut core::ffi::c_void, psessionid : *mut u32, ppeaperror : *mut *mut EAP_ERROR) -> u32); EapHostPeerBeginSession( core::mem::transmute(dwflags), core::mem::transmute(eaptype), core::mem::transmute(pattributearray), - htokenimpersonateuser.param().abi(), + core::mem::transmute(htokenimpersonateuser), core::mem::transmute(dwsizeofconnectiondata), core::mem::transmute(pconnectiondata), core::mem::transmute(dwsizeofuserdata), @@ -94,10 +91,7 @@ where EapHostPeerGetEncryptedPassword(core::mem::transmute(dwsizeofpassword), szpassword.param().abi(), core::mem::transmute(ppszencpassword)) } #[inline] -pub unsafe fn EapHostPeerGetIdentity(dwversion: u32, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, pconnectiondata: &[u8], puserdata: Option<&[u8]>, htokenimpersonateuser: P7, pfinvokeui: *mut super::super::Foundation::BOOL, pdwsizeofuserdataout: *mut u32, ppuserdataout: *mut *mut u8, ppwszidentity: *mut windows_core::PWSTR, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut u8) -> u32 -where - P7: windows_core::Param, -{ +pub unsafe fn EapHostPeerGetIdentity(dwversion: u32, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, pconnectiondata: &[u8], puserdata: Option<&[u8]>, htokenimpersonateuser: super::super::Foundation::HANDLE, pfinvokeui: *mut super::super::Foundation::BOOL, pdwsizeofuserdataout: *mut u32, ppuserdataout: *mut *mut u8, ppwszidentity: *mut windows_core::PWSTR, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut u8) -> u32 { windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetIdentity(dwversion : u32, dwflags : u32, eapmethodtype : EAP_METHOD_TYPE, dwsizeofconnectiondata : u32, pconnectiondata : *const u8, dwsizeofuserdata : u32, puserdata : *const u8, htokenimpersonateuser : super::super::Foundation:: HANDLE, pfinvokeui : *mut super::super::Foundation:: BOOL, pdwsizeofuserdataout : *mut u32, ppuserdataout : *mut *mut u8, ppwszidentity : *mut windows_core::PWSTR, ppeaperror : *mut *mut EAP_ERROR, ppvreserved : *mut *mut u8) -> u32); EapHostPeerGetIdentity( core::mem::transmute(dwversion), @@ -107,7 +101,7 @@ where core::mem::transmute(pconnectiondata.as_ptr()), puserdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(puserdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - htokenimpersonateuser.param().abi(), + core::mem::transmute(htokenimpersonateuser), core::mem::transmute(pfinvokeui), core::mem::transmute(pdwsizeofuserdataout), core::mem::transmute(ppuserdataout), @@ -117,12 +111,9 @@ where ) } #[inline] -pub unsafe fn EapHostPeerGetMethodProperties(dwversion: u32, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, huserimpersonationtoken: P3, pbeapconndata: &[u8], pbuserdata: &[u8], pmethodpropertyarray: *mut EAP_METHOD_PROPERTY_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn EapHostPeerGetMethodProperties(dwversion: u32, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, huserimpersonationtoken: super::super::Foundation::HANDLE, pbeapconndata: &[u8], pbuserdata: &[u8], pmethodpropertyarray: *mut EAP_METHOD_PROPERTY_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerGetMethodProperties(dwversion : u32, dwflags : u32, eapmethodtype : EAP_METHOD_TYPE, huserimpersonationtoken : super::super::Foundation:: HANDLE, dweapconndatasize : u32, pbeapconndata : *const u8, dwuserdatasize : u32, pbuserdata : *const u8, pmethodpropertyarray : *mut EAP_METHOD_PROPERTY_ARRAY, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerGetMethodProperties(core::mem::transmute(dwversion), core::mem::transmute(dwflags), core::mem::transmute(eapmethodtype), huserimpersonationtoken.param().abi(), pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), pbuserdata.len().try_into().unwrap(), core::mem::transmute(pbuserdata.as_ptr()), core::mem::transmute(pmethodpropertyarray), core::mem::transmute(ppeaperror)) + EapHostPeerGetMethodProperties(core::mem::transmute(dwversion), core::mem::transmute(dwflags), core::mem::transmute(eapmethodtype), core::mem::transmute(huserimpersonationtoken), pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), pbuserdata.len().try_into().unwrap(), core::mem::transmute(pbuserdata.as_ptr()), core::mem::transmute(pmethodpropertyarray), core::mem::transmute(ppeaperror)) } #[inline] pub unsafe fn EapHostPeerGetMethods(peapmethodinfoarray: *mut EAP_METHOD_INFO_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 { @@ -155,24 +146,18 @@ pub unsafe fn EapHostPeerInitialize() -> u32 { EapHostPeerInitialize() } #[inline] -pub unsafe fn EapHostPeerInvokeConfigUI(hwndparent: P0, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, pconfigin: Option<&[u8]>, pdwsizeofconfigout: *mut u32, ppconfigout: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EapHostPeerInvokeConfigUI(hwndparent: super::super::Foundation::HWND, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, pconfigin: Option<&[u8]>, pdwsizeofconfigout: *mut u32, ppconfigout: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerInvokeConfigUI(hwndparent : super::super::Foundation:: HWND, dwflags : u32, eapmethodtype : EAP_METHOD_TYPE, dwsizeofconfigin : u32, pconfigin : *const u8, pdwsizeofconfigout : *mut u32, ppconfigout : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerInvokeConfigUI(hwndparent.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(eapmethodtype), pconfigin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pconfigin.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwsizeofconfigout), core::mem::transmute(ppconfigout), core::mem::transmute(ppeaperror)) + EapHostPeerInvokeConfigUI(core::mem::transmute(hwndparent), core::mem::transmute(dwflags), core::mem::transmute(eapmethodtype), pconfigin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pconfigin.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwsizeofconfigout), core::mem::transmute(ppconfigout), core::mem::transmute(ppeaperror)) } #[inline] -pub unsafe fn EapHostPeerInvokeIdentityUI(dwversion: u32, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, hwndparent: P3, pconnectiondata: &[u8], puserdata: Option<&[u8]>, pdwsizeofuserdataout: *mut u32, ppuserdataout: *mut *mut u8, ppwszidentity: *mut windows_core::PWSTR, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut core::ffi::c_void) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn EapHostPeerInvokeIdentityUI(dwversion: u32, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, hwndparent: super::super::Foundation::HWND, pconnectiondata: &[u8], puserdata: Option<&[u8]>, pdwsizeofuserdataout: *mut u32, ppuserdataout: *mut *mut u8, ppwszidentity: *mut windows_core::PWSTR, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerInvokeIdentityUI(dwversion : u32, eapmethodtype : EAP_METHOD_TYPE, dwflags : u32, hwndparent : super::super::Foundation:: HWND, dwsizeofconnectiondata : u32, pconnectiondata : *const u8, dwsizeofuserdata : u32, puserdata : *const u8, pdwsizeofuserdataout : *mut u32, ppuserdataout : *mut *mut u8, ppwszidentity : *mut windows_core::PWSTR, ppeaperror : *mut *mut EAP_ERROR, ppvreserved : *mut *mut core::ffi::c_void) -> u32); EapHostPeerInvokeIdentityUI( core::mem::transmute(dwversion), core::mem::transmute(eapmethodtype), core::mem::transmute(dwflags), - hwndparent.param().abi(), + core::mem::transmute(hwndparent), pconnectiondata.len().try_into().unwrap(), core::mem::transmute(pconnectiondata.as_ptr()), puserdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -185,12 +170,9 @@ where ) } #[inline] -pub unsafe fn EapHostPeerInvokeInteractiveUI(hwndparent: P0, puicontextdata: Option<&[u8]>, pdwsizeofdatafrominteractiveui: *mut u32, ppdatafrominteractiveui: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EapHostPeerInvokeInteractiveUI(hwndparent: super::super::Foundation::HWND, puicontextdata: Option<&[u8]>, pdwsizeofdatafrominteractiveui: *mut u32, ppdatafrominteractiveui: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerInvokeInteractiveUI(hwndparent : super::super::Foundation:: HWND, dwsizeofuicontextdata : u32, puicontextdata : *const u8, pdwsizeofdatafrominteractiveui : *mut u32, ppdatafrominteractiveui : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerInvokeInteractiveUI(hwndparent.param().abi(), puicontextdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(puicontextdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwsizeofdatafrominteractiveui), core::mem::transmute(ppdatafrominteractiveui), core::mem::transmute(ppeaperror)) + EapHostPeerInvokeInteractiveUI(core::mem::transmute(hwndparent), puicontextdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(puicontextdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwsizeofdatafrominteractiveui), core::mem::transmute(ppdatafrominteractiveui), core::mem::transmute(ppeaperror)) } #[inline] pub unsafe fn EapHostPeerProcessReceivedPacket(sessionhandle: u32, cbreceivepacket: u32, preceivepacket: *const u8, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { @@ -198,12 +180,9 @@ pub unsafe fn EapHostPeerProcessReceivedPacket(sessionhandle: u32, cbreceivepack EapHostPeerProcessReceivedPacket(core::mem::transmute(sessionhandle), core::mem::transmute(cbreceivepacket), core::mem::transmute(preceivepacket), core::mem::transmute(peapoutput), core::mem::transmute(ppeaperror)) } #[inline] -pub unsafe fn EapHostPeerQueryCredentialInputFields(huserimpersonationtoken: P0, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, pbeapconndata: &[u8], peapconfiginputfieldarray: *mut EAP_CONFIG_INPUT_FIELD_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EapHostPeerQueryCredentialInputFields(huserimpersonationtoken: super::super::Foundation::HANDLE, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, pbeapconndata: &[u8], peapconfiginputfieldarray: *mut EAP_CONFIG_INPUT_FIELD_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerQueryCredentialInputFields(huserimpersonationtoken : super::super::Foundation:: HANDLE, eapmethodtype : EAP_METHOD_TYPE, dwflags : u32, dweapconndatasize : u32, pbeapconndata : *const u8, peapconfiginputfieldarray : *mut EAP_CONFIG_INPUT_FIELD_ARRAY, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerQueryCredentialInputFields(huserimpersonationtoken.param().abi(), core::mem::transmute(eapmethodtype), core::mem::transmute(dwflags), pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), core::mem::transmute(peapconfiginputfieldarray), core::mem::transmute(ppeaperror)) + EapHostPeerQueryCredentialInputFields(core::mem::transmute(huserimpersonationtoken), core::mem::transmute(eapmethodtype), core::mem::transmute(dwflags), pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), core::mem::transmute(peapconfiginputfieldarray), core::mem::transmute(ppeaperror)) } #[inline] pub unsafe fn EapHostPeerQueryInteractiveUIInputFields(dwversion: u32, dwflags: u32, puicontextdata: &[u8], peapinteractiveuidata: *mut EAP_INTERACTIVE_UI_DATA, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut core::ffi::c_void) -> u32 { @@ -216,12 +195,9 @@ pub unsafe fn EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion: u32, EapHostPeerQueryUIBlobFromInteractiveUIInputFields(core::mem::transmute(dwversion), core::mem::transmute(dwflags), puicontextdata.len().try_into().unwrap(), core::mem::transmute(puicontextdata.as_ptr()), core::mem::transmute(peapinteractiveuidata), core::mem::transmute(pdwsizeofdatafrominteractiveui), core::mem::transmute(ppdatafrominteractiveui), core::mem::transmute(ppeaperror), core::mem::transmute(ppvreserved)) } #[inline] -pub unsafe fn EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken: P0, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, pbeapconndata: &[u8], peapconfiginputfieldarray: *const EAP_CONFIG_INPUT_FIELD_ARRAY, pdwuserblobsize: *mut u32, ppbuserblob: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken: super::super::Foundation::HANDLE, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, pbeapconndata: &[u8], peapconfiginputfieldarray: *const EAP_CONFIG_INPUT_FIELD_ARRAY, pdwuserblobsize: *mut u32, ppbuserblob: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken : super::super::Foundation:: HANDLE, eapmethodtype : EAP_METHOD_TYPE, dwflags : u32, dweapconndatasize : u32, pbeapconndata : *const u8, peapconfiginputfieldarray : *const EAP_CONFIG_INPUT_FIELD_ARRAY, pdwuserblobsize : *mut u32, ppbuserblob : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken.param().abi(), core::mem::transmute(eapmethodtype), core::mem::transmute(dwflags), pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), core::mem::transmute(peapconfiginputfieldarray), core::mem::transmute(pdwuserblobsize), core::mem::transmute(ppbuserblob), core::mem::transmute(ppeaperror)) + EapHostPeerQueryUserBlobFromCredentialInputFields(core::mem::transmute(huserimpersonationtoken), core::mem::transmute(eapmethodtype), core::mem::transmute(dwflags), pbeapconndata.len().try_into().unwrap(), core::mem::transmute(pbeapconndata.as_ptr()), core::mem::transmute(peapconfiginputfieldarray), core::mem::transmute(pdwuserblobsize), core::mem::transmute(ppbuserblob), core::mem::transmute(ppeaperror)) } #[inline] pub unsafe fn EapHostPeerSetResponseAttributes(sessionhandle: u32, pattribs: *const EAP_ATTRIBUTES, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { @@ -1113,11 +1089,8 @@ impl IAccountingProviderConfig { pub unsafe fn Uninitialize(&self, uconnectionparam: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Uninitialize)(windows_core::Interface::as_raw(self), core::mem::transmute(uconnectionparam)).ok() } - pub unsafe fn Configure(&self, uconnectionparam: usize, hwnd: P1, dwflags: u32, ureserved1: usize, ureserved2: usize) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), core::mem::transmute(uconnectionparam), hwnd.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ureserved1), core::mem::transmute(ureserved2)).ok() + pub unsafe fn Configure(&self, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, dwflags: u32, ureserved1: usize, ureserved2: usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), core::mem::transmute(uconnectionparam), core::mem::transmute(hwnd), core::mem::transmute(dwflags), core::mem::transmute(ureserved1), core::mem::transmute(ureserved2)).ok() } pub unsafe fn Activate(&self, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(uconnectionparam), core::mem::transmute(ureserved1), core::mem::transmute(ureserved2)).ok() @@ -1197,11 +1170,8 @@ impl IAuthenticationProviderConfig { pub unsafe fn Uninitialize(&self, uconnectionparam: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Uninitialize)(windows_core::Interface::as_raw(self), core::mem::transmute(uconnectionparam)).ok() } - pub unsafe fn Configure(&self, uconnectionparam: usize, hwnd: P1, dwflags: u32, ureserved1: usize, ureserved2: usize) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), core::mem::transmute(uconnectionparam), hwnd.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ureserved1), core::mem::transmute(ureserved2)).ok() + pub unsafe fn Configure(&self, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, dwflags: u32, ureserved1: usize, ureserved2: usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), core::mem::transmute(uconnectionparam), core::mem::transmute(hwnd), core::mem::transmute(dwflags), core::mem::transmute(ureserved1), core::mem::transmute(ureserved2)).ok() } pub unsafe fn Activate(&self, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(uconnectionparam), core::mem::transmute(ureserved1), core::mem::transmute(ureserved2)).ok() @@ -1281,23 +1251,14 @@ impl IEAPProviderConfig { pub unsafe fn Uninitialize(&self, dweaptypeid: u32, uconnectionparam: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Uninitialize)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam)).ok() } - pub unsafe fn ServerInvokeConfigUI(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: P2, ureserved1: usize, ureserved2: usize) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ServerInvokeConfigUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), hwnd.param().abi(), core::mem::transmute(ureserved1), core::mem::transmute(ureserved2)).ok() + pub unsafe fn ServerInvokeConfigUI(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, ureserved1: usize, ureserved2: usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ServerInvokeConfigUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), core::mem::transmute(hwnd), core::mem::transmute(ureserved1), core::mem::transmute(ureserved2)).ok() } - pub unsafe fn RouterInvokeConfigUI(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: P2, dwflags: u32, pconnectiondatain: &[u8], ppconnectiondataout: *mut *mut u8, pdwsizeofconnectiondataout: *mut u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).RouterInvokeConfigUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), hwndparent.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), core::mem::transmute(ppconnectiondataout), core::mem::transmute(pdwsizeofconnectiondataout)).ok() + pub unsafe fn RouterInvokeConfigUI(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: super::super::Foundation::HWND, dwflags: u32, pconnectiondatain: &[u8], ppconnectiondataout: *mut *mut u8, pdwsizeofconnectiondataout: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RouterInvokeConfigUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), core::mem::transmute(hwndparent), core::mem::transmute(dwflags), core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), core::mem::transmute(ppconnectiondataout), core::mem::transmute(pdwsizeofconnectiondataout)).ok() } - pub unsafe fn RouterInvokeCredentialsUI(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: P2, dwflags: u32, pconnectiondatain: &[u8], puserdatain: &[u8], ppuserdataout: *mut *mut u8, pdwsizeofuserdataout: *mut u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).RouterInvokeCredentialsUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), hwndparent.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), core::mem::transmute(puserdatain.as_ptr()), puserdatain.len().try_into().unwrap(), core::mem::transmute(ppuserdataout), core::mem::transmute(pdwsizeofuserdataout)).ok() + pub unsafe fn RouterInvokeCredentialsUI(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: super::super::Foundation::HWND, dwflags: u32, pconnectiondatain: &[u8], puserdatain: &[u8], ppuserdataout: *mut *mut u8, pdwsizeofuserdataout: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RouterInvokeCredentialsUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), core::mem::transmute(hwndparent), core::mem::transmute(dwflags), core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), core::mem::transmute(puserdatain.as_ptr()), puserdatain.len().try_into().unwrap(), core::mem::transmute(ppuserdataout), core::mem::transmute(pdwsizeofuserdataout)).ok() } } #[repr(C)] @@ -1367,11 +1328,8 @@ impl core::ops::Deref for IEAPProviderConfig2 { } windows_core::imp::interface_hierarchy!(IEAPProviderConfig2, windows_core::IUnknown, IEAPProviderConfig); impl IEAPProviderConfig2 { - pub unsafe fn ServerInvokeConfigUI2(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: P2, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ServerInvokeConfigUI2)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), hwnd.param().abi(), core::mem::transmute(pconfigdatain), core::mem::transmute(dwsizeofconfigdatain), core::mem::transmute(ppconfigdataout), core::mem::transmute(pdwsizeofconfigdataout)).ok() + pub unsafe fn ServerInvokeConfigUI2(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ServerInvokeConfigUI2)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), core::mem::transmute(hwnd), core::mem::transmute(pconfigdatain), core::mem::transmute(dwsizeofconfigdatain), core::mem::transmute(ppconfigdataout), core::mem::transmute(pdwsizeofconfigdataout)).ok() } pub unsafe fn GetGlobalConfig(&self, dweaptypeid: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetGlobalConfig)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(ppconfigdataout), core::mem::transmute(pdwsizeofconfigdataout)).ok() @@ -1417,11 +1375,8 @@ impl core::ops::Deref for IEAPProviderConfig3 { } windows_core::imp::interface_hierarchy!(IEAPProviderConfig3, windows_core::IUnknown, IEAPProviderConfig, IEAPProviderConfig2); impl IEAPProviderConfig3 { - pub unsafe fn ServerInvokeCertificateConfigUI(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: P2, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32, ureserved: usize) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ServerInvokeCertificateConfigUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), hwnd.param().abi(), core::mem::transmute(pconfigdatain), core::mem::transmute(dwsizeofconfigdatain), core::mem::transmute(ppconfigdataout), core::mem::transmute(pdwsizeofconfigdataout), core::mem::transmute(ureserved)).ok() + pub unsafe fn ServerInvokeCertificateConfigUI(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32, ureserved: usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ServerInvokeCertificateConfigUI)(windows_core::Interface::as_raw(self), core::mem::transmute(dweaptypeid), core::mem::transmute(uconnectionparam), core::mem::transmute(hwnd), core::mem::transmute(pconfigdatain), core::mem::transmute(dwsizeofconfigdatain), core::mem::transmute(ppconfigdataout), core::mem::transmute(pdwsizeofconfigdataout), core::mem::transmute(ureserved)).ok() } } #[repr(C)] @@ -1451,21 +1406,19 @@ impl windows_core::RuntimeName for IEAPProviderConfig3 {} windows_core::imp::define_interface!(IRouterProtocolConfig, IRouterProtocolConfig_Vtbl, 0x66a2db16_d706_11d0_a37b_00c04fc9da04); windows_core::imp::interface_hierarchy!(IRouterProtocolConfig, windows_core::IUnknown); impl IRouterProtocolConfig { - pub unsafe fn AddProtocol(&self, pszmachinename: P0, dwtransportid: u32, dwprotocolid: u32, hwnd: P3, dwflags: u32, prouter: P5, ureserved1: usize) -> windows_core::Result<()> + pub unsafe fn AddProtocol(&self, pszmachinename: P0, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: P5, ureserved1: usize) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).AddProtocol)(windows_core::Interface::as_raw(self), pszmachinename.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(dwprotocolid), hwnd.param().abi(), core::mem::transmute(dwflags), prouter.param().abi(), core::mem::transmute(ureserved1)).ok() + (windows_core::Interface::vtable(self).AddProtocol)(windows_core::Interface::as_raw(self), pszmachinename.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(dwprotocolid), core::mem::transmute(hwnd), core::mem::transmute(dwflags), prouter.param().abi(), core::mem::transmute(ureserved1)).ok() } - pub unsafe fn RemoveProtocol(&self, pszmachinename: P0, dwtransportid: u32, dwprotocolid: u32, hwnd: P3, dwflags: u32, prouter: P5, ureserved1: usize) -> windows_core::Result<()> + pub unsafe fn RemoveProtocol(&self, pszmachinename: P0, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: P5, ureserved1: usize) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).RemoveProtocol)(windows_core::Interface::as_raw(self), pszmachinename.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(dwprotocolid), hwnd.param().abi(), core::mem::transmute(dwflags), prouter.param().abi(), core::mem::transmute(ureserved1)).ok() + (windows_core::Interface::vtable(self).RemoveProtocol)(windows_core::Interface::as_raw(self), pszmachinename.param().abi(), core::mem::transmute(dwtransportid), core::mem::transmute(dwprotocolid), core::mem::transmute(hwnd), core::mem::transmute(dwflags), prouter.param().abi(), core::mem::transmute(ureserved1)).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs index 2922e66850..a177749b39 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs @@ -27,14 +27,13 @@ where DeriveAppContainerSidFromAppContainerName(pszappcontainername.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DeriveRestrictedAppContainerSidFromAppContainerSidAndRestrictedName(psidappcontainersid: P0, pszrestrictedappcontainername: P1) -> windows_core::Result +pub unsafe fn DeriveRestrictedAppContainerSidFromAppContainerSidAndRestrictedName(psidappcontainersid: super::PSID, pszrestrictedappcontainername: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn DeriveRestrictedAppContainerSidFromAppContainerSidAndRestrictedName(psidappcontainersid : super:: PSID, pszrestrictedappcontainername : windows_core::PCWSTR, ppsidrestrictedappcontainersid : *mut super:: PSID) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DeriveRestrictedAppContainerSidFromAppContainerSidAndRestrictedName(psidappcontainersid.param().abi(), pszrestrictedappcontainername.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DeriveRestrictedAppContainerSidFromAppContainerSidAndRestrictedName(core::mem::transmute(psidappcontainersid), pszrestrictedappcontainername.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn GetAppContainerFolderPath(pszappcontainersid: P0) -> windows_core::Result @@ -46,13 +45,9 @@ where GetAppContainerFolderPath(pszappcontainersid.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetAppContainerNamedObjectPath(token: P0, appcontainersid: P1, objectpath: Option<&mut [u16]>, returnlength: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetAppContainerNamedObjectPath(token: Option, appcontainersid: Option, objectpath: Option<&mut [u16]>, returnlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetAppContainerNamedObjectPath(token : super::super::Foundation:: HANDLE, appcontainersid : super:: PSID, objectpathlength : u32, objectpath : windows_core::PWSTR, returnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetAppContainerNamedObjectPath(token.param().abi(), appcontainersid.param().abi(), objectpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(objectpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(returnlength)).ok() + GetAppContainerNamedObjectPath(core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(appcontainersid.unwrap_or(core::mem::zeroed())), objectpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(objectpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(returnlength)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] 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 9c46beed01..d6c2b1888d 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs @@ -1,18 +1,12 @@ #[inline] -pub unsafe fn OpenPersonalTrustDBDialog(hwndparent: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn OpenPersonalTrustDBDialog(hwndparent: Option) -> super::super::Foundation::BOOL { windows_targets::link!("wintrust.dll" "system" fn OpenPersonalTrustDBDialog(hwndparent : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - OpenPersonalTrustDBDialog(hwndparent.param().abi()) + OpenPersonalTrustDBDialog(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OpenPersonalTrustDBDialogEx(hwndparent: P0, dwflags: u32, pvreserved: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn OpenPersonalTrustDBDialogEx(hwndparent: Option, dwflags: u32, pvreserved: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null_mut()))) + OpenPersonalTrustDBDialogEx(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] @@ -49,29 +43,20 @@ where } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] -pub unsafe fn WTHelperProvDataFromStateData(hstatedata: P0) -> *mut CRYPT_PROVIDER_DATA -where - P0: windows_core::Param, -{ +pub unsafe fn WTHelperProvDataFromStateData(hstatedata: super::super::Foundation::HANDLE) -> *mut CRYPT_PROVIDER_DATA { windows_targets::link!("wintrust.dll" "system" fn WTHelperProvDataFromStateData(hstatedata : super::super::Foundation:: HANDLE) -> *mut CRYPT_PROVIDER_DATA); - WTHelperProvDataFromStateData(hstatedata.param().abi()) + WTHelperProvDataFromStateData(core::mem::transmute(hstatedata)) } #[inline] -pub unsafe fn WinVerifyTrust(hwnd: P0, pgactionid: *mut windows_core::GUID, pwvtdata: *mut core::ffi::c_void) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WinVerifyTrust(hwnd: super::super::Foundation::HWND, pgactionid: *mut windows_core::GUID, pwvtdata: *mut core::ffi::c_void) -> i32 { windows_targets::link!("wintrust.dll" "system" fn WinVerifyTrust(hwnd : super::super::Foundation:: HWND, pgactionid : *mut windows_core::GUID, pwvtdata : *mut core::ffi::c_void) -> i32); - WinVerifyTrust(hwnd.param().abi(), core::mem::transmute(pgactionid), core::mem::transmute(pwvtdata)) + WinVerifyTrust(core::mem::transmute(hwnd), core::mem::transmute(pgactionid), core::mem::transmute(pwvtdata)) } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] -pub unsafe fn WinVerifyTrustEx(hwnd: P0, pgactionid: *mut windows_core::GUID, pwintrustdata: *mut WINTRUST_DATA) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn WinVerifyTrustEx(hwnd: super::super::Foundation::HWND, pgactionid: *mut windows_core::GUID, pwintrustdata: *mut WINTRUST_DATA) -> i32 { windows_targets::link!("wintrust.dll" "system" fn WinVerifyTrustEx(hwnd : super::super::Foundation:: HWND, pgactionid : *mut windows_core::GUID, pwintrustdata : *mut WINTRUST_DATA) -> i32); - WinVerifyTrustEx(hwnd.param().abi(), core::mem::transmute(pgactionid), core::mem::transmute(pwintrustdata)) + WinVerifyTrustEx(core::mem::transmute(hwnd), core::mem::transmute(pgactionid), core::mem::transmute(pwintrustdata)) } #[inline] pub unsafe fn WintrustAddActionID(pgactionid: *const windows_core::GUID, fdwflags: u32, psprovinfo: *const CRYPT_REGISTER_ACTIONID) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Security/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/mod.rs index 80486edba9..09b85bf8a4 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/mod.rs @@ -31,55 +31,44 @@ pub mod WinTrust; #[cfg(feature = "Win32_Security_WinWlx")] pub mod WinWlx; #[inline] -pub unsafe fn AccessCheck(psecuritydescriptor: P0, clienttoken: P1, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, privilegeset: Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AccessCheck(psecuritydescriptor: PSECURITY_DESCRIPTOR, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, privilegeset: Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL) -> windows_core::Result<()> { 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(), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), core::mem::transmute(privilegeset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(privilegesetlength), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)).ok() + AccessCheck(core::mem::transmute(psecuritydescriptor), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), core::mem::transmute(privilegeset.unwrap_or(core::mem::zeroed())), core::mem::transmute(privilegesetlength), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)).ok() } #[inline] -pub unsafe fn AccessCheckAndAuditAlarmA(subsystemname: P0, handleid: Option<*const core::ffi::c_void>, objecttypename: P2, objectname: P3, securitydescriptor: P4, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn AccessCheckAndAuditAlarmA(subsystemname: P0, handleid: Option<*const core::ffi::c_void>, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, P7: 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(core::ptr::null())), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)).ok() + AccessCheckAndAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)).ok() } #[inline] -pub unsafe fn AccessCheckAndAuditAlarmW(subsystemname: P0, handleid: Option<*const core::ffi::c_void>, objecttypename: P2, objectname: P3, securitydescriptor: P4, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn AccessCheckAndAuditAlarmW(subsystemname: P0, handleid: Option<*const core::ffi::c_void>, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, P7: 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(core::ptr::null())), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)) + AccessCheckAndAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(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<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn AccessCheckByType(psecuritydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, clienttoken: super::Foundation::HANDLE, 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<()> { 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(), + core::mem::transmute(psecuritydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(clienttoken), core::mem::transmute(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()), core::mem::transmute(genericmapping), - core::mem::transmute(privilegeset.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(privilegeset.unwrap_or(core::mem::zeroed())), core::mem::transmute(privilegesetlength), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), @@ -87,13 +76,11 @@ where .ok() } #[inline] -pub unsafe fn AccessCheckByTypeAndAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: P4, principalselfsid: P5, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn AccessCheckByTypeAndAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P12: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeAndAuditAlarmA(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, accessstatus : *mut super::Foundation:: BOOL, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); @@ -102,8 +89,8 @@ where core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), @@ -118,13 +105,11 @@ where .ok() } #[inline] -pub unsafe fn AccessCheckByTypeAndAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: P4, principalselfsid: P5, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeAndAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P12: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeAndAuditAlarmW(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, grantedaccess : *mut u32, accessstatus : *mut super::Foundation:: BOOL, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); @@ -133,8 +118,8 @@ where core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), @@ -148,23 +133,29 @@ where ) } #[inline] -pub unsafe fn AccessCheckByTypeResultList(psecuritydescriptor: P0, principalselfsid: P1, clienttoken: P2, desiredaccess: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, privilegeset: Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccesslist: *mut u32, accessstatuslist: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn AccessCheckByTypeResultList(psecuritydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, privilegeset: Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccesslist: *mut u32, accessstatuslist: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(desiredaccess), core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), core::mem::transmute(privilegeset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(privilegesetlength), core::mem::transmute(grantedaccesslist), core::mem::transmute(accessstatuslist)).ok() + AccessCheckByTypeResultList( + core::mem::transmute(psecuritydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(clienttoken), + core::mem::transmute(desiredaccess), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), + core::mem::transmute(objecttypelistlength), + core::mem::transmute(genericmapping), + core::mem::transmute(privilegeset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(privilegesetlength), + core::mem::transmute(grantedaccesslist), + core::mem::transmute(accessstatuslist), + ) + .ok() } #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, 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: P12, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P12: 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); @@ -173,12 +164,12 @@ where core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), - core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), objectcreation.param().abi(), @@ -189,29 +180,26 @@ where .ok() } #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: P2, objecttypename: P3, objectname: P4, securitydescriptor: P5, principalselfsid: P6, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P13, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, objecttypename: P3, objectname: P4, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P13, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, P13: 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(), core::mem::transmute(handleid), - clienttoken.param().abi(), + core::mem::transmute(clienttoken), objecttypename.param().abi(), objectname.param().abi(), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), - core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), objectcreation.param().abi(), @@ -222,29 +210,26 @@ where .ok() } #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: P2, objecttypename: P3, objectname: P4, securitydescriptor: P5, principalselfsid: P6, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P13, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, objecttypename: P3, objectname: P4, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P13, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, P13: 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(), core::mem::transmute(handleid), - clienttoken.param().abi(), + core::mem::transmute(clienttoken), objecttypename.param().abi(), objectname.param().abi(), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), - core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), objectcreation.param().abi(), @@ -254,13 +239,11 @@ where ) } #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, 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: P12, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P12: 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); @@ -269,12 +252,12 @@ where core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), - securitydescriptor.param().abi(), - principalselfsid.param().abi(), + core::mem::transmute(securitydescriptor), + core::mem::transmute(principalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(audittype), core::mem::transmute(flags), - core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), objectcreation.param().abi(), @@ -284,52 +267,34 @@ where ) } #[inline] -pub unsafe fn AddAccessAllowedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: P3) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn AddAccessAllowedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: PSID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AddAccessAllowedAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, accessmask : u32, psid : PSID) -> super::Foundation:: BOOL); - AddAccessAllowedAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(accessmask), psid.param().abi()).ok() + AddAccessAllowedAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(accessmask), core::mem::transmute(psid)).ok() } #[inline] -pub unsafe fn AddAccessAllowedAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P4) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn AddAccessAllowedAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: PSID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AddAccessAllowedAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : PSID) -> super::Foundation:: BOOL); - AddAccessAllowedAceEx(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), psid.param().abi()).ok() + AddAccessAllowedAceEx(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(psid)).ok() } #[inline] -pub unsafe fn AddAccessAllowedObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: Option<*const windows_core::GUID>, inheritedobjecttypeguid: Option<*const windows_core::GUID>, psid: P6) -> windows_core::Result<()> -where - P6: windows_core::Param, -{ +pub unsafe fn AddAccessAllowedObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: Option<*const windows_core::GUID>, inheritedobjecttypeguid: Option<*const windows_core::GUID>, psid: PSID) -> windows_core::Result<()> { 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(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(objecttypeguid.unwrap_or(core::ptr::null())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::ptr::null())), psid.param().abi()).ok() + AddAccessAllowedObjectAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(objecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid)).ok() } #[inline] -pub unsafe fn AddAccessDeniedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: P3) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn AddAccessDeniedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: PSID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AddAccessDeniedAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, accessmask : u32, psid : PSID) -> super::Foundation:: BOOL); - AddAccessDeniedAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(accessmask), psid.param().abi()).ok() + AddAccessDeniedAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(accessmask), core::mem::transmute(psid)).ok() } #[inline] -pub unsafe fn AddAccessDeniedAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P4) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn AddAccessDeniedAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: PSID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AddAccessDeniedAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : PSID) -> super::Foundation:: BOOL); - AddAccessDeniedAceEx(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), psid.param().abi()).ok() + AddAccessDeniedAceEx(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(psid)).ok() } #[inline] -pub unsafe fn AddAccessDeniedObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: Option<*const windows_core::GUID>, inheritedobjecttypeguid: Option<*const windows_core::GUID>, psid: P6) -> windows_core::Result<()> -where - P6: windows_core::Param, -{ +pub unsafe fn AddAccessDeniedObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: Option<*const windows_core::GUID>, inheritedobjecttypeguid: Option<*const windows_core::GUID>, psid: PSID) -> windows_core::Result<()> { 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(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(objecttypeguid.unwrap_or(core::ptr::null())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::ptr::null())), psid.param().abi()).ok() + AddAccessDeniedObjectAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(objecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid)).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<()> { @@ -337,85 +302,70 @@ pub unsafe fn AddAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwstartingacei AddAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(dwstartingaceindex), core::mem::transmute(pacelist), core::mem::transmute(nacelistlength)).ok() } #[inline] -pub unsafe fn AddAuditAccessAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwaccessmask: u32, psid: P3, bauditsuccess: P4, bauditfailure: P5) -> windows_core::Result<()> +pub unsafe fn AddAuditAccessAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwaccessmask: u32, psid: PSID, bauditsuccess: P4, bauditfailure: P5) -> windows_core::Result<()> where - P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AddAuditAccessAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, dwaccessmask : u32, psid : PSID, bauditsuccess : super::Foundation:: BOOL, bauditfailure : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AddAuditAccessAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(dwaccessmask), psid.param().abi(), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() + AddAuditAccessAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(dwaccessmask), core::mem::transmute(psid), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() } #[inline] -pub unsafe fn AddAuditAccessAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, dwaccessmask: u32, psid: P4, bauditsuccess: P5, bauditfailure: P6) -> windows_core::Result<()> +pub unsafe fn AddAuditAccessAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, dwaccessmask: u32, psid: PSID, bauditsuccess: P5, bauditfailure: P6) -> windows_core::Result<()> where - P4: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AddAuditAccessAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, dwaccessmask : u32, psid : PSID, bauditsuccess : super::Foundation:: BOOL, bauditfailure : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AddAuditAccessAceEx(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(dwaccessmask), psid.param().abi(), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() + AddAuditAccessAceEx(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(dwaccessmask), core::mem::transmute(psid), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() } #[inline] -pub unsafe fn AddAuditAccessObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: Option<*const windows_core::GUID>, inheritedobjecttypeguid: Option<*const windows_core::GUID>, psid: P6, bauditsuccess: P7, bauditfailure: P8) -> windows_core::Result<()> +pub unsafe fn AddAuditAccessObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: Option<*const windows_core::GUID>, inheritedobjecttypeguid: Option<*const windows_core::GUID>, psid: PSID, bauditsuccess: P7, bauditfailure: P8) -> windows_core::Result<()> where - P6: windows_core::Param, P7: windows_core::Param, P8: 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(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(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() + AddAuditAccessObjectAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(objecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid), 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: P5, conditionstr: P6, returnlength: *mut u32) -> windows_core::Result<()> +pub unsafe fn AddConditionalAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, acetype: u8, accessmask: u32, psid: PSID, conditionstr: P6, returnlength: *mut u32) -> windows_core::Result<()> where - P5: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AddConditionalAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, acetype : u8, accessmask : u32, psid : PSID, conditionstr : windows_core::PCWSTR, returnlength : *mut u32) -> super::Foundation:: BOOL); - AddConditionalAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(acetype), core::mem::transmute(accessmask), psid.param().abi(), conditionstr.param().abi(), core::mem::transmute(returnlength)).ok() + AddConditionalAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(acetype), core::mem::transmute(accessmask), core::mem::transmute(psid), conditionstr.param().abi(), core::mem::transmute(returnlength)).ok() } #[inline] -pub unsafe fn AddMandatoryAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, mandatorypolicy: u32, plabelsid: P4) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn AddMandatoryAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, mandatorypolicy: u32, plabelsid: PSID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AddMandatoryAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, mandatorypolicy : u32, plabelsid : PSID) -> super::Foundation:: BOOL); - AddMandatoryAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(mandatorypolicy), plabelsid.param().abi()).ok() + AddMandatoryAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(mandatorypolicy), core::mem::transmute(plabelsid)).ok() } #[inline] -pub unsafe fn AddResourceAttributeAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P4, pattributeinfo: *const CLAIM_SECURITY_ATTRIBUTES_INFORMATION, preturnlength: *mut u32) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn AddResourceAttributeAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: PSID, pattributeinfo: *const CLAIM_SECURITY_ATTRIBUTES_INFORMATION, preturnlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn AddResourceAttributeAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : PSID, pattributeinfo : *const CLAIM_SECURITY_ATTRIBUTES_INFORMATION, preturnlength : *mut u32) -> super::Foundation:: BOOL); - AddResourceAttributeAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), psid.param().abi(), core::mem::transmute(pattributeinfo), core::mem::transmute(preturnlength)).ok() + AddResourceAttributeAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(psid), core::mem::transmute(pattributeinfo), core::mem::transmute(preturnlength)).ok() } #[inline] -pub unsafe fn AddScopedPolicyIDAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P4) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn AddScopedPolicyIDAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: PSID) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn AddScopedPolicyIDAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : PSID) -> super::Foundation:: BOOL); - AddScopedPolicyIDAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), psid.param().abi()).ok() + AddScopedPolicyIDAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(psid)).ok() } #[inline] -pub unsafe fn AdjustTokenGroups(tokenhandle: P0, resettodefault: P1, newstate: Option<*const TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut TOKEN_GROUPS>, returnlength: Option<*mut u32>) -> windows_core::Result<()> +pub unsafe fn AdjustTokenGroups(tokenhandle: super::Foundation::HANDLE, resettodefault: P1, newstate: Option<*const TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut TOKEN_GROUPS>, returnlength: Option<*mut u32>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))).ok() + AdjustTokenGroups(core::mem::transmute(tokenhandle), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).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<()> +pub unsafe fn AdjustTokenPrivileges(tokenhandle: super::Foundation::HANDLE, disableallprivileges: P1, newstate: Option<*const TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))).ok() + AdjustTokenPrivileges(core::mem::transmute(tokenhandle), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).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<()> { @@ -438,91 +388,73 @@ pub unsafe fn AreAnyAccessesGranted(grantedaccess: u32, desiredaccess: u32) -> s AreAnyAccessesGranted(core::mem::transmute(grantedaccess), core::mem::transmute(desiredaccess)) } #[inline] -pub unsafe fn CheckTokenCapability(tokenhandle: P0, capabilitysidtocheck: P1, hascapability: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CheckTokenCapability(tokenhandle: Option, capabilitysidtocheck: PSID, hascapability: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CheckTokenCapability(tokenhandle : super::Foundation:: HANDLE, capabilitysidtocheck : PSID, hascapability : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - CheckTokenCapability(tokenhandle.param().abi(), capabilitysidtocheck.param().abi(), core::mem::transmute(hascapability)).ok() + CheckTokenCapability(core::mem::transmute(tokenhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(capabilitysidtocheck), core::mem::transmute(hascapability)).ok() } #[inline] -pub unsafe fn CheckTokenMembership(tokenhandle: P0, sidtocheck: P1, ismember: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CheckTokenMembership(tokenhandle: Option, sidtocheck: PSID, ismember: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CheckTokenMembership(tokenhandle : super::Foundation:: HANDLE, sidtocheck : PSID, ismember : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - CheckTokenMembership(tokenhandle.param().abi(), sidtocheck.param().abi(), core::mem::transmute(ismember)).ok() + CheckTokenMembership(core::mem::transmute(tokenhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidtocheck), core::mem::transmute(ismember)).ok() } #[inline] -pub unsafe fn CheckTokenMembershipEx(tokenhandle: P0, sidtocheck: P1, flags: u32, ismember: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CheckTokenMembershipEx(tokenhandle: Option, sidtocheck: PSID, flags: u32, ismember: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CheckTokenMembershipEx(tokenhandle : super::Foundation:: HANDLE, sidtocheck : PSID, flags : u32, ismember : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - CheckTokenMembershipEx(tokenhandle.param().abi(), sidtocheck.param().abi(), core::mem::transmute(flags), core::mem::transmute(ismember)).ok() + CheckTokenMembershipEx(core::mem::transmute(tokenhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidtocheck), core::mem::transmute(flags), core::mem::transmute(ismember)).ok() } #[inline] -pub unsafe fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor: P0, currentsecuritydescriptor: P1, newsecuritydescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: P4, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> +pub unsafe fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor: Option, currentsecuritydescriptor: PSECURITY_DESCRIPTOR, newsecuritydescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: P4, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P4: 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(), core::mem::transmute(newsecuritydescriptor), core::mem::transmute(objecttype.unwrap_or(core::ptr::null())), isdirectoryobject.param().abi(), core::mem::transmute(genericmapping)).ok() + ConvertToAutoInheritPrivateObjectSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(currentsecuritydescriptor), core::mem::transmute(newsecuritydescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), isdirectoryobject.param().abi(), core::mem::transmute(genericmapping)).ok() } #[inline] -pub unsafe fn CopySid(ndestinationsidlength: u32, pdestinationsid: PSID, psourcesid: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn CopySid(ndestinationsidlength: u32, pdestinationsid: PSID, psourcesid: PSID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CopySid(ndestinationsidlength : u32, pdestinationsid : PSID, psourcesid : PSID) -> super::Foundation:: BOOL); - CopySid(core::mem::transmute(ndestinationsidlength), core::mem::transmute(pdestinationsid), psourcesid.param().abi()).ok() + CopySid(core::mem::transmute(ndestinationsidlength), core::mem::transmute(pdestinationsid), core::mem::transmute(psourcesid)).ok() } #[inline] -pub unsafe fn CreatePrivateObjectSecurity(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, isdirectoryobject: P3, token: P4, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> +pub unsafe fn CreatePrivateObjectSecurity(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, isdirectoryobject: P3, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurity(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, isdirectoryobject : super::Foundation:: BOOL, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - CreatePrivateObjectSecurity(parentdescriptor.param().abi(), creatordescriptor.param().abi(), core::mem::transmute(newdescriptor), isdirectoryobject.param().abi(), token.param().abi(), core::mem::transmute(genericmapping)).ok() + CreatePrivateObjectSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(creatordescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), isdirectoryobject.param().abi(), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping)).ok() } #[inline] -pub unsafe fn CreatePrivateObjectSecurityEx(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, iscontainerobject: P4, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: P6, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> +pub unsafe fn CreatePrivateObjectSecurityEx(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, iscontainerobject: P4, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P4: windows_core::Param, - P6: 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(), core::mem::transmute(newdescriptor), core::mem::transmute(objecttype.unwrap_or(core::ptr::null())), iscontainerobject.param().abi(), core::mem::transmute(autoinheritflags), token.param().abi(), core::mem::transmute(genericmapping)).ok() + CreatePrivateObjectSecurityEx(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(creatordescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), iscontainerobject.param().abi(), core::mem::transmute(autoinheritflags), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping)).ok() } #[inline] -pub unsafe fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttypes: Option<&[*const windows_core::GUID]>, iscontainerobject: P5, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: P7, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> +pub unsafe fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttypes: Option<&[*const windows_core::GUID]>, iscontainerobject: P5, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P5: windows_core::Param, - P7: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, objecttypes : *const *const windows_core::GUID, guidcount : u32, iscontainerobject : super::Foundation:: BOOL, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor.param().abi(), creatordescriptor.param().abi(), core::mem::transmute(newdescriptor), core::mem::transmute(objecttypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), iscontainerobject.param().abi(), core::mem::transmute(autoinheritflags), token.param().abi(), core::mem::transmute(genericmapping)).ok() + CreatePrivateObjectSecurityWithMultipleInheritance( + core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), + core::mem::transmute(creatordescriptor.unwrap_or(core::mem::zeroed())), + core::mem::transmute(newdescriptor), + core::mem::transmute(objecttypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + objecttypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + iscontainerobject.param().abi(), + core::mem::transmute(autoinheritflags), + core::mem::transmute(token.unwrap_or(core::mem::zeroed())), + core::mem::transmute(genericmapping), + ) + .ok() } #[inline] -pub unsafe fn CreateRestrictedToken(existingtokenhandle: P0, flags: CREATE_RESTRICTED_TOKEN_FLAGS, sidstodisable: Option<&[SID_AND_ATTRIBUTES]>, privilegestodelete: Option<&[LUID_AND_ATTRIBUTES]>, sidstorestrict: Option<&[SID_AND_ATTRIBUTES]>, newtokenhandle: *mut super::Foundation::HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CreateRestrictedToken(existingtokenhandle: super::Foundation::HANDLE, flags: CREATE_RESTRICTED_TOKEN_FLAGS, sidstodisable: Option<&[SID_AND_ATTRIBUTES]>, privilegestodelete: Option<&[LUID_AND_ATTRIBUTES]>, sidstorestrict: Option<&[SID_AND_ATTRIBUTES]>, newtokenhandle: *mut super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CreateRestrictedToken(existingtokenhandle : super::Foundation:: HANDLE, flags : CREATE_RESTRICTED_TOKEN_FLAGS, disablesidcount : u32, sidstodisable : *const SID_AND_ATTRIBUTES, deleteprivilegecount : u32, privilegestodelete : *const LUID_AND_ATTRIBUTES, restrictedsidcount : u32, sidstorestrict : *const SID_AND_ATTRIBUTES, newtokenhandle : *mut super::Foundation:: HANDLE) -> super::Foundation:: BOOL); CreateRestrictedToken( - existingtokenhandle.param().abi(), + core::mem::transmute(existingtokenhandle), core::mem::transmute(flags), sidstodisable.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(sidstodisable.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -535,12 +467,9 @@ where .ok() } #[inline] -pub unsafe fn CreateWellKnownSid(wellknownsidtype: WELL_KNOWN_SID_TYPE, domainsid: P1, psid: PSID, cbsid: *mut u32) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn CreateWellKnownSid(wellknownsidtype: WELL_KNOWN_SID_TYPE, domainsid: Option, psid: Option, cbsid: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CreateWellKnownSid(wellknownsidtype : WELL_KNOWN_SID_TYPE, domainsid : PSID, psid : PSID, cbsid : *mut u32) -> super::Foundation:: BOOL); - CreateWellKnownSid(core::mem::transmute(wellknownsidtype), domainsid.param().abi(), core::mem::transmute(psid), core::mem::transmute(cbsid)).ok() + CreateWellKnownSid(core::mem::transmute(wellknownsidtype), core::mem::transmute(domainsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsid)).ok() } #[inline] pub unsafe fn DeleteAce(pacl: *mut ACL, dwaceindex: u32) -> windows_core::Result<()> { @@ -561,47 +490,29 @@ pub unsafe fn DestroyPrivateObjectSecurity(objectdescriptor: *const PSECURITY_DE DestroyPrivateObjectSecurity(core::mem::transmute(objectdescriptor)).ok() } #[inline] -pub unsafe fn DuplicateToken(existingtokenhandle: P0, impersonationlevel: SECURITY_IMPERSONATION_LEVEL, duplicatetokenhandle: *mut super::Foundation::HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DuplicateToken(existingtokenhandle: super::Foundation::HANDLE, impersonationlevel: SECURITY_IMPERSONATION_LEVEL, duplicatetokenhandle: *mut super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn DuplicateToken(existingtokenhandle : super::Foundation:: HANDLE, impersonationlevel : SECURITY_IMPERSONATION_LEVEL, duplicatetokenhandle : *mut super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - DuplicateToken(existingtokenhandle.param().abi(), core::mem::transmute(impersonationlevel), core::mem::transmute(duplicatetokenhandle)).ok() + DuplicateToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(impersonationlevel), core::mem::transmute(duplicatetokenhandle)).ok() } #[inline] -pub unsafe fn DuplicateTokenEx(hexistingtoken: P0, dwdesiredaccess: TOKEN_ACCESS_MASK, lptokenattributes: Option<*const SECURITY_ATTRIBUTES>, impersonationlevel: SECURITY_IMPERSONATION_LEVEL, tokentype: TOKEN_TYPE, phnewtoken: *mut super::Foundation::HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DuplicateTokenEx(hexistingtoken: super::Foundation::HANDLE, dwdesiredaccess: TOKEN_ACCESS_MASK, lptokenattributes: Option<*const SECURITY_ATTRIBUTES>, impersonationlevel: SECURITY_IMPERSONATION_LEVEL, tokentype: TOKEN_TYPE, phnewtoken: *mut super::Foundation::HANDLE) -> windows_core::Result<()> { 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lptokenattributes.unwrap_or(core::ptr::null())), core::mem::transmute(impersonationlevel), core::mem::transmute(tokentype), core::mem::transmute(phnewtoken)).ok() + DuplicateTokenEx(core::mem::transmute(hexistingtoken), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lptokenattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(impersonationlevel), core::mem::transmute(tokentype), core::mem::transmute(phnewtoken)).ok() } #[inline] -pub unsafe fn EqualDomainSid(psid1: P0, psid2: P1, pfequal: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EqualDomainSid(psid1: PSID, psid2: PSID, pfequal: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn EqualDomainSid(psid1 : PSID, psid2 : PSID, pfequal : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - EqualDomainSid(psid1.param().abi(), psid2.param().abi(), core::mem::transmute(pfequal)).ok() + EqualDomainSid(core::mem::transmute(psid1), core::mem::transmute(psid2), core::mem::transmute(pfequal)).ok() } #[inline] -pub unsafe fn EqualPrefixSid(psid1: P0, psid2: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EqualPrefixSid(psid1: PSID, psid2: PSID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn EqualPrefixSid(psid1 : PSID, psid2 : PSID) -> super::Foundation:: BOOL); - EqualPrefixSid(psid1.param().abi(), psid2.param().abi()).ok() + EqualPrefixSid(core::mem::transmute(psid1), core::mem::transmute(psid2)).ok() } #[inline] -pub unsafe fn EqualSid(psid1: P0, psid2: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EqualSid(psid1: PSID, psid2: PSID) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn EqualSid(psid1 : PSID, psid2 : PSID) -> super::Foundation:: BOOL); - EqualSid(psid1.param().abi(), psid2.param().abi()).ok() + EqualSid(core::mem::transmute(psid1), core::mem::transmute(psid2)).ok() } #[inline] pub unsafe fn FindFirstFreeAce(pacl: *const ACL, pace: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -609,12 +520,9 @@ pub unsafe fn FindFirstFreeAce(pacl: *const ACL, pace: *mut *mut core::ffi::c_vo FindFirstFreeAce(core::mem::transmute(pacl), core::mem::transmute(pace)).ok() } #[inline] -pub unsafe fn FreeSid(psid: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn FreeSid(psid: PSID) -> *mut core::ffi::c_void { windows_targets::link!("advapi32.dll" "system" fn FreeSid(psid : PSID) -> *mut core::ffi::c_void); - FreeSid(psid.param().abi()) + FreeSid(core::mem::transmute(psid)) } #[inline] pub unsafe fn GetAce(pacl: *const ACL, dwaceindex: u32, pace: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -629,39 +537,33 @@ 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(core::mem::transmute(acl), core::mem::transmute(startingaceindex), core::mem::transmute(appcontainerace), core::mem::transmute(appcontaineraceindex.unwrap_or(core::ptr::null_mut()))) + GetAppContainerAce(core::mem::transmute(acl), core::mem::transmute(startingaceindex), core::mem::transmute(appcontainerace), core::mem::transmute(appcontaineraceindex.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetCachedSigningLevel(file: super::Foundation::HANDLE, flags: *mut u32, signinglevel: *mut u32, thumbprint: Option<*mut u8>, thumbprintsize: Option<*mut u32>, thumbprintalgorithm: Option<*mut u32>) -> super::Foundation::BOOL { 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(), core::mem::transmute(flags), core::mem::transmute(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()))) + GetCachedSigningLevel(core::mem::transmute(file), core::mem::transmute(flags), core::mem::transmute(signinglevel), core::mem::transmute(thumbprint.unwrap_or(core::mem::zeroed())), core::mem::transmute(thumbprintsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(thumbprintalgorithm.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetFileSecurityA(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> +pub unsafe fn GetFileSecurityA(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: Option, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetFileSecurityA(lpfilename : windows_core::PCSTR, requestedinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::Foundation:: BOOL); - GetFileSecurityA(lpfilename.param().abi(), core::mem::transmute(requestedinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() + GetFileSecurityA(lpfilename.param().abi(), core::mem::transmute(requestedinformation), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() } #[inline] -pub unsafe fn GetFileSecurityW(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetFileSecurityW(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: Option, nlength: u32, lpnlengthneeded: *mut u32) -> super::Foundation::BOOL where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetFileSecurityW(lpfilename : windows_core::PCWSTR, requestedinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::Foundation:: BOOL); - GetFileSecurityW(lpfilename.param().abi(), core::mem::transmute(requestedinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)) + GetFileSecurityW(lpfilename.param().abi(), core::mem::transmute(requestedinformation), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)) } #[inline] -pub unsafe fn GetKernelObjectSecurity(handle: P0, requestedinformation: u32, psecuritydescriptor: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetKernelObjectSecurity(handle: super::Foundation::HANDLE, requestedinformation: u32, psecuritydescriptor: Option, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetKernelObjectSecurity(handle : super::Foundation:: HANDLE, requestedinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::Foundation:: BOOL); - GetKernelObjectSecurity(handle.param().abi(), core::mem::transmute(requestedinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() + GetKernelObjectSecurity(core::mem::transmute(handle), core::mem::transmute(requestedinformation), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() } #[inline] pub unsafe fn GetLengthSid(psid: PSID) -> u32 { @@ -669,76 +571,49 @@ pub unsafe fn GetLengthSid(psid: PSID) -> u32 { GetLengthSid(core::mem::transmute(psid)) } #[inline] -pub unsafe fn GetPrivateObjectSecurity(objectdescriptor: P0, securityinformation: OBJECT_SECURITY_INFORMATION, resultantdescriptor: PSECURITY_DESCRIPTOR, descriptorlength: u32, returnlength: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetPrivateObjectSecurity(objectdescriptor: PSECURITY_DESCRIPTOR, securityinformation: OBJECT_SECURITY_INFORMATION, resultantdescriptor: Option, descriptorlength: u32, returnlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetPrivateObjectSecurity(objectdescriptor : PSECURITY_DESCRIPTOR, securityinformation : OBJECT_SECURITY_INFORMATION, resultantdescriptor : PSECURITY_DESCRIPTOR, descriptorlength : u32, returnlength : *mut u32) -> super::Foundation:: BOOL); - GetPrivateObjectSecurity(objectdescriptor.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(resultantdescriptor), core::mem::transmute(descriptorlength), core::mem::transmute(returnlength)).ok() + GetPrivateObjectSecurity(core::mem::transmute(objectdescriptor), core::mem::transmute(securityinformation), core::mem::transmute(resultantdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(descriptorlength), core::mem::transmute(returnlength)).ok() } #[inline] -pub unsafe fn GetSecurityDescriptorControl(psecuritydescriptor: P0, pcontrol: *mut u16, lpdwrevision: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetSecurityDescriptorControl(psecuritydescriptor: PSECURITY_DESCRIPTOR, pcontrol: *mut u16, lpdwrevision: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorControl(psecuritydescriptor : PSECURITY_DESCRIPTOR, pcontrol : *mut u16, lpdwrevision : *mut u32) -> super::Foundation:: BOOL); - GetSecurityDescriptorControl(psecuritydescriptor.param().abi(), core::mem::transmute(pcontrol), core::mem::transmute(lpdwrevision)).ok() + GetSecurityDescriptorControl(core::mem::transmute(psecuritydescriptor), core::mem::transmute(pcontrol), core::mem::transmute(lpdwrevision)).ok() } #[inline] -pub unsafe fn GetSecurityDescriptorDacl(psecuritydescriptor: P0, lpbdaclpresent: *mut super::Foundation::BOOL, pdacl: *mut *mut ACL, lpbdacldefaulted: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetSecurityDescriptorDacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, lpbdaclpresent: *mut super::Foundation::BOOL, pdacl: *mut *mut ACL, lpbdacldefaulted: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorDacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, lpbdaclpresent : *mut super::Foundation:: BOOL, pdacl : *mut *mut ACL, lpbdacldefaulted : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - GetSecurityDescriptorDacl(psecuritydescriptor.param().abi(), core::mem::transmute(lpbdaclpresent), core::mem::transmute(pdacl), core::mem::transmute(lpbdacldefaulted)).ok() + GetSecurityDescriptorDacl(core::mem::transmute(psecuritydescriptor), core::mem::transmute(lpbdaclpresent), core::mem::transmute(pdacl), core::mem::transmute(lpbdacldefaulted)).ok() } #[inline] -pub unsafe fn GetSecurityDescriptorGroup(psecuritydescriptor: P0, pgroup: *mut PSID, lpbgroupdefaulted: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: *mut PSID, lpbgroupdefaulted: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorGroup(psecuritydescriptor : PSECURITY_DESCRIPTOR, pgroup : *mut PSID, lpbgroupdefaulted : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - GetSecurityDescriptorGroup(psecuritydescriptor.param().abi(), core::mem::transmute(pgroup), core::mem::transmute(lpbgroupdefaulted)).ok() + GetSecurityDescriptorGroup(core::mem::transmute(psecuritydescriptor), core::mem::transmute(pgroup), core::mem::transmute(lpbgroupdefaulted)).ok() } #[inline] -pub unsafe fn GetSecurityDescriptorLength(psecuritydescriptor: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSecurityDescriptorLength(psecuritydescriptor: PSECURITY_DESCRIPTOR) -> u32 { windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorLength(psecuritydescriptor : PSECURITY_DESCRIPTOR) -> u32); - GetSecurityDescriptorLength(psecuritydescriptor.param().abi()) + GetSecurityDescriptorLength(core::mem::transmute(psecuritydescriptor)) } #[inline] -pub unsafe fn GetSecurityDescriptorOwner(psecuritydescriptor: P0, powner: *mut PSID, lpbownerdefaulted: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetSecurityDescriptorOwner(psecuritydescriptor: PSECURITY_DESCRIPTOR, powner: *mut PSID, lpbownerdefaulted: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorOwner(psecuritydescriptor : PSECURITY_DESCRIPTOR, powner : *mut PSID, lpbownerdefaulted : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - GetSecurityDescriptorOwner(psecuritydescriptor.param().abi(), core::mem::transmute(powner), core::mem::transmute(lpbownerdefaulted)).ok() + GetSecurityDescriptorOwner(core::mem::transmute(psecuritydescriptor), core::mem::transmute(powner), core::mem::transmute(lpbownerdefaulted)).ok() } #[inline] -pub unsafe fn GetSecurityDescriptorRMControl(securitydescriptor: P0, rmcontrol: *mut u8) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSecurityDescriptorRMControl(securitydescriptor: PSECURITY_DESCRIPTOR, rmcontrol: *mut u8) -> u32 { windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorRMControl(securitydescriptor : PSECURITY_DESCRIPTOR, rmcontrol : *mut u8) -> u32); - GetSecurityDescriptorRMControl(securitydescriptor.param().abi(), core::mem::transmute(rmcontrol)) + GetSecurityDescriptorRMControl(core::mem::transmute(securitydescriptor), core::mem::transmute(rmcontrol)) } #[inline] -pub unsafe fn GetSecurityDescriptorSacl(psecuritydescriptor: P0, lpbsaclpresent: *mut super::Foundation::BOOL, psacl: *mut *mut ACL, lpbsacldefaulted: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetSecurityDescriptorSacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, lpbsaclpresent: *mut super::Foundation::BOOL, psacl: *mut *mut ACL, lpbsacldefaulted: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorSacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, lpbsaclpresent : *mut super::Foundation:: BOOL, psacl : *mut *mut ACL, lpbsacldefaulted : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - GetSecurityDescriptorSacl(psecuritydescriptor.param().abi(), core::mem::transmute(lpbsaclpresent), core::mem::transmute(psacl), core::mem::transmute(lpbsacldefaulted)).ok() + GetSecurityDescriptorSacl(core::mem::transmute(psecuritydescriptor), core::mem::transmute(lpbsaclpresent), core::mem::transmute(psacl), core::mem::transmute(lpbsacldefaulted)).ok() } #[inline] -pub unsafe fn GetSidIdentifierAuthority(psid: P0) -> *mut SID_IDENTIFIER_AUTHORITY -where - P0: windows_core::Param, -{ +pub unsafe fn GetSidIdentifierAuthority(psid: PSID) -> *mut SID_IDENTIFIER_AUTHORITY { windows_targets::link!("advapi32.dll" "system" fn GetSidIdentifierAuthority(psid : PSID) -> *mut SID_IDENTIFIER_AUTHORITY); - GetSidIdentifierAuthority(psid.param().abi()) + GetSidIdentifierAuthority(core::mem::transmute(psid)) } #[inline] pub unsafe fn GetSidLengthRequired(nsubauthoritycount: u8) -> u32 { @@ -746,60 +621,39 @@ pub unsafe fn GetSidLengthRequired(nsubauthoritycount: u8) -> u32 { GetSidLengthRequired(core::mem::transmute(nsubauthoritycount)) } #[inline] -pub unsafe fn GetSidSubAuthority(psid: P0, nsubauthority: u32) -> *mut u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSidSubAuthority(psid: PSID, nsubauthority: u32) -> *mut u32 { windows_targets::link!("advapi32.dll" "system" fn GetSidSubAuthority(psid : PSID, nsubauthority : u32) -> *mut u32); - GetSidSubAuthority(psid.param().abi(), core::mem::transmute(nsubauthority)) + GetSidSubAuthority(core::mem::transmute(psid), core::mem::transmute(nsubauthority)) } #[inline] -pub unsafe fn GetSidSubAuthorityCount(psid: P0) -> *mut u8 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSidSubAuthorityCount(psid: PSID) -> *mut u8 { windows_targets::link!("advapi32.dll" "system" fn GetSidSubAuthorityCount(psid : PSID) -> *mut u8); - GetSidSubAuthorityCount(psid.param().abi()) + GetSidSubAuthorityCount(core::mem::transmute(psid)) } #[inline] -pub unsafe fn GetTokenInformation(tokenhandle: P0, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: Option<*mut core::ffi::c_void>, tokeninformationlength: u32, returnlength: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetTokenInformation(tokenhandle: super::Foundation::HANDLE, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: Option<*mut core::ffi::c_void>, tokeninformationlength: u32, returnlength: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(tokeninformationlength), core::mem::transmute(returnlength)).ok() + GetTokenInformation(core::mem::transmute(tokenhandle), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(tokeninformationlength), core::mem::transmute(returnlength)).ok() } #[inline] -pub unsafe fn GetUserObjectSecurity(hobj: P0, psirequested: *const u32, psid: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetUserObjectSecurity(hobj: super::Foundation::HANDLE, psirequested: *const u32, psid: Option, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetUserObjectSecurity(hobj : super::Foundation:: HANDLE, psirequested : *const u32, psid : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::Foundation:: BOOL); - GetUserObjectSecurity(hobj.param().abi(), core::mem::transmute(psirequested), core::mem::transmute(psid), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() + GetUserObjectSecurity(core::mem::transmute(hobj), core::mem::transmute(psirequested), core::mem::transmute(psid.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() } #[inline] -pub unsafe fn GetWindowsAccountDomainSid(psid: P0, pdomainsid: PSID, cbdomainsid: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowsAccountDomainSid(psid: PSID, pdomainsid: Option, cbdomainsid: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetWindowsAccountDomainSid(psid : PSID, pdomainsid : PSID, cbdomainsid : *mut u32) -> super::Foundation:: BOOL); - GetWindowsAccountDomainSid(psid.param().abi(), core::mem::transmute(pdomainsid), core::mem::transmute(cbdomainsid)).ok() + GetWindowsAccountDomainSid(core::mem::transmute(psid), core::mem::transmute(pdomainsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdomainsid)).ok() } #[inline] -pub unsafe fn ImpersonateAnonymousToken(threadhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImpersonateAnonymousToken(threadhandle: super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ImpersonateAnonymousToken(threadhandle : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - ImpersonateAnonymousToken(threadhandle.param().abi()).ok() + ImpersonateAnonymousToken(core::mem::transmute(threadhandle)).ok() } #[inline] -pub unsafe fn ImpersonateLoggedOnUser(htoken: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImpersonateLoggedOnUser(htoken: super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ImpersonateLoggedOnUser(htoken : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - ImpersonateLoggedOnUser(htoken.param().abi()).ok() + ImpersonateLoggedOnUser(core::mem::transmute(htoken)).ok() } #[inline] pub unsafe fn ImpersonateSelf(impersonationlevel: SECURITY_IMPERSONATION_LEVEL) -> windows_core::Result<()> { @@ -822,12 +676,9 @@ pub unsafe fn InitializeSid(sid: PSID, pidentifierauthority: *const SID_IDENTIFI InitializeSid(core::mem::transmute(sid), core::mem::transmute(pidentifierauthority), core::mem::transmute(nsubauthoritycount)).ok() } #[inline] -pub unsafe fn IsTokenRestricted(tokenhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn IsTokenRestricted(tokenhandle: super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn IsTokenRestricted(tokenhandle : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - IsTokenRestricted(tokenhandle.param().abi()).ok() + IsTokenRestricted(core::mem::transmute(tokenhandle)).ok() } #[inline] pub unsafe fn IsValidAcl(pacl: *const ACL) -> super::Foundation::BOOL { @@ -835,28 +686,19 @@ pub unsafe fn IsValidAcl(pacl: *const ACL) -> super::Foundation::BOOL { IsValidAcl(core::mem::transmute(pacl)) } #[inline] -pub unsafe fn IsValidSecurityDescriptor(psecuritydescriptor: P0) -> super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsValidSecurityDescriptor(psecuritydescriptor: PSECURITY_DESCRIPTOR) -> super::Foundation::BOOL { windows_targets::link!("advapi32.dll" "system" fn IsValidSecurityDescriptor(psecuritydescriptor : PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - IsValidSecurityDescriptor(psecuritydescriptor.param().abi()) + IsValidSecurityDescriptor(core::mem::transmute(psecuritydescriptor)) } #[inline] -pub unsafe fn IsValidSid(psid: P0) -> super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsValidSid(psid: PSID) -> super::Foundation::BOOL { windows_targets::link!("advapi32.dll" "system" fn IsValidSid(psid : PSID) -> super::Foundation:: BOOL); - IsValidSid(psid.param().abi()) + IsValidSid(core::mem::transmute(psid)) } #[inline] -pub unsafe fn IsWellKnownSid(psid: P0, wellknownsidtype: WELL_KNOWN_SID_TYPE) -> super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsWellKnownSid(psid: PSID, wellknownsidtype: WELL_KNOWN_SID_TYPE) -> super::Foundation::BOOL { windows_targets::link!("advapi32.dll" "system" fn IsWellKnownSid(psid : PSID, wellknownsidtype : WELL_KNOWN_SID_TYPE) -> super::Foundation:: BOOL); - IsWellKnownSid(psid.param().abi(), core::mem::transmute(wellknownsidtype)) + IsWellKnownSid(core::mem::transmute(psid), core::mem::transmute(wellknownsidtype)) } #[inline] pub unsafe fn LogonUserA(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: *mut super::Foundation::HANDLE) -> windows_core::Result<()> @@ -882,11 +724,11 @@ where lpszpassword.param().abi(), core::mem::transmute(dwlogontype), core::mem::transmute(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())), + core::mem::transmute(phtoken.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pplogonsid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppprofilebuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwprofilelength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pquotalimits.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -904,11 +746,11 @@ where lpszpassword.param().abi(), core::mem::transmute(dwlogontype), core::mem::transmute(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())), + core::mem::transmute(phtoken.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pplogonsid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppprofilebuffer.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwprofilelength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pquotalimits.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -923,74 +765,72 @@ where LogonUserW(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), core::mem::transmute(dwlogontype), core::mem::transmute(dwlogonprovider), core::mem::transmute(phtoken)).ok() } #[inline] -pub unsafe fn LookupAccountNameA(lpsystemname: P0, lpaccountname: P1, sid: PSID, cbsid: *mut u32, referenceddomainname: windows_core::PSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> windows_core::Result<()> +pub unsafe fn LookupAccountNameA(lpsystemname: P0, lpaccountname: P1, sid: Option, cbsid: *mut u32, referenceddomainname: Option, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupAccountNameA(lpsystemname : windows_core::PCSTR, lpaccountname : windows_core::PCSTR, sid : PSID, cbsid : *mut u32, referenceddomainname : windows_core::PSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> super::Foundation:: BOOL); - LookupAccountNameA(lpsystemname.param().abi(), lpaccountname.param().abi(), core::mem::transmute(sid), core::mem::transmute(cbsid), core::mem::transmute(referenceddomainname), core::mem::transmute(cchreferenceddomainname), core::mem::transmute(peuse)).ok() + LookupAccountNameA(lpsystemname.param().abi(), lpaccountname.param().abi(), core::mem::transmute(sid.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsid), core::mem::transmute(referenceddomainname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchreferenceddomainname), core::mem::transmute(peuse)).ok() } #[inline] -pub unsafe fn LookupAccountNameW(lpsystemname: P0, lpaccountname: P1, sid: PSID, cbsid: *mut u32, referenceddomainname: windows_core::PWSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> windows_core::Result<()> +pub unsafe fn LookupAccountNameW(lpsystemname: P0, lpaccountname: P1, sid: Option, cbsid: *mut u32, referenceddomainname: Option, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupAccountNameW(lpsystemname : windows_core::PCWSTR, lpaccountname : windows_core::PCWSTR, sid : PSID, cbsid : *mut u32, referenceddomainname : windows_core::PWSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> super::Foundation:: BOOL); - LookupAccountNameW(lpsystemname.param().abi(), lpaccountname.param().abi(), core::mem::transmute(sid), core::mem::transmute(cbsid), core::mem::transmute(referenceddomainname), core::mem::transmute(cchreferenceddomainname), core::mem::transmute(peuse)).ok() + LookupAccountNameW(lpsystemname.param().abi(), lpaccountname.param().abi(), core::mem::transmute(sid.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsid), core::mem::transmute(referenceddomainname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchreferenceddomainname), core::mem::transmute(peuse)).ok() } #[inline] -pub unsafe fn LookupAccountSidA(lpsystemname: P0, sid: P1, name: windows_core::PSTR, cchname: *mut u32, referenceddomainname: windows_core::PSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> windows_core::Result<()> +pub unsafe fn LookupAccountSidA(lpsystemname: P0, sid: PSID, name: Option, cchname: *mut u32, referenceddomainname: Option, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupAccountSidA(lpsystemname : windows_core::PCSTR, sid : PSID, name : windows_core::PSTR, cchname : *mut u32, referenceddomainname : windows_core::PSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> super::Foundation:: BOOL); - LookupAccountSidA(lpsystemname.param().abi(), sid.param().abi(), core::mem::transmute(name), core::mem::transmute(cchname), core::mem::transmute(referenceddomainname), core::mem::transmute(cchreferenceddomainname), core::mem::transmute(peuse)).ok() + LookupAccountSidA(lpsystemname.param().abi(), core::mem::transmute(sid), core::mem::transmute(name.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchname), core::mem::transmute(referenceddomainname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchreferenceddomainname), core::mem::transmute(peuse)).ok() } #[inline] -pub unsafe fn LookupAccountSidW(lpsystemname: P0, sid: P1, name: windows_core::PWSTR, cchname: *mut u32, referenceddomainname: windows_core::PWSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> windows_core::Result<()> +pub unsafe fn LookupAccountSidW(lpsystemname: P0, sid: PSID, name: Option, cchname: *mut u32, referenceddomainname: Option, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupAccountSidW(lpsystemname : windows_core::PCWSTR, sid : PSID, name : windows_core::PWSTR, cchname : *mut u32, referenceddomainname : windows_core::PWSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> super::Foundation:: BOOL); - LookupAccountSidW(lpsystemname.param().abi(), sid.param().abi(), core::mem::transmute(name), core::mem::transmute(cchname), core::mem::transmute(referenceddomainname), core::mem::transmute(cchreferenceddomainname), core::mem::transmute(peuse)).ok() + LookupAccountSidW(lpsystemname.param().abi(), core::mem::transmute(sid), core::mem::transmute(name.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchname), core::mem::transmute(referenceddomainname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchreferenceddomainname), core::mem::transmute(peuse)).ok() } #[inline] -pub unsafe fn LookupPrivilegeDisplayNameA(lpsystemname: P0, lpname: P1, lpdisplayname: windows_core::PSTR, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> windows_core::Result<()> +pub unsafe fn LookupPrivilegeDisplayNameA(lpsystemname: P0, lpname: P1, lpdisplayname: Option, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeDisplayNameA(lpsystemname : windows_core::PCSTR, lpname : windows_core::PCSTR, lpdisplayname : windows_core::PSTR, cchdisplayname : *mut u32, lplanguageid : *mut u32) -> super::Foundation:: BOOL); - LookupPrivilegeDisplayNameA(lpsystemname.param().abi(), lpname.param().abi(), core::mem::transmute(lpdisplayname), core::mem::transmute(cchdisplayname), core::mem::transmute(lplanguageid)).ok() + LookupPrivilegeDisplayNameA(lpsystemname.param().abi(), lpname.param().abi(), core::mem::transmute(lpdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchdisplayname), core::mem::transmute(lplanguageid)).ok() } #[inline] -pub unsafe fn LookupPrivilegeDisplayNameW(lpsystemname: P0, lpname: P1, lpdisplayname: windows_core::PWSTR, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> windows_core::Result<()> +pub unsafe fn LookupPrivilegeDisplayNameW(lpsystemname: P0, lpname: P1, lpdisplayname: Option, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeDisplayNameW(lpsystemname : windows_core::PCWSTR, lpname : windows_core::PCWSTR, lpdisplayname : windows_core::PWSTR, cchdisplayname : *mut u32, lplanguageid : *mut u32) -> super::Foundation:: BOOL); - LookupPrivilegeDisplayNameW(lpsystemname.param().abi(), lpname.param().abi(), core::mem::transmute(lpdisplayname), core::mem::transmute(cchdisplayname), core::mem::transmute(lplanguageid)).ok() + LookupPrivilegeDisplayNameW(lpsystemname.param().abi(), lpname.param().abi(), core::mem::transmute(lpdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchdisplayname), core::mem::transmute(lplanguageid)).ok() } #[inline] -pub unsafe fn LookupPrivilegeNameA(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: windows_core::PSTR, cchname: *mut u32) -> windows_core::Result<()> +pub unsafe fn LookupPrivilegeNameA(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: Option, cchname: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeNameA(lpsystemname : windows_core::PCSTR, lpluid : *const super::Foundation:: LUID, lpname : windows_core::PSTR, cchname : *mut u32) -> super::Foundation:: BOOL); - LookupPrivilegeNameA(lpsystemname.param().abi(), core::mem::transmute(lpluid), core::mem::transmute(lpname), core::mem::transmute(cchname)).ok() + LookupPrivilegeNameA(lpsystemname.param().abi(), core::mem::transmute(lpluid), core::mem::transmute(lpname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchname)).ok() } #[inline] -pub unsafe fn LookupPrivilegeNameW(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: windows_core::PWSTR, cchname: *mut u32) -> windows_core::Result<()> +pub unsafe fn LookupPrivilegeNameW(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: Option, cchname: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeNameW(lpsystemname : windows_core::PCWSTR, lpluid : *const super::Foundation:: LUID, lpname : windows_core::PWSTR, cchname : *mut u32) -> super::Foundation:: BOOL); - LookupPrivilegeNameW(lpsystemname.param().abi(), core::mem::transmute(lpluid), core::mem::transmute(lpname), core::mem::transmute(cchname)).ok() + LookupPrivilegeNameW(lpsystemname.param().abi(), core::mem::transmute(lpluid), core::mem::transmute(lpname.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchname)).ok() } #[inline] pub unsafe fn LookupPrivilegeValueA(lpsystemname: P0, lpname: P1, lpluid: *mut super::Foundation::LUID) -> windows_core::Result<()> @@ -1011,33 +851,27 @@ where LookupPrivilegeValueW(lpsystemname.param().abi(), lpname.param().abi(), core::mem::transmute(lpluid)).ok() } #[inline] -pub unsafe fn MakeAbsoluteSD(pselfrelativesecuritydescriptor: P0, pabsolutesecuritydescriptor: PSECURITY_DESCRIPTOR, lpdwabsolutesecuritydescriptorsize: *mut u32, pdacl: Option<*mut ACL>, lpdwdaclsize: *mut u32, psacl: Option<*mut ACL>, lpdwsaclsize: *mut u32, powner: PSID, lpdwownersize: *mut u32, pprimarygroup: PSID, lpdwprimarygroupsize: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MakeAbsoluteSD(pselfrelativesecuritydescriptor: PSECURITY_DESCRIPTOR, pabsolutesecuritydescriptor: Option, lpdwabsolutesecuritydescriptorsize: *mut u32, pdacl: Option<*mut ACL>, lpdwdaclsize: *mut u32, psacl: Option<*mut ACL>, lpdwsaclsize: *mut u32, powner: Option, lpdwownersize: *mut u32, pprimarygroup: Option, lpdwprimarygroupsize: *mut u32) -> windows_core::Result<()> { 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(), - core::mem::transmute(pabsolutesecuritydescriptor), + core::mem::transmute(pselfrelativesecuritydescriptor), + core::mem::transmute(pabsolutesecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwabsolutesecuritydescriptorsize), - core::mem::transmute(pdacl.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwdaclsize), - core::mem::transmute(psacl.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwsaclsize), - core::mem::transmute(powner), + core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwownersize), - core::mem::transmute(pprimarygroup), + core::mem::transmute(pprimarygroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwprimarygroupsize), ) .ok() } #[inline] -pub unsafe fn MakeSelfRelativeSD(pabsolutesecuritydescriptor: P0, pselfrelativesecuritydescriptor: PSECURITY_DESCRIPTOR, lpdwbufferlength: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MakeSelfRelativeSD(pabsolutesecuritydescriptor: PSECURITY_DESCRIPTOR, pselfrelativesecuritydescriptor: Option, lpdwbufferlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn MakeSelfRelativeSD(pabsolutesecuritydescriptor : PSECURITY_DESCRIPTOR, pselfrelativesecuritydescriptor : PSECURITY_DESCRIPTOR, lpdwbufferlength : *mut u32) -> super::Foundation:: BOOL); - MakeSelfRelativeSD(pabsolutesecuritydescriptor.param().abi(), core::mem::transmute(pselfrelativesecuritydescriptor), core::mem::transmute(lpdwbufferlength)).ok() + MakeSelfRelativeSD(core::mem::transmute(pabsolutesecuritydescriptor), core::mem::transmute(pselfrelativesecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwbufferlength)).ok() } #[inline] pub unsafe fn MapGenericMask(accessmask: *mut u32, genericmapping: *const GENERIC_MAPPING) { @@ -1081,82 +915,71 @@ where ObjectDeleteAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.param().abi()) } #[inline] -pub unsafe fn ObjectOpenAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, psecuritydescriptor: P4, clienttoken: P5, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn ObjectOpenAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, psecuritydescriptor: PSECURITY_DESCRIPTOR, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P9: windows_core::Param, P10: 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(), core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor.param().abi(), clienttoken.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), core::mem::transmute(generateonclose)).ok() + ObjectOpenAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(psecuritydescriptor), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation.param().abi(), accessgranted.param().abi(), core::mem::transmute(generateonclose)).ok() } #[inline] -pub unsafe fn ObjectOpenAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, psecuritydescriptor: P4, clienttoken: P5, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn ObjectOpenAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, psecuritydescriptor: PSECURITY_DESCRIPTOR, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P9: windows_core::Param, P10: 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(), core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor.param().abi(), clienttoken.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), core::mem::transmute(generateonclose)) + ObjectOpenAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(psecuritydescriptor), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation.param().abi(), accessgranted.param().abi(), core::mem::transmute(generateonclose)) } #[inline] -pub unsafe fn ObjectPrivilegeAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: P2, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: P5) -> windows_core::Result<()> +pub unsafe fn ObjectPrivilegeAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: P5) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectPrivilegeAuditAlarmA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectPrivilegeAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), clienttoken.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()).ok() + ObjectPrivilegeAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()).ok() } #[inline] -pub unsafe fn ObjectPrivilegeAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: P2, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: P5) -> super::Foundation::BOOL +pub unsafe fn ObjectPrivilegeAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: P5) -> super::Foundation::BOOL where P0: windows_core::Param, - P2: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectPrivilegeAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectPrivilegeAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), clienttoken.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) + ObjectPrivilegeAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) } #[inline] -pub unsafe fn PrivilegeCheck(clienttoken: P0, requiredprivileges: *mut PRIVILEGE_SET, pfresult: *mut super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrivilegeCheck(clienttoken: super::Foundation::HANDLE, requiredprivileges: *mut PRIVILEGE_SET, pfresult: *mut super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn PrivilegeCheck(clienttoken : super::Foundation:: HANDLE, requiredprivileges : *mut PRIVILEGE_SET, pfresult : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - PrivilegeCheck(clienttoken.param().abi(), core::mem::transmute(requiredprivileges), core::mem::transmute(pfresult)).ok() + PrivilegeCheck(core::mem::transmute(clienttoken), core::mem::transmute(requiredprivileges), core::mem::transmute(pfresult)).ok() } #[inline] -pub unsafe fn PrivilegedServiceAuditAlarmA(subsystemname: P0, servicename: P1, clienttoken: P2, privileges: *const PRIVILEGE_SET, accessgranted: P4) -> windows_core::Result<()> +pub unsafe fn PrivilegedServiceAuditAlarmA(subsystemname: P0, servicename: P1, clienttoken: super::Foundation::HANDLE, privileges: *const PRIVILEGE_SET, accessgranted: P4) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PrivilegedServiceAuditAlarmA(subsystemname : windows_core::PCSTR, servicename : windows_core::PCSTR, clienttoken : super::Foundation:: HANDLE, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - PrivilegedServiceAuditAlarmA(subsystemname.param().abi(), servicename.param().abi(), clienttoken.param().abi(), core::mem::transmute(privileges), accessgranted.param().abi()).ok() + PrivilegedServiceAuditAlarmA(subsystemname.param().abi(), servicename.param().abi(), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.param().abi()).ok() } #[inline] -pub unsafe fn PrivilegedServiceAuditAlarmW(subsystemname: P0, servicename: P1, clienttoken: P2, privileges: *const PRIVILEGE_SET, accessgranted: P4) -> super::Foundation::BOOL +pub unsafe fn PrivilegedServiceAuditAlarmW(subsystemname: P0, servicename: P1, clienttoken: super::Foundation::HANDLE, privileges: *const PRIVILEGE_SET, accessgranted: P4) -> super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PrivilegedServiceAuditAlarmW(subsystemname : windows_core::PCWSTR, servicename : windows_core::PCWSTR, clienttoken : super::Foundation:: HANDLE, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - PrivilegedServiceAuditAlarmW(subsystemname.param().abi(), servicename.param().abi(), clienttoken.param().abi(), core::mem::transmute(privileges), accessgranted.param().abi()) + PrivilegedServiceAuditAlarmW(subsystemname.param().abi(), servicename.param().abi(), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.param().abi()) } #[inline] pub unsafe fn QuerySecurityAccessMask(securityinformation: OBJECT_SECURITY_INFORMATION) -> u32 { @@ -1171,13 +994,12 @@ pub unsafe fn RevertToSelf() -> windows_core::Result<()> { RevertToSelf().ok() } #[inline] -pub unsafe fn RtlConvertSidToUnicodeString(unicodestring: *mut super::Foundation::UNICODE_STRING, sid: P1, allocatedestinationstring: P2) -> super::Foundation::NTSTATUS +pub unsafe fn RtlConvertSidToUnicodeString(unicodestring: *mut super::Foundation::UNICODE_STRING, sid: PSID, allocatedestinationstring: P2) -> super::Foundation::NTSTATUS where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlConvertSidToUnicodeString(unicodestring : *mut super::Foundation:: UNICODE_STRING, sid : PSID, allocatedestinationstring : super::Foundation:: BOOLEAN) -> super::Foundation:: NTSTATUS); - RtlConvertSidToUnicodeString(core::mem::transmute(unicodestring), sid.param().abi(), allocatedestinationstring.param().abi()) + RtlConvertSidToUnicodeString(core::mem::transmute(unicodestring), core::mem::transmute(sid), allocatedestinationstring.param().abi()) } #[inline] pub unsafe fn RtlNormalizeSecurityDescriptor(securitydescriptor: *mut PSECURITY_DESCRIPTOR, securitydescriptorlength: u32, newsecuritydescriptor: Option<*mut PSECURITY_DESCRIPTOR>, newsecuritydescriptorlength: Option<*mut u32>, checkonly: P4) -> super::Foundation::BOOLEAN @@ -1185,7 +1007,7 @@ where P4: 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(core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorlength), core::mem::transmute(newsecuritydescriptor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::ptr::null_mut())), checkonly.param().abi()) + RtlNormalizeSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorlength), core::mem::transmute(newsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::mem::zeroed())), 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<()> { @@ -1193,57 +1015,40 @@ pub unsafe fn SetAclInformation(pacl: *mut ACL, paclinformation: *const core::ff SetAclInformation(core::mem::transmute(pacl), core::mem::transmute(paclinformation), core::mem::transmute(naclinformationlength), core::mem::transmute(dwaclinformationclass)).ok() } #[inline] -pub unsafe fn SetCachedSigningLevel(sourcefiles: &[super::Foundation::HANDLE], flags: u32, targetfile: P3) -> super::Foundation::BOOL -where - P3: windows_core::Param, -{ +pub unsafe fn SetCachedSigningLevel(sourcefiles: &[super::Foundation::HANDLE], flags: u32, targetfile: Option) -> super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn SetCachedSigningLevel(sourcefiles : *const super::Foundation:: HANDLE, sourcefilecount : u32, flags : u32, targetfile : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - SetCachedSigningLevel(core::mem::transmute(sourcefiles.as_ptr()), sourcefiles.len().try_into().unwrap(), core::mem::transmute(flags), targetfile.param().abi()) + SetCachedSigningLevel(core::mem::transmute(sourcefiles.as_ptr()), sourcefiles.len().try_into().unwrap(), core::mem::transmute(flags), core::mem::transmute(targetfile.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetFileSecurityA(lpfilename: P0, securityinformation: OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P2) -> windows_core::Result<()> +pub unsafe fn SetFileSecurityA(lpfilename: P0, securityinformation: OBJECT_SECURITY_INFORMATION, psecuritydescriptor: PSECURITY_DESCRIPTOR) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetFileSecurityA(lpfilename : windows_core::PCSTR, securityinformation : OBJECT_SECURITY_INFORMATION, psecuritydescriptor : PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - SetFileSecurityA(lpfilename.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()).ok() + SetFileSecurityA(lpfilename.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)).ok() } #[inline] -pub unsafe fn SetFileSecurityW(lpfilename: P0, securityinformation: OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P2) -> super::Foundation::BOOL +pub unsafe fn SetFileSecurityW(lpfilename: P0, securityinformation: OBJECT_SECURITY_INFORMATION, psecuritydescriptor: PSECURITY_DESCRIPTOR) -> super::Foundation::BOOL where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetFileSecurityW(lpfilename : windows_core::PCWSTR, securityinformation : OBJECT_SECURITY_INFORMATION, psecuritydescriptor : PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - SetFileSecurityW(lpfilename.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()) + SetFileSecurityW(lpfilename.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)) } #[inline] -pub unsafe fn SetKernelObjectSecurity(handle: P0, securityinformation: OBJECT_SECURITY_INFORMATION, securitydescriptor: P2) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SetKernelObjectSecurity(handle: super::Foundation::HANDLE, securityinformation: OBJECT_SECURITY_INFORMATION, securitydescriptor: PSECURITY_DESCRIPTOR) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetKernelObjectSecurity(handle : super::Foundation:: HANDLE, securityinformation : OBJECT_SECURITY_INFORMATION, securitydescriptor : PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - SetKernelObjectSecurity(handle.param().abi(), core::mem::transmute(securityinformation), securitydescriptor.param().abi()).ok() + SetKernelObjectSecurity(core::mem::transmute(handle), core::mem::transmute(securityinformation), core::mem::transmute(securitydescriptor)).ok() } #[inline] -pub unsafe fn SetPrivateObjectSecurity(securityinformation: OBJECT_SECURITY_INFORMATION, modificationdescriptor: P1, objectssecuritydescriptor: *mut PSECURITY_DESCRIPTOR, genericmapping: *const GENERIC_MAPPING, token: P4) -> windows_core::Result<()> -where - P1: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn SetPrivateObjectSecurity(securityinformation: OBJECT_SECURITY_INFORMATION, modificationdescriptor: PSECURITY_DESCRIPTOR, objectssecuritydescriptor: *mut PSECURITY_DESCRIPTOR, genericmapping: *const GENERIC_MAPPING, token: Option) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetPrivateObjectSecurity(securityinformation : OBJECT_SECURITY_INFORMATION, modificationdescriptor : PSECURITY_DESCRIPTOR, objectssecuritydescriptor : *mut PSECURITY_DESCRIPTOR, genericmapping : *const GENERIC_MAPPING, token : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - SetPrivateObjectSecurity(core::mem::transmute(securityinformation), modificationdescriptor.param().abi(), core::mem::transmute(objectssecuritydescriptor), core::mem::transmute(genericmapping), token.param().abi()).ok() + SetPrivateObjectSecurity(core::mem::transmute(securityinformation), core::mem::transmute(modificationdescriptor), core::mem::transmute(objectssecuritydescriptor), core::mem::transmute(genericmapping), core::mem::transmute(token.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetPrivateObjectSecurityEx(securityinformation: OBJECT_SECURITY_INFORMATION, modificationdescriptor: P1, objectssecuritydescriptor: *mut PSECURITY_DESCRIPTOR, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, genericmapping: *const GENERIC_MAPPING, token: P5) -> windows_core::Result<()> -where - P1: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn SetPrivateObjectSecurityEx(securityinformation: OBJECT_SECURITY_INFORMATION, modificationdescriptor: PSECURITY_DESCRIPTOR, objectssecuritydescriptor: *mut PSECURITY_DESCRIPTOR, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, genericmapping: *const GENERIC_MAPPING, token: Option) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetPrivateObjectSecurityEx(securityinformation : OBJECT_SECURITY_INFORMATION, modificationdescriptor : PSECURITY_DESCRIPTOR, objectssecuritydescriptor : *mut PSECURITY_DESCRIPTOR, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, genericmapping : *const GENERIC_MAPPING, token : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - SetPrivateObjectSecurityEx(core::mem::transmute(securityinformation), modificationdescriptor.param().abi(), core::mem::transmute(objectssecuritydescriptor), core::mem::transmute(autoinheritflags), core::mem::transmute(genericmapping), token.param().abi()).ok() + SetPrivateObjectSecurityEx(core::mem::transmute(securityinformation), core::mem::transmute(modificationdescriptor), core::mem::transmute(objectssecuritydescriptor), core::mem::transmute(autoinheritflags), core::mem::transmute(genericmapping), core::mem::transmute(token.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetSecurityAccessMask(securityinformation: OBJECT_SECURITY_INFORMATION) -> u32 { @@ -1253,12 +1058,9 @@ pub unsafe fn SetSecurityAccessMask(securityinformation: OBJECT_SECURITY_INFORMA result__ } #[inline] -pub unsafe fn SetSecurityDescriptorControl(psecuritydescriptor: P0, controlbitsofinterest: SECURITY_DESCRIPTOR_CONTROL, controlbitstoset: SECURITY_DESCRIPTOR_CONTROL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetSecurityDescriptorControl(psecuritydescriptor: PSECURITY_DESCRIPTOR, controlbitsofinterest: SECURITY_DESCRIPTOR_CONTROL, controlbitstoset: SECURITY_DESCRIPTOR_CONTROL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorControl(psecuritydescriptor : PSECURITY_DESCRIPTOR, controlbitsofinterest : SECURITY_DESCRIPTOR_CONTROL, controlbitstoset : SECURITY_DESCRIPTOR_CONTROL) -> super::Foundation:: BOOL); - SetSecurityDescriptorControl(psecuritydescriptor.param().abi(), core::mem::transmute(controlbitsofinterest), core::mem::transmute(controlbitstoset)).ok() + SetSecurityDescriptorControl(core::mem::transmute(psecuritydescriptor), core::mem::transmute(controlbitsofinterest), core::mem::transmute(controlbitstoset)).ok() } #[inline] pub unsafe fn SetSecurityDescriptorDacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bdaclpresent: P1, pdacl: Option<*const ACL>, bdacldefaulted: P3) -> windows_core::Result<()> @@ -1267,30 +1069,28 @@ where P3: 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(core::mem::transmute(psecuritydescriptor), bdaclpresent.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), bdacldefaulted.param().abi()).ok() + SetSecurityDescriptorDacl(core::mem::transmute(psecuritydescriptor), bdaclpresent.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), bdacldefaulted.param().abi()).ok() } #[inline] -pub unsafe fn SetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: P1, bgroupdefaulted: P2) -> windows_core::Result<()> +pub unsafe fn SetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: Option, bgroupdefaulted: P2) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorGroup(psecuritydescriptor : PSECURITY_DESCRIPTOR, pgroup : PSID, bgroupdefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorGroup(core::mem::transmute(psecuritydescriptor), pgroup.param().abi(), bgroupdefaulted.param().abi()).ok() + SetSecurityDescriptorGroup(core::mem::transmute(psecuritydescriptor), core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), bgroupdefaulted.param().abi()).ok() } #[inline] -pub unsafe fn SetSecurityDescriptorOwner(psecuritydescriptor: PSECURITY_DESCRIPTOR, powner: P1, bownerdefaulted: P2) -> windows_core::Result<()> +pub unsafe fn SetSecurityDescriptorOwner(psecuritydescriptor: PSECURITY_DESCRIPTOR, powner: Option, bownerdefaulted: P2) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorOwner(psecuritydescriptor : PSECURITY_DESCRIPTOR, powner : PSID, bownerdefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorOwner(core::mem::transmute(psecuritydescriptor), powner.param().abi(), bownerdefaulted.param().abi()).ok() + SetSecurityDescriptorOwner(core::mem::transmute(psecuritydescriptor), core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), bownerdefaulted.param().abi()).ok() } #[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(core::mem::transmute(securitydescriptor), core::mem::transmute(rmcontrol.unwrap_or(core::ptr::null()))) + SetSecurityDescriptorRMControl(core::mem::transmute(securitydescriptor), core::mem::transmute(rmcontrol.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetSecurityDescriptorSacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bsaclpresent: P1, psacl: Option<*const ACL>, bsacldefaulted: P3) -> windows_core::Result<()> @@ -1299,24 +1099,17 @@ where P3: 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(core::mem::transmute(psecuritydescriptor), bsaclpresent.param().abi(), core::mem::transmute(psacl.unwrap_or(core::ptr::null())), bsacldefaulted.param().abi()).ok() + SetSecurityDescriptorSacl(core::mem::transmute(psecuritydescriptor), bsaclpresent.param().abi(), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), 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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetTokenInformation(tokenhandle: super::Foundation::HANDLE, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: *const core::ffi::c_void, tokeninformationlength: u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetTokenInformation(tokenhandle : super::Foundation:: HANDLE, tokeninformationclass : TOKEN_INFORMATION_CLASS, tokeninformation : *const core::ffi::c_void, tokeninformationlength : u32) -> super::Foundation:: BOOL); - SetTokenInformation(tokenhandle.param().abi(), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation), core::mem::transmute(tokeninformationlength)).ok() + SetTokenInformation(core::mem::transmute(tokenhandle), core::mem::transmute(tokeninformationclass), core::mem::transmute(tokeninformation), core::mem::transmute(tokeninformationlength)).ok() } #[inline] -pub unsafe fn SetUserObjectSecurity(hobj: P0, psirequested: *const OBJECT_SECURITY_INFORMATION, psid: P2) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SetUserObjectSecurity(hobj: super::Foundation::HANDLE, psirequested: *const OBJECT_SECURITY_INFORMATION, psid: PSECURITY_DESCRIPTOR) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetUserObjectSecurity(hobj : super::Foundation:: HANDLE, psirequested : *const OBJECT_SECURITY_INFORMATION, psid : PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - SetUserObjectSecurity(hobj.param().abi(), core::mem::transmute(psirequested), psid.param().abi()).ok() + SetUserObjectSecurity(core::mem::transmute(hobj), core::mem::transmute(psirequested), core::mem::transmute(psid)).ok() } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 c31bf3d4a4..03f8012556 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(core::mem::transmute(perf), core::mem::transmute(pfnfcifp), core::mem::transmute(pfna), core::mem::transmute(pfnf), core::mem::transmute(pfnopen), core::mem::transmute(pfnread), core::mem::transmute(pfnwrite), core::mem::transmute(pfnclose), core::mem::transmute(pfnseek), core::mem::transmute(pfndelete), core::mem::transmute(pfnfcigtf), core::mem::transmute(pccab), core::mem::transmute(pv.unwrap_or(core::ptr::null()))) + FCICreate(core::mem::transmute(perf), core::mem::transmute(pfnfcifp), core::mem::transmute(pfna), core::mem::transmute(pfnf), core::mem::transmute(pfnopen), core::mem::transmute(pfnread), core::mem::transmute(pfnwrite), core::mem::transmute(pfnclose), core::mem::transmute(pfnseek), core::mem::transmute(pfndelete), core::mem::transmute(pfnfcigtf), core::mem::transmute(pccab), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FCIDestroy(hfci: *const core::ffi::c_void) -> super::super::Foundation::BOOL { @@ -38,7 +38,7 @@ where P2: 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(core::mem::transmute(hfdi), pszcabinet.param().abi(), pszcabpath.param().abi(), core::mem::transmute(flags), core::mem::transmute(pfnfdin), core::mem::transmute(pfnfdid), core::mem::transmute(pvuser.unwrap_or(core::ptr::null()))) + FDICopy(core::mem::transmute(hfdi), pszcabinet.param().abi(), pszcabpath.param().abi(), core::mem::transmute(flags), core::mem::transmute(pfnfdin), core::mem::transmute(pfnfdid), core::mem::transmute(pvuser.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hfdi), core::mem::transmute(hf), core::mem::transmute(pfdici.unwrap_or(core::ptr::null_mut()))) + FDIIsCabinet(core::mem::transmute(hfdi), core::mem::transmute(hf), core::mem::transmute(pfdici.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FDITruncateCabinet(hfdi: *const core::ffi::c_void, pszcabinetname: P1, 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 230b6fb46c..0a28e7a622 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn CfCloseHandle(filehandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CfCloseHandle(filehandle: super::super::Foundation::HANDLE) { windows_targets::link!("cldapi.dll" "system" fn CfCloseHandle(filehandle : super::super::Foundation:: HANDLE)); - CfCloseHandle(filehandle.param().abi()) + CfCloseHandle(core::mem::transmute(filehandle)) } #[cfg(feature = "Win32_System_CorrelationVector")] #[inline] @@ -14,16 +11,13 @@ 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(), core::mem::transmute(callbacktable), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(connectflags), &mut result__).map(|| core::mem::transmute(result__)) + CfConnectSyncRoot(syncrootpath.param().abi(), core::mem::transmute(callbacktable), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(connectflags), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn CfConvertToPlaceholder(filehandle: P0, fileidentity: Option<*const core::ffi::c_void>, fileidentitylength: u32, convertflags: CF_CONVERT_FLAGS, convertusn: Option<*mut i64>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfConvertToPlaceholder(filehandle: super::super::Foundation::HANDLE, fileidentity: Option<*const core::ffi::c_void>, fileidentitylength: u32, convertflags: CF_CONVERT_FLAGS, convertusn: Option<*mut i64>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(fileidentitylength), core::mem::transmute(convertflags), core::mem::transmute(convertusn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() + CfConvertToPlaceholder(core::mem::transmute(filehandle), core::mem::transmute(fileidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(fileidentitylength), core::mem::transmute(convertflags), core::mem::transmute(convertusn.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -32,24 +26,18 @@ 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(), core::mem::transmute(createflags), core::mem::transmute(entriesprocessed.unwrap_or(core::ptr::null_mut()))).ok() + CfCreatePlaceholders(basedirectorypath.param().abi(), core::mem::transmute(placeholderarray.as_ptr()), placeholderarray.len().try_into().unwrap(), core::mem::transmute(createflags), core::mem::transmute(entriesprocessed.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn CfDehydratePlaceholder(filehandle: P0, startingoffset: i64, length: i64, dehydrateflags: CF_DEHYDRATE_FLAGS, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfDehydratePlaceholder(filehandle: super::super::Foundation::HANDLE, startingoffset: i64, length: i64, dehydrateflags: CF_DEHYDRATE_FLAGS, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(startingoffset), core::mem::transmute(length), core::mem::transmute(dehydrateflags), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() + CfDehydratePlaceholder(core::mem::transmute(filehandle), core::mem::transmute(startingoffset), core::mem::transmute(length), core::mem::transmute(dehydrateflags), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CfDisconnectSyncRoot(connectionkey: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfDisconnectSyncRoot(connectionkey: CF_CONNECTION_KEY) -> windows_core::Result<()> { windows_targets::link!("cldapi.dll" "system" fn CfDisconnectSyncRoot(connectionkey : CF_CONNECTION_KEY) -> windows_core::HRESULT); - CfDisconnectSyncRoot(connectionkey.param().abi()).ok() + CfDisconnectSyncRoot(core::mem::transmute(connectionkey)).ok() } #[cfg(all(feature = "Win32_Storage_FileSystem", feature = "Win32_System_CorrelationVector"))] #[inline] @@ -59,36 +47,24 @@ pub unsafe fn CfExecute(opinfo: *const CF_OPERATION_INFO, opparams: *mut CF_OPER } #[cfg(feature = "Win32_System_CorrelationVector")] #[inline] -pub unsafe fn CfGetCorrelationVector(filehandle: P0, correlationvector: *mut super::super::System::CorrelationVector::CORRELATION_VECTOR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfGetCorrelationVector(filehandle: super::super::Foundation::HANDLE, correlationvector: *mut super::super::System::CorrelationVector::CORRELATION_VECTOR) -> windows_core::Result<()> { windows_targets::link!("cldapi.dll" "system" fn CfGetCorrelationVector(filehandle : super::super::Foundation:: HANDLE, correlationvector : *mut super::super::System::CorrelationVector:: CORRELATION_VECTOR) -> windows_core::HRESULT); - CfGetCorrelationVector(filehandle.param().abi(), core::mem::transmute(correlationvector)).ok() + CfGetCorrelationVector(core::mem::transmute(filehandle), core::mem::transmute(correlationvector)).ok() } #[inline] -pub unsafe fn CfGetPlaceholderInfo(filehandle: P0, infoclass: CF_PLACEHOLDER_INFO_CLASS, infobuffer: *mut core::ffi::c_void, infobufferlength: u32, returnedlength: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfGetPlaceholderInfo(filehandle: super::super::Foundation::HANDLE, infoclass: CF_PLACEHOLDER_INFO_CLASS, infobuffer: *mut core::ffi::c_void, infobufferlength: u32, returnedlength: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(infoclass), core::mem::transmute(infobuffer), core::mem::transmute(infobufferlength), core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))).ok() + CfGetPlaceholderInfo(core::mem::transmute(filehandle), core::mem::transmute(infoclass), core::mem::transmute(infobuffer), core::mem::transmute(infobufferlength), core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(infoclass), core::mem::transmute(startingoffset), core::mem::transmute(length), core::mem::transmute(infobuffer), core::mem::transmute(infobufferlength), core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))).ok() + CfGetPlaceholderRangeInfo(core::mem::transmute(filehandle), core::mem::transmute(infoclass), core::mem::transmute(startingoffset), core::mem::transmute(length), core::mem::transmute(infobuffer), core::mem::transmute(infobufferlength), core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(transferkey), core::mem::transmute(fileid), core::mem::transmute(infoclass), core::mem::transmute(startingoffset), core::mem::transmute(rangelength), core::mem::transmute(infobuffer), core::mem::transmute(infobuffersize), core::mem::transmute(infobufferwritten.unwrap_or(core::ptr::null_mut()))).ok() + CfGetPlaceholderRangeInfoForHydration(core::mem::transmute(connectionkey), core::mem::transmute(transferkey), core::mem::transmute(fileid), core::mem::transmute(infoclass), core::mem::transmute(startingoffset), core::mem::transmute(rangelength), core::mem::transmute(infobuffer), core::mem::transmute(infobuffersize), core::mem::transmute(infobufferwritten.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CfGetPlaceholderStateFromAttributeTag(fileattributes: u32, reparsetag: u32) -> CF_PLACEHOLDER_STATE { @@ -114,12 +90,9 @@ pub unsafe fn CfGetPlatformInfo() -> windows_core::Result { CfGetPlatformInfo(&mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn CfGetSyncRootInfoByHandle(filehandle: P0, infoclass: CF_SYNC_ROOT_INFO_CLASS, infobuffer: *mut core::ffi::c_void, infobufferlength: u32, returnedlength: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfGetSyncRootInfoByHandle(filehandle: super::super::Foundation::HANDLE, infoclass: CF_SYNC_ROOT_INFO_CLASS, infobuffer: *mut core::ffi::c_void, infobufferlength: u32, returnedlength: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(infoclass), core::mem::transmute(infobuffer), core::mem::transmute(infobufferlength), core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))).ok() + CfGetSyncRootInfoByHandle(core::mem::transmute(filehandle), core::mem::transmute(infoclass), core::mem::transmute(infobuffer), core::mem::transmute(infobufferlength), core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))).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,33 +100,24 @@ 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(), core::mem::transmute(infoclass), core::mem::transmute(infobuffer), core::mem::transmute(infobufferlength), core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))).ok() + CfGetSyncRootInfoByPath(filepath.param().abi(), core::mem::transmute(infoclass), core::mem::transmute(infobuffer), core::mem::transmute(infobufferlength), core::mem::transmute(returnedlength.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CfGetTransferKey(filehandle: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CfGetTransferKey(filehandle: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("cldapi.dll" "system" fn CfGetTransferKey(filehandle : super::super::Foundation:: HANDLE, transferkey : *mut i64) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CfGetTransferKey(filehandle.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + CfGetTransferKey(core::mem::transmute(filehandle), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn CfGetWin32HandleFromProtectedHandle(protectedhandle: P0) -> super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn CfGetWin32HandleFromProtectedHandle(protectedhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::HANDLE { windows_targets::link!("cldapi.dll" "system" fn CfGetWin32HandleFromProtectedHandle(protectedhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - CfGetWin32HandleFromProtectedHandle(protectedhandle.param().abi()) + CfGetWin32HandleFromProtectedHandle(core::mem::transmute(protectedhandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn CfHydratePlaceholder(filehandle: P0, startingoffset: i64, length: i64, hydrateflags: CF_HYDRATE_FLAGS, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfHydratePlaceholder(filehandle: super::super::Foundation::HANDLE, startingoffset: i64, length: i64, hydrateflags: CF_HYDRATE_FLAGS, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(startingoffset), core::mem::transmute(length), core::mem::transmute(hydrateflags), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() + CfHydratePlaceholder(core::mem::transmute(filehandle), core::mem::transmute(startingoffset), core::mem::transmute(length), core::mem::transmute(hydrateflags), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CfOpenFileWithOplock(filepath: P0, flags: CF_OPEN_FILE_FLAGS) -> windows_core::Result @@ -165,21 +129,15 @@ where CfOpenFileWithOplock(filepath.param().abi(), core::mem::transmute(flags), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn CfQuerySyncProviderStatus(connectionkey: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CfQuerySyncProviderStatus(connectionkey: CF_CONNECTION_KEY) -> windows_core::Result { windows_targets::link!("cldapi.dll" "system" fn CfQuerySyncProviderStatus(connectionkey : CF_CONNECTION_KEY, providerstatus : *mut CF_SYNC_PROVIDER_STATUS) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CfQuerySyncProviderStatus(connectionkey.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + CfQuerySyncProviderStatus(core::mem::transmute(connectionkey), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn CfReferenceProtectedHandle(protectedhandle: P0) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn CfReferenceProtectedHandle(protectedhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOLEAN { windows_targets::link!("cldapi.dll" "system" fn CfReferenceProtectedHandle(protectedhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOLEAN); - CfReferenceProtectedHandle(protectedhandle.param().abi()) + CfReferenceProtectedHandle(core::mem::transmute(protectedhandle)) } #[inline] pub unsafe fn CfRegisterSyncRoot(syncrootpath: P0, registration: *const CF_SYNC_REGISTRATION, policies: *const CF_SYNC_POLICIES, registerflags: CF_REGISTER_FLAGS) -> windows_core::Result<()> @@ -190,36 +148,24 @@ where CfRegisterSyncRoot(syncrootpath.param().abi(), core::mem::transmute(registration), core::mem::transmute(policies), core::mem::transmute(registerflags)).ok() } #[inline] -pub unsafe fn CfReleaseProtectedHandle(protectedhandle: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CfReleaseProtectedHandle(protectedhandle: super::super::Foundation::HANDLE) { windows_targets::link!("cldapi.dll" "system" fn CfReleaseProtectedHandle(protectedhandle : super::super::Foundation:: HANDLE)); - CfReleaseProtectedHandle(protectedhandle.param().abi()) + CfReleaseProtectedHandle(core::mem::transmute(protectedhandle)) } #[inline] -pub unsafe fn CfReleaseTransferKey(filehandle: P0, transferkey: *const i64) -where - P0: windows_core::Param, -{ +pub unsafe fn CfReleaseTransferKey(filehandle: super::super::Foundation::HANDLE, transferkey: *const i64) { windows_targets::link!("cldapi.dll" "system" fn CfReleaseTransferKey(filehandle : super::super::Foundation:: HANDLE, transferkey : *const i64)); - CfReleaseTransferKey(filehandle.param().abi(), core::mem::transmute(transferkey)) + CfReleaseTransferKey(core::mem::transmute(filehandle), core::mem::transmute(transferkey)) } #[inline] -pub unsafe fn CfReportProviderProgress(connectionkey: P0, transferkey: i64, providerprogresstotal: i64, providerprogresscompleted: i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfReportProviderProgress(connectionkey: CF_CONNECTION_KEY, transferkey: i64, providerprogresstotal: i64, providerprogresscompleted: i64) -> windows_core::Result<()> { windows_targets::link!("cldapi.dll" "system" fn CfReportProviderProgress(connectionkey : CF_CONNECTION_KEY, transferkey : i64, providerprogresstotal : i64, providerprogresscompleted : i64) -> windows_core::HRESULT); - CfReportProviderProgress(connectionkey.param().abi(), core::mem::transmute(transferkey), core::mem::transmute(providerprogresstotal), core::mem::transmute(providerprogresscompleted)).ok() + CfReportProviderProgress(core::mem::transmute(connectionkey), core::mem::transmute(transferkey), core::mem::transmute(providerprogresstotal), core::mem::transmute(providerprogresscompleted)).ok() } #[inline] -pub unsafe fn CfReportProviderProgress2(connectionkey: P0, transferkey: i64, requestkey: i64, providerprogresstotal: i64, providerprogresscompleted: i64, targetsessionid: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfReportProviderProgress2(connectionkey: CF_CONNECTION_KEY, transferkey: i64, requestkey: i64, providerprogresstotal: i64, providerprogresscompleted: i64, targetsessionid: u32) -> windows_core::Result<()> { windows_targets::link!("cldapi.dll" "system" fn CfReportProviderProgress2(connectionkey : CF_CONNECTION_KEY, transferkey : i64, requestkey : i64, providerprogresstotal : i64, providerprogresscompleted : i64, targetsessionid : u32) -> windows_core::HRESULT); - CfReportProviderProgress2(connectionkey.param().abi(), core::mem::transmute(transferkey), core::mem::transmute(requestkey), core::mem::transmute(providerprogresstotal), core::mem::transmute(providerprogresscompleted), core::mem::transmute(targetsessionid)).ok() + CfReportProviderProgress2(core::mem::transmute(connectionkey), core::mem::transmute(transferkey), core::mem::transmute(requestkey), core::mem::transmute(providerprogresstotal), core::mem::transmute(providerprogresscompleted), core::mem::transmute(targetsessionid)).ok() } #[inline] pub unsafe fn CfReportSyncStatus(syncrootpath: P0, syncstatus: Option<*const CF_SYNC_STATUS>) -> windows_core::Result<()> @@ -227,42 +173,30 @@ 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(core::ptr::null()))).ok() + CfReportSyncStatus(syncrootpath.param().abi(), core::mem::transmute(syncstatus.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn CfRevertPlaceholder(filehandle: P0, revertflags: CF_REVERT_FLAGS, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfRevertPlaceholder(filehandle: super::super::Foundation::HANDLE, revertflags: CF_REVERT_FLAGS, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(revertflags), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() + CfRevertPlaceholder(core::mem::transmute(filehandle), core::mem::transmute(revertflags), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_CorrelationVector")] #[inline] -pub unsafe fn CfSetCorrelationVector(filehandle: P0, correlationvector: *const super::super::System::CorrelationVector::CORRELATION_VECTOR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfSetCorrelationVector(filehandle: super::super::Foundation::HANDLE, correlationvector: *const super::super::System::CorrelationVector::CORRELATION_VECTOR) -> windows_core::Result<()> { windows_targets::link!("cldapi.dll" "system" fn CfSetCorrelationVector(filehandle : super::super::Foundation:: HANDLE, correlationvector : *const super::super::System::CorrelationVector:: CORRELATION_VECTOR) -> windows_core::HRESULT); - CfSetCorrelationVector(filehandle.param().abi(), core::mem::transmute(correlationvector)).ok() + CfSetCorrelationVector(core::mem::transmute(filehandle), core::mem::transmute(correlationvector)).ok() } #[inline] -pub unsafe fn CfSetInSyncState(filehandle: P0, insyncstate: CF_IN_SYNC_STATE, insyncflags: CF_SET_IN_SYNC_FLAGS, insyncusn: Option<*mut i64>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfSetInSyncState(filehandle: super::super::Foundation::HANDLE, insyncstate: CF_IN_SYNC_STATE, insyncflags: CF_SET_IN_SYNC_FLAGS, insyncusn: Option<*mut i64>) -> windows_core::Result<()> { 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(), core::mem::transmute(insyncstate), core::mem::transmute(insyncflags), core::mem::transmute(insyncusn.unwrap_or(core::ptr::null_mut()))).ok() + CfSetInSyncState(core::mem::transmute(filehandle), core::mem::transmute(insyncstate), core::mem::transmute(insyncflags), core::mem::transmute(insyncusn.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn CfSetPinState(filehandle: P0, pinstate: CF_PIN_STATE, pinflags: CF_SET_PIN_FLAGS, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfSetPinState(filehandle: super::super::Foundation::HANDLE, pinstate: CF_PIN_STATE, pinflags: CF_SET_PIN_FLAGS, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(pinstate), core::mem::transmute(pinflags), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() + CfSetPinState(core::mem::transmute(filehandle), core::mem::transmute(pinstate), core::mem::transmute(pinflags), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CfUnregisterSyncRoot(syncrootpath: P0) -> windows_core::Result<()> @@ -274,31 +208,25 @@ where } #[cfg(all(feature = "Win32_Storage_FileSystem", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn CfUpdatePlaceholder(filehandle: P0, fsmetadata: Option<*const CF_FS_METADATA>, fileidentity: Option<*const core::ffi::c_void>, fileidentitylength: u32, dehydraterangearray: Option<&[CF_FILE_RANGE]>, updateflags: CF_UPDATE_FLAGS, updateusn: Option<*mut i64>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfUpdatePlaceholder(filehandle: super::super::Foundation::HANDLE, fsmetadata: Option<*const CF_FS_METADATA>, fileidentity: Option<*const core::ffi::c_void>, fileidentitylength: u32, dehydraterangearray: Option<&[CF_FILE_RANGE]>, updateflags: CF_UPDATE_FLAGS, updateusn: Option<*mut i64>, overlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(core::ptr::null())), - core::mem::transmute(fileidentity.unwrap_or(core::ptr::null())), + core::mem::transmute(filehandle), + core::mem::transmute(fsmetadata.unwrap_or(core::mem::zeroed())), + core::mem::transmute(fileidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(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()), core::mem::transmute(updateflags), - core::mem::transmute(updateusn.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(updateusn.unwrap_or(core::mem::zeroed())), + core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), ) .ok() } #[inline] -pub unsafe fn CfUpdateSyncProviderStatus(connectionkey: P0, providerstatus: CF_SYNC_PROVIDER_STATUS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CfUpdateSyncProviderStatus(connectionkey: CF_CONNECTION_KEY, providerstatus: CF_SYNC_PROVIDER_STATUS) -> windows_core::Result<()> { windows_targets::link!("cldapi.dll" "system" fn CfUpdateSyncProviderStatus(connectionkey : CF_CONNECTION_KEY, providerstatus : CF_SYNC_PROVIDER_STATUS) -> windows_core::HRESULT); - CfUpdateSyncProviderStatus(connectionkey.param().abi(), core::mem::transmute(providerstatus)).ok() + CfUpdateSyncProviderStatus(core::mem::transmute(connectionkey), core::mem::transmute(providerstatus)).ok() } #[cfg(feature = "Win32_System_CorrelationVector")] pub type CF_CALLBACK = Option; 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 515e5fdd2a..231c1d8a1d 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs @@ -1,92 +1,62 @@ #[inline] -pub unsafe fn CloseCompressor(compressorhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseCompressor(compressorhandle: COMPRESSOR_HANDLE) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn CloseCompressor(compressorhandle : COMPRESSOR_HANDLE) -> super::super::Foundation:: BOOL); - CloseCompressor(compressorhandle.param().abi()).ok() + CloseCompressor(core::mem::transmute(compressorhandle)).ok() } #[inline] -pub unsafe fn CloseDecompressor(decompressorhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseDecompressor(decompressorhandle: DECOMPRESSOR_HANDLE) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn CloseDecompressor(decompressorhandle : DECOMPRESSOR_HANDLE) -> super::super::Foundation:: BOOL); - CloseDecompressor(decompressorhandle.param().abi()).ok() + CloseDecompressor(core::mem::transmute(decompressorhandle)).ok() } #[inline] -pub unsafe fn Compress(compressorhandle: P0, uncompresseddata: Option<*const core::ffi::c_void>, uncompresseddatasize: usize, compressedbuffer: Option<*mut core::ffi::c_void>, compressedbuffersize: usize, compresseddatasize: *mut usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Compress(compressorhandle: COMPRESSOR_HANDLE, uncompresseddata: Option<*const core::ffi::c_void>, uncompresseddatasize: usize, compressedbuffer: Option<*mut core::ffi::c_void>, compressedbuffersize: usize, compresseddatasize: *mut usize) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(uncompresseddatasize), core::mem::transmute(compressedbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(compressedbuffersize), core::mem::transmute(compresseddatasize)).ok() + Compress(core::mem::transmute(compressorhandle), core::mem::transmute(uncompresseddata.unwrap_or(core::mem::zeroed())), core::mem::transmute(uncompresseddatasize), core::mem::transmute(compressedbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(compressedbuffersize), core::mem::transmute(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(core::mem::transmute(algorithm), core::mem::transmute(allocationroutines.unwrap_or(core::ptr::null())), core::mem::transmute(compressorhandle)).ok() + CreateCompressor(core::mem::transmute(algorithm), core::mem::transmute(allocationroutines.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(algorithm), core::mem::transmute(allocationroutines.unwrap_or(core::ptr::null())), core::mem::transmute(decompressorhandle)).ok() + CreateDecompressor(core::mem::transmute(algorithm), core::mem::transmute(allocationroutines.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Decompress(decompressorhandle: DECOMPRESSOR_HANDLE, 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<()> { 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(core::ptr::null())), core::mem::transmute(compresseddatasize), core::mem::transmute(uncompressedbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(uncompressedbuffersize), core::mem::transmute(uncompresseddatasize.unwrap_or(core::ptr::null_mut()))).ok() + Decompress(core::mem::transmute(decompressorhandle), core::mem::transmute(compresseddata.unwrap_or(core::mem::zeroed())), core::mem::transmute(compresseddatasize), core::mem::transmute(uncompressedbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(uncompressedbuffersize), core::mem::transmute(uncompresseddatasize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn QueryCompressorInformation(compressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryCompressorInformation(compressorhandle: COMPRESSOR_HANDLE, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn QueryCompressorInformation(compressorhandle : COMPRESSOR_HANDLE, compressinformationclass : COMPRESS_INFORMATION_CLASS, compressinformation : *mut core::ffi::c_void, compressinformationsize : usize) -> super::super::Foundation:: BOOL); - QueryCompressorInformation(compressorhandle.param().abi(), core::mem::transmute(compressinformationclass), core::mem::transmute(compressinformation), core::mem::transmute(compressinformationsize)).ok() + QueryCompressorInformation(core::mem::transmute(compressorhandle), core::mem::transmute(compressinformationclass), core::mem::transmute(compressinformation), core::mem::transmute(compressinformationsize)).ok() } #[inline] -pub unsafe fn QueryDecompressorInformation(decompressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryDecompressorInformation(decompressorhandle: DECOMPRESSOR_HANDLE, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn QueryDecompressorInformation(decompressorhandle : DECOMPRESSOR_HANDLE, compressinformationclass : COMPRESS_INFORMATION_CLASS, compressinformation : *mut core::ffi::c_void, compressinformationsize : usize) -> super::super::Foundation:: BOOL); - QueryDecompressorInformation(decompressorhandle.param().abi(), core::mem::transmute(compressinformationclass), core::mem::transmute(compressinformation), core::mem::transmute(compressinformationsize)).ok() + QueryDecompressorInformation(core::mem::transmute(decompressorhandle), core::mem::transmute(compressinformationclass), core::mem::transmute(compressinformation), core::mem::transmute(compressinformationsize)).ok() } #[inline] -pub unsafe fn ResetCompressor(compressorhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ResetCompressor(compressorhandle: COMPRESSOR_HANDLE) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn ResetCompressor(compressorhandle : COMPRESSOR_HANDLE) -> super::super::Foundation:: BOOL); - ResetCompressor(compressorhandle.param().abi()).ok() + ResetCompressor(core::mem::transmute(compressorhandle)).ok() } #[inline] -pub unsafe fn ResetDecompressor(decompressorhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ResetDecompressor(decompressorhandle: DECOMPRESSOR_HANDLE) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn ResetDecompressor(decompressorhandle : DECOMPRESSOR_HANDLE) -> super::super::Foundation:: BOOL); - ResetDecompressor(decompressorhandle.param().abi()).ok() + ResetDecompressor(core::mem::transmute(decompressorhandle)).ok() } #[inline] -pub unsafe fn SetCompressorInformation(compressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *const core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetCompressorInformation(compressorhandle: COMPRESSOR_HANDLE, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *const core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn SetCompressorInformation(compressorhandle : COMPRESSOR_HANDLE, compressinformationclass : COMPRESS_INFORMATION_CLASS, compressinformation : *const core::ffi::c_void, compressinformationsize : usize) -> super::super::Foundation:: BOOL); - SetCompressorInformation(compressorhandle.param().abi(), core::mem::transmute(compressinformationclass), core::mem::transmute(compressinformation), core::mem::transmute(compressinformationsize)).ok() + SetCompressorInformation(core::mem::transmute(compressorhandle), core::mem::transmute(compressinformationclass), core::mem::transmute(compressinformation), core::mem::transmute(compressinformationsize)).ok() } #[inline] -pub unsafe fn SetDecompressorInformation(decompressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *const core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetDecompressorInformation(decompressorhandle: DECOMPRESSOR_HANDLE, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *const core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn SetDecompressorInformation(decompressorhandle : DECOMPRESSOR_HANDLE, compressinformationclass : COMPRESS_INFORMATION_CLASS, compressinformation : *const core::ffi::c_void, compressinformationsize : usize) -> super::super::Foundation:: BOOL); - SetDecompressorInformation(decompressorhandle.param().abi(), core::mem::transmute(compressinformationclass), core::mem::transmute(compressinformation), core::mem::transmute(compressinformationsize)).ok() + SetDecompressorInformation(core::mem::transmute(decompressorhandle), core::mem::transmute(compressinformationclass), core::mem::transmute(compressinformation), core::mem::transmute(compressinformationsize)).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/DistributedFileSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/DistributedFileSystem/mod.rs index cb2058db60..2bec178d0c 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/DistributedFileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/DistributedFileSystem/mod.rs @@ -123,17 +123,17 @@ where NetDfsRemove(dfsentrypath.param().abi(), servername.param().abi(), sharename.param().abi()) } #[inline] -pub unsafe fn NetDfsRemoveFtRoot(servername: P0, rootshare: P1, ftdfsname: P2, flags: u32) -> u32 +pub unsafe fn NetDfsRemoveFtRoot(servername: P0, rootshare: P1, ftdfsname: P2, flags: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsRemoveFtRoot(servername : windows_core::PCWSTR, rootshare : windows_core::PCWSTR, ftdfsname : windows_core::PCWSTR, flags : u32) -> u32); - NetDfsRemoveFtRoot(servername.param().abi(), rootshare.param().abi(), ftdfsname.param().abi(), core::mem::transmute(flags)) + NetDfsRemoveFtRoot(servername.param().abi(), rootshare.param().abi(), ftdfsname.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NetDfsRemoveFtRootForced(domainname: P0, servername: P1, rootshare: P2, ftdfsname: P3, flags: u32) -> u32 +pub unsafe fn NetDfsRemoveFtRootForced(domainname: P0, servername: P1, rootshare: P2, ftdfsname: P3, flags: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -141,7 +141,7 @@ where P3: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsRemoveFtRootForced(domainname : windows_core::PCWSTR, servername : windows_core::PCWSTR, rootshare : windows_core::PCWSTR, ftdfsname : windows_core::PCWSTR, flags : u32) -> u32); - NetDfsRemoveFtRootForced(domainname.param().abi(), servername.param().abi(), rootshare.param().abi(), ftdfsname.param().abi(), core::mem::transmute(flags)) + NetDfsRemoveFtRootForced(domainname.param().abi(), servername.param().abi(), rootshare.param().abi(), ftdfsname.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetDfsRemoveRootTarget(pdfspath: P0, ptargetpath: P1, flags: u32) -> u32 @@ -153,13 +153,13 @@ where NetDfsRemoveRootTarget(pdfspath.param().abi(), ptargetpath.param().abi(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn NetDfsRemoveStdRoot(servername: P0, rootshare: P1, flags: u32) -> u32 +pub unsafe fn NetDfsRemoveStdRoot(servername: P0, rootshare: P1, flags: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsRemoveStdRoot(servername : windows_core::PCWSTR, rootshare : windows_core::PCWSTR, flags : u32) -> u32); - NetDfsRemoveStdRoot(servername.param().abi(), rootshare.param().abi(), core::mem::transmute(flags)) + NetDfsRemoveStdRoot(servername.param().abi(), rootshare.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetDfsSetClientInfo(dfsentrypath: P0, servername: P1, sharename: P2, level: u32, buffer: *const u8) -> u32 @@ -173,13 +173,12 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NetDfsSetFtContainerSecurity(domainname: P0, securityinformation: u32, psecuritydescriptor: P2) -> u32 +pub unsafe fn NetDfsSetFtContainerSecurity(domainname: P0, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR) -> u32 where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsSetFtContainerSecurity(domainname : windows_core::PCWSTR, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - NetDfsSetFtContainerSecurity(domainname.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()) + NetDfsSetFtContainerSecurity(domainname.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)) } #[inline] pub unsafe fn NetDfsSetInfo(dfsentrypath: P0, servername: P1, sharename: P2, level: u32, buffer: *const u8) -> u32 @@ -193,23 +192,21 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NetDfsSetSecurity(dfsentrypath: P0, securityinformation: u32, psecuritydescriptor: P2) -> u32 +pub unsafe fn NetDfsSetSecurity(dfsentrypath: P0, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR) -> u32 where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsSetSecurity(dfsentrypath : windows_core::PCWSTR, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - NetDfsSetSecurity(dfsentrypath.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()) + NetDfsSetSecurity(dfsentrypath.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NetDfsSetStdContainerSecurity(machinename: P0, securityinformation: u32, psecuritydescriptor: P2) -> u32 +pub unsafe fn NetDfsSetStdContainerSecurity(machinename: P0, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR) -> u32 where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetDfsSetStdContainerSecurity(machinename : windows_core::PCWSTR, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - NetDfsSetStdContainerSecurity(machinename.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()) + NetDfsSetStdContainerSecurity(machinename.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)) } pub const DFS_ADD_VOLUME: u32 = 1u32; pub const DFS_FORCE_REMOVE: u32 = 2147483648u32; diff --git a/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs index cd6ee5e4b0..7a6f358bb8 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs @@ -1,18 +1,12 @@ #[inline] -pub unsafe fn FhServiceBlockBackup(pipe: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FhServiceBlockBackup(pipe: FH_SERVICE_PIPE_HANDLE) -> windows_core::Result<()> { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceBlockBackup(pipe : FH_SERVICE_PIPE_HANDLE) -> windows_core::HRESULT); - FhServiceBlockBackup(pipe.param().abi()).ok() + FhServiceBlockBackup(core::mem::transmute(pipe)).ok() } #[inline] -pub unsafe fn FhServiceClosePipe(pipe: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FhServiceClosePipe(pipe: FH_SERVICE_PIPE_HANDLE) -> windows_core::Result<()> { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceClosePipe(pipe : FH_SERVICE_PIPE_HANDLE) -> windows_core::HRESULT); - FhServiceClosePipe(pipe.param().abi()).ok() + FhServiceClosePipe(core::mem::transmute(pipe)).ok() } #[inline] pub unsafe fn FhServiceOpenPipe(startserviceifstopped: P0) -> windows_core::Result @@ -24,38 +18,30 @@ where FhServiceOpenPipe(startserviceifstopped.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn FhServiceReloadConfiguration(pipe: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FhServiceReloadConfiguration(pipe: FH_SERVICE_PIPE_HANDLE) -> windows_core::Result<()> { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceReloadConfiguration(pipe : FH_SERVICE_PIPE_HANDLE) -> windows_core::HRESULT); - FhServiceReloadConfiguration(pipe.param().abi()).ok() + FhServiceReloadConfiguration(core::mem::transmute(pipe)).ok() } #[inline] -pub unsafe fn FhServiceStartBackup(pipe: P0, lowpriorityio: P1) -> windows_core::Result<()> +pub unsafe fn FhServiceStartBackup(pipe: FH_SERVICE_PIPE_HANDLE, lowpriorityio: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceStartBackup(pipe : FH_SERVICE_PIPE_HANDLE, lowpriorityio : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - FhServiceStartBackup(pipe.param().abi(), lowpriorityio.param().abi()).ok() + FhServiceStartBackup(core::mem::transmute(pipe), lowpriorityio.param().abi()).ok() } #[inline] -pub unsafe fn FhServiceStopBackup(pipe: P0, stoptracking: P1) -> windows_core::Result<()> +pub unsafe fn FhServiceStopBackup(pipe: FH_SERVICE_PIPE_HANDLE, stoptracking: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceStopBackup(pipe : FH_SERVICE_PIPE_HANDLE, stoptracking : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - FhServiceStopBackup(pipe.param().abi(), stoptracking.param().abi()).ok() + FhServiceStopBackup(core::mem::transmute(pipe), stoptracking.param().abi()).ok() } #[inline] -pub unsafe fn FhServiceUnblockBackup(pipe: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FhServiceUnblockBackup(pipe: FH_SERVICE_PIPE_HANDLE) -> windows_core::Result<()> { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceUnblockBackup(pipe : FH_SERVICE_PIPE_HANDLE) -> windows_core::HRESULT); - FhServiceUnblockBackup(pipe.param().abi()).ok() + FhServiceUnblockBackup(core::mem::transmute(pipe)).ok() } pub const BackupCancelled: FhBackupStopReason = FhBackupStopReason(4i32); pub const BackupInvalidStopReason: FhBackupStopReason = FhBackupStopReason(0i32); diff --git a/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs index e7a797a8be..430051c449 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs @@ -724,11 +724,8 @@ impl IFsrmActionCommand { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MonitorCommand)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMonitorCommand(&self, monitorcommand: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMonitorCommand)(windows_core::Interface::as_raw(self), monitorcommand.param().abi()).ok() + pub unsafe fn SetMonitorCommand(&self, monitorcommand: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMonitorCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(monitorcommand)).ok() } pub unsafe fn KillTimeOut(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -741,11 +738,8 @@ impl IFsrmActionCommand { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LogResult)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLogResult(&self, logresults: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogResult)(windows_core::Interface::as_raw(self), logresults.param().abi()).ok() + pub unsafe fn SetLogResult(&self, logresults: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogResult)(windows_core::Interface::as_raw(self), core::mem::transmute(logresults)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1508,11 +1502,8 @@ impl IFsrmClassificationManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ClassificationReportEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetClassificationReportEnabled(&self, reportenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetClassificationReportEnabled)(windows_core::Interface::as_raw(self), reportenabled.param().abi()).ok() + pub unsafe fn SetClassificationReportEnabled(&self, reportenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetClassificationReportEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(reportenabled)).ok() } pub unsafe fn ClassificationLastReportPathWithoutExtension(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2114,11 +2105,8 @@ impl IFsrmClassifierModuleDefinition { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).NeedsExplicitValue)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNeedsExplicitValue(&self, needsexplicitvalue: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNeedsExplicitValue)(windows_core::Interface::as_raw(self), needsexplicitvalue.param().abi()).ok() + pub unsafe fn SetNeedsExplicitValue(&self, needsexplicitvalue: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNeedsExplicitValue)(windows_core::Interface::as_raw(self), core::mem::transmute(needsexplicitvalue)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -3119,11 +3107,8 @@ impl IFsrmFileGroupImported { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OverwriteOnCommit)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOverwriteOnCommit(&self, overwrite: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOverwriteOnCommit)(windows_core::Interface::as_raw(self), overwrite.param().abi()).ok() + pub unsafe fn SetOverwriteOnCommit(&self, overwrite: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOverwriteOnCommit)(windows_core::Interface::as_raw(self), core::mem::transmute(overwrite)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -3328,11 +3313,8 @@ impl IFsrmFileManagementJob { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn OperationType(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3368,11 +3350,8 @@ impl IFsrmFileManagementJob { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ReportEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetReportEnabled(&self, reportenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReportEnabled)(windows_core::Interface::as_raw(self), reportenabled.param().abi()).ok() + pub unsafe fn SetReportEnabled(&self, reportenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReportEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(reportenabled)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Formats(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { @@ -4818,11 +4797,8 @@ impl IFsrmFileScreenTemplateImported { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OverwriteOnCommit)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOverwriteOnCommit(&self, overwrite: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOverwriteOnCommit)(windows_core::Interface::as_raw(self), overwrite.param().abi()).ok() + pub unsafe fn SetOverwriteOnCommit(&self, overwrite: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOverwriteOnCommit)(windows_core::Interface::as_raw(self), core::mem::transmute(overwrite)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5401,21 +5377,15 @@ impl IFsrmPipelineModuleDefinition { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn NeedsFileContent(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).NeedsFileContent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNeedsFileContent(&self, needsfilecontent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNeedsFileContent)(windows_core::Interface::as_raw(self), needsfilecontent.param().abi()).ok() + pub unsafe fn SetNeedsFileContent(&self, needsfilecontent: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNeedsFileContent)(windows_core::Interface::as_raw(self), core::mem::transmute(needsfilecontent)).ok() } pub unsafe fn Account(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7689,11 +7659,8 @@ impl IFsrmQuotaTemplateImported { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OverwriteOnCommit)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOverwriteOnCommit(&self, overwrite: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOverwriteOnCommit)(windows_core::Interface::as_raw(self), overwrite.param().abi()).ok() + pub unsafe fn SetOverwriteOnCommit(&self, overwrite: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOverwriteOnCommit)(windows_core::Interface::as_raw(self), core::mem::transmute(overwrite)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -8880,21 +8847,15 @@ impl IFsrmSetting { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DisableCommandLine)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDisableCommandLine(&self, disablecommandline: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisableCommandLine)(windows_core::Interface::as_raw(self), disablecommandline.param().abi()).ok() + pub unsafe fn SetDisableCommandLine(&self, disablecommandline: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisableCommandLine)(windows_core::Interface::as_raw(self), core::mem::transmute(disablecommandline)).ok() } pub unsafe fn EnableScreeningAudit(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnableScreeningAudit)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableScreeningAudit(&self, enablescreeningaudit: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableScreeningAudit)(windows_core::Interface::as_raw(self), enablescreeningaudit.param().abi()).ok() + pub unsafe fn SetEnableScreeningAudit(&self, enablescreeningaudit: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableScreeningAudit)(windows_core::Interface::as_raw(self), core::mem::transmute(enablescreeningaudit)).ok() } pub unsafe fn EmailTest(&self, mailto: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EmailTest)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(mailto)).ok() @@ -9086,11 +9047,8 @@ impl IFsrmStorageModuleDefinition { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UpdatesFileContent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUpdatesFileContent(&self, updatesfilecontent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUpdatesFileContent)(windows_core::Interface::as_raw(self), updatesfilecontent.param().abi()).ok() + pub unsafe fn SetUpdatesFileContent(&self, updatesfilecontent: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUpdatesFileContent)(windows_core::Interface::as_raw(self), core::mem::transmute(updatesfilecontent)).ok() } } #[cfg(feature = "Win32_System_Com")] 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 f5429e61f9..75aee4a9f1 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs @@ -1,19 +1,15 @@ #[inline] -pub unsafe fn AddLogContainer(hlog: P0, pcbcontainer: Option<*const u64>, pwszcontainerpath: P2, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn AddLogContainer(hlog: super::super::Foundation::HANDLE, pcbcontainer: Option<*const u64>, pwszcontainerpath: P2, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(core::ptr::null())), pwszcontainerpath.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))).ok() + AddLogContainer(core::mem::transmute(hlog), core::mem::transmute(pcbcontainer.unwrap_or(core::mem::zeroed())), pwszcontainerpath.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AddLogContainerSet(hlog: super::super::Foundation::HANDLE, pcbcontainer: Option<*const u64>, rgwszcontainerpath: &[windows_core::PCWSTR], preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(rgwszcontainerpath.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))).ok() + AddLogContainerSet(core::mem::transmute(hlog), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(pcbcontainer.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgwszcontainerpath.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -46,88 +42,62 @@ pub unsafe fn AreFileApisANSI() -> super::super::Foundation::BOOL { AreFileApisANSI() } #[inline] -pub unsafe fn AreShortNamesEnabled(handle: P0, enabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn AreShortNamesEnabled(handle: super::super::Foundation::HANDLE, enabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn AreShortNamesEnabled(handle : super::super::Foundation:: HANDLE, enabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - AreShortNamesEnabled(handle.param().abi(), core::mem::transmute(enabled)) + AreShortNamesEnabled(core::mem::transmute(handle), core::mem::transmute(enabled)) } #[inline] -pub unsafe fn BackupRead(hfile: P0, lpbuffer: &mut [u8], lpnumberofbytesread: *mut u32, babort: P4, bprocesssecurity: P5, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn BackupRead(hfile: super::super::Foundation::HANDLE, lpbuffer: &mut [u8], lpnumberofbytesread: *mut u32, babort: P4, bprocesssecurity: P5, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn BackupRead(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut u8, nnumberofbytestoread : u32, lpnumberofbytesread : *mut u32, babort : super::super::Foundation:: BOOL, bprocesssecurity : super::super::Foundation:: BOOL, lpcontext : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupRead(hfile.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesread), babort.param().abi(), bprocesssecurity.param().abi(), core::mem::transmute(lpcontext)).ok() + BackupRead(core::mem::transmute(hfile), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesread), babort.param().abi(), bprocesssecurity.param().abi(), core::mem::transmute(lpcontext)).ok() } #[inline] -pub unsafe fn BackupSeek(hfile: P0, dwlowbytestoseek: u32, dwhighbytestoseek: u32, lpdwlowbyteseeked: *mut u32, lpdwhighbyteseeked: *mut u32, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BackupSeek(hfile: super::super::Foundation::HANDLE, dwlowbytestoseek: u32, dwhighbytestoseek: u32, lpdwlowbyteseeked: *mut u32, lpdwhighbyteseeked: *mut u32, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn BackupSeek(hfile : super::super::Foundation:: HANDLE, dwlowbytestoseek : u32, dwhighbytestoseek : u32, lpdwlowbyteseeked : *mut u32, lpdwhighbyteseeked : *mut u32, lpcontext : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupSeek(hfile.param().abi(), core::mem::transmute(dwlowbytestoseek), core::mem::transmute(dwhighbytestoseek), core::mem::transmute(lpdwlowbyteseeked), core::mem::transmute(lpdwhighbyteseeked), core::mem::transmute(lpcontext)).ok() + BackupSeek(core::mem::transmute(hfile), core::mem::transmute(dwlowbytestoseek), core::mem::transmute(dwhighbytestoseek), core::mem::transmute(lpdwlowbyteseeked), core::mem::transmute(lpdwhighbyteseeked), core::mem::transmute(lpcontext)).ok() } #[inline] -pub unsafe fn BackupWrite(hfile: P0, lpbuffer: &[u8], lpnumberofbyteswritten: *mut u32, babort: P4, bprocesssecurity: P5, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn BackupWrite(hfile: super::super::Foundation::HANDLE, lpbuffer: &[u8], lpnumberofbyteswritten: *mut u32, babort: P4, bprocesssecurity: P5, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn BackupWrite(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpnumberofbyteswritten : *mut u32, babort : super::super::Foundation:: BOOL, bprocesssecurity : super::super::Foundation:: BOOL, lpcontext : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupWrite(hfile.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbyteswritten), babort.param().abi(), bprocesssecurity.param().abi(), core::mem::transmute(lpcontext)).ok() + BackupWrite(core::mem::transmute(hfile), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbyteswritten), babort.param().abi(), bprocesssecurity.param().abi(), core::mem::transmute(lpcontext)).ok() } #[inline] -pub unsafe fn BuildIoRingCancelRequest(ioring: P0, file: IORING_HANDLE_REF, optocancel: usize, userdata: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BuildIoRingCancelRequest(ioring: HIORING, file: IORING_HANDLE_REF, optocancel: usize, userdata: usize) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn BuildIoRingCancelRequest(ioring : HIORING, file : IORING_HANDLE_REF, optocancel : usize, userdata : usize) -> windows_core::HRESULT); - BuildIoRingCancelRequest(ioring.param().abi(), core::mem::transmute(file), core::mem::transmute(optocancel), core::mem::transmute(userdata)).ok() + BuildIoRingCancelRequest(core::mem::transmute(ioring), core::mem::transmute(file), core::mem::transmute(optocancel), core::mem::transmute(userdata)).ok() } #[inline] -pub unsafe fn BuildIoRingFlushFile(ioring: P0, fileref: IORING_HANDLE_REF, flushmode: FILE_FLUSH_MODE, userdata: usize, sqeflags: IORING_SQE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BuildIoRingFlushFile(ioring: HIORING, fileref: IORING_HANDLE_REF, flushmode: FILE_FLUSH_MODE, userdata: usize, sqeflags: IORING_SQE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn BuildIoRingFlushFile(ioring : HIORING, fileref : IORING_HANDLE_REF, flushmode : FILE_FLUSH_MODE, userdata : usize, sqeflags : IORING_SQE_FLAGS) -> windows_core::HRESULT); - BuildIoRingFlushFile(ioring.param().abi(), core::mem::transmute(fileref), core::mem::transmute(flushmode), core::mem::transmute(userdata), core::mem::transmute(sqeflags)).ok() + BuildIoRingFlushFile(core::mem::transmute(ioring), core::mem::transmute(fileref), core::mem::transmute(flushmode), core::mem::transmute(userdata), core::mem::transmute(sqeflags)).ok() } #[inline] -pub unsafe fn BuildIoRingReadFile(ioring: P0, fileref: IORING_HANDLE_REF, dataref: IORING_BUFFER_REF, numberofbytestoread: u32, fileoffset: u64, userdata: usize, sqeflags: IORING_SQE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BuildIoRingReadFile(ioring: HIORING, fileref: IORING_HANDLE_REF, dataref: IORING_BUFFER_REF, numberofbytestoread: u32, fileoffset: u64, userdata: usize, sqeflags: IORING_SQE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn BuildIoRingReadFile(ioring : HIORING, fileref : IORING_HANDLE_REF, dataref : IORING_BUFFER_REF, numberofbytestoread : u32, fileoffset : u64, userdata : usize, sqeflags : IORING_SQE_FLAGS) -> windows_core::HRESULT); - BuildIoRingReadFile(ioring.param().abi(), core::mem::transmute(fileref), core::mem::transmute(dataref), core::mem::transmute(numberofbytestoread), core::mem::transmute(fileoffset), core::mem::transmute(userdata), core::mem::transmute(sqeflags)).ok() + BuildIoRingReadFile(core::mem::transmute(ioring), core::mem::transmute(fileref), core::mem::transmute(dataref), core::mem::transmute(numberofbytestoread), core::mem::transmute(fileoffset), core::mem::transmute(userdata), core::mem::transmute(sqeflags)).ok() } #[inline] -pub unsafe fn BuildIoRingRegisterBuffers(ioring: P0, buffers: &[IORING_BUFFER_INFO], userdata: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BuildIoRingRegisterBuffers(ioring: HIORING, buffers: &[IORING_BUFFER_INFO], userdata: usize) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn BuildIoRingRegisterBuffers(ioring : HIORING, count : u32, buffers : *const IORING_BUFFER_INFO, userdata : usize) -> windows_core::HRESULT); - BuildIoRingRegisterBuffers(ioring.param().abi(), buffers.len().try_into().unwrap(), core::mem::transmute(buffers.as_ptr()), core::mem::transmute(userdata)).ok() + BuildIoRingRegisterBuffers(core::mem::transmute(ioring), buffers.len().try_into().unwrap(), core::mem::transmute(buffers.as_ptr()), core::mem::transmute(userdata)).ok() } #[inline] -pub unsafe fn BuildIoRingRegisterFileHandles(ioring: P0, handles: &[super::super::Foundation::HANDLE], userdata: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BuildIoRingRegisterFileHandles(ioring: HIORING, handles: &[super::super::Foundation::HANDLE], userdata: usize) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn BuildIoRingRegisterFileHandles(ioring : HIORING, count : u32, handles : *const super::super::Foundation:: HANDLE, userdata : usize) -> windows_core::HRESULT); - BuildIoRingRegisterFileHandles(ioring.param().abi(), handles.len().try_into().unwrap(), core::mem::transmute(handles.as_ptr()), core::mem::transmute(userdata)).ok() + BuildIoRingRegisterFileHandles(core::mem::transmute(ioring), handles.len().try_into().unwrap(), core::mem::transmute(handles.as_ptr()), core::mem::transmute(userdata)).ok() } #[inline] -pub unsafe fn BuildIoRingWriteFile(ioring: P0, fileref: IORING_HANDLE_REF, bufferref: IORING_BUFFER_REF, numberofbytestowrite: u32, fileoffset: u64, writeflags: FILE_WRITE_FLAGS, userdata: usize, sqeflags: IORING_SQE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BuildIoRingWriteFile(ioring: HIORING, fileref: IORING_HANDLE_REF, bufferref: IORING_BUFFER_REF, numberofbytestowrite: u32, fileoffset: u64, writeflags: FILE_WRITE_FLAGS, userdata: usize, sqeflags: IORING_SQE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn BuildIoRingWriteFile(ioring : HIORING, fileref : IORING_HANDLE_REF, bufferref : IORING_BUFFER_REF, numberofbytestowrite : u32, fileoffset : u64, writeflags : FILE_WRITE_FLAGS, userdata : usize, sqeflags : IORING_SQE_FLAGS) -> windows_core::HRESULT); - BuildIoRingWriteFile(ioring.param().abi(), core::mem::transmute(fileref), core::mem::transmute(bufferref), core::mem::transmute(numberofbytestowrite), core::mem::transmute(fileoffset), core::mem::transmute(writeflags), core::mem::transmute(userdata), core::mem::transmute(sqeflags)).ok() + BuildIoRingWriteFile(core::mem::transmute(ioring), core::mem::transmute(fileref), core::mem::transmute(bufferref), core::mem::transmute(numberofbytestowrite), core::mem::transmute(fileoffset), core::mem::transmute(writeflags), core::mem::transmute(userdata), core::mem::transmute(sqeflags)).ok() } #[inline] pub unsafe fn CheckNameLegalDOS8Dot3A(lpname: P0, lpoemname: Option<&mut [u8]>, pbnamecontainsspaces: Option<*mut super::super::Foundation::BOOL>, pbnamelegal: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -135,7 +105,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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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,15 +113,12 @@ 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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(pbnamelegal)).ok() } #[inline] -pub unsafe fn CloseAndResetLogFile(hlog: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseAndResetLogFile(hlog: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn CloseAndResetLogFile(hlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CloseAndResetLogFile(hlog.param().abi()).ok() + CloseAndResetLogFile(core::mem::transmute(hlog)).ok() } #[inline] pub unsafe fn CloseEncryptedFileRaw(pvcontext: *const core::ffi::c_void) { @@ -159,44 +126,29 @@ pub unsafe fn CloseEncryptedFileRaw(pvcontext: *const core::ffi::c_void) { CloseEncryptedFileRaw(core::mem::transmute(pvcontext)) } #[inline] -pub unsafe fn CloseIoRing(ioring: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseIoRing(ioring: HIORING) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn CloseIoRing(ioring : HIORING) -> windows_core::HRESULT); - CloseIoRing(ioring.param().abi()).ok() + CloseIoRing(core::mem::transmute(ioring)).ok() } #[inline] -pub unsafe fn CommitComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CommitComplete(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn CommitComplete(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - CommitComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + CommitComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn CommitEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CommitEnlistment(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn CommitEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - CommitEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + CommitEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn CommitTransaction(transactionhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CommitTransaction(transactionhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn CommitTransaction(transactionhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CommitTransaction(transactionhandle.param().abi()).ok() + CommitTransaction(core::mem::transmute(transactionhandle)).ok() } #[inline] -pub unsafe fn CommitTransactionAsync(transactionhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CommitTransactionAsync(transactionhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn CommitTransactionAsync(transactionhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CommitTransactionAsync(transactionhandle.param().abi()).ok() + CommitTransactionAsync(core::mem::transmute(transactionhandle)).ok() } #[inline] pub unsafe fn CompareFileTime(lpfiletime1: *const super::super::Foundation::FILETIME, lpfiletime2: *const super::super::Foundation::FILETIME) -> i32 { @@ -210,7 +162,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(core::ptr::null()))).ok() + CopyFile2(pwszexistingfilename.param().abi(), pwsznewfilename.param().abi(), core::mem::transmute(pextendedparameters.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CopyFileA(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> windows_core::Result<()> @@ -223,22 +175,22 @@ where CopyFileA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), bfailifexists.param().abi()).ok() } #[inline] -pub unsafe fn CopyFileExA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*mut super::super::Foundation::BOOL>, dwcopyflags: COPYFILE_FLAGS) -> windows_core::Result<()> +pub unsafe fn CopyFileExA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*mut super::super::Foundation::BOOL>, dwcopyflags: COPYFILE_FLAGS) -> windows_core::Result<()> where P0: windows_core::Param, 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 : COPYFILE_FLAGS) -> super::super::Foundation:: BOOL); - CopyFileExA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwcopyflags)).ok() + CopyFileExA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: COPYFILE_FLAGS) -> windows_core::Result<()> +pub unsafe fn CopyFileExW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*mut super::super::Foundation::BOOL>, dwcopyflags: COPYFILE_FLAGS) -> windows_core::Result<()> where P0: windows_core::Param, 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 : COPYFILE_FLAGS) -> super::super::Foundation:: BOOL); - CopyFileExW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwcopyflags)).ok() + CopyFileExW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcopyflags)).ok() } #[inline] pub unsafe fn CopyFileFromAppW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> super::super::Foundation::BOOL @@ -251,24 +203,22 @@ where CopyFileFromAppW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), bfailifexists.param().abi()) } #[inline] -pub unsafe fn CopyFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*const super::super::Foundation::BOOL>, dwcopyflags: u32, htransaction: P6) -> windows_core::Result<()> +pub unsafe fn CopyFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*const super::super::Foundation::BOOL>, dwcopyflags: u32, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P6: 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(), core::mem::transmute(lpprogressroutine), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(core::ptr::null())), core::mem::transmute(dwcopyflags), htransaction.param().abi()).ok() + CopyFileTransactedA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcopyflags), core::mem::transmute(htransaction)).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: P6) -> windows_core::Result<()> +pub unsafe fn CopyFileTransactedW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*const super::super::Foundation::BOOL>, dwcopyflags: u32, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P6: 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(), core::mem::transmute(lpprogressroutine), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(core::ptr::null())), core::mem::transmute(dwcopyflags), htransaction.param().abi()).ok() + CopyFileTransactedW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcopyflags), core::mem::transmute(htransaction)).ok() } #[inline] pub unsafe fn CopyFileW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> windows_core::Result<()> @@ -292,7 +242,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(core::ptr::null()))).ok() + CreateDirectoryA(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -302,7 +252,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(core::ptr::null()))).ok() + CreateDirectoryExA(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -312,7 +262,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(core::ptr::null()))).ok() + CreateDirectoryExW(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -321,29 +271,27 @@ 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(core::ptr::null()))) + CreateDirectoryFromAppW(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateDirectoryTransactedA(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P3) -> windows_core::Result<()> +pub unsafe fn CreateDirectoryTransactedA(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: 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(core::ptr::null())), htransaction.param().abi()).ok() + CreateDirectoryTransactedA(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateDirectoryTransactedW(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P3) -> windows_core::Result<()> +pub unsafe fn CreateDirectoryTransactedW(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: 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(core::ptr::null())), htransaction.param().abi()).ok() + CreateDirectoryTransactedW(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -352,17 +300,13 @@ 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(core::ptr::null()))).ok() + CreateDirectoryW(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateEnlistment(lpenlistmentattributes: *mut super::super::Security::SECURITY_ATTRIBUTES, resourcemanagerhandle: P1, transactionhandle: P2, notificationmask: u32, createoptions: u32, enlistmentkey: *mut core::ffi::c_void) -> windows_core::Result -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn CreateEnlistment(lpenlistmentattributes: *mut super::super::Security::SECURITY_ATTRIBUTES, resourcemanagerhandle: super::super::Foundation::HANDLE, transactionhandle: super::super::Foundation::HANDLE, notificationmask: u32, createoptions: u32, enlistmentkey: *mut core::ffi::c_void) -> windows_core::Result { windows_targets::link!("ktmw32.dll" "system" fn CreateEnlistment(lpenlistmentattributes : *mut super::super::Security:: SECURITY_ATTRIBUTES, resourcemanagerhandle : super::super::Foundation:: HANDLE, transactionhandle : super::super::Foundation:: HANDLE, notificationmask : u32, createoptions : u32, enlistmentkey : *mut core::ffi::c_void) -> super::super::Foundation:: HANDLE); - let result__ = CreateEnlistment(core::mem::transmute(lpenlistmentattributes), resourcemanagerhandle.param().abi(), transactionhandle.param().abi(), core::mem::transmute(notificationmask), core::mem::transmute(createoptions), core::mem::transmute(enlistmentkey)); + let result__ = CreateEnlistment(core::mem::transmute(lpenlistmentattributes), core::mem::transmute(resourcemanagerhandle), core::mem::transmute(transactionhandle), core::mem::transmute(notificationmask), core::mem::transmute(createoptions), core::mem::transmute(enlistmentkey)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -372,7 +316,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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationdisposition), core::mem::transmute(pcreateexparams.unwrap_or(core::ptr::null()))); + let result__ = CreateFile2(lpfilename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationdisposition), core::mem::transmute(pcreateexparams.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -382,62 +326,77 @@ 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationdisposition), core::mem::transmute(pcreateexparams.unwrap_or(core::ptr::null()))) + CreateFile2FromAppW(lpfilename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationdisposition), core::mem::transmute(pcreateexparams.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileA(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: FILE_CREATION_DISPOSITION, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES, htemplatefile: P6) -> windows_core::Result +pub unsafe fn CreateFileA(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: FILE_CREATION_DISPOSITION, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES, htemplatefile: Option) -> windows_core::Result where P0: windows_core::Param, - P6: 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(dwcreationdisposition), core::mem::transmute(dwflagsandattributes), htemplatefile.param().abi()); + let result__ = CreateFileA(lpfilename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcreationdisposition), core::mem::transmute(dwflagsandattributes), core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileFromAppW(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: u32, dwflagsandattributes: u32, htemplatefile: P6) -> super::super::Foundation::HANDLE +pub unsafe fn CreateFileFromAppW(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: u32, dwflagsandattributes: u32, htemplatefile: Option) -> super::super::Foundation::HANDLE where P0: windows_core::Param, - P6: 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(dwcreationdisposition), core::mem::transmute(dwflagsandattributes), htemplatefile.param().abi()) + CreateFileFromAppW(lpfilename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcreationdisposition), core::mem::transmute(dwflagsandattributes), core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileTransactedA(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: FILE_CREATION_DISPOSITION, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES, htemplatefile: P6, htransaction: P7, pusminiversion: Option<*const TXFS_MINIVERSION>, lpextendedparameter: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn CreateFileTransactedA(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: FILE_CREATION_DISPOSITION, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES, htemplatefile: Option, htransaction: super::super::Foundation::HANDLE, pusminiversion: Option<*const TXFS_MINIVERSION>, lpextendedparameter: Option<*const core::ffi::c_void>) -> windows_core::Result where P0: windows_core::Param, - P6: windows_core::Param, - P7: 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(dwcreationdisposition), core::mem::transmute(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()))); + let result__ = CreateFileTransactedA( + lpfilename.param().abi(), + core::mem::transmute(dwdesiredaccess), + core::mem::transmute(dwsharemode), + core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwcreationdisposition), + core::mem::transmute(dwflagsandattributes), + core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed())), + core::mem::transmute(htransaction), + core::mem::transmute(pusminiversion.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpextendedparameter.unwrap_or(core::mem::zeroed())), + ); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileTransactedW(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: FILE_CREATION_DISPOSITION, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES, htemplatefile: P6, htransaction: P7, pusminiversion: Option<*const TXFS_MINIVERSION>, lpextendedparameter: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn CreateFileTransactedW(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: FILE_CREATION_DISPOSITION, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES, htemplatefile: Option, htransaction: super::super::Foundation::HANDLE, pusminiversion: Option<*const TXFS_MINIVERSION>, lpextendedparameter: Option<*const core::ffi::c_void>) -> windows_core::Result where P0: windows_core::Param, - P6: windows_core::Param, - P7: 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(dwcreationdisposition), core::mem::transmute(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()))); + let result__ = CreateFileTransactedW( + lpfilename.param().abi(), + core::mem::transmute(dwdesiredaccess), + core::mem::transmute(dwsharemode), + core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(dwcreationdisposition), + core::mem::transmute(dwflagsandattributes), + core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed())), + core::mem::transmute(htransaction), + core::mem::transmute(pusminiversion.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpextendedparameter.unwrap_or(core::mem::zeroed())), + ); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileW(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: FILE_CREATION_DISPOSITION, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES, htemplatefile: P6) -> windows_core::Result +pub unsafe fn CreateFileW(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwcreationdisposition: FILE_CREATION_DISPOSITION, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES, htemplatefile: Option) -> windows_core::Result where P0: windows_core::Param, - P6: 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(dwcreationdisposition), core::mem::transmute(dwflagsandattributes), htemplatefile.param().abi()); + let result__ = CreateFileW(lpfilename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcreationdisposition), core::mem::transmute(dwflagsandattributes), core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -448,29 +407,27 @@ 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(core::ptr::null()))).ok() + CreateHardLinkA(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateHardLinkTransactedA(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P3) -> windows_core::Result<()> +pub unsafe fn CreateHardLinkTransactedA(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: 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(core::ptr::null())), htransaction.param().abi()).ok() + CreateHardLinkTransactedA(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateHardLinkTransactedW(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P3) -> windows_core::Result<()> +pub unsafe fn CreateHardLinkTransactedW(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: 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(core::ptr::null())), htransaction.param().abi()).ok() + CreateHardLinkTransactedW(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -480,7 +437,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(core::ptr::null()))).ok() + CreateHardLinkW(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CreateIoRing(ioringversion: IORING_VERSION, flags: IORING_CREATE_FLAGS, submissionqueuesize: u32, completionqueuesize: u32) -> windows_core::Result { @@ -490,12 +447,9 @@ pub unsafe fn CreateIoRing(ioringversion: IORING_VERSION, flags: IORING_CREATE_F } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn CreateLogContainerScanContext(hlog: P0, cfromcontainer: u32, ccontainers: u32, escanmode: u8, pcxscan: *mut CLS_SCAN_CONTEXT, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CreateLogContainerScanContext(hlog: super::super::Foundation::HANDLE, cfromcontainer: u32, ccontainers: u32, escanmode: u8, pcxscan: *mut CLS_SCAN_CONTEXT, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn CreateLogContainerScanContext(hlog : super::super::Foundation:: HANDLE, cfromcontainer : u32, ccontainers : u32, escanmode : u8, pcxscan : *mut CLS_SCAN_CONTEXT, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - CreateLogContainerScanContext(hlog.param().abi(), core::mem::transmute(cfromcontainer), core::mem::transmute(ccontainers), core::mem::transmute(escanmode), core::mem::transmute(pcxscan), core::mem::transmute(poverlapped)).ok() + CreateLogContainerScanContext(core::mem::transmute(hlog), core::mem::transmute(cfromcontainer), core::mem::transmute(ccontainers), core::mem::transmute(escanmode), core::mem::transmute(pcxscan), core::mem::transmute(poverlapped)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -508,22 +462,18 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateLogMarshallingArea(hlog: P0, pfnallocbuffer: CLFS_BLOCK_ALLOCATION, pfnfreebuffer: CLFS_BLOCK_DEALLOCATION, pvblockalloccontext: *mut core::ffi::c_void, cbmarshallingbuffer: u32, cmaxwritebuffers: u32, cmaxreadbuffers: u32, ppvmarshal: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CreateLogMarshallingArea(hlog: super::super::Foundation::HANDLE, pfnallocbuffer: CLFS_BLOCK_ALLOCATION, pfnfreebuffer: CLFS_BLOCK_DEALLOCATION, pvblockalloccontext: *mut core::ffi::c_void, cbmarshallingbuffer: u32, cmaxwritebuffers: u32, cmaxreadbuffers: u32, ppvmarshal: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn CreateLogMarshallingArea(hlog : super::super::Foundation:: HANDLE, pfnallocbuffer : CLFS_BLOCK_ALLOCATION, pfnfreebuffer : CLFS_BLOCK_DEALLOCATION, pvblockalloccontext : *mut core::ffi::c_void, cbmarshallingbuffer : u32, cmaxwritebuffers : u32, cmaxreadbuffers : u32, ppvmarshal : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreateLogMarshallingArea(hlog.param().abi(), core::mem::transmute(pfnallocbuffer), core::mem::transmute(pfnfreebuffer), core::mem::transmute(pvblockalloccontext), core::mem::transmute(cbmarshallingbuffer), core::mem::transmute(cmaxwritebuffers), core::mem::transmute(cmaxreadbuffers), core::mem::transmute(ppvmarshal)).ok() + CreateLogMarshallingArea(core::mem::transmute(hlog), core::mem::transmute(pfnallocbuffer), core::mem::transmute(pfnfreebuffer), core::mem::transmute(pvblockalloccontext), core::mem::transmute(cbmarshallingbuffer), core::mem::transmute(cmaxwritebuffers), core::mem::transmute(cmaxreadbuffers), core::mem::transmute(ppvmarshal)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateResourceManager(lpresourcemanagerattributes: *mut super::super::Security::SECURITY_ATTRIBUTES, resourcemanagerid: *mut windows_core::GUID, createoptions: u32, tmhandle: P3, description: P4) -> windows_core::Result +pub unsafe fn CreateResourceManager(lpresourcemanagerattributes: *mut super::super::Security::SECURITY_ATTRIBUTES, resourcemanagerid: *mut windows_core::GUID, createoptions: u32, tmhandle: super::super::Foundation::HANDLE, description: P4) -> windows_core::Result where - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("ktmw32.dll" "system" fn CreateResourceManager(lpresourcemanagerattributes : *mut super::super::Security:: SECURITY_ATTRIBUTES, resourcemanagerid : *mut windows_core::GUID, createoptions : u32, tmhandle : super::super::Foundation:: HANDLE, description : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateResourceManager(core::mem::transmute(lpresourcemanagerattributes), core::mem::transmute(resourcemanagerid), core::mem::transmute(createoptions), tmhandle.param().abi(), description.param().abi()); + let result__ = CreateResourceManager(core::mem::transmute(lpresourcemanagerattributes), core::mem::transmute(resourcemanagerid), core::mem::transmute(createoptions), core::mem::transmute(tmhandle), description.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -536,24 +486,22 @@ where CreateSymbolicLinkA(lpsymlinkfilename.param().abi(), lptargetfilename.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn CreateSymbolicLinkTransactedA(lpsymlinkfilename: P0, lptargetfilename: P1, dwflags: SYMBOLIC_LINK_FLAGS, htransaction: P3) -> super::super::Foundation::BOOLEAN +pub unsafe fn CreateSymbolicLinkTransactedA(lpsymlinkfilename: P0, lptargetfilename: P1, dwflags: SYMBOLIC_LINK_FLAGS, htransaction: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOLEAN where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateSymbolicLinkTransactedA(lpsymlinkfilename : windows_core::PCSTR, lptargetfilename : windows_core::PCSTR, dwflags : SYMBOLIC_LINK_FLAGS, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOLEAN); - CreateSymbolicLinkTransactedA(lpsymlinkfilename.param().abi(), lptargetfilename.param().abi(), core::mem::transmute(dwflags), htransaction.param().abi()) + CreateSymbolicLinkTransactedA(lpsymlinkfilename.param().abi(), lptargetfilename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(htransaction)) } #[inline] -pub unsafe fn CreateSymbolicLinkTransactedW(lpsymlinkfilename: P0, lptargetfilename: P1, dwflags: SYMBOLIC_LINK_FLAGS, htransaction: P3) -> super::super::Foundation::BOOLEAN +pub unsafe fn CreateSymbolicLinkTransactedW(lpsymlinkfilename: P0, lptargetfilename: P1, dwflags: SYMBOLIC_LINK_FLAGS, htransaction: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOLEAN where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateSymbolicLinkTransactedW(lpsymlinkfilename : windows_core::PCWSTR, lptargetfilename : windows_core::PCWSTR, dwflags : SYMBOLIC_LINK_FLAGS, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOLEAN); - CreateSymbolicLinkTransactedW(lpsymlinkfilename.param().abi(), lptargetfilename.param().abi(), core::mem::transmute(dwflags), htransaction.param().abi()) + CreateSymbolicLinkTransactedW(lpsymlinkfilename.param().abi(), lptargetfilename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(htransaction)) } #[inline] pub unsafe fn CreateSymbolicLinkW(lpsymlinkfilename: P0, lptargetfilename: P1, dwflags: SYMBOLIC_LINK_FLAGS) -> super::super::Foundation::BOOLEAN @@ -565,12 +513,9 @@ where CreateSymbolicLinkW(lpsymlinkfilename.param().abi(), lptargetfilename.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn CreateTapePartition(hdevice: P0, dwpartitionmethod: CREATE_TAPE_PARTITION_METHOD, dwcount: u32, dwsize: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn CreateTapePartition(hdevice: super::super::Foundation::HANDLE, dwpartitionmethod: CREATE_TAPE_PARTITION_METHOD, dwcount: u32, dwsize: u32) -> u32 { windows_targets::link!("kernel32.dll" "system" fn CreateTapePartition(hdevice : super::super::Foundation:: HANDLE, dwpartitionmethod : CREATE_TAPE_PARTITION_METHOD, dwcount : u32, dwsize : u32) -> u32); - CreateTapePartition(hdevice.param().abi(), core::mem::transmute(dwpartitionmethod), core::mem::transmute(dwcount), core::mem::transmute(dwsize)) + CreateTapePartition(core::mem::transmute(hdevice), core::mem::transmute(dwpartitionmethod), core::mem::transmute(dwcount), core::mem::transmute(dwsize)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -593,20 +538,20 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn DecryptFileA(lpfilename: P0, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn DecryptFileA(lpfilename: P0, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn DecryptFileA(lpfilename : windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - DecryptFileA(lpfilename.param().abi(), core::mem::transmute(dwreserved)).ok() + DecryptFileA(lpfilename.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DecryptFileW(lpfilename: P0, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn DecryptFileW(lpfilename: P0, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn DecryptFileW(lpfilename : windows_core::PCWSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - DecryptFileW(lpfilename.param().abi(), core::mem::transmute(dwreserved)).ok() + DecryptFileW(lpfilename.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DefineDosDeviceA(dwflags: DEFINE_DOS_DEVICE_FLAGS, lpdevicename: P1, lptargetpath: P2) -> windows_core::Result<()> @@ -643,22 +588,20 @@ where DeleteFileFromAppW(lpfilename.param().abi()) } #[inline] -pub unsafe fn DeleteFileTransactedA(lpfilename: P0, htransaction: P1) -> windows_core::Result<()> +pub unsafe fn DeleteFileTransactedA(lpfilename: P0, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn DeleteFileTransactedA(lpfilename : windows_core::PCSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteFileTransactedA(lpfilename.param().abi(), htransaction.param().abi()).ok() + DeleteFileTransactedA(lpfilename.param().abi(), core::mem::transmute(htransaction)).ok() } #[inline] -pub unsafe fn DeleteFileTransactedW(lpfilename: P0, htransaction: P1) -> windows_core::Result<()> +pub unsafe fn DeleteFileTransactedW(lpfilename: P0, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn DeleteFileTransactedW(lpfilename : windows_core::PCWSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteFileTransactedW(lpfilename.param().abi(), htransaction.param().abi()).ok() + DeleteFileTransactedW(lpfilename.param().abi(), core::mem::transmute(htransaction)).ok() } #[inline] pub unsafe fn DeleteFileW(lpfilename: P0) -> windows_core::Result<()> @@ -669,12 +612,9 @@ where DeleteFileW(lpfilename.param().abi()).ok() } #[inline] -pub unsafe fn DeleteLogByHandle(hlog: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteLogByHandle(hlog: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn DeleteLogByHandle(hlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteLogByHandle(hlog.param().abi()).ok() + DeleteLogByHandle(core::mem::transmute(hlog)).ok() } #[inline] pub unsafe fn DeleteLogFile(pszlogfilename: P0, pvreserved: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -706,12 +646,9 @@ where DeleteVolumeMountPointW(lpszvolumemountpoint.param().abi()).ok() } #[inline] -pub unsafe fn DeregisterManageableLogClient(hlog: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DeregisterManageableLogClient(hlog: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn DeregisterManageableLogClient(hlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeregisterManageableLogClient(hlog.param().abi()).ok() + DeregisterManageableLogClient(core::mem::transmute(hlog)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -721,7 +658,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(), core::mem::transmute(dwcreationdistribution), core::mem::transmute(dwattributes), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) + DuplicateEncryptionInfoFile(srcfilename.param().abi(), dstfilename.param().abi(), core::mem::transmute(dwcreationdistribution), core::mem::transmute(dwattributes), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn EncryptFileA(lpfilename: P0) -> windows_core::Result<()> @@ -749,13 +686,12 @@ where EncryptionDisable(dirpath.param().abi(), disable.param().abi()).ok() } #[inline] -pub unsafe fn EraseTape(hdevice: P0, dwerasetype: ERASE_TAPE_TYPE, bimmediate: P2) -> u32 +pub unsafe fn EraseTape(hdevice: super::super::Foundation::HANDLE, dwerasetype: ERASE_TAPE_TYPE, bimmediate: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EraseTape(hdevice : super::super::Foundation:: HANDLE, dwerasetype : ERASE_TAPE_TYPE, bimmediate : super::super::Foundation:: BOOL) -> u32); - EraseTape(hdevice.param().abi(), core::mem::transmute(dwerasetype), bimmediate.param().abi()) + EraseTape(core::mem::transmute(hdevice), core::mem::transmute(dwerasetype), bimmediate.param().abi()) } #[inline] pub unsafe fn FileEncryptionStatusA(lpfilename: P0, lpstatus: *mut u32) -> windows_core::Result<()> @@ -784,12 +720,9 @@ pub unsafe fn FindClose(hfindfile: super::super::Foundation::HANDLE) -> windows_ FindClose(core::mem::transmute(hfindfile)).ok() } #[inline] -pub unsafe fn FindCloseChangeNotification(hchangehandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindCloseChangeNotification(hchangehandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindCloseChangeNotification(hchangehandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FindCloseChangeNotification(hchangehandle.param().abi()).ok() + FindCloseChangeNotification(core::mem::transmute(hchangehandle)).ok() } #[inline] pub unsafe fn FindFirstChangeNotificationA(lppathname: P0, bwatchsubtree: P1, dwnotifyfilter: FILE_NOTIFY_CHANGE) -> windows_core::Result @@ -826,7 +759,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(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), core::mem::transmute(dwadditionalflags)); + let result__ = FindFirstFileExA(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwadditionalflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -835,7 +768,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(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), core::mem::transmute(dwadditionalflags)) + FindFirstFileExFromAppW(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(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,17 +776,16 @@ 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(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), core::mem::transmute(dwadditionalflags)); + let result__ = FindFirstFileExW(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwadditionalflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindFirstFileNameTransactedW(lpfilename: P0, dwflags: u32, stringlength: *mut u32, linkname: windows_core::PWSTR, htransaction: P4) -> windows_core::Result +pub unsafe fn FindFirstFileNameTransactedW(lpfilename: P0, dwflags: u32, stringlength: *mut u32, linkname: windows_core::PWSTR, htransaction: Option) -> windows_core::Result where P0: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileNameTransactedW(lpfilename : windows_core::PCWSTR, dwflags : u32, stringlength : *mut u32, linkname : windows_core::PWSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstFileNameTransactedW(lpfilename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(stringlength), core::mem::transmute(linkname), htransaction.param().abi()); + let result__ = FindFirstFileNameTransactedW(lpfilename.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(stringlength), core::mem::transmute(linkname), core::mem::transmute(htransaction.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -866,23 +798,21 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindFirstFileTransactedA(lpfilename: P0, finfolevelid: FINDEX_INFO_LEVELS, lpfindfiledata: *mut core::ffi::c_void, fsearchop: FINDEX_SEARCH_OPS, lpsearchfilter: Option<*const core::ffi::c_void>, dwadditionalflags: u32, htransaction: P6) -> windows_core::Result +pub unsafe fn FindFirstFileTransactedA(lpfilename: P0, finfolevelid: FINDEX_INFO_LEVELS, lpfindfiledata: *mut core::ffi::c_void, fsearchop: FINDEX_SEARCH_OPS, lpsearchfilter: Option<*const core::ffi::c_void>, dwadditionalflags: u32, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result where P0: windows_core::Param, - P6: 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(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), core::mem::transmute(dwadditionalflags), htransaction.param().abi()); + let result__ = FindFirstFileTransactedA(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwadditionalflags), core::mem::transmute(htransaction)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindFirstFileTransactedW(lpfilename: P0, finfolevelid: FINDEX_INFO_LEVELS, lpfindfiledata: *mut core::ffi::c_void, fsearchop: FINDEX_SEARCH_OPS, lpsearchfilter: Option<*const core::ffi::c_void>, dwadditionalflags: u32, htransaction: P6) -> windows_core::Result +pub unsafe fn FindFirstFileTransactedW(lpfilename: P0, finfolevelid: FINDEX_INFO_LEVELS, lpfindfiledata: *mut core::ffi::c_void, fsearchop: FINDEX_SEARCH_OPS, lpsearchfilter: Option<*const core::ffi::c_void>, dwadditionalflags: u32, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result where P0: windows_core::Param, - P6: 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(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), core::mem::transmute(dwadditionalflags), htransaction.param().abi()); + let result__ = FindFirstFileTransactedW(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfindfiledata), core::mem::transmute(fsearchop), core::mem::transmute(lpsearchfilter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwadditionalflags), core::mem::transmute(htransaction)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -895,22 +825,21 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindFirstStreamTransactedW(lpfilename: P0, infolevel: STREAM_INFO_LEVELS, lpfindstreamdata: *mut core::ffi::c_void, dwflags: u32, htransaction: P4) -> windows_core::Result +pub unsafe fn FindFirstStreamTransactedW(lpfilename: P0, infolevel: STREAM_INFO_LEVELS, lpfindstreamdata: *mut core::ffi::c_void, dwflags: Option, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result where P0: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstStreamTransactedW(lpfilename : windows_core::PCWSTR, infolevel : STREAM_INFO_LEVELS, lpfindstreamdata : *mut core::ffi::c_void, dwflags : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstStreamTransactedW(lpfilename.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(lpfindstreamdata), core::mem::transmute(dwflags), htransaction.param().abi()); + let result__ = FindFirstStreamTransactedW(lpfilename.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(lpfindstreamdata), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindFirstStreamW(lpfilename: P0, infolevel: STREAM_INFO_LEVELS, lpfindstreamdata: *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result +pub unsafe fn FindFirstStreamW(lpfilename: P0, infolevel: STREAM_INFO_LEVELS, lpfindstreamdata: *mut core::ffi::c_void, dwflags: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstStreamW(lpfilename : windows_core::PCWSTR, infolevel : STREAM_INFO_LEVELS, lpfindstreamdata : *mut core::ffi::c_void, dwflags : u32) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstStreamW(lpfilename.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(lpfindstreamdata), core::mem::transmute(dwflags)); + let result__ = FindFirstStreamW(lpfilename.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(lpfindstreamdata), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -944,44 +873,29 @@ pub unsafe fn FindFirstVolumeW(lpszvolumename: &mut [u16]) -> windows_core::Resu (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindNextChangeNotification(hchangehandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextChangeNotification(hchangehandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextChangeNotification(hchangehandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FindNextChangeNotification(hchangehandle.param().abi()).ok() + FindNextChangeNotification(core::mem::transmute(hchangehandle)).ok() } #[inline] -pub unsafe fn FindNextFileA(hfindfile: P0, lpfindfiledata: *mut WIN32_FIND_DATAA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextFileA(hfindfile: super::super::Foundation::HANDLE, lpfindfiledata: *mut WIN32_FIND_DATAA) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextFileA(hfindfile : super::super::Foundation:: HANDLE, lpfindfiledata : *mut WIN32_FIND_DATAA) -> super::super::Foundation:: BOOL); - FindNextFileA(hfindfile.param().abi(), core::mem::transmute(lpfindfiledata)).ok() + FindNextFileA(core::mem::transmute(hfindfile), core::mem::transmute(lpfindfiledata)).ok() } #[inline] -pub unsafe fn FindNextFileNameW(hfindstream: P0, stringlength: *mut u32, linkname: windows_core::PWSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextFileNameW(hfindstream: super::super::Foundation::HANDLE, stringlength: *mut u32, linkname: windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextFileNameW(hfindstream : super::super::Foundation:: HANDLE, stringlength : *mut u32, linkname : windows_core::PWSTR) -> super::super::Foundation:: BOOL); - FindNextFileNameW(hfindstream.param().abi(), core::mem::transmute(stringlength), core::mem::transmute(linkname)).ok() + FindNextFileNameW(core::mem::transmute(hfindstream), core::mem::transmute(stringlength), core::mem::transmute(linkname)).ok() } #[inline] -pub unsafe fn FindNextFileW(hfindfile: P0, lpfindfiledata: *mut WIN32_FIND_DATAW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextFileW(hfindfile: super::super::Foundation::HANDLE, lpfindfiledata: *mut WIN32_FIND_DATAW) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextFileW(hfindfile : super::super::Foundation:: HANDLE, lpfindfiledata : *mut WIN32_FIND_DATAW) -> super::super::Foundation:: BOOL); - FindNextFileW(hfindfile.param().abi(), core::mem::transmute(lpfindfiledata)).ok() + FindNextFileW(core::mem::transmute(hfindfile), core::mem::transmute(lpfindfiledata)).ok() } #[inline] -pub unsafe fn FindNextStreamW(hfindstream: P0, lpfindstreamdata: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextStreamW(hfindstream: super::super::Foundation::HANDLE, lpfindstreamdata: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextStreamW(hfindstream : super::super::Foundation:: HANDLE, lpfindstreamdata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - FindNextStreamW(hfindstream.param().abi(), core::mem::transmute(lpfindstreamdata)).ok() + FindNextStreamW(core::mem::transmute(hfindstream), core::mem::transmute(lpfindstreamdata)).ok() } #[inline] pub unsafe fn FindNextVolumeA(hfindvolume: super::super::Foundation::HANDLE, lpszvolumename: &mut [u8]) -> windows_core::Result<()> { @@ -989,20 +903,14 @@ pub unsafe fn FindNextVolumeA(hfindvolume: super::super::Foundation::HANDLE, lps FindNextVolumeA(core::mem::transmute(hfindvolume), core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn FindNextVolumeMountPointA(hfindvolumemountpoint: P0, lpszvolumemountpoint: &mut [u8]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextVolumeMountPointA(hfindvolumemountpoint: super::super::Foundation::HANDLE, lpszvolumemountpoint: &mut [u8]) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeMountPointA(hfindvolumemountpoint : super::super::Foundation:: HANDLE, lpszvolumemountpoint : windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeMountPointA(hfindvolumemountpoint.param().abi(), core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len().try_into().unwrap()).ok() + FindNextVolumeMountPointA(core::mem::transmute(hfindvolumemountpoint), core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn FindNextVolumeMountPointW(hfindvolumemountpoint: P0, lpszvolumemountpoint: &mut [u16]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindNextVolumeMountPointW(hfindvolumemountpoint: super::super::Foundation::HANDLE, lpszvolumemountpoint: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeMountPointW(hfindvolumemountpoint : super::super::Foundation:: HANDLE, lpszvolumemountpoint : windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeMountPointW(hfindvolumemountpoint.param().abi(), core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len().try_into().unwrap()).ok() + FindNextVolumeMountPointW(core::mem::transmute(hfindvolumemountpoint), core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn FindNextVolumeW(hfindvolume: super::super::Foundation::HANDLE, lpszvolumename: &mut [u16]) -> windows_core::Result<()> { @@ -1010,34 +918,25 @@ pub unsafe fn FindNextVolumeW(hfindvolume: super::super::Foundation::HANDLE, lps FindNextVolumeW(core::mem::transmute(hfindvolume), core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn FindVolumeClose(hfindvolume: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindVolumeClose(hfindvolume: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindVolumeClose(hfindvolume : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FindVolumeClose(hfindvolume.param().abi()).ok() + FindVolumeClose(core::mem::transmute(hfindvolume)).ok() } #[inline] -pub unsafe fn FindVolumeMountPointClose(hfindvolumemountpoint: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FindVolumeMountPointClose(hfindvolumemountpoint: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FindVolumeMountPointClose(hfindvolumemountpoint : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FindVolumeMountPointClose(hfindvolumemountpoint.param().abi()).ok() + FindVolumeMountPointClose(core::mem::transmute(hfindvolumemountpoint)).ok() } #[inline] -pub unsafe fn FlushFileBuffers(hfile: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FlushFileBuffers(hfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FlushFileBuffers(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FlushFileBuffers(hfile.param().abi()).ok() + FlushFileBuffers(core::mem::transmute(hfile)).ok() } #[cfg(feature = "Win32_System_IO")] #[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(core::mem::transmute(pvmarshal), core::mem::transmute(poverlapped.unwrap_or(core::ptr::null_mut()))).ok() + FlushLogBuffers(core::mem::transmute(pvmarshal), core::mem::transmute(poverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1083,25 +982,23 @@ 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(core::ptr::null_mut()))) + GetCompressedFileSizeA(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetCompressedFileSizeTransactedA(lpfilename: P0, lpfilesizehigh: Option<*mut u32>, htransaction: P2) -> u32 +pub unsafe fn GetCompressedFileSizeTransactedA(lpfilename: P0, lpfilesizehigh: Option<*mut u32>, htransaction: super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, - P2: 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(core::ptr::null_mut())), htransaction.param().abi()) + GetCompressedFileSizeTransactedA(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction)) } #[inline] -pub unsafe fn GetCompressedFileSizeTransactedW(lpfilename: P0, lpfilesizehigh: Option<*mut u32>, htransaction: P2) -> u32 +pub unsafe fn GetCompressedFileSizeTransactedW(lpfilename: P0, lpfilesizehigh: Option<*mut u32>, htransaction: super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, - P2: 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(core::ptr::null_mut())), htransaction.param().abi()) + GetCompressedFileSizeTransactedW(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction)) } #[inline] pub unsafe fn GetCompressedFileSizeW(lpfilename: P0, lpfilesizehigh: Option<*mut u32>) -> u32 @@ -1109,15 +1006,12 @@ 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(core::ptr::null_mut()))) + GetCompressedFileSizeW(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetCurrentClockTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetCurrentClockTransactionManager(transactionmanagerhandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn GetCurrentClockTransactionManager(transactionmanagerhandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - GetCurrentClockTransactionManager(transactionmanagerhandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + GetCurrentClockTransactionManager(core::mem::transmute(transactionmanagerhandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] pub unsafe fn GetDiskFreeSpaceA(lprootpathname: P0, lpsectorspercluster: Option<*mut u32>, lpbytespersector: Option<*mut u32>, lpnumberoffreeclusters: Option<*mut u32>, lptotalnumberofclusters: Option<*mut u32>) -> windows_core::Result<()> @@ -1125,7 +1019,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(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() + GetDiskFreeSpaceA(lprootpathname.param().abi(), core::mem::transmute(lpsectorspercluster.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbytespersector.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnumberoffreeclusters.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptotalnumberofclusters.unwrap_or(core::mem::zeroed()))).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 +1027,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(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() + GetDiskFreeSpaceExA(lpdirectoryname.param().abi(), core::mem::transmute(lpfreebytesavailabletocaller.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptotalnumberofbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptotalnumberoffreebytes.unwrap_or(core::mem::zeroed()))).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 +1035,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(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() + GetDiskFreeSpaceExW(lpdirectoryname.param().abi(), core::mem::transmute(lpfreebytesavailabletocaller.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptotalnumberofbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptotalnumberoffreebytes.unwrap_or(core::mem::zeroed()))).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 +1043,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(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() + GetDiskFreeSpaceW(lprootpathname.param().abi(), core::mem::transmute(lpsectorspercluster.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbytespersector.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnumberoffreeclusters.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptotalnumberofclusters.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn GetDiskSpaceInformationA(rootpath: P0, diskspaceinfo: *mut DISK_SPACE_INFORMATION) -> windows_core::Result<()> @@ -1192,20 +1086,14 @@ where GetEncryptedFileMetadata(lpfilename.param().abi(), core::mem::transmute(pcbmetadata), core::mem::transmute(ppbmetadata)) } #[inline] -pub unsafe fn GetEnlistmentId(enlistmenthandle: P0, enlistmentid: *mut windows_core::GUID) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetEnlistmentId(enlistmenthandle: super::super::Foundation::HANDLE, enlistmentid: *mut windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn GetEnlistmentId(enlistmenthandle : super::super::Foundation:: HANDLE, enlistmentid : *mut windows_core::GUID) -> super::super::Foundation:: BOOL); - GetEnlistmentId(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentid)).ok() + GetEnlistmentId(core::mem::transmute(enlistmenthandle), core::mem::transmute(enlistmentid)).ok() } #[inline] -pub unsafe fn GetEnlistmentRecoveryInformation(enlistmenthandle: P0, buffersize: u32, buffer: *mut core::ffi::c_void, bufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetEnlistmentRecoveryInformation(enlistmenthandle: super::super::Foundation::HANDLE, buffersize: u32, buffer: *mut core::ffi::c_void, bufferused: *mut u32) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn GetEnlistmentRecoveryInformation(enlistmenthandle : super::super::Foundation:: HANDLE, buffersize : u32, buffer : *mut core::ffi::c_void, bufferused : *mut u32) -> super::super::Foundation:: BOOL); - GetEnlistmentRecoveryInformation(enlistmenthandle.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer), core::mem::transmute(bufferused)).ok() + GetEnlistmentRecoveryInformation(core::mem::transmute(enlistmenthandle), core::mem::transmute(buffersize), core::mem::transmute(buffer), core::mem::transmute(bufferused)).ok() } #[inline] pub unsafe fn GetExpandedNameA(lpszsource: P0, lpszbuffer: &mut [u8; 260]) -> i32 @@ -1256,22 +1144,20 @@ where GetFileAttributesExW(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfileinformation)).ok() } #[inline] -pub unsafe fn GetFileAttributesTransactedA(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut core::ffi::c_void, htransaction: P3) -> windows_core::Result<()> +pub unsafe fn GetFileAttributesTransactedA(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut core::ffi::c_void, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFileAttributesTransactedA(lpfilename : windows_core::PCSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut core::ffi::c_void, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GetFileAttributesTransactedA(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfileinformation), htransaction.param().abi()).ok() + GetFileAttributesTransactedA(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfileinformation), core::mem::transmute(htransaction)).ok() } #[inline] -pub unsafe fn GetFileAttributesTransactedW(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut core::ffi::c_void, htransaction: P3) -> windows_core::Result<()> +pub unsafe fn GetFileAttributesTransactedW(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut core::ffi::c_void, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFileAttributesTransactedW(lpfilename : windows_core::PCWSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut core::ffi::c_void, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GetFileAttributesTransactedW(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfileinformation), htransaction.param().abi()).ok() + GetFileAttributesTransactedW(lpfilename.param().abi(), core::mem::transmute(finfolevelid), core::mem::transmute(lpfileinformation), core::mem::transmute(htransaction)).ok() } #[inline] pub unsafe fn GetFileAttributesW(lpfilename: P0) -> u32 @@ -1282,84 +1168,63 @@ where GetFileAttributesW(lpfilename.param().abi()) } #[inline] -pub unsafe fn GetFileBandwidthReservation(hfile: P0, lpperiodmilliseconds: *mut u32, lpbytesperperiod: *mut u32, pdiscardable: *mut super::super::Foundation::BOOL, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetFileBandwidthReservation(hfile: super::super::Foundation::HANDLE, lpperiodmilliseconds: *mut u32, lpbytesperperiod: *mut u32, pdiscardable: *mut super::super::Foundation::BOOL, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetFileBandwidthReservation(hfile : super::super::Foundation:: HANDLE, lpperiodmilliseconds : *mut u32, lpbytesperperiod : *mut u32, pdiscardable : *mut super::super::Foundation:: BOOL, lptransfersize : *mut u32, lpnumoutstandingrequests : *mut u32) -> super::super::Foundation:: BOOL); - GetFileBandwidthReservation(hfile.param().abi(), core::mem::transmute(lpperiodmilliseconds), core::mem::transmute(lpbytesperperiod), core::mem::transmute(pdiscardable), core::mem::transmute(lptransfersize), core::mem::transmute(lpnumoutstandingrequests)).ok() + GetFileBandwidthReservation(core::mem::transmute(hfile), core::mem::transmute(lpperiodmilliseconds), core::mem::transmute(lpbytesperperiod), core::mem::transmute(pdiscardable), core::mem::transmute(lptransfersize), core::mem::transmute(lpnumoutstandingrequests)).ok() } #[inline] -pub unsafe fn GetFileInformationByHandle(hfile: P0, lpfileinformation: *mut BY_HANDLE_FILE_INFORMATION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetFileInformationByHandle(hfile: super::super::Foundation::HANDLE, lpfileinformation: *mut BY_HANDLE_FILE_INFORMATION) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetFileInformationByHandle(hfile : super::super::Foundation:: HANDLE, lpfileinformation : *mut BY_HANDLE_FILE_INFORMATION) -> super::super::Foundation:: BOOL); - GetFileInformationByHandle(hfile.param().abi(), core::mem::transmute(lpfileinformation)).ok() + GetFileInformationByHandle(core::mem::transmute(hfile), core::mem::transmute(lpfileinformation)).ok() } #[inline] -pub unsafe fn GetFileInformationByHandleEx(hfile: P0, fileinformationclass: FILE_INFO_BY_HANDLE_CLASS, lpfileinformation: *mut core::ffi::c_void, dwbuffersize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetFileInformationByHandleEx(hfile: super::super::Foundation::HANDLE, fileinformationclass: FILE_INFO_BY_HANDLE_CLASS, lpfileinformation: *mut core::ffi::c_void, dwbuffersize: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetFileInformationByHandleEx(hfile : super::super::Foundation:: HANDLE, fileinformationclass : FILE_INFO_BY_HANDLE_CLASS, lpfileinformation : *mut core::ffi::c_void, dwbuffersize : u32) -> super::super::Foundation:: BOOL); - GetFileInformationByHandleEx(hfile.param().abi(), core::mem::transmute(fileinformationclass), core::mem::transmute(lpfileinformation), core::mem::transmute(dwbuffersize)).ok() + GetFileInformationByHandleEx(core::mem::transmute(hfile), core::mem::transmute(fileinformationclass), core::mem::transmute(lpfileinformation), core::mem::transmute(dwbuffersize)).ok() } #[inline] -pub unsafe fn GetFileSize(hfile: P0, lpfilesizehigh: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetFileSize(hfile: super::super::Foundation::HANDLE, lpfilesizehigh: Option<*mut u32>) -> u32 { 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(core::ptr::null_mut()))) + GetFileSize(core::mem::transmute(hfile), core::mem::transmute(lpfilesizehigh.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetFileSizeEx(hfile: P0, lpfilesize: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetFileSizeEx(hfile: super::super::Foundation::HANDLE, lpfilesize: *mut i64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetFileSizeEx(hfile : super::super::Foundation:: HANDLE, lpfilesize : *mut i64) -> super::super::Foundation:: BOOL); - GetFileSizeEx(hfile.param().abi(), core::mem::transmute(lpfilesize)).ok() + GetFileSizeEx(core::mem::transmute(hfile), core::mem::transmute(lpfilesize)).ok() } #[inline] -pub unsafe fn GetFileTime(hfile: P0, lpcreationtime: Option<*mut super::super::Foundation::FILETIME>, lplastaccesstime: Option<*mut super::super::Foundation::FILETIME>, lplastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetFileTime(hfile: super::super::Foundation::HANDLE, lpcreationtime: Option<*mut super::super::Foundation::FILETIME>, lplastaccesstime: Option<*mut super::super::Foundation::FILETIME>, lplastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> windows_core::Result<()> { 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(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() + GetFileTime(core::mem::transmute(hfile), core::mem::transmute(lpcreationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplastaccesstime.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplastwritetime.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetFileType(hfile: P0) -> FILE_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn GetFileType(hfile: super::super::Foundation::HANDLE) -> FILE_TYPE { windows_targets::link!("kernel32.dll" "system" fn GetFileType(hfile : super::super::Foundation:: HANDLE) -> FILE_TYPE); - GetFileType(hfile.param().abi()) + GetFileType(core::mem::transmute(hfile)) } #[inline] -pub unsafe fn GetFileVersionInfoA(lptstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn GetFileVersionInfoA(lptstrfilename: P0, dwhandle: Option, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoA(lptstrfilename : windows_core::PCSTR, dwhandle : u32, dwlen : u32, lpdata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileVersionInfoA(lptstrfilename.param().abi(), core::mem::transmute(dwhandle), core::mem::transmute(dwlen), core::mem::transmute(lpdata)).ok() + GetFileVersionInfoA(lptstrfilename.param().abi(), core::mem::transmute(dwhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwlen), core::mem::transmute(lpdata)).ok() } #[inline] -pub unsafe fn GetFileVersionInfoExA(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P1, dwhandle: u32, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn GetFileVersionInfoExA(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P1, dwhandle: Option, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> where P1: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoExA(dwflags : GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename : windows_core::PCSTR, dwhandle : u32, dwlen : u32, lpdata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileVersionInfoExA(core::mem::transmute(dwflags), lpwstrfilename.param().abi(), core::mem::transmute(dwhandle), core::mem::transmute(dwlen), core::mem::transmute(lpdata)).ok() + GetFileVersionInfoExA(core::mem::transmute(dwflags), lpwstrfilename.param().abi(), core::mem::transmute(dwhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwlen), core::mem::transmute(lpdata)).ok() } #[inline] -pub unsafe fn GetFileVersionInfoExW(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P1, dwhandle: u32, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn GetFileVersionInfoExW(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P1, dwhandle: Option, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> where P1: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoExW(dwflags : GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename : windows_core::PCWSTR, dwhandle : u32, dwlen : u32, lpdata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileVersionInfoExW(core::mem::transmute(dwflags), lpwstrfilename.param().abi(), core::mem::transmute(dwhandle), core::mem::transmute(dwlen), core::mem::transmute(lpdata)).ok() + GetFileVersionInfoExW(core::mem::transmute(dwflags), lpwstrfilename.param().abi(), core::mem::transmute(dwhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwlen), core::mem::transmute(lpdata)).ok() } #[inline] pub unsafe fn GetFileVersionInfoSizeA(lptstrfilename: P0, lpdwhandle: Option<*mut u32>) -> u32 @@ -1367,7 +1232,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(core::ptr::null_mut()))) + GetFileVersionInfoSizeA(lptstrfilename.param().abi(), core::mem::transmute(lpdwhandle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetFileVersionInfoSizeExA(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P1, lpdwhandle: *mut u32) -> u32 @@ -1391,31 +1256,25 @@ 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(core::ptr::null_mut()))) + GetFileVersionInfoSizeW(lptstrfilename.param().abi(), core::mem::transmute(lpdwhandle.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetFileVersionInfoW(lptstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn GetFileVersionInfoW(lptstrfilename: P0, dwhandle: Option, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoW(lptstrfilename : windows_core::PCWSTR, dwhandle : u32, dwlen : u32, lpdata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileVersionInfoW(lptstrfilename.param().abi(), core::mem::transmute(dwhandle), core::mem::transmute(dwlen), core::mem::transmute(lpdata)).ok() + GetFileVersionInfoW(lptstrfilename.param().abi(), core::mem::transmute(dwhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwlen), core::mem::transmute(lpdata)).ok() } #[inline] -pub unsafe fn GetFinalPathNameByHandleA(hfile: P0, lpszfilepath: &mut [u8], dwflags: GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetFinalPathNameByHandleA(hfile: super::super::Foundation::HANDLE, lpszfilepath: &mut [u8], dwflags: GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetFinalPathNameByHandleA(hfile : super::super::Foundation:: HANDLE, lpszfilepath : windows_core::PSTR, cchfilepath : u32, dwflags : GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32); - GetFinalPathNameByHandleA(hfile.param().abi(), core::mem::transmute(lpszfilepath.as_ptr()), lpszfilepath.len().try_into().unwrap(), core::mem::transmute(dwflags)) + GetFinalPathNameByHandleA(core::mem::transmute(hfile), core::mem::transmute(lpszfilepath.as_ptr()), lpszfilepath.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn GetFinalPathNameByHandleW(hfile: P0, lpszfilepath: &mut [u16], dwflags: GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetFinalPathNameByHandleW(hfile: super::super::Foundation::HANDLE, lpszfilepath: &mut [u16], dwflags: GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetFinalPathNameByHandleW(hfile : super::super::Foundation:: HANDLE, lpszfilepath : windows_core::PWSTR, cchfilepath : u32, dwflags : GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32); - GetFinalPathNameByHandleW(hfile.param().abi(), core::mem::transmute(lpszfilepath.as_ptr()), lpszfilepath.len().try_into().unwrap(), core::mem::transmute(dwflags)) + GetFinalPathNameByHandleW(core::mem::transmute(hfile), core::mem::transmute(lpszfilepath.as_ptr()), lpszfilepath.len().try_into().unwrap(), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn GetFullPathNameA(lpfilename: P0, lpbuffer: Option<&mut [u8]>, lpfilepart: Option<*mut windows_core::PSTR>) -> u32 @@ -1423,25 +1282,23 @@ 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(core::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::mem::zeroed()))) } #[inline] -pub unsafe fn GetFullPathNameTransactedA(lpfilename: P0, lpbuffer: Option<&mut [u8]>, lpfilepart: Option<*mut windows_core::PSTR>, htransaction: P4) -> u32 +pub unsafe fn GetFullPathNameTransactedA(lpfilename: P0, lpbuffer: Option<&mut [u8]>, lpfilepart: Option<*mut windows_core::PSTR>, htransaction: super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, - P4: 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(core::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::mem::zeroed())), core::mem::transmute(htransaction)) } #[inline] -pub unsafe fn GetFullPathNameTransactedW(lpfilename: P0, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>, htransaction: P4) -> u32 +pub unsafe fn GetFullPathNameTransactedW(lpfilename: P0, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>, htransaction: super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, - P4: 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(core::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::mem::zeroed())), core::mem::transmute(htransaction)) } #[inline] pub unsafe fn GetFullPathNameW(lpfilename: P0, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>) -> u32 @@ -1449,40 +1306,30 @@ 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(core::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::mem::zeroed()))) } #[inline] -pub unsafe fn GetIoRingInfo(ioring: P0, info: *mut IORING_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetIoRingInfo(ioring: HIORING, info: *mut IORING_INFO) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn GetIoRingInfo(ioring : HIORING, info : *mut IORING_INFO) -> windows_core::HRESULT); - GetIoRingInfo(ioring.param().abi(), core::mem::transmute(info)).ok() + GetIoRingInfo(core::mem::transmute(ioring), core::mem::transmute(info)).ok() } #[inline] -pub unsafe fn GetLogContainerName(hlog: P0, cidlogicalcontainer: u32, pwstrcontainername: P2, clencontainername: u32, pcactuallencontainername: *mut u32) -> windows_core::Result<()> +pub unsafe fn GetLogContainerName(hlog: super::super::Foundation::HANDLE, cidlogicalcontainer: u32, pwstrcontainername: P2, clencontainername: u32, pcactuallencontainername: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clfsw32.dll" "system" fn GetLogContainerName(hlog : super::super::Foundation:: HANDLE, cidlogicalcontainer : u32, pwstrcontainername : windows_core::PCWSTR, clencontainername : u32, pcactuallencontainername : *mut u32) -> super::super::Foundation:: BOOL); - GetLogContainerName(hlog.param().abi(), core::mem::transmute(cidlogicalcontainer), pwstrcontainername.param().abi(), core::mem::transmute(clencontainername), core::mem::transmute(pcactuallencontainername)).ok() + GetLogContainerName(core::mem::transmute(hlog), core::mem::transmute(cidlogicalcontainer), pwstrcontainername.param().abi(), core::mem::transmute(clencontainername), core::mem::transmute(pcactuallencontainername)).ok() } #[inline] -pub unsafe fn GetLogFileInformation(hlog: P0, pinfobuffer: *mut CLS_INFORMATION, cbbuffer: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetLogFileInformation(hlog: super::super::Foundation::HANDLE, pinfobuffer: *mut CLS_INFORMATION, cbbuffer: *mut u32) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn GetLogFileInformation(hlog : super::super::Foundation:: HANDLE, pinfobuffer : *mut CLS_INFORMATION, cbbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetLogFileInformation(hlog.param().abi(), core::mem::transmute(pinfobuffer), core::mem::transmute(cbbuffer)).ok() + GetLogFileInformation(core::mem::transmute(hlog), core::mem::transmute(pinfobuffer), core::mem::transmute(cbbuffer)).ok() } #[inline] -pub unsafe fn GetLogIoStatistics(hlog: P0, pvstatsbuffer: *mut core::ffi::c_void, cbstatsbuffer: u32, estatsclass: CLFS_IOSTATS_CLASS, pcbstatswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetLogIoStatistics(hlog: super::super::Foundation::HANDLE, pvstatsbuffer: *mut core::ffi::c_void, cbstatsbuffer: u32, estatsclass: CLFS_IOSTATS_CLASS, pcbstatswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn GetLogIoStatistics(hlog : super::super::Foundation:: HANDLE, pvstatsbuffer : *mut core::ffi::c_void, cbstatsbuffer : u32, estatsclass : CLFS_IOSTATS_CLASS, pcbstatswritten : *mut u32) -> super::super::Foundation:: BOOL); - GetLogIoStatistics(hlog.param().abi(), core::mem::transmute(pvstatsbuffer), core::mem::transmute(cbstatsbuffer), core::mem::transmute(estatsclass), core::mem::transmute(pcbstatswritten)).ok() + GetLogIoStatistics(core::mem::transmute(hlog), core::mem::transmute(pvstatsbuffer), core::mem::transmute(cbstatsbuffer), core::mem::transmute(estatsclass), core::mem::transmute(pcbstatswritten)).ok() } #[inline] pub unsafe fn GetLogReservationInfo(pvmarshal: *const core::ffi::c_void, pcbrecordnumber: *mut u32, pcbuserreservation: *mut i64, pcbcommitreservation: *mut i64) -> super::super::Foundation::BOOL { @@ -1513,22 +1360,20 @@ where GetLongPathNameA(lpszshortpath.param().abi(), core::mem::transmute(lpszlongpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn GetLongPathNameTransactedA(lpszshortpath: P0, lpszlongpath: Option<&mut [u8]>, htransaction: P3) -> u32 +pub unsafe fn GetLongPathNameTransactedA(lpszshortpath: P0, lpszlongpath: Option<&mut [u8]>, htransaction: super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetLongPathNameTransactedA(lpszshortpath : windows_core::PCSTR, lpszlongpath : windows_core::PSTR, cchbuffer : u32, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetLongPathNameTransactedA(lpszshortpath.param().abi(), core::mem::transmute(lpszlongpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), htransaction.param().abi()) + GetLongPathNameTransactedA(lpszshortpath.param().abi(), core::mem::transmute(lpszlongpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(htransaction)) } #[inline] -pub unsafe fn GetLongPathNameTransactedW(lpszshortpath: P0, lpszlongpath: Option<&mut [u16]>, htransaction: P3) -> u32 +pub unsafe fn GetLongPathNameTransactedW(lpszshortpath: P0, lpszlongpath: Option<&mut [u16]>, htransaction: super::super::Foundation::HANDLE) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetLongPathNameTransactedW(lpszshortpath : windows_core::PCWSTR, lpszlongpath : windows_core::PWSTR, cchbuffer : u32, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetLongPathNameTransactedW(lpszshortpath.param().abi(), core::mem::transmute(lpszlongpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), htransaction.param().abi()) + GetLongPathNameTransactedW(lpszshortpath.param().abi(), core::mem::transmute(lpszlongpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(htransaction)) } #[inline] pub unsafe fn GetLongPathNameW(lpszshortpath: P0, lpszlongpath: Option<&mut [u16]>) -> u32 @@ -1544,21 +1389,15 @@ pub unsafe fn GetNextLogArchiveExtent(pvarchivecontext: *mut core::ffi::c_void, GetNextLogArchiveExtent(core::mem::transmute(pvarchivecontext), core::mem::transmute(rgadextent), core::mem::transmute(cdescriptors), core::mem::transmute(pcdescriptorsreturned)).ok() } #[inline] -pub unsafe fn GetNotificationResourceManager(resourcemanagerhandle: P0, transactionnotification: *mut TRANSACTION_NOTIFICATION, notificationlength: u32, dwmilliseconds: u32, returnlength: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNotificationResourceManager(resourcemanagerhandle: super::super::Foundation::HANDLE, transactionnotification: *mut TRANSACTION_NOTIFICATION, notificationlength: u32, dwmilliseconds: u32, returnlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn GetNotificationResourceManager(resourcemanagerhandle : super::super::Foundation:: HANDLE, transactionnotification : *mut TRANSACTION_NOTIFICATION, notificationlength : u32, dwmilliseconds : u32, returnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetNotificationResourceManager(resourcemanagerhandle.param().abi(), core::mem::transmute(transactionnotification), core::mem::transmute(notificationlength), core::mem::transmute(dwmilliseconds), core::mem::transmute(returnlength)).ok() + GetNotificationResourceManager(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(transactionnotification), core::mem::transmute(notificationlength), core::mem::transmute(dwmilliseconds), core::mem::transmute(returnlength)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn GetNotificationResourceManagerAsync(resourcemanagerhandle: P0, transactionnotification: *mut TRANSACTION_NOTIFICATION, transactionnotificationlength: u32, returnlength: *mut u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNotificationResourceManagerAsync(resourcemanagerhandle: super::super::Foundation::HANDLE, transactionnotification: *mut TRANSACTION_NOTIFICATION, transactionnotificationlength: u32, returnlength: *mut u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn GetNotificationResourceManagerAsync(resourcemanagerhandle : super::super::Foundation:: HANDLE, transactionnotification : *mut TRANSACTION_NOTIFICATION, transactionnotificationlength : u32, returnlength : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - GetNotificationResourceManagerAsync(resourcemanagerhandle.param().abi(), core::mem::transmute(transactionnotification), core::mem::transmute(transactionnotificationlength), core::mem::transmute(returnlength), core::mem::transmute(lpoverlapped)).ok() + GetNotificationResourceManagerAsync(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(transactionnotification), core::mem::transmute(transactionnotificationlength), core::mem::transmute(returnlength), core::mem::transmute(lpoverlapped)).ok() } #[inline] pub unsafe fn GetShortPathNameA(lpszlongpath: P0, lpszshortpath: Option<&mut [u8]>) -> u32 @@ -1577,28 +1416,19 @@ where GetShortPathNameW(lpszlongpath.param().abi(), core::mem::transmute(lpszshortpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszshortpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn GetTapeParameters(hdevice: P0, dwoperation: GET_TAPE_DRIVE_PARAMETERS_OPERATION, lpdwsize: *mut u32, lptapeinformation: *mut core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTapeParameters(hdevice: super::super::Foundation::HANDLE, dwoperation: GET_TAPE_DRIVE_PARAMETERS_OPERATION, lpdwsize: *mut u32, lptapeinformation: *mut core::ffi::c_void) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetTapeParameters(hdevice : super::super::Foundation:: HANDLE, dwoperation : GET_TAPE_DRIVE_PARAMETERS_OPERATION, lpdwsize : *mut u32, lptapeinformation : *mut core::ffi::c_void) -> u32); - GetTapeParameters(hdevice.param().abi(), core::mem::transmute(dwoperation), core::mem::transmute(lpdwsize), core::mem::transmute(lptapeinformation)) + GetTapeParameters(core::mem::transmute(hdevice), core::mem::transmute(dwoperation), core::mem::transmute(lpdwsize), core::mem::transmute(lptapeinformation)) } #[inline] -pub unsafe fn GetTapePosition(hdevice: P0, dwpositiontype: TAPE_POSITION_TYPE, lpdwpartition: *mut u32, lpdwoffsetlow: *mut u32, lpdwoffsethigh: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTapePosition(hdevice: super::super::Foundation::HANDLE, dwpositiontype: TAPE_POSITION_TYPE, lpdwpartition: *mut u32, lpdwoffsetlow: *mut u32, lpdwoffsethigh: *mut u32) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetTapePosition(hdevice : super::super::Foundation:: HANDLE, dwpositiontype : TAPE_POSITION_TYPE, lpdwpartition : *mut u32, lpdwoffsetlow : *mut u32, lpdwoffsethigh : *mut u32) -> u32); - GetTapePosition(hdevice.param().abi(), core::mem::transmute(dwpositiontype), core::mem::transmute(lpdwpartition), core::mem::transmute(lpdwoffsetlow), core::mem::transmute(lpdwoffsethigh)) + GetTapePosition(core::mem::transmute(hdevice), core::mem::transmute(dwpositiontype), core::mem::transmute(lpdwpartition), core::mem::transmute(lpdwoffsetlow), core::mem::transmute(lpdwoffsethigh)) } #[inline] -pub unsafe fn GetTapeStatus(hdevice: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTapeStatus(hdevice: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetTapeStatus(hdevice : super::super::Foundation:: HANDLE) -> u32); - GetTapeStatus(hdevice.param().abi()) + GetTapeStatus(core::mem::transmute(hdevice)) } #[inline] pub unsafe fn GetTempFileNameA(lppathname: P0, lpprefixstring: P1, uunique: u32, lptempfilename: &mut [u8; 260]) -> u32 @@ -1639,28 +1469,19 @@ pub unsafe fn GetTempPathW(lpbuffer: Option<&mut [u16]>) -> u32 { GetTempPathW(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()))) } #[inline] -pub unsafe fn GetTransactionId(transactionhandle: P0, transactionid: *mut windows_core::GUID) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetTransactionId(transactionhandle: super::super::Foundation::HANDLE, transactionid: *mut windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn GetTransactionId(transactionhandle : super::super::Foundation:: HANDLE, transactionid : *mut windows_core::GUID) -> super::super::Foundation:: BOOL); - GetTransactionId(transactionhandle.param().abi(), core::mem::transmute(transactionid)).ok() + GetTransactionId(core::mem::transmute(transactionhandle), core::mem::transmute(transactionid)).ok() } #[inline] -pub unsafe fn GetTransactionInformation(transactionhandle: P0, outcome: *mut u32, isolationlevel: *mut u32, isolationflags: *mut u32, timeout: *mut u32, description: Option<&mut [u16]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetTransactionInformation(transactionhandle: super::super::Foundation::HANDLE, outcome: *mut u32, isolationlevel: *mut u32, isolationflags: *mut u32, timeout: *mut u32, description: Option<&mut [u16]>) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn GetTransactionInformation(transactionhandle : super::super::Foundation:: HANDLE, outcome : *mut u32, isolationlevel : *mut u32, isolationflags : *mut u32, timeout : *mut u32, bufferlength : u32, description : windows_core::PWSTR) -> super::super::Foundation:: BOOL); - GetTransactionInformation(transactionhandle.param().abi(), core::mem::transmute(outcome), core::mem::transmute(isolationlevel), core::mem::transmute(isolationflags), core::mem::transmute(timeout), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + GetTransactionInformation(core::mem::transmute(transactionhandle), core::mem::transmute(outcome), core::mem::transmute(isolationlevel), core::mem::transmute(isolationflags), core::mem::transmute(timeout), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[inline] -pub unsafe fn GetTransactionManagerId(transactionmanagerhandle: P0, transactionmanagerid: *mut windows_core::GUID) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetTransactionManagerId(transactionmanagerhandle: super::super::Foundation::HANDLE, transactionmanagerid: *mut windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn GetTransactionManagerId(transactionmanagerhandle : super::super::Foundation:: HANDLE, transactionmanagerid : *mut windows_core::GUID) -> super::super::Foundation:: BOOL); - GetTransactionManagerId(transactionmanagerhandle.param().abi(), core::mem::transmute(transactionmanagerid)).ok() + GetTransactionManagerId(core::mem::transmute(transactionmanagerhandle), core::mem::transmute(transactionmanagerid)).ok() } #[inline] pub unsafe fn GetVolumeInformationA(lprootpathname: P0, lpvolumenamebuffer: Option<&mut [u8]>, lpvolumeserialnumber: Option<*mut u32>, lpmaximumcomponentlength: Option<*mut u32>, lpfilesystemflags: Option<*mut u32>, lpfilesystemnamebuffer: Option<&mut [u8]>) -> windows_core::Result<()> @@ -1672,27 +1493,24 @@ 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(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(lpvolumeserialnumber.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpfilesystemflags.unwrap_or(core::mem::zeroed())), 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()), ) .ok() } #[inline] -pub unsafe fn GetVolumeInformationByHandleW(hfile: P0, lpvolumenamebuffer: Option<&mut [u16]>, lpvolumeserialnumber: Option<*mut u32>, lpmaximumcomponentlength: Option<*mut u32>, lpfilesystemflags: Option<*mut u32>, lpfilesystemnamebuffer: Option<&mut [u16]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetVolumeInformationByHandleW(hfile: super::super::Foundation::HANDLE, lpvolumenamebuffer: Option<&mut [u16]>, lpvolumeserialnumber: Option<*mut u32>, lpmaximumcomponentlength: Option<*mut u32>, lpfilesystemflags: Option<*mut u32>, lpfilesystemnamebuffer: Option<&mut [u16]>) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetVolumeInformationByHandleW(hfile : super::super::Foundation:: HANDLE, lpvolumenamebuffer : windows_core::PWSTR, nvolumenamesize : u32, lpvolumeserialnumber : *mut u32, lpmaximumcomponentlength : *mut u32, lpfilesystemflags : *mut u32, lpfilesystemnamebuffer : windows_core::PWSTR, nfilesystemnamesize : u32) -> super::super::Foundation:: BOOL); GetVolumeInformationByHandleW( - hfile.param().abi(), + core::mem::transmute(hfile), 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(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(lpvolumeserialnumber.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpfilesystemflags.unwrap_or(core::mem::zeroed())), 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 +1526,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(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(lpvolumeserialnumber.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpfilesystemflags.unwrap_or(core::mem::zeroed())), 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()), ) @@ -1765,28 +1583,19 @@ where GetVolumePathNamesForVolumeNameW(lpszvolumename.param().abi(), core::mem::transmute(lpszvolumepathnames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpcchreturnlength)).ok() } #[inline] -pub unsafe fn HandleLogFull(hlog: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HandleLogFull(hlog: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn HandleLogFull(hlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - HandleLogFull(hlog.param().abi()).ok() + HandleLogFull(core::mem::transmute(hlog)).ok() } #[inline] -pub unsafe fn InstallLogPolicy(hlog: P0, ppolicy: *mut CLFS_MGMT_POLICY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn InstallLogPolicy(hlog: super::super::Foundation::HANDLE, ppolicy: *mut CLFS_MGMT_POLICY) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn InstallLogPolicy(hlog : super::super::Foundation:: HANDLE, ppolicy : *mut CLFS_MGMT_POLICY) -> super::super::Foundation:: BOOL); - InstallLogPolicy(hlog.param().abi(), core::mem::transmute(ppolicy)).ok() + InstallLogPolicy(core::mem::transmute(hlog), core::mem::transmute(ppolicy)).ok() } #[inline] -pub unsafe fn IsIoRingOpSupported(ioring: P0, op: IORING_OP_CODE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsIoRingOpSupported(ioring: HIORING, op: IORING_OP_CODE) -> super::super::Foundation::BOOL { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn IsIoRingOpSupported(ioring : HIORING, op : IORING_OP_CODE) -> super::super::Foundation:: BOOL); - IsIoRingOpSupported(ioring.param().abi(), core::mem::transmute(op)) + IsIoRingOpSupported(core::mem::transmute(ioring), core::mem::transmute(op)) } #[inline] pub unsafe fn LZClose(hfile: i32) { @@ -1845,29 +1654,20 @@ pub unsafe fn LocalFileTimeToFileTime(lplocalfiletime: *const super::super::Foun LocalFileTimeToFileTime(core::mem::transmute(lplocalfiletime), core::mem::transmute(lpfiletime)).ok() } #[inline] -pub unsafe fn LockFile(hfile: P0, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LockFile(hfile: super::super::Foundation::HANDLE, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn LockFile(hfile : super::super::Foundation:: HANDLE, dwfileoffsetlow : u32, dwfileoffsethigh : u32, nnumberofbytestolocklow : u32, nnumberofbytestolockhigh : u32) -> super::super::Foundation:: BOOL); - LockFile(hfile.param().abi(), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(nnumberofbytestolocklow), core::mem::transmute(nnumberofbytestolockhigh)).ok() + LockFile(core::mem::transmute(hfile), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(nnumberofbytestolocklow), core::mem::transmute(nnumberofbytestolockhigh)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn LockFileEx(hfile: P0, dwflags: LOCK_FILE_FLAGS, dwreserved: u32, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LockFileEx(hfile: super::super::Foundation::HANDLE, dwflags: LOCK_FILE_FLAGS, dwreserved: Option, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn LockFileEx(hfile : super::super::Foundation:: HANDLE, dwflags : LOCK_FILE_FLAGS, dwreserved : u32, nnumberofbytestolocklow : u32, nnumberofbytestolockhigh : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - LockFileEx(hfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved), core::mem::transmute(nnumberofbytestolocklow), core::mem::transmute(nnumberofbytestolockhigh), core::mem::transmute(lpoverlapped)).ok() + LockFileEx(core::mem::transmute(hfile), core::mem::transmute(dwflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(nnumberofbytestolocklow), core::mem::transmute(nnumberofbytestolockhigh), core::mem::transmute(lpoverlapped)).ok() } #[inline] -pub unsafe fn LogTailAdvanceFailure(hlog: P0, dwreason: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LogTailAdvanceFailure(hlog: super::super::Foundation::HANDLE, dwreason: u32) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn LogTailAdvanceFailure(hlog : super::super::Foundation:: HANDLE, dwreason : u32) -> super::super::Foundation:: BOOL); - LogTailAdvanceFailure(hlog.param().abi(), core::mem::transmute(dwreason)).ok() + LogTailAdvanceFailure(core::mem::transmute(hlog), core::mem::transmute(dwreason)).ok() } #[inline] pub unsafe fn LsnBlockOffset(plsn: *const CLS_LSN) -> u32 { @@ -1956,24 +1756,22 @@ where MoveFileFromAppW(lpexistingfilename.param().abi(), lpnewfilename.param().abi()) } #[inline] -pub unsafe fn MoveFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS, htransaction: P5) -> windows_core::Result<()> +pub unsafe fn MoveFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P5: 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(), core::mem::transmute(lpprogressroutine), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), htransaction.param().abi()).ok() + MoveFileTransactedA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(htransaction)).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: P5) -> windows_core::Result<()> +pub unsafe fn MoveFileTransactedW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P5: 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(), core::mem::transmute(lpprogressroutine), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), htransaction.param().abi()).ok() + MoveFileTransactedW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(htransaction)).ok() } #[inline] pub unsafe fn MoveFileW(lpexistingfilename: P0, lpnewfilename: P1) -> windows_core::Result<()> @@ -1985,22 +1783,22 @@ where MoveFileW(lpexistingfilename.param().abi(), lpnewfilename.param().abi()).ok() } #[inline] -pub unsafe fn MoveFileWithProgressA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> windows_core::Result<()> +pub unsafe fn MoveFileWithProgressA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> windows_core::Result<()> where P0: windows_core::Param, 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(), core::mem::transmute(lpprogressroutine), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + MoveFileWithProgressA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> +pub unsafe fn MoveFileWithProgressW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> windows_core::Result<()> where P0: windows_core::Param, 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(), core::mem::transmute(lpprogressroutine), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + MoveFileWithProgressW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +1807,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetConnectionEnum(servername.param().abi(), qualifier.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetFileClose(servername: P0, fileid: u32) -> u32 @@ -2027,7 +1825,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetFileEnum(servername.param().abi(), basepath.param().abi(), username.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetFileGetInfo(servername: P0, fileid: u32, level: u32, bufptr: *mut *mut u8) -> u32 @@ -2059,7 +1857,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) + NetServerAliasEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resumehandle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetSessionDel(servername: P0, uncclientname: P1, username: P2) -> u32 @@ -2079,7 +1877,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetSessionEnum(servername.param().abi(), uncclientname.param().abi(), username.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetSessionGetInfo(servername: P0, uncclientname: P1, username: P2, level: u32, bufptr: *mut *mut u8) -> u32 @@ -2097,7 +1895,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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetShareAdd(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetShareCheck(servername: P0, device: P1, r#type: *mut u32) -> u32 @@ -2109,13 +1907,13 @@ where NetShareCheck(servername.param().abi(), device.param().abi(), core::mem::transmute(r#type)) } #[inline] -pub unsafe fn NetShareDel(servername: P0, netname: P1, reserved: u32) -> u32 +pub unsafe fn NetShareDel(servername: P0, netname: P1, reserved: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareDel(servername : windows_core::PCWSTR, netname : windows_core::PCWSTR, reserved : u32) -> u32); - NetShareDel(servername.param().abi(), netname.param().abi(), core::mem::transmute(reserved)) + NetShareDel(servername.param().abi(), netname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetShareDelEx(servername: P0, level: u32, buf: *const u8) -> u32 @@ -2126,13 +1924,13 @@ where NetShareDelEx(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(buf)) } #[inline] -pub unsafe fn NetShareDelSticky(servername: P0, netname: P1, reserved: u32) -> u32 +pub unsafe fn NetShareDelSticky(servername: P0, netname: P1, reserved: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareDelSticky(servername : windows_core::PCWSTR, netname : windows_core::PCWSTR, reserved : u32) -> u32); - NetShareDelSticky(servername.param().abi(), netname.param().abi(), core::mem::transmute(reserved)) + NetShareDelSticky(servername.param().abi(), netname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetShareEnum(servername: P0, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, resume_handle: Option<*mut u32>) -> u32 @@ -2140,7 +1938,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetShareEnum(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[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 +1946,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(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) + NetShareEnumSticky(servername.param().abi(), core::mem::transmute(level), core::mem::transmute(bufptr), core::mem::transmute(prefmaxlen), core::mem::transmute(entriesread), core::mem::transmute(totalentries), core::mem::transmute(resume_handle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetShareGetInfo(servername: P0, netname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -2166,7 +1964,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(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) + NetShareSetInfo(servername.param().abi(), netname.param().abi(), core::mem::transmute(level), core::mem::transmute(buf), core::mem::transmute(parm_err.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NetStatisticsGet(servername: *const i8, service: *const i8, level: u32, options: u32, buffer: *mut *mut u8) -> u32 { @@ -2190,12 +1988,9 @@ where OpenEncryptedFileRawW(lpfilename.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(pvcontext)) } #[inline] -pub unsafe fn OpenEnlistment(dwdesiredaccess: u32, resourcemanagerhandle: P1, enlistmentid: *mut windows_core::GUID) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn OpenEnlistment(dwdesiredaccess: u32, resourcemanagerhandle: super::super::Foundation::HANDLE, enlistmentid: *mut windows_core::GUID) -> windows_core::Result { windows_targets::link!("ktmw32.dll" "system" fn OpenEnlistment(dwdesiredaccess : u32, resourcemanagerhandle : super::super::Foundation:: HANDLE, enlistmentid : *mut windows_core::GUID) -> super::super::Foundation:: HANDLE); - let result__ = OpenEnlistment(core::mem::transmute(dwdesiredaccess), resourcemanagerhandle.param().abi(), core::mem::transmute(enlistmentid)); + let result__ = OpenEnlistment(core::mem::transmute(dwdesiredaccess), core::mem::transmute(resourcemanagerhandle), core::mem::transmute(enlistmentid)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2208,21 +2003,15 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn OpenFileById(hvolumehint: P0, lpfileid: *const FILE_ID_DESCRIPTOR, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn OpenFileById(hvolumehint: super::super::Foundation::HANDLE, lpfileid: *const FILE_ID_DESCRIPTOR, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES) -> windows_core::Result { 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(), core::mem::transmute(lpfileid), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(dwflagsandattributes)); + let result__ = OpenFileById(core::mem::transmute(hvolumehint), core::mem::transmute(lpfileid), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflagsandattributes)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenResourceManager(dwdesiredaccess: u32, tmhandle: P1, resourcemanagerid: *mut windows_core::GUID) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn OpenResourceManager(dwdesiredaccess: u32, tmhandle: super::super::Foundation::HANDLE, resourcemanagerid: *mut windows_core::GUID) -> windows_core::Result { windows_targets::link!("ktmw32.dll" "system" fn OpenResourceManager(dwdesiredaccess : u32, tmhandle : super::super::Foundation:: HANDLE, resourcemanagerid : *mut windows_core::GUID) -> super::super::Foundation:: HANDLE); - let result__ = OpenResourceManager(core::mem::transmute(dwdesiredaccess), tmhandle.param().abi(), core::mem::transmute(resourcemanagerid)); + let result__ = OpenResourceManager(core::mem::transmute(dwdesiredaccess), core::mem::transmute(tmhandle), core::mem::transmute(resourcemanagerid)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2247,58 +2036,40 @@ pub unsafe fn OpenTransactionManagerById(transactionmanagerid: *const windows_co (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn PopIoRingCompletion(ioring: P0, cqe: *mut IORING_CQE) -> windows_core::HRESULT -where - P0: windows_core::Param, -{ +pub unsafe fn PopIoRingCompletion(ioring: HIORING, cqe: *mut IORING_CQE) -> windows_core::HRESULT { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn PopIoRingCompletion(ioring : HIORING, cqe : *mut IORING_CQE) -> windows_core::HRESULT); - PopIoRingCompletion(ioring.param().abi(), core::mem::transmute(cqe)) + PopIoRingCompletion(core::mem::transmute(ioring), core::mem::transmute(cqe)) } #[inline] -pub unsafe fn PrePrepareComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrePrepareComplete(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn PrePrepareComplete(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - PrePrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + PrePrepareComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn PrePrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrePrepareEnlistment(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn PrePrepareEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - PrePrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + PrePrepareEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn PrepareComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrepareComplete(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn PrepareComplete(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - PrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + PrepareComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn PrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrepareEnlistment(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn PrepareEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - PrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + PrepareEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn PrepareLogArchive(hlog: P0, pszbaselogfilename: &mut [u16], plsnlow: Option<*const CLS_LSN>, plsnhigh: Option<*const CLS_LSN>, pcactuallength: Option<*mut u32>, poffbaselogfiledata: *mut u64, pcbbaselogfilelength: *mut u64, plsnbase: *mut CLS_LSN, plsnlast: *mut CLS_LSN, plsncurrentarchivetail: *mut CLS_LSN, ppvarchivecontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrepareLogArchive(hlog: super::super::Foundation::HANDLE, pszbaselogfilename: &mut [u16], plsnlow: Option<*const CLS_LSN>, plsnhigh: Option<*const CLS_LSN>, pcactuallength: Option<*mut u32>, poffbaselogfiledata: *mut u64, pcbbaselogfilelength: *mut u64, plsnbase: *mut CLS_LSN, plsnlast: *mut CLS_LSN, plsncurrentarchivetail: *mut CLS_LSN, ppvarchivecontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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(hlog), 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())), + core::mem::transmute(plsnlow.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plsnhigh.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcactuallength.unwrap_or(core::mem::zeroed())), core::mem::transmute(poffbaselogfiledata), core::mem::transmute(pcbbaselogfilelength), core::mem::transmute(plsnbase), @@ -2309,13 +2080,12 @@ where .ok() } #[inline] -pub unsafe fn PrepareTape(hdevice: P0, dwoperation: PREPARE_TAPE_OPERATION, bimmediate: P2) -> u32 +pub unsafe fn PrepareTape(hdevice: super::super::Foundation::HANDLE, dwoperation: PREPARE_TAPE_OPERATION, bimmediate: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn PrepareTape(hdevice : super::super::Foundation:: HANDLE, dwoperation : PREPARE_TAPE_OPERATION, bimmediate : super::super::Foundation:: BOOL) -> u32); - PrepareTape(hdevice.param().abi(), core::mem::transmute(dwoperation), bimmediate.param().abi()) + PrepareTape(core::mem::transmute(hdevice), core::mem::transmute(dwoperation), bimmediate.param().abi()) } #[inline] pub unsafe fn QueryDosDeviceA(lpdevicename: P0, lptargetpath: Option<&mut [u8]>) -> u32 @@ -2340,12 +2110,9 @@ pub unsafe fn QueryIoRingCapabilities() -> windows_core::Result(hlog: P0, epolicytype: CLFS_MGMT_POLICY_TYPE, ppolicybuffer: *mut CLFS_MGMT_POLICY, pcbpolicybuffer: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryLogPolicy(hlog: super::super::Foundation::HANDLE, epolicytype: CLFS_MGMT_POLICY_TYPE, ppolicybuffer: *mut CLFS_MGMT_POLICY, pcbpolicybuffer: *mut u32) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn QueryLogPolicy(hlog : super::super::Foundation:: HANDLE, epolicytype : CLFS_MGMT_POLICY_TYPE, ppolicybuffer : *mut CLFS_MGMT_POLICY, pcbpolicybuffer : *mut u32) -> super::super::Foundation:: BOOL); - QueryLogPolicy(hlog.param().abi(), core::mem::transmute(epolicytype), core::mem::transmute(ppolicybuffer), core::mem::transmute(pcbpolicybuffer)).ok() + QueryLogPolicy(core::mem::transmute(hlog), core::mem::transmute(epolicytype), core::mem::transmute(ppolicybuffer), core::mem::transmute(pcbpolicybuffer)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -2366,65 +2133,51 @@ where QueryUsersOnEncryptedFile(lpfilename.param().abi(), core::mem::transmute(pusers)) } #[inline] -pub unsafe fn ReOpenFile(horiginalfile: P0, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn ReOpenFile(horiginalfile: super::super::Foundation::HANDLE, dwdesiredaccess: u32, dwsharemode: FILE_SHARE_MODE, dwflagsandattributes: FILE_FLAGS_AND_ATTRIBUTES) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn ReOpenFile(horiginalfile : super::super::Foundation:: HANDLE, dwdesiredaccess : u32, dwsharemode : FILE_SHARE_MODE, dwflagsandattributes : FILE_FLAGS_AND_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - let result__ = ReOpenFile(horiginalfile.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwflagsandattributes)); + let result__ = ReOpenFile(core::mem::transmute(horiginalfile), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwflagsandattributes)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ReadDirectoryChangesExW(hdirectory: P0, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P3, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE, readdirectorynotifyinformationclass: READ_DIRECTORY_NOTIFY_INFORMATION_CLASS) -> windows_core::Result<()> +pub unsafe fn ReadDirectoryChangesExW(hdirectory: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P3, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option, readdirectorynotifyinformationclass: READ_DIRECTORY_NOTIFY_INFORMATION_CLASS) -> windows_core::Result<()> where - P0: windows_core::Param, P3: 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(), core::mem::transmute(lpbuffer), core::mem::transmute(nbufferlength), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcompletionroutine), core::mem::transmute(readdirectorynotifyinformationclass)).ok() + ReadDirectoryChangesExW(core::mem::transmute(hdirectory), core::mem::transmute(lpbuffer), core::mem::transmute(nbufferlength), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(readdirectorynotifyinformationclass)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ReadDirectoryChangesW(hdirectory: P0, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P3, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> windows_core::Result<()> +pub unsafe fn ReadDirectoryChangesW(hdirectory: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P3, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> windows_core::Result<()> where - P0: windows_core::Param, P3: 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(), core::mem::transmute(lpbuffer), core::mem::transmute(nbufferlength), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcompletionroutine)).ok() + ReadDirectoryChangesW(core::mem::transmute(hdirectory), core::mem::transmute(lpbuffer), core::mem::transmute(nbufferlength), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pfexportcallback), core::mem::transmute(pvcallbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pvcontext)) + ReadEncryptedFileRaw(core::mem::transmute(pfexportcallback), core::mem::transmute(pvcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcontext)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ReadFile(hfile: P0, lpbuffer: Option<&mut [u8]>, lpnumberofbytesread: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadFile(hfile: super::super::Foundation::HANDLE, lpbuffer: Option<&mut [u8]>, lpnumberofbytesread: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() + ReadFile(core::mem::transmute(hfile), 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::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ReadFileEx(hfile: P0, lpbuffer: Option<&mut [u8]>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadFileEx(hfile: super::super::Foundation::HANDLE, lpbuffer: Option<&mut [u8]>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadFileEx(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut u8, nnumberofbytestoread : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation:: BOOL); - ReadFileEx(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(lpoverlapped), core::mem::transmute(lpcompletionroutine)).ok() + ReadFileEx(core::mem::transmute(hfile), 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(lpoverlapped), core::mem::transmute(lpcompletionroutine)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ReadFileScatter(hfile: P0, asegmentarray: *const FILE_SEGMENT_ELEMENT, nnumberofbytestoread: u32, lpreserved: Option<*const u32>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadFileScatter(hfile: super::super::Foundation::HANDLE, asegmentarray: *const FILE_SEGMENT_ELEMENT, nnumberofbytestoread: u32, lpreserved: Option<*const u32>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { 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(), core::mem::transmute(asegmentarray), core::mem::transmute(nnumberofbytestoread), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), core::mem::transmute(lpoverlapped)).ok() + ReadFileScatter(core::mem::transmute(hfile), core::mem::transmute(asegmentarray), core::mem::transmute(nnumberofbytestoread), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { @@ -2433,12 +2186,9 @@ pub unsafe fn ReadLogArchiveMetadata(pvarchivecontext: *mut core::ffi::c_void, c } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ReadLogNotification(hlog: P0, pnotification: *mut CLFS_MGMT_NOTIFICATION, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadLogNotification(hlog: super::super::Foundation::HANDLE, pnotification: *mut CLFS_MGMT_NOTIFICATION, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn ReadLogNotification(hlog : super::super::Foundation:: HANDLE, pnotification : *mut CLFS_MGMT_NOTIFICATION, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadLogNotification(hlog.param().abi(), core::mem::transmute(pnotification), core::mem::transmute(lpoverlapped)).ok() + ReadLogNotification(core::mem::transmute(hlog), core::mem::transmute(pnotification), core::mem::transmute(lpoverlapped)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2459,12 +2209,9 @@ pub unsafe fn ReadNextLogRecord(pvreadcontext: *mut core::ffi::c_void, ppvbuffer ReadNextLogRecord(core::mem::transmute(pvreadcontext), core::mem::transmute(ppvbuffer), core::mem::transmute(pcbbuffer), core::mem::transmute(perecordtype), core::mem::transmute(plsnuser), core::mem::transmute(plsnundonext), core::mem::transmute(plsnprevious), core::mem::transmute(plsnrecord), core::mem::transmute(poverlapped)).ok() } #[inline] -pub unsafe fn ReadOnlyEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadOnlyEnlistment(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn ReadOnlyEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - ReadOnlyEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + ReadOnlyEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2473,45 +2220,32 @@ pub unsafe fn ReadPreviousLogRestartArea(pvreadcontext: *mut core::ffi::c_void, ReadPreviousLogRestartArea(core::mem::transmute(pvreadcontext), core::mem::transmute(ppvrestartbuffer), core::mem::transmute(pcbrestartbuffer), core::mem::transmute(plsnrestart), core::mem::transmute(poverlapped)).ok() } #[inline] -pub unsafe fn RecoverEnlistment(enlistmenthandle: P0, enlistmentkey: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RecoverEnlistment(enlistmenthandle: super::super::Foundation::HANDLE, enlistmentkey: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn RecoverEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, enlistmentkey : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - RecoverEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentkey)).ok() + RecoverEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(enlistmentkey)).ok() } #[inline] -pub unsafe fn RecoverResourceManager(resourcemanagerhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RecoverResourceManager(resourcemanagerhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn RecoverResourceManager(resourcemanagerhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RecoverResourceManager(resourcemanagerhandle.param().abi()).ok() + RecoverResourceManager(core::mem::transmute(resourcemanagerhandle)).ok() } #[inline] -pub unsafe fn RecoverTransactionManager(transactionmanagerhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RecoverTransactionManager(transactionmanagerhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn RecoverTransactionManager(transactionmanagerhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RecoverTransactionManager(transactionmanagerhandle.param().abi()).ok() + RecoverTransactionManager(core::mem::transmute(transactionmanagerhandle)).ok() } #[inline] -pub unsafe fn RegisterForLogWriteNotification(hlog: P0, cbthreshold: u32, fenable: P2) -> windows_core::Result<()> +pub unsafe fn RegisterForLogWriteNotification(hlog: super::super::Foundation::HANDLE, cbthreshold: u32, fenable: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clfsw32.dll" "system" fn RegisterForLogWriteNotification(hlog : super::super::Foundation:: HANDLE, cbthreshold : u32, fenable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterForLogWriteNotification(hlog.param().abi(), core::mem::transmute(cbthreshold), fenable.param().abi()).ok() + RegisterForLogWriteNotification(core::mem::transmute(hlog), core::mem::transmute(cbthreshold), fenable.param().abi()).ok() } #[inline] -pub unsafe fn RegisterManageableLogClient(hlog: P0, pcallbacks: *mut LOG_MANAGEMENT_CALLBACKS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterManageableLogClient(hlog: super::super::Foundation::HANDLE, pcallbacks: *mut LOG_MANAGEMENT_CALLBACKS) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn RegisterManageableLogClient(hlog : super::super::Foundation:: HANDLE, pcallbacks : *mut LOG_MANAGEMENT_CALLBACKS) -> super::super::Foundation:: BOOL); - RegisterManageableLogClient(hlog.param().abi(), core::mem::transmute(pcallbacks)).ok() + RegisterManageableLogClient(core::mem::transmute(hlog), core::mem::transmute(pcallbacks)).ok() } #[inline] pub unsafe fn RemoveDirectoryA(lppathname: P0) -> windows_core::Result<()> @@ -2530,22 +2264,20 @@ where RemoveDirectoryFromAppW(lppathname.param().abi()) } #[inline] -pub unsafe fn RemoveDirectoryTransactedA(lppathname: P0, htransaction: P1) -> windows_core::Result<()> +pub unsafe fn RemoveDirectoryTransactedA(lppathname: P0, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn RemoveDirectoryTransactedA(lppathname : windows_core::PCSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RemoveDirectoryTransactedA(lppathname.param().abi(), htransaction.param().abi()).ok() + RemoveDirectoryTransactedA(lppathname.param().abi(), core::mem::transmute(htransaction)).ok() } #[inline] -pub unsafe fn RemoveDirectoryTransactedW(lppathname: P0, htransaction: P1) -> windows_core::Result<()> +pub unsafe fn RemoveDirectoryTransactedW(lppathname: P0, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn RemoveDirectoryTransactedW(lppathname : windows_core::PCWSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RemoveDirectoryTransactedW(lppathname.param().abi(), htransaction.param().abi()).ok() + RemoveDirectoryTransactedW(lppathname.param().abi(), core::mem::transmute(htransaction)).ok() } #[inline] pub unsafe fn RemoveDirectoryW(lppathname: P0) -> windows_core::Result<()> @@ -2556,31 +2288,26 @@ where RemoveDirectoryW(lppathname.param().abi()).ok() } #[inline] -pub unsafe fn RemoveLogContainer(hlog: P0, pwszcontainerpath: P1, fforce: P2, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn RemoveLogContainer(hlog: super::super::Foundation::HANDLE, pwszcontainerpath: P1, fforce: P2, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut()))).ok() + RemoveLogContainer(core::mem::transmute(hlog), pwszcontainerpath.param().abi(), fforce.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RemoveLogContainerSet(hlog: P0, rgwszcontainerpath: &[windows_core::PCWSTR], fforce: P3, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn RemoveLogContainerSet(hlog: super::super::Foundation::HANDLE, rgwszcontainerpath: &[windows_core::PCWSTR], fforce: P3, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P3: 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(core::ptr::null_mut()))).ok() + RemoveLogContainerSet(core::mem::transmute(hlog), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RemoveLogPolicy(hlog: P0, epolicytype: CLFS_MGMT_POLICY_TYPE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RemoveLogPolicy(hlog: super::super::Foundation::HANDLE, epolicytype: CLFS_MGMT_POLICY_TYPE) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn RemoveLogPolicy(hlog : super::super::Foundation:: HANDLE, epolicytype : CLFS_MGMT_POLICY_TYPE) -> super::super::Foundation:: BOOL); - RemoveLogPolicy(hlog.param().abi(), core::mem::transmute(epolicytype)).ok() + RemoveLogPolicy(core::mem::transmute(hlog), core::mem::transmute(epolicytype)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -2607,7 +2334,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(), core::mem::transmute(dwreplaceflags), core::mem::transmute(lpexclude.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + ReplaceFileA(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), core::mem::transmute(dwreplaceflags), core::mem::transmute(lpexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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 @@ -2617,7 +2344,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(), core::mem::transmute(dwreplaceflags), core::mem::transmute(lpexclude.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) + ReplaceFileFromAppW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), core::mem::transmute(dwreplaceflags), core::mem::transmute(lpexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } #[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<()> @@ -2627,7 +2354,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(), core::mem::transmute(dwreplaceflags), core::mem::transmute(lpexclude.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + ReplaceFileW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), core::mem::transmute(dwreplaceflags), core::mem::transmute(lpexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2642,44 +2369,29 @@ pub unsafe fn ReserveAndAppendLogAligned(pvmarshal: *mut core::ffi::c_void, rgwr ReserveAndAppendLogAligned(core::mem::transmute(pvmarshal), core::mem::transmute(rgwriteentries), core::mem::transmute(cwriteentries), core::mem::transmute(cbentryalignment), core::mem::transmute(plsnundonext), core::mem::transmute(plsnprevious), core::mem::transmute(creserverecords), core::mem::transmute(rgcbreservation), core::mem::transmute(fflags), core::mem::transmute(plsn), core::mem::transmute(poverlapped)).ok() } #[inline] -pub unsafe fn RollbackComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RollbackComplete(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn RollbackComplete(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - RollbackComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + RollbackComplete(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn RollbackEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RollbackEnlistment(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn RollbackEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - RollbackEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + RollbackEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn RollbackTransaction(transactionhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RollbackTransaction(transactionhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn RollbackTransaction(transactionhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RollbackTransaction(transactionhandle.param().abi()).ok() + RollbackTransaction(core::mem::transmute(transactionhandle)).ok() } #[inline] -pub unsafe fn RollbackTransactionAsync(transactionhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RollbackTransactionAsync(transactionhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn RollbackTransactionAsync(transactionhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RollbackTransactionAsync(transactionhandle.param().abi()).ok() + RollbackTransactionAsync(core::mem::transmute(transactionhandle)).ok() } #[inline] -pub unsafe fn RollforwardTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RollforwardTransactionManager(transactionmanagerhandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn RollforwardTransactionManager(transactionmanagerhandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - RollforwardTransactionManager(transactionmanagerhandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + RollforwardTransactionManager(core::mem::transmute(transactionmanagerhandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] pub unsafe fn ScanLogContainers(pcxscan: *mut CLS_SCAN_CONTEXT, escanmode: u8, preserved: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -2694,7 +2406,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(core::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::mem::zeroed()))) } #[inline] pub unsafe fn SearchPathW(lppath: P0, lpfilename: P1, lpextension: P2, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>) -> u32 @@ -2704,7 +2416,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(core::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::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2713,32 +2425,23 @@ 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(core::ptr::null())), core::mem::transmute(pbnewmetadata), core::mem::transmute(pownerhash), core::mem::transmute(dwoperation), core::mem::transmute(pcertificatesadded.unwrap_or(core::ptr::null()))) + SetEncryptedFileMetadata(lpfilename.param().abi(), core::mem::transmute(pboldmetadata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbnewmetadata), core::mem::transmute(pownerhash), core::mem::transmute(dwoperation), core::mem::transmute(pcertificatesadded.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetEndOfFile(hfile: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetEndOfFile(hfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetEndOfFile(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetEndOfFile(hfile.param().abi()).ok() + SetEndOfFile(core::mem::transmute(hfile)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn SetEndOfLog(hlog: P0, plsnend: *mut CLS_LSN, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetEndOfLog(hlog: super::super::Foundation::HANDLE, plsnend: *mut CLS_LSN, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn SetEndOfLog(hlog : super::super::Foundation:: HANDLE, plsnend : *mut CLS_LSN, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - SetEndOfLog(hlog.param().abi(), core::mem::transmute(plsnend), core::mem::transmute(lpoverlapped)).ok() + SetEndOfLog(core::mem::transmute(hlog), core::mem::transmute(plsnend), core::mem::transmute(lpoverlapped)).ok() } #[inline] -pub unsafe fn SetEnlistmentRecoveryInformation(enlistmenthandle: P0, buffersize: u32, buffer: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetEnlistmentRecoveryInformation(enlistmenthandle: super::super::Foundation::HANDLE, buffersize: u32, buffer: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn SetEnlistmentRecoveryInformation(enlistmenthandle : super::super::Foundation:: HANDLE, buffersize : u32, buffer : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetEnlistmentRecoveryInformation(enlistmenthandle.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer)).ok() + SetEnlistmentRecoveryInformation(core::mem::transmute(enlistmenthandle), core::mem::transmute(buffersize), core::mem::transmute(buffer)).ok() } #[inline] pub unsafe fn SetFileApisToANSI() { @@ -2767,22 +2470,20 @@ where SetFileAttributesFromAppW(lpfilename.param().abi(), core::mem::transmute(dwfileattributes)) } #[inline] -pub unsafe fn SetFileAttributesTransactedA(lpfilename: P0, dwfileattributes: u32, htransaction: P2) -> windows_core::Result<()> +pub unsafe fn SetFileAttributesTransactedA(lpfilename: P0, dwfileattributes: u32, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetFileAttributesTransactedA(lpfilename : windows_core::PCSTR, dwfileattributes : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetFileAttributesTransactedA(lpfilename.param().abi(), core::mem::transmute(dwfileattributes), htransaction.param().abi()).ok() + SetFileAttributesTransactedA(lpfilename.param().abi(), core::mem::transmute(dwfileattributes), core::mem::transmute(htransaction)).ok() } #[inline] -pub unsafe fn SetFileAttributesTransactedW(lpfilename: P0, dwfileattributes: u32, htransaction: P2) -> windows_core::Result<()> +pub unsafe fn SetFileAttributesTransactedW(lpfilename: P0, dwfileattributes: u32, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetFileAttributesTransactedW(lpfilename : windows_core::PCWSTR, dwfileattributes : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetFileAttributesTransactedW(lpfilename.param().abi(), core::mem::transmute(dwfileattributes), htransaction.param().abi()).ok() + SetFileAttributesTransactedW(lpfilename.param().abi(), core::mem::transmute(dwfileattributes), core::mem::transmute(htransaction)).ok() } #[inline] pub unsafe fn SetFileAttributesW(lpfilename: P0, dwfileattributes: FILE_FLAGS_AND_ATTRIBUTES) -> windows_core::Result<()> @@ -2793,129 +2494,88 @@ where SetFileAttributesW(lpfilename.param().abi(), core::mem::transmute(dwfileattributes)).ok() } #[inline] -pub unsafe fn SetFileBandwidthReservation(hfile: P0, nperiodmilliseconds: u32, nbytesperperiod: u32, bdiscardable: P3, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> windows_core::Result<()> +pub unsafe fn SetFileBandwidthReservation(hfile: super::super::Foundation::HANDLE, nperiodmilliseconds: u32, nbytesperperiod: u32, bdiscardable: P3, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetFileBandwidthReservation(hfile : super::super::Foundation:: HANDLE, nperiodmilliseconds : u32, nbytesperperiod : u32, bdiscardable : super::super::Foundation:: BOOL, lptransfersize : *mut u32, lpnumoutstandingrequests : *mut u32) -> super::super::Foundation:: BOOL); - SetFileBandwidthReservation(hfile.param().abi(), core::mem::transmute(nperiodmilliseconds), core::mem::transmute(nbytesperperiod), bdiscardable.param().abi(), core::mem::transmute(lptransfersize), core::mem::transmute(lpnumoutstandingrequests)).ok() + SetFileBandwidthReservation(core::mem::transmute(hfile), core::mem::transmute(nperiodmilliseconds), core::mem::transmute(nbytesperperiod), bdiscardable.param().abi(), core::mem::transmute(lptransfersize), core::mem::transmute(lpnumoutstandingrequests)).ok() } #[inline] -pub unsafe fn SetFileCompletionNotificationModes(filehandle: P0, flags: u8) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetFileCompletionNotificationModes(filehandle: super::super::Foundation::HANDLE, flags: u8) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetFileCompletionNotificationModes(filehandle : super::super::Foundation:: HANDLE, flags : u8) -> super::super::Foundation:: BOOL); - SetFileCompletionNotificationModes(filehandle.param().abi(), core::mem::transmute(flags)).ok() + SetFileCompletionNotificationModes(core::mem::transmute(filehandle), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SetFileInformationByHandle(hfile: P0, fileinformationclass: FILE_INFO_BY_HANDLE_CLASS, lpfileinformation: *const core::ffi::c_void, dwbuffersize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetFileInformationByHandle(hfile: super::super::Foundation::HANDLE, fileinformationclass: FILE_INFO_BY_HANDLE_CLASS, lpfileinformation: *const core::ffi::c_void, dwbuffersize: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetFileInformationByHandle(hfile : super::super::Foundation:: HANDLE, fileinformationclass : FILE_INFO_BY_HANDLE_CLASS, lpfileinformation : *const core::ffi::c_void, dwbuffersize : u32) -> super::super::Foundation:: BOOL); - SetFileInformationByHandle(hfile.param().abi(), core::mem::transmute(fileinformationclass), core::mem::transmute(lpfileinformation), core::mem::transmute(dwbuffersize)).ok() + SetFileInformationByHandle(core::mem::transmute(hfile), core::mem::transmute(fileinformationclass), core::mem::transmute(lpfileinformation), core::mem::transmute(dwbuffersize)).ok() } #[inline] -pub unsafe fn SetFileIoOverlappedRange(filehandle: P0, overlappedrangestart: *const u8, length: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetFileIoOverlappedRange(filehandle: super::super::Foundation::HANDLE, overlappedrangestart: *const u8, length: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetFileIoOverlappedRange(filehandle : super::super::Foundation:: HANDLE, overlappedrangestart : *const u8, length : u32) -> super::super::Foundation:: BOOL); - SetFileIoOverlappedRange(filehandle.param().abi(), core::mem::transmute(overlappedrangestart), core::mem::transmute(length)).ok() + SetFileIoOverlappedRange(core::mem::transmute(filehandle), core::mem::transmute(overlappedrangestart), core::mem::transmute(length)).ok() } #[inline] -pub unsafe fn SetFilePointer(hfile: P0, ldistancetomove: i32, lpdistancetomovehigh: Option<*mut i32>, dwmovemethod: SET_FILE_POINTER_MOVE_METHOD) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetFilePointer(hfile: super::super::Foundation::HANDLE, ldistancetomove: i32, lpdistancetomovehigh: Option<*mut i32>, dwmovemethod: SET_FILE_POINTER_MOVE_METHOD) -> u32 { 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(), core::mem::transmute(ldistancetomove), core::mem::transmute(lpdistancetomovehigh.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwmovemethod)) + SetFilePointer(core::mem::transmute(hfile), core::mem::transmute(ldistancetomove), core::mem::transmute(lpdistancetomovehigh.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmovemethod)) } #[inline] -pub unsafe fn SetFilePointerEx(hfile: P0, lidistancetomove: i64, lpnewfilepointer: Option<*mut i64>, dwmovemethod: SET_FILE_POINTER_MOVE_METHOD) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetFilePointerEx(hfile: super::super::Foundation::HANDLE, lidistancetomove: i64, lpnewfilepointer: Option<*mut i64>, dwmovemethod: SET_FILE_POINTER_MOVE_METHOD) -> windows_core::Result<()> { 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(), core::mem::transmute(lidistancetomove), core::mem::transmute(lpnewfilepointer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwmovemethod)).ok() + SetFilePointerEx(core::mem::transmute(hfile), core::mem::transmute(lidistancetomove), core::mem::transmute(lpnewfilepointer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmovemethod)).ok() } #[inline] -pub unsafe fn SetFileShortNameA(hfile: P0, lpshortname: P1) -> windows_core::Result<()> +pub unsafe fn SetFileShortNameA(hfile: super::super::Foundation::HANDLE, lpshortname: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetFileShortNameA(hfile : super::super::Foundation:: HANDLE, lpshortname : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetFileShortNameA(hfile.param().abi(), lpshortname.param().abi()).ok() + SetFileShortNameA(core::mem::transmute(hfile), lpshortname.param().abi()).ok() } #[inline] -pub unsafe fn SetFileShortNameW(hfile: P0, lpshortname: P1) -> windows_core::Result<()> +pub unsafe fn SetFileShortNameW(hfile: super::super::Foundation::HANDLE, lpshortname: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetFileShortNameW(hfile : super::super::Foundation:: HANDLE, lpshortname : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetFileShortNameW(hfile.param().abi(), lpshortname.param().abi()).ok() + SetFileShortNameW(core::mem::transmute(hfile), lpshortname.param().abi()).ok() } #[inline] -pub unsafe fn SetFileTime(hfile: P0, lpcreationtime: Option<*const super::super::Foundation::FILETIME>, lplastaccesstime: Option<*const super::super::Foundation::FILETIME>, lplastwritetime: Option<*const super::super::Foundation::FILETIME>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetFileTime(hfile: super::super::Foundation::HANDLE, lpcreationtime: Option<*const super::super::Foundation::FILETIME>, lplastaccesstime: Option<*const super::super::Foundation::FILETIME>, lplastwritetime: Option<*const super::super::Foundation::FILETIME>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(lplastaccesstime.unwrap_or(core::ptr::null())), core::mem::transmute(lplastwritetime.unwrap_or(core::ptr::null()))).ok() + SetFileTime(core::mem::transmute(hfile), core::mem::transmute(lpcreationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplastaccesstime.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplastwritetime.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetFileValidData(hfile: P0, validdatalength: i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetFileValidData(hfile: super::super::Foundation::HANDLE, validdatalength: i64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetFileValidData(hfile : super::super::Foundation:: HANDLE, validdatalength : i64) -> super::super::Foundation:: BOOL); - SetFileValidData(hfile.param().abi(), core::mem::transmute(validdatalength)).ok() + SetFileValidData(core::mem::transmute(hfile), core::mem::transmute(validdatalength)).ok() } #[inline] -pub unsafe fn SetIoRingCompletionEvent(ioring: P0, hevent: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetIoRingCompletionEvent(ioring: HIORING, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn SetIoRingCompletionEvent(ioring : HIORING, hevent : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - SetIoRingCompletionEvent(ioring.param().abi(), hevent.param().abi()).ok() + SetIoRingCompletionEvent(core::mem::transmute(ioring), core::mem::transmute(hevent)).ok() } #[inline] -pub unsafe fn SetLogArchiveMode(hlog: P0, emode: CLFS_LOG_ARCHIVE_MODE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetLogArchiveMode(hlog: super::super::Foundation::HANDLE, emode: CLFS_LOG_ARCHIVE_MODE) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn SetLogArchiveMode(hlog : super::super::Foundation:: HANDLE, emode : CLFS_LOG_ARCHIVE_MODE) -> super::super::Foundation:: BOOL); - SetLogArchiveMode(hlog.param().abi(), core::mem::transmute(emode)).ok() + SetLogArchiveMode(core::mem::transmute(hlog), core::mem::transmute(emode)).ok() } #[inline] -pub unsafe fn SetLogArchiveTail(hlog: P0, plsnarchivetail: *mut CLS_LSN, preserved: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetLogArchiveTail(hlog: super::super::Foundation::HANDLE, plsnarchivetail: *mut CLS_LSN, preserved: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn SetLogArchiveTail(hlog : super::super::Foundation:: HANDLE, plsnarchivetail : *mut CLS_LSN, preserved : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetLogArchiveTail(hlog.param().abi(), core::mem::transmute(plsnarchivetail), core::mem::transmute(preserved)).ok() + SetLogArchiveTail(core::mem::transmute(hlog), core::mem::transmute(plsnarchivetail), core::mem::transmute(preserved)).ok() } #[inline] -pub unsafe fn SetLogFileSizeWithPolicy(hlog: P0, pdesiredsize: *const u64, presultingsize: *mut u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetLogFileSizeWithPolicy(hlog: super::super::Foundation::HANDLE, pdesiredsize: *const u64, presultingsize: *mut u64) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn SetLogFileSizeWithPolicy(hlog : super::super::Foundation:: HANDLE, pdesiredsize : *const u64, presultingsize : *mut u64) -> super::super::Foundation:: BOOL); - SetLogFileSizeWithPolicy(hlog.param().abi(), core::mem::transmute(pdesiredsize), core::mem::transmute(presultingsize)).ok() + SetLogFileSizeWithPolicy(core::mem::transmute(hlog), core::mem::transmute(pdesiredsize), core::mem::transmute(presultingsize)).ok() } #[inline] -pub unsafe fn SetResourceManagerCompletionPort(resourcemanagerhandle: P0, iocompletionporthandle: P1, completionkey: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetResourceManagerCompletionPort(resourcemanagerhandle: super::super::Foundation::HANDLE, iocompletionporthandle: super::super::Foundation::HANDLE, completionkey: usize) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn SetResourceManagerCompletionPort(resourcemanagerhandle : super::super::Foundation:: HANDLE, iocompletionporthandle : super::super::Foundation:: HANDLE, completionkey : usize) -> super::super::Foundation:: BOOL); - SetResourceManagerCompletionPort(resourcemanagerhandle.param().abi(), iocompletionporthandle.param().abi(), core::mem::transmute(completionkey)).ok() + SetResourceManagerCompletionPort(core::mem::transmute(resourcemanagerhandle), core::mem::transmute(iocompletionporthandle), core::mem::transmute(completionkey)).ok() } #[inline] pub unsafe fn SetSearchPathMode(flags: u32) -> windows_core::Result<()> { @@ -2923,42 +2583,37 @@ pub unsafe fn SetSearchPathMode(flags: u32) -> windows_core::Result<()> { SetSearchPathMode(core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SetTapeParameters(hdevice: P0, dwoperation: TAPE_INFORMATION_TYPE, lptapeinformation: *const core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetTapeParameters(hdevice: super::super::Foundation::HANDLE, dwoperation: TAPE_INFORMATION_TYPE, lptapeinformation: *const core::ffi::c_void) -> u32 { windows_targets::link!("kernel32.dll" "system" fn SetTapeParameters(hdevice : super::super::Foundation:: HANDLE, dwoperation : TAPE_INFORMATION_TYPE, lptapeinformation : *const core::ffi::c_void) -> u32); - SetTapeParameters(hdevice.param().abi(), core::mem::transmute(dwoperation), core::mem::transmute(lptapeinformation)) + SetTapeParameters(core::mem::transmute(hdevice), core::mem::transmute(dwoperation), core::mem::transmute(lptapeinformation)) } #[inline] -pub unsafe fn SetTapePosition(hdevice: P0, dwpositionmethod: TAPE_POSITION_METHOD, dwpartition: u32, dwoffsetlow: u32, dwoffsethigh: u32, bimmediate: P5) -> u32 +pub unsafe fn SetTapePosition(hdevice: super::super::Foundation::HANDLE, dwpositionmethod: TAPE_POSITION_METHOD, dwpartition: u32, dwoffsetlow: u32, dwoffsethigh: u32, bimmediate: P5) -> u32 where - P0: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetTapePosition(hdevice : super::super::Foundation:: HANDLE, dwpositionmethod : TAPE_POSITION_METHOD, dwpartition : u32, dwoffsetlow : u32, dwoffsethigh : u32, bimmediate : super::super::Foundation:: BOOL) -> u32); - SetTapePosition(hdevice.param().abi(), core::mem::transmute(dwpositionmethod), core::mem::transmute(dwpartition), core::mem::transmute(dwoffsetlow), core::mem::transmute(dwoffsethigh), bimmediate.param().abi()) + SetTapePosition(core::mem::transmute(hdevice), core::mem::transmute(dwpositionmethod), core::mem::transmute(dwpartition), core::mem::transmute(dwoffsetlow), core::mem::transmute(dwoffsethigh), bimmediate.param().abi()) } #[inline] -pub unsafe fn SetTransactionInformation(transactionhandle: P0, isolationlevel: u32, isolationflags: u32, timeout: u32, description: P4) -> windows_core::Result<()> +pub unsafe fn SetTransactionInformation(transactionhandle: super::super::Foundation::HANDLE, isolationlevel: u32, isolationflags: u32, timeout: u32, description: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("ktmw32.dll" "system" fn SetTransactionInformation(transactionhandle : super::super::Foundation:: HANDLE, isolationlevel : u32, isolationflags : u32, timeout : u32, description : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetTransactionInformation(transactionhandle.param().abi(), core::mem::transmute(isolationlevel), core::mem::transmute(isolationflags), core::mem::transmute(timeout), description.param().abi()).ok() + SetTransactionInformation(core::mem::transmute(transactionhandle), core::mem::transmute(isolationlevel), core::mem::transmute(isolationflags), core::mem::transmute(timeout), description.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[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(core::ptr::null()))) + SetUserFileEncryptionKey(core::mem::transmute(pencryptioncertificate.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(dwcapabilities), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) + SetUserFileEncryptionKeyEx(core::mem::transmute(pencryptioncertificate.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcapabilities), core::mem::transmute(dwflags), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetVolumeLabelA(lprootpathname: P0, lpvolumename: P1) -> windows_core::Result<()> @@ -2997,20 +2652,14 @@ where SetVolumeMountPointW(lpszvolumemountpoint.param().abi(), lpszvolumename.param().abi()).ok() } #[inline] -pub unsafe fn SinglePhaseReject(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SinglePhaseReject(enlistmenthandle: super::super::Foundation::HANDLE, tmvirtualclock: *mut i64) -> windows_core::Result<()> { windows_targets::link!("ktmw32.dll" "system" fn SinglePhaseReject(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - SinglePhaseReject(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock)).ok() + SinglePhaseReject(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock)).ok() } #[inline] -pub unsafe fn SubmitIoRing(ioring: P0, waitoperations: u32, milliseconds: u32, submittedentries: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SubmitIoRing(ioring: HIORING, waitoperations: u32, milliseconds: u32, submittedentries: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(waitoperations), core::mem::transmute(milliseconds), core::mem::transmute(submittedentries.unwrap_or(core::ptr::null_mut()))).ok() + SubmitIoRing(core::mem::transmute(ioring), core::mem::transmute(waitoperations), core::mem::transmute(milliseconds), core::mem::transmute(submittedentries.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn TerminateLogArchive(pvarchivecontext: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -3026,7 +2675,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(core::mem::transmute(pvmarshal), core::mem::transmute(plsnend), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() + TruncateLog(core::mem::transmute(pvmarshal), core::mem::transmute(plsnend), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn TxfGetThreadMiniVersionForCreate() -> u16 { @@ -3064,20 +2713,17 @@ 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(core::mem::transmute(recordbuffer), core::mem::transmute(recordbufferlengthinbytes), core::mem::transmute(namebuffer), core::mem::transmute(namebufferlengthinbytes), core::mem::transmute(txfid.unwrap_or(core::ptr::null_mut()))) + TxfLogRecordGetFileName(core::mem::transmute(recordbuffer), core::mem::transmute(recordbufferlengthinbytes), core::mem::transmute(namebuffer), core::mem::transmute(namebufferlengthinbytes), core::mem::transmute(txfid.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(recordbuffer), core::mem::transmute(recordbufferlengthinbytes), core::mem::transmute(generictype), core::mem::transmute(virtualclock.unwrap_or(core::ptr::null_mut()))) + TxfLogRecordGetGenericType(core::mem::transmute(recordbuffer), core::mem::transmute(recordbufferlengthinbytes), core::mem::transmute(generictype), core::mem::transmute(virtualclock.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn TxfReadMetadataInfo(filehandle: super::super::Foundation::HANDLE, txffileid: *mut TXF_ID, lastlsn: *mut CLS_LSN, transactionstate: *mut u32, lockingtransaction: *mut windows_core::GUID) -> super::super::Foundation::BOOL { windows_targets::link!("txfw32.dll" "system" fn TxfReadMetadataInfo(filehandle : super::super::Foundation:: HANDLE, txffileid : *mut TXF_ID, lastlsn : *mut CLS_LSN, transactionstate : *mut u32, lockingtransaction : *mut windows_core::GUID) -> super::super::Foundation:: BOOL); - TxfReadMetadataInfo(filehandle.param().abi(), core::mem::transmute(txffileid), core::mem::transmute(lastlsn), core::mem::transmute(transactionstate), core::mem::transmute(lockingtransaction)) + TxfReadMetadataInfo(core::mem::transmute(filehandle), core::mem::transmute(txffileid), core::mem::transmute(lastlsn), core::mem::transmute(transactionstate), core::mem::transmute(lockingtransaction)) } #[inline] pub unsafe fn TxfSetThreadMiniVersionForCreate(miniversion: u16) { @@ -3085,21 +2731,15 @@ pub unsafe fn TxfSetThreadMiniVersionForCreate(miniversion: u16) { TxfSetThreadMiniVersionForCreate(core::mem::transmute(miniversion)) } #[inline] -pub unsafe fn UnlockFile(hfile: P0, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestounlocklow: u32, nnumberofbytestounlockhigh: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnlockFile(hfile: super::super::Foundation::HANDLE, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestounlocklow: u32, nnumberofbytestounlockhigh: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn UnlockFile(hfile : super::super::Foundation:: HANDLE, dwfileoffsetlow : u32, dwfileoffsethigh : u32, nnumberofbytestounlocklow : u32, nnumberofbytestounlockhigh : u32) -> super::super::Foundation:: BOOL); - UnlockFile(hfile.param().abi(), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(nnumberofbytestounlocklow), core::mem::transmute(nnumberofbytestounlockhigh)).ok() + UnlockFile(core::mem::transmute(hfile), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(nnumberofbytestounlocklow), core::mem::transmute(nnumberofbytestounlockhigh)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn UnlockFileEx(hfile: P0, dwreserved: u32, nnumberofbytestounlocklow: u32, nnumberofbytestounlockhigh: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnlockFileEx(hfile: super::super::Foundation::HANDLE, dwreserved: Option, nnumberofbytestounlocklow: u32, nnumberofbytestounlockhigh: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn UnlockFileEx(hfile : super::super::Foundation:: HANDLE, dwreserved : u32, nnumberofbytestounlocklow : u32, nnumberofbytestounlockhigh : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - UnlockFileEx(hfile.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(nnumberofbytestounlocklow), core::mem::transmute(nnumberofbytestounlockhigh), core::mem::transmute(lpoverlapped)).ok() + UnlockFileEx(core::mem::transmute(hfile), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(nnumberofbytestounlocklow), core::mem::transmute(nnumberofbytestounlockhigh), core::mem::transmute(lpoverlapped)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -3186,7 +2826,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(), core::mem::transmute(provider), core::mem::transmute(enumproc), core::mem::transmute(userdata.unwrap_or(core::ptr::null()))).ok() + WofEnumEntries(volumename.param().abi(), core::mem::transmute(provider), core::mem::transmute(enumproc), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WofFileEnumFiles(volumename: P0, algorithm: u32, enumproc: WofEnumFilesProc, userdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -3194,16 +2834,13 @@ 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(), core::mem::transmute(algorithm), core::mem::transmute(enumproc), core::mem::transmute(userdata.unwrap_or(core::ptr::null()))).ok() + WofFileEnumFiles(volumename.param().abi(), core::mem::transmute(algorithm), core::mem::transmute(enumproc), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WofGetDriverVersion(fileorvolumehandle: P0, provider: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WofGetDriverVersion(fileorvolumehandle: super::super::Foundation::HANDLE, provider: u32) -> windows_core::Result { windows_targets::link!("wofutil.dll" "system" fn WofGetDriverVersion(fileorvolumehandle : super::super::Foundation:: HANDLE, provider : u32, wofversion : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WofGetDriverVersion(fileorvolumehandle.param().abi(), core::mem::transmute(provider), &mut result__).map(|| core::mem::transmute(result__)) + WofGetDriverVersion(core::mem::transmute(fileorvolumehandle), core::mem::transmute(provider), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn WofIsExternalFile(filepath: P0, isexternalfile: Option<*mut super::super::Foundation::BOOL>, provider: Option<*mut u32>, externalfileinfo: Option<*mut core::ffi::c_void>, bufferlength: Option<*mut u32>) -> windows_core::Result<()> @@ -3211,15 +2848,12 @@ 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(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() + WofIsExternalFile(filepath.param().abi(), core::mem::transmute(isexternalfile.unwrap_or(core::mem::zeroed())), core::mem::transmute(provider.unwrap_or(core::mem::zeroed())), core::mem::transmute(externalfileinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WofSetFileDataLocation(filehandle: P0, provider: u32, externalfileinfo: *const core::ffi::c_void, length: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WofSetFileDataLocation(filehandle: super::super::Foundation::HANDLE, provider: u32, externalfileinfo: *const core::ffi::c_void, length: u32) -> windows_core::Result<()> { windows_targets::link!("wofutil.dll" "system" fn WofSetFileDataLocation(filehandle : super::super::Foundation:: HANDLE, provider : u32, externalfileinfo : *const core::ffi::c_void, length : u32) -> windows_core::HRESULT); - WofSetFileDataLocation(filehandle.param().abi(), core::mem::transmute(provider), core::mem::transmute(externalfileinfo), core::mem::transmute(length)).ok() + WofSetFileDataLocation(core::mem::transmute(filehandle), core::mem::transmute(provider), core::mem::transmute(externalfileinfo), core::mem::transmute(length)).ok() } #[inline] pub unsafe fn WofShouldCompressBinaries(volume: P0, algorithm: *mut u32) -> super::super::Foundation::BOOL @@ -3245,7 +2879,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(), core::mem::transmute(datasourceid), core::mem::transmute(enumproc), core::mem::transmute(userdata.unwrap_or(core::ptr::null()))).ok() + WofWimEnumFiles(volumename.param().abi(), core::mem::transmute(datasourceid), core::mem::transmute(enumproc), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WofWimRemoveEntry(volumename: P0, datasourceid: i64) -> windows_core::Result<()> @@ -3293,34 +2927,25 @@ 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(core::mem::transmute(pfimportcallback), core::mem::transmute(pvcallbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pvcontext)) + WriteEncryptedFileRaw(core::mem::transmute(pfimportcallback), core::mem::transmute(pvcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcontext)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WriteFile(hfile: P0, lpbuffer: Option<&[u8]>, lpnumberofbyteswritten: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteFile(hfile: super::super::Foundation::HANDLE, lpbuffer: Option<&[u8]>, lpnumberofbyteswritten: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() + WriteFile(core::mem::transmute(hfile), 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::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WriteFileEx(hfile: P0, lpbuffer: Option<&[u8]>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteFileEx(hfile: super::super::Foundation::HANDLE, lpbuffer: Option<&[u8]>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WriteFileEx(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation:: BOOL); - WriteFileEx(hfile.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(lpoverlapped), core::mem::transmute(lpcompletionroutine)).ok() + WriteFileEx(core::mem::transmute(hfile), 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(lpoverlapped), core::mem::transmute(lpcompletionroutine)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WriteFileGather(hfile: P0, asegmentarray: *const FILE_SEGMENT_ELEMENT, nnumberofbytestowrite: u32, lpreserved: Option<*const u32>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteFileGather(hfile: super::super::Foundation::HANDLE, asegmentarray: *const FILE_SEGMENT_ELEMENT, nnumberofbytestowrite: u32, lpreserved: Option<*const u32>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { 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(), core::mem::transmute(asegmentarray), core::mem::transmute(nnumberofbytestowrite), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), core::mem::transmute(lpoverlapped)).ok() + WriteFileGather(core::mem::transmute(hfile), core::mem::transmute(asegmentarray), core::mem::transmute(nnumberofbytestowrite), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -3329,13 +2954,12 @@ pub unsafe fn WriteLogRestartArea(pvmarshal: *mut core::ffi::c_void, pvrestartbu WriteLogRestartArea(core::mem::transmute(pvmarshal), core::mem::transmute(pvrestartbuffer), core::mem::transmute(cbrestartbuffer), core::mem::transmute(plsnbase), core::mem::transmute(fflags), core::mem::transmute(pcbwritten), core::mem::transmute(plsnnext), core::mem::transmute(poverlapped)).ok() } #[inline] -pub unsafe fn WriteTapemark(hdevice: P0, dwtapemarktype: TAPEMARK_TYPE, dwtapemarkcount: u32, bimmediate: P3) -> u32 +pub unsafe fn WriteTapemark(hdevice: super::super::Foundation::HANDLE, dwtapemarktype: TAPEMARK_TYPE, dwtapemarkcount: u32, bimmediate: P3) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WriteTapemark(hdevice : super::super::Foundation:: HANDLE, dwtapemarktype : TAPEMARK_TYPE, dwtapemarkcount : u32, bimmediate : super::super::Foundation:: BOOL) -> u32); - WriteTapemark(hdevice.param().abi(), core::mem::transmute(dwtapemarktype), core::mem::transmute(dwtapemarkcount), bimmediate.param().abi()) + WriteTapemark(core::mem::transmute(hdevice), core::mem::transmute(dwtapemarktype), core::mem::transmute(dwtapemarkcount), bimmediate.param().abi()) } pub const ACCESS_ALL: SHARE_INFO_PERMISSIONS = SHARE_INFO_PERMISSIONS(32768u32); pub const ACCESS_ATRIB: SHARE_INFO_PERMISSIONS = SHARE_INFO_PERMISSIONS(32u32); @@ -5916,12 +5540,9 @@ impl IDiskQuotaControl { (windows_core::Interface::vtable(self).GetDefaultQuotaLimitText)(windows_core::Interface::as_raw(self), psztext.param().abi(), core::mem::transmute(cchtext)).ok() } #[cfg(feature = "Win32_Security")] - pub unsafe fn AddUserSid(&self, pusersid: P0, fnameresolution: DISKQUOTA_USERNAME_RESOLVE) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn AddUserSid(&self, pusersid: super::super::Security::PSID, fnameresolution: DISKQUOTA_USERNAME_RESOLVE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddUserSid)(windows_core::Interface::as_raw(self), pusersid.param().abi(), core::mem::transmute(fnameresolution), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).AddUserSid)(windows_core::Interface::as_raw(self), core::mem::transmute(pusersid), core::mem::transmute(fnameresolution), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn AddUserName(&self, pszlogonname: P0, fnameresolution: DISKQUOTA_USERNAME_RESOLVE) -> windows_core::Result where @@ -5937,12 +5558,9 @@ impl IDiskQuotaControl { (windows_core::Interface::vtable(self).DeleteUser)(windows_core::Interface::as_raw(self), puser.param().abi()).ok() } #[cfg(feature = "Win32_Security")] - pub unsafe fn FindUserSid(&self, pusersid: P0, fnameresolution: DISKQUOTA_USERNAME_RESOLVE) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn FindUserSid(&self, pusersid: super::super::Security::PSID, fnameresolution: DISKQUOTA_USERNAME_RESOLVE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindUserSid)(windows_core::Interface::as_raw(self), pusersid.param().abi(), core::mem::transmute(fnameresolution), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindUserSid)(windows_core::Interface::as_raw(self), core::mem::transmute(pusersid), core::mem::transmute(fnameresolution), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn FindUserName(&self, pszlogonname: P0) -> windows_core::Result where 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 f611991d28..bebfe386f7 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn CloseIMsgSession(lpmsgsess: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CloseIMsgSession(lpmsgsess: LPMSGSESS) { windows_targets::link!("mapi32.dll" "system" fn CloseIMsgSession(lpmsgsess : LPMSGSESS)); - CloseIMsgSession(lpmsgsess.param().abi()) + CloseIMsgSession(core::mem::transmute(lpmsgsess)) } #[cfg(feature = "Win32_System_AddressBook")] #[inline] @@ -19,14 +16,13 @@ pub unsafe fn MapStorageSCode(stgscode: i32) -> i32 { } #[cfg(all(feature = "Win32_System_AddressBook", feature = "Win32_System_Com_StructuredStorage"))] #[inline] -pub unsafe fn OpenIMsgOnIStg(lpmsgsess: P0, lpallocatebuffer: super::super::System::AddressBook::LPALLOCATEBUFFER, lpallocatemore: super::super::System::AddressBook::LPALLOCATEMORE, lpfreebuffer: super::super::System::AddressBook::LPFREEBUFFER, lpmalloc: P4, lpmapisup: *mut core::ffi::c_void, lpstg: P6, lpfmsgcallrelease: *mut MSGCALLRELEASE, ulcallerdata: u32, ulflags: u32, lppmsg: *mut Option) -> i32 +pub unsafe fn OpenIMsgOnIStg(lpmsgsess: LPMSGSESS, lpallocatebuffer: super::super::System::AddressBook::LPALLOCATEBUFFER, lpallocatemore: super::super::System::AddressBook::LPALLOCATEMORE, lpfreebuffer: super::super::System::AddressBook::LPFREEBUFFER, lpmalloc: P4, lpmapisup: *mut core::ffi::c_void, lpstg: P6, lpfmsgcallrelease: *mut MSGCALLRELEASE, ulcallerdata: u32, ulflags: u32, lppmsg: *mut Option) -> i32 where - P0: windows_core::Param, P4: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn OpenIMsgOnIStg(lpmsgsess : LPMSGSESS, lpallocatebuffer : super::super::System::AddressBook:: LPALLOCATEBUFFER, lpallocatemore : super::super::System::AddressBook:: LPALLOCATEMORE, lpfreebuffer : super::super::System::AddressBook:: LPFREEBUFFER, lpmalloc : * mut core::ffi::c_void, lpmapisup : *mut core::ffi::c_void, lpstg : * mut core::ffi::c_void, lpfmsgcallrelease : *mut MSGCALLRELEASE, ulcallerdata : u32, ulflags : u32, lppmsg : *mut * mut core::ffi::c_void) -> i32); - OpenIMsgOnIStg(lpmsgsess.param().abi(), core::mem::transmute(lpallocatebuffer), core::mem::transmute(lpallocatemore), core::mem::transmute(lpfreebuffer), lpmalloc.param().abi(), core::mem::transmute(lpmapisup), lpstg.param().abi(), core::mem::transmute(lpfmsgcallrelease), core::mem::transmute(ulcallerdata), core::mem::transmute(ulflags), core::mem::transmute(lppmsg)) + OpenIMsgOnIStg(core::mem::transmute(lpmsgsess), core::mem::transmute(lpallocatebuffer), core::mem::transmute(lpallocatemore), core::mem::transmute(lpfreebuffer), lpmalloc.param().abi(), core::mem::transmute(lpmapisup), lpstg.param().abi(), core::mem::transmute(lpfmsgcallrelease), core::mem::transmute(ulcallerdata), core::mem::transmute(ulflags), core::mem::transmute(lppmsg)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1146,21 +1142,15 @@ impl IDiscFormat2Data { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Recorder)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetBufferUnderrunFreeDisabled(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBufferUnderrunFreeDisabled)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetBufferUnderrunFreeDisabled(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBufferUnderrunFreeDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn BufferUnderrunFreeDisabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).BufferUnderrunFreeDisabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPostgapAlreadyInImage(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPostgapAlreadyInImage)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetPostgapAlreadyInImage(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPostgapAlreadyInImage)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn PostgapAlreadyInImage(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1194,21 +1184,15 @@ impl IDiscFormat2Data { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LastWrittenAddressOfPreviousSession)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetForceMediaToBeClosed(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetForceMediaToBeClosed)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetForceMediaToBeClosed(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetForceMediaToBeClosed)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ForceMediaToBeClosed(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ForceMediaToBeClosed)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDisableConsumerDvdCompatibilityMode(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisableConsumerDvdCompatibilityMode)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetDisableConsumerDvdCompatibilityMode(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisableConsumerDvdCompatibilityMode)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn DisableConsumerDvdCompatibilityMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1251,11 +1235,8 @@ impl IDiscFormat2Data { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SupportedWriteSpeedDescriptors)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetForceOverwrite(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetForceOverwrite)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetForceOverwrite(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetForceOverwrite)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ForceOverwrite(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1276,11 +1257,8 @@ impl IDiscFormat2Data { pub unsafe fn CancelWrite(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CancelWrite)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWriteSpeed)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedsectorspersecond), rotationtypeispurecav.param().abi()).ok() + pub unsafe fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWriteSpeed)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedsectorspersecond), core::mem::transmute(rotationtypeispurecav)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1798,11 +1776,8 @@ impl IDiscFormat2Erase { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Recorder)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetFullErase(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFullErase)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetFullErase(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFullErase)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn FullErase(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1960,11 +1935,8 @@ impl IDiscFormat2RawCD { pub unsafe fn ReleaseMedia(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseMedia)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWriteSpeed)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedsectorspersecond), rotationtypeispurecav.param().abi()).ok() + pub unsafe fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWriteSpeed)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedsectorspersecond), core::mem::transmute(rotationtypeispurecav)).ok() } pub unsafe fn SetRecorder(&self, value: P0) -> windows_core::Result<()> where @@ -1976,11 +1948,8 @@ impl IDiscFormat2RawCD { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Recorder)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetBufferUnderrunFreeDisabled(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBufferUnderrunFreeDisabled)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetBufferUnderrunFreeDisabled(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBufferUnderrunFreeDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn BufferUnderrunFreeDisabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2447,11 +2416,8 @@ impl IDiscFormat2TrackAtOnce { pub unsafe fn ReleaseMedia(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseMedia)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWriteSpeed)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedsectorspersecond), rotationtypeispurecav.param().abi()).ok() + pub unsafe fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWriteSpeed)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedsectorspersecond), core::mem::transmute(rotationtypeispurecav)).ok() } pub unsafe fn SetRecorder(&self, value: P0) -> windows_core::Result<()> where @@ -2463,11 +2429,8 @@ impl IDiscFormat2TrackAtOnce { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Recorder)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetBufferUnderrunFreeDisabled(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBufferUnderrunFreeDisabled)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetBufferUnderrunFreeDisabled(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBufferUnderrunFreeDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn BufferUnderrunFreeDisabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2489,11 +2452,8 @@ impl IDiscFormat2TrackAtOnce { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UsedSectorsOnMedia)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDoNotFinalizeMedia(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDoNotFinalizeMedia)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetDoNotFinalizeMedia(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDoNotFinalizeMedia)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn DoNotFinalizeMedia(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3370,7 +3330,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(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() + (windows_core::Interface::vtable(self).GetDisplayNames)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrvendorid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrproductid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrrevision.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetBasePnPID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3595,11 +3555,8 @@ impl IDiscRecorder2 { pub unsafe fn CloseTray(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseTray)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn AcquireExclusiveAccess(&self, force: P0, __midl__idiscrecorder20000: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AcquireExclusiveAccess)(windows_core::Interface::as_raw(self), force.param().abi(), core::mem::transmute_copy(__midl__idiscrecorder20000)).ok() + pub unsafe fn AcquireExclusiveAccess(&self, force: super::super::Foundation::VARIANT_BOOL, __midl__idiscrecorder20000: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AcquireExclusiveAccess)(windows_core::Interface::as_raw(self), core::mem::transmute(force), core::mem::transmute_copy(__midl__idiscrecorder20000)).ok() } pub unsafe fn ReleaseExclusiveAccess(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseExclusiveAccess)(windows_core::Interface::as_raw(self)).ok() @@ -4548,21 +4505,15 @@ impl IFileSystemImage { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).StrictFileSystemCompliance)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetStrictFileSystemCompliance(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStrictFileSystemCompliance)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetStrictFileSystemCompliance(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStrictFileSystemCompliance)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn UseRestrictedCharacterSet(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseRestrictedCharacterSet)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseRestrictedCharacterSet(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseRestrictedCharacterSet)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetUseRestrictedCharacterSet(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseRestrictedCharacterSet)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn FileSystemsToCreate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4668,11 +4619,8 @@ impl IFileSystemImage { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).StageFiles)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetStageFiles(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStageFiles)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetStageFiles(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStageFiles)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn MultisessionInterfaces(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { @@ -5346,11 +5294,8 @@ impl IFileSystemImage3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateRedundantUdfMetadataFiles)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetCreateRedundantUdfMetadataFiles(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCreateRedundantUdfMetadataFiles)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetCreateRedundantUdfMetadataFiles(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCreateRedundantUdfMetadataFiles)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn ProbeSpecificFileSystem(&self, filesystemtoprobe: FsiFileSystems) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5624,11 +5569,8 @@ impl IFsiDirectoryItem { { (windows_core::Interface::vtable(self).AddFile)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(path), filedata.param().abi()).ok() } - pub unsafe fn AddTree(&self, sourcedirectory: &windows_core::BSTR, includebasedirectory: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddTree)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(sourcedirectory), includebasedirectory.param().abi()).ok() + pub unsafe fn AddTree(&self, sourcedirectory: &windows_core::BSTR, includebasedirectory: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddTree)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(sourcedirectory), core::mem::transmute(includebasedirectory)).ok() } pub unsafe fn Add(&self, item: P0) -> windows_core::Result<()> where @@ -5777,11 +5719,8 @@ impl core::ops::Deref for IFsiDirectoryItem2 { windows_core::imp::interface_hierarchy!(IFsiDirectoryItem2, windows_core::IUnknown, super::super::System::Com::IDispatch, IFsiItem, IFsiDirectoryItem); #[cfg(feature = "Win32_System_Com")] impl IFsiDirectoryItem2 { - pub unsafe fn AddTreeWithNamedStreams(&self, sourcedirectory: &windows_core::BSTR, includebasedirectory: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddTreeWithNamedStreams)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(sourcedirectory), includebasedirectory.param().abi()).ok() + pub unsafe fn AddTreeWithNamedStreams(&self, sourcedirectory: &windows_core::BSTR, includebasedirectory: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddTreeWithNamedStreams)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(sourcedirectory), core::mem::transmute(includebasedirectory)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5968,11 +5907,8 @@ impl IFsiFileItem2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsRealTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsRealTime(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsRealTime)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetIsRealTime(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsRealTime)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -6105,11 +6041,8 @@ impl IFsiItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsHidden)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsHidden(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsHidden)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetIsHidden(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsHidden)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn FileSystemName(&self, filesystem: FsiFileSystems) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7046,11 +6979,8 @@ impl IMultisession { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsSupportedOnCurrentMediaState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetInUse(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetInUse)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetInUse(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetInUse)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn InUse(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7685,11 +7615,8 @@ impl IRawCDImageCreator { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).StartOfLeadoutLimit)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDisableGaplessAudio(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisableGaplessAudio)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetDisableGaplessAudio(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisableGaplessAudio)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn DisableGaplessAudio(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8015,11 +7942,8 @@ impl IRawCDImageTrackInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AudioHasPreemphasis)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAudioHasPreemphasis(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAudioHasPreemphasis)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAudioHasPreemphasis(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAudioHasPreemphasis)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn TrackIndexes(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { @@ -8571,11 +8495,8 @@ impl IWriteEngine2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Recorder)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetUseStreamingWrite12(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseStreamingWrite12)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetUseStreamingWrite12(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseStreamingWrite12)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn UseStreamingWrite12(&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 6bea063f36..c7ea064be6 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs @@ -1,15 +1,15 @@ #[inline] -pub unsafe fn FilterAttach(lpfiltername: P0, lpvolumename: P1, lpinstancename: P2, dwcreatedinstancenamelength: u32, lpcreatedinstancename: windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn FilterAttach(lpfiltername: P0, lpvolumename: P1, lpinstancename: P2, dwcreatedinstancenamelength: Option, lpcreatedinstancename: Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("fltlib.dll" "system" fn FilterAttach(lpfiltername : windows_core::PCWSTR, lpvolumename : windows_core::PCWSTR, lpinstancename : windows_core::PCWSTR, dwcreatedinstancenamelength : u32, lpcreatedinstancename : windows_core::PWSTR) -> windows_core::HRESULT); - FilterAttach(lpfiltername.param().abi(), lpvolumename.param().abi(), lpinstancename.param().abi(), core::mem::transmute(dwcreatedinstancenamelength), core::mem::transmute(lpcreatedinstancename)).ok() + FilterAttach(lpfiltername.param().abi(), lpvolumename.param().abi(), lpinstancename.param().abi(), core::mem::transmute(dwcreatedinstancenamelength.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcreatedinstancename.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FilterAttachAtAltitude(lpfiltername: P0, lpvolumename: P1, lpaltitude: P2, lpinstancename: P3, dwcreatedinstancenamelength: u32, lpcreatedinstancename: windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn FilterAttachAtAltitude(lpfiltername: P0, lpvolumename: P1, lpaltitude: P2, lpinstancename: P3, dwcreatedinstancenamelength: Option, lpcreatedinstancename: Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, @@ -17,15 +17,12 @@ where P3: windows_core::Param, { windows_targets::link!("fltlib.dll" "system" fn FilterAttachAtAltitude(lpfiltername : windows_core::PCWSTR, lpvolumename : windows_core::PCWSTR, lpaltitude : windows_core::PCWSTR, lpinstancename : windows_core::PCWSTR, dwcreatedinstancenamelength : u32, lpcreatedinstancename : windows_core::PWSTR) -> windows_core::HRESULT); - FilterAttachAtAltitude(lpfiltername.param().abi(), lpvolumename.param().abi(), lpaltitude.param().abi(), lpinstancename.param().abi(), core::mem::transmute(dwcreatedinstancenamelength), core::mem::transmute(lpcreatedinstancename)).ok() + FilterAttachAtAltitude(lpfiltername.param().abi(), lpvolumename.param().abi(), lpaltitude.param().abi(), lpinstancename.param().abi(), core::mem::transmute(dwcreatedinstancenamelength.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcreatedinstancename.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FilterClose(hfilter: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterClose(hfilter: HFILTER) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterClose(hfilter : HFILTER) -> windows_core::HRESULT); - FilterClose(hfilter.param().abi()).ok() + FilterClose(core::mem::transmute(hfilter)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -35,7 +32,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(), core::mem::transmute(dwoptions), core::mem::transmute(lpcontext.unwrap_or(core::ptr::null())), core::mem::transmute(wsizeofcontext), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + FilterConnectCommunicationPort(lpportname.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(wsizeofcontext), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn FilterCreate(lpfiltername: P0) -> windows_core::Result @@ -57,12 +54,9 @@ where FilterDetach(lpfiltername.param().abi(), lpvolumename.param().abi(), lpinstancename.param().abi()).ok() } #[inline] -pub unsafe fn FilterFindClose(hfilterfind: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterFindClose(hfilterfind: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterFindClose(hfilterfind : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - FilterFindClose(hfilterfind.param().abi()).ok() + FilterFindClose(core::mem::transmute(hfilterfind)).ok() } #[inline] pub unsafe fn FilterFindFirst(dwinformationclass: FILTER_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32, lpfilterfind: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -70,12 +64,9 @@ pub unsafe fn FilterFindFirst(dwinformationclass: FILTER_INFORMATION_CLASS, lpbu FilterFindFirst(core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned), core::mem::transmute(lpfilterfind)).ok() } #[inline] -pub unsafe fn FilterFindNext(hfilterfind: P0, dwinformationclass: FILTER_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterFindNext(hfilterfind: super::super::Foundation::HANDLE, dwinformationclass: FILTER_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterFindNext(hfilterfind : super::super::Foundation:: HANDLE, dwinformationclass : FILTER_INFORMATION_CLASS, lpbuffer : *mut core::ffi::c_void, dwbuffersize : u32, lpbytesreturned : *mut u32) -> windows_core::HRESULT); - FilterFindNext(hfilterfind.param().abi(), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() + FilterFindNext(core::mem::transmute(hfilterfind), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() } #[inline] pub unsafe fn FilterGetDosName(lpvolumename: P0, lpdosname: &mut [u16]) -> windows_core::Result<()> @@ -86,29 +77,20 @@ where FilterGetDosName(lpvolumename.param().abi(), core::mem::transmute(lpdosname.as_ptr()), lpdosname.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn FilterGetInformation(hfilter: P0, dwinformationclass: FILTER_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterGetInformation(hfilter: HFILTER, dwinformationclass: FILTER_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterGetInformation(hfilter : HFILTER, dwinformationclass : FILTER_INFORMATION_CLASS, lpbuffer : *mut core::ffi::c_void, dwbuffersize : u32, lpbytesreturned : *mut u32) -> windows_core::HRESULT); - FilterGetInformation(hfilter.param().abi(), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() + FilterGetInformation(core::mem::transmute(hfilter), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn FilterGetMessage(hport: P0, lpmessagebuffer: *mut FILTER_MESSAGE_HEADER, dwmessagebuffersize: u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterGetMessage(hport: super::super::Foundation::HANDLE, lpmessagebuffer: *mut FILTER_MESSAGE_HEADER, dwmessagebuffersize: u32, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpmessagebuffer), core::mem::transmute(dwmessagebuffersize), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() + FilterGetMessage(core::mem::transmute(hport), core::mem::transmute(lpmessagebuffer), core::mem::transmute(dwmessagebuffersize), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FilterInstanceClose(hinstance: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterInstanceClose(hinstance: HFILTER_INSTANCE) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterInstanceClose(hinstance : HFILTER_INSTANCE) -> windows_core::HRESULT); - FilterInstanceClose(hinstance.param().abi()).ok() + FilterInstanceClose(core::mem::transmute(hinstance)).ok() } #[inline] pub unsafe fn FilterInstanceCreate(lpfiltername: P0, lpvolumename: P1, lpinstancename: P2) -> windows_core::Result @@ -122,12 +104,9 @@ where FilterInstanceCreate(lpfiltername.param().abi(), lpvolumename.param().abi(), lpinstancename.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn FilterInstanceFindClose(hfilterinstancefind: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterInstanceFindClose(hfilterinstancefind: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterInstanceFindClose(hfilterinstancefind : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - FilterInstanceFindClose(hfilterinstancefind.param().abi()).ok() + FilterInstanceFindClose(core::mem::transmute(hfilterinstancefind)).ok() } #[inline] pub unsafe fn FilterInstanceFindFirst(lpfiltername: P0, dwinformationclass: INSTANCE_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32, lpfilterinstancefind: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> @@ -138,20 +117,14 @@ where FilterInstanceFindFirst(lpfiltername.param().abi(), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned), core::mem::transmute(lpfilterinstancefind)).ok() } #[inline] -pub unsafe fn FilterInstanceFindNext(hfilterinstancefind: P0, dwinformationclass: INSTANCE_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterInstanceFindNext(hfilterinstancefind: super::super::Foundation::HANDLE, dwinformationclass: INSTANCE_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterInstanceFindNext(hfilterinstancefind : super::super::Foundation:: HANDLE, dwinformationclass : INSTANCE_INFORMATION_CLASS, lpbuffer : *mut core::ffi::c_void, dwbuffersize : u32, lpbytesreturned : *mut u32) -> windows_core::HRESULT); - FilterInstanceFindNext(hfilterinstancefind.param().abi(), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() + FilterInstanceFindNext(core::mem::transmute(hfilterinstancefind), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() } #[inline] -pub unsafe fn FilterInstanceGetInformation(hinstance: P0, dwinformationclass: INSTANCE_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterInstanceGetInformation(hinstance: HFILTER_INSTANCE, dwinformationclass: INSTANCE_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterInstanceGetInformation(hinstance : HFILTER_INSTANCE, dwinformationclass : INSTANCE_INFORMATION_CLASS, lpbuffer : *mut core::ffi::c_void, dwbuffersize : u32, lpbytesreturned : *mut u32) -> windows_core::HRESULT); - FilterInstanceGetInformation(hinstance.param().abi(), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() + FilterInstanceGetInformation(core::mem::transmute(hinstance), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() } #[inline] pub unsafe fn FilterLoad(lpfiltername: P0) -> windows_core::Result<()> @@ -162,20 +135,14 @@ where FilterLoad(lpfiltername.param().abi()).ok() } #[inline] -pub unsafe fn FilterReplyMessage(hport: P0, lpreplybuffer: *const FILTER_REPLY_HEADER, dwreplybuffersize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterReplyMessage(hport: super::super::Foundation::HANDLE, lpreplybuffer: *const FILTER_REPLY_HEADER, dwreplybuffersize: u32) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterReplyMessage(hport : super::super::Foundation:: HANDLE, lpreplybuffer : *const FILTER_REPLY_HEADER, dwreplybuffersize : u32) -> windows_core::HRESULT); - FilterReplyMessage(hport.param().abi(), core::mem::transmute(lpreplybuffer), core::mem::transmute(dwreplybuffersize)).ok() + FilterReplyMessage(core::mem::transmute(hport), core::mem::transmute(lpreplybuffer), core::mem::transmute(dwreplybuffersize)).ok() } #[inline] -pub unsafe fn FilterSendMessage(hport: P0, lpinbuffer: *const core::ffi::c_void, dwinbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, dwoutbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterSendMessage(hport: super::super::Foundation::HANDLE, lpinbuffer: *const core::ffi::c_void, dwinbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, dwoutbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(lpinbuffer), core::mem::transmute(dwinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwoutbuffersize), core::mem::transmute(lpbytesreturned)).ok() + FilterSendMessage(core::mem::transmute(hport), core::mem::transmute(lpinbuffer), core::mem::transmute(dwinbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoutbuffersize), core::mem::transmute(lpbytesreturned)).ok() } #[inline] pub unsafe fn FilterUnload(lpfiltername: P0) -> windows_core::Result<()> @@ -186,12 +153,9 @@ where FilterUnload(lpfiltername.param().abi()).ok() } #[inline] -pub unsafe fn FilterVolumeFindClose(hvolumefind: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterVolumeFindClose(hvolumefind: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterVolumeFindClose(hvolumefind : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - FilterVolumeFindClose(hvolumefind.param().abi()).ok() + FilterVolumeFindClose(core::mem::transmute(hvolumefind)).ok() } #[inline] pub unsafe fn FilterVolumeFindFirst(dwinformationclass: FILTER_VOLUME_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32, lpvolumefind: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -199,20 +163,14 @@ pub unsafe fn FilterVolumeFindFirst(dwinformationclass: FILTER_VOLUME_INFORMATIO FilterVolumeFindFirst(core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned), core::mem::transmute(lpvolumefind)).ok() } #[inline] -pub unsafe fn FilterVolumeFindNext(hvolumefind: P0, dwinformationclass: FILTER_VOLUME_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterVolumeFindNext(hvolumefind: super::super::Foundation::HANDLE, dwinformationclass: FILTER_VOLUME_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterVolumeFindNext(hvolumefind : super::super::Foundation:: HANDLE, dwinformationclass : FILTER_VOLUME_INFORMATION_CLASS, lpbuffer : *mut core::ffi::c_void, dwbuffersize : u32, lpbytesreturned : *mut u32) -> windows_core::HRESULT); - FilterVolumeFindNext(hvolumefind.param().abi(), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() + FilterVolumeFindNext(core::mem::transmute(hvolumefind), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() } #[inline] -pub unsafe fn FilterVolumeInstanceFindClose(hvolumeinstancefind: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterVolumeInstanceFindClose(hvolumeinstancefind: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterVolumeInstanceFindClose(hvolumeinstancefind : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - FilterVolumeInstanceFindClose(hvolumeinstancefind.param().abi()).ok() + FilterVolumeInstanceFindClose(core::mem::transmute(hvolumeinstancefind)).ok() } #[inline] pub unsafe fn FilterVolumeInstanceFindFirst(lpvolumename: P0, dwinformationclass: INSTANCE_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32, lpvolumeinstancefind: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> @@ -223,12 +181,9 @@ where FilterVolumeInstanceFindFirst(lpvolumename.param().abi(), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned), core::mem::transmute(lpvolumeinstancefind)).ok() } #[inline] -pub unsafe fn FilterVolumeInstanceFindNext(hvolumeinstancefind: P0, dwinformationclass: INSTANCE_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FilterVolumeInstanceFindNext(hvolumeinstancefind: super::super::Foundation::HANDLE, dwinformationclass: INSTANCE_INFORMATION_CLASS, lpbuffer: *mut core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("fltlib.dll" "system" fn FilterVolumeInstanceFindNext(hvolumeinstancefind : super::super::Foundation:: HANDLE, dwinformationclass : INSTANCE_INFORMATION_CLASS, lpbuffer : *mut core::ffi::c_void, dwbuffersize : u32, lpbytesreturned : *mut u32) -> windows_core::HRESULT); - FilterVolumeInstanceFindNext(hvolumeinstancefind.param().abi(), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() + FilterVolumeInstanceFindNext(core::mem::transmute(hvolumeinstancefind), core::mem::transmute(dwinformationclass), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(lpbytesreturned)).ok() } #[repr(C)] #[derive(Clone, Copy)] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs index 178e99a316..f5345bcdba 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs @@ -374,24 +374,24 @@ pub unsafe fn ReportActiveIScsiTargetMappingsW(buffersize: *mut u32, mappingcoun ReportActiveIScsiTargetMappingsW(core::mem::transmute(buffersize), core::mem::transmute(mappingcount), core::mem::transmute(mappings)) } #[inline] -pub unsafe fn ReportISNSServerListA(buffersizeinchar: *mut u32, buffer: windows_core::PSTR) -> u32 { +pub unsafe fn ReportISNSServerListA(buffersizeinchar: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportISNSServerListA(buffersizeinchar : *mut u32, buffer : windows_core::PSTR) -> u32); - ReportISNSServerListA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer)) + ReportISNSServerListA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportISNSServerListW(buffersizeinchar: *mut u32, buffer: windows_core::PWSTR) -> u32 { +pub unsafe fn ReportISNSServerListW(buffersizeinchar: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportISNSServerListW(buffersizeinchar : *mut u32, buffer : windows_core::PWSTR) -> u32); - ReportISNSServerListW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer)) + ReportISNSServerListW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportIScsiInitiatorListA(buffersize: *mut u32, buffer: windows_core::PSTR) -> u32 { +pub unsafe fn ReportIScsiInitiatorListA(buffersize: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiInitiatorListA(buffersize : *mut u32, buffer : windows_core::PSTR) -> u32); - ReportIScsiInitiatorListA(core::mem::transmute(buffersize), core::mem::transmute(buffer)) + ReportIScsiInitiatorListA(core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportIScsiInitiatorListW(buffersize: *mut u32, buffer: windows_core::PWSTR) -> u32 { +pub unsafe fn ReportIScsiInitiatorListW(buffersize: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiInitiatorListW(buffersize : *mut u32, buffer : windows_core::PWSTR) -> u32); - ReportIScsiInitiatorListW(core::mem::transmute(buffersize), core::mem::transmute(buffer)) + ReportIScsiInitiatorListW(core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ReportIScsiPersistentLoginsA(count: *mut u32, persistentlogininfo: *mut PERSISTENT_ISCSI_LOGIN_INFOA, buffersizeinbytes: *mut u32) -> u32 { @@ -442,40 +442,40 @@ where ReportIScsiTargetPortalsW(initiatorname.param().abi(), targetname.param().abi(), core::mem::transmute(targetportaltag), core::mem::transmute(elementcount), core::mem::transmute(portals)) } #[inline] -pub unsafe fn ReportIScsiTargetsA(forceupdate: P0, buffersize: *mut u32, buffer: windows_core::PSTR) -> u32 +pub unsafe fn ReportIScsiTargetsA(forceupdate: P0, buffersize: *mut u32, buffer: Option) -> u32 where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiTargetsA(forceupdate : super::super::Foundation:: BOOLEAN, buffersize : *mut u32, buffer : windows_core::PSTR) -> u32); - ReportIScsiTargetsA(forceupdate.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer)) + ReportIScsiTargetsA(forceupdate.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportIScsiTargetsW(forceupdate: P0, buffersize: *mut u32, buffer: windows_core::PWSTR) -> u32 +pub unsafe fn ReportIScsiTargetsW(forceupdate: P0, buffersize: *mut u32, buffer: Option) -> u32 where P0: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiTargetsW(forceupdate : super::super::Foundation:: BOOLEAN, buffersize : *mut u32, buffer : windows_core::PWSTR) -> u32); - ReportIScsiTargetsW(forceupdate.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer)) + ReportIScsiTargetsW(forceupdate.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportPersistentIScsiDevicesA(buffersizeinchar: *mut u32, buffer: windows_core::PSTR) -> u32 { +pub unsafe fn ReportPersistentIScsiDevicesA(buffersizeinchar: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportPersistentIScsiDevicesA(buffersizeinchar : *mut u32, buffer : windows_core::PSTR) -> u32); - ReportPersistentIScsiDevicesA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer)) + ReportPersistentIScsiDevicesA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportPersistentIScsiDevicesW(buffersizeinchar: *mut u32, buffer: windows_core::PWSTR) -> u32 { +pub unsafe fn ReportPersistentIScsiDevicesW(buffersizeinchar: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportPersistentIScsiDevicesW(buffersizeinchar : *mut u32, buffer : windows_core::PWSTR) -> u32); - ReportPersistentIScsiDevicesW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer)) + ReportPersistentIScsiDevicesW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportRadiusServerListA(buffersizeinchar: *mut u32, buffer: windows_core::PSTR) -> u32 { +pub unsafe fn ReportRadiusServerListA(buffersizeinchar: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportRadiusServerListA(buffersizeinchar : *mut u32, buffer : windows_core::PSTR) -> u32); - ReportRadiusServerListA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer)) + ReportRadiusServerListA(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportRadiusServerListW(buffersizeinchar: *mut u32, buffer: windows_core::PWSTR) -> u32 { +pub unsafe fn ReportRadiusServerListW(buffersizeinchar: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportRadiusServerListW(buffersizeinchar : *mut u32, buffer : windows_core::PWSTR) -> u32); - ReportRadiusServerListW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer)) + ReportRadiusServerListW(core::mem::transmute(buffersizeinchar), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SendScsiInquiry(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, lun: u64, evpdcmddt: u8, pagecode: u8, scsistatus: *mut u8, responsesize: *mut u32, responsebuffer: *mut u8, sensesize: *mut u32, sensebuffer: *mut u8) -> u32 { 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 74979d59a3..6b11ae56bc 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs @@ -1,80 +1,54 @@ #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetAddColumnA(sesid: P0, tableid: P1, szcolumnname: *const i8, pcolumndef: *const JET_COLUMNDEF, pvdefault: Option<*const core::ffi::c_void>, cbdefault: u32, pcolumnid: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetAddColumnA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szcolumnname: *const i8, pcolumndef: *const JET_COLUMNDEF, pvdefault: Option<*const core::ffi::c_void>, cbdefault: u32, pcolumnid: Option<*mut u32>) -> i32 { 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(), core::mem::transmute(szcolumnname), core::mem::transmute(pcolumndef), core::mem::transmute(pvdefault.unwrap_or(core::ptr::null())), core::mem::transmute(cbdefault), core::mem::transmute(pcolumnid.unwrap_or(core::ptr::null_mut()))) + JetAddColumnA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szcolumnname), core::mem::transmute(pcolumndef), core::mem::transmute(pvdefault.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdefault), core::mem::transmute(pcolumnid.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetAddColumnW(sesid: P0, tableid: P1, szcolumnname: *const u16, pcolumndef: *const JET_COLUMNDEF, pvdefault: Option<*const core::ffi::c_void>, cbdefault: u32, pcolumnid: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetAddColumnW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szcolumnname: *const u16, pcolumndef: *const JET_COLUMNDEF, pvdefault: Option<*const core::ffi::c_void>, cbdefault: u32, pcolumnid: Option<*mut u32>) -> i32 { 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(), core::mem::transmute(szcolumnname), core::mem::transmute(pcolumndef), core::mem::transmute(pvdefault.unwrap_or(core::ptr::null())), core::mem::transmute(cbdefault), core::mem::transmute(pcolumnid.unwrap_or(core::ptr::null_mut()))) + JetAddColumnW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szcolumnname), core::mem::transmute(pcolumndef), core::mem::transmute(pvdefault.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdefault), core::mem::transmute(pcolumnid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetAttachDatabase2A(sesid: P0, szfilename: *const i8, cpgdatabasesizemax: u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetAttachDatabase2A(sesid: JET_SESID, szfilename: *const i8, cpgdatabasesizemax: u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetAttachDatabase2A(sesid : JET_SESID, szfilename : *const i8, cpgdatabasesizemax : u32, grbit : u32) -> i32); - JetAttachDatabase2A(sesid.param().abi(), core::mem::transmute(szfilename), core::mem::transmute(cpgdatabasesizemax), core::mem::transmute(grbit)) + JetAttachDatabase2A(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(cpgdatabasesizemax), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetAttachDatabase2W(sesid: P0, szfilename: *const u16, cpgdatabasesizemax: u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetAttachDatabase2W(sesid: JET_SESID, szfilename: *const u16, cpgdatabasesizemax: u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetAttachDatabase2W(sesid : JET_SESID, szfilename : *const u16, cpgdatabasesizemax : u32, grbit : u32) -> i32); - JetAttachDatabase2W(sesid.param().abi(), core::mem::transmute(szfilename), core::mem::transmute(cpgdatabasesizemax), core::mem::transmute(grbit)) + JetAttachDatabase2W(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(cpgdatabasesizemax), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetAttachDatabaseA(sesid: P0, szfilename: *const i8, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetAttachDatabaseA(sesid: JET_SESID, szfilename: *const i8, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetAttachDatabaseA(sesid : JET_SESID, szfilename : *const i8, grbit : u32) -> i32); - JetAttachDatabaseA(sesid.param().abi(), core::mem::transmute(szfilename), core::mem::transmute(grbit)) + JetAttachDatabaseA(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetAttachDatabaseW(sesid: P0, szfilename: *const u16, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetAttachDatabaseW(sesid: JET_SESID, szfilename: *const u16, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetAttachDatabaseW(sesid : JET_SESID, szfilename : *const u16, grbit : u32) -> i32); - JetAttachDatabaseW(sesid.param().abi(), core::mem::transmute(szfilename), core::mem::transmute(grbit)) + JetAttachDatabaseW(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetBackupA(szbackuppath: *const i8, grbit: u32, pfnstatus: JET_PFNSTATUS) -> i32 { +pub unsafe fn JetBackupA(szbackuppath: *const i8, grbit: u32, pfnstatus: Option) -> i32 { windows_targets::link!("esent.dll" "system" fn JetBackupA(szbackuppath : *const i8, grbit : u32, pfnstatus : JET_PFNSTATUS) -> i32); - JetBackupA(core::mem::transmute(szbackuppath), core::mem::transmute(grbit), core::mem::transmute(pfnstatus)) + JetBackupA(core::mem::transmute(szbackuppath), core::mem::transmute(grbit), core::mem::transmute(pfnstatus.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetBackupInstanceA(instance: P0, szbackuppath: *const i8, grbit: u32, pfnstatus: JET_PFNSTATUS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetBackupInstanceA(instance: JET_INSTANCE, szbackuppath: *const i8, grbit: u32, pfnstatus: Option) -> i32 { windows_targets::link!("esent.dll" "system" fn JetBackupInstanceA(instance : JET_INSTANCE, szbackuppath : *const i8, grbit : u32, pfnstatus : JET_PFNSTATUS) -> i32); - JetBackupInstanceA(instance.param().abi(), core::mem::transmute(szbackuppath), core::mem::transmute(grbit), core::mem::transmute(pfnstatus)) + JetBackupInstanceA(core::mem::transmute(instance), core::mem::transmute(szbackuppath), core::mem::transmute(grbit), core::mem::transmute(pfnstatus.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetBackupInstanceW(instance: P0, szbackuppath: *const u16, grbit: u32, pfnstatus: JET_PFNSTATUS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetBackupInstanceW(instance: JET_INSTANCE, szbackuppath: *const u16, grbit: u32, pfnstatus: Option) -> i32 { windows_targets::link!("esent.dll" "system" fn JetBackupInstanceW(instance : JET_INSTANCE, szbackuppath : *const u16, grbit : u32, pfnstatus : JET_PFNSTATUS) -> i32); - JetBackupInstanceW(instance.param().abi(), core::mem::transmute(szbackuppath), core::mem::transmute(grbit), core::mem::transmute(pfnstatus)) + JetBackupInstanceW(core::mem::transmute(instance), core::mem::transmute(szbackuppath), core::mem::transmute(grbit), core::mem::transmute(pfnstatus.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetBackupW(szbackuppath: *const u16, grbit: u32, pfnstatus: JET_PFNSTATUS) -> i32 { +pub unsafe fn JetBackupW(szbackuppath: *const u16, grbit: u32, pfnstatus: Option) -> i32 { windows_targets::link!("esent.dll" "system" fn JetBackupW(szbackuppath : *const u16, grbit : u32, pfnstatus : JET_PFNSTATUS) -> i32); - JetBackupW(core::mem::transmute(szbackuppath), core::mem::transmute(grbit), core::mem::transmute(pfnstatus)) + JetBackupW(core::mem::transmute(szbackuppath), core::mem::transmute(grbit), core::mem::transmute(pfnstatus.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn JetBeginExternalBackup(grbit: u32) -> i32 { @@ -82,131 +56,83 @@ pub unsafe fn JetBeginExternalBackup(grbit: u32) -> i32 { JetBeginExternalBackup(core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetBeginExternalBackupInstance(instance: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetBeginExternalBackupInstance(instance: JET_INSTANCE, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetBeginExternalBackupInstance(instance : JET_INSTANCE, grbit : u32) -> i32); - JetBeginExternalBackupInstance(instance.param().abi(), core::mem::transmute(grbit)) + JetBeginExternalBackupInstance(core::mem::transmute(instance), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetBeginSessionA(instance: P0, psesid: *mut JET_SESID, szusername: Option<*const i8>, szpassword: Option<*const i8>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetBeginSessionA(instance: JET_INSTANCE, psesid: *mut JET_SESID, szusername: Option<*const i8>, szpassword: Option<*const i8>) -> i32 { 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(), core::mem::transmute(psesid), core::mem::transmute(szusername.unwrap_or(core::ptr::null())), core::mem::transmute(szpassword.unwrap_or(core::ptr::null()))) + JetBeginSessionA(core::mem::transmute(instance), core::mem::transmute(psesid), core::mem::transmute(szusername.unwrap_or(core::mem::zeroed())), core::mem::transmute(szpassword.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetBeginSessionW(instance: P0, psesid: *mut JET_SESID, szusername: Option<*const u16>, szpassword: Option<*const u16>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetBeginSessionW(instance: JET_INSTANCE, psesid: *mut JET_SESID, szusername: Option<*const u16>, szpassword: Option<*const u16>) -> i32 { 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(), core::mem::transmute(psesid), core::mem::transmute(szusername.unwrap_or(core::ptr::null())), core::mem::transmute(szpassword.unwrap_or(core::ptr::null()))) + JetBeginSessionW(core::mem::transmute(instance), core::mem::transmute(psesid), core::mem::transmute(szusername.unwrap_or(core::mem::zeroed())), core::mem::transmute(szpassword.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetBeginTransaction(sesid: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetBeginTransaction(sesid: JET_SESID) -> i32 { windows_targets::link!("esent.dll" "system" fn JetBeginTransaction(sesid : JET_SESID) -> i32); - JetBeginTransaction(sesid.param().abi()) + JetBeginTransaction(core::mem::transmute(sesid)) } #[inline] -pub unsafe fn JetBeginTransaction2(sesid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetBeginTransaction2(sesid: JET_SESID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetBeginTransaction2(sesid : JET_SESID, grbit : u32) -> i32); - JetBeginTransaction2(sesid.param().abi(), core::mem::transmute(grbit)) + JetBeginTransaction2(core::mem::transmute(sesid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetBeginTransaction3(sesid: P0, trxid: i64, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetBeginTransaction3(sesid: JET_SESID, trxid: i64, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetBeginTransaction3(sesid : JET_SESID, trxid : i64, grbit : u32) -> i32); - JetBeginTransaction3(sesid.param().abi(), core::mem::transmute(trxid), core::mem::transmute(grbit)) + JetBeginTransaction3(core::mem::transmute(sesid), core::mem::transmute(trxid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetCloseDatabase(sesid: P0, dbid: u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCloseDatabase(sesid: JET_SESID, dbid: u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCloseDatabase(sesid : JET_SESID, dbid : u32, grbit : u32) -> i32); - JetCloseDatabase(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(grbit)) + JetCloseDatabase(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCloseFile(hffile: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCloseFile(hffile: super::StructuredStorage::JET_HANDLE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCloseFile(hffile : super::StructuredStorage:: JET_HANDLE) -> i32); - JetCloseFile(hffile.param().abi()) + JetCloseFile(core::mem::transmute(hffile)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCloseFileInstance(instance: P0, hffile: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCloseFileInstance(instance: JET_INSTANCE, hffile: super::StructuredStorage::JET_HANDLE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCloseFileInstance(instance : JET_INSTANCE, hffile : super::StructuredStorage:: JET_HANDLE) -> i32); - JetCloseFileInstance(instance.param().abi(), hffile.param().abi()) + JetCloseFileInstance(core::mem::transmute(instance), core::mem::transmute(hffile)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCloseTable(sesid: P0, tableid: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCloseTable(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCloseTable(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID) -> i32); - JetCloseTable(sesid.param().abi(), tableid.param().abi()) + JetCloseTable(core::mem::transmute(sesid), core::mem::transmute(tableid)) } #[inline] -pub unsafe fn JetCommitTransaction(sesid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCommitTransaction(sesid: JET_SESID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCommitTransaction(sesid : JET_SESID, grbit : u32) -> i32); - JetCommitTransaction(sesid.param().abi(), core::mem::transmute(grbit)) + JetCommitTransaction(core::mem::transmute(sesid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetCommitTransaction2(sesid: P0, grbit: u32, cmsecdurablecommit: u32, pcommitid: Option<*mut JET_COMMIT_ID>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCommitTransaction2(sesid: JET_SESID, grbit: u32, cmsecdurablecommit: u32, pcommitid: Option<*mut JET_COMMIT_ID>) -> i32 { 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(), core::mem::transmute(grbit), core::mem::transmute(cmsecdurablecommit), core::mem::transmute(pcommitid.unwrap_or(core::ptr::null_mut()))) + JetCommitTransaction2(core::mem::transmute(sesid), core::mem::transmute(grbit), core::mem::transmute(cmsecdurablecommit), core::mem::transmute(pcommitid.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCompactA(sesid: JET_SESID, szdatabasesrc: *const i8, szdatabasedest: *const i8, pfnstatus: JET_PFNSTATUS, pconvert: Option<*const JET_CONVERT_A>, grbit: u32) -> i32 { 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(), core::mem::transmute(szdatabasesrc), core::mem::transmute(szdatabasedest), core::mem::transmute(pfnstatus), core::mem::transmute(pconvert.unwrap_or(core::ptr::null())), core::mem::transmute(grbit)) + JetCompactA(core::mem::transmute(sesid), core::mem::transmute(szdatabasesrc), core::mem::transmute(szdatabasedest), core::mem::transmute(pfnstatus), core::mem::transmute(pconvert.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCompactW(sesid: JET_SESID, szdatabasesrc: *const u16, szdatabasedest: *const u16, pfnstatus: JET_PFNSTATUS, pconvert: Option<*const JET_CONVERT_W>, grbit: u32) -> i32 { 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(), core::mem::transmute(szdatabasesrc), core::mem::transmute(szdatabasedest), core::mem::transmute(pfnstatus), core::mem::transmute(pconvert.unwrap_or(core::ptr::null())), core::mem::transmute(grbit)) + JetCompactW(core::mem::transmute(sesid), core::mem::transmute(szdatabasesrc), core::mem::transmute(szdatabasedest), core::mem::transmute(pfnstatus), core::mem::transmute(pconvert.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetComputeStats(sesid: P0, tableid: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetComputeStats(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID) -> i32 { windows_targets::link!("esent.dll" "system" fn JetComputeStats(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID) -> i32); - JetComputeStats(sesid.param().abi(), tableid.param().abi()) + JetComputeStats(core::mem::transmute(sesid), core::mem::transmute(tableid)) } #[inline] pub unsafe fn JetConfigureProcessForCrashDump(grbit: u32) -> i32 { @@ -214,427 +140,284 @@ pub unsafe fn JetConfigureProcessForCrashDump(grbit: u32) -> i32 { JetConfigureProcessForCrashDump(core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetCreateDatabase2A(sesid: P0, szfilename: *const i8, cpgdatabasesizemax: u32, pdbid: *mut u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateDatabase2A(sesid: JET_SESID, szfilename: *const i8, cpgdatabasesizemax: u32, pdbid: *mut u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateDatabase2A(sesid : JET_SESID, szfilename : *const i8, cpgdatabasesizemax : u32, pdbid : *mut u32, grbit : u32) -> i32); - JetCreateDatabase2A(sesid.param().abi(), core::mem::transmute(szfilename), core::mem::transmute(cpgdatabasesizemax), core::mem::transmute(pdbid), core::mem::transmute(grbit)) + JetCreateDatabase2A(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(cpgdatabasesizemax), core::mem::transmute(pdbid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetCreateDatabase2W(sesid: P0, szfilename: *const u16, cpgdatabasesizemax: u32, pdbid: *mut u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateDatabase2W(sesid: JET_SESID, szfilename: *const u16, cpgdatabasesizemax: u32, pdbid: *mut u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateDatabase2W(sesid : JET_SESID, szfilename : *const u16, cpgdatabasesizemax : u32, pdbid : *mut u32, grbit : u32) -> i32); - JetCreateDatabase2W(sesid.param().abi(), core::mem::transmute(szfilename), core::mem::transmute(cpgdatabasesizemax), core::mem::transmute(pdbid), core::mem::transmute(grbit)) + JetCreateDatabase2W(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(cpgdatabasesizemax), core::mem::transmute(pdbid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetCreateDatabaseA(sesid: P0, szfilename: *const i8, szconnect: Option<*const i8>, pdbid: *mut u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateDatabaseA(sesid: JET_SESID, szfilename: *const i8, szconnect: Option<*const i8>, pdbid: *mut u32, grbit: u32) -> i32 { 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(), core::mem::transmute(szfilename), core::mem::transmute(szconnect.unwrap_or(core::ptr::null())), core::mem::transmute(pdbid), core::mem::transmute(grbit)) + JetCreateDatabaseA(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(szconnect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdbid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetCreateDatabaseW(sesid: P0, szfilename: *const u16, szconnect: Option<*const u16>, pdbid: *mut u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateDatabaseW(sesid: JET_SESID, szfilename: *const u16, szconnect: Option<*const u16>, pdbid: *mut u32, grbit: u32) -> i32 { 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(), core::mem::transmute(szfilename), core::mem::transmute(szconnect.unwrap_or(core::ptr::null())), core::mem::transmute(pdbid), core::mem::transmute(grbit)) + JetCreateDatabaseW(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(szconnect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdbid), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateIndex2A(sesid: P0, tableid: P1, pindexcreate: &[JET_INDEXCREATE_A]) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCreateIndex2A(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pindexcreate: &[JET_INDEXCREATE_A]) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateIndex2A(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE_A, cindexcreate : u32) -> i32); - JetCreateIndex2A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) + JetCreateIndex2A(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateIndex2W(sesid: P0, tableid: P1, pindexcreate: &[JET_INDEXCREATE_W]) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCreateIndex2W(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pindexcreate: &[JET_INDEXCREATE_W]) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateIndex2W(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE_W, cindexcreate : u32) -> i32); - JetCreateIndex2W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) + JetCreateIndex2W(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateIndex3A(sesid: P0, tableid: P1, pindexcreate: &[JET_INDEXCREATE2_A]) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCreateIndex3A(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pindexcreate: &[JET_INDEXCREATE2_A]) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateIndex3A(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE2_A, cindexcreate : u32) -> i32); - JetCreateIndex3A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) + JetCreateIndex3A(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateIndex3W(sesid: P0, tableid: P1, pindexcreate: &[JET_INDEXCREATE2_W]) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCreateIndex3W(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pindexcreate: &[JET_INDEXCREATE2_W]) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateIndex3W(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE2_W, cindexcreate : u32) -> i32); - JetCreateIndex3W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) + JetCreateIndex3W(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateIndex4A(sesid: P0, tableid: P1, pindexcreate: &[JET_INDEXCREATE3_A]) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCreateIndex4A(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pindexcreate: &[JET_INDEXCREATE3_A]) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateIndex4A(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE3_A, cindexcreate : u32) -> i32); - JetCreateIndex4A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) + JetCreateIndex4A(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateIndex4W(sesid: P0, tableid: P1, pindexcreate: &[JET_INDEXCREATE3_W]) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCreateIndex4W(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pindexcreate: &[JET_INDEXCREATE3_W]) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateIndex4W(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE3_W, cindexcreate : u32) -> i32); - JetCreateIndex4W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) + JetCreateIndex4W(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateIndexA(sesid: P0, tableid: P1, szindexname: *const i8, grbit: u32, szkey: &[u8], ldensity: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetCreateIndexA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: *const i8, grbit: u32, szkey: &[u8], ldensity: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateIndexA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const i8, grbit : u32, szkey : windows_core::PCSTR, cbkey : u32, ldensity : u32) -> i32); - JetCreateIndexA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname), core::mem::transmute(grbit), core::mem::transmute(szkey.as_ptr()), szkey.len().try_into().unwrap(), core::mem::transmute(ldensity)) + JetCreateIndexA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname), core::mem::transmute(grbit), core::mem::transmute(szkey.as_ptr()), szkey.len().try_into().unwrap(), core::mem::transmute(ldensity)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateIndexW(sesid: P0, tableid: P1, szindexname: *const u16, grbit: u32, szkey: P4, cbkey: u32, ldensity: u32) -> i32 +pub unsafe fn JetCreateIndexW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: *const u16, grbit: u32, szkey: P4, cbkey: u32, ldensity: u32) -> i32 where - P0: windows_core::Param, - P1: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetCreateIndexW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const u16, grbit : u32, szkey : windows_core::PCWSTR, cbkey : u32, ldensity : u32) -> i32); - JetCreateIndexW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname), core::mem::transmute(grbit), szkey.param().abi(), core::mem::transmute(cbkey), core::mem::transmute(ldensity)) + JetCreateIndexW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname), core::mem::transmute(grbit), szkey.param().abi(), core::mem::transmute(cbkey), core::mem::transmute(ldensity)) } #[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(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::ptr::null())), core::mem::transmute(szdisplayname.unwrap_or(core::ptr::null())), core::mem::transmute(grbit)) + JetCreateInstance2A(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(szdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::ptr::null())), core::mem::transmute(szdisplayname.unwrap_or(core::ptr::null())), core::mem::transmute(grbit)) + JetCreateInstance2W(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(szdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::ptr::null()))) + JetCreateInstanceA(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::ptr::null()))) + JetCreateInstanceW(core::mem::transmute(pinstance), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableA(sesid: P0, dbid: u32, sztablename: *const i8, lpages: u32, ldensity: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableA(sesid: JET_SESID, dbid: u32, sztablename: *const i8, lpages: u32, ldensity: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableA(sesid : JET_SESID, dbid : u32, sztablename : *const i8, lpages : u32, ldensity : u32, ptableid : *mut super::StructuredStorage:: JET_TABLEID) -> i32); - JetCreateTableA(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(lpages), core::mem::transmute(ldensity), core::mem::transmute(ptableid)) + JetCreateTableA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(lpages), core::mem::transmute(ldensity), core::mem::transmute(ptableid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableColumnIndex2A(sesid: P0, dbid: u32, ptablecreate: *mut JET_TABLECREATE2_A) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableColumnIndex2A(sesid: JET_SESID, dbid: u32, ptablecreate: *mut JET_TABLECREATE2_A) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableColumnIndex2A(sesid : JET_SESID, dbid : u32, ptablecreate : *mut JET_TABLECREATE2_A) -> i32); - JetCreateTableColumnIndex2A(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) + JetCreateTableColumnIndex2A(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableColumnIndex2W(sesid: P0, dbid: u32, ptablecreate: *mut JET_TABLECREATE2_W) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableColumnIndex2W(sesid: JET_SESID, dbid: u32, ptablecreate: *mut JET_TABLECREATE2_W) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableColumnIndex2W(sesid : JET_SESID, dbid : u32, ptablecreate : *mut JET_TABLECREATE2_W) -> i32); - JetCreateTableColumnIndex2W(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) + JetCreateTableColumnIndex2W(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableColumnIndex3A(sesid: P0, dbid: u32, ptablecreate: *mut JET_TABLECREATE3_A) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableColumnIndex3A(sesid: JET_SESID, dbid: u32, ptablecreate: *mut JET_TABLECREATE3_A) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableColumnIndex3A(sesid : JET_SESID, dbid : u32, ptablecreate : *mut JET_TABLECREATE3_A) -> i32); - JetCreateTableColumnIndex3A(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) + JetCreateTableColumnIndex3A(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableColumnIndex3W(sesid: P0, dbid: u32, ptablecreate: *mut JET_TABLECREATE3_W) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableColumnIndex3W(sesid: JET_SESID, dbid: u32, ptablecreate: *mut JET_TABLECREATE3_W) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableColumnIndex3W(sesid : JET_SESID, dbid : u32, ptablecreate : *mut JET_TABLECREATE3_W) -> i32); - JetCreateTableColumnIndex3W(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) + JetCreateTableColumnIndex3W(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableColumnIndex4A(sesid: P0, dbid: u32, ptablecreate: *mut JET_TABLECREATE4_A) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableColumnIndex4A(sesid: JET_SESID, dbid: u32, ptablecreate: *mut JET_TABLECREATE4_A) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableColumnIndex4A(sesid : JET_SESID, dbid : u32, ptablecreate : *mut JET_TABLECREATE4_A) -> i32); - JetCreateTableColumnIndex4A(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) + JetCreateTableColumnIndex4A(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableColumnIndex4W(sesid: P0, dbid: u32, ptablecreate: *mut JET_TABLECREATE4_W) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableColumnIndex4W(sesid: JET_SESID, dbid: u32, ptablecreate: *mut JET_TABLECREATE4_W) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableColumnIndex4W(sesid : JET_SESID, dbid : u32, ptablecreate : *mut JET_TABLECREATE4_W) -> i32); - JetCreateTableColumnIndex4W(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) + JetCreateTableColumnIndex4W(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableColumnIndexA(sesid: P0, dbid: u32, ptablecreate: *mut JET_TABLECREATE_A) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableColumnIndexA(sesid: JET_SESID, dbid: u32, ptablecreate: *mut JET_TABLECREATE_A) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableColumnIndexA(sesid : JET_SESID, dbid : u32, ptablecreate : *mut JET_TABLECREATE_A) -> i32); - JetCreateTableColumnIndexA(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) + JetCreateTableColumnIndexA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableColumnIndexW(sesid: P0, dbid: u32, ptablecreate: *mut JET_TABLECREATE_W) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableColumnIndexW(sesid: JET_SESID, dbid: u32, ptablecreate: *mut JET_TABLECREATE_W) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableColumnIndexW(sesid : JET_SESID, dbid : u32, ptablecreate : *mut JET_TABLECREATE_W) -> i32); - JetCreateTableColumnIndexW(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) + JetCreateTableColumnIndexW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(ptablecreate)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetCreateTableW(sesid: P0, dbid: u32, sztablename: *const u16, lpages: u32, ldensity: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetCreateTableW(sesid: JET_SESID, dbid: u32, sztablename: *const u16, lpages: u32, ldensity: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateTableW(sesid : JET_SESID, dbid : u32, sztablename : *const u16, lpages : u32, ldensity : u32, ptableid : *mut super::StructuredStorage:: JET_TABLEID) -> i32); - JetCreateTableW(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(lpages), core::mem::transmute(ldensity), core::mem::transmute(ptableid)) + JetCreateTableW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(lpages), core::mem::transmute(ldensity), core::mem::transmute(ptableid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDefragment2A(sesid: P0, dbid: u32, sztablename: Option<*const i8>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, callback: JET_CALLBACK, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDefragment2A(sesid: JET_SESID, dbid: u32, sztablename: Option<*const i8>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, callback: JET_CALLBACK, grbit: u32) -> i32 { 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(), core::mem::transmute(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())), core::mem::transmute(callback), core::mem::transmute(grbit)) + JetDefragment2A(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpasses.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcseconds.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDefragment2W(sesid: P0, dbid: u32, sztablename: Option<*const u16>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, callback: JET_CALLBACK, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDefragment2W(sesid: JET_SESID, dbid: u32, sztablename: Option<*const u16>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, callback: JET_CALLBACK, grbit: u32) -> i32 { 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(), core::mem::transmute(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())), core::mem::transmute(callback), core::mem::transmute(grbit)) + JetDefragment2W(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpasses.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcseconds.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDefragment3A(sesid: P0, szdatabasename: *const i8, sztablename: Option<*const i8>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, callback: JET_CALLBACK, pvcontext: *const core::ffi::c_void, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDefragment3A(sesid: JET_SESID, szdatabasename: *const i8, sztablename: Option<*const i8>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, callback: JET_CALLBACK, pvcontext: *const core::ffi::c_void, grbit: u32) -> i32 { 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(), core::mem::transmute(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())), core::mem::transmute(callback), core::mem::transmute(pvcontext), core::mem::transmute(grbit)) + JetDefragment3A(core::mem::transmute(sesid), core::mem::transmute(szdatabasename), core::mem::transmute(sztablename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpasses.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcseconds.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(pvcontext), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDefragment3W(sesid: P0, szdatabasename: *const u16, sztablename: Option<*const u16>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, callback: JET_CALLBACK, pvcontext: *const core::ffi::c_void, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDefragment3W(sesid: JET_SESID, szdatabasename: *const u16, sztablename: Option<*const u16>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, callback: JET_CALLBACK, pvcontext: *const core::ffi::c_void, grbit: u32) -> i32 { 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(), core::mem::transmute(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())), core::mem::transmute(callback), core::mem::transmute(pvcontext), core::mem::transmute(grbit)) + JetDefragment3W(core::mem::transmute(sesid), core::mem::transmute(szdatabasename), core::mem::transmute(sztablename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpasses.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcseconds.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(pvcontext), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDefragmentA(sesid: JET_SESID, dbid: u32, sztablename: Option<*const i8>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, grbit: u32) -> i32 { 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(), core::mem::transmute(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())), core::mem::transmute(grbit)) + JetDefragmentA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpasses.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcseconds.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDefragmentW(sesid: JET_SESID, dbid: u32, sztablename: Option<*const u16>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, grbit: u32) -> i32 { 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(), core::mem::transmute(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())), core::mem::transmute(grbit)) + JetDefragmentW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpasses.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcseconds.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDelete(sesid: P0, tableid: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetDelete(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDelete(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID) -> i32); - JetDelete(sesid.param().abi(), tableid.param().abi()) + JetDelete(core::mem::transmute(sesid), core::mem::transmute(tableid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDeleteColumn2A(sesid: P0, tableid: P1, szcolumnname: *const i8, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetDeleteColumn2A(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szcolumnname: *const i8, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDeleteColumn2A(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szcolumnname : *const i8, grbit : u32) -> i32); - JetDeleteColumn2A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szcolumnname), core::mem::transmute(grbit)) + JetDeleteColumn2A(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szcolumnname), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDeleteColumn2W(sesid: P0, tableid: P1, szcolumnname: *const u16, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetDeleteColumn2W(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szcolumnname: *const u16, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDeleteColumn2W(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szcolumnname : *const u16, grbit : u32) -> i32); - JetDeleteColumn2W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szcolumnname), core::mem::transmute(grbit)) + JetDeleteColumn2W(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szcolumnname), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDeleteColumnA(sesid: P0, tableid: P1, szcolumnname: *const i8) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetDeleteColumnA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szcolumnname: *const i8) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDeleteColumnA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szcolumnname : *const i8) -> i32); - JetDeleteColumnA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szcolumnname)) + JetDeleteColumnA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szcolumnname)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDeleteColumnW(sesid: P0, tableid: P1, szcolumnname: *const u16) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetDeleteColumnW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szcolumnname: *const u16) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDeleteColumnW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szcolumnname : *const u16) -> i32); - JetDeleteColumnW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szcolumnname)) + JetDeleteColumnW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szcolumnname)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDeleteIndexA(sesid: P0, tableid: P1, szindexname: *const i8) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetDeleteIndexA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: *const i8) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDeleteIndexA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const i8) -> i32); - JetDeleteIndexA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname)) + JetDeleteIndexA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDeleteIndexW(sesid: P0, tableid: P1, szindexname: *const u16) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetDeleteIndexW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: *const u16) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDeleteIndexW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const u16) -> i32); - JetDeleteIndexW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname)) + JetDeleteIndexW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname)) } #[inline] -pub unsafe fn JetDeleteTableA(sesid: P0, dbid: u32, sztablename: *const i8) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDeleteTableA(sesid: JET_SESID, dbid: u32, sztablename: *const i8) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDeleteTableA(sesid : JET_SESID, dbid : u32, sztablename : *const i8) -> i32); - JetDeleteTableA(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(sztablename)) + JetDeleteTableA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename)) } #[inline] -pub unsafe fn JetDeleteTableW(sesid: P0, dbid: u32, sztablename: *const u16) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDeleteTableW(sesid: JET_SESID, dbid: u32, sztablename: *const u16) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDeleteTableW(sesid : JET_SESID, dbid : u32, sztablename : *const u16) -> i32); - JetDeleteTableW(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(sztablename)) + JetDeleteTableW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename)) } #[inline] -pub unsafe fn JetDetachDatabase2A(sesid: P0, szfilename: Option<*const i8>, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDetachDatabase2A(sesid: JET_SESID, szfilename: Option<*const i8>, grbit: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(grbit)) + JetDetachDatabase2A(core::mem::transmute(sesid), core::mem::transmute(szfilename.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetDetachDatabase2W(sesid: P0, szfilename: Option<*const u16>, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDetachDatabase2W(sesid: JET_SESID, szfilename: Option<*const u16>, grbit: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(grbit)) + JetDetachDatabase2W(core::mem::transmute(sesid), core::mem::transmute(szfilename.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetDetachDatabaseA(sesid: P0, szfilename: Option<*const i8>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDetachDatabaseA(sesid: JET_SESID, szfilename: Option<*const i8>) -> i32 { 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(core::ptr::null()))) + JetDetachDatabaseA(core::mem::transmute(sesid), core::mem::transmute(szfilename.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetDetachDatabaseW(sesid: P0, szfilename: Option<*const u16>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDetachDatabaseW(sesid: JET_SESID, szfilename: Option<*const u16>) -> i32 { 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(core::ptr::null()))) + JetDetachDatabaseW(core::mem::transmute(sesid), core::mem::transmute(szfilename.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetDupCursor(sesid: P0, tableid: P1, ptableid: *mut super::StructuredStorage::JET_TABLEID, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetDupCursor(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, ptableid: *mut super::StructuredStorage::JET_TABLEID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDupCursor(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, ptableid : *mut super::StructuredStorage:: JET_TABLEID, grbit : u32) -> i32); - JetDupCursor(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(ptableid), core::mem::transmute(grbit)) + JetDupCursor(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(ptableid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetDupSession(sesid: P0, psesid: *mut JET_SESID) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetDupSession(sesid: JET_SESID, psesid: *mut JET_SESID) -> i32 { windows_targets::link!("esent.dll" "system" fn JetDupSession(sesid : JET_SESID, psesid : *mut JET_SESID) -> i32); - JetDupSession(sesid.param().abi(), core::mem::transmute(psesid)) + JetDupSession(core::mem::transmute(sesid), core::mem::transmute(psesid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[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(core::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::mem::zeroed()))) } #[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(core::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::mem::zeroed()))) } #[inline] pub unsafe fn JetEndExternalBackup() -> i32 { @@ -642,48 +425,31 @@ pub unsafe fn JetEndExternalBackup() -> i32 { JetEndExternalBackup() } #[inline] -pub unsafe fn JetEndExternalBackupInstance(instance: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetEndExternalBackupInstance(instance: JET_INSTANCE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetEndExternalBackupInstance(instance : JET_INSTANCE) -> i32); - JetEndExternalBackupInstance(instance.param().abi()) + JetEndExternalBackupInstance(core::mem::transmute(instance)) } #[inline] -pub unsafe fn JetEndExternalBackupInstance2(instance: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetEndExternalBackupInstance2(instance: JET_INSTANCE, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetEndExternalBackupInstance2(instance : JET_INSTANCE, grbit : u32) -> i32); - JetEndExternalBackupInstance2(instance.param().abi(), core::mem::transmute(grbit)) + JetEndExternalBackupInstance2(core::mem::transmute(instance), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetEndSession(sesid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetEndSession(sesid: JET_SESID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetEndSession(sesid : JET_SESID, grbit : u32) -> i32); - JetEndSession(sesid.param().abi(), core::mem::transmute(grbit)) + JetEndSession(core::mem::transmute(sesid), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetEnumerateColumns(sesid: P0, tableid: P1, rgenumcolumnid: Option<&[JET_ENUMCOLUMNID]>, pcenumcolumn: *mut u32, prgenumcolumn: *mut *mut JET_ENUMCOLUMN, pfnrealloc: JET_PFNREALLOC, pvrealloccontext: Option<*const core::ffi::c_void>, cbdatamost: u32, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetEnumerateColumns(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, rgenumcolumnid: Option<&[JET_ENUMCOLUMNID]>, pcenumcolumn: *mut u32, prgenumcolumn: *mut *mut JET_ENUMCOLUMN, pfnrealloc: JET_PFNREALLOC, pvrealloccontext: Option<*const core::ffi::c_void>, cbdatamost: u32, grbit: u32) -> i32 { 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())), core::mem::transmute(pcenumcolumn), core::mem::transmute(prgenumcolumn), core::mem::transmute(pfnrealloc), core::mem::transmute(pvrealloccontext.unwrap_or(core::ptr::null())), core::mem::transmute(cbdatamost), core::mem::transmute(grbit)) + JetEnumerateColumns(core::mem::transmute(sesid), core::mem::transmute(tableid), 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())), core::mem::transmute(pcenumcolumn), core::mem::transmute(prgenumcolumn), core::mem::transmute(pfnrealloc), core::mem::transmute(pvrealloccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdatamost), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetEscrowUpdate(sesid: P0, tableid: P1, columnid: u32, pv: *const core::ffi::c_void, cbmax: u32, pvold: Option<*mut core::ffi::c_void>, cboldmax: u32, pcboldactual: Option<*mut u32>, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetEscrowUpdate(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, columnid: u32, pv: *const core::ffi::c_void, cbmax: u32, pvold: Option<*mut core::ffi::c_void>, cboldmax: u32, pcboldactual: Option<*mut u32>, grbit: u32) -> i32 { 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(), core::mem::transmute(columnid), core::mem::transmute(pv), core::mem::transmute(cbmax), core::mem::transmute(pvold.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cboldmax), core::mem::transmute(pcboldactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(grbit)) + JetEscrowUpdate(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(columnid), core::mem::transmute(pv), core::mem::transmute(cbmax), core::mem::transmute(pvold.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboldmax), core::mem::transmute(pcboldactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 { @@ -695,9 +461,9 @@ pub unsafe fn JetExternalRestore2A(szcheckpointfilepath: *const i8, szlogpath: * rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szbackuplogpath), core::mem::transmute(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())), + core::mem::transmute(sztargetinstancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sztargetinstancelogpath.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn), ) } @@ -711,9 +477,9 @@ pub unsafe fn JetExternalRestore2W(szcheckpointfilepath: *const u16, szlogpath: rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szbackuplogpath), core::mem::transmute(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())), + core::mem::transmute(sztargetinstancename.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sztargetinstancelogpath.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn), ) } @@ -738,84 +504,56 @@ 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(core::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::mem::zeroed()))) } #[inline] -pub unsafe fn JetGetAttachInfoInstanceA(instance: P0, szzdatabases: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetAttachInfoInstanceA(instance: JET_INSTANCE, szzdatabases: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 { 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(core::ptr::null_mut()))) + JetGetAttachInfoInstanceA(core::mem::transmute(instance), 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::mem::zeroed()))) } #[inline] -pub unsafe fn JetGetAttachInfoInstanceW(instance: P0, szzdatabases: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetAttachInfoInstanceW(instance: JET_INSTANCE, szzdatabases: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetGetAttachInfoInstanceW(core::mem::transmute(instance), core::mem::transmute(szzdatabases.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetGetAttachInfoW(core::mem::transmute(wszzdatabases.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetBookmark(sesid: P0, tableid: P1, pvbookmark: Option<*mut core::ffi::c_void>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetBookmark(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvbookmark: Option<*mut core::ffi::c_void>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetGetBookmark(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvbookmark.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetColumnInfoA(sesid: JET_SESID, dbid: u32, sztablename: *const i8, pcolumnnameorid: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { 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(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(pcolumnnameorid.unwrap_or(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetColumnInfoA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(pcolumnnameorid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetColumnInfoW(sesid: JET_SESID, dbid: u32, sztablename: *const u16, pwcolumnnameorid: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { 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(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(pwcolumnnameorid.unwrap_or(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetColumnInfoW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(pwcolumnnameorid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetCurrentIndexA(sesid: P0, tableid: P1, szindexname: &mut [u8]) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetCurrentIndexA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: &mut [u8]) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetCurrentIndexA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *mut i8, cbindexname : u32) -> i32); - JetGetCurrentIndexA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.as_ptr()), szindexname.len().try_into().unwrap()) + JetGetCurrentIndexA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.as_ptr()), szindexname.len().try_into().unwrap()) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetCurrentIndexW(sesid: P0, tableid: P1, szindexname: *mut u16, cbindexname: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetCurrentIndexW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: *mut u16, cbindexname: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetCurrentIndexW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *mut u16, cbindexname : u32) -> i32); - JetGetCurrentIndexW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname), core::mem::transmute(cbindexname)) + JetGetCurrentIndexW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname), core::mem::transmute(cbindexname)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetCursorInfo(sesid: P0, tableid: P1, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetCursorInfo(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetCursorInfo(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetCursorInfo(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetCursorInfo(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[inline] pub unsafe fn JetGetDatabaseFileInfoA(szdatabasename: *const i8, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { @@ -828,41 +566,29 @@ pub unsafe fn JetGetDatabaseFileInfoW(szdatabasename: *const u16, pvresult: *mut JetGetDatabaseFileInfoW(core::mem::transmute(szdatabasename), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[inline] -pub unsafe fn JetGetDatabaseInfoA(sesid: P0, dbid: u32, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetDatabaseInfoA(sesid: JET_SESID, dbid: u32, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetDatabaseInfoA(sesid : JET_SESID, dbid : u32, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetDatabaseInfoA(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetDatabaseInfoA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[inline] -pub unsafe fn JetGetDatabaseInfoW(sesid: P0, dbid: u32, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetDatabaseInfoW(sesid: JET_SESID, dbid: u32, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetDatabaseInfoW(sesid : JET_SESID, dbid : u32, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetDatabaseInfoW(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetDatabaseInfoW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[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(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel), core::mem::transmute(grbit)) + JetGetErrorInfoW(core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetIndexInfoA(sesid: JET_SESID, dbid: u32, sztablename: *const i8, szindexname: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbresult: u32, infolevel: u32) -> i32 { 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(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbresult), core::mem::transmute(infolevel)) + JetGetIndexInfoA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbresult), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetIndexInfoW(sesid: JET_SESID, dbid: u32, sztablename: *const u16, szindexname: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbresult: u32, infolevel: u32) -> i32 { 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(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbresult), core::mem::transmute(infolevel)) + JetGetIndexInfoW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbresult), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -877,218 +603,138 @@ pub unsafe fn JetGetInstanceInfoW(pcinstanceinfo: *mut u32, painstanceinfo: *mut JetGetInstanceInfoW(core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo)) } #[inline] -pub unsafe fn JetGetInstanceMiscInfo(instance: P0, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetInstanceMiscInfo(instance: JET_INSTANCE, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetInstanceMiscInfo(instance : JET_INSTANCE, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetInstanceMiscInfo(instance.param().abi(), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetInstanceMiscInfo(core::mem::transmute(instance), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetLS(sesid: P0, tableid: P1, pls: *mut JET_LS, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetLS(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pls: *mut JET_LS, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetLS(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pls : *mut JET_LS, grbit : u32) -> i32); - JetGetLS(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pls), core::mem::transmute(grbit)) + JetGetLS(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pls), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetLock(sesid: P0, tableid: P1, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetLock(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetLock(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, grbit : u32) -> i32); - JetGetLock(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(grbit)) + JetGetLock(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(grbit)) } #[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(core::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::mem::zeroed()))) } #[inline] -pub unsafe fn JetGetLogInfoInstance2A(instance: P0, szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>, ploginfo: Option<*mut JET_LOGINFO_A>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetLogInfoInstance2A(instance: JET_INSTANCE, szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>, ploginfo: Option<*mut JET_LOGINFO_A>) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(ploginfo.unwrap_or(core::ptr::null_mut()))) + JetGetLogInfoInstance2A(core::mem::transmute(instance), 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::mem::zeroed())), core::mem::transmute(ploginfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetGetLogInfoInstance2W(instance: P0, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>, ploginfo: Option<*mut JET_LOGINFO_W>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetLogInfoInstance2W(instance: JET_INSTANCE, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>, ploginfo: Option<*mut JET_LOGINFO_W>) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ploginfo.unwrap_or(core::ptr::null_mut()))) + JetGetLogInfoInstance2W(core::mem::transmute(instance), core::mem::transmute(wszzlogs.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(ploginfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetGetLogInfoInstanceA(instance: P0, szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetLogInfoInstanceA(instance: JET_INSTANCE, szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 { 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(core::ptr::null_mut()))) + JetGetLogInfoInstanceA(core::mem::transmute(instance), 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::mem::zeroed()))) } #[inline] -pub unsafe fn JetGetLogInfoInstanceW(instance: P0, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetLogInfoInstanceW(instance: JET_INSTANCE, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetGetLogInfoInstanceW(core::mem::transmute(instance), core::mem::transmute(wszzlogs.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetGetLogInfoW(core::mem::transmute(szzlogs.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetObjectInfoA(sesid: JET_SESID, dbid: u32, objtyp: u32, szcontainername: Option<*const i8>, szobjectname: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { 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(), core::mem::transmute(dbid), core::mem::transmute(objtyp), core::mem::transmute(szcontainername.unwrap_or(core::ptr::null())), core::mem::transmute(szobjectname.unwrap_or(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetObjectInfoA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(objtyp), core::mem::transmute(szcontainername.unwrap_or(core::mem::zeroed())), core::mem::transmute(szobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetObjectInfoW(sesid: JET_SESID, dbid: u32, objtyp: u32, szcontainername: Option<*const u16>, szobjectname: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { 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(), core::mem::transmute(dbid), core::mem::transmute(objtyp), core::mem::transmute(szcontainername.unwrap_or(core::ptr::null())), core::mem::transmute(szobjectname.unwrap_or(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetObjectInfoW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(objtyp), core::mem::transmute(szcontainername.unwrap_or(core::mem::zeroed())), core::mem::transmute(szobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetRecordPosition(sesid: P0, tableid: P1, precpos: *mut JET_RECPOS, cbrecpos: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetRecordPosition(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, precpos: *mut JET_RECPOS, cbrecpos: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetRecordPosition(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, precpos : *mut JET_RECPOS, cbrecpos : u32) -> i32); - JetGetRecordPosition(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(precpos), core::mem::transmute(cbrecpos)) + JetGetRecordPosition(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(precpos), core::mem::transmute(cbrecpos)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetRecordSize(sesid: P0, tableid: P1, precsize: *mut JET_RECSIZE, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetRecordSize(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, precsize: *mut JET_RECSIZE, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetRecordSize(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, precsize : *mut JET_RECSIZE, grbit : u32) -> i32); - JetGetRecordSize(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(precsize), core::mem::transmute(grbit)) + JetGetRecordSize(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(precsize), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetRecordSize2(sesid: P0, tableid: P1, precsize: *mut JET_RECSIZE2, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetRecordSize2(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, precsize: *mut JET_RECSIZE2, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetRecordSize2(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, precsize : *mut JET_RECSIZE2, grbit : u32) -> i32); - JetGetRecordSize2(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(precsize), core::mem::transmute(grbit)) + JetGetRecordSize2(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(precsize), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetSecondaryIndexBookmark(sesid: P0, tableid: P1, pvsecondarykey: Option<*mut core::ffi::c_void>, cbsecondarykeymax: u32, pcbsecondarykeyactual: Option<*mut u32>, pvprimarybookmark: Option<*mut core::ffi::c_void>, cbprimarybookmarkmax: u32, pcbprimarybookmarkactual: Option<*mut u32>, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetSecondaryIndexBookmark(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvsecondarykey: Option<*mut core::ffi::c_void>, cbsecondarykeymax: u32, pcbsecondarykeyactual: Option<*mut u32>, pvprimarybookmark: Option<*mut core::ffi::c_void>, cbprimarybookmarkmax: u32, pcbprimarybookmarkactual: Option<*mut u32>, grbit: u32) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbsecondarykeymax), core::mem::transmute(pcbsecondarykeyactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvprimarybookmark.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbprimarybookmarkmax), core::mem::transmute(pcbprimarybookmarkactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(grbit)) + JetGetSecondaryIndexBookmark(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvsecondarykey.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsecondarykeymax), core::mem::transmute(pcbsecondarykeyactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvprimarybookmark.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbprimarybookmarkmax), core::mem::transmute(pcbprimarybookmarkactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetGetSessionParameter(sesid: P0, sesparamid: u32, pvparam: &mut [u8], pcbparamactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetSessionParameter(sesid: Option, sesparamid: u32, pvparam: &mut [u8], pcbparamactual: Option<*mut u32>) -> i32 { 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(), core::mem::transmute(sesparamid), core::mem::transmute(pvparam.as_ptr()), pvparam.len().try_into().unwrap(), core::mem::transmute(pcbparamactual.unwrap_or(core::ptr::null_mut()))) + JetGetSessionParameter(core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), core::mem::transmute(sesparamid), core::mem::transmute(pvparam.as_ptr()), pvparam.len().try_into().unwrap(), core::mem::transmute(pcbparamactual.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetSystemParameterA(instance: P0, sesid: P1, paramid: u32, plparam: Option<*mut super::StructuredStorage::JET_API_PTR>, szparam: Option<&mut [u8]>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetSystemParameterA(instance: JET_INSTANCE, sesid: Option, paramid: u32, plparam: Option<*mut super::StructuredStorage::JET_API_PTR>, szparam: Option<&mut [u8]>) -> i32 { 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(), core::mem::transmute(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())) + JetGetSystemParameterA(core::mem::transmute(instance), core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), core::mem::transmute(paramid), core::mem::transmute(plparam.unwrap_or(core::mem::zeroed())), 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] -pub unsafe fn JetGetSystemParameterW(instance: P0, sesid: P1, paramid: u32, plparam: Option<*mut super::StructuredStorage::JET_API_PTR>, szparam: Option<*mut u16>, cbmax: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetSystemParameterW(instance: JET_INSTANCE, sesid: Option, paramid: u32, plparam: Option<*mut super::StructuredStorage::JET_API_PTR>, szparam: Option<*mut u16>, cbmax: u32) -> i32 { 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(), core::mem::transmute(paramid), core::mem::transmute(plparam.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szparam.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbmax)) + JetGetSystemParameterW(core::mem::transmute(instance), core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), core::mem::transmute(paramid), core::mem::transmute(plparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(szparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetTableColumnInfoA(sesid: P0, tableid: P1, szcolumnname: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetTableColumnInfoA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szcolumnname: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetTableColumnInfoA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szcolumnname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetTableColumnInfoW(sesid: P0, tableid: P1, szcolumnname: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetTableColumnInfoW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szcolumnname: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetTableColumnInfoW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szcolumnname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetTableIndexInfoA(sesid: P0, tableid: P1, szindexname: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbresult: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetTableIndexInfoA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbresult: u32, infolevel: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbresult), core::mem::transmute(infolevel)) + JetGetTableIndexInfoA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbresult), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetTableIndexInfoW(sesid: P0, tableid: P1, szindexname: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbresult: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetTableIndexInfoW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbresult: u32, infolevel: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(pvresult), core::mem::transmute(cbresult), core::mem::transmute(infolevel)) + JetGetTableIndexInfoW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvresult), core::mem::transmute(cbresult), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetTableInfoA(sesid: P0, tableid: P1, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetTableInfoA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetTableInfoA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetTableInfoA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetTableInfoA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGetTableInfoW(sesid: P0, tableid: P1, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGetTableInfoW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetTableInfoW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetTableInfoW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) + JetGetTableInfoW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvresult), core::mem::transmute(cbmax), core::mem::transmute(infolevel)) } #[inline] pub unsafe fn JetGetThreadStats(pvresult: *mut core::ffi::c_void, cbmax: u32) -> i32 { @@ -1096,185 +742,125 @@ pub unsafe fn JetGetThreadStats(pvresult: *mut core::ffi::c_void, cbmax: u32) -> JetGetThreadStats(core::mem::transmute(pvresult), core::mem::transmute(cbmax)) } #[inline] -pub unsafe fn JetGetTruncateLogInfoInstanceA(instance: P0, szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetTruncateLogInfoInstanceA(instance: JET_INSTANCE, szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 { 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(core::ptr::null_mut()))) + JetGetTruncateLogInfoInstanceA(core::mem::transmute(instance), 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::mem::zeroed()))) } #[inline] -pub unsafe fn JetGetTruncateLogInfoInstanceW(instance: P0, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetTruncateLogInfoInstanceW(instance: JET_INSTANCE, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetGetTruncateLogInfoInstanceW(core::mem::transmute(instance), core::mem::transmute(wszzlogs.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetGetVersion(sesid: P0, pwversion: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGetVersion(sesid: JET_SESID, pwversion: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetVersion(sesid : JET_SESID, pwversion : *mut u32) -> i32); - JetGetVersion(sesid.param().abi(), core::mem::transmute(pwversion)) + JetGetVersion(core::mem::transmute(sesid), core::mem::transmute(pwversion)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGotoBookmark(sesid: P0, tableid: P1, pvbookmark: *const core::ffi::c_void, cbbookmark: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGotoBookmark(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvbookmark: *const core::ffi::c_void, cbbookmark: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGotoBookmark(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvbookmark : *const core::ffi::c_void, cbbookmark : u32) -> i32); - JetGotoBookmark(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvbookmark), core::mem::transmute(cbbookmark)) + JetGotoBookmark(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvbookmark), core::mem::transmute(cbbookmark)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGotoPosition(sesid: P0, tableid: P1, precpos: *const JET_RECPOS) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGotoPosition(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, precpos: *const JET_RECPOS) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGotoPosition(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, precpos : *const JET_RECPOS) -> i32); - JetGotoPosition(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(precpos)) + JetGotoPosition(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(precpos)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetGotoSecondaryIndexBookmark(sesid: P0, tableid: P1, pvsecondarykey: *const core::ffi::c_void, cbsecondarykey: u32, pvprimarybookmark: Option<*const core::ffi::c_void>, cbprimarybookmark: u32, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetGotoSecondaryIndexBookmark(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvsecondarykey: *const core::ffi::c_void, cbsecondarykey: u32, pvprimarybookmark: Option<*const core::ffi::c_void>, cbprimarybookmark: u32, grbit: u32) -> i32 { 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(), core::mem::transmute(pvsecondarykey), core::mem::transmute(cbsecondarykey), core::mem::transmute(pvprimarybookmark.unwrap_or(core::ptr::null())), core::mem::transmute(cbprimarybookmark), core::mem::transmute(grbit)) + JetGotoSecondaryIndexBookmark(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvsecondarykey), core::mem::transmute(cbsecondarykey), core::mem::transmute(pvprimarybookmark.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbprimarybookmark), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetGrowDatabase(sesid: P0, dbid: u32, cpg: u32, pcpgreal: *const u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetGrowDatabase(sesid: JET_SESID, dbid: u32, cpg: u32, pcpgreal: *const u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGrowDatabase(sesid : JET_SESID, dbid : u32, cpg : u32, pcpgreal : *const u32) -> i32); - JetGrowDatabase(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(cpg), core::mem::transmute(pcpgreal)) + JetGrowDatabase(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(cpg), core::mem::transmute(pcpgreal)) } #[inline] -pub unsafe fn JetIdle(sesid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetIdle(sesid: JET_SESID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetIdle(sesid : JET_SESID, grbit : u32) -> i32); - JetIdle(sesid.param().abi(), core::mem::transmute(grbit)) + JetIdle(core::mem::transmute(sesid), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetIndexRecordCount(sesid: P0, tableid: P1, pcrec: *mut u32, crecmax: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetIndexRecordCount(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pcrec: *mut u32, crecmax: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetIndexRecordCount(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pcrec : *mut u32, crecmax : u32) -> i32); - JetIndexRecordCount(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pcrec), core::mem::transmute(crecmax)) + JetIndexRecordCount(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pcrec), core::mem::transmute(crecmax)) } #[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(core::ptr::null_mut()))) + JetInit(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(grbit)) + JetInit2(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(prstinfo.unwrap_or(core::ptr::null())), core::mem::transmute(grbit)) + JetInit3A(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(prstinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(prstinfo.unwrap_or(core::ptr::null())), core::mem::transmute(grbit)) + JetInit3W(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(prstinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetIntersectIndexes(sesid: P0, rgindexrange: &[JET_INDEXRANGE], precordlist: *mut JET_RECORDLIST, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetIntersectIndexes(sesid: JET_SESID, rgindexrange: &[JET_INDEXRANGE], precordlist: *mut JET_RECORDLIST, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetIntersectIndexes(sesid : JET_SESID, rgindexrange : *const JET_INDEXRANGE, cindexrange : u32, precordlist : *mut JET_RECORDLIST, grbit : u32) -> i32); - JetIntersectIndexes(sesid.param().abi(), core::mem::transmute(rgindexrange.as_ptr()), rgindexrange.len().try_into().unwrap(), core::mem::transmute(precordlist), core::mem::transmute(grbit)) + JetIntersectIndexes(core::mem::transmute(sesid), core::mem::transmute(rgindexrange.as_ptr()), rgindexrange.len().try_into().unwrap(), core::mem::transmute(precordlist), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetMakeKey(sesid: P0, tableid: P1, pvdata: Option<*const core::ffi::c_void>, cbdata: u32, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetMakeKey(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvdata: Option<*const core::ffi::c_void>, cbdata: u32, grbit: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(cbdata), core::mem::transmute(grbit)) + JetMakeKey(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetMove(sesid: P0, tableid: P1, crow: i32, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetMove(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, crow: i32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetMove(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, crow : i32, grbit : u32) -> i32); - JetMove(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(crow), core::mem::transmute(grbit)) + JetMove(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(crow), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetOSSnapshotAbort(snapid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotAbort(snapid: JET_OSSNAPID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotAbort(snapid : JET_OSSNAPID, grbit : u32) -> i32); - JetOSSnapshotAbort(snapid.param().abi(), core::mem::transmute(grbit)) + JetOSSnapshotAbort(core::mem::transmute(snapid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetOSSnapshotEnd(snapid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotEnd(snapid: JET_OSSNAPID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotEnd(snapid : JET_OSSNAPID, grbit : u32) -> i32); - JetOSSnapshotEnd(snapid.param().abi(), core::mem::transmute(grbit)) + JetOSSnapshotEnd(core::mem::transmute(snapid), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOSSnapshotFreezeA(snapid: P0, pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_A, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotFreezeA(snapid: JET_OSSNAPID, pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_A, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotFreezeA(snapid : JET_OSSNAPID, pcinstanceinfo : *mut u32, painstanceinfo : *mut *mut JET_INSTANCE_INFO_A, grbit : u32) -> i32); - JetOSSnapshotFreezeA(snapid.param().abi(), core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), core::mem::transmute(grbit)) + JetOSSnapshotFreezeA(core::mem::transmute(snapid), core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOSSnapshotFreezeW(snapid: P0, pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_W, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotFreezeW(snapid: JET_OSSNAPID, pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_W, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotFreezeW(snapid : JET_OSSNAPID, pcinstanceinfo : *mut u32, painstanceinfo : *mut *mut JET_INSTANCE_INFO_W, grbit : u32) -> i32); - JetOSSnapshotFreezeW(snapid.param().abi(), core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), core::mem::transmute(grbit)) + JetOSSnapshotFreezeW(core::mem::transmute(snapid), core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOSSnapshotGetFreezeInfoA(snapid: P0, pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_A, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotGetFreezeInfoA(snapid: JET_OSSNAPID, pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_A, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotGetFreezeInfoA(snapid : JET_OSSNAPID, pcinstanceinfo : *mut u32, painstanceinfo : *mut *mut JET_INSTANCE_INFO_A, grbit : u32) -> i32); - JetOSSnapshotGetFreezeInfoA(snapid.param().abi(), core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), core::mem::transmute(grbit)) + JetOSSnapshotGetFreezeInfoA(core::mem::transmute(snapid), core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOSSnapshotGetFreezeInfoW(snapid: P0, pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_W, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotGetFreezeInfoW(snapid: JET_OSSNAPID, pcinstanceinfo: *mut u32, painstanceinfo: *mut *mut JET_INSTANCE_INFO_W, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotGetFreezeInfoW(snapid : JET_OSSNAPID, pcinstanceinfo : *mut u32, painstanceinfo : *mut *mut JET_INSTANCE_INFO_W, grbit : u32) -> i32); - JetOSSnapshotGetFreezeInfoW(snapid.param().abi(), core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), core::mem::transmute(grbit)) + JetOSSnapshotGetFreezeInfoW(core::mem::transmute(snapid), core::mem::transmute(pcinstanceinfo), core::mem::transmute(painstanceinfo), core::mem::transmute(grbit)) } #[inline] pub unsafe fn JetOSSnapshotPrepare(psnapid: *mut JET_OSSNAPID, grbit: u32) -> i32 { @@ -1282,54 +868,34 @@ pub unsafe fn JetOSSnapshotPrepare(psnapid: *mut JET_OSSNAPID, grbit: u32) -> i3 JetOSSnapshotPrepare(core::mem::transmute(psnapid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetOSSnapshotPrepareInstance(snapid: P0, instance: P1, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotPrepareInstance(snapid: JET_OSSNAPID, instance: JET_INSTANCE, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotPrepareInstance(snapid : JET_OSSNAPID, instance : JET_INSTANCE, grbit : u32) -> i32); - JetOSSnapshotPrepareInstance(snapid.param().abi(), instance.param().abi(), core::mem::transmute(grbit)) + JetOSSnapshotPrepareInstance(core::mem::transmute(snapid), core::mem::transmute(instance), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetOSSnapshotThaw(snapid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotThaw(snapid: JET_OSSNAPID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotThaw(snapid : JET_OSSNAPID, grbit : u32) -> i32); - JetOSSnapshotThaw(snapid.param().abi(), core::mem::transmute(grbit)) + JetOSSnapshotThaw(core::mem::transmute(snapid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetOSSnapshotTruncateLog(snapid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotTruncateLog(snapid: JET_OSSNAPID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotTruncateLog(snapid : JET_OSSNAPID, grbit : u32) -> i32); - JetOSSnapshotTruncateLog(snapid.param().abi(), core::mem::transmute(grbit)) + JetOSSnapshotTruncateLog(core::mem::transmute(snapid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetOSSnapshotTruncateLogInstance(snapid: P0, instance: P1, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetOSSnapshotTruncateLogInstance(snapid: JET_OSSNAPID, instance: JET_INSTANCE, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOSSnapshotTruncateLogInstance(snapid : JET_OSSNAPID, instance : JET_INSTANCE, grbit : u32) -> i32); - JetOSSnapshotTruncateLogInstance(snapid.param().abi(), instance.param().abi(), core::mem::transmute(grbit)) + JetOSSnapshotTruncateLogInstance(core::mem::transmute(snapid), core::mem::transmute(instance), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetOpenDatabaseA(sesid: P0, szfilename: *const i8, szconnect: Option<*const i8>, pdbid: *mut u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenDatabaseA(sesid: JET_SESID, szfilename: *const i8, szconnect: Option<*const i8>, pdbid: *mut u32, grbit: u32) -> i32 { 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(), core::mem::transmute(szfilename), core::mem::transmute(szconnect.unwrap_or(core::ptr::null())), core::mem::transmute(pdbid), core::mem::transmute(grbit)) + JetOpenDatabaseA(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(szconnect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdbid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetOpenDatabaseW(sesid: P0, szfilename: *const u16, szconnect: Option<*const u16>, pdbid: *mut u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenDatabaseW(sesid: JET_SESID, szfilename: *const u16, szconnect: Option<*const u16>, pdbid: *mut u32, grbit: u32) -> i32 { 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(), core::mem::transmute(szfilename), core::mem::transmute(szconnect.unwrap_or(core::ptr::null())), core::mem::transmute(pdbid), core::mem::transmute(grbit)) + JetOpenDatabaseW(core::mem::transmute(sesid), core::mem::transmute(szfilename), core::mem::transmute(szconnect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdbid), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1339,21 +905,15 @@ pub unsafe fn JetOpenFileA(szfilename: *const i8, phffile: *mut super::Structure } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenFileInstanceA(instance: P0, szfilename: *const i8, phffile: *mut super::StructuredStorage::JET_HANDLE, pulfilesizelow: *mut u32, pulfilesizehigh: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenFileInstanceA(instance: JET_INSTANCE, szfilename: *const i8, phffile: *mut super::StructuredStorage::JET_HANDLE, pulfilesizelow: *mut u32, pulfilesizehigh: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOpenFileInstanceA(instance : JET_INSTANCE, szfilename : *const i8, phffile : *mut super::StructuredStorage:: JET_HANDLE, pulfilesizelow : *mut u32, pulfilesizehigh : *mut u32) -> i32); - JetOpenFileInstanceA(instance.param().abi(), core::mem::transmute(szfilename), core::mem::transmute(phffile), core::mem::transmute(pulfilesizelow), core::mem::transmute(pulfilesizehigh)) + JetOpenFileInstanceA(core::mem::transmute(instance), core::mem::transmute(szfilename), core::mem::transmute(phffile), core::mem::transmute(pulfilesizelow), core::mem::transmute(pulfilesizehigh)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenFileInstanceW(instance: P0, szfilename: *const u16, phffile: *mut super::StructuredStorage::JET_HANDLE, pulfilesizelow: *mut u32, pulfilesizehigh: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenFileInstanceW(instance: JET_INSTANCE, szfilename: *const u16, phffile: *mut super::StructuredStorage::JET_HANDLE, pulfilesizelow: *mut u32, pulfilesizehigh: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOpenFileInstanceW(instance : JET_INSTANCE, szfilename : *const u16, phffile : *mut super::StructuredStorage:: JET_HANDLE, pulfilesizelow : *mut u32, pulfilesizehigh : *mut u32) -> i32); - JetOpenFileInstanceW(instance.param().abi(), core::mem::transmute(szfilename), core::mem::transmute(phffile), core::mem::transmute(pulfilesizelow), core::mem::transmute(pulfilesizehigh)) + JetOpenFileInstanceW(core::mem::transmute(instance), core::mem::transmute(szfilename), core::mem::transmute(phffile), core::mem::transmute(pulfilesizelow), core::mem::transmute(pulfilesizehigh)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1363,482 +923,305 @@ pub unsafe fn JetOpenFileW(szfilename: *const u16, phffile: *mut super::Structur } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenTableA(sesid: P0, dbid: u32, sztablename: *const i8, pvparameters: Option<*const core::ffi::c_void>, cbparameters: u32, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenTableA(sesid: JET_SESID, dbid: u32, sztablename: *const i8, pvparameters: Option<*const core::ffi::c_void>, cbparameters: u32, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID) -> i32 { 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(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(pvparameters.unwrap_or(core::ptr::null())), core::mem::transmute(cbparameters), core::mem::transmute(grbit), core::mem::transmute(ptableid)) + JetOpenTableA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(pvparameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbparameters), core::mem::transmute(grbit), core::mem::transmute(ptableid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenTableW(sesid: P0, dbid: u32, sztablename: *const u16, pvparameters: Option<*const core::ffi::c_void>, cbparameters: u32, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenTableW(sesid: JET_SESID, dbid: u32, sztablename: *const u16, pvparameters: Option<*const core::ffi::c_void>, cbparameters: u32, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID) -> i32 { 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(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(pvparameters.unwrap_or(core::ptr::null())), core::mem::transmute(cbparameters), core::mem::transmute(grbit), core::mem::transmute(ptableid)) + JetOpenTableW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(pvparameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbparameters), core::mem::transmute(grbit), core::mem::transmute(ptableid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenTempTable(sesid: P0, prgcolumndef: *const JET_COLUMNDEF, ccolumn: u32, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID, prgcolumnid: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenTempTable(sesid: JET_SESID, prgcolumndef: *const JET_COLUMNDEF, ccolumn: u32, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID, prgcolumnid: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOpenTempTable(sesid : JET_SESID, prgcolumndef : *const JET_COLUMNDEF, ccolumn : u32, grbit : u32, ptableid : *mut super::StructuredStorage:: JET_TABLEID, prgcolumnid : *mut u32) -> i32); - JetOpenTempTable(sesid.param().abi(), core::mem::transmute(prgcolumndef), core::mem::transmute(ccolumn), core::mem::transmute(grbit), core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) + JetOpenTempTable(core::mem::transmute(sesid), core::mem::transmute(prgcolumndef), core::mem::transmute(ccolumn), core::mem::transmute(grbit), core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenTempTable2(sesid: P0, prgcolumndef: *const JET_COLUMNDEF, ccolumn: u32, lcid: u32, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID, prgcolumnid: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenTempTable2(sesid: JET_SESID, prgcolumndef: *const JET_COLUMNDEF, ccolumn: u32, lcid: u32, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID, prgcolumnid: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOpenTempTable2(sesid : JET_SESID, prgcolumndef : *const JET_COLUMNDEF, ccolumn : u32, lcid : u32, grbit : u32, ptableid : *mut super::StructuredStorage:: JET_TABLEID, prgcolumnid : *mut u32) -> i32); - JetOpenTempTable2(sesid.param().abi(), core::mem::transmute(prgcolumndef), core::mem::transmute(ccolumn), core::mem::transmute(lcid), core::mem::transmute(grbit), core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) + JetOpenTempTable2(core::mem::transmute(sesid), core::mem::transmute(prgcolumndef), core::mem::transmute(ccolumn), core::mem::transmute(lcid), core::mem::transmute(grbit), core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenTempTable3(sesid: P0, prgcolumndef: *const JET_COLUMNDEF, ccolumn: u32, pidxunicode: Option<*const JET_UNICODEINDEX>, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID, prgcolumnid: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenTempTable3(sesid: JET_SESID, prgcolumndef: *const JET_COLUMNDEF, ccolumn: u32, pidxunicode: Option<*const JET_UNICODEINDEX>, grbit: u32, ptableid: *mut super::StructuredStorage::JET_TABLEID, prgcolumnid: *mut u32) -> i32 { 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(), core::mem::transmute(prgcolumndef), core::mem::transmute(ccolumn), core::mem::transmute(pidxunicode.unwrap_or(core::ptr::null())), core::mem::transmute(grbit), core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) + JetOpenTempTable3(core::mem::transmute(sesid), core::mem::transmute(prgcolumndef), core::mem::transmute(ccolumn), core::mem::transmute(pidxunicode.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit), core::mem::transmute(ptableid), core::mem::transmute(prgcolumnid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenTemporaryTable(sesid: P0, popentemporarytable: *const JET_OPENTEMPORARYTABLE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenTemporaryTable(sesid: JET_SESID, popentemporarytable: *const JET_OPENTEMPORARYTABLE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOpenTemporaryTable(sesid : JET_SESID, popentemporarytable : *const JET_OPENTEMPORARYTABLE) -> i32); - JetOpenTemporaryTable(sesid.param().abi(), core::mem::transmute(popentemporarytable)) + JetOpenTemporaryTable(core::mem::transmute(sesid), core::mem::transmute(popentemporarytable)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetOpenTemporaryTable2(sesid: P0, popentemporarytable: *const JET_OPENTEMPORARYTABLE2) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetOpenTemporaryTable2(sesid: JET_SESID, popentemporarytable: *const JET_OPENTEMPORARYTABLE2) -> i32 { windows_targets::link!("esent.dll" "system" fn JetOpenTemporaryTable2(sesid : JET_SESID, popentemporarytable : *const JET_OPENTEMPORARYTABLE2) -> i32); - JetOpenTemporaryTable2(sesid.param().abi(), core::mem::transmute(popentemporarytable)) + JetOpenTemporaryTable2(core::mem::transmute(sesid), core::mem::transmute(popentemporarytable)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetPrepareUpdate(sesid: P0, tableid: P1, prep: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetPrepareUpdate(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, prep: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetPrepareUpdate(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, prep : u32) -> i32); - JetPrepareUpdate(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(prep)) + JetPrepareUpdate(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(prep)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetPrereadIndexRanges(sesid: P0, tableid: P1, rgindexranges: &[JET_INDEX_RANGE], pcrangespreread: Option<*mut u32>, rgcolumnidpreread: &[u32], grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetPrereadIndexRanges(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, rgindexranges: &[JET_INDEX_RANGE], pcrangespreread: Option<*mut u32>, rgcolumnidpreread: &[u32], grbit: u32) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(rgcolumnidpreread.as_ptr()), rgcolumnidpreread.len().try_into().unwrap(), core::mem::transmute(grbit)) + JetPrereadIndexRanges(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(rgindexranges.as_ptr()), rgindexranges.len().try_into().unwrap(), core::mem::transmute(pcrangespreread.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgcolumnidpreread.as_ptr()), rgcolumnidpreread.len().try_into().unwrap(), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetPrereadKeys(sesid: P0, tableid: P1, rgpvkeys: *const *const core::ffi::c_void, rgcbkeys: *const u32, ckeys: i32, pckeyspreread: Option<*mut i32>, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetPrereadKeys(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, rgpvkeys: *const *const core::ffi::c_void, rgcbkeys: *const u32, ckeys: i32, pckeyspreread: Option<*mut i32>, grbit: u32) -> i32 { 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(), core::mem::transmute(rgpvkeys), core::mem::transmute(rgcbkeys), core::mem::transmute(ckeys), core::mem::transmute(pckeyspreread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(grbit)) + JetPrereadKeys(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(rgpvkeys), core::mem::transmute(rgcbkeys), core::mem::transmute(ckeys), core::mem::transmute(pckeyspreread.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetReadFile(hffile: P0, pv: *mut core::ffi::c_void, cb: u32, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetReadFile(hffile: super::StructuredStorage::JET_HANDLE, pv: *mut core::ffi::c_void, cb: u32, pcbactual: Option<*mut u32>) -> i32 { 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(), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetReadFile(core::mem::transmute(hffile), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetReadFileInstance(instance: P0, hffile: P1, pv: *mut core::ffi::c_void, cb: u32, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetReadFileInstance(instance: JET_INSTANCE, hffile: super::StructuredStorage::JET_HANDLE, pv: *mut core::ffi::c_void, cb: u32, pcbactual: Option<*mut u32>) -> i32 { 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(), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetReadFileInstance(core::mem::transmute(instance), core::mem::transmute(hffile), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetRegisterCallback(sesid: P0, tableid: P1, cbtyp: u32, pcallback: JET_CALLBACK, pvcontext: Option<*const core::ffi::c_void>, phcallbackid: *const super::StructuredStorage::JET_HANDLE) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetRegisterCallback(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, cbtyp: u32, pcallback: JET_CALLBACK, pvcontext: Option<*const core::ffi::c_void>, phcallbackid: *const super::StructuredStorage::JET_HANDLE) -> i32 { 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(), core::mem::transmute(cbtyp), core::mem::transmute(pcallback), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), core::mem::transmute(phcallbackid)) + JetRegisterCallback(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(cbtyp), core::mem::transmute(pcallback), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phcallbackid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetRenameColumnA(sesid: P0, tableid: P1, szname: *const i8, sznamenew: *const i8, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetRenameColumnA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szname: *const i8, sznamenew: *const i8, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRenameColumnA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szname : *const i8, sznamenew : *const i8, grbit : u32) -> i32); - JetRenameColumnA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szname), core::mem::transmute(sznamenew), core::mem::transmute(grbit)) + JetRenameColumnA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szname), core::mem::transmute(sznamenew), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetRenameColumnW(sesid: P0, tableid: P1, szname: *const u16, sznamenew: *const u16, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetRenameColumnW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szname: *const u16, sznamenew: *const u16, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRenameColumnW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szname : *const u16, sznamenew : *const u16, grbit : u32) -> i32); - JetRenameColumnW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szname), core::mem::transmute(sznamenew), core::mem::transmute(grbit)) + JetRenameColumnW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szname), core::mem::transmute(sznamenew), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetRenameTableA(sesid: P0, dbid: u32, szname: *const i8, sznamenew: *const i8) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetRenameTableA(sesid: JET_SESID, dbid: u32, szname: *const i8, sznamenew: *const i8) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRenameTableA(sesid : JET_SESID, dbid : u32, szname : *const i8, sznamenew : *const i8) -> i32); - JetRenameTableA(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(szname), core::mem::transmute(sznamenew)) + JetRenameTableA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(szname), core::mem::transmute(sznamenew)) } #[inline] -pub unsafe fn JetRenameTableW(sesid: P0, dbid: u32, szname: *const u16, sznamenew: *const u16) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetRenameTableW(sesid: JET_SESID, dbid: u32, szname: *const u16, sznamenew: *const u16) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRenameTableW(sesid : JET_SESID, dbid : u32, szname : *const u16, sznamenew : *const u16) -> i32); - JetRenameTableW(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(szname), core::mem::transmute(sznamenew)) + JetRenameTableW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(szname), core::mem::transmute(sznamenew)) } #[inline] -pub unsafe fn JetResetSessionContext(sesid: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetResetSessionContext(sesid: JET_SESID) -> i32 { windows_targets::link!("esent.dll" "system" fn JetResetSessionContext(sesid : JET_SESID) -> i32); - JetResetSessionContext(sesid.param().abi()) + JetResetSessionContext(core::mem::transmute(sesid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetResetTableSequential(sesid: P0, tableid: P1, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetResetTableSequential(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetResetTableSequential(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, grbit : u32) -> i32); - JetResetTableSequential(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(grbit)) + JetResetTableSequential(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetResizeDatabase(sesid: P0, dbid: u32, cpgtarget: u32, pcpgactual: *mut u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetResizeDatabase(sesid: JET_SESID, dbid: u32, cpgtarget: u32, pcpgactual: *mut u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetResizeDatabase(sesid : JET_SESID, dbid : u32, cpgtarget : u32, pcpgactual : *mut u32, grbit : u32) -> i32); - JetResizeDatabase(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(cpgtarget), core::mem::transmute(pcpgactual), core::mem::transmute(grbit)) + JetResizeDatabase(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(cpgtarget), core::mem::transmute(pcpgactual), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetRestore2A(sz: *const i8, szdest: Option<*const i8>, pfn: JET_PFNSTATUS) -> i32 { +pub unsafe fn JetRestore2A(sz: *const i8, szdest: Option<*const i8>, pfn: Option) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRestore2A(sz : *const i8, szdest : *const i8, pfn : JET_PFNSTATUS) -> i32); - JetRestore2A(core::mem::transmute(sz), core::mem::transmute(szdest.unwrap_or(core::ptr::null())), core::mem::transmute(pfn)) + JetRestore2A(core::mem::transmute(sz), core::mem::transmute(szdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetRestore2W(sz: *const u16, szdest: Option<*const u16>, pfn: JET_PFNSTATUS) -> i32 { +pub unsafe fn JetRestore2W(sz: *const u16, szdest: Option<*const u16>, pfn: Option) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRestore2W(sz : *const u16, szdest : *const u16, pfn : JET_PFNSTATUS) -> i32); - JetRestore2W(core::mem::transmute(sz), core::mem::transmute(szdest.unwrap_or(core::ptr::null())), core::mem::transmute(pfn)) + JetRestore2W(core::mem::transmute(sz), core::mem::transmute(szdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetRestoreA(szsource: *const i8, pfn: JET_PFNSTATUS) -> i32 { +pub unsafe fn JetRestoreA(szsource: *const i8, pfn: Option) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRestoreA(szsource : *const i8, pfn : JET_PFNSTATUS) -> i32); - JetRestoreA(core::mem::transmute(szsource), core::mem::transmute(pfn)) + JetRestoreA(core::mem::transmute(szsource), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetRestoreInstanceA(instance: P0, sz: *const i8, szdest: Option<*const i8>, pfn: JET_PFNSTATUS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetRestoreInstanceA(instance: JET_INSTANCE, sz: *const i8, szdest: Option<*const i8>, pfn: Option) -> i32 { 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(), core::mem::transmute(sz), core::mem::transmute(szdest.unwrap_or(core::ptr::null())), core::mem::transmute(pfn)) + JetRestoreInstanceA(core::mem::transmute(instance), core::mem::transmute(sz), core::mem::transmute(szdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetRestoreInstanceW(instance: P0, sz: *const u16, szdest: Option<*const u16>, pfn: JET_PFNSTATUS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetRestoreInstanceW(instance: JET_INSTANCE, sz: *const u16, szdest: Option<*const u16>, pfn: Option) -> i32 { 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(), core::mem::transmute(sz), core::mem::transmute(szdest.unwrap_or(core::ptr::null())), core::mem::transmute(pfn)) + JetRestoreInstanceW(core::mem::transmute(instance), core::mem::transmute(sz), core::mem::transmute(szdest.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn JetRestoreW(szsource: *const u16, pfn: JET_PFNSTATUS) -> i32 { +pub unsafe fn JetRestoreW(szsource: *const u16, pfn: Option) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRestoreW(szsource : *const u16, pfn : JET_PFNSTATUS) -> i32); - JetRestoreW(core::mem::transmute(szsource), core::mem::transmute(pfn)) + JetRestoreW(core::mem::transmute(szsource), core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetRetrieveColumn(sesid: P0, tableid: P1, columnid: u32, pvdata: Option<*mut core::ffi::c_void>, cbdata: u32, pcbactual: Option<*mut u32>, grbit: u32, pretinfo: Option<*mut JET_RETINFO>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetRetrieveColumn(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, columnid: u32, pvdata: Option<*mut core::ffi::c_void>, cbdata: u32, pcbactual: Option<*mut u32>, grbit: u32, pretinfo: Option<*mut JET_RETINFO>) -> i32 { 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(), core::mem::transmute(columnid), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdata), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(grbit), core::mem::transmute(pretinfo.unwrap_or(core::ptr::null_mut()))) + JetRetrieveColumn(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(columnid), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit), core::mem::transmute(pretinfo.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetRetrieveColumns(sesid: P0, tableid: P1, pretrievecolumn: Option<&mut [JET_RETRIEVECOLUMN]>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetRetrieveColumns(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pretrievecolumn: Option<&mut [JET_RETRIEVECOLUMN]>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRetrieveColumns(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pretrievecolumn : *mut JET_RETRIEVECOLUMN, cretrievecolumn : u32) -> i32); - JetRetrieveColumns(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pretrievecolumn.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pretrievecolumn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + JetRetrieveColumns(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pretrievecolumn.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pretrievecolumn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetRetrieveKey(sesid: P0, tableid: P1, pvkey: Option<*mut core::ffi::c_void>, cbmax: u32, pcbactual: Option<*mut u32>, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetRetrieveKey(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvkey: Option<*mut core::ffi::c_void>, cbmax: u32, pcbactual: Option<*mut u32>, grbit: u32) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(grbit)) + JetRetrieveKey(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbmax), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetRollback(sesid: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetRollback(sesid: JET_SESID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRollback(sesid : JET_SESID, grbit : u32) -> i32); - JetRollback(sesid.param().abi(), core::mem::transmute(grbit)) + JetRollback(core::mem::transmute(sesid), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSeek(sesid: P0, tableid: P1, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSeek(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSeek(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, grbit : u32) -> i32); - JetSeek(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(grbit)) + JetSeek(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetColumn(sesid: P0, tableid: P1, columnid: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: u32, grbit: u32, psetinfo: Option<*const JET_SETINFO>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetColumn(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, columnid: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: u32, grbit: u32, psetinfo: Option<*const JET_SETINFO>) -> i32 { 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(), core::mem::transmute(columnid), core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata), core::mem::transmute(grbit), core::mem::transmute(psetinfo.unwrap_or(core::ptr::null()))) + JetSetColumn(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(columnid), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata), core::mem::transmute(grbit), core::mem::transmute(psetinfo.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn JetSetColumnDefaultValueA(sesid: JET_SESID, dbid: u32, sztablename: *const i8, szcolumnname: *const i8, pvdata: *const core::ffi::c_void, cbdata: u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetColumnDefaultValueA(sesid : JET_SESID, dbid : u32, sztablename : *const i8, szcolumnname : *const i8, pvdata : *const core::ffi::c_void, cbdata : u32, grbit : u32) -> i32); - JetSetColumnDefaultValueA(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(szcolumnname), core::mem::transmute(pvdata), core::mem::transmute(cbdata), core::mem::transmute(grbit)) + JetSetColumnDefaultValueA(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(szcolumnname), core::mem::transmute(pvdata), core::mem::transmute(cbdata), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetSetColumnDefaultValueW(sesid: P0, dbid: u32, sztablename: *const u16, szcolumnname: *const u16, pvdata: *const core::ffi::c_void, cbdata: u32, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetSetColumnDefaultValueW(sesid: JET_SESID, dbid: u32, sztablename: *const u16, szcolumnname: *const u16, pvdata: *const core::ffi::c_void, cbdata: u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetColumnDefaultValueW(sesid : JET_SESID, dbid : u32, sztablename : *const u16, szcolumnname : *const u16, pvdata : *const core::ffi::c_void, cbdata : u32, grbit : u32) -> i32); - JetSetColumnDefaultValueW(sesid.param().abi(), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(szcolumnname), core::mem::transmute(pvdata), core::mem::transmute(cbdata), core::mem::transmute(grbit)) + JetSetColumnDefaultValueW(core::mem::transmute(sesid), core::mem::transmute(dbid), core::mem::transmute(sztablename), core::mem::transmute(szcolumnname), core::mem::transmute(pvdata), core::mem::transmute(cbdata), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetColumns(sesid: P0, tableid: P1, psetcolumn: Option<&[JET_SETCOLUMN]>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetColumns(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, psetcolumn: Option<&[JET_SETCOLUMN]>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetColumns(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, psetcolumn : *const JET_SETCOLUMN, csetcolumn : u32) -> i32); - JetSetColumns(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(psetcolumn.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psetcolumn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + JetSetColumns(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(psetcolumn.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psetcolumn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCurrentIndex2A(sesid: P0, tableid: P1, szindexname: Option<*const i8>, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCurrentIndex2A(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const i8>, grbit: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(grbit)) + JetSetCurrentIndex2A(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCurrentIndex2W(sesid: P0, tableid: P1, szindexname: Option<*const u16>, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCurrentIndex2W(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const u16>, grbit: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(grbit)) + JetSetCurrentIndex2W(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCurrentIndex3A(sesid: P0, tableid: P1, szindexname: Option<*const i8>, grbit: u32, itagsequence: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCurrentIndex3A(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const i8>, grbit: u32, itagsequence: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(grbit), core::mem::transmute(itagsequence)) + JetSetCurrentIndex3A(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit), core::mem::transmute(itagsequence)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCurrentIndex3W(sesid: P0, tableid: P1, szindexname: Option<*const u16>, grbit: u32, itagsequence: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCurrentIndex3W(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const u16>, grbit: u32, itagsequence: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(grbit), core::mem::transmute(itagsequence)) + JetSetCurrentIndex3W(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit), core::mem::transmute(itagsequence)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCurrentIndex4A(sesid: P0, tableid: P1, szindexname: Option<*const i8>, pindexid: Option<*const JET_INDEXID>, grbit: u32, itagsequence: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCurrentIndex4A(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const i8>, pindexid: Option<*const JET_INDEXID>, grbit: u32, itagsequence: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), core::mem::transmute(grbit), core::mem::transmute(itagsequence)) + JetSetCurrentIndex4A(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit), core::mem::transmute(itagsequence)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCurrentIndex4W(sesid: P0, tableid: P1, szindexname: Option<*const u16>, pindexid: Option<*const JET_INDEXID>, grbit: u32, itagsequence: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCurrentIndex4W(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const u16>, pindexid: Option<*const JET_INDEXID>, grbit: u32, itagsequence: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), core::mem::transmute(grbit), core::mem::transmute(itagsequence)) + JetSetCurrentIndex4W(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit), core::mem::transmute(itagsequence)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCurrentIndexA(sesid: P0, tableid: P1, szindexname: Option<*const i8>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCurrentIndexA(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const i8>) -> i32 { 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(core::ptr::null()))) + JetSetCurrentIndexA(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCurrentIndexW(sesid: P0, tableid: P1, szindexname: Option<*const u16>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCurrentIndexW(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, szindexname: Option<*const u16>) -> i32 { 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(core::ptr::null()))) + JetSetCurrentIndexW(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(szindexname.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetCursorFilter(sesid: P0, tableid: P1, rgcolumnfilters: &[JET_INDEX_COLUMN], grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetCursorFilter(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, rgcolumnfilters: &[JET_INDEX_COLUMN], grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetCursorFilter(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, rgcolumnfilters : *const JET_INDEX_COLUMN, ccolumnfilters : u32, grbit : u32) -> i32); - JetSetCursorFilter(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(rgcolumnfilters.as_ptr()), rgcolumnfilters.len().try_into().unwrap(), core::mem::transmute(grbit)) + JetSetCursorFilter(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(rgcolumnfilters.as_ptr()), rgcolumnfilters.len().try_into().unwrap(), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetSetDatabaseSizeA(sesid: P0, szdatabasename: *const i8, cpg: u32, pcpgreal: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetSetDatabaseSizeA(sesid: JET_SESID, szdatabasename: *const i8, cpg: u32, pcpgreal: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetDatabaseSizeA(sesid : JET_SESID, szdatabasename : *const i8, cpg : u32, pcpgreal : *mut u32) -> i32); - JetSetDatabaseSizeA(sesid.param().abi(), core::mem::transmute(szdatabasename), core::mem::transmute(cpg), core::mem::transmute(pcpgreal)) + JetSetDatabaseSizeA(core::mem::transmute(sesid), core::mem::transmute(szdatabasename), core::mem::transmute(cpg), core::mem::transmute(pcpgreal)) } #[inline] -pub unsafe fn JetSetDatabaseSizeW(sesid: P0, szdatabasename: *const u16, cpg: u32, pcpgreal: *mut u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetSetDatabaseSizeW(sesid: JET_SESID, szdatabasename: *const u16, cpg: u32, pcpgreal: *mut u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetDatabaseSizeW(sesid : JET_SESID, szdatabasename : *const u16, cpg : u32, pcpgreal : *mut u32) -> i32); - JetSetDatabaseSizeW(sesid.param().abi(), core::mem::transmute(szdatabasename), core::mem::transmute(cpg), core::mem::transmute(pcpgreal)) + JetSetDatabaseSizeW(core::mem::transmute(sesid), core::mem::transmute(szdatabasename), core::mem::transmute(cpg), core::mem::transmute(pcpgreal)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetIndexRange(sesid: P0, tableidsrc: P1, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetIndexRange(sesid: JET_SESID, tableidsrc: super::StructuredStorage::JET_TABLEID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetIndexRange(sesid : JET_SESID, tableidsrc : super::StructuredStorage:: JET_TABLEID, grbit : u32) -> i32); - JetSetIndexRange(sesid.param().abi(), tableidsrc.param().abi(), core::mem::transmute(grbit)) + JetSetIndexRange(core::mem::transmute(sesid), core::mem::transmute(tableidsrc), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetLS(sesid: P0, tableid: P1, ls: P2, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn JetSetLS(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, ls: JET_LS, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetLS(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, ls : JET_LS, grbit : u32) -> i32); - JetSetLS(sesid.param().abi(), tableid.param().abi(), ls.param().abi(), core::mem::transmute(grbit)) + JetSetLS(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(ls), core::mem::transmute(grbit)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetSessionContext(sesid: P0, ulcontext: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetSessionContext(sesid: JET_SESID, ulcontext: super::StructuredStorage::JET_API_PTR) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetSessionContext(sesid : JET_SESID, ulcontext : super::StructuredStorage:: JET_API_PTR) -> i32); - JetSetSessionContext(sesid.param().abi(), ulcontext.param().abi()) + JetSetSessionContext(core::mem::transmute(sesid), core::mem::transmute(ulcontext)) } #[inline] -pub unsafe fn JetSetSessionParameter(sesid: P0, sesparamid: u32, pvparam: Option<*const core::ffi::c_void>, cbparam: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetSetSessionParameter(sesid: Option, sesparamid: u32, pvparam: Option<*const core::ffi::c_void>, cbparam: u32) -> i32 { 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(), core::mem::transmute(sesparamid), core::mem::transmute(pvparam.unwrap_or(core::ptr::null())), core::mem::transmute(cbparam)) + JetSetSessionParameter(core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), core::mem::transmute(sesparamid), core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbparam)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetSystemParameterA(pinstance: Option<*mut JET_INSTANCE>, sesid: P1, paramid: u32, lparam: P3, szparam: Option<*const i8>) -> i32 -where - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn JetSetSystemParameterA(pinstance: Option<*mut JET_INSTANCE>, sesid: Option, paramid: u32, lparam: Option, szparam: Option<*const i8>) -> i32 { 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(core::ptr::null_mut())), sesid.param().abi(), core::mem::transmute(paramid), lparam.param().abi(), core::mem::transmute(szparam.unwrap_or(core::ptr::null()))) + JetSetSystemParameterA(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), core::mem::transmute(paramid), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(szparam.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetSystemParameterW(pinstance: Option<*mut JET_INSTANCE>, sesid: P1, paramid: u32, lparam: P3, szparam: Option<*const u16>) -> i32 -where - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn JetSetSystemParameterW(pinstance: Option<*mut JET_INSTANCE>, sesid: Option, paramid: u32, lparam: Option, szparam: Option<*const u16>) -> i32 { 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(core::ptr::null_mut())), sesid.param().abi(), core::mem::transmute(paramid), lparam.param().abi(), core::mem::transmute(szparam.unwrap_or(core::ptr::null()))) + JetSetSystemParameterW(core::mem::transmute(pinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(sesid.unwrap_or(core::mem::zeroed())), core::mem::transmute(paramid), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(szparam.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetSetTableSequential(sesid: P0, tableid: P1, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetSetTableSequential(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetSetTableSequential(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, grbit : u32) -> i32); - JetSetTableSequential(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(grbit)) + JetSetTableSequential(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(grbit)) } #[inline] pub unsafe fn JetStopBackup() -> i32 { @@ -1846,12 +1229,9 @@ pub unsafe fn JetStopBackup() -> i32 { JetStopBackup() } #[inline] -pub unsafe fn JetStopBackupInstance(instance: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetStopBackupInstance(instance: JET_INSTANCE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetStopBackupInstance(instance : JET_INSTANCE) -> i32); - JetStopBackupInstance(instance.param().abi()) + JetStopBackupInstance(core::mem::transmute(instance)) } #[inline] pub unsafe fn JetStopService() -> i32 { @@ -1859,36 +1239,24 @@ pub unsafe fn JetStopService() -> i32 { JetStopService() } #[inline] -pub unsafe fn JetStopServiceInstance(instance: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetStopServiceInstance(instance: JET_INSTANCE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetStopServiceInstance(instance : JET_INSTANCE) -> i32); - JetStopServiceInstance(instance.param().abi()) + JetStopServiceInstance(core::mem::transmute(instance)) } #[inline] -pub unsafe fn JetStopServiceInstance2(instance: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetStopServiceInstance2(instance: JET_INSTANCE, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetStopServiceInstance2(instance : JET_INSTANCE, grbit : u32) -> i32); - JetStopServiceInstance2(instance.param().abi(), core::mem::transmute(grbit)) + JetStopServiceInstance2(core::mem::transmute(instance), core::mem::transmute(grbit)) } #[inline] -pub unsafe fn JetTerm(instance: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetTerm(instance: JET_INSTANCE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetTerm(instance : JET_INSTANCE) -> i32); - JetTerm(instance.param().abi()) + JetTerm(core::mem::transmute(instance)) } #[inline] -pub unsafe fn JetTerm2(instance: P0, grbit: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetTerm2(instance: JET_INSTANCE, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetTerm2(instance : JET_INSTANCE, grbit : u32) -> i32); - JetTerm2(instance.param().abi(), core::mem::transmute(grbit)) + JetTerm2(core::mem::transmute(instance), core::mem::transmute(grbit)) } #[inline] pub unsafe fn JetTruncateLog() -> i32 { @@ -1896,43 +1264,27 @@ pub unsafe fn JetTruncateLog() -> i32 { JetTruncateLog() } #[inline] -pub unsafe fn JetTruncateLogInstance(instance: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn JetTruncateLogInstance(instance: JET_INSTANCE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetTruncateLogInstance(instance : JET_INSTANCE) -> i32); - JetTruncateLogInstance(instance.param().abi()) + JetTruncateLogInstance(core::mem::transmute(instance)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetUnregisterCallback(sesid: P0, tableid: P1, cbtyp: u32, hcallbackid: P3) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn JetUnregisterCallback(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, cbtyp: u32, hcallbackid: super::StructuredStorage::JET_HANDLE) -> i32 { windows_targets::link!("esent.dll" "system" fn JetUnregisterCallback(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, cbtyp : u32, hcallbackid : super::StructuredStorage:: JET_HANDLE) -> i32); - JetUnregisterCallback(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(cbtyp), hcallbackid.param().abi()) + JetUnregisterCallback(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(cbtyp), core::mem::transmute(hcallbackid)) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetUpdate(sesid: P0, tableid: P1, pvbookmark: Option<*mut core::ffi::c_void>, cbbookmark: u32, pcbactual: Option<*mut u32>) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetUpdate(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvbookmark: Option<*mut core::ffi::c_void>, cbbookmark: u32, pcbactual: Option<*mut u32>) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbbookmark), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) + JetUpdate(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvbookmark.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbookmark), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] -pub unsafe fn JetUpdate2(sesid: P0, tableid: P1, pvbookmark: Option<*mut core::ffi::c_void>, cbbookmark: u32, pcbactual: Option<*mut u32>, grbit: u32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn JetUpdate2(sesid: JET_SESID, tableid: super::StructuredStorage::JET_TABLEID, pvbookmark: Option<*mut core::ffi::c_void>, cbbookmark: u32, pcbactual: Option<*mut u32>, grbit: u32) -> i32 { 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(core::ptr::null_mut())), core::mem::transmute(cbbookmark), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(grbit)) + JetUpdate2(core::mem::transmute(sesid), core::mem::transmute(tableid), core::mem::transmute(pvbookmark.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbookmark), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed())), core::mem::transmute(grbit)) } pub const JET_BASE_NAME_LENGTH: u32 = 3u32; #[repr(C, packed(1))] 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 481f85bb93..60b3e33f54 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(core::ptr::null_mut())), core::mem::transmute(pbenabled.unwrap_or(core::ptr::null_mut()))) + OfflineFilesQueryStatus(core::mem::transmute(pbactive.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbenabled.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null_mut())), core::mem::transmute(pbenabled.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbavailable.unwrap_or(core::ptr::null_mut()))) + OfflineFilesQueryStatusEx(core::mem::transmute(pbactive.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbenabled.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbavailable.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn OfflineFilesStart() -> u32 { @@ -160,14 +160,13 @@ impl windows_core::RuntimeName for IEnumOfflineFilesSettings {} windows_core::imp::define_interface!(IOfflineFilesCache, IOfflineFilesCache_Vtbl, 0x855d6203_7914_48b9_8d40_4c56f5acffc5); windows_core::imp::interface_hierarchy!(IOfflineFilesCache, windows_core::IUnknown); impl IOfflineFilesCache { - pub unsafe fn Synchronize(&self, hwndparent: P0, rgpszpaths: &[windows_core::PCWSTR], basync: P3, dwsynccontrol: u32, pisyncconflicthandler: P5, piprogress: P6, psyncid: Option<*const windows_core::GUID>) -> windows_core::Result<()> + pub unsafe fn Synchronize(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], basync: P3, dwsynccontrol: u32, pisyncconflicthandler: P5, piprogress: P6, psyncid: Option<*const windows_core::GUID>) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, P5: windows_core::Param, P6: 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(), core::mem::transmute(dwsynccontrol), pisyncconflicthandler.param().abi(), piprogress.param().abi(), core::mem::transmute(psyncid.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), basync.param().abi(), core::mem::transmute(dwsynccontrol), pisyncconflicthandler.param().abi(), piprogress.param().abi(), core::mem::transmute(psyncid.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn DeleteItems(&self, rgpszpaths: &[windows_core::PCWSTR], dwflags: u32, basync: P3, piprogress: P4) -> windows_core::Result<()> where @@ -184,35 +183,32 @@ impl IOfflineFilesCache { { (windows_core::Interface::vtable(self).DeleteItemsForUser)(windows_core::Interface::as_raw(self), pszuser.param().abi(), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), core::mem::transmute(dwflags), basync.param().abi(), piprogress.param().abi()).ok() } - pub unsafe fn Pin(&self, hwndparent: P0, rgpszpaths: &[windows_core::PCWSTR], bdeep: P3, basync: P4, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> + pub unsafe fn Pin(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], bdeep: P3, basync: P4, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).Pin)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.param().abi(), basync.param().abi(), core::mem::transmute(dwpincontrolflags), piprogress.param().abi()).ok() + (windows_core::Interface::vtable(self).Pin)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.param().abi(), basync.param().abi(), core::mem::transmute(dwpincontrolflags), piprogress.param().abi()).ok() } - pub unsafe fn Unpin(&self, hwndparent: P0, rgpszpaths: &[windows_core::PCWSTR], bdeep: P3, basync: P4, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> + pub unsafe fn Unpin(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], bdeep: P3, basync: P4, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).Unpin)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.param().abi(), basync.param().abi(), core::mem::transmute(dwpincontrolflags), piprogress.param().abi()).ok() + (windows_core::Interface::vtable(self).Unpin)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.param().abi(), basync.param().abi(), core::mem::transmute(dwpincontrolflags), piprogress.param().abi()).ok() } pub unsafe fn GetEncryptionStatus(&self, pbencrypted: *mut super::super::Foundation::BOOL, pbpartial: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetEncryptionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbencrypted), core::mem::transmute(pbpartial)).ok() } - pub unsafe fn Encrypt(&self, hwndparent: P0, bencrypt: P1, dwencryptioncontrolflags: u32, basync: P3, piprogress: P4) -> windows_core::Result<()> + pub unsafe fn Encrypt(&self, hwndparent: Option, bencrypt: P1, dwencryptioncontrolflags: u32, basync: P3, piprogress: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Encrypt)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), bencrypt.param().abi(), core::mem::transmute(dwencryptioncontrolflags), basync.param().abi(), piprogress.param().abi()).ok() + (windows_core::Interface::vtable(self).Encrypt)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), bencrypt.param().abi(), core::mem::transmute(dwencryptioncontrolflags), basync.param().abi(), piprogress.param().abi()).ok() } pub unsafe fn FindItem(&self, pszpath: P0, dwqueryflags: u32) -> windows_core::Result where @@ -602,25 +598,18 @@ impl IOfflineFilesConnectionInfo { pub unsafe fn GetConnectState(&self, pconnectstate: *mut OFFLINEFILES_CONNECT_STATE, pofflinereason: *mut OFFLINEFILES_OFFLINE_REASON) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetConnectState)(windows_core::Interface::as_raw(self), core::mem::transmute(pconnectstate), core::mem::transmute(pofflinereason)).ok() } - pub unsafe fn SetConnectState(&self, hwndparent: P0, dwflags: u32, connectstate: OFFLINEFILES_CONNECT_STATE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetConnectState)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(connectstate)).ok() + pub unsafe fn SetConnectState(&self, hwndparent: Option, dwflags: u32, connectstate: OFFLINEFILES_CONNECT_STATE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetConnectState)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(connectstate)).ok() } - pub unsafe fn TransitionOnline(&self, hwndparent: P0, dwflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TransitionOnline)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn TransitionOnline(&self, hwndparent: Option, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TransitionOnline)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } - pub unsafe fn TransitionOffline(&self, hwndparent: P0, dwflags: u32, bforceopenfilesclosed: P2) -> windows_core::Result + pub unsafe fn TransitionOffline(&self, hwndparent: Option, dwflags: u32, bforceopenfilesclosed: P2) -> windows_core::Result where - P0: windows_core::Param, P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TransitionOffline)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(dwflags), bforceopenfilesclosed.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).TransitionOffline)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), bforceopenfilesclosed.param().abi(), &mut result__).map(|| result__) } } #[repr(C)] 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 42bdb530a4..772997f7b5 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 @@ -1,11 +1,8 @@ #[inline] -pub unsafe fn ActivatePackageVirtualizationContext(context: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn ActivatePackageVirtualizationContext(context: PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn ActivatePackageVirtualizationContext(context : PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE, cookie : *mut usize) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - ActivatePackageVirtualizationContext(context.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + ActivatePackageVirtualizationContext(core::mem::transmute(context), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn AddPackageDependency(packagedependencyid: P0, rank: i32, options: AddPackageDependencyOptions, packagedependencycontext: *mut PACKAGEDEPENDENCY_CONTEXT, packagefullname: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -13,71 +10,47 @@ 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(), core::mem::transmute(rank), core::mem::transmute(options), core::mem::transmute(packagedependencycontext), core::mem::transmute(packagefullname.unwrap_or(core::ptr::null_mut()))).ok() + AddPackageDependency(packagedependencyid.param().abi(), core::mem::transmute(rank), core::mem::transmute(options), core::mem::transmute(packagedependencycontext), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn AppPolicyGetClrCompat(processtoken: P0, policy: *mut AppPolicyClrCompat) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn AppPolicyGetClrCompat(processtoken: super::super::super::Foundation::HANDLE, policy: *mut AppPolicyClrCompat) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetClrCompat(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyClrCompat) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetClrCompat(processtoken.param().abi(), core::mem::transmute(policy)) + AppPolicyGetClrCompat(core::mem::transmute(processtoken), core::mem::transmute(policy)) } #[inline] -pub unsafe fn AppPolicyGetCreateFileAccess(processtoken: P0, policy: *mut AppPolicyCreateFileAccess) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn AppPolicyGetCreateFileAccess(processtoken: super::super::super::Foundation::HANDLE, policy: *mut AppPolicyCreateFileAccess) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetCreateFileAccess(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyCreateFileAccess) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetCreateFileAccess(processtoken.param().abi(), core::mem::transmute(policy)) + AppPolicyGetCreateFileAccess(core::mem::transmute(processtoken), core::mem::transmute(policy)) } #[inline] -pub unsafe fn AppPolicyGetLifecycleManagement(processtoken: P0, policy: *mut AppPolicyLifecycleManagement) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn AppPolicyGetLifecycleManagement(processtoken: super::super::super::Foundation::HANDLE, policy: *mut AppPolicyLifecycleManagement) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetLifecycleManagement(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyLifecycleManagement) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetLifecycleManagement(processtoken.param().abi(), core::mem::transmute(policy)) + AppPolicyGetLifecycleManagement(core::mem::transmute(processtoken), core::mem::transmute(policy)) } #[inline] -pub unsafe fn AppPolicyGetMediaFoundationCodecLoading(processtoken: P0, policy: *mut AppPolicyMediaFoundationCodecLoading) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn AppPolicyGetMediaFoundationCodecLoading(processtoken: super::super::super::Foundation::HANDLE, policy: *mut AppPolicyMediaFoundationCodecLoading) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetMediaFoundationCodecLoading(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyMediaFoundationCodecLoading) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetMediaFoundationCodecLoading(processtoken.param().abi(), core::mem::transmute(policy)) + AppPolicyGetMediaFoundationCodecLoading(core::mem::transmute(processtoken), core::mem::transmute(policy)) } #[inline] -pub unsafe fn AppPolicyGetProcessTerminationMethod(processtoken: P0, policy: *mut AppPolicyProcessTerminationMethod) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn AppPolicyGetProcessTerminationMethod(processtoken: super::super::super::Foundation::HANDLE, policy: *mut AppPolicyProcessTerminationMethod) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetProcessTerminationMethod(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyProcessTerminationMethod) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetProcessTerminationMethod(processtoken.param().abi(), core::mem::transmute(policy)) + AppPolicyGetProcessTerminationMethod(core::mem::transmute(processtoken), core::mem::transmute(policy)) } #[inline] -pub unsafe fn AppPolicyGetShowDeveloperDiagnostic(processtoken: P0, policy: *mut AppPolicyShowDeveloperDiagnostic) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn AppPolicyGetShowDeveloperDiagnostic(processtoken: super::super::super::Foundation::HANDLE, policy: *mut AppPolicyShowDeveloperDiagnostic) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetShowDeveloperDiagnostic(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyShowDeveloperDiagnostic) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetShowDeveloperDiagnostic(processtoken.param().abi(), core::mem::transmute(policy)) + AppPolicyGetShowDeveloperDiagnostic(core::mem::transmute(processtoken), core::mem::transmute(policy)) } #[inline] -pub unsafe fn AppPolicyGetThreadInitializationType(processtoken: P0, policy: *mut AppPolicyThreadInitializationType) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn AppPolicyGetThreadInitializationType(processtoken: super::super::super::Foundation::HANDLE, policy: *mut AppPolicyThreadInitializationType) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetThreadInitializationType(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyThreadInitializationType) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetThreadInitializationType(processtoken.param().abi(), core::mem::transmute(policy)) + AppPolicyGetThreadInitializationType(core::mem::transmute(processtoken), core::mem::transmute(policy)) } #[inline] -pub unsafe fn AppPolicyGetWindowingModel(processtoken: P0, policy: *mut AppPolicyWindowingModel) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn AppPolicyGetWindowingModel(processtoken: super::super::super::Foundation::HANDLE, policy: *mut AppPolicyWindowingModel) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetWindowingModel(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyWindowingModel) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetWindowingModel(processtoken.param().abi(), core::mem::transmute(policy)) + AppPolicyGetWindowingModel(core::mem::transmute(processtoken), core::mem::transmute(policy)) } #[inline] pub unsafe fn CheckIsMSIXPackage(packagefullname: P0) -> windows_core::Result @@ -116,91 +89,82 @@ where DeletePackageDependency(packagedependencyid.param().abi()).ok() } #[inline] -pub unsafe fn DuplicatePackageVirtualizationContext(sourcecontext: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn DuplicatePackageVirtualizationContext(sourcecontext: PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn DuplicatePackageVirtualizationContext(sourcecontext : PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE, destcontext : *mut PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DuplicatePackageVirtualizationContext(sourcecontext.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DuplicatePackageVirtualizationContext(core::mem::transmute(sourcecontext), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn FindPackagesByPackageFamily(packagefamilyname: P0, packagefilters: u32, count: *mut u32, packagefullnames: Option<*mut windows_core::PWSTR>, bufferlength: *mut u32, buffer: windows_core::PWSTR, packageproperties: Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn FindPackagesByPackageFamily(packagefamilyname: P0, packagefilters: u32, count: *mut u32, packagefullnames: Option<*mut windows_core::PWSTR>, bufferlength: *mut u32, buffer: Option, packageproperties: Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR 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(), core::mem::transmute(packagefilters), core::mem::transmute(count), core::mem::transmute(packagefullnames.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(buffer), core::mem::transmute(packageproperties.unwrap_or(core::ptr::null_mut()))) + FindPackagesByPackageFamily(packagefamilyname.param().abi(), core::mem::transmute(packagefilters), core::mem::transmute(count), core::mem::transmute(packagefullnames.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(packageproperties.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FormatApplicationUserModelId(packagefamilyname: P0, packagerelativeapplicationid: P1, applicationusermodelidlength: *mut u32, applicationusermodelid: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn FormatApplicationUserModelId(packagefamilyname: P0, packagerelativeapplicationid: P1, applicationusermodelidlength: *mut u32, applicationusermodelid: Option) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FormatApplicationUserModelId(packagefamilyname : windows_core::PCWSTR, packagerelativeapplicationid : windows_core::PCWSTR, applicationusermodelidlength : *mut u32, applicationusermodelid : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - FormatApplicationUserModelId(packagefamilyname.param().abi(), packagerelativeapplicationid.param().abi(), core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid)) + FormatApplicationUserModelId(packagefamilyname.param().abi(), packagerelativeapplicationid.param().abi(), core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetApplicationUserModelId(hprocess: P0, applicationusermodelidlength: *mut u32, applicationusermodelid: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetApplicationUserModelId(hprocess: super::super::super::Foundation::HANDLE, applicationusermodelidlength: *mut u32, applicationusermodelid: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn GetApplicationUserModelId(hprocess : super::super::super::Foundation:: HANDLE, applicationusermodelidlength : *mut u32, applicationusermodelid : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetApplicationUserModelId(hprocess.param().abi(), core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid)) + GetApplicationUserModelId(core::mem::transmute(hprocess), core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetApplicationUserModelIdFromToken(token: P0, applicationusermodelidlength: *mut u32, applicationusermodelid: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetApplicationUserModelIdFromToken(token: super::super::super::Foundation::HANDLE, applicationusermodelidlength: *mut u32, applicationusermodelid: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn GetApplicationUserModelIdFromToken(token : super::super::super::Foundation:: HANDLE, applicationusermodelidlength : *mut u32, applicationusermodelid : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetApplicationUserModelIdFromToken(token.param().abi(), core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid)) + GetApplicationUserModelIdFromToken(core::mem::transmute(token), core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetCurrentApplicationUserModelId(applicationusermodelidlength: *mut u32, applicationusermodelid: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentApplicationUserModelId(applicationusermodelidlength: *mut u32, applicationusermodelid: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn GetCurrentApplicationUserModelId(applicationusermodelidlength : *mut u32, applicationusermodelid : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentApplicationUserModelId(core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid)) + GetCurrentApplicationUserModelId(core::mem::transmute(applicationusermodelidlength), core::mem::transmute(applicationusermodelid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetCurrentPackageFamilyName(packagefamilynamelength: *mut u32, packagefamilyname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackageFamilyName(packagefamilynamelength: *mut u32, packagefamilyname: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackageFamilyName(packagefamilynamelength : *mut u32, packagefamilyname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackageFamilyName(core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname)) + GetCurrentPackageFamilyName(core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetCurrentPackageFullName(packagefullnamelength: *mut u32, packagefullname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackageFullName(packagefullnamelength: *mut u32, packagefullname: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackageFullName(packagefullnamelength : *mut u32, packagefullname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackageFullName(core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname)) + GetCurrentPackageFullName(core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut()))) + GetCurrentPackageId(core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(flags), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) + GetCurrentPackageInfo(core::mem::transmute(flags), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(flags), core::mem::transmute(packagepathtype), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) + GetCurrentPackageInfo2(core::mem::transmute(flags), core::mem::transmute(packagepathtype), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(flags), core::mem::transmute(packageinfotype), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))).ok() + GetCurrentPackageInfo3(core::mem::transmute(flags), core::mem::transmute(packageinfotype), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetCurrentPackagePath(pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackagePath(pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackagePath(pathlength : *mut u32, path : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackagePath(core::mem::transmute(pathlength), core::mem::transmute(path)) + GetCurrentPackagePath(core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetCurrentPackagePath2(packagepathtype: PackagePathType, pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackagePath2(packagepathtype: PackagePathType, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-3.dll" "system" fn GetCurrentPackagePath2(packagepathtype : PackagePathType, pathlength : *mut u32, path : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackagePath2(core::mem::transmute(packagepathtype), core::mem::transmute(pathlength), core::mem::transmute(path)) + GetCurrentPackagePath2(core::mem::transmute(packagepathtype), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetCurrentPackageVirtualizationContext() -> PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE { @@ -208,50 +172,35 @@ pub unsafe fn GetCurrentPackageVirtualizationContext() -> PACKAGE_VIRTUALIZATION GetCurrentPackageVirtualizationContext() } #[inline] -pub unsafe fn GetIdForPackageDependencyContext(packagedependencycontext: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetIdForPackageDependencyContext(packagedependencycontext: PACKAGEDEPENDENCY_CONTEXT) -> windows_core::Result { windows_targets::link!("kernelbase.dll" "system" fn GetIdForPackageDependencyContext(packagedependencycontext : PACKAGEDEPENDENCY_CONTEXT, packagedependencyid : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetIdForPackageDependencyContext(packagedependencycontext.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + GetIdForPackageDependencyContext(core::mem::transmute(packagedependencycontext), &mut result__).map(|| core::mem::transmute(result__)) } #[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(core::mem::transmute(packageinforeference), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) + GetPackageApplicationIds(core::mem::transmute(packageinforeference), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPackageFamilyName(hprocess: P0, packagefamilynamelength: *mut u32, packagefamilyname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetPackageFamilyName(hprocess: super::super::super::Foundation::HANDLE, packagefamilynamelength: *mut u32, packagefamilyname: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn GetPackageFamilyName(hprocess : super::super::super::Foundation:: HANDLE, packagefamilynamelength : *mut u32, packagefamilyname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageFamilyName(hprocess.param().abi(), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname)) + GetPackageFamilyName(core::mem::transmute(hprocess), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPackageFamilyNameFromToken(token: P0, packagefamilynamelength: *mut u32, packagefamilyname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetPackageFamilyNameFromToken(token: super::super::super::Foundation::HANDLE, packagefamilynamelength: *mut u32, packagefamilyname: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn GetPackageFamilyNameFromToken(token : super::super::super::Foundation:: HANDLE, packagefamilynamelength : *mut u32, packagefamilyname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageFamilyNameFromToken(token.param().abi(), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname)) + GetPackageFamilyNameFromToken(core::mem::transmute(token), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPackageFullName(hprocess: P0, packagefullnamelength: *mut u32, packagefullname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetPackageFullName(hprocess: super::super::super::Foundation::HANDLE, packagefullnamelength: *mut u32, packagefullname: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn GetPackageFullName(hprocess : super::super::super::Foundation:: HANDLE, packagefullnamelength : *mut u32, packagefullname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageFullName(hprocess.param().abi(), core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname)) + GetPackageFullName(core::mem::transmute(hprocess), core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPackageFullNameFromToken(token: P0, packagefullnamelength: *mut u32, packagefullname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetPackageFullNameFromToken(token: super::super::super::Foundation::HANDLE, packagefullnamelength: *mut u32, packagefullname: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn GetPackageFullNameFromToken(token : super::super::super::Foundation:: HANDLE, packagefullnamelength : *mut u32, packagefullname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageFullNameFromToken(token.param().abi(), core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname)) + GetPackageFullNameFromToken(core::mem::transmute(token), core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetPackageGraphRevisionId() -> u32 { @@ -259,51 +208,48 @@ pub unsafe fn GetPackageGraphRevisionId() -> u32 { GetPackageGraphRevisionId() } #[inline] -pub unsafe fn GetPackageId(hprocess: P0, bufferlength: *mut u32, buffer: Option<*mut u8>) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetPackageId(hprocess: super::super::super::Foundation::HANDLE, bufferlength: *mut u32, buffer: Option<*mut u8>) -> super::super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut()))) + GetPackageId(core::mem::transmute(hprocess), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(packageinforeference), core::mem::transmute(flags), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) + GetPackageInfo(core::mem::transmute(packageinforeference), core::mem::transmute(flags), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(packageinforeference), core::mem::transmute(flags), core::mem::transmute(packagepathtype), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) + GetPackageInfo2(core::mem::transmute(packageinforeference), core::mem::transmute(flags), core::mem::transmute(packagepathtype), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPackagePath(packageid: *const PACKAGE_ID, reserved: u32, pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetPackagePath(packageid: *const PACKAGE_ID, reserved: Option, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn GetPackagePath(packageid : *const PACKAGE_ID, reserved : u32, pathlength : *mut u32, path : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackagePath(core::mem::transmute(packageid), core::mem::transmute(reserved), core::mem::transmute(pathlength), core::mem::transmute(path)) + GetPackagePath(core::mem::transmute(packageid), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetPackagePathByFullName(packagefullname : windows_core::PCWSTR, pathlength : *mut u32, path : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackagePathByFullName(packagefullname.param().abi(), core::mem::transmute(pathlength), core::mem::transmute(path)) + GetPackagePathByFullName(packagefullname.param().abi(), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-3.dll" "system" fn GetPackagePathByFullName2(packagefullname : windows_core::PCWSTR, packagepathtype : PackagePathType, pathlength : *mut u32, path : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackagePathByFullName2(packagefullname.param().abi(), core::mem::transmute(packagepathtype), core::mem::transmute(pathlength), core::mem::transmute(path)) + GetPackagePathByFullName2(packagefullname.param().abi(), core::mem::transmute(packagepathtype), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetPackagesByPackageFamily(packagefamilyname: P0, count: *mut u32, packagefullnames: Option<*mut windows_core::PWSTR>, bufferlength: *mut u32, buffer: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackagesByPackageFamily(packagefamilyname: P0, count: *mut u32, packagefullnames: Option<*mut windows_core::PWSTR>, bufferlength: *mut u32, buffer: Option) -> super::super::super::Foundation::WIN32_ERROR 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(), core::mem::transmute(count), core::mem::transmute(packagefullnames.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(buffer)) + GetPackagesByPackageFamily(packagefamilyname.param().abi(), core::mem::transmute(count), core::mem::transmute(packagefullnames.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetProcessesInVirtualizationContext(packagefamilyname: P0, count: *mut u32, processes: *mut *mut super::super::super::Foundation::HANDLE) -> windows_core::Result<()> @@ -331,56 +277,55 @@ where GetStagedPackageOrigin(packagefullname.param().abi(), core::mem::transmute(origin)) } #[inline] -pub unsafe fn GetStagedPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetStagedPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetStagedPackagePathByFullName(packagefullname : windows_core::PCWSTR, pathlength : *mut u32, path : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetStagedPackagePathByFullName(packagefullname.param().abi(), core::mem::transmute(pathlength), core::mem::transmute(path)) + GetStagedPackagePathByFullName(packagefullname.param().abi(), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetStagedPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetStagedPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: Option) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-3.dll" "system" fn GetStagedPackagePathByFullName2(packagefullname : windows_core::PCWSTR, packagepathtype : PackagePathType, pathlength : *mut u32, path : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetStagedPackagePathByFullName2(packagefullname.param().abi(), core::mem::transmute(packagepathtype), core::mem::transmute(pathlength), core::mem::transmute(path)) + GetStagedPackagePathByFullName2(packagefullname.param().abi(), core::mem::transmute(packagepathtype), core::mem::transmute(pathlength), core::mem::transmute(path.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn OpenPackageInfoByFullName(packagefullname: P0, reserved: u32, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn OpenPackageInfoByFullName(packagefullname: P0, reserved: Option, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenPackageInfoByFullName(packagefullname : windows_core::PCWSTR, reserved : u32, packageinforeference : *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation:: WIN32_ERROR); - OpenPackageInfoByFullName(packagefullname.param().abi(), core::mem::transmute(reserved), core::mem::transmute(packageinforeference)) + OpenPackageInfoByFullName(packagefullname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(packageinforeference)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn OpenPackageInfoByFullNameForUser(usersid: P0, packagefullname: P1, reserved: u32, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn OpenPackageInfoByFullNameForUser(usersid: Option, packagefullname: P1, reserved: Option, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn OpenPackageInfoByFullNameForUser(usersid : super::super::super::Security:: PSID, packagefullname : windows_core::PCWSTR, reserved : u32, packageinforeference : *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation:: WIN32_ERROR); - OpenPackageInfoByFullNameForUser(usersid.param().abi(), packagefullname.param().abi(), core::mem::transmute(reserved), core::mem::transmute(packageinforeference)) + OpenPackageInfoByFullNameForUser(core::mem::transmute(usersid.unwrap_or(core::mem::zeroed())), packagefullname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(packageinforeference)) } #[inline] -pub unsafe fn PackageFamilyNameFromFullName(packagefullname: P0, packagefamilynamelength: *mut u32, packagefamilyname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn PackageFamilyNameFromFullName(packagefullname: P0, packagefamilynamelength: *mut u32, packagefamilyname: Option) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn PackageFamilyNameFromFullName(packagefullname : windows_core::PCWSTR, packagefamilynamelength : *mut u32, packagefamilyname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - PackageFamilyNameFromFullName(packagefullname.param().abi(), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname)) + PackageFamilyNameFromFullName(packagefullname.param().abi(), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PackageFamilyNameFromId(packageid: *const PACKAGE_ID, packagefamilynamelength: *mut u32, packagefamilyname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn PackageFamilyNameFromId(packageid: *const PACKAGE_ID, packagefamilynamelength: *mut u32, packagefamilyname: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn PackageFamilyNameFromId(packageid : *const PACKAGE_ID, packagefamilynamelength : *mut u32, packagefamilyname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - PackageFamilyNameFromId(core::mem::transmute(packageid), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname)) + PackageFamilyNameFromId(core::mem::transmute(packageid), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PackageFullNameFromId(packageid: *const PACKAGE_ID, packagefullnamelength: *mut u32, packagefullname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn PackageFullNameFromId(packageid: *const PACKAGE_ID, packagefullnamelength: *mut u32, packagefullname: Option) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("kernel32.dll" "system" fn PackageFullNameFromId(packageid : *const PACKAGE_ID, packagefullnamelength : *mut u32, packagefullname : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - PackageFullNameFromId(core::mem::transmute(packageid), core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname)) + PackageFullNameFromId(core::mem::transmute(packageid), core::mem::transmute(packagefullnamelength), core::mem::transmute(packagefullname.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PackageIdFromFullName(packagefullname: P0, flags: u32, bufferlength: *mut u32, buffer: Option<*mut u8>) -> super::super::super::Foundation::WIN32_ERROR @@ -388,51 +333,44 @@ 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(), core::mem::transmute(flags), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut()))) + PackageIdFromFullName(packagefullname.param().abi(), core::mem::transmute(flags), core::mem::transmute(bufferlength), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PackageNameAndPublisherIdFromFamilyName(packagefamilyname: P0, packagenamelength: *mut u32, packagename: windows_core::PWSTR, packagepublisheridlength: *mut u32, packagepublisherid: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn PackageNameAndPublisherIdFromFamilyName(packagefamilyname: P0, packagenamelength: *mut u32, packagename: Option, packagepublisheridlength: *mut u32, packagepublisherid: Option) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn PackageNameAndPublisherIdFromFamilyName(packagefamilyname : windows_core::PCWSTR, packagenamelength : *mut u32, packagename : windows_core::PWSTR, packagepublisheridlength : *mut u32, packagepublisherid : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - PackageNameAndPublisherIdFromFamilyName(packagefamilyname.param().abi(), core::mem::transmute(packagenamelength), core::mem::transmute(packagename), core::mem::transmute(packagepublisheridlength), core::mem::transmute(packagepublisherid)) + PackageNameAndPublisherIdFromFamilyName(packagefamilyname.param().abi(), core::mem::transmute(packagenamelength), core::mem::transmute(packagename.unwrap_or(core::mem::zeroed())), core::mem::transmute(packagepublisheridlength), core::mem::transmute(packagepublisherid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ParseApplicationUserModelId(applicationusermodelid: P0, packagefamilynamelength: *mut u32, packagefamilyname: windows_core::PWSTR, packagerelativeapplicationidlength: *mut u32, packagerelativeapplicationid: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn ParseApplicationUserModelId(applicationusermodelid: P0, packagefamilynamelength: *mut u32, packagefamilyname: Option, packagerelativeapplicationidlength: *mut u32, packagerelativeapplicationid: Option) -> super::super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn ParseApplicationUserModelId(applicationusermodelid : windows_core::PCWSTR, packagefamilynamelength : *mut u32, packagefamilyname : windows_core::PWSTR, packagerelativeapplicationidlength : *mut u32, packagerelativeapplicationid : windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - ParseApplicationUserModelId(applicationusermodelid.param().abi(), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname), core::mem::transmute(packagerelativeapplicationidlength), core::mem::transmute(packagerelativeapplicationid)) + ParseApplicationUserModelId(applicationusermodelid.param().abi(), core::mem::transmute(packagefamilynamelength), core::mem::transmute(packagefamilyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(packagerelativeapplicationidlength), core::mem::transmute(packagerelativeapplicationid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReleasePackageVirtualizationContext(context: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ReleasePackageVirtualizationContext(context: PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE) { windows_targets::link!("kernel32.dll" "system" fn ReleasePackageVirtualizationContext(context : PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE)); - ReleasePackageVirtualizationContext(context.param().abi()) + ReleasePackageVirtualizationContext(core::mem::transmute(context)) } #[inline] -pub unsafe fn RemovePackageDependency(packagedependencycontext: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RemovePackageDependency(packagedependencycontext: PACKAGEDEPENDENCY_CONTEXT) -> windows_core::Result<()> { windows_targets::link!("kernelbase.dll" "system" fn RemovePackageDependency(packagedependencycontext : PACKAGEDEPENDENCY_CONTEXT) -> windows_core::HRESULT); - RemovePackageDependency(packagedependencycontext.param().abi()).ok() + RemovePackageDependency(core::mem::transmute(packagedependencycontext)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn TryCreatePackageDependency(user: P0, packagefamilyname: P1, minversion: PACKAGE_VERSION, packagedependencyprocessorarchitectures: PackageDependencyProcessorArchitectures, lifetimekind: PackageDependencyLifetimeKind, lifetimeartifact: P5, options: CreatePackageDependencyOptions) -> windows_core::Result +pub unsafe fn TryCreatePackageDependency(user: super::super::super::Security::PSID, packagefamilyname: P1, minversion: PACKAGE_VERSION, packagedependencyprocessorarchitectures: PackageDependencyProcessorArchitectures, lifetimekind: PackageDependencyLifetimeKind, lifetimeartifact: P5, options: CreatePackageDependencyOptions) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("kernelbase.dll" "system" fn TryCreatePackageDependency(user : super::super::super::Security:: PSID, packagefamilyname : windows_core::PCWSTR, minversion : PACKAGE_VERSION, packagedependencyprocessorarchitectures : PackageDependencyProcessorArchitectures, lifetimekind : PackageDependencyLifetimeKind, lifetimeartifact : windows_core::PCWSTR, options : CreatePackageDependencyOptions, packagedependencyid : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - TryCreatePackageDependency(user.param().abi(), packagefamilyname.param().abi(), core::mem::transmute(minversion), core::mem::transmute(packagedependencyprocessorarchitectures), core::mem::transmute(lifetimekind), lifetimeartifact.param().abi(), core::mem::transmute(options), &mut result__).map(|| core::mem::transmute(result__)) + TryCreatePackageDependency(core::mem::transmute(user), packagefamilyname.param().abi(), core::mem::transmute(minversion), core::mem::transmute(packagedependencyprocessorarchitectures), core::mem::transmute(lifetimekind), lifetimeartifact.param().abi(), core::mem::transmute(options), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn VerifyApplicationUserModelId(applicationusermodelid: P0) -> 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 ece1d62f44..93e438f680 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs @@ -1,35 +1,25 @@ #[inline] -pub unsafe fn PrjAllocateAlignedBuffer(namespacevirtualizationcontext: P0, size: usize) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn PrjAllocateAlignedBuffer(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, size: usize) -> *mut core::ffi::c_void { windows_targets::link!("projectedfslib.dll" "system" fn PrjAllocateAlignedBuffer(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, size : usize) -> *mut core::ffi::c_void); - PrjAllocateAlignedBuffer(namespacevirtualizationcontext.param().abi(), core::mem::transmute(size)) + PrjAllocateAlignedBuffer(core::mem::transmute(namespacevirtualizationcontext), core::mem::transmute(size)) } #[inline] -pub unsafe fn PrjClearNegativePathCache(namespacevirtualizationcontext: P0, totalentrynumber: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrjClearNegativePathCache(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, totalentrynumber: Option<*mut u32>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + PrjClearNegativePathCache(core::mem::transmute(namespacevirtualizationcontext), core::mem::transmute(totalentrynumber.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrjCompleteCommand(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, commandid: i32, completionresult: windows_core::HRESULT, extendedparameters: Option<*const PRJ_COMPLETE_COMMAND_EXTENDED_PARAMETERS>) -> windows_core::Result<()> { 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(), core::mem::transmute(commandid), core::mem::transmute(completionresult), core::mem::transmute(extendedparameters.unwrap_or(core::ptr::null()))).ok() + PrjCompleteCommand(core::mem::transmute(namespacevirtualizationcontext), core::mem::transmute(commandid), core::mem::transmute(completionresult), core::mem::transmute(extendedparameters.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn PrjDeleteFile(namespacevirtualizationcontext: P0, destinationfilename: P1, updateflags: PRJ_UPDATE_TYPES, failurereason: Option<*mut PRJ_UPDATE_FAILURE_CAUSES>) -> windows_core::Result<()> +pub unsafe fn PrjDeleteFile(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename: P1, updateflags: Option, failurereason: Option<*mut PRJ_UPDATE_FAILURE_CAUSES>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(updateflags), core::mem::transmute(failurereason.unwrap_or(core::ptr::null_mut()))).ok() + PrjDeleteFile(core::mem::transmute(namespacevirtualizationcontext), destinationfilename.param().abi(), core::mem::transmute(updateflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(failurereason.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn PrjDoesNameContainWildCards(filename: P0) -> super::super::Foundation::BOOLEAN @@ -58,22 +48,20 @@ where PrjFileNameMatch(filenametocheck.param().abi(), pattern.param().abi()) } #[inline] -pub unsafe fn PrjFillDirEntryBuffer(filename: P0, filebasicinfo: Option<*const PRJ_FILE_BASIC_INFO>, direntrybufferhandle: P2) -> windows_core::Result<()> +pub unsafe fn PrjFillDirEntryBuffer(filename: P0, filebasicinfo: Option<*const PRJ_FILE_BASIC_INFO>, direntrybufferhandle: PRJ_DIR_ENTRY_BUFFER_HANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P2: 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(core::ptr::null())), direntrybufferhandle.param().abi()).ok() + PrjFillDirEntryBuffer(filename.param().abi(), core::mem::transmute(filebasicinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(direntrybufferhandle)).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<()> +pub unsafe fn PrjFillDirEntryBuffer2(direntrybufferhandle: PRJ_DIR_ENTRY_BUFFER_HANDLE, filename: P1, filebasicinfo: Option<*const PRJ_FILE_BASIC_INFO>, extendedinfo: Option<*const PRJ_EXTENDED_INFO>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(extendedinfo.unwrap_or(core::ptr::null()))).ok() + PrjFillDirEntryBuffer2(core::mem::transmute(direntrybufferhandle), filename.param().abi(), core::mem::transmute(filebasicinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(extendedinfo.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn PrjFreeAlignedBuffer(buffer: *const core::ffi::c_void) { @@ -90,12 +78,9 @@ where PrjGetOnDiskFileState(destinationfilename.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn PrjGetVirtualizationInstanceInfo(namespacevirtualizationcontext: P0, virtualizationinstanceinfo: *mut PRJ_VIRTUALIZATION_INSTANCE_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrjGetVirtualizationInstanceInfo(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, virtualizationinstanceinfo: *mut PRJ_VIRTUALIZATION_INSTANCE_INFO) -> windows_core::Result<()> { windows_targets::link!("projectedfslib.dll" "system" fn PrjGetVirtualizationInstanceInfo(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, virtualizationinstanceinfo : *mut PRJ_VIRTUALIZATION_INSTANCE_INFO) -> windows_core::HRESULT); - PrjGetVirtualizationInstanceInfo(namespacevirtualizationcontext.param().abi(), core::mem::transmute(virtualizationinstanceinfo)).ok() + PrjGetVirtualizationInstanceInfo(core::mem::transmute(namespacevirtualizationcontext), core::mem::transmute(virtualizationinstanceinfo)).ok() } #[inline] pub unsafe fn PrjMarkDirectoryAsPlaceholder(rootpathname: P0, targetpathname: P1, versioninfo: Option<*const PRJ_PLACEHOLDER_VERSION_INFO>, virtualizationinstanceid: *const windows_core::GUID) -> windows_core::Result<()> @@ -104,7 +89,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(core::ptr::null())), core::mem::transmute(virtualizationinstanceid)).ok() + PrjMarkDirectoryAsPlaceholder(rootpathname.param().abi(), targetpathname.param().abi(), core::mem::transmute(versioninfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(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,50 +98,41 @@ 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(), core::mem::transmute(callbacks), core::mem::transmute(instancecontext.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + PrjStartVirtualizing(virtualizationrootpath.param().abi(), core::mem::transmute(callbacks), core::mem::transmute(instancecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn PrjStopVirtualizing(namespacevirtualizationcontext: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn PrjStopVirtualizing(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT) { windows_targets::link!("projectedfslib.dll" "system" fn PrjStopVirtualizing(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT)); - PrjStopVirtualizing(namespacevirtualizationcontext.param().abi()) + PrjStopVirtualizing(core::mem::transmute(namespacevirtualizationcontext)) } #[inline] -pub unsafe fn PrjUpdateFileIfNeeded(namespacevirtualizationcontext: P0, destinationfilename: P1, placeholderinfo: *const PRJ_PLACEHOLDER_INFO, placeholderinfosize: u32, updateflags: PRJ_UPDATE_TYPES, failurereason: Option<*mut PRJ_UPDATE_FAILURE_CAUSES>) -> windows_core::Result<()> +pub unsafe fn PrjUpdateFileIfNeeded(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename: P1, placeholderinfo: *const PRJ_PLACEHOLDER_INFO, placeholderinfosize: u32, updateflags: Option, failurereason: Option<*mut PRJ_UPDATE_FAILURE_CAUSES>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(placeholderinfo), core::mem::transmute(placeholderinfosize), core::mem::transmute(updateflags), core::mem::transmute(failurereason.unwrap_or(core::ptr::null_mut()))).ok() + PrjUpdateFileIfNeeded(core::mem::transmute(namespacevirtualizationcontext), destinationfilename.param().abi(), core::mem::transmute(placeholderinfo), core::mem::transmute(placeholderinfosize), core::mem::transmute(updateflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(failurereason.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrjWriteFileData(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, datastreamid: *const windows_core::GUID, buffer: *const core::ffi::c_void, byteoffset: u64, length: u32) -> windows_core::Result<()> { windows_targets::link!("projectedfslib.dll" "system" fn PrjWriteFileData(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, datastreamid : *const windows_core::GUID, buffer : *const core::ffi::c_void, byteoffset : u64, length : u32) -> windows_core::HRESULT); - PrjWriteFileData(namespacevirtualizationcontext.param().abi(), core::mem::transmute(datastreamid), core::mem::transmute(buffer), core::mem::transmute(byteoffset), core::mem::transmute(length)).ok() + PrjWriteFileData(core::mem::transmute(namespacevirtualizationcontext), core::mem::transmute(datastreamid), core::mem::transmute(buffer), core::mem::transmute(byteoffset), core::mem::transmute(length)).ok() } #[inline] -pub unsafe fn PrjWritePlaceholderInfo(namespacevirtualizationcontext: P0, destinationfilename: P1, placeholderinfo: *const PRJ_PLACEHOLDER_INFO, placeholderinfosize: u32) -> windows_core::Result<()> +pub unsafe fn PrjWritePlaceholderInfo(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename: P1, placeholderinfo: *const PRJ_PLACEHOLDER_INFO, placeholderinfosize: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjWritePlaceholderInfo(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename : windows_core::PCWSTR, placeholderinfo : *const PRJ_PLACEHOLDER_INFO, placeholderinfosize : u32) -> windows_core::HRESULT); - PrjWritePlaceholderInfo(namespacevirtualizationcontext.param().abi(), destinationfilename.param().abi(), core::mem::transmute(placeholderinfo), core::mem::transmute(placeholderinfosize)).ok() + PrjWritePlaceholderInfo(core::mem::transmute(namespacevirtualizationcontext), destinationfilename.param().abi(), core::mem::transmute(placeholderinfo), core::mem::transmute(placeholderinfosize)).ok() } #[inline] -pub unsafe fn PrjWritePlaceholderInfo2(namespacevirtualizationcontext: P0, destinationfilename: P1, placeholderinfo: *const PRJ_PLACEHOLDER_INFO, placeholderinfosize: u32, extendedinfo: Option<*const PRJ_EXTENDED_INFO>) -> windows_core::Result<()> +pub unsafe fn PrjWritePlaceholderInfo2(namespacevirtualizationcontext: PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename: P1, placeholderinfo: *const PRJ_PLACEHOLDER_INFO, placeholderinfosize: u32, extendedinfo: Option<*const PRJ_EXTENDED_INFO>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(placeholderinfo), core::mem::transmute(placeholderinfosize), core::mem::transmute(extendedinfo.unwrap_or(core::ptr::null()))).ok() + PrjWritePlaceholderInfo2(core::mem::transmute(namespacevirtualizationcontext), destinationfilename.param().abi(), core::mem::transmute(placeholderinfo), core::mem::transmute(placeholderinfosize), core::mem::transmute(extendedinfo.unwrap_or(core::mem::zeroed()))).ok() } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 9a0d4d5a64..c991746633 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs @@ -1,114 +1,78 @@ #[inline] -pub unsafe fn AddVirtualDiskParent(virtualdiskhandle: P0, parentpath: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn AddVirtualDiskParent(virtualdiskhandle: super::super::Foundation::HANDLE, parentpath: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("virtdisk.dll" "system" fn AddVirtualDiskParent(virtualdiskhandle : super::super::Foundation:: HANDLE, parentpath : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - AddVirtualDiskParent(virtualdiskhandle.param().abi(), parentpath.param().abi()) + AddVirtualDiskParent(core::mem::transmute(virtualdiskhandle), parentpath.param().abi()) } #[inline] -pub unsafe fn ApplySnapshotVhdSet(virtualdiskhandle: P0, parameters: *const APPLY_SNAPSHOT_VHDSET_PARAMETERS, flags: APPLY_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ApplySnapshotVhdSet(virtualdiskhandle: super::super::Foundation::HANDLE, parameters: *const APPLY_SNAPSHOT_VHDSET_PARAMETERS, flags: APPLY_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn ApplySnapshotVhdSet(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const APPLY_SNAPSHOT_VHDSET_PARAMETERS, flags : APPLY_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation:: WIN32_ERROR); - ApplySnapshotVhdSet(virtualdiskhandle.param().abi(), core::mem::transmute(parameters), core::mem::transmute(flags)) + ApplySnapshotVhdSet(core::mem::transmute(virtualdiskhandle), core::mem::transmute(parameters), core::mem::transmute(flags)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn AttachVirtualDisk(virtualdiskhandle: P0, securitydescriptor: P1, flags: ATTACH_VIRTUAL_DISK_FLAG, providerspecificflags: u32, parameters: Option<*const ATTACH_VIRTUAL_DISK_PARAMETERS>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AttachVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, securitydescriptor: Option, flags: ATTACH_VIRTUAL_DISK_FLAG, providerspecificflags: u32, parameters: Option<*const ATTACH_VIRTUAL_DISK_PARAMETERS>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(flags), core::mem::transmute(providerspecificflags), core::mem::transmute(parameters.unwrap_or(core::ptr::null())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) + AttachVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(providerspecificflags), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BreakMirrorVirtualDisk(virtualdiskhandle: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn BreakMirrorVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn BreakMirrorVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - BreakMirrorVirtualDisk(virtualdiskhandle.param().abi()) + BreakMirrorVirtualDisk(core::mem::transmute(virtualdiskhandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn CompactVirtualDisk(virtualdiskhandle: P0, flags: COMPACT_VIRTUAL_DISK_FLAG, parameters: Option<*const COMPACT_VIRTUAL_DISK_PARAMETERS>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn CompactVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, flags: COMPACT_VIRTUAL_DISK_FLAG, parameters: Option<*const COMPACT_VIRTUAL_DISK_PARAMETERS>, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(flags), core::mem::transmute(parameters.unwrap_or(core::ptr::null())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) + CompactVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(flags), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CompleteForkVirtualDisk(virtualdiskhandle: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn CompleteForkVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn CompleteForkVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - CompleteForkVirtualDisk(virtualdiskhandle.param().abi()) + CompleteForkVirtualDisk(core::mem::transmute(virtualdiskhandle)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn CreateVirtualDisk(virtualstoragetype: *const VIRTUAL_STORAGE_TYPE, path: P1, virtualdiskaccessmask: VIRTUAL_DISK_ACCESS_MASK, securitydescriptor: P3, flags: CREATE_VIRTUAL_DISK_FLAG, providerspecificflags: u32, parameters: *const CREATE_VIRTUAL_DISK_PARAMETERS, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, handle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn CreateVirtualDisk(virtualstoragetype: *const VIRTUAL_STORAGE_TYPE, path: P1, virtualdiskaccessmask: VIRTUAL_DISK_ACCESS_MASK, securitydescriptor: Option, flags: CREATE_VIRTUAL_DISK_FLAG, providerspecificflags: u32, parameters: *const CREATE_VIRTUAL_DISK_PARAMETERS, overlapped: Option<*const super::super::System::IO::OVERLAPPED>, handle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR where P1: windows_core::Param, - P3: 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(core::mem::transmute(virtualstoragetype), path.param().abi(), core::mem::transmute(virtualdiskaccessmask), securitydescriptor.param().abi(), core::mem::transmute(flags), core::mem::transmute(providerspecificflags), core::mem::transmute(parameters), core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), core::mem::transmute(handle)) + CreateVirtualDisk(core::mem::transmute(virtualstoragetype), path.param().abi(), core::mem::transmute(virtualdiskaccessmask), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(providerspecificflags), core::mem::transmute(parameters), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(handle)) } #[inline] -pub unsafe fn DeleteSnapshotVhdSet(virtualdiskhandle: P0, parameters: *const DELETE_SNAPSHOT_VHDSET_PARAMETERS, flags: DELETE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteSnapshotVhdSet(virtualdiskhandle: super::super::Foundation::HANDLE, parameters: *const DELETE_SNAPSHOT_VHDSET_PARAMETERS, flags: DELETE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn DeleteSnapshotVhdSet(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const DELETE_SNAPSHOT_VHDSET_PARAMETERS, flags : DELETE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation:: WIN32_ERROR); - DeleteSnapshotVhdSet(virtualdiskhandle.param().abi(), core::mem::transmute(parameters), core::mem::transmute(flags)) + DeleteSnapshotVhdSet(core::mem::transmute(virtualdiskhandle), core::mem::transmute(parameters), core::mem::transmute(flags)) } #[inline] -pub unsafe fn DeleteVirtualDiskMetadata(virtualdiskhandle: P0, item: *const windows_core::GUID) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteVirtualDiskMetadata(virtualdiskhandle: super::super::Foundation::HANDLE, item: *const windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn DeleteVirtualDiskMetadata(virtualdiskhandle : super::super::Foundation:: HANDLE, item : *const windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - DeleteVirtualDiskMetadata(virtualdiskhandle.param().abi(), core::mem::transmute(item)) + DeleteVirtualDiskMetadata(core::mem::transmute(virtualdiskhandle), core::mem::transmute(item)) } #[inline] -pub unsafe fn DetachVirtualDisk(virtualdiskhandle: P0, flags: DETACH_VIRTUAL_DISK_FLAG, providerspecificflags: u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn DetachVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, flags: DETACH_VIRTUAL_DISK_FLAG, providerspecificflags: u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn DetachVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : DETACH_VIRTUAL_DISK_FLAG, providerspecificflags : u32) -> super::super::Foundation:: WIN32_ERROR); - DetachVirtualDisk(virtualdiskhandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(providerspecificflags)) + DetachVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(flags), core::mem::transmute(providerspecificflags)) } #[inline] -pub unsafe fn EnumerateVirtualDiskMetadata(virtualdiskhandle: P0, numberofitems: *mut u32, items: *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn EnumerateVirtualDiskMetadata(virtualdiskhandle: super::super::Foundation::HANDLE, numberofitems: *mut u32, items: *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn EnumerateVirtualDiskMetadata(virtualdiskhandle : super::super::Foundation:: HANDLE, numberofitems : *mut u32, items : *mut windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - EnumerateVirtualDiskMetadata(virtualdiskhandle.param().abi(), core::mem::transmute(numberofitems), core::mem::transmute(items)) + EnumerateVirtualDiskMetadata(core::mem::transmute(virtualdiskhandle), core::mem::transmute(numberofitems), core::mem::transmute(items)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ExpandVirtualDisk(virtualdiskhandle: P0, flags: EXPAND_VIRTUAL_DISK_FLAG, parameters: *const EXPAND_VIRTUAL_DISK_PARAMETERS, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ExpandVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, flags: EXPAND_VIRTUAL_DISK_FLAG, parameters: *const EXPAND_VIRTUAL_DISK_PARAMETERS, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) + ExpandVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ForkVirtualDisk(virtualdiskhandle: P0, flags: FORK_VIRTUAL_DISK_FLAG, parameters: *const FORK_VIRTUAL_DISK_PARAMETERS, overlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ForkVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, flags: FORK_VIRTUAL_DISK_FLAG, parameters: *const FORK_VIRTUAL_DISK_PARAMETERS, overlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn ForkVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : FORK_VIRTUAL_DISK_FLAG, parameters : *const FORK_VIRTUAL_DISK_PARAMETERS, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - ForkVirtualDisk(virtualdiskhandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped)) + ForkVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped)) } #[inline] pub unsafe fn GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes: *mut u32, pathsbuffer: windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR { @@ -116,71 +80,47 @@ pub unsafe fn GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes: *mu GetAllAttachedVirtualDiskPhysicalPaths(core::mem::transmute(pathsbuffersizeinbytes), core::mem::transmute(pathsbuffer)) } #[inline] -pub unsafe fn GetStorageDependencyInformation(objecthandle: P0, flags: GET_STORAGE_DEPENDENCY_FLAG, storagedependencyinfosize: u32, storagedependencyinfo: *mut STORAGE_DEPENDENCY_INFO, sizeused: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetStorageDependencyInformation(objecthandle: super::super::Foundation::HANDLE, flags: GET_STORAGE_DEPENDENCY_FLAG, storagedependencyinfosize: u32, storagedependencyinfo: *mut STORAGE_DEPENDENCY_INFO, sizeused: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(flags), core::mem::transmute(storagedependencyinfosize), core::mem::transmute(storagedependencyinfo), core::mem::transmute(sizeused.unwrap_or(core::ptr::null_mut()))) + GetStorageDependencyInformation(core::mem::transmute(objecthandle), core::mem::transmute(flags), core::mem::transmute(storagedependencyinfosize), core::mem::transmute(storagedependencyinfo), core::mem::transmute(sizeused.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetVirtualDiskInformation(virtualdiskhandle: super::super::Foundation::HANDLE, virtualdiskinfosize: *mut u32, virtualdiskinfo: *mut GET_VIRTUAL_DISK_INFO, sizeused: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(virtualdiskinfosize), core::mem::transmute(virtualdiskinfo), core::mem::transmute(sizeused.unwrap_or(core::ptr::null_mut()))) + GetVirtualDiskInformation(core::mem::transmute(virtualdiskhandle), core::mem::transmute(virtualdiskinfosize), core::mem::transmute(virtualdiskinfo), core::mem::transmute(sizeused.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetVirtualDiskMetadata(virtualdiskhandle: super::super::Foundation::HANDLE, item: *const windows_core::GUID, metadatasize: *mut u32, metadata: *mut core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn GetVirtualDiskMetadata(virtualdiskhandle : super::super::Foundation:: HANDLE, item : *const windows_core::GUID, metadatasize : *mut u32, metadata : *mut core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - GetVirtualDiskMetadata(virtualdiskhandle.param().abi(), core::mem::transmute(item), core::mem::transmute(metadatasize), core::mem::transmute(metadata)) + GetVirtualDiskMetadata(core::mem::transmute(virtualdiskhandle), core::mem::transmute(item), core::mem::transmute(metadatasize), core::mem::transmute(metadata)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn GetVirtualDiskOperationProgress(virtualdiskhandle: P0, overlapped: *const super::super::System::IO::OVERLAPPED, progress: *mut VIRTUAL_DISK_PROGRESS) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetVirtualDiskOperationProgress(virtualdiskhandle: super::super::Foundation::HANDLE, overlapped: *const super::super::System::IO::OVERLAPPED, progress: *mut VIRTUAL_DISK_PROGRESS) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn GetVirtualDiskOperationProgress(virtualdiskhandle : super::super::Foundation:: HANDLE, overlapped : *const super::super::System::IO:: OVERLAPPED, progress : *mut VIRTUAL_DISK_PROGRESS) -> super::super::Foundation:: WIN32_ERROR); - GetVirtualDiskOperationProgress(virtualdiskhandle.param().abi(), core::mem::transmute(overlapped), core::mem::transmute(progress)) + GetVirtualDiskOperationProgress(core::mem::transmute(virtualdiskhandle), core::mem::transmute(overlapped), core::mem::transmute(progress)) } #[inline] -pub unsafe fn GetVirtualDiskPhysicalPath(virtualdiskhandle: P0, diskpathsizeinbytes: *mut u32, diskpath: windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn GetVirtualDiskPhysicalPath(virtualdiskhandle: super::super::Foundation::HANDLE, diskpathsizeinbytes: *mut u32, diskpath: windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn GetVirtualDiskPhysicalPath(virtualdiskhandle : super::super::Foundation:: HANDLE, diskpathsizeinbytes : *mut u32, diskpath : windows_core::PWSTR) -> super::super::Foundation:: WIN32_ERROR); - GetVirtualDiskPhysicalPath(virtualdiskhandle.param().abi(), core::mem::transmute(diskpathsizeinbytes), core::mem::transmute(diskpath)) + GetVirtualDiskPhysicalPath(core::mem::transmute(virtualdiskhandle), core::mem::transmute(diskpathsizeinbytes), core::mem::transmute(diskpath)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn MergeVirtualDisk(virtualdiskhandle: P0, flags: MERGE_VIRTUAL_DISK_FLAG, parameters: *const MERGE_VIRTUAL_DISK_PARAMETERS, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn MergeVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, flags: MERGE_VIRTUAL_DISK_FLAG, parameters: *const MERGE_VIRTUAL_DISK_PARAMETERS, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) + MergeVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn MirrorVirtualDisk(virtualdiskhandle: P0, flags: MIRROR_VIRTUAL_DISK_FLAG, parameters: *const MIRROR_VIRTUAL_DISK_PARAMETERS, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn MirrorVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, flags: MIRROR_VIRTUAL_DISK_FLAG, parameters: *const MIRROR_VIRTUAL_DISK_PARAMETERS, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn MirrorVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : MIRROR_VIRTUAL_DISK_FLAG, parameters : *const MIRROR_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - MirrorVirtualDisk(virtualdiskhandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped)) + MirrorVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped)) } #[inline] -pub unsafe fn ModifyVhdSet(virtualdiskhandle: P0, parameters: *const MODIFY_VHDSET_PARAMETERS, flags: MODIFY_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ModifyVhdSet(virtualdiskhandle: super::super::Foundation::HANDLE, parameters: *const MODIFY_VHDSET_PARAMETERS, flags: MODIFY_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn ModifyVhdSet(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const MODIFY_VHDSET_PARAMETERS, flags : MODIFY_VHDSET_FLAG) -> super::super::Foundation:: WIN32_ERROR); - ModifyVhdSet(virtualdiskhandle.param().abi(), core::mem::transmute(parameters), core::mem::transmute(flags)) + ModifyVhdSet(core::mem::transmute(virtualdiskhandle), core::mem::transmute(parameters), core::mem::transmute(flags)) } #[inline] pub unsafe fn OpenVirtualDisk(virtualstoragetype: *const VIRTUAL_STORAGE_TYPE, path: P1, virtualdiskaccessmask: VIRTUAL_DISK_ACCESS_MASK, flags: OPEN_VIRTUAL_DISK_FLAG, parameters: Option<*const OPEN_VIRTUAL_DISK_PARAMETERS>, handle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR @@ -188,57 +128,41 @@ where P1: 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(core::mem::transmute(virtualstoragetype), path.param().abi(), core::mem::transmute(virtualdiskaccessmask), core::mem::transmute(flags), core::mem::transmute(parameters.unwrap_or(core::ptr::null())), core::mem::transmute(handle)) + OpenVirtualDisk(core::mem::transmute(virtualstoragetype), path.param().abi(), core::mem::transmute(virtualdiskaccessmask), core::mem::transmute(flags), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +pub unsafe fn QueryChangesVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, 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 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("virtdisk.dll" "system" fn QueryChangesVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, changetrackingid : windows_core::PCWSTR, byteoffset : u64, bytelength : u64, flags : QUERY_CHANGES_VIRTUAL_DISK_FLAG, ranges : *mut QUERY_CHANGES_VIRTUAL_DISK_RANGE, rangecount : *mut u32, processedlength : *mut u64) -> super::super::Foundation:: WIN32_ERROR); - QueryChangesVirtualDisk(virtualdiskhandle.param().abi(), changetrackingid.param().abi(), core::mem::transmute(byteoffset), core::mem::transmute(bytelength), core::mem::transmute(flags), core::mem::transmute(ranges), core::mem::transmute(rangecount), core::mem::transmute(processedlength)) + QueryChangesVirtualDisk(core::mem::transmute(virtualdiskhandle), changetrackingid.param().abi(), core::mem::transmute(byteoffset), core::mem::transmute(bytelength), core::mem::transmute(flags), core::mem::transmute(ranges), core::mem::transmute(rangecount), core::mem::transmute(processedlength)) } #[inline] -pub unsafe fn RawSCSIVirtualDisk(virtualdiskhandle: P0, parameters: *const RAW_SCSI_VIRTUAL_DISK_PARAMETERS, flags: RAW_SCSI_VIRTUAL_DISK_FLAG, response: *mut RAW_SCSI_VIRTUAL_DISK_RESPONSE) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RawSCSIVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, parameters: *const RAW_SCSI_VIRTUAL_DISK_PARAMETERS, flags: RAW_SCSI_VIRTUAL_DISK_FLAG, response: *mut RAW_SCSI_VIRTUAL_DISK_RESPONSE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn RawSCSIVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const RAW_SCSI_VIRTUAL_DISK_PARAMETERS, flags : RAW_SCSI_VIRTUAL_DISK_FLAG, response : *mut RAW_SCSI_VIRTUAL_DISK_RESPONSE) -> super::super::Foundation:: WIN32_ERROR); - RawSCSIVirtualDisk(virtualdiskhandle.param().abi(), core::mem::transmute(parameters), core::mem::transmute(flags), core::mem::transmute(response)) + RawSCSIVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(parameters), core::mem::transmute(flags), core::mem::transmute(response)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ResizeVirtualDisk(virtualdiskhandle: P0, flags: RESIZE_VIRTUAL_DISK_FLAG, parameters: *const RESIZE_VIRTUAL_DISK_PARAMETERS, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn ResizeVirtualDisk(virtualdiskhandle: super::super::Foundation::HANDLE, flags: RESIZE_VIRTUAL_DISK_FLAG, parameters: *const RESIZE_VIRTUAL_DISK_PARAMETERS, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) + ResizeVirtualDisk(core::mem::transmute(virtualdiskhandle), core::mem::transmute(flags), core::mem::transmute(parameters), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetVirtualDiskInformation(virtualdiskhandle: P0, virtualdiskinfo: *const SET_VIRTUAL_DISK_INFO) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SetVirtualDiskInformation(virtualdiskhandle: super::super::Foundation::HANDLE, virtualdiskinfo: *const SET_VIRTUAL_DISK_INFO) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn SetVirtualDiskInformation(virtualdiskhandle : super::super::Foundation:: HANDLE, virtualdiskinfo : *const SET_VIRTUAL_DISK_INFO) -> super::super::Foundation:: WIN32_ERROR); - SetVirtualDiskInformation(virtualdiskhandle.param().abi(), core::mem::transmute(virtualdiskinfo)) + SetVirtualDiskInformation(core::mem::transmute(virtualdiskhandle), core::mem::transmute(virtualdiskinfo)) } #[inline] -pub unsafe fn SetVirtualDiskMetadata(virtualdiskhandle: P0, item: *const windows_core::GUID, metadatasize: u32, metadata: *const core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SetVirtualDiskMetadata(virtualdiskhandle: super::super::Foundation::HANDLE, item: *const windows_core::GUID, metadatasize: u32, metadata: *const core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn SetVirtualDiskMetadata(virtualdiskhandle : super::super::Foundation:: HANDLE, item : *const windows_core::GUID, metadatasize : u32, metadata : *const core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - SetVirtualDiskMetadata(virtualdiskhandle.param().abi(), core::mem::transmute(item), core::mem::transmute(metadatasize), core::mem::transmute(metadata)) + SetVirtualDiskMetadata(core::mem::transmute(virtualdiskhandle), core::mem::transmute(item), core::mem::transmute(metadatasize), core::mem::transmute(metadata)) } #[inline] -pub unsafe fn TakeSnapshotVhdSet(virtualdiskhandle: P0, parameters: *const TAKE_SNAPSHOT_VHDSET_PARAMETERS, flags: TAKE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn TakeSnapshotVhdSet(virtualdiskhandle: super::super::Foundation::HANDLE, parameters: *const TAKE_SNAPSHOT_VHDSET_PARAMETERS, flags: TAKE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("virtdisk.dll" "system" fn TakeSnapshotVhdSet(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const TAKE_SNAPSHOT_VHDSET_PARAMETERS, flags : TAKE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation:: WIN32_ERROR); - TakeSnapshotVhdSet(virtualdiskhandle.param().abi(), core::mem::transmute(parameters), core::mem::transmute(flags)) + TakeSnapshotVhdSet(core::mem::transmute(virtualdiskhandle), core::mem::transmute(parameters), core::mem::transmute(flags)) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Xps/Printing/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Xps/Printing/mod.rs index ad10a639ab..7dcaaf734b 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Xps/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Xps/Printing/mod.rs @@ -1,27 +1,23 @@ #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn StartXpsPrintJob(printername: P0, jobname: P1, outputfilename: P2, progressevent: P3, completionevent: P4, printablepageson: &[u8], xpsprintjob: *mut Option, documentstream: *mut Option, printticketstream: *mut Option) -> windows_core::Result<()> +pub unsafe fn StartXpsPrintJob(printername: P0, jobname: P1, outputfilename: P2, progressevent: super::super::super::Foundation::HANDLE, completionevent: super::super::super::Foundation::HANDLE, printablepageson: &[u8], xpsprintjob: *mut Option, documentstream: *mut Option, printticketstream: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("xpsprint.dll" "system" fn StartXpsPrintJob(printername : windows_core::PCWSTR, jobname : windows_core::PCWSTR, outputfilename : windows_core::PCWSTR, progressevent : super::super::super::Foundation:: HANDLE, completionevent : super::super::super::Foundation:: HANDLE, printablepageson : *const u8, printablepagesoncount : u32, xpsprintjob : *mut * mut core::ffi::c_void, documentstream : *mut * mut core::ffi::c_void, printticketstream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - StartXpsPrintJob(printername.param().abi(), jobname.param().abi(), outputfilename.param().abi(), progressevent.param().abi(), completionevent.param().abi(), core::mem::transmute(printablepageson.as_ptr()), printablepageson.len().try_into().unwrap(), core::mem::transmute(xpsprintjob), core::mem::transmute(documentstream), core::mem::transmute(printticketstream)).ok() + StartXpsPrintJob(printername.param().abi(), jobname.param().abi(), outputfilename.param().abi(), core::mem::transmute(progressevent), core::mem::transmute(completionevent), core::mem::transmute(printablepageson.as_ptr()), printablepageson.len().try_into().unwrap(), core::mem::transmute(xpsprintjob), core::mem::transmute(documentstream), core::mem::transmute(printticketstream)).ok() } #[inline] -pub unsafe fn StartXpsPrintJob1(printername: P0, jobname: P1, outputfilename: P2, progressevent: P3, completionevent: P4, xpsprintjob: *mut Option, printcontentreceiver: *mut Option) -> windows_core::Result<()> +pub unsafe fn StartXpsPrintJob1(printername: P0, jobname: P1, outputfilename: P2, progressevent: super::super::super::Foundation::HANDLE, completionevent: super::super::super::Foundation::HANDLE, xpsprintjob: *mut Option, printcontentreceiver: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("xpsprint.dll" "system" fn StartXpsPrintJob1(printername : windows_core::PCWSTR, jobname : windows_core::PCWSTR, outputfilename : windows_core::PCWSTR, progressevent : super::super::super::Foundation:: HANDLE, completionevent : super::super::super::Foundation:: HANDLE, xpsprintjob : *mut * mut core::ffi::c_void, printcontentreceiver : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - StartXpsPrintJob1(printername.param().abi(), jobname.param().abi(), outputfilename.param().abi(), progressevent.param().abi(), completionevent.param().abi(), core::mem::transmute(xpsprintjob), core::mem::transmute(printcontentreceiver)).ok() + StartXpsPrintJob1(printername.param().abi(), jobname.param().abi(), outputfilename.param().abi(), core::mem::transmute(progressevent), core::mem::transmute(completionevent), core::mem::transmute(xpsprintjob), core::mem::transmute(printcontentreceiver)).ok() } pub const ID_DOCUMENTPACKAGETARGET_MSXPS: windows_core::GUID = windows_core::GUID::from_u128(0x9cae40a8_ded1_41c9_a9fd_d735ef33aeda); pub const ID_DOCUMENTPACKAGETARGET_OPENXPS: windows_core::GUID = windows_core::GUID::from_u128(0x0056bb72_8c9c_4612_bd0f_93012a87099d); 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 947641519f..f90ec6fb35 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs @@ -2,114 +2,83 @@ pub mod Printing; #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn AbortDoc(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn AbortDoc(hdc: super::super::Graphics::Gdi::HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn AbortDoc(hdc : super::super::Graphics::Gdi:: HDC) -> i32); - AbortDoc(hdc.param().abi()) + AbortDoc(core::mem::transmute(hdc)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DeviceCapabilitiesA(pdevice: P0, pport: P1, fwcapability: PRINTER_DEVICE_CAPABILITIES, poutput: windows_core::PSTR, pdevmode: Option<*const super::super::Graphics::Gdi::DEVMODEA>) -> i32 +pub unsafe fn DeviceCapabilitiesA(pdevice: P0, pport: P1, fwcapability: PRINTER_DEVICE_CAPABILITIES, poutput: Option, pdevmode: Option<*const super::super::Graphics::Gdi::DEVMODEA>) -> i32 where P0: windows_core::Param, 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(), core::mem::transmute(fwcapability), core::mem::transmute(poutput), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null()))) + DeviceCapabilitiesA(pdevice.param().abi(), pport.param().abi(), core::mem::transmute(fwcapability), core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DeviceCapabilitiesW(pdevice: P0, pport: P1, fwcapability: PRINTER_DEVICE_CAPABILITIES, poutput: windows_core::PWSTR, pdevmode: Option<*const super::super::Graphics::Gdi::DEVMODEW>) -> i32 +pub unsafe fn DeviceCapabilitiesW(pdevice: P0, pport: P1, fwcapability: PRINTER_DEVICE_CAPABILITIES, poutput: Option, pdevmode: Option<*const super::super::Graphics::Gdi::DEVMODEW>) -> i32 where P0: windows_core::Param, 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(), core::mem::transmute(fwcapability), core::mem::transmute(poutput), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null()))) + DeviceCapabilitiesW(pdevice.param().abi(), pport.param().abi(), core::mem::transmute(fwcapability), core::mem::transmute(poutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn EndDoc(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn EndDoc(hdc: super::super::Graphics::Gdi::HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn EndDoc(hdc : super::super::Graphics::Gdi:: HDC) -> i32); - EndDoc(hdc.param().abi()) + EndDoc(core::mem::transmute(hdc)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn EndPage(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn EndPage(hdc: super::super::Graphics::Gdi::HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn EndPage(hdc : super::super::Graphics::Gdi:: HDC) -> i32); - EndPage(hdc.param().abi()) + EndPage(core::mem::transmute(hdc)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn Escape(hdc: P0, iescape: i32, pvin: Option<&[u8]>, pvout: Option<*mut core::ffi::c_void>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn Escape(hdc: super::super::Graphics::Gdi::HDC, iescape: i32, pvin: Option<&[u8]>, pvout: Option<*mut core::ffi::c_void>) -> i32 { 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(), core::mem::transmute(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()))) + Escape(core::mem::transmute(hdc), core::mem::transmute(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::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ExtEscape(hdc: P0, iescape: i32, lpindata: Option<&[u8]>, lpoutdata: Option<&mut [u8]>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ExtEscape(hdc: super::super::Graphics::Gdi::HDC, iescape: i32, lpindata: Option<&[u8]>, lpoutdata: Option<&mut [u8]>) -> i32 { windows_targets::link!("gdi32.dll" "system" fn ExtEscape(hdc : super::super::Graphics::Gdi:: HDC, iescape : i32, cjinput : i32, lpindata : windows_core::PCSTR, cjoutput : i32, lpoutdata : windows_core::PSTR) -> i32); - ExtEscape(hdc.param().abi(), core::mem::transmute(iescape), lpindata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpindata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpoutdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpoutdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + ExtEscape(core::mem::transmute(hdc), core::mem::transmute(iescape), lpindata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpindata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpoutdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpoutdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn PrintWindow(hwnd: P0, hdcblt: P1, nflags: PRINT_WINDOW_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PrintWindow(hwnd: super::super::Foundation::HWND, hdcblt: super::super::Graphics::Gdi::HDC, nflags: PRINT_WINDOW_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn PrintWindow(hwnd : super::super::Foundation:: HWND, hdcblt : super::super::Graphics::Gdi:: HDC, nflags : PRINT_WINDOW_FLAGS) -> super::super::Foundation:: BOOL); - PrintWindow(hwnd.param().abi(), hdcblt.param().abi(), core::mem::transmute(nflags)) + PrintWindow(core::mem::transmute(hwnd), core::mem::transmute(hdcblt), core::mem::transmute(nflags)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetAbortProc(hdc: P0, proc: ABORTPROC) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetAbortProc(hdc: super::super::Graphics::Gdi::HDC, proc: ABORTPROC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetAbortProc(hdc : super::super::Graphics::Gdi:: HDC, proc : ABORTPROC) -> i32); - SetAbortProc(hdc.param().abi(), core::mem::transmute(proc)) + SetAbortProc(core::mem::transmute(hdc), core::mem::transmute(proc)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn StartDocA(hdc: P0, lpdi: *const DOCINFOA) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn StartDocA(hdc: super::super::Graphics::Gdi::HDC, lpdi: *const DOCINFOA) -> i32 { windows_targets::link!("gdi32.dll" "system" fn StartDocA(hdc : super::super::Graphics::Gdi:: HDC, lpdi : *const DOCINFOA) -> i32); - StartDocA(hdc.param().abi(), core::mem::transmute(lpdi)) + StartDocA(core::mem::transmute(hdc), core::mem::transmute(lpdi)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn StartDocW(hdc: P0, lpdi: *const DOCINFOW) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn StartDocW(hdc: super::super::Graphics::Gdi::HDC, lpdi: *const DOCINFOW) -> i32 { windows_targets::link!("gdi32.dll" "system" fn StartDocW(hdc : super::super::Graphics::Gdi:: HDC, lpdi : *const DOCINFOW) -> i32); - StartDocW(hdc.param().abi(), core::mem::transmute(lpdi)) + StartDocW(core::mem::transmute(hdc), core::mem::transmute(lpdi)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn StartPage(hdc: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn StartPage(hdc: super::super::Graphics::Gdi::HDC) -> i32 { windows_targets::link!("gdi32.dll" "system" fn StartPage(hdc : super::super::Graphics::Gdi:: HDC) -> i32); - StartPage(hdc.param().abi()) + StartPage(core::mem::transmute(hdc)) } #[cfg(feature = "Win32_Graphics_Gdi")] pub type ABORTPROC = Option super::super::Foundation::BOOL>; 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 a2bac6bb8e..912c0905a4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs @@ -1,12 +1,11 @@ #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn BuildDisplayTable(lpallocatebuffer: LPALLOCATEBUFFER, lpallocatemore: LPALLOCATEMORE, lpfreebuffer: LPFREEBUFFER, lpmalloc: P3, hinstance: P4, cpages: u32, lppage: *mut DTPAGE, ulflags: u32, lpptable: *mut Option, lpptbldata: *mut Option) -> windows_core::Result<()> +pub unsafe fn BuildDisplayTable(lpallocatebuffer: LPALLOCATEBUFFER, lpallocatemore: LPALLOCATEMORE, lpfreebuffer: LPFREEBUFFER, lpmalloc: P3, hinstance: super::super::Foundation::HINSTANCE, cpages: u32, lppage: *mut DTPAGE, ulflags: u32, lpptable: *mut Option, lpptbldata: *mut Option) -> windows_core::Result<()> where P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("mapi32.dll" "system" fn BuildDisplayTable(lpallocatebuffer : LPALLOCATEBUFFER, lpallocatemore : LPALLOCATEMORE, lpfreebuffer : LPFREEBUFFER, lpmalloc : * mut core::ffi::c_void, hinstance : super::super::Foundation:: HINSTANCE, cpages : u32, lppage : *mut DTPAGE, ulflags : u32, lpptable : *mut * mut core::ffi::c_void, lpptbldata : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - BuildDisplayTable(core::mem::transmute(lpallocatebuffer), core::mem::transmute(lpallocatemore), core::mem::transmute(lpfreebuffer), lpmalloc.param().abi(), hinstance.param().abi(), core::mem::transmute(cpages), core::mem::transmute(lppage), core::mem::transmute(ulflags), core::mem::transmute(lpptable), core::mem::transmute(lpptbldata)).ok() + BuildDisplayTable(core::mem::transmute(lpallocatebuffer), core::mem::transmute(lpallocatemore), core::mem::transmute(lpfreebuffer), lpmalloc.param().abi(), core::mem::transmute(hinstance), core::mem::transmute(cpages), core::mem::transmute(lppage), core::mem::transmute(ulflags), core::mem::transmute(lpptable), core::mem::transmute(lpptbldata)).ok() } #[inline] pub unsafe fn ChangeIdleRoutine(ftg: *mut core::ffi::c_void, lpfnidle: PFNIDLE, lpvidleparam: *mut core::ffi::c_void, priidle: i16, csecidle: u32, iroidle: u16, ircidle: u16) { @@ -213,7 +212,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(core::mem::transmute(lpallocatebuffer), core::mem::transmute(lpfreebuffer), core::mem::transmute(ulflags), core::mem::transmute(lpszfilename), core::mem::transmute(lpszprefix.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + OpenStreamOnFile(core::mem::transmute(lpallocatebuffer), core::mem::transmute(lpfreebuffer), core::mem::transmute(ulflags), core::mem::transmute(lpszfilename), core::mem::transmute(lpszprefix.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -885,11 +884,11 @@ impl IABContainer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid), core::mem::transmute(ulcreateflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CopyEntries(&self, lpentries: *const SBinaryArray, uluiparam: usize, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> + pub unsafe fn CopyEntries(&self, lpentries: *const SBinaryArray, uluiparam: Option, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(lpentries), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).CopyEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(lpentries), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } pub unsafe fn DeleteEntries(&self, lpentries: *const SBinaryArray, ulflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(lpentries), core::mem::transmute(ulflags)).ok() @@ -897,7 +896,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(core::ptr::null())), core::mem::transmute(ulflags), core::mem::transmute(lpadrlist), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ResolveNames)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), core::mem::transmute(lpadrlist), &mut result__).map(|| result__) } } #[repr(C)] @@ -1242,11 +1241,11 @@ impl IDistList { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid), core::mem::transmute(ulcreateflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CopyEntries(&self, lpentries: *const SBinaryArray, uluiparam: usize, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> + pub unsafe fn CopyEntries(&self, lpentries: *const SBinaryArray, uluiparam: Option, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(lpentries), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).CopyEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(lpentries), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } pub unsafe fn DeleteEntries(&self, lpentries: *const SBinaryArray, ulflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(lpentries), core::mem::transmute(ulflags)).ok() @@ -1254,7 +1253,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(core::ptr::null())), core::mem::transmute(ulflags), core::mem::transmute(lpadrlist), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ResolveNames)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), core::mem::transmute(lpadrlist), &mut result__).map(|| result__) } } #[repr(C)] @@ -1377,11 +1376,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(core::ptr::null())), core::mem::transmute(lpcontainerlist.unwrap_or(core::ptr::null())), core::mem::transmute(ulsearchflags)).ok() + (windows_core::Interface::vtable(self).SetSearchCriteria)(windows_core::Interface::as_raw(self), core::mem::transmute(lprestriction.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcontainerlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(ulflags), core::mem::transmute(lpprestriction), core::mem::transmute(lppcontainerlist), core::mem::transmute(lpulsearchstate.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSearchCriteria)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags), core::mem::transmute(lpprestriction), core::mem::transmute(lppcontainerlist), core::mem::transmute(lpulsearchstate.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -1464,8 +1463,8 @@ impl IMAPIControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), core::mem::transmute(hresult), core::mem::transmute(ulflags), &mut result__).map(|| result__) } - pub unsafe fn Activate(&self, ulflags: u32, uluiparam: usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags), core::mem::transmute(uluiparam)).ok() + pub unsafe fn Activate(&self, ulflags: u32, uluiparam: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetState(&self, ulflags: u32, lpulstate: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags), core::mem::transmute(lpulstate)).ok() @@ -1527,39 +1526,39 @@ impl IMAPIFolder { pub unsafe fn CreateMessage(&self, lpinterface: *mut windows_core::GUID, ulflags: u32, lppmessage: *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CreateMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(lpinterface), core::mem::transmute(ulflags), core::mem::transmute(lppmessage)).ok() } - pub unsafe fn CopyMessages(&self, lpmsglist: *const SBinaryArray, lpinterface: Option<*const windows_core::GUID>, lpdestfolder: *const core::ffi::c_void, uluiparam: usize, lpprogress: P4, ulflags: u32) -> windows_core::Result<()> + pub unsafe fn CopyMessages(&self, lpmsglist: *const SBinaryArray, lpinterface: Option<*const windows_core::GUID>, lpdestfolder: *const core::ffi::c_void, uluiparam: Option, lpprogress: P4, ulflags: u32) -> windows_core::Result<()> where P4: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyMessages)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsglist), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), core::mem::transmute(lpdestfolder), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).CopyMessages)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsglist), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdestfolder), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } - pub unsafe fn DeleteMessages(&self, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> + pub unsafe fn DeleteMessages(&self, lpmsglist: *const SBinaryArray, uluiparam: Option, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteMessages)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsglist), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).DeleteMessages)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsglist), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } 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), core::mem::transmute(ulfoldertype), core::mem::transmute(lpszfoldername), core::mem::transmute(lpszfoldercomment.unwrap_or(core::ptr::null())), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), core::mem::transmute(ulflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(ulfoldertype), core::mem::transmute(lpszfoldername), core::mem::transmute(lpszfoldercomment.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P6, ulflags: u32) -> windows_core::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: Option, lpprogress: P6, ulflags: u32) -> windows_core::Result<()> where P6: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), core::mem::transmute(lpdestfolder), core::mem::transmute(lpsznewfoldername), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).CopyFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdestfolder), core::mem::transmute(lpsznewfoldername), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } - pub unsafe fn DeleteFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, uluiparam: usize, lpprogress: P3, ulflags: u32) -> windows_core::Result<()> + pub unsafe fn DeleteFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, uluiparam: Option, lpprogress: P3, ulflags: u32) -> windows_core::Result<()> where P3: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).DeleteFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } - pub unsafe fn SetReadFlags(&self, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> + pub unsafe fn SetReadFlags(&self, lpmsglist: *const SBinaryArray, uluiparam: Option, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetReadFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsglist), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).SetReadFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsglist), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } pub unsafe fn GetMessageStatus(&self, cbentryid: u32, lpentryid: *const ENTRYID, ulflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1572,11 +1571,11 @@ impl IMAPIFolder { pub unsafe fn SaveContentsSort(&self, lpsortcriteria: *const SSortOrderSet, ulflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveContentsSort)(windows_core::Interface::as_raw(self), core::mem::transmute(lpsortcriteria), core::mem::transmute(ulflags)).ok() } - pub unsafe fn EmptyFolder(&self, uluiparam: usize, lpprogress: P1, ulflags: u32) -> windows_core::Result<()> + pub unsafe fn EmptyFolder(&self, uluiparam: Option, lpprogress: P1, ulflags: u32) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).EmptyFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).EmptyFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } } #[repr(C)] @@ -1922,17 +1921,17 @@ impl core::ops::Deref for IMAPIStatus { } windows_core::imp::interface_hierarchy!(IMAPIStatus, windows_core::IUnknown, IMAPIProp); impl IMAPIStatus { - pub unsafe fn ValidateState(&self, uluiparam: usize, ulflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ValidateState)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam), core::mem::transmute(ulflags)).ok() + pub unsafe fn ValidateState(&self, uluiparam: Option, ulflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ValidateState)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags)).ok() } - pub unsafe fn SettingsDialog(&self, uluiparam: usize, ulflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SettingsDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam), core::mem::transmute(ulflags)).ok() + pub unsafe fn SettingsDialog(&self, uluiparam: Option, ulflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SettingsDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags)).ok() } pub unsafe fn ChangePassword(&self, lpoldpass: *const i8, lpnewpass: *const i8, ulflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ChangePassword)(windows_core::Interface::as_raw(self), core::mem::transmute(lpoldpass), core::mem::transmute(lpnewpass), core::mem::transmute(ulflags)).ok() } - pub unsafe fn FlushQueues(&self, uluiparam: usize, lptargettransport: Option<&[ENTRYID]>, ulflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).FlushQueues)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam), lptargettransport.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lptargettransport.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ulflags)).ok() + pub unsafe fn FlushQueues(&self, uluiparam: Option, lptargettransport: Option<&[ENTRYID]>, ulflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).FlushQueues)(windows_core::Interface::as_raw(self), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lptargettransport.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lptargettransport.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ulflags)).ok() } } #[repr(C)] @@ -2358,16 +2357,16 @@ 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), core::mem::transmute(ulattachmentnum), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), core::mem::transmute(ulflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(ulattachmentnum), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(ulflags), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(ulflags), core::mem::transmute(lpulattachmentnum), core::mem::transmute(lppattach)).ok() } - pub unsafe fn DeleteAttach(&self, ulattachmentnum: u32, uluiparam: usize, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> + pub unsafe fn DeleteAttach(&self, ulattachmentnum: u32, uluiparam: Option, lpprogress: P2, ulflags: u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(ulattachmentnum), core::mem::transmute(uluiparam), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() + (windows_core::Interface::vtable(self).DeleteAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(ulattachmentnum), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), lpprogress.param().abi(), core::mem::transmute(ulflags)).ok() } pub unsafe fn GetRecipientTable(&self, ulflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2495,7 +2494,7 @@ impl IMsgStore { P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid.unwrap_or(core::ptr::null())), core::mem::transmute(uleventmask), lpadvisesink.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(ulconnection)).ok() @@ -2505,13 +2504,13 @@ impl IMsgStore { (windows_core::Interface::vtable(self).CompareEntryIDs)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid1), core::mem::transmute(lpentryid1), core::mem::transmute(cbentryid2), core::mem::transmute(lpentryid2), core::mem::transmute(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), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), core::mem::transmute(ulflags), core::mem::transmute(lpulobjtype), core::mem::transmute(ppunk)).ok() + (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(ulflags), core::mem::transmute(cbentryid), core::mem::transmute(lpentryid)).ok() + (windows_core::Interface::vtable(self).SetReceiveFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszmessageclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), core::mem::transmute(cbentryid), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(ulflags), core::mem::transmute(lpcbentryid), core::mem::transmute(lppentryid), core::mem::transmute(lppszexplicitclass)).ok() + (windows_core::Interface::vtable(self).GetReceiveFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszmessageclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), core::mem::transmute(lpcbentryid), core::mem::transmute(lppentryid), core::mem::transmute(lppszexplicitclass)).ok() } pub unsafe fn GetReceiveFolderTable(&self, ulflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2786,16 +2785,16 @@ impl IProviderAdmin { (windows_core::Interface::vtable(self).GetProviderTable)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn CreateProvider(&self, lpszprovider: *const i8, lpprops: &[SPropValue], uluiparam: usize, ulflags: u32) -> windows_core::Result { + pub unsafe fn CreateProvider(&self, lpszprovider: *const i8, lpprops: &[SPropValue], uluiparam: Option, ulflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszprovider), lpprops.len().try_into().unwrap(), core::mem::transmute(lpprops.as_ptr()), core::mem::transmute(uluiparam), core::mem::transmute(ulflags), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszprovider), lpprops.len().try_into().unwrap(), core::mem::transmute(lpprops.as_ptr()), core::mem::transmute(uluiparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), &mut result__).map(|| result__) } pub unsafe fn DeleteProvider(&self, lpuid: *const MAPIUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(lpuid)).ok() } 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(core::ptr::null())), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(lpinterface.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -3081,29 +3080,26 @@ impl IWABObject { { (windows_core::Interface::vtable(self).Import)(windows_core::Interface::as_raw(self), lpwip.param().abi()).ok() } - pub unsafe fn Find(&self, lpiab: P0, hwnd: P1) -> windows_core::Result<()> + pub unsafe fn Find(&self, lpiab: P0, hwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Find)(windows_core::Interface::as_raw(self), lpiab.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).Find)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn VCardDisplay(&self, lpiab: P0, hwnd: P1, lpszfilename: P2) -> windows_core::Result<()> + pub unsafe fn VCardDisplay(&self, lpiab: P0, hwnd: Option, lpszfilename: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VCardDisplay)(windows_core::Interface::as_raw(self), lpiab.param().abi(), hwnd.param().abi(), lpszfilename.param().abi()).ok() + (windows_core::Interface::vtable(self).VCardDisplay)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lpszfilename.param().abi()).ok() } - pub unsafe fn LDAPUrl(&self, lpiab: P0, hwnd: P1, ulflags: u32, lpszurl: P3) -> windows_core::Result + pub unsafe fn LDAPUrl(&self, lpiab: P0, hwnd: Option, ulflags: u32, lpszurl: P3) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).LDAPUrl)(windows_core::Interface::as_raw(self), lpiab.param().abi(), hwnd.param().abi(), core::mem::transmute(ulflags), lpszurl.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).LDAPUrl)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulflags), lpszurl.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn VCardCreate(&self, lpiab: P0, ulflags: u32, lpszvcard: P2, lpmailuser: P3) -> windows_core::Result<()> where @@ -3121,19 +3117,17 @@ impl IWABObject { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).VCardRetrieve)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(ulflags), lpszvcard.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetMe(&self, lpiab: P0, ulflags: u32, lpdwaction: *mut u32, lpsbeid: *mut SBinary, hwnd: P4) -> windows_core::Result<()> + pub unsafe fn GetMe(&self, lpiab: P0, ulflags: u32, lpdwaction: *mut u32, lpsbeid: *mut SBinary, hwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).GetMe)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(lpdwaction), core::mem::transmute(lpsbeid), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).GetMe)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(lpdwaction), core::mem::transmute(lpsbeid), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SetMe(&self, lpiab: P0, ulflags: u32, sbeid: SBinary, hwnd: P3) -> windows_core::Result<()> + pub unsafe fn SetMe(&self, lpiab: P0, ulflags: u32, sbeid: SBinary, hwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).SetMe)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(sbeid), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).SetMe)(windows_core::Interface::as_raw(self), lpiab.param().abi(), core::mem::transmute(ulflags), core::mem::transmute(sbeid), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs index a6007c147c..3a3a5aba71 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs @@ -1,11 +1,7 @@ #[inline] -pub unsafe fn AmsiCloseSession(amsicontext: P0, amsisession: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AmsiCloseSession(amsicontext: HAMSICONTEXT, amsisession: HAMSISESSION) { windows_targets::link!("amsi.dll" "system" fn AmsiCloseSession(amsicontext : HAMSICONTEXT, amsisession : HAMSISESSION)); - AmsiCloseSession(amsicontext.param().abi(), amsisession.param().abi()) + AmsiCloseSession(core::mem::transmute(amsicontext), core::mem::transmute(amsisession)) } #[inline] pub unsafe fn AmsiInitialize(appname: P0) -> windows_core::Result @@ -17,62 +13,48 @@ where AmsiInitialize(appname.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn AmsiNotifyOperation(amsicontext: P0, buffer: *const core::ffi::c_void, length: u32, contentname: P3) -> windows_core::Result +pub unsafe fn AmsiNotifyOperation(amsicontext: HAMSICONTEXT, buffer: *const core::ffi::c_void, length: u32, contentname: P3) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("amsi.dll" "system" fn AmsiNotifyOperation(amsicontext : HAMSICONTEXT, buffer : *const core::ffi::c_void, length : u32, contentname : windows_core::PCWSTR, result : *mut AMSI_RESULT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - AmsiNotifyOperation(amsicontext.param().abi(), core::mem::transmute(buffer), core::mem::transmute(length), contentname.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + AmsiNotifyOperation(core::mem::transmute(amsicontext), core::mem::transmute(buffer), core::mem::transmute(length), contentname.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn AmsiOpenSession(amsicontext: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn AmsiOpenSession(amsicontext: HAMSICONTEXT) -> windows_core::Result { windows_targets::link!("amsi.dll" "system" fn AmsiOpenSession(amsicontext : HAMSICONTEXT, amsisession : *mut HAMSISESSION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - AmsiOpenSession(amsicontext.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + AmsiOpenSession(core::mem::transmute(amsicontext), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn AmsiScanBuffer(amsicontext: P0, buffer: *const core::ffi::c_void, length: u32, contentname: P3, amsisession: P4) -> windows_core::Result +pub unsafe fn AmsiScanBuffer(amsicontext: HAMSICONTEXT, buffer: *const core::ffi::c_void, length: u32, contentname: P3, amsisession: Option) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("amsi.dll" "system" fn AmsiScanBuffer(amsicontext : HAMSICONTEXT, buffer : *const core::ffi::c_void, length : u32, contentname : windows_core::PCWSTR, amsisession : HAMSISESSION, result : *mut AMSI_RESULT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - AmsiScanBuffer(amsicontext.param().abi(), core::mem::transmute(buffer), core::mem::transmute(length), contentname.param().abi(), amsisession.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + AmsiScanBuffer(core::mem::transmute(amsicontext), core::mem::transmute(buffer), core::mem::transmute(length), contentname.param().abi(), core::mem::transmute(amsisession.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn AmsiScanString(amsicontext: P0, string: P1, contentname: P2, amsisession: P3) -> windows_core::Result +pub unsafe fn AmsiScanString(amsicontext: HAMSICONTEXT, string: P1, contentname: P2, amsisession: Option) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("amsi.dll" "system" fn AmsiScanString(amsicontext : HAMSICONTEXT, string : windows_core::PCWSTR, contentname : windows_core::PCWSTR, amsisession : HAMSISESSION, result : *mut AMSI_RESULT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - AmsiScanString(amsicontext.param().abi(), string.param().abi(), contentname.param().abi(), amsisession.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + AmsiScanString(core::mem::transmute(amsicontext), string.param().abi(), contentname.param().abi(), core::mem::transmute(amsisession.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn AmsiUninitialize(amsicontext: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn AmsiUninitialize(amsicontext: HAMSICONTEXT) { windows_targets::link!("amsi.dll" "system" fn AmsiUninitialize(amsicontext : HAMSICONTEXT)); - AmsiUninitialize(amsicontext.param().abi()) + AmsiUninitialize(core::mem::transmute(amsicontext)) } #[inline] -pub unsafe fn InstallELAMCertificateInfo(elamfile: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn InstallELAMCertificateInfo(elamfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn InstallELAMCertificateInfo(elamfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - InstallELAMCertificateInfo(elamfile.param().abi()).ok() + InstallELAMCertificateInfo(core::mem::transmute(elamfile)).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 2f62110852..e7499fc9bc 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs @@ -1,7 +1,7 @@ #[inline] -pub unsafe fn ActivateActCtx(hactctx: super::super::Foundation::HANDLE, lpcookie: *mut usize) -> windows_core::Result<()> { +pub unsafe fn ActivateActCtx(hactctx: Option, lpcookie: *mut usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ActivateActCtx(hactctx : super::super::Foundation:: HANDLE, lpcookie : *mut usize) -> super::super::Foundation:: BOOL); - ActivateActCtx(core::mem::transmute(hactctx), core::mem::transmute(lpcookie)).ok() + ActivateActCtx(core::mem::transmute(hactctx.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcookie)).ok() } #[inline] pub unsafe fn AddRefActCtx(hactctx: super::super::Foundation::HANDLE) { @@ -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(core::mem::transmute(applyflags), core::mem::transmute(source), core::mem::transmute(delta), core::mem::transmute(lpreversefiletime.unwrap_or(core::ptr::null())), core::mem::transmute(lptarget), core::mem::transmute(lptargetreverse)) + ApplyDeltaGetReverseB(core::mem::transmute(applyflags), core::mem::transmute(source), core::mem::transmute(delta), core::mem::transmute(lpreversefiletime.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptarget), core::mem::transmute(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 { @@ -54,7 +54,7 @@ where ApplyPatchToFileA(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), core::mem::transmute(applyoptionflags)) } #[inline] -pub unsafe fn ApplyPatchToFileByBuffers(patchfilemapped: &[u8], oldfilemapped: Option<&[u8]>, newfilebuffer: &mut [u8], newfileactualsize: Option<*mut u32>, newfiletime: Option<*mut super::super::Foundation::FILETIME>, applyoptionflags: u32, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn ApplyPatchToFileByBuffers(patchfilemapped: &[u8], oldfilemapped: Option<&[u8]>, newfilebuffer: &mut [u8], newfileactualsize: Option<*mut u32>, newfiletime: Option<*mut super::super::Foundation::FILETIME>, applyoptionflags: u32, progresscallback: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("mspatcha.dll" "system" fn ApplyPatchToFileByBuffers(patchfilemapped : *const u8, patchfilesize : u32, oldfilemapped : *const u8, oldfilesize : u32, newfilebuffer : *mut *mut u8, newfilebuffersize : u32, newfileactualsize : *mut u32, newfiletime : *mut super::super::Foundation:: FILETIME, applyoptionflags : u32, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); ApplyPatchToFileByBuffers( core::mem::transmute(patchfilemapped.as_ptr()), @@ -63,52 +63,42 @@ 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(core::ptr::null_mut())), - core::mem::transmute(newfiletime.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(newfileactualsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(newfiletime.unwrap_or(core::mem::zeroed())), core::mem::transmute(applyoptionflags), - core::mem::transmute(progresscallback), - core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), + core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn ApplyPatchToFileByHandles(patchfilehandle: P0, oldfilehandle: P1, newfilehandle: P2, applyoptionflags: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ApplyPatchToFileByHandles(patchfilehandle: super::super::Foundation::HANDLE, oldfilehandle: Option, newfilehandle: super::super::Foundation::HANDLE, applyoptionflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("mspatcha.dll" "system" fn ApplyPatchToFileByHandles(patchfilehandle : super::super::Foundation:: HANDLE, oldfilehandle : super::super::Foundation:: HANDLE, newfilehandle : super::super::Foundation:: HANDLE, applyoptionflags : u32) -> super::super::Foundation:: BOOL); - ApplyPatchToFileByHandles(patchfilehandle.param().abi(), oldfilehandle.param().abi(), newfilehandle.param().abi(), core::mem::transmute(applyoptionflags)) + ApplyPatchToFileByHandles(core::mem::transmute(patchfilehandle), core::mem::transmute(oldfilehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(newfilehandle), core::mem::transmute(applyoptionflags)) } #[inline] -pub unsafe fn ApplyPatchToFileByHandlesEx(patchfilehandle: P0, oldfilehandle: P1, newfilehandle: P2, applyoptionflags: u32, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ApplyPatchToFileByHandlesEx(patchfilehandle: super::super::Foundation::HANDLE, oldfilehandle: Option, newfilehandle: super::super::Foundation::HANDLE, applyoptionflags: u32, progresscallback: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(applyoptionflags), core::mem::transmute(progresscallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + ApplyPatchToFileByHandlesEx(core::mem::transmute(patchfilehandle), core::mem::transmute(oldfilehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(newfilehandle), core::mem::transmute(applyoptionflags), core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn ApplyPatchToFileExA(patchfilename: P0, oldfilename: P1, newfilename: P2, applyoptionflags: u32, progresscallback: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(applyoptionflags), core::mem::transmute(progresscallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + ApplyPatchToFileExA(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), core::mem::transmute(applyoptionflags), core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn ApplyPatchToFileExW(patchfilename: P0, oldfilename: P1, newfilename: P2, applyoptionflags: u32, progresscallback: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(applyoptionflags), core::mem::transmute(progresscallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + ApplyPatchToFileExW(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), core::mem::transmute(applyoptionflags), core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ApplyPatchToFileW(patchfilename: P0, oldfilename: P1, newfilename: P2, applyoptionflags: u32) -> super::super::Foundation::BOOL @@ -143,13 +133,13 @@ where P10: 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(core::mem::transmute(filetypeset), core::mem::transmute(setflags), core::mem::transmute(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())), core::mem::transmute(hashalgid), lpdeltaname.param().abi()) + CreateDeltaA(core::mem::transmute(filetypeset), core::mem::transmute(setflags), core::mem::transmute(resetflags), lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(filetypeset), core::mem::transmute(setflags), core::mem::transmute(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())), core::mem::transmute(hashalgid), core::mem::transmute(lpdelta)) + CreateDeltaB(core::mem::transmute(filetypeset), core::mem::transmute(setflags), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(hashalgid), core::mem::transmute(lpdelta)) } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -162,7 +152,7 @@ where P10: 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(core::mem::transmute(filetypeset), core::mem::transmute(setflags), core::mem::transmute(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())), core::mem::transmute(hashalgid), lpdeltaname.param().abi()) + CreateDeltaW(core::mem::transmute(filetypeset), core::mem::transmute(setflags), core::mem::transmute(resetflags), lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(core::mem::zeroed())), core::mem::transmute(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,44 +162,35 @@ 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(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::ptr::null()))) + CreatePatchFileA(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreatePatchFileByHandles(oldfilehandle: P0, newfilehandle: P1, patchfilehandle: P2, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn CreatePatchFileByHandles(oldfilehandle: Option, newfilehandle: super::super::Foundation::HANDLE, patchfilehandle: super::super::Foundation::HANDLE, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::ptr::null()))) + CreatePatchFileByHandles(core::mem::transmute(oldfilehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(newfilehandle), core::mem::transmute(patchfilehandle), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreatePatchFileByHandlesEx(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_H], newfilehandle: P2, patchfilehandle: P3, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn CreatePatchFileByHandlesEx(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_H], newfilehandle: super::super::Foundation::HANDLE, patchfilehandle: super::super::Foundation::HANDLE, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), core::mem::transmute(progresscallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + CreatePatchFileByHandlesEx(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), core::mem::transmute(newfilehandle), core::mem::transmute(patchfilehandle), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreatePatchFileExA(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_A], newfilename: P2, patchfilename: P3, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn CreatePatchFileExA(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_A], newfilename: P2, patchfilename: P3, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL where P2: windows_core::Param, P3: 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(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), core::mem::transmute(progresscallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + CreatePatchFileExA(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreatePatchFileExW(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_W], newfilename: P2, patchfilename: P3, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn CreatePatchFileExW(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_W], newfilename: P2, patchfilename: P3, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: Option, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL where P2: windows_core::Param, P3: 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(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), core::mem::transmute(progresscallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) + CreatePatchFileExW(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), core::mem::transmute(progresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed()))) } #[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 +200,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(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::ptr::null()))) + CreatePatchFileW(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), core::mem::transmute(optionflags), core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DeactivateActCtx(dwflags: u32, ulcookie: usize) -> windows_core::Result<()> { @@ -246,13 +227,9 @@ where ExtractPatchHeaderToFileA(patchfilename.param().abi(), patchheaderfilename.param().abi()) } #[inline] -pub unsafe fn ExtractPatchHeaderToFileByHandles(patchfilehandle: P0, patchheaderfilehandle: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ExtractPatchHeaderToFileByHandles(patchfilehandle: super::super::Foundation::HANDLE, patchheaderfilehandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("mspatchc.dll" "system" fn ExtractPatchHeaderToFileByHandles(patchfilehandle : super::super::Foundation:: HANDLE, patchheaderfilehandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ExtractPatchHeaderToFileByHandles(patchfilehandle.param().abi(), patchheaderfilehandle.param().abi()) + ExtractPatchHeaderToFileByHandles(core::mem::transmute(patchfilehandle), core::mem::transmute(patchheaderfilehandle)) } #[inline] pub unsafe fn ExtractPatchHeaderToFileW(patchfilename: P0, patchheaderfilename: P1) -> super::super::Foundation::BOOL @@ -267,7 +244,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(core::mem::transmute(dwflags), core::mem::transmute(lpextensionguid.unwrap_or(core::ptr::null())), core::mem::transmute(ulsectionid), core::mem::transmute(lpguidtofind.unwrap_or(core::ptr::null())), core::mem::transmute(returneddata)).ok() + FindActCtxSectionGuid(core::mem::transmute(dwflags), core::mem::transmute(lpextensionguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulsectionid), core::mem::transmute(lpguidtofind.unwrap_or(core::mem::zeroed())), core::mem::transmute(returneddata)).ok() } #[cfg(feature = "Win32_System_WindowsProgramming")] #[inline] @@ -276,7 +253,7 @@ where P3: 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(core::mem::transmute(dwflags), core::mem::transmute(lpextensionguid.unwrap_or(core::ptr::null())), core::mem::transmute(ulsectionid), lpstringtofind.param().abi(), core::mem::transmute(returneddata)).ok() + FindActCtxSectionStringA(core::mem::transmute(dwflags), core::mem::transmute(lpextensionguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulsectionid), lpstringtofind.param().abi(), core::mem::transmute(returneddata)).ok() } #[cfg(feature = "Win32_System_WindowsProgramming")] #[inline] @@ -285,7 +262,7 @@ where P3: 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(core::mem::transmute(dwflags), core::mem::transmute(lpextensionguid.unwrap_or(core::ptr::null())), core::mem::transmute(ulsectionid), lpstringtofind.param().abi(), core::mem::transmute(returneddata)).ok() + FindActCtxSectionStringW(core::mem::transmute(dwflags), core::mem::transmute(lpextensionguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulsectionid), lpstringtofind.param().abi(), core::mem::transmute(returneddata)).ok() } #[inline] pub unsafe fn GetCurrentActCtx(lphactctx: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -349,7 +326,7 @@ where GetFilePatchSignatureA( filename.param().abi(), core::mem::transmute(optionflags), - core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), 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 +342,7 @@ pub unsafe fn GetFilePatchSignatureByBuffer(filebufferwritable: &mut [u8], optio core::mem::transmute(filebufferwritable.as_ptr()), filebufferwritable.len().try_into().unwrap(), core::mem::transmute(optionflags), - core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), 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()), @@ -375,15 +352,12 @@ pub unsafe fn GetFilePatchSignatureByBuffer(filebufferwritable: &mut [u8], optio ) } #[inline] -pub unsafe fn GetFilePatchSignatureByHandle(filehandle: P0, optionflags: u32, optiondata: Option<*const core::ffi::c_void>, ignorerangearray: Option<&[PATCH_IGNORE_RANGE]>, retainrangearray: Option<&[PATCH_RETAIN_RANGE]>, signaturebuffer: &mut [u8]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetFilePatchSignatureByHandle(filehandle: super::super::Foundation::HANDLE, optionflags: u32, optiondata: Option<*const core::ffi::c_void>, ignorerangearray: Option<&[PATCH_IGNORE_RANGE]>, retainrangearray: Option<&[PATCH_RETAIN_RANGE]>, signaturebuffer: &mut [u8]) -> super::super::Foundation::BOOL { windows_targets::link!("mspatcha.dll" "system" fn GetFilePatchSignatureByHandle(filehandle : super::super::Foundation:: HANDLE, optionflags : u32, optiondata : *const core::ffi::c_void, ignorerangecount : u32, ignorerangearray : *const PATCH_IGNORE_RANGE, retainrangecount : u32, retainrangearray : *const PATCH_RETAIN_RANGE, signaturebuffersize : u32, signaturebuffer : windows_core::PSTR) -> super::super::Foundation:: BOOL); GetFilePatchSignatureByHandle( - filehandle.param().abi(), + core::mem::transmute(filehandle), core::mem::transmute(optionflags), - core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), 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 +375,7 @@ where GetFilePatchSignatureW( filename.param().abi(), core::mem::transmute(optionflags), - core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), 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 +432,7 @@ where P3: 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(), core::mem::transmute(dwflags), core::mem::transmute(phregdata.unwrap_or(core::ptr::null())), fremoveitems.param().abi()) + MsiAdvertiseScriptA(szscriptfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phregdata.unwrap_or(core::mem::zeroed())), fremoveitems.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -468,7 +442,7 @@ where P3: 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(), core::mem::transmute(dwflags), core::mem::transmute(phregdata.unwrap_or(core::ptr::null())), fremoveitems.param().abi()) + MsiAdvertiseScriptW(szscriptfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phregdata.unwrap_or(core::mem::zeroed())), fremoveitems.param().abi()) } #[inline] pub unsafe fn MsiApplyMultiplePatchesA(szpatchpackages: P0, szproductcode: P1, szpropertieslist: P2) -> u32 @@ -532,12 +506,9 @@ pub unsafe fn MsiCloseAllHandles() -> u32 { MsiCloseAllHandles() } #[inline] -pub unsafe fn MsiCloseHandle(hany: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiCloseHandle(hany: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiCloseHandle(hany : MSIHANDLE) -> u32); - MsiCloseHandle(hany.param().abi()) + MsiCloseHandle(core::mem::transmute(hany)) } #[inline] pub unsafe fn MsiCollectUserInfoA(szproduct: P0) -> u32 @@ -613,186 +584,159 @@ pub unsafe fn MsiCreateRecord(cparams: u32) -> MSIHANDLE { MsiCreateRecord(core::mem::transmute(cparams)) } #[inline] -pub unsafe fn MsiCreateTransformSummaryInfoA(hdatabase: P0, hdatabasereference: P1, sztransformfile: P2, ierrorconditions: MSITRANSFORM_ERROR, ivalidation: MSITRANSFORM_VALIDATE) -> u32 +pub unsafe fn MsiCreateTransformSummaryInfoA(hdatabase: MSIHANDLE, hdatabasereference: MSIHANDLE, sztransformfile: P2, ierrorconditions: MSITRANSFORM_ERROR, ivalidation: MSITRANSFORM_VALIDATE) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiCreateTransformSummaryInfoA(hdatabase : MSIHANDLE, hdatabasereference : MSIHANDLE, sztransformfile : windows_core::PCSTR, ierrorconditions : MSITRANSFORM_ERROR, ivalidation : MSITRANSFORM_VALIDATE) -> u32); - MsiCreateTransformSummaryInfoA(hdatabase.param().abi(), hdatabasereference.param().abi(), sztransformfile.param().abi(), core::mem::transmute(ierrorconditions), core::mem::transmute(ivalidation)) + MsiCreateTransformSummaryInfoA(core::mem::transmute(hdatabase), core::mem::transmute(hdatabasereference), sztransformfile.param().abi(), core::mem::transmute(ierrorconditions), core::mem::transmute(ivalidation)) } #[inline] -pub unsafe fn MsiCreateTransformSummaryInfoW(hdatabase: P0, hdatabasereference: P1, sztransformfile: P2, ierrorconditions: MSITRANSFORM_ERROR, ivalidation: MSITRANSFORM_VALIDATE) -> u32 +pub unsafe fn MsiCreateTransformSummaryInfoW(hdatabase: MSIHANDLE, hdatabasereference: MSIHANDLE, sztransformfile: P2, ierrorconditions: MSITRANSFORM_ERROR, ivalidation: MSITRANSFORM_VALIDATE) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiCreateTransformSummaryInfoW(hdatabase : MSIHANDLE, hdatabasereference : MSIHANDLE, sztransformfile : windows_core::PCWSTR, ierrorconditions : MSITRANSFORM_ERROR, ivalidation : MSITRANSFORM_VALIDATE) -> u32); - MsiCreateTransformSummaryInfoW(hdatabase.param().abi(), hdatabasereference.param().abi(), sztransformfile.param().abi(), core::mem::transmute(ierrorconditions), core::mem::transmute(ivalidation)) + MsiCreateTransformSummaryInfoW(core::mem::transmute(hdatabase), core::mem::transmute(hdatabasereference), sztransformfile.param().abi(), core::mem::transmute(ierrorconditions), core::mem::transmute(ivalidation)) } #[inline] -pub unsafe fn MsiDatabaseApplyTransformA(hdatabase: P0, sztransformfile: P1, ierrorconditions: MSITRANSFORM_ERROR) -> u32 +pub unsafe fn MsiDatabaseApplyTransformA(hdatabase: MSIHANDLE, sztransformfile: P1, ierrorconditions: MSITRANSFORM_ERROR) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseApplyTransformA(hdatabase : MSIHANDLE, sztransformfile : windows_core::PCSTR, ierrorconditions : MSITRANSFORM_ERROR) -> u32); - MsiDatabaseApplyTransformA(hdatabase.param().abi(), sztransformfile.param().abi(), core::mem::transmute(ierrorconditions)) + MsiDatabaseApplyTransformA(core::mem::transmute(hdatabase), sztransformfile.param().abi(), core::mem::transmute(ierrorconditions)) } #[inline] -pub unsafe fn MsiDatabaseApplyTransformW(hdatabase: P0, sztransformfile: P1, ierrorconditions: MSITRANSFORM_ERROR) -> u32 +pub unsafe fn MsiDatabaseApplyTransformW(hdatabase: MSIHANDLE, sztransformfile: P1, ierrorconditions: MSITRANSFORM_ERROR) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseApplyTransformW(hdatabase : MSIHANDLE, sztransformfile : windows_core::PCWSTR, ierrorconditions : MSITRANSFORM_ERROR) -> u32); - MsiDatabaseApplyTransformW(hdatabase.param().abi(), sztransformfile.param().abi(), core::mem::transmute(ierrorconditions)) + MsiDatabaseApplyTransformW(core::mem::transmute(hdatabase), sztransformfile.param().abi(), core::mem::transmute(ierrorconditions)) } #[inline] -pub unsafe fn MsiDatabaseCommit(hdatabase: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiDatabaseCommit(hdatabase: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiDatabaseCommit(hdatabase : MSIHANDLE) -> u32); - MsiDatabaseCommit(hdatabase.param().abi()) + MsiDatabaseCommit(core::mem::transmute(hdatabase)) } #[inline] -pub unsafe fn MsiDatabaseExportA(hdatabase: P0, sztablename: P1, szfolderpath: P2, szfilename: P3) -> u32 +pub unsafe fn MsiDatabaseExportA(hdatabase: MSIHANDLE, sztablename: P1, szfolderpath: P2, szfilename: P3) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseExportA(hdatabase : MSIHANDLE, sztablename : windows_core::PCSTR, szfolderpath : windows_core::PCSTR, szfilename : windows_core::PCSTR) -> u32); - MsiDatabaseExportA(hdatabase.param().abi(), sztablename.param().abi(), szfolderpath.param().abi(), szfilename.param().abi()) + MsiDatabaseExportA(core::mem::transmute(hdatabase), sztablename.param().abi(), szfolderpath.param().abi(), szfilename.param().abi()) } #[inline] -pub unsafe fn MsiDatabaseExportW(hdatabase: P0, sztablename: P1, szfolderpath: P2, szfilename: P3) -> u32 +pub unsafe fn MsiDatabaseExportW(hdatabase: MSIHANDLE, sztablename: P1, szfolderpath: P2, szfilename: P3) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseExportW(hdatabase : MSIHANDLE, sztablename : windows_core::PCWSTR, szfolderpath : windows_core::PCWSTR, szfilename : windows_core::PCWSTR) -> u32); - MsiDatabaseExportW(hdatabase.param().abi(), sztablename.param().abi(), szfolderpath.param().abi(), szfilename.param().abi()) + MsiDatabaseExportW(core::mem::transmute(hdatabase), sztablename.param().abi(), szfolderpath.param().abi(), szfilename.param().abi()) } #[inline] -pub unsafe fn MsiDatabaseGenerateTransformA(hdatabase: P0, hdatabasereference: P1, sztransformfile: P2, ireserved1: i32, ireserved2: i32) -> u32 +pub unsafe fn MsiDatabaseGenerateTransformA(hdatabase: MSIHANDLE, hdatabasereference: MSIHANDLE, sztransformfile: P2, ireserved1: i32, ireserved2: i32) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseGenerateTransformA(hdatabase : MSIHANDLE, hdatabasereference : MSIHANDLE, sztransformfile : windows_core::PCSTR, ireserved1 : i32, ireserved2 : i32) -> u32); - MsiDatabaseGenerateTransformA(hdatabase.param().abi(), hdatabasereference.param().abi(), sztransformfile.param().abi(), core::mem::transmute(ireserved1), core::mem::transmute(ireserved2)) + MsiDatabaseGenerateTransformA(core::mem::transmute(hdatabase), core::mem::transmute(hdatabasereference), sztransformfile.param().abi(), core::mem::transmute(ireserved1), core::mem::transmute(ireserved2)) } #[inline] -pub unsafe fn MsiDatabaseGenerateTransformW(hdatabase: P0, hdatabasereference: P1, sztransformfile: P2, ireserved1: i32, ireserved2: i32) -> u32 +pub unsafe fn MsiDatabaseGenerateTransformW(hdatabase: MSIHANDLE, hdatabasereference: MSIHANDLE, sztransformfile: P2, ireserved1: i32, ireserved2: i32) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseGenerateTransformW(hdatabase : MSIHANDLE, hdatabasereference : MSIHANDLE, sztransformfile : windows_core::PCWSTR, ireserved1 : i32, ireserved2 : i32) -> u32); - MsiDatabaseGenerateTransformW(hdatabase.param().abi(), hdatabasereference.param().abi(), sztransformfile.param().abi(), core::mem::transmute(ireserved1), core::mem::transmute(ireserved2)) + MsiDatabaseGenerateTransformW(core::mem::transmute(hdatabase), core::mem::transmute(hdatabasereference), sztransformfile.param().abi(), core::mem::transmute(ireserved1), core::mem::transmute(ireserved2)) } #[inline] -pub unsafe fn MsiDatabaseGetPrimaryKeysA(hdatabase: P0, sztablename: P1, phrecord: *mut MSIHANDLE) -> u32 +pub unsafe fn MsiDatabaseGetPrimaryKeysA(hdatabase: MSIHANDLE, sztablename: P1, phrecord: *mut MSIHANDLE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseGetPrimaryKeysA(hdatabase : MSIHANDLE, sztablename : windows_core::PCSTR, phrecord : *mut MSIHANDLE) -> u32); - MsiDatabaseGetPrimaryKeysA(hdatabase.param().abi(), sztablename.param().abi(), core::mem::transmute(phrecord)) + MsiDatabaseGetPrimaryKeysA(core::mem::transmute(hdatabase), sztablename.param().abi(), core::mem::transmute(phrecord)) } #[inline] -pub unsafe fn MsiDatabaseGetPrimaryKeysW(hdatabase: P0, sztablename: P1, phrecord: *mut MSIHANDLE) -> u32 +pub unsafe fn MsiDatabaseGetPrimaryKeysW(hdatabase: MSIHANDLE, sztablename: P1, phrecord: *mut MSIHANDLE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseGetPrimaryKeysW(hdatabase : MSIHANDLE, sztablename : windows_core::PCWSTR, phrecord : *mut MSIHANDLE) -> u32); - MsiDatabaseGetPrimaryKeysW(hdatabase.param().abi(), sztablename.param().abi(), core::mem::transmute(phrecord)) + MsiDatabaseGetPrimaryKeysW(core::mem::transmute(hdatabase), sztablename.param().abi(), core::mem::transmute(phrecord)) } #[inline] -pub unsafe fn MsiDatabaseImportA(hdatabase: P0, szfolderpath: P1, szfilename: P2) -> u32 +pub unsafe fn MsiDatabaseImportA(hdatabase: MSIHANDLE, szfolderpath: P1, szfilename: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseImportA(hdatabase : MSIHANDLE, szfolderpath : windows_core::PCSTR, szfilename : windows_core::PCSTR) -> u32); - MsiDatabaseImportA(hdatabase.param().abi(), szfolderpath.param().abi(), szfilename.param().abi()) + MsiDatabaseImportA(core::mem::transmute(hdatabase), szfolderpath.param().abi(), szfilename.param().abi()) } #[inline] -pub unsafe fn MsiDatabaseImportW(hdatabase: P0, szfolderpath: P1, szfilename: P2) -> u32 +pub unsafe fn MsiDatabaseImportW(hdatabase: MSIHANDLE, szfolderpath: P1, szfilename: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseImportW(hdatabase : MSIHANDLE, szfolderpath : windows_core::PCWSTR, szfilename : windows_core::PCWSTR) -> u32); - MsiDatabaseImportW(hdatabase.param().abi(), szfolderpath.param().abi(), szfilename.param().abi()) + MsiDatabaseImportW(core::mem::transmute(hdatabase), szfolderpath.param().abi(), szfilename.param().abi()) } #[inline] -pub unsafe fn MsiDatabaseIsTablePersistentA(hdatabase: P0, sztablename: P1) -> MSICONDITION +pub unsafe fn MsiDatabaseIsTablePersistentA(hdatabase: MSIHANDLE, sztablename: P1) -> MSICONDITION where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseIsTablePersistentA(hdatabase : MSIHANDLE, sztablename : windows_core::PCSTR) -> MSICONDITION); - MsiDatabaseIsTablePersistentA(hdatabase.param().abi(), sztablename.param().abi()) + MsiDatabaseIsTablePersistentA(core::mem::transmute(hdatabase), sztablename.param().abi()) } #[inline] -pub unsafe fn MsiDatabaseIsTablePersistentW(hdatabase: P0, sztablename: P1) -> MSICONDITION +pub unsafe fn MsiDatabaseIsTablePersistentW(hdatabase: MSIHANDLE, sztablename: P1) -> MSICONDITION where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseIsTablePersistentW(hdatabase : MSIHANDLE, sztablename : windows_core::PCWSTR) -> MSICONDITION); - MsiDatabaseIsTablePersistentW(hdatabase.param().abi(), sztablename.param().abi()) + MsiDatabaseIsTablePersistentW(core::mem::transmute(hdatabase), sztablename.param().abi()) } #[inline] -pub unsafe fn MsiDatabaseMergeA(hdatabase: P0, hdatabasemerge: P1, sztablename: P2) -> u32 +pub unsafe fn MsiDatabaseMergeA(hdatabase: MSIHANDLE, hdatabasemerge: MSIHANDLE, sztablename: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseMergeA(hdatabase : MSIHANDLE, hdatabasemerge : MSIHANDLE, sztablename : windows_core::PCSTR) -> u32); - MsiDatabaseMergeA(hdatabase.param().abi(), hdatabasemerge.param().abi(), sztablename.param().abi()) + MsiDatabaseMergeA(core::mem::transmute(hdatabase), core::mem::transmute(hdatabasemerge), sztablename.param().abi()) } #[inline] -pub unsafe fn MsiDatabaseMergeW(hdatabase: P0, hdatabasemerge: P1, sztablename: P2) -> u32 +pub unsafe fn MsiDatabaseMergeW(hdatabase: MSIHANDLE, hdatabasemerge: MSIHANDLE, sztablename: P2) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseMergeW(hdatabase : MSIHANDLE, hdatabasemerge : MSIHANDLE, sztablename : windows_core::PCWSTR) -> u32); - MsiDatabaseMergeW(hdatabase.param().abi(), hdatabasemerge.param().abi(), sztablename.param().abi()) + MsiDatabaseMergeW(core::mem::transmute(hdatabase), core::mem::transmute(hdatabasemerge), sztablename.param().abi()) } #[inline] -pub unsafe fn MsiDatabaseOpenViewA(hdatabase: P0, szquery: P1, phview: *mut MSIHANDLE) -> u32 +pub unsafe fn MsiDatabaseOpenViewA(hdatabase: MSIHANDLE, szquery: P1, phview: *mut MSIHANDLE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseOpenViewA(hdatabase : MSIHANDLE, szquery : windows_core::PCSTR, phview : *mut MSIHANDLE) -> u32); - MsiDatabaseOpenViewA(hdatabase.param().abi(), szquery.param().abi(), core::mem::transmute(phview)) + MsiDatabaseOpenViewA(core::mem::transmute(hdatabase), szquery.param().abi(), core::mem::transmute(phview)) } #[inline] -pub unsafe fn MsiDatabaseOpenViewW(hdatabase: P0, szquery: P1, phview: *mut MSIHANDLE) -> u32 +pub unsafe fn MsiDatabaseOpenViewW(hdatabase: MSIHANDLE, szquery: P1, phview: *mut MSIHANDLE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDatabaseOpenViewW(hdatabase : MSIHANDLE, szquery : windows_core::PCWSTR, phview : *mut MSIHANDLE) -> u32); - MsiDatabaseOpenViewW(hdatabase.param().abi(), szquery.param().abi(), core::mem::transmute(phview)) + MsiDatabaseOpenViewW(core::mem::transmute(hdatabase), szquery.param().abi(), core::mem::transmute(phview)) } #[inline] pub unsafe fn MsiDetermineApplicablePatchesA(szproductpackagepath: P0, ppatchinfo: &mut [MSIPATCHSEQUENCEINFOA]) -> u32 @@ -829,22 +773,20 @@ where MsiDeterminePatchSequenceW(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), ppatchinfo.len().try_into().unwrap(), core::mem::transmute(ppatchinfo.as_ptr())) } #[inline] -pub unsafe fn MsiDoActionA(hinstall: P0, szaction: P1) -> u32 +pub unsafe fn MsiDoActionA(hinstall: MSIHANDLE, szaction: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDoActionA(hinstall : MSIHANDLE, szaction : windows_core::PCSTR) -> u32); - MsiDoActionA(hinstall.param().abi(), szaction.param().abi()) + MsiDoActionA(core::mem::transmute(hinstall), szaction.param().abi()) } #[inline] -pub unsafe fn MsiDoActionW(hinstall: P0, szaction: P1) -> u32 +pub unsafe fn MsiDoActionW(hinstall: MSIHANDLE, szaction: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiDoActionW(hinstall : MSIHANDLE, szaction : windows_core::PCWSTR) -> u32); - MsiDoActionW(hinstall.param().abi(), szaction.param().abi()) + MsiDoActionW(core::mem::transmute(hinstall), szaction.param().abi()) } #[inline] pub unsafe fn MsiEnableLogA(dwlogmode: INSTALLLOGMODE, szlogfile: P1, dwlogattributes: u32) -> u32 @@ -863,12 +805,9 @@ where MsiEnableLogW(dwlogmode.0 as _, szlogfile.param().abi(), core::mem::transmute(dwlogattributes)) } #[inline] -pub unsafe fn MsiEnableUIPreview(hdatabase: P0, phpreview: *mut MSIHANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiEnableUIPreview(hdatabase: MSIHANDLE, phpreview: *mut MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiEnableUIPreview(hdatabase : MSIHANDLE, phpreview : *mut MSIHANDLE) -> u32); - MsiEnableUIPreview(hdatabase.param().abi(), core::mem::transmute(phpreview)) + MsiEnableUIPreview(core::mem::transmute(hdatabase), core::mem::transmute(phpreview)) } #[inline] pub unsafe fn MsiEndTransaction(dwtransactionstate: MSITRANSACTIONSTATE) -> u32 { @@ -884,22 +823,22 @@ where MsiEnumClientsA(szcomponent.param().abi(), core::mem::transmute(iproductindex), core::mem::transmute(lpproductbuf)) } #[inline] -pub unsafe fn MsiEnumClientsExA(szcomponent: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwproductindex: u32, szproductbuf: Option<&mut [u8; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: windows_core::PSTR, pcchsid: Option<*mut u32>) -> u32 +pub unsafe fn MsiEnumClientsExA(szcomponent: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwproductindex: u32, szproductbuf: Option<&mut [u8; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: Option, pcchsid: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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 _, core::mem::transmute(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()))) + MsiEnumClientsExA(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, core::mem::transmute(dwproductindex), core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn MsiEnumClientsExW(szcomponent: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwproductindex: u32, szproductbuf: Option<&mut [u16; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: Option, pcchsid: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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 _, core::mem::transmute(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()))) + MsiEnumClientsExW(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, core::mem::transmute(dwproductindex), core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiEnumClientsW(szcomponent: P0, iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 @@ -910,38 +849,36 @@ where MsiEnumClientsW(szcomponent.param().abi(), core::mem::transmute(iproductindex), core::mem::transmute(lpproductbuf)) } #[inline] -pub unsafe fn MsiEnumComponentCostsA(hinstall: P0, szcomponent: P1, dwindex: u32, istate: INSTALLSTATE, szdrivebuf: windows_core::PSTR, pcchdrivebuf: *mut u32, picost: *mut i32, pitempcost: *mut i32) -> u32 +pub unsafe fn MsiEnumComponentCostsA(hinstall: MSIHANDLE, szcomponent: P1, dwindex: u32, istate: INSTALLSTATE, szdrivebuf: windows_core::PSTR, pcchdrivebuf: *mut u32, picost: *mut i32, pitempcost: *mut i32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentCostsA(hinstall : MSIHANDLE, szcomponent : windows_core::PCSTR, dwindex : u32, istate : INSTALLSTATE, szdrivebuf : windows_core::PSTR, pcchdrivebuf : *mut u32, picost : *mut i32, pitempcost : *mut i32) -> u32); - MsiEnumComponentCostsA(hinstall.param().abi(), szcomponent.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(istate), core::mem::transmute(szdrivebuf), core::mem::transmute(pcchdrivebuf), core::mem::transmute(picost), core::mem::transmute(pitempcost)) + MsiEnumComponentCostsA(core::mem::transmute(hinstall), szcomponent.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(istate), core::mem::transmute(szdrivebuf), core::mem::transmute(pcchdrivebuf), core::mem::transmute(picost), core::mem::transmute(pitempcost)) } #[inline] -pub unsafe fn MsiEnumComponentCostsW(hinstall: P0, szcomponent: P1, dwindex: u32, istate: INSTALLSTATE, szdrivebuf: windows_core::PWSTR, pcchdrivebuf: *mut u32, picost: *mut i32, pitempcost: *mut i32) -> u32 +pub unsafe fn MsiEnumComponentCostsW(hinstall: MSIHANDLE, szcomponent: P1, dwindex: u32, istate: INSTALLSTATE, szdrivebuf: windows_core::PWSTR, pcchdrivebuf: *mut u32, picost: *mut i32, pitempcost: *mut i32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentCostsW(hinstall : MSIHANDLE, szcomponent : windows_core::PCWSTR, dwindex : u32, istate : INSTALLSTATE, szdrivebuf : windows_core::PWSTR, pcchdrivebuf : *mut u32, picost : *mut i32, pitempcost : *mut i32) -> u32); - MsiEnumComponentCostsW(hinstall.param().abi(), szcomponent.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(istate), core::mem::transmute(szdrivebuf), core::mem::transmute(pcchdrivebuf), core::mem::transmute(picost), core::mem::transmute(pitempcost)) + MsiEnumComponentCostsW(core::mem::transmute(hinstall), szcomponent.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(istate), core::mem::transmute(szdrivebuf), core::mem::transmute(pcchdrivebuf), core::mem::transmute(picost), core::mem::transmute(pitempcost)) } #[inline] -pub unsafe fn MsiEnumComponentQualifiersA(szcomponent: P0, iindex: u32, lpqualifierbuf: windows_core::PSTR, pcchqualifierbuf: *mut u32, lpapplicationdatabuf: windows_core::PSTR, pcchapplicationdatabuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiEnumComponentQualifiersA(szcomponent: P0, iindex: u32, lpqualifierbuf: windows_core::PSTR, pcchqualifierbuf: *mut u32, lpapplicationdatabuf: Option, pcchapplicationdatabuf: Option<*mut u32>) -> u32 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(), core::mem::transmute(iindex), core::mem::transmute(lpqualifierbuf), core::mem::transmute(pcchqualifierbuf), core::mem::transmute(lpapplicationdatabuf), core::mem::transmute(pcchapplicationdatabuf.unwrap_or(core::ptr::null_mut()))) + MsiEnumComponentQualifiersA(szcomponent.param().abi(), core::mem::transmute(iindex), core::mem::transmute(lpqualifierbuf), core::mem::transmute(pcchqualifierbuf), core::mem::transmute(lpapplicationdatabuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchapplicationdatabuf.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn MsiEnumComponentQualifiersW(szcomponent: P0, iindex: u32, lpqualifierbuf: windows_core::PWSTR, pcchqualifierbuf: *mut u32, lpapplicationdatabuf: Option, pcchapplicationdatabuf: Option<*mut u32>) -> u32 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(), core::mem::transmute(iindex), core::mem::transmute(lpqualifierbuf), core::mem::transmute(pcchqualifierbuf), core::mem::transmute(lpapplicationdatabuf), core::mem::transmute(pcchapplicationdatabuf.unwrap_or(core::ptr::null_mut()))) + MsiEnumComponentQualifiersW(szcomponent.param().abi(), core::mem::transmute(iindex), core::mem::transmute(lpqualifierbuf), core::mem::transmute(pcchqualifierbuf), core::mem::transmute(lpapplicationdatabuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchapplicationdatabuf.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiEnumComponentsA(icomponentindex: u32, lpcomponentbuf: windows_core::PSTR) -> u32 { @@ -949,20 +886,20 @@ pub unsafe fn MsiEnumComponentsA(icomponentindex: u32, lpcomponentbuf: windows_c MsiEnumComponentsA(core::mem::transmute(icomponentindex), core::mem::transmute(lpcomponentbuf)) } #[inline] -pub unsafe fn MsiEnumComponentsExA(szusersid: P0, dwcontext: u32, dwindex: u32, szinstalledcomponentcode: Option<&mut [u8; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: windows_core::PSTR, pcchsid: Option<*mut u32>) -> u32 +pub unsafe fn MsiEnumComponentsExA(szusersid: P0, dwcontext: u32, dwindex: u32, szinstalledcomponentcode: Option<&mut [u8; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: Option, pcchsid: Option<*mut u32>) -> u32 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(), core::mem::transmute(dwcontext), core::mem::transmute(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()))) + MsiEnumComponentsExA(szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwindex), core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn MsiEnumComponentsExW(szusersid: P0, dwcontext: u32, dwindex: u32, szinstalledcomponentcode: Option<&mut [u16; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: Option, pcchsid: Option<*mut u32>) -> u32 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(), core::mem::transmute(dwcontext), core::mem::transmute(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()))) + MsiEnumComponentsExW(szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwindex), core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiEnumComponentsW(icomponentindex: u32, lpcomponentbuf: windows_core::PWSTR) -> u32 { @@ -970,20 +907,20 @@ pub unsafe fn MsiEnumComponentsW(icomponentindex: u32, lpcomponentbuf: windows_c MsiEnumComponentsW(core::mem::transmute(icomponentindex), core::mem::transmute(lpcomponentbuf)) } #[inline] -pub unsafe fn MsiEnumFeaturesA(szproduct: P0, ifeatureindex: u32, lpfeaturebuf: windows_core::PSTR, lpparentbuf: windows_core::PSTR) -> u32 +pub unsafe fn MsiEnumFeaturesA(szproduct: P0, ifeatureindex: u32, lpfeaturebuf: windows_core::PSTR, lpparentbuf: Option) -> u32 where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumFeaturesA(szproduct : windows_core::PCSTR, ifeatureindex : u32, lpfeaturebuf : windows_core::PSTR, lpparentbuf : windows_core::PSTR) -> u32); - MsiEnumFeaturesA(szproduct.param().abi(), core::mem::transmute(ifeatureindex), core::mem::transmute(lpfeaturebuf), core::mem::transmute(lpparentbuf)) + MsiEnumFeaturesA(szproduct.param().abi(), core::mem::transmute(ifeatureindex), core::mem::transmute(lpfeaturebuf), core::mem::transmute(lpparentbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiEnumFeaturesW(szproduct: P0, ifeatureindex: u32, lpfeaturebuf: windows_core::PWSTR, lpparentbuf: windows_core::PWSTR) -> u32 +pub unsafe fn MsiEnumFeaturesW(szproduct: P0, ifeatureindex: u32, lpfeaturebuf: windows_core::PWSTR, lpparentbuf: Option) -> u32 where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumFeaturesW(szproduct : windows_core::PCWSTR, ifeatureindex : u32, lpfeaturebuf : windows_core::PWSTR, lpparentbuf : windows_core::PWSTR) -> u32); - MsiEnumFeaturesW(szproduct.param().abi(), core::mem::transmute(ifeatureindex), core::mem::transmute(lpfeaturebuf), core::mem::transmute(lpparentbuf)) + MsiEnumFeaturesW(szproduct.param().abi(), core::mem::transmute(ifeatureindex), core::mem::transmute(lpfeaturebuf), core::mem::transmute(lpparentbuf.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiEnumPatchesA(szproduct: P0, ipatchindex: u32, lppatchbuf: windows_core::PSTR, lptransformsbuf: windows_core::PSTR, pcchtransformsbuf: *mut u32) -> u32 @@ -994,7 +931,7 @@ where MsiEnumPatchesA(szproduct.param().abi(), core::mem::transmute(ipatchindex), core::mem::transmute(lppatchbuf), core::mem::transmute(lptransformsbuf), core::mem::transmute(pcchtransformsbuf)) } #[inline] -pub unsafe fn MsiEnumPatchesExA(szproductcode: P0, szusersid: P1, dwcontext: u32, dwfilter: u32, dwindex: u32, szpatchcode: Option<&mut [u8; 39]>, sztargetproductcode: Option<&mut [u8; 39]>, pdwtargetproductcontext: Option<*mut MSIINSTALLCONTEXT>, sztargetusersid: windows_core::PSTR, pcchtargetusersid: Option<*mut u32>) -> u32 +pub unsafe fn MsiEnumPatchesExA(szproductcode: P0, szusersid: P1, dwcontext: u32, dwfilter: u32, dwindex: u32, szpatchcode: Option<&mut [u8; 39]>, sztargetproductcode: Option<&mut [u8; 39]>, pdwtargetproductcontext: Option<*mut MSIINSTALLCONTEXT>, sztargetusersid: Option, pcchtargetusersid: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -1008,13 +945,13 @@ where core::mem::transmute(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())), + core::mem::transmute(pdwtargetproductcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sztargetusersid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchtargetusersid.unwrap_or(core::mem::zeroed())), ) } #[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 +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: Option, pcchtargetusersid: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -1028,9 +965,9 @@ where core::mem::transmute(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())), + core::mem::transmute(pdwtargetproductcontext.unwrap_or(core::mem::zeroed())), + core::mem::transmute(sztargetusersid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchtargetusersid.unwrap_or(core::mem::zeroed())), ) } #[inline] @@ -1047,22 +984,22 @@ pub unsafe fn MsiEnumProductsA(iproductindex: u32, lpproductbuf: windows_core::P MsiEnumProductsA(core::mem::transmute(iproductindex), core::mem::transmute(lpproductbuf)) } #[inline] -pub unsafe fn MsiEnumProductsExA(szproductcode: P0, szusersid: P1, dwcontext: u32, dwindex: u32, szinstalledproductcode: Option<&mut [u8; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: windows_core::PSTR, pcchsid: Option<*mut u32>) -> u32 +pub unsafe fn MsiEnumProductsExA(szproductcode: P0, szusersid: P1, dwcontext: u32, dwindex: u32, szinstalledproductcode: Option<&mut [u8; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: Option, pcchsid: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(), core::mem::transmute(dwcontext), core::mem::transmute(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()))) + MsiEnumProductsExA(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwindex), core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn MsiEnumProductsExW(szproductcode: P0, szusersid: P1, dwcontext: u32, dwindex: u32, szinstalledproductcode: Option<&mut [u16; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: Option, pcchsid: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(), core::mem::transmute(dwcontext), core::mem::transmute(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()))) + MsiEnumProductsExW(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwindex), core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(szsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsid.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiEnumProductsW(iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 { @@ -1070,198 +1007,174 @@ pub unsafe fn MsiEnumProductsW(iproductindex: u32, lpproductbuf: windows_core::P MsiEnumProductsW(core::mem::transmute(iproductindex), core::mem::transmute(lpproductbuf)) } #[inline] -pub unsafe fn MsiEnumRelatedProductsA(lpupgradecode: P0, dwreserved: u32, iproductindex: u32, lpproductbuf: windows_core::PSTR) -> u32 +pub unsafe fn MsiEnumRelatedProductsA(lpupgradecode: P0, dwreserved: Option, iproductindex: u32, lpproductbuf: windows_core::PSTR) -> u32 where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumRelatedProductsA(lpupgradecode : windows_core::PCSTR, dwreserved : u32, iproductindex : u32, lpproductbuf : windows_core::PSTR) -> u32); - MsiEnumRelatedProductsA(lpupgradecode.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(iproductindex), core::mem::transmute(lpproductbuf)) + MsiEnumRelatedProductsA(lpupgradecode.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(iproductindex), core::mem::transmute(lpproductbuf)) } #[inline] -pub unsafe fn MsiEnumRelatedProductsW(lpupgradecode: P0, dwreserved: u32, iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 +pub unsafe fn MsiEnumRelatedProductsW(lpupgradecode: P0, dwreserved: Option, iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumRelatedProductsW(lpupgradecode : windows_core::PCWSTR, dwreserved : u32, iproductindex : u32, lpproductbuf : windows_core::PWSTR) -> u32); - MsiEnumRelatedProductsW(lpupgradecode.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(iproductindex), core::mem::transmute(lpproductbuf)) + MsiEnumRelatedProductsW(lpupgradecode.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(iproductindex), core::mem::transmute(lpproductbuf)) } #[inline] -pub unsafe fn MsiEvaluateConditionA(hinstall: P0, szcondition: P1) -> MSICONDITION +pub unsafe fn MsiEvaluateConditionA(hinstall: MSIHANDLE, szcondition: P1) -> MSICONDITION where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEvaluateConditionA(hinstall : MSIHANDLE, szcondition : windows_core::PCSTR) -> MSICONDITION); - MsiEvaluateConditionA(hinstall.param().abi(), szcondition.param().abi()) + MsiEvaluateConditionA(core::mem::transmute(hinstall), szcondition.param().abi()) } #[inline] -pub unsafe fn MsiEvaluateConditionW(hinstall: P0, szcondition: P1) -> MSICONDITION +pub unsafe fn MsiEvaluateConditionW(hinstall: MSIHANDLE, szcondition: P1) -> MSICONDITION where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEvaluateConditionW(hinstall : MSIHANDLE, szcondition : windows_core::PCWSTR) -> MSICONDITION); - MsiEvaluateConditionW(hinstall.param().abi(), szcondition.param().abi()) + MsiEvaluateConditionW(core::mem::transmute(hinstall), szcondition.param().abi()) } #[inline] -pub unsafe fn MsiExtractPatchXMLDataA(szpatchpath: P0, dwreserved: u32, szxmldata: windows_core::PSTR, pcchxmldata: Option<*mut u32>) -> u32 +pub unsafe fn MsiExtractPatchXMLDataA(szpatchpath: P0, dwreserved: Option, szxmldata: Option, pcchxmldata: Option<*mut u32>) -> u32 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(), core::mem::transmute(dwreserved), core::mem::transmute(szxmldata), core::mem::transmute(pcchxmldata.unwrap_or(core::ptr::null_mut()))) + MsiExtractPatchXMLDataA(szpatchpath.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(szxmldata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchxmldata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiExtractPatchXMLDataW(szpatchpath: P0, dwreserved: u32, szxmldata: windows_core::PWSTR, pcchxmldata: Option<*mut u32>) -> u32 +pub unsafe fn MsiExtractPatchXMLDataW(szpatchpath: P0, dwreserved: Option, szxmldata: Option, pcchxmldata: Option<*mut u32>) -> u32 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(), core::mem::transmute(dwreserved), core::mem::transmute(szxmldata), core::mem::transmute(pcchxmldata.unwrap_or(core::ptr::null_mut()))) + MsiExtractPatchXMLDataW(szpatchpath.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(szxmldata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchxmldata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiFormatRecordA(hinstall: P0, hrecord: P1, szresultbuf: windows_core::PSTR, pcchresultbuf: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MsiFormatRecordA(hinstall: MSIHANDLE, hrecord: MSIHANDLE, szresultbuf: Option, pcchresultbuf: Option<*mut u32>) -> u32 { 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(core::ptr::null_mut()))) + MsiFormatRecordA(core::mem::transmute(hinstall), core::mem::transmute(hrecord), core::mem::transmute(szresultbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchresultbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiFormatRecordW(hinstall: P0, hrecord: P1, szresultbuf: windows_core::PWSTR, pcchresultbuf: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MsiFormatRecordW(hinstall: MSIHANDLE, hrecord: MSIHANDLE, szresultbuf: Option, pcchresultbuf: Option<*mut u32>) -> u32 { 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(core::ptr::null_mut()))) + MsiFormatRecordW(core::mem::transmute(hinstall), core::mem::transmute(hrecord), core::mem::transmute(szresultbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchresultbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetActiveDatabase(hinstall: P0) -> MSIHANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn MsiGetActiveDatabase(hinstall: MSIHANDLE) -> MSIHANDLE { windows_targets::link!("msi.dll" "system" fn MsiGetActiveDatabase(hinstall : MSIHANDLE) -> MSIHANDLE); - MsiGetActiveDatabase(hinstall.param().abi()) + MsiGetActiveDatabase(core::mem::transmute(hinstall)) } #[inline] -pub unsafe fn MsiGetComponentPathA(szproduct: P0, szcomponent: P1, lppathbuf: windows_core::PSTR, pcchbuf: Option<*mut u32>) -> INSTALLSTATE +pub unsafe fn MsiGetComponentPathA(szproduct: P0, szcomponent: P1, lppathbuf: Option, pcchbuf: Option<*mut u32>) -> INSTALLSTATE where P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetComponentPathA(szproduct.param().abi(), szcomponent.param().abi(), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetComponentPathExA(szproductcode: P0, szcomponentcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, lpoutpathbuffer: windows_core::PSTR, pcchoutpathbuffer: Option<*mut u32>) -> INSTALLSTATE +pub unsafe fn MsiGetComponentPathExA(szproductcode: P0, szcomponentcode: P1, szusersid: P2, dwcontext: Option, lpoutpathbuffer: Option, pcchoutpathbuffer: Option<*mut u32>) -> INSTALLSTATE where P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(dwcontext), core::mem::transmute(lpoutpathbuffer), core::mem::transmute(pcchoutpathbuffer.unwrap_or(core::ptr::null_mut()))) + MsiGetComponentPathExA(szproductcode.param().abi(), szcomponentcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoutpathbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchoutpathbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetComponentPathExW(szproductcode: P0, szcomponentcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, lpoutpathbuffer: windows_core::PWSTR, pcchoutpathbuffer: Option<*mut u32>) -> INSTALLSTATE +pub unsafe fn MsiGetComponentPathExW(szproductcode: P0, szcomponentcode: P1, szusersid: P2, dwcontext: Option, lpoutpathbuffer: Option, pcchoutpathbuffer: Option<*mut u32>) -> INSTALLSTATE where P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(dwcontext), core::mem::transmute(lpoutpathbuffer), core::mem::transmute(pcchoutpathbuffer.unwrap_or(core::ptr::null_mut()))) + MsiGetComponentPathExW(szproductcode.param().abi(), szcomponentcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoutpathbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchoutpathbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetComponentPathW(szproduct: P0, szcomponent: P1, lppathbuf: windows_core::PWSTR, pcchbuf: Option<*mut u32>) -> INSTALLSTATE +pub unsafe fn MsiGetComponentPathW(szproduct: P0, szcomponent: P1, lppathbuf: Option, pcchbuf: Option<*mut u32>) -> INSTALLSTATE where P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetComponentPathW(szproduct.param().abi(), szcomponent.param().abi(), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetComponentStateA(hinstall: P0, szcomponent: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 +pub unsafe fn MsiGetComponentStateA(hinstall: MSIHANDLE, szcomponent: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentStateA(hinstall : MSIHANDLE, szcomponent : windows_core::PCSTR, piinstalled : *mut INSTALLSTATE, piaction : *mut INSTALLSTATE) -> u32); - MsiGetComponentStateA(hinstall.param().abi(), szcomponent.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) + MsiGetComponentStateA(core::mem::transmute(hinstall), szcomponent.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) } #[inline] -pub unsafe fn MsiGetComponentStateW(hinstall: P0, szcomponent: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 +pub unsafe fn MsiGetComponentStateW(hinstall: MSIHANDLE, szcomponent: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentStateW(hinstall : MSIHANDLE, szcomponent : windows_core::PCWSTR, piinstalled : *mut INSTALLSTATE, piaction : *mut INSTALLSTATE) -> u32); - MsiGetComponentStateW(hinstall.param().abi(), szcomponent.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) + MsiGetComponentStateW(core::mem::transmute(hinstall), szcomponent.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) } #[inline] -pub unsafe fn MsiGetDatabaseState(hdatabase: P0) -> MSIDBSTATE -where - P0: windows_core::Param, -{ +pub unsafe fn MsiGetDatabaseState(hdatabase: MSIHANDLE) -> MSIDBSTATE { windows_targets::link!("msi.dll" "system" fn MsiGetDatabaseState(hdatabase : MSIHANDLE) -> MSIDBSTATE); - MsiGetDatabaseState(hdatabase.param().abi()) + MsiGetDatabaseState(core::mem::transmute(hdatabase)) } #[inline] -pub unsafe fn MsiGetFeatureCostA(hinstall: P0, szfeature: P1, icosttree: MSICOSTTREE, istate: INSTALLSTATE, picost: *mut i32) -> u32 +pub unsafe fn MsiGetFeatureCostA(hinstall: MSIHANDLE, szfeature: P1, icosttree: MSICOSTTREE, istate: INSTALLSTATE, picost: *mut i32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureCostA(hinstall : MSIHANDLE, szfeature : windows_core::PCSTR, icosttree : MSICOSTTREE, istate : INSTALLSTATE, picost : *mut i32) -> u32); - MsiGetFeatureCostA(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(icosttree), core::mem::transmute(istate), core::mem::transmute(picost)) + MsiGetFeatureCostA(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(icosttree), core::mem::transmute(istate), core::mem::transmute(picost)) } #[inline] -pub unsafe fn MsiGetFeatureCostW(hinstall: P0, szfeature: P1, icosttree: MSICOSTTREE, istate: INSTALLSTATE, picost: *mut i32) -> u32 +pub unsafe fn MsiGetFeatureCostW(hinstall: MSIHANDLE, szfeature: P1, icosttree: MSICOSTTREE, istate: INSTALLSTATE, picost: *mut i32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureCostW(hinstall : MSIHANDLE, szfeature : windows_core::PCWSTR, icosttree : MSICOSTTREE, istate : INSTALLSTATE, picost : *mut i32) -> u32); - MsiGetFeatureCostW(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(icosttree), core::mem::transmute(istate), core::mem::transmute(picost)) + MsiGetFeatureCostW(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(icosttree), core::mem::transmute(istate), core::mem::transmute(picost)) } #[inline] -pub unsafe fn MsiGetFeatureInfoA(hproduct: P0, szfeature: P1, lpattributes: Option<*mut u32>, lptitlebuf: windows_core::PSTR, pcchtitlebuf: Option<*mut u32>, lphelpbuf: windows_core::PSTR, pcchhelpbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetFeatureInfoA(hproduct: MSIHANDLE, szfeature: P1, lpattributes: Option<*mut u32>, lptitlebuf: Option, pcchtitlebuf: Option<*mut u32>, lphelpbuf: Option, pcchhelpbuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(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()))) + MsiGetFeatureInfoA(core::mem::transmute(hproduct), szfeature.param().abi(), core::mem::transmute(lpattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptitlebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchtitlebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lphelpbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchhelpbuf.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn MsiGetFeatureInfoW(hproduct: MSIHANDLE, szfeature: P1, lpattributes: Option<*mut u32>, lptitlebuf: Option, pcchtitlebuf: Option<*mut u32>, lphelpbuf: Option, pcchhelpbuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(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()))) + MsiGetFeatureInfoW(core::mem::transmute(hproduct), szfeature.param().abi(), core::mem::transmute(lpattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptitlebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchtitlebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lphelpbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchhelpbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetFeatureStateA(hinstall: P0, szfeature: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 +pub unsafe fn MsiGetFeatureStateA(hinstall: MSIHANDLE, szfeature: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureStateA(hinstall : MSIHANDLE, szfeature : windows_core::PCSTR, piinstalled : *mut INSTALLSTATE, piaction : *mut INSTALLSTATE) -> u32); - MsiGetFeatureStateA(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) + MsiGetFeatureStateA(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) } #[inline] -pub unsafe fn MsiGetFeatureStateW(hinstall: P0, szfeature: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 +pub unsafe fn MsiGetFeatureStateW(hinstall: MSIHANDLE, szfeature: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureStateW(hinstall : MSIHANDLE, szfeature : windows_core::PCWSTR, piinstalled : *mut INSTALLSTATE, piaction : *mut INSTALLSTATE) -> u32); - MsiGetFeatureStateW(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) + MsiGetFeatureStateW(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(piinstalled), core::mem::transmute(piaction)) } #[inline] pub unsafe fn MsiGetFeatureUsageA(szproduct: P0, szfeature: P1, pdwusecount: Option<*mut u32>, pwdateused: Option<*mut u16>) -> u32 @@ -1270,7 +1183,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(core::ptr::null_mut())), core::mem::transmute(pwdateused.unwrap_or(core::ptr::null_mut()))) + MsiGetFeatureUsageA(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(pdwusecount.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwdateused.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiGetFeatureUsageW(szproduct: P0, szfeature: P1, pdwusecount: Option<*mut u32>, pwdateused: Option<*mut u16>) -> u32 @@ -1279,25 +1192,23 @@ 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(core::ptr::null_mut())), core::mem::transmute(pwdateused.unwrap_or(core::ptr::null_mut()))) + MsiGetFeatureUsageW(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(pdwusecount.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwdateused.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetFeatureValidStatesA(hinstall: P0, szfeature: P1, lpinstallstates: *mut u32) -> u32 +pub unsafe fn MsiGetFeatureValidStatesA(hinstall: MSIHANDLE, szfeature: P1, lpinstallstates: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureValidStatesA(hinstall : MSIHANDLE, szfeature : windows_core::PCSTR, lpinstallstates : *mut u32) -> u32); - MsiGetFeatureValidStatesA(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(lpinstallstates)) + MsiGetFeatureValidStatesA(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(lpinstallstates)) } #[inline] -pub unsafe fn MsiGetFeatureValidStatesW(hinstall: P0, szfeature: P1, lpinstallstates: *mut u32) -> u32 +pub unsafe fn MsiGetFeatureValidStatesW(hinstall: MSIHANDLE, szfeature: P1, lpinstallstates: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureValidStatesW(hinstall : MSIHANDLE, szfeature : windows_core::PCWSTR, lpinstallstates : *mut u32) -> u32); - MsiGetFeatureValidStatesW(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(lpinstallstates)) + MsiGetFeatureValidStatesW(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(lpinstallstates)) } #[inline] pub unsafe fn MsiGetFileHashA(szfilepath: P0, dwoptions: u32, phash: *mut MSIFILEHASHINFO) -> u32 @@ -1322,7 +1233,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(), core::mem::transmute(dwflags), core::mem::transmute(ppccertcontext), core::mem::transmute(pbhashdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbhashdata.unwrap_or(core::ptr::null_mut()))).ok() + MsiGetFileSignatureInformationA(szsignedobjectpath.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ppccertcontext), core::mem::transmute(pbhashdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbhashdata.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -1331,31 +1242,28 @@ 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(), core::mem::transmute(dwflags), core::mem::transmute(ppccertcontext), core::mem::transmute(pbhashdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbhashdata.unwrap_or(core::ptr::null_mut()))).ok() + MsiGetFileSignatureInformationW(szsignedobjectpath.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(ppccertcontext), core::mem::transmute(pbhashdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbhashdata.unwrap_or(core::mem::zeroed()))).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 +pub unsafe fn MsiGetFileVersionA(szfilepath: P0, lpversionbuf: Option, pcchversionbuf: Option<*mut u32>, lplangbuf: Option, pcchlangbuf: Option<*mut u32>) -> u32 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(core::ptr::null_mut())), core::mem::transmute(lplangbuf), core::mem::transmute(pcchlangbuf.unwrap_or(core::ptr::null_mut()))) + MsiGetFileVersionA(szfilepath.param().abi(), core::mem::transmute(lpversionbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchversionbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplangbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlangbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetFileVersionW(szfilepath: P0, lpversionbuf: windows_core::PWSTR, pcchversionbuf: Option<*mut u32>, lplangbuf: windows_core::PWSTR, pcchlangbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetFileVersionW(szfilepath: P0, lpversionbuf: Option, pcchversionbuf: Option<*mut u32>, lplangbuf: Option, pcchlangbuf: Option<*mut u32>) -> u32 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(core::ptr::null_mut())), core::mem::transmute(lplangbuf), core::mem::transmute(pcchlangbuf.unwrap_or(core::ptr::null_mut()))) + MsiGetFileVersionW(szfilepath.param().abi(), core::mem::transmute(lpversionbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchversionbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplangbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchlangbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetLanguage(hinstall: P0) -> u16 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiGetLanguage(hinstall: MSIHANDLE) -> u16 { windows_targets::link!("msi.dll" "system" fn MsiGetLanguage(hinstall : MSIHANDLE) -> u16); - MsiGetLanguage(hinstall.param().abi()) + MsiGetLanguage(core::mem::transmute(hinstall)) } #[inline] pub unsafe fn MsiGetLastErrorRecord() -> MSIHANDLE { @@ -1363,12 +1271,9 @@ pub unsafe fn MsiGetLastErrorRecord() -> MSIHANDLE { MsiGetLastErrorRecord() } #[inline] -pub unsafe fn MsiGetMode(hinstall: P0, erunmode: MSIRUNMODE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MsiGetMode(hinstall: MSIHANDLE, erunmode: MSIRUNMODE) -> super::super::Foundation::BOOL { windows_targets::link!("msi.dll" "system" fn MsiGetMode(hinstall : MSIHANDLE, erunmode : MSIRUNMODE) -> super::super::Foundation:: BOOL); - MsiGetMode(hinstall.param().abi(), core::mem::transmute(erunmode)) + MsiGetMode(core::mem::transmute(hinstall), core::mem::transmute(erunmode)) } #[inline] pub unsafe fn MsiGetPatchFileListA(szproductcode: P0, szpatchpackages: P1, pcfiles: *mut u32, pphfilerecords: *mut *mut MSIHANDLE) -> u32 @@ -1389,16 +1294,16 @@ where MsiGetPatchFileListW(szproductcode.param().abi(), szpatchpackages.param().abi(), core::mem::transmute(pcfiles), core::mem::transmute(pphfilerecords)) } #[inline] -pub unsafe fn MsiGetPatchInfoA(szpatch: P0, szattribute: P1, lpvaluebuf: windows_core::PSTR, pcchvaluebuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetPatchInfoA(szpatch: P0, szattribute: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetPatchInfoA(szpatch.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetPatchInfoExA(szpatchcode: P0, szproductcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, szproperty: P4, lpvalue: windows_core::PSTR, pcchvalue: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetPatchInfoExA(szpatchcode: P0, szproductcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, szproperty: P4, lpvalue: Option, pcchvalue: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -1406,10 +1311,10 @@ where P4: 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(), core::mem::transmute(dwcontext), szproperty.param().abi(), core::mem::transmute(lpvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) + MsiGetPatchInfoExA(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), szproperty.param().abi(), core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetPatchInfoExW(szpatchcode: P0, szproductcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, szproperty: P4, lpvalue: windows_core::PWSTR, pcchvalue: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetPatchInfoExW(szpatchcode: P0, szproductcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, szproperty: P4, lpvalue: Option, pcchvalue: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, @@ -1417,16 +1322,16 @@ where P4: 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(), core::mem::transmute(dwcontext), szproperty.param().abi(), core::mem::transmute(lpvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) + MsiGetPatchInfoExW(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), szproperty.param().abi(), core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetPatchInfoW(szpatch: P0, szattribute: P1, lpvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetPatchInfoW(szpatch: P0, szattribute: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetPatchInfoW(szpatch.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiGetProductCodeA(szcomponent: P0, lpbuf39: windows_core::PSTR) -> u32 @@ -1445,180 +1350,188 @@ where MsiGetProductCodeW(szcomponent.param().abi(), core::mem::transmute(lpbuf39)) } #[inline] -pub unsafe fn MsiGetProductInfoA(szproduct: P0, szattribute: P1, lpvaluebuf: windows_core::PSTR, pcchvaluebuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetProductInfoA(szproduct: P0, szattribute: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetProductInfoA(szproduct.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetProductInfoExA(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szproperty: P3, szvalue: windows_core::PSTR, pcchvalue: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetProductInfoExA(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szproperty: P3, szvalue: Option, pcchvalue: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P3: 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(), core::mem::transmute(dwcontext), szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) + MsiGetProductInfoExA(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), szproperty.param().abi(), core::mem::transmute(szvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetProductInfoExW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szproperty: P3, szvalue: windows_core::PWSTR, pcchvalue: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetProductInfoExW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szproperty: P3, szvalue: Option, pcchvalue: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P3: 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(), core::mem::transmute(dwcontext), szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) + MsiGetProductInfoExW(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), szproperty.param().abi(), core::mem::transmute(szvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn MsiGetProductInfoFromScriptA(szscriptfile: P0, lpproductbuf39: Option, plgidlanguage: Option<*mut u16>, pdwversion: Option<*mut u32>, lpnamebuf: Option, pcchnamebuf: Option<*mut u32>, lppackagebuf: Option, pcchpackagebuf: Option<*mut u32>) -> u32 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(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()))) + MsiGetProductInfoFromScriptA( + szscriptfile.param().abi(), + core::mem::transmute(lpproductbuf39.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plgidlanguage.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwversion.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpnamebuf.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchnamebuf.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lppackagebuf.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchpackagebuf.unwrap_or(core::mem::zeroed())), + ) } #[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 +pub unsafe fn MsiGetProductInfoFromScriptW(szscriptfile: P0, lpproductbuf39: Option, plgidlanguage: Option<*mut u16>, pdwversion: Option<*mut u32>, lpnamebuf: Option, pcchnamebuf: Option<*mut u32>, lppackagebuf: Option, pcchpackagebuf: Option<*mut u32>) -> u32 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(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()))) + MsiGetProductInfoFromScriptW( + szscriptfile.param().abi(), + core::mem::transmute(lpproductbuf39.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plgidlanguage.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwversion.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpnamebuf.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchnamebuf.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lppackagebuf.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchpackagebuf.unwrap_or(core::mem::zeroed())), + ) } #[inline] -pub unsafe fn MsiGetProductInfoW(szproduct: P0, szattribute: P1, lpvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetProductInfoW(szproduct: P0, szattribute: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetProductInfoW(szproduct.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetProductPropertyA(hproduct: P0, szproperty: P1, lpvaluebuf: windows_core::PSTR, pcchvaluebuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetProductPropertyA(hproduct: MSIHANDLE, szproperty: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetProductPropertyA(core::mem::transmute(hproduct), szproperty.param().abi(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetProductPropertyW(hproduct: P0, szproperty: P1, lpvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetProductPropertyW(hproduct: MSIHANDLE, szproperty: P1, lpvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetProductPropertyW(core::mem::transmute(hproduct), szproperty.param().abi(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetPropertyA(hinstall: P0, szname: P1, szvaluebuf: windows_core::PSTR, pcchvaluebuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetPropertyA(hinstall: MSIHANDLE, szname: P1, szvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetPropertyA(core::mem::transmute(hinstall), szname.param().abi(), core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetPropertyW(hinstall: P0, szname: P1, szvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetPropertyW(hinstall: MSIHANDLE, szname: P1, szvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetPropertyW(core::mem::transmute(hinstall), szname.param().abi(), core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetShortcutTargetA(szshortcutpath: P0, szproductcode: windows_core::PSTR, szfeatureid: windows_core::PSTR, szcomponentcode: windows_core::PSTR) -> u32 +pub unsafe fn MsiGetShortcutTargetA(szshortcutpath: P0, szproductcode: Option, szfeatureid: Option, szcomponentcode: Option) -> u32 where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetShortcutTargetA(szshortcutpath : windows_core::PCSTR, szproductcode : windows_core::PSTR, szfeatureid : windows_core::PSTR, szcomponentcode : windows_core::PSTR) -> u32); - MsiGetShortcutTargetA(szshortcutpath.param().abi(), core::mem::transmute(szproductcode), core::mem::transmute(szfeatureid), core::mem::transmute(szcomponentcode)) + MsiGetShortcutTargetA(szshortcutpath.param().abi(), core::mem::transmute(szproductcode.unwrap_or(core::mem::zeroed())), core::mem::transmute(szfeatureid.unwrap_or(core::mem::zeroed())), core::mem::transmute(szcomponentcode.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetShortcutTargetW(szshortcutpath: P0, szproductcode: windows_core::PWSTR, szfeatureid: windows_core::PWSTR, szcomponentcode: windows_core::PWSTR) -> u32 +pub unsafe fn MsiGetShortcutTargetW(szshortcutpath: P0, szproductcode: Option, szfeatureid: Option, szcomponentcode: Option) -> u32 where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetShortcutTargetW(szshortcutpath : windows_core::PCWSTR, szproductcode : windows_core::PWSTR, szfeatureid : windows_core::PWSTR, szcomponentcode : windows_core::PWSTR) -> u32); - MsiGetShortcutTargetW(szshortcutpath.param().abi(), core::mem::transmute(szproductcode), core::mem::transmute(szfeatureid), core::mem::transmute(szcomponentcode)) + MsiGetShortcutTargetW(szshortcutpath.param().abi(), core::mem::transmute(szproductcode.unwrap_or(core::mem::zeroed())), core::mem::transmute(szfeatureid.unwrap_or(core::mem::zeroed())), core::mem::transmute(szcomponentcode.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetSourcePathA(hinstall: P0, szfolder: P1, szpathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetSourcePathA(hinstall: MSIHANDLE, szfolder: P1, szpathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetSourcePathA(core::mem::transmute(hinstall), szfolder.param().abi(), core::mem::transmute(szpathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetSourcePathW(hinstall: P0, szfolder: P1, szpathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetSourcePathW(hinstall: MSIHANDLE, szfolder: P1, szpathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetSourcePathW(core::mem::transmute(hinstall), szfolder.param().abi(), core::mem::transmute(szpathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetSummaryInformationA(hdatabase: P0, szdatabasepath: P1, uiupdatecount: u32, phsummaryinfo: *mut MSIHANDLE) -> u32 +pub unsafe fn MsiGetSummaryInformationA(hdatabase: MSIHANDLE, szdatabasepath: P1, uiupdatecount: u32, phsummaryinfo: *mut MSIHANDLE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetSummaryInformationA(hdatabase : MSIHANDLE, szdatabasepath : windows_core::PCSTR, uiupdatecount : u32, phsummaryinfo : *mut MSIHANDLE) -> u32); - MsiGetSummaryInformationA(hdatabase.param().abi(), szdatabasepath.param().abi(), core::mem::transmute(uiupdatecount), core::mem::transmute(phsummaryinfo)) + MsiGetSummaryInformationA(core::mem::transmute(hdatabase), szdatabasepath.param().abi(), core::mem::transmute(uiupdatecount), core::mem::transmute(phsummaryinfo)) } #[inline] -pub unsafe fn MsiGetSummaryInformationW(hdatabase: P0, szdatabasepath: P1, uiupdatecount: u32, phsummaryinfo: *mut MSIHANDLE) -> u32 +pub unsafe fn MsiGetSummaryInformationW(hdatabase: MSIHANDLE, szdatabasepath: P1, uiupdatecount: u32, phsummaryinfo: *mut MSIHANDLE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetSummaryInformationW(hdatabase : MSIHANDLE, szdatabasepath : windows_core::PCWSTR, uiupdatecount : u32, phsummaryinfo : *mut MSIHANDLE) -> u32); - MsiGetSummaryInformationW(hdatabase.param().abi(), szdatabasepath.param().abi(), core::mem::transmute(uiupdatecount), core::mem::transmute(phsummaryinfo)) + MsiGetSummaryInformationW(core::mem::transmute(hdatabase), szdatabasepath.param().abi(), core::mem::transmute(uiupdatecount), core::mem::transmute(phsummaryinfo)) } #[inline] -pub unsafe fn MsiGetTargetPathA(hinstall: P0, szfolder: P1, szpathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetTargetPathA(hinstall: MSIHANDLE, szfolder: P1, szpathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetTargetPathA(core::mem::transmute(hinstall), szfolder.param().abi(), core::mem::transmute(szpathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiGetTargetPathW(hinstall: P0, szfolder: P1, szpathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiGetTargetPathW(hinstall: MSIHANDLE, szfolder: P1, szpathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiGetTargetPathW(core::mem::transmute(hinstall), szfolder.param().abi(), core::mem::transmute(szpathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn MsiGetUserInfoA(szproduct: P0, lpusernamebuf: Option, pcchusernamebuf: Option<*mut u32>, lporgnamebuf: Option, pcchorgnamebuf: Option<*mut u32>, lpserialbuf: Option, pcchserialbuf: Option<*mut u32>) -> USERINFOSTATE 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(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()))) + MsiGetUserInfoA(szproduct.param().abi(), core::mem::transmute(lpusernamebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchusernamebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lporgnamebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchorgnamebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpserialbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchserialbuf.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn MsiGetUserInfoW(szproduct: P0, lpusernamebuf: Option, pcchusernamebuf: Option<*mut u32>, lporgnamebuf: Option, pcchorgnamebuf: Option<*mut u32>, lpserialbuf: Option, pcchserialbuf: Option<*mut u32>) -> USERINFOSTATE 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(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()))) + MsiGetUserInfoW(szproduct.param().abi(), core::mem::transmute(lpusernamebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchusernamebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lporgnamebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchorgnamebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpserialbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchserialbuf.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiInstallMissingComponentA(szproduct: P0, szcomponent: P1, einstallstate: INSTALLSTATE) -> u32 @@ -1691,28 +1604,25 @@ where MsiIsProductElevatedW(szproduct.param().abi(), core::mem::transmute(pfelevated)) } #[inline] -pub unsafe fn MsiJoinTransaction(htransactionhandle: P0, dwtransactionattributes: u32, phchangeofownerevent: *mut super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiJoinTransaction(htransactionhandle: MSIHANDLE, dwtransactionattributes: u32, phchangeofownerevent: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiJoinTransaction(htransactionhandle : MSIHANDLE, dwtransactionattributes : u32, phchangeofownerevent : *mut super::super::Foundation:: HANDLE) -> u32); - MsiJoinTransaction(htransactionhandle.param().abi(), core::mem::transmute(dwtransactionattributes), core::mem::transmute(phchangeofownerevent)) + MsiJoinTransaction(core::mem::transmute(htransactionhandle), core::mem::transmute(dwtransactionattributes), core::mem::transmute(phchangeofownerevent)) } #[inline] -pub unsafe fn MsiLocateComponentA(szcomponent: P0, lppathbuf: windows_core::PSTR, pcchbuf: Option<*mut u32>) -> INSTALLSTATE +pub unsafe fn MsiLocateComponentA(szcomponent: P0, lppathbuf: Option, pcchbuf: Option<*mut u32>) -> INSTALLSTATE 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(core::ptr::null_mut()))) + MsiLocateComponentA(szcomponent.param().abi(), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiLocateComponentW(szcomponent: P0, lppathbuf: windows_core::PWSTR, pcchbuf: Option<*mut u32>) -> INSTALLSTATE +pub unsafe fn MsiLocateComponentW(szcomponent: P0, lppathbuf: Option, pcchbuf: Option<*mut u32>) -> INSTALLSTATE 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(core::ptr::null_mut()))) + MsiLocateComponentW(szcomponent.param().abi(), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiNotifySidChangeA(poldsid: P0, pnewsid: P1) -> u32 @@ -1799,153 +1709,143 @@ where MsiOpenProductW(szproduct.param().abi(), core::mem::transmute(hproduct)) } #[inline] -pub unsafe fn MsiPreviewBillboardA(hpreview: P0, szcontrolname: P1, szbillboard: P2) -> u32 +pub unsafe fn MsiPreviewBillboardA(hpreview: MSIHANDLE, szcontrolname: P1, szbillboard: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiPreviewBillboardA(hpreview : MSIHANDLE, szcontrolname : windows_core::PCSTR, szbillboard : windows_core::PCSTR) -> u32); - MsiPreviewBillboardA(hpreview.param().abi(), szcontrolname.param().abi(), szbillboard.param().abi()) + MsiPreviewBillboardA(core::mem::transmute(hpreview), szcontrolname.param().abi(), szbillboard.param().abi()) } #[inline] -pub unsafe fn MsiPreviewBillboardW(hpreview: P0, szcontrolname: P1, szbillboard: P2) -> u32 +pub unsafe fn MsiPreviewBillboardW(hpreview: MSIHANDLE, szcontrolname: P1, szbillboard: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiPreviewBillboardW(hpreview : MSIHANDLE, szcontrolname : windows_core::PCWSTR, szbillboard : windows_core::PCWSTR) -> u32); - MsiPreviewBillboardW(hpreview.param().abi(), szcontrolname.param().abi(), szbillboard.param().abi()) + MsiPreviewBillboardW(core::mem::transmute(hpreview), szcontrolname.param().abi(), szbillboard.param().abi()) } #[inline] -pub unsafe fn MsiPreviewDialogA(hpreview: P0, szdialogname: P1) -> u32 +pub unsafe fn MsiPreviewDialogA(hpreview: MSIHANDLE, szdialogname: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiPreviewDialogA(hpreview : MSIHANDLE, szdialogname : windows_core::PCSTR) -> u32); - MsiPreviewDialogA(hpreview.param().abi(), szdialogname.param().abi()) + MsiPreviewDialogA(core::mem::transmute(hpreview), szdialogname.param().abi()) } #[inline] -pub unsafe fn MsiPreviewDialogW(hpreview: P0, szdialogname: P1) -> u32 +pub unsafe fn MsiPreviewDialogW(hpreview: MSIHANDLE, szdialogname: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiPreviewDialogW(hpreview : MSIHANDLE, szdialogname : windows_core::PCWSTR) -> u32); - MsiPreviewDialogW(hpreview.param().abi(), szdialogname.param().abi()) + MsiPreviewDialogW(core::mem::transmute(hpreview), szdialogname.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn MsiProcessAdvertiseScriptA(szscriptfile: P0, sziconfolder: P1, hregdata: P2, fshortcuts: P3, fremoveitems: P4) -> u32 +pub unsafe fn MsiProcessAdvertiseScriptA(szscriptfile: P0, sziconfolder: P1, hregdata: Option, fshortcuts: P3, fremoveitems: P4) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProcessAdvertiseScriptA(szscriptfile : windows_core::PCSTR, sziconfolder : windows_core::PCSTR, hregdata : super::Registry:: HKEY, fshortcuts : super::super::Foundation:: BOOL, fremoveitems : super::super::Foundation:: BOOL) -> u32); - MsiProcessAdvertiseScriptA(szscriptfile.param().abi(), sziconfolder.param().abi(), hregdata.param().abi(), fshortcuts.param().abi(), fremoveitems.param().abi()) + MsiProcessAdvertiseScriptA(szscriptfile.param().abi(), sziconfolder.param().abi(), core::mem::transmute(hregdata.unwrap_or(core::mem::zeroed())), fshortcuts.param().abi(), fremoveitems.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn MsiProcessAdvertiseScriptW(szscriptfile: P0, sziconfolder: P1, hregdata: P2, fshortcuts: P3, fremoveitems: P4) -> u32 +pub unsafe fn MsiProcessAdvertiseScriptW(szscriptfile: P0, sziconfolder: P1, hregdata: Option, fshortcuts: P3, fremoveitems: P4) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProcessAdvertiseScriptW(szscriptfile : windows_core::PCWSTR, sziconfolder : windows_core::PCWSTR, hregdata : super::Registry:: HKEY, fshortcuts : super::super::Foundation:: BOOL, fremoveitems : super::super::Foundation:: BOOL) -> u32); - MsiProcessAdvertiseScriptW(szscriptfile.param().abi(), sziconfolder.param().abi(), hregdata.param().abi(), fshortcuts.param().abi(), fremoveitems.param().abi()) + MsiProcessAdvertiseScriptW(szscriptfile.param().abi(), sziconfolder.param().abi(), core::mem::transmute(hregdata.unwrap_or(core::mem::zeroed())), fshortcuts.param().abi(), fremoveitems.param().abi()) } #[inline] -pub unsafe fn MsiProcessMessage(hinstall: P0, emessagetype: INSTALLMESSAGE, hrecord: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn MsiProcessMessage(hinstall: MSIHANDLE, emessagetype: INSTALLMESSAGE, hrecord: MSIHANDLE) -> i32 { windows_targets::link!("msi.dll" "system" fn MsiProcessMessage(hinstall : MSIHANDLE, emessagetype : INSTALLMESSAGE, hrecord : MSIHANDLE) -> i32); - MsiProcessMessage(hinstall.param().abi(), core::mem::transmute(emessagetype), hrecord.param().abi()) + MsiProcessMessage(core::mem::transmute(hinstall), core::mem::transmute(emessagetype), core::mem::transmute(hrecord)) } #[inline] -pub unsafe fn MsiProvideAssemblyA(szassemblyname: P0, szappcontext: P1, dwinstallmode: INSTALLMODE, dwassemblyinfo: MSIASSEMBLYINFO, lppathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiProvideAssemblyA(szassemblyname: P0, szappcontext: P1, dwinstallmode: INSTALLMODE, dwassemblyinfo: MSIASSEMBLYINFO, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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 _, core::mem::transmute(dwassemblyinfo), core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) + MsiProvideAssemblyA(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, core::mem::transmute(dwassemblyinfo), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiProvideAssemblyW(szassemblyname: P0, szappcontext: P1, dwinstallmode: INSTALLMODE, dwassemblyinfo: MSIASSEMBLYINFO, lppathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiProvideAssemblyW(szassemblyname: P0, szappcontext: P1, dwinstallmode: INSTALLMODE, dwassemblyinfo: MSIASSEMBLYINFO, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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 _, core::mem::transmute(dwassemblyinfo), core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) + MsiProvideAssemblyW(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, core::mem::transmute(dwassemblyinfo), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiProvideComponentA(szproduct: P0, szfeature: P1, szcomponent: P2, dwinstallmode: INSTALLMODE, lppathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiProvideComponentA(szproduct: P0, szfeature: P1, szcomponent: P2, dwinstallmode: INSTALLMODE, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut()))) + MsiProvideComponentA(szproduct.param().abi(), szfeature.param().abi(), szcomponent.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiProvideComponentW(szproduct: P0, szfeature: P1, szcomponent: P2, dwinstallmode: INSTALLMODE, lppathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiProvideComponentW(szproduct: P0, szfeature: P1, szcomponent: P2, dwinstallmode: INSTALLMODE, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut()))) + MsiProvideComponentW(szproduct.param().abi(), szfeature.param().abi(), szcomponent.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiProvideQualifiedComponentA(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, lppathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiProvideQualifiedComponentA(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiProvideQualifiedComponentA(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiProvideQualifiedComponentExA(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, szproduct: P3, dwunused1: u32, dwunused2: u32, lppathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiProvideQualifiedComponentExA(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, szproduct: P3, dwunused1: Option, dwunused2: Option, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P3: 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(), core::mem::transmute(dwunused1), core::mem::transmute(dwunused2), core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) + MsiProvideQualifiedComponentExA(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, szproduct.param().abi(), core::mem::transmute(dwunused1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwunused2.unwrap_or(core::mem::zeroed())), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiProvideQualifiedComponentExW(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, szproduct: P3, dwunused1: u32, dwunused2: u32, lppathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiProvideQualifiedComponentExW(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, szproduct: P3, dwunused1: Option, dwunused2: Option, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P3: 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(), core::mem::transmute(dwunused1), core::mem::transmute(dwunused2), core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) + MsiProvideQualifiedComponentExW(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, szproduct.param().abi(), core::mem::transmute(dwunused1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwunused2.unwrap_or(core::mem::zeroed())), core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiProvideQualifiedComponentW(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, lppathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 +pub unsafe fn MsiProvideQualifiedComponentW(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, lppathbuf: Option, pcchpathbuf: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(core::ptr::null_mut()))) + MsiProvideQualifiedComponentW(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathbuf.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiQueryComponentStateA(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szcomponentcode: P3, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1955,7 +1855,7 @@ where P3: 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(), core::mem::transmute(dwcontext), szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut()))) + MsiQueryComponentStateA(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiQueryComponentStateW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szcomponentcode: P3, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1965,7 +1865,7 @@ where P3: 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(), core::mem::transmute(dwcontext), szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut()))) + MsiQueryComponentStateW(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiQueryFeatureStateA(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -1984,7 +1884,7 @@ where P3: 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(), core::mem::transmute(dwcontext), szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut()))) + MsiQueryFeatureStateExA(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiQueryFeatureStateExW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szfeature: P3, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1994,7 +1894,7 @@ where P3: 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(), core::mem::transmute(dwcontext), szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut()))) + MsiQueryFeatureStateExW(szproductcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiQueryFeatureStateW(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -2022,112 +1922,81 @@ where MsiQueryProductStateW(szproduct.param().abi()) } #[inline] -pub unsafe fn MsiRecordClearData(hrecord: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordClearData(hrecord: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiRecordClearData(hrecord : MSIHANDLE) -> u32); - MsiRecordClearData(hrecord.param().abi()) + MsiRecordClearData(core::mem::transmute(hrecord)) } #[inline] -pub unsafe fn MsiRecordDataSize(hrecord: P0, ifield: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordDataSize(hrecord: MSIHANDLE, ifield: u32) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiRecordDataSize(hrecord : MSIHANDLE, ifield : u32) -> u32); - MsiRecordDataSize(hrecord.param().abi(), core::mem::transmute(ifield)) + MsiRecordDataSize(core::mem::transmute(hrecord), core::mem::transmute(ifield)) } #[inline] -pub unsafe fn MsiRecordGetFieldCount(hrecord: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordGetFieldCount(hrecord: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiRecordGetFieldCount(hrecord : MSIHANDLE) -> u32); - MsiRecordGetFieldCount(hrecord.param().abi()) + MsiRecordGetFieldCount(core::mem::transmute(hrecord)) } #[inline] -pub unsafe fn MsiRecordGetInteger(hrecord: P0, ifield: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordGetInteger(hrecord: MSIHANDLE, ifield: u32) -> i32 { windows_targets::link!("msi.dll" "system" fn MsiRecordGetInteger(hrecord : MSIHANDLE, ifield : u32) -> i32); - MsiRecordGetInteger(hrecord.param().abi(), core::mem::transmute(ifield)) + MsiRecordGetInteger(core::mem::transmute(hrecord), core::mem::transmute(ifield)) } #[inline] -pub unsafe fn MsiRecordGetStringA(hrecord: P0, ifield: u32, szvaluebuf: windows_core::PSTR, pcchvaluebuf: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordGetStringA(hrecord: MSIHANDLE, ifield: u32, szvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiRecordGetStringA(hrecord : MSIHANDLE, ifield : u32, szvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - MsiRecordGetStringA(hrecord.param().abi(), core::mem::transmute(ifield), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) + MsiRecordGetStringA(core::mem::transmute(hrecord), core::mem::transmute(ifield), core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiRecordGetStringW(hrecord: P0, ifield: u32, szvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordGetStringW(hrecord: MSIHANDLE, ifield: u32, szvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiRecordGetStringW(hrecord : MSIHANDLE, ifield : u32, szvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - MsiRecordGetStringW(hrecord.param().abi(), core::mem::transmute(ifield), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) + MsiRecordGetStringW(core::mem::transmute(hrecord), core::mem::transmute(ifield), core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiRecordIsNull(hrecord: P0, ifield: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordIsNull(hrecord: MSIHANDLE, ifield: u32) -> super::super::Foundation::BOOL { windows_targets::link!("msi.dll" "system" fn MsiRecordIsNull(hrecord : MSIHANDLE, ifield : u32) -> super::super::Foundation:: BOOL); - MsiRecordIsNull(hrecord.param().abi(), core::mem::transmute(ifield)) + MsiRecordIsNull(core::mem::transmute(hrecord), core::mem::transmute(ifield)) } #[inline] -pub unsafe fn MsiRecordReadStream(hrecord: P0, ifield: u32, szdatabuf: windows_core::PSTR, pcbdatabuf: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordReadStream(hrecord: MSIHANDLE, ifield: u32, szdatabuf: Option, pcbdatabuf: *mut u32) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiRecordReadStream(hrecord : MSIHANDLE, ifield : u32, szdatabuf : windows_core::PSTR, pcbdatabuf : *mut u32) -> u32); - MsiRecordReadStream(hrecord.param().abi(), core::mem::transmute(ifield), core::mem::transmute(szdatabuf), core::mem::transmute(pcbdatabuf)) + MsiRecordReadStream(core::mem::transmute(hrecord), core::mem::transmute(ifield), core::mem::transmute(szdatabuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdatabuf)) } #[inline] -pub unsafe fn MsiRecordSetInteger(hrecord: P0, ifield: u32, ivalue: i32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiRecordSetInteger(hrecord: MSIHANDLE, ifield: u32, ivalue: i32) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiRecordSetInteger(hrecord : MSIHANDLE, ifield : u32, ivalue : i32) -> u32); - MsiRecordSetInteger(hrecord.param().abi(), core::mem::transmute(ifield), core::mem::transmute(ivalue)) + MsiRecordSetInteger(core::mem::transmute(hrecord), core::mem::transmute(ifield), core::mem::transmute(ivalue)) } #[inline] -pub unsafe fn MsiRecordSetStreamA(hrecord: P0, ifield: u32, szfilepath: P2) -> u32 +pub unsafe fn MsiRecordSetStreamA(hrecord: MSIHANDLE, ifield: u32, szfilepath: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiRecordSetStreamA(hrecord : MSIHANDLE, ifield : u32, szfilepath : windows_core::PCSTR) -> u32); - MsiRecordSetStreamA(hrecord.param().abi(), core::mem::transmute(ifield), szfilepath.param().abi()) + MsiRecordSetStreamA(core::mem::transmute(hrecord), core::mem::transmute(ifield), szfilepath.param().abi()) } #[inline] -pub unsafe fn MsiRecordSetStreamW(hrecord: P0, ifield: u32, szfilepath: P2) -> u32 +pub unsafe fn MsiRecordSetStreamW(hrecord: MSIHANDLE, ifield: u32, szfilepath: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiRecordSetStreamW(hrecord : MSIHANDLE, ifield : u32, szfilepath : windows_core::PCWSTR) -> u32); - MsiRecordSetStreamW(hrecord.param().abi(), core::mem::transmute(ifield), szfilepath.param().abi()) + MsiRecordSetStreamW(core::mem::transmute(hrecord), core::mem::transmute(ifield), szfilepath.param().abi()) } #[inline] -pub unsafe fn MsiRecordSetStringA(hrecord: P0, ifield: u32, szvalue: P2) -> u32 +pub unsafe fn MsiRecordSetStringA(hrecord: MSIHANDLE, ifield: u32, szvalue: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiRecordSetStringA(hrecord : MSIHANDLE, ifield : u32, szvalue : windows_core::PCSTR) -> u32); - MsiRecordSetStringA(hrecord.param().abi(), core::mem::transmute(ifield), szvalue.param().abi()) + MsiRecordSetStringA(core::mem::transmute(hrecord), core::mem::transmute(ifield), szvalue.param().abi()) } #[inline] -pub unsafe fn MsiRecordSetStringW(hrecord: P0, ifield: u32, szvalue: P2) -> u32 +pub unsafe fn MsiRecordSetStringW(hrecord: MSIHANDLE, ifield: u32, szvalue: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiRecordSetStringW(hrecord : MSIHANDLE, ifield : u32, szvalue : windows_core::PCWSTR) -> u32); - MsiRecordSetStringW(hrecord.param().abi(), core::mem::transmute(ifield), szvalue.param().abi()) + MsiRecordSetStringW(core::mem::transmute(hrecord), core::mem::transmute(ifield), szvalue.param().abi()) } #[inline] pub unsafe fn MsiReinstallFeatureA(szproduct: P0, szfeature: P1, dwreinstallmode: REINSTALLMODE) -> u32 @@ -2184,153 +2053,137 @@ where MsiRemovePatchesW(szpatchlist.param().abi(), szproductcode.param().abi(), core::mem::transmute(euninstalltype), szpropertylist.param().abi()) } #[inline] -pub unsafe fn MsiSequenceA(hinstall: P0, sztable: P1, isequencemode: i32) -> u32 +pub unsafe fn MsiSequenceA(hinstall: MSIHANDLE, sztable: P1, isequencemode: i32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSequenceA(hinstall : MSIHANDLE, sztable : windows_core::PCSTR, isequencemode : i32) -> u32); - MsiSequenceA(hinstall.param().abi(), sztable.param().abi(), core::mem::transmute(isequencemode)) + MsiSequenceA(core::mem::transmute(hinstall), sztable.param().abi(), core::mem::transmute(isequencemode)) } #[inline] -pub unsafe fn MsiSequenceW(hinstall: P0, sztable: P1, isequencemode: i32) -> u32 +pub unsafe fn MsiSequenceW(hinstall: MSIHANDLE, sztable: P1, isequencemode: i32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSequenceW(hinstall : MSIHANDLE, sztable : windows_core::PCWSTR, isequencemode : i32) -> u32); - MsiSequenceW(hinstall.param().abi(), sztable.param().abi(), core::mem::transmute(isequencemode)) + MsiSequenceW(core::mem::transmute(hinstall), sztable.param().abi(), core::mem::transmute(isequencemode)) } #[inline] -pub unsafe fn MsiSetComponentStateA(hinstall: P0, szcomponent: P1, istate: INSTALLSTATE) -> u32 +pub unsafe fn MsiSetComponentStateA(hinstall: MSIHANDLE, szcomponent: P1, istate: INSTALLSTATE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetComponentStateA(hinstall : MSIHANDLE, szcomponent : windows_core::PCSTR, istate : INSTALLSTATE) -> u32); - MsiSetComponentStateA(hinstall.param().abi(), szcomponent.param().abi(), core::mem::transmute(istate)) + MsiSetComponentStateA(core::mem::transmute(hinstall), szcomponent.param().abi(), core::mem::transmute(istate)) } #[inline] -pub unsafe fn MsiSetComponentStateW(hinstall: P0, szcomponent: P1, istate: INSTALLSTATE) -> u32 +pub unsafe fn MsiSetComponentStateW(hinstall: MSIHANDLE, szcomponent: P1, istate: INSTALLSTATE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetComponentStateW(hinstall : MSIHANDLE, szcomponent : windows_core::PCWSTR, istate : INSTALLSTATE) -> u32); - MsiSetComponentStateW(hinstall.param().abi(), szcomponent.param().abi(), core::mem::transmute(istate)) + MsiSetComponentStateW(core::mem::transmute(hinstall), szcomponent.param().abi(), core::mem::transmute(istate)) } #[inline] -pub unsafe fn MsiSetExternalUIA(puihandler: INSTALLUI_HANDLERA, dwmessagefilter: u32, pvcontext: Option<*const core::ffi::c_void>) -> INSTALLUI_HANDLERA { +pub unsafe fn MsiSetExternalUIA(puihandler: Option, 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(core::mem::transmute(puihandler), core::mem::transmute(dwmessagefilter), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null()))) + MsiSetExternalUIA(core::mem::transmute(puihandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmessagefilter), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSetExternalUIRecord(puihandler: PINSTALLUI_HANDLER_RECORD, dwmessagefilter: u32, pvcontext: Option<*const core::ffi::c_void>, ppuiprevhandler: PINSTALLUI_HANDLER_RECORD) -> u32 { +pub unsafe fn MsiSetExternalUIRecord(puihandler: Option, dwmessagefilter: u32, pvcontext: Option<*const core::ffi::c_void>, ppuiprevhandler: Option) -> 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(core::mem::transmute(puihandler), core::mem::transmute(dwmessagefilter), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), core::mem::transmute(ppuiprevhandler)) + MsiSetExternalUIRecord(core::mem::transmute(puihandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmessagefilter), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppuiprevhandler.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSetExternalUIW(puihandler: INSTALLUI_HANDLERW, dwmessagefilter: u32, pvcontext: Option<*const core::ffi::c_void>) -> INSTALLUI_HANDLERW { +pub unsafe fn MsiSetExternalUIW(puihandler: Option, 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(core::mem::transmute(puihandler), core::mem::transmute(dwmessagefilter), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null()))) + MsiSetExternalUIW(core::mem::transmute(puihandler.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmessagefilter), core::mem::transmute(pvcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSetFeatureAttributesA(hinstall: P0, szfeature: P1, dwattributes: u32) -> u32 +pub unsafe fn MsiSetFeatureAttributesA(hinstall: MSIHANDLE, szfeature: P1, dwattributes: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetFeatureAttributesA(hinstall : MSIHANDLE, szfeature : windows_core::PCSTR, dwattributes : u32) -> u32); - MsiSetFeatureAttributesA(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(dwattributes)) + MsiSetFeatureAttributesA(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(dwattributes)) } #[inline] -pub unsafe fn MsiSetFeatureAttributesW(hinstall: P0, szfeature: P1, dwattributes: u32) -> u32 +pub unsafe fn MsiSetFeatureAttributesW(hinstall: MSIHANDLE, szfeature: P1, dwattributes: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetFeatureAttributesW(hinstall : MSIHANDLE, szfeature : windows_core::PCWSTR, dwattributes : u32) -> u32); - MsiSetFeatureAttributesW(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(dwattributes)) + MsiSetFeatureAttributesW(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(dwattributes)) } #[inline] -pub unsafe fn MsiSetFeatureStateA(hinstall: P0, szfeature: P1, istate: INSTALLSTATE) -> u32 +pub unsafe fn MsiSetFeatureStateA(hinstall: MSIHANDLE, szfeature: P1, istate: INSTALLSTATE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetFeatureStateA(hinstall : MSIHANDLE, szfeature : windows_core::PCSTR, istate : INSTALLSTATE) -> u32); - MsiSetFeatureStateA(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(istate)) + MsiSetFeatureStateA(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(istate)) } #[inline] -pub unsafe fn MsiSetFeatureStateW(hinstall: P0, szfeature: P1, istate: INSTALLSTATE) -> u32 +pub unsafe fn MsiSetFeatureStateW(hinstall: MSIHANDLE, szfeature: P1, istate: INSTALLSTATE) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetFeatureStateW(hinstall : MSIHANDLE, szfeature : windows_core::PCWSTR, istate : INSTALLSTATE) -> u32); - MsiSetFeatureStateW(hinstall.param().abi(), szfeature.param().abi(), core::mem::transmute(istate)) + MsiSetFeatureStateW(core::mem::transmute(hinstall), szfeature.param().abi(), core::mem::transmute(istate)) } #[inline] -pub unsafe fn MsiSetInstallLevel(hinstall: P0, iinstalllevel: i32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiSetInstallLevel(hinstall: MSIHANDLE, iinstalllevel: i32) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiSetInstallLevel(hinstall : MSIHANDLE, iinstalllevel : i32) -> u32); - MsiSetInstallLevel(hinstall.param().abi(), core::mem::transmute(iinstalllevel)) + MsiSetInstallLevel(core::mem::transmute(hinstall), core::mem::transmute(iinstalllevel)) } #[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(core::mem::transmute(dwuilevel), core::mem::transmute(phwnd.unwrap_or(core::ptr::null_mut()))) + MsiSetInternalUI(core::mem::transmute(dwuilevel), core::mem::transmute(phwnd.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSetMode(hinstall: P0, erunmode: MSIRUNMODE, fstate: P2) -> u32 +pub unsafe fn MsiSetMode(hinstall: MSIHANDLE, erunmode: MSIRUNMODE, fstate: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetMode(hinstall : MSIHANDLE, erunmode : MSIRUNMODE, fstate : super::super::Foundation:: BOOL) -> u32); - MsiSetMode(hinstall.param().abi(), core::mem::transmute(erunmode), fstate.param().abi()) + MsiSetMode(core::mem::transmute(hinstall), core::mem::transmute(erunmode), fstate.param().abi()) } #[inline] -pub unsafe fn MsiSetPropertyA(hinstall: P0, szname: P1, szvalue: P2) -> u32 +pub unsafe fn MsiSetPropertyA(hinstall: MSIHANDLE, szname: P1, szvalue: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetPropertyA(hinstall : MSIHANDLE, szname : windows_core::PCSTR, szvalue : windows_core::PCSTR) -> u32); - MsiSetPropertyA(hinstall.param().abi(), szname.param().abi(), szvalue.param().abi()) + MsiSetPropertyA(core::mem::transmute(hinstall), szname.param().abi(), szvalue.param().abi()) } #[inline] -pub unsafe fn MsiSetPropertyW(hinstall: P0, szname: P1, szvalue: P2) -> u32 +pub unsafe fn MsiSetPropertyW(hinstall: MSIHANDLE, szname: P1, szvalue: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetPropertyW(hinstall : MSIHANDLE, szname : windows_core::PCWSTR, szvalue : windows_core::PCWSTR) -> u32); - MsiSetPropertyW(hinstall.param().abi(), szname.param().abi(), szvalue.param().abi()) + MsiSetPropertyW(core::mem::transmute(hinstall), szname.param().abi(), szvalue.param().abi()) } #[inline] -pub unsafe fn MsiSetTargetPathA(hinstall: P0, szfolder: P1, szfolderpath: P2) -> u32 +pub unsafe fn MsiSetTargetPathA(hinstall: MSIHANDLE, szfolder: P1, szfolderpath: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetTargetPathA(hinstall : MSIHANDLE, szfolder : windows_core::PCSTR, szfolderpath : windows_core::PCSTR) -> u32); - MsiSetTargetPathA(hinstall.param().abi(), szfolder.param().abi(), szfolderpath.param().abi()) + MsiSetTargetPathA(core::mem::transmute(hinstall), szfolder.param().abi(), szfolderpath.param().abi()) } #[inline] -pub unsafe fn MsiSetTargetPathW(hinstall: P0, szfolder: P1, szfolderpath: P2) -> u32 +pub unsafe fn MsiSetTargetPathW(hinstall: MSIHANDLE, szfolder: P1, szfolderpath: P2) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSetTargetPathW(hinstall : MSIHANDLE, szfolder : windows_core::PCWSTR, szfolderpath : windows_core::PCWSTR) -> u32); - MsiSetTargetPathW(hinstall.param().abi(), szfolder.param().abi(), szfolderpath.param().abi()) + MsiSetTargetPathW(core::mem::transmute(hinstall), szfolder.param().abi(), szfolderpath.param().abi()) } #[inline] pub unsafe fn MsiSourceListAddMediaDiskA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwdiskid: u32, szvolumelabel: P5, szdiskprompt: P6) -> u32 @@ -2355,14 +2208,14 @@ where MsiSourceListAddMediaDiskW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), core::mem::transmute(dwdiskid), szvolumelabel.param().abi(), szdiskprompt.param().abi()) } #[inline] -pub unsafe fn MsiSourceListAddSourceA(szproduct: P0, szusername: P1, dwreserved: u32, szsource: P3) -> u32 +pub unsafe fn MsiSourceListAddSourceA(szproduct: P0, szusername: P1, dwreserved: Option, szsource: P3) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListAddSourceA(szproduct : windows_core::PCSTR, szusername : windows_core::PCSTR, dwreserved : u32, szsource : windows_core::PCSTR) -> u32); - MsiSourceListAddSourceA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved), szsource.param().abi()) + MsiSourceListAddSourceA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), szsource.param().abi()) } #[inline] pub unsafe fn MsiSourceListAddSourceExA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szsource: P4, dwindex: u32) -> u32 @@ -2385,23 +2238,23 @@ where MsiSourceListAddSourceExW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), szsource.param().abi(), core::mem::transmute(dwindex)) } #[inline] -pub unsafe fn MsiSourceListAddSourceW(szproduct: P0, szusername: P1, dwreserved: u32, szsource: P3) -> u32 +pub unsafe fn MsiSourceListAddSourceW(szproduct: P0, szusername: P1, dwreserved: Option, szsource: P3) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListAddSourceW(szproduct : windows_core::PCWSTR, szusername : windows_core::PCWSTR, dwreserved : u32, szsource : windows_core::PCWSTR) -> u32); - MsiSourceListAddSourceW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved), szsource.param().abi()) + MsiSourceListAddSourceW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), szsource.param().abi()) } #[inline] -pub unsafe fn MsiSourceListClearAllA(szproduct: P0, szusername: P1, dwreserved: u32) -> u32 +pub unsafe fn MsiSourceListClearAllA(szproduct: P0, szusername: P1, dwreserved: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListClearAllA(szproduct : windows_core::PCSTR, szusername : windows_core::PCSTR, dwreserved : u32) -> u32); - MsiSourceListClearAllA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved)) + MsiSourceListClearAllA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiSourceListClearAllExA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32) -> u32 @@ -2422,13 +2275,13 @@ where MsiSourceListClearAllExW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions)) } #[inline] -pub unsafe fn MsiSourceListClearAllW(szproduct: P0, szusername: P1, dwreserved: u32) -> u32 +pub unsafe fn MsiSourceListClearAllW(szproduct: P0, szusername: P1, dwreserved: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListClearAllW(szproduct : windows_core::PCWSTR, szusername : windows_core::PCWSTR, dwreserved : u32) -> u32); - MsiSourceListClearAllW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved)) + MsiSourceListClearAllW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiSourceListClearMediaDiskA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwdiskid: u32) -> u32 @@ -2469,49 +2322,71 @@ where MsiSourceListClearSourceW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), szsource.param().abi()) } #[inline] -pub unsafe fn MsiSourceListEnumMediaDisksA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, pdwdiskid: Option<*mut u32>, szvolumelabel: windows_core::PSTR, pcchvolumelabel: Option<*mut u32>, szdiskprompt: windows_core::PSTR, pcchdiskprompt: Option<*mut u32>) -> u32 +pub unsafe fn MsiSourceListEnumMediaDisksA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, pdwdiskid: Option<*mut u32>, szvolumelabel: Option, pcchvolumelabel: Option<*mut u32>, szdiskprompt: Option, pcchdiskprompt: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), core::mem::transmute(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()))) + MsiSourceListEnumMediaDisksA( + szproductcodeorpatchcode.param().abi(), + szusersid.param().abi(), + core::mem::transmute(dwcontext), + core::mem::transmute(dwoptions), + core::mem::transmute(dwindex), + core::mem::transmute(pdwdiskid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(szvolumelabel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchvolumelabel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(szdiskprompt.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchdiskprompt.unwrap_or(core::mem::zeroed())), + ) } #[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 +pub unsafe fn MsiSourceListEnumMediaDisksW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, pdwdiskid: Option<*mut u32>, szvolumelabel: Option, pcchvolumelabel: Option<*mut u32>, szdiskprompt: Option, pcchdiskprompt: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), core::mem::transmute(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()))) + MsiSourceListEnumMediaDisksW( + szproductcodeorpatchcode.param().abi(), + szusersid.param().abi(), + core::mem::transmute(dwcontext), + core::mem::transmute(dwoptions), + core::mem::transmute(dwindex), + core::mem::transmute(pdwdiskid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(szvolumelabel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchvolumelabel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(szdiskprompt.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcchdiskprompt.unwrap_or(core::mem::zeroed())), + ) } #[inline] -pub unsafe fn MsiSourceListEnumSourcesA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, szsource: windows_core::PSTR, pcchsource: Option<*mut u32>) -> u32 +pub unsafe fn MsiSourceListEnumSourcesA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, szsource: Option, pcchsource: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), core::mem::transmute(dwindex), core::mem::transmute(szsource), core::mem::transmute(pcchsource.unwrap_or(core::ptr::null_mut()))) + MsiSourceListEnumSourcesA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), core::mem::transmute(dwindex), core::mem::transmute(szsource.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsource.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSourceListEnumSourcesW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, szsource: windows_core::PWSTR, pcchsource: Option<*mut u32>) -> u32 +pub unsafe fn MsiSourceListEnumSourcesW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, szsource: Option, pcchsource: Option<*mut u32>) -> u32 where P0: windows_core::Param, 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(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), core::mem::transmute(dwindex), core::mem::transmute(szsource), core::mem::transmute(pcchsource.unwrap_or(core::ptr::null_mut()))) + MsiSourceListEnumSourcesW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), core::mem::transmute(dwindex), core::mem::transmute(szsource.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsource.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSourceListForceResolutionA(szproduct: P0, szusername: P1, dwreserved: u32) -> u32 +pub unsafe fn MsiSourceListForceResolutionA(szproduct: P0, szusername: P1, dwreserved: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListForceResolutionA(szproduct : windows_core::PCSTR, szusername : windows_core::PCSTR, dwreserved : u32) -> u32); - MsiSourceListForceResolutionA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved)) + MsiSourceListForceResolutionA(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiSourceListForceResolutionExA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32) -> u32 @@ -2532,33 +2407,33 @@ where MsiSourceListForceResolutionExW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions)) } #[inline] -pub unsafe fn MsiSourceListForceResolutionW(szproduct: P0, szusername: P1, dwreserved: u32) -> u32 +pub unsafe fn MsiSourceListForceResolutionW(szproduct: P0, szusername: P1, dwreserved: Option) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListForceResolutionW(szproduct : windows_core::PCWSTR, szusername : windows_core::PCWSTR, dwreserved : u32) -> u32); - MsiSourceListForceResolutionW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved)) + MsiSourceListForceResolutionW(szproduct.param().abi(), szusername.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSourceListGetInfoA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P4, szvalue: windows_core::PSTR, pcchvalue: Option<*mut u32>) -> u32 +pub unsafe fn MsiSourceListGetInfoA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P4, szvalue: Option, pcchvalue: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P4: 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(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) + MsiSourceListGetInfoA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), szproperty.param().abi(), core::mem::transmute(szvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSourceListGetInfoW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P4, szvalue: windows_core::PWSTR, pcchvalue: Option<*mut u32>) -> u32 +pub unsafe fn MsiSourceListGetInfoW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P4, szvalue: Option, pcchvalue: Option<*mut u32>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P4: 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(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) + MsiSourceListGetInfoW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), szproperty.param().abi(), core::mem::transmute(szvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvalue.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiSourceListSetInfoA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P4, szvalue: P5) -> u32 @@ -2583,54 +2458,40 @@ where MsiSourceListSetInfoW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), core::mem::transmute(dwcontext), core::mem::transmute(dwoptions), szproperty.param().abi(), szvalue.param().abi()) } #[inline] -pub unsafe fn MsiSummaryInfoGetPropertyA(hsummaryinfo: P0, uiproperty: u32, puidatatype: *mut u32, pivalue: *mut i32, pftvalue: Option<*mut super::super::Foundation::FILETIME>, szvaluebuf: windows_core::PSTR, pcchvaluebuf: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiSummaryInfoGetPropertyA(hsummaryinfo: MSIHANDLE, uiproperty: u32, puidatatype: *mut u32, pivalue: *mut i32, pftvalue: Option<*mut super::super::Foundation::FILETIME>, szvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 { 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(), core::mem::transmute(uiproperty), core::mem::transmute(puidatatype), core::mem::transmute(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()))) + MsiSummaryInfoGetPropertyA(core::mem::transmute(hsummaryinfo), core::mem::transmute(uiproperty), core::mem::transmute(puidatatype), core::mem::transmute(pivalue), core::mem::transmute(pftvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSummaryInfoGetPropertyCount(hsummaryinfo: P0, puipropertycount: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiSummaryInfoGetPropertyCount(hsummaryinfo: MSIHANDLE, puipropertycount: *mut u32) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiSummaryInfoGetPropertyCount(hsummaryinfo : MSIHANDLE, puipropertycount : *mut u32) -> u32); - MsiSummaryInfoGetPropertyCount(hsummaryinfo.param().abi(), core::mem::transmute(puipropertycount)) + MsiSummaryInfoGetPropertyCount(core::mem::transmute(hsummaryinfo), core::mem::transmute(puipropertycount)) } #[inline] -pub unsafe fn MsiSummaryInfoGetPropertyW(hsummaryinfo: P0, uiproperty: u32, puidatatype: *mut u32, pivalue: *mut i32, pftvalue: Option<*mut super::super::Foundation::FILETIME>, szvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiSummaryInfoGetPropertyW(hsummaryinfo: MSIHANDLE, uiproperty: u32, puidatatype: *mut u32, pivalue: *mut i32, pftvalue: Option<*mut super::super::Foundation::FILETIME>, szvaluebuf: Option, pcchvaluebuf: Option<*mut u32>) -> u32 { 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(), core::mem::transmute(uiproperty), core::mem::transmute(puidatatype), core::mem::transmute(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()))) + MsiSummaryInfoGetPropertyW(core::mem::transmute(hsummaryinfo), core::mem::transmute(uiproperty), core::mem::transmute(puidatatype), core::mem::transmute(pivalue), core::mem::transmute(pftvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(szvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluebuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSummaryInfoPersist(hsummaryinfo: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiSummaryInfoPersist(hsummaryinfo: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiSummaryInfoPersist(hsummaryinfo : MSIHANDLE) -> u32); - MsiSummaryInfoPersist(hsummaryinfo.param().abi()) + MsiSummaryInfoPersist(core::mem::transmute(hsummaryinfo)) } #[inline] -pub unsafe fn MsiSummaryInfoSetPropertyA(hsummaryinfo: P0, uiproperty: u32, uidatatype: u32, ivalue: i32, pftvalue: *mut super::super::Foundation::FILETIME, szvalue: P5) -> u32 +pub unsafe fn MsiSummaryInfoSetPropertyA(hsummaryinfo: MSIHANDLE, uiproperty: u32, uidatatype: u32, ivalue: i32, pftvalue: *mut super::super::Foundation::FILETIME, szvalue: P5) -> u32 where - P0: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSummaryInfoSetPropertyA(hsummaryinfo : MSIHANDLE, uiproperty : u32, uidatatype : u32, ivalue : i32, pftvalue : *mut super::super::Foundation:: FILETIME, szvalue : windows_core::PCSTR) -> u32); - MsiSummaryInfoSetPropertyA(hsummaryinfo.param().abi(), core::mem::transmute(uiproperty), core::mem::transmute(uidatatype), core::mem::transmute(ivalue), core::mem::transmute(pftvalue), szvalue.param().abi()) + MsiSummaryInfoSetPropertyA(core::mem::transmute(hsummaryinfo), core::mem::transmute(uiproperty), core::mem::transmute(uidatatype), core::mem::transmute(ivalue), core::mem::transmute(pftvalue), szvalue.param().abi()) } #[inline] -pub unsafe fn MsiSummaryInfoSetPropertyW(hsummaryinfo: P0, uiproperty: u32, uidatatype: u32, ivalue: i32, pftvalue: *mut super::super::Foundation::FILETIME, szvalue: P5) -> u32 +pub unsafe fn MsiSummaryInfoSetPropertyW(hsummaryinfo: MSIHANDLE, uiproperty: u32, uidatatype: u32, ivalue: i32, pftvalue: *mut super::super::Foundation::FILETIME, szvalue: P5) -> u32 where - P0: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSummaryInfoSetPropertyW(hsummaryinfo : MSIHANDLE, uiproperty : u32, uidatatype : u32, ivalue : i32, pftvalue : *mut super::super::Foundation:: FILETIME, szvalue : windows_core::PCWSTR) -> u32); - MsiSummaryInfoSetPropertyW(hsummaryinfo.param().abi(), core::mem::transmute(uiproperty), core::mem::transmute(uidatatype), core::mem::transmute(ivalue), core::mem::transmute(pftvalue), szvalue.param().abi()) + MsiSummaryInfoSetPropertyW(core::mem::transmute(hsummaryinfo), core::mem::transmute(uiproperty), core::mem::transmute(uidatatype), core::mem::transmute(ivalue), core::mem::transmute(pftvalue), szvalue.param().abi()) } #[inline] pub unsafe fn MsiUseFeatureA(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -2642,22 +2503,22 @@ where MsiUseFeatureA(szproduct.param().abi(), szfeature.param().abi()) } #[inline] -pub unsafe fn MsiUseFeatureExA(szproduct: P0, szfeature: P1, dwinstallmode: u32, dwreserved: u32) -> INSTALLSTATE +pub unsafe fn MsiUseFeatureExA(szproduct: P0, szfeature: P1, dwinstallmode: u32, dwreserved: Option) -> INSTALLSTATE where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiUseFeatureExA(szproduct : windows_core::PCSTR, szfeature : windows_core::PCSTR, dwinstallmode : u32, dwreserved : u32) -> INSTALLSTATE); - MsiUseFeatureExA(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(dwinstallmode), core::mem::transmute(dwreserved)) + MsiUseFeatureExA(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(dwinstallmode), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiUseFeatureExW(szproduct: P0, szfeature: P1, dwinstallmode: u32, dwreserved: u32) -> INSTALLSTATE +pub unsafe fn MsiUseFeatureExW(szproduct: P0, szfeature: P1, dwinstallmode: u32, dwreserved: Option) -> INSTALLSTATE where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiUseFeatureExW(szproduct : windows_core::PCWSTR, szfeature : windows_core::PCWSTR, dwinstallmode : u32, dwreserved : u32) -> INSTALLSTATE); - MsiUseFeatureExW(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(dwinstallmode), core::mem::transmute(dwreserved)) + MsiUseFeatureExW(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(dwinstallmode), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MsiUseFeatureW(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -2669,12 +2530,9 @@ where MsiUseFeatureW(szproduct.param().abi(), szfeature.param().abi()) } #[inline] -pub unsafe fn MsiVerifyDiskSpace(hinstall: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiVerifyDiskSpace(hinstall: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiVerifyDiskSpace(hinstall : MSIHANDLE) -> u32); - MsiVerifyDiskSpace(hinstall.param().abi()) + MsiVerifyDiskSpace(core::mem::transmute(hinstall)) } #[inline] pub unsafe fn MsiVerifyPackageA(szpackagepath: P0) -> u32 @@ -2693,62 +2551,39 @@ where MsiVerifyPackageW(szpackagepath.param().abi()) } #[inline] -pub unsafe fn MsiViewClose(hview: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiViewClose(hview: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiViewClose(hview : MSIHANDLE) -> u32); - MsiViewClose(hview.param().abi()) + MsiViewClose(core::mem::transmute(hview)) } #[inline] -pub unsafe fn MsiViewExecute(hview: P0, hrecord: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MsiViewExecute(hview: MSIHANDLE, hrecord: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiViewExecute(hview : MSIHANDLE, hrecord : MSIHANDLE) -> u32); - MsiViewExecute(hview.param().abi(), hrecord.param().abi()) + MsiViewExecute(core::mem::transmute(hview), core::mem::transmute(hrecord)) } #[inline] -pub unsafe fn MsiViewFetch(hview: P0, phrecord: *mut MSIHANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiViewFetch(hview: MSIHANDLE, phrecord: *mut MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiViewFetch(hview : MSIHANDLE, phrecord : *mut MSIHANDLE) -> u32); - MsiViewFetch(hview.param().abi(), core::mem::transmute(phrecord)) + MsiViewFetch(core::mem::transmute(hview), core::mem::transmute(phrecord)) } #[inline] -pub unsafe fn MsiViewGetColumnInfo(hview: P0, ecolumninfo: MSICOLINFO, phrecord: *mut MSIHANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn MsiViewGetColumnInfo(hview: MSIHANDLE, ecolumninfo: MSICOLINFO, phrecord: *mut MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiViewGetColumnInfo(hview : MSIHANDLE, ecolumninfo : MSICOLINFO, phrecord : *mut MSIHANDLE) -> u32); - MsiViewGetColumnInfo(hview.param().abi(), core::mem::transmute(ecolumninfo), core::mem::transmute(phrecord)) + MsiViewGetColumnInfo(core::mem::transmute(hview), core::mem::transmute(ecolumninfo), core::mem::transmute(phrecord)) } #[inline] -pub unsafe fn MsiViewGetErrorA(hview: P0, szcolumnnamebuffer: windows_core::PSTR, pcchbuf: Option<*mut u32>) -> MSIDBERROR -where - P0: windows_core::Param, -{ +pub unsafe fn MsiViewGetErrorA(hview: MSIHANDLE, szcolumnnamebuffer: Option, pcchbuf: Option<*mut u32>) -> MSIDBERROR { 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(core::ptr::null_mut()))) + MsiViewGetErrorA(core::mem::transmute(hview), core::mem::transmute(szcolumnnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiViewGetErrorW(hview: P0, szcolumnnamebuffer: windows_core::PWSTR, pcchbuf: Option<*mut u32>) -> MSIDBERROR -where - P0: windows_core::Param, -{ +pub unsafe fn MsiViewGetErrorW(hview: MSIHANDLE, szcolumnnamebuffer: Option, pcchbuf: Option<*mut u32>) -> MSIDBERROR { 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(core::ptr::null_mut()))) + MsiViewGetErrorW(core::mem::transmute(hview), core::mem::transmute(szcolumnnamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuf.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiViewModify(hview: P0, emodifymode: MSIMODIFY, hrecord: P2) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn MsiViewModify(hview: MSIHANDLE, emodifymode: MSIMODIFY, hrecord: MSIHANDLE) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiViewModify(hview : MSIHANDLE, emodifymode : MSIMODIFY, hrecord : MSIHANDLE) -> u32); - MsiViewModify(hview.param().abi(), core::mem::transmute(emodifymode), hrecord.param().abi()) + MsiViewModify(core::mem::transmute(hview), core::mem::transmute(emodifymode), core::mem::transmute(hrecord)) } #[inline] pub unsafe fn NormalizeFileForPatchSignature(filebuffer: *mut core::ffi::c_void, filesize: u32, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, newfilecoffbase: u32, newfilecofftime: u32, ignorerangearray: Option<&[PATCH_IGNORE_RANGE]>, retainrangearray: Option<&[PATCH_RETAIN_RANGE]>) -> i32 { @@ -2757,7 +2592,7 @@ pub unsafe fn NormalizeFileForPatchSignature(filebuffer: *mut core::ffi::c_void, core::mem::transmute(filebuffer), core::mem::transmute(filesize), core::mem::transmute(optionflags), - core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::mem::zeroed())), core::mem::transmute(newfilecoffbase), core::mem::transmute(newfilecofftime), ignorerangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -2767,22 +2602,18 @@ pub unsafe fn NormalizeFileForPatchSignature(filebuffer: *mut core::ffi::c_void, ) } #[inline] -pub unsafe fn QueryActCtxSettingsW(dwflags: u32, hactctx: P1, settingsnamespace: P2, settingname: P3, pvbuffer: windows_core::PWSTR, dwbuffer: usize, pdwwrittenorrequired: Option<*mut usize>) -> windows_core::Result<()> +pub unsafe fn QueryActCtxSettingsW(dwflags: Option, hactctx: Option, settingsnamespace: P2, settingname: P3, pvbuffer: Option, dwbuffer: usize, pdwwrittenorrequired: Option<*mut usize>) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: 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(core::mem::transmute(dwflags), hactctx.param().abi(), settingsnamespace.param().abi(), settingname.param().abi(), core::mem::transmute(pvbuffer), core::mem::transmute(dwbuffer), core::mem::transmute(pdwwrittenorrequired.unwrap_or(core::ptr::null_mut()))).ok() + QueryActCtxSettingsW(core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(hactctx.unwrap_or(core::mem::zeroed())), settingsnamespace.param().abi(), settingname.param().abi(), core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbuffer), core::mem::transmute(pdwwrittenorrequired.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn QueryActCtxW(dwflags: u32, hactctx: P1, 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<()> -where - P1: windows_core::Param, -{ +pub unsafe fn QueryActCtxW(dwflags: u32, hactctx: super::super::Foundation::HANDLE, 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<()> { 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(core::mem::transmute(dwflags), hactctx.param().abi(), core::mem::transmute(pvsubinstance.unwrap_or(core::ptr::null())), core::mem::transmute(ulinfoclass), core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbuffer), core::mem::transmute(pcbwrittenorrequired.unwrap_or(core::ptr::null_mut()))).ok() + QueryActCtxW(core::mem::transmute(dwflags), core::mem::transmute(hactctx), core::mem::transmute(pvsubinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulinfoclass), core::mem::transmute(pvbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbuffer), core::mem::transmute(pcbwrittenorrequired.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ReleaseActCtx(hactctx: super::super::Foundation::HANDLE) { @@ -2790,31 +2621,26 @@ pub unsafe fn ReleaseActCtx(hactctx: super::super::Foundation::HANDLE) { ReleaseActCtx(core::mem::transmute(hactctx)) } #[inline] -pub unsafe fn SfcGetNextProtectedFile(rpchandle: P0, protfiledata: *mut PROTECTED_FILE_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SfcGetNextProtectedFile(rpchandle: super::super::Foundation::HANDLE, protfiledata: *mut PROTECTED_FILE_DATA) -> windows_core::Result<()> { windows_targets::link!("sfc.dll" "system" fn SfcGetNextProtectedFile(rpchandle : super::super::Foundation:: HANDLE, protfiledata : *mut PROTECTED_FILE_DATA) -> super::super::Foundation:: BOOL); - SfcGetNextProtectedFile(rpchandle.param().abi(), core::mem::transmute(protfiledata)).ok() + SfcGetNextProtectedFile(core::mem::transmute(rpchandle), core::mem::transmute(protfiledata)).ok() } #[inline] -pub unsafe fn SfcIsFileProtected(rpchandle: P0, protfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SfcIsFileProtected(rpchandle: super::super::Foundation::HANDLE, protfilename: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("sfc.dll" "system" fn SfcIsFileProtected(rpchandle : super::super::Foundation:: HANDLE, protfilename : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SfcIsFileProtected(rpchandle.param().abi(), protfilename.param().abi()) + SfcIsFileProtected(core::mem::transmute(rpchandle), protfilename.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SfcIsKeyProtected(keyhandle: P0, subkeyname: P1, keysam: u32) -> super::super::Foundation::BOOL +pub unsafe fn SfcIsKeyProtected(keyhandle: super::Registry::HKEY, subkeyname: P1, keysam: u32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("sfc.dll" "system" fn SfcIsKeyProtected(keyhandle : super::Registry:: HKEY, subkeyname : windows_core::PCWSTR, keysam : u32) -> super::super::Foundation:: BOOL); - SfcIsKeyProtected(keyhandle.param().abi(), subkeyname.param().abi(), core::mem::transmute(keysam)) + SfcIsKeyProtected(core::mem::transmute(keyhandle), subkeyname.param().abi(), core::mem::transmute(keysam)) } #[inline] pub unsafe fn SfpVerifyFile(pszfilename: P0, pszerror: &[u8]) -> super::super::Foundation::BOOL @@ -2836,16 +2662,12 @@ 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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(applyoptionflags)) } #[inline] -pub unsafe fn TestApplyPatchToFileByHandles(patchfilehandle: P0, oldfilehandle: P1, applyoptionflags: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn TestApplyPatchToFileByHandles(patchfilehandle: super::super::Foundation::HANDLE, oldfilehandle: super::super::Foundation::HANDLE, applyoptionflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("mspatcha.dll" "system" fn TestApplyPatchToFileByHandles(patchfilehandle : super::super::Foundation:: HANDLE, oldfilehandle : super::super::Foundation:: HANDLE, applyoptionflags : u32) -> super::super::Foundation:: BOOL); - TestApplyPatchToFileByHandles(patchfilehandle.param().abi(), oldfilehandle.param().abi(), core::mem::transmute(applyoptionflags)) + TestApplyPatchToFileByHandles(core::mem::transmute(patchfilehandle), core::mem::transmute(oldfilehandle), core::mem::transmute(applyoptionflags)) } #[inline] pub unsafe fn TestApplyPatchToFileW(patchfilename: P0, oldfilename: P1, applyoptionflags: u32) -> super::super::Foundation::BOOL @@ -3663,8 +3485,8 @@ impl IAssemblyName { pub unsafe fn Finalize(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Finalize)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn GetDisplayName(&self, szdisplayname: windows_core::PWSTR, pccdisplayname: *mut u32, dwdisplayflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), core::mem::transmute(szdisplayname), core::mem::transmute(pccdisplayname), core::mem::transmute(dwdisplayflags)).ok() + pub unsafe fn GetDisplayName(&self, szdisplayname: Option, pccdisplayname: *mut u32, dwdisplayflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), core::mem::transmute(szdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pccdisplayname), core::mem::transmute(dwdisplayflags)).ok() } pub unsafe fn Reserved(&self, refiid: *const windows_core::GUID, punkreserved1: P1, punkreserved2: P2, szreserved: P3, llreserved: i64, pvreserved: *mut core::ffi::c_void, cbreserved: u32, ppreserved: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where @@ -3674,8 +3496,8 @@ impl IAssemblyName { { (windows_core::Interface::vtable(self).Reserved)(windows_core::Interface::as_raw(self), core::mem::transmute(refiid), punkreserved1.param().abi(), punkreserved2.param().abi(), szreserved.param().abi(), core::mem::transmute(llreserved), core::mem::transmute(pvreserved), core::mem::transmute(cbreserved), core::mem::transmute(ppreserved)).ok() } - pub unsafe fn GetName(&self, lpcwbuffer: *mut u32, pwzname: windows_core::PWSTR) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(lpcwbuffer), core::mem::transmute(pwzname)).ok() + pub unsafe fn GetName(&self, lpcwbuffer: *mut u32, pwzname: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(lpcwbuffer), core::mem::transmute(pwzname.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetVersion(&self, pdwversionhi: *mut u32, pdwversionlow: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwversionhi), core::mem::transmute(pdwversionlow)).ok() @@ -4405,11 +4227,8 @@ impl IMsmMerge { pub unsafe fn OpenModule(&self, path: &windows_core::BSTR, language: i16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OpenModule)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(path), core::mem::transmute(language)).ok() } - pub unsafe fn CloseDatabase(&self, commit: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CloseDatabase)(windows_core::Interface::as_raw(self), commit.param().abi()).ok() + pub unsafe fn CloseDatabase(&self, commit: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CloseDatabase)(windows_core::Interface::as_raw(self), core::mem::transmute(commit)).ok() } pub unsafe fn CloseModule(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseModule)(windows_core::Interface::as_raw(self)).ok() @@ -6112,14 +5931,14 @@ impl IPMDeploymentManager { core::mem::transmute_copy(packagepath), core::mem::transmute(ppbchallenge), core::mem::transmute(pcbchallenge), - 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())), + core::mem::transmute(ppbkid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbkid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppbdeviceid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbdeviceid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppbsaltvalue.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbsaltvalue.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppbkgvvalue.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbkgvvalue.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -6132,14 +5951,14 @@ impl IPMDeploymentManager { core::mem::transmute(productid), core::mem::transmute(ppbchallenge), core::mem::transmute(pcblicense), - 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())), + core::mem::transmute(ppbkid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbkid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppbdeviceid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbdeviceid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppbsaltvalue.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbsaltvalue.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppbkgvvalue.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbkgvvalue.unwrap_or(core::mem::zeroed())), ) .ok() } diff --git a/crates/libs/windows/src/Windows/Win32/System/ApplicationVerifier/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ApplicationVerifier/mod.rs index 5e97bb11bf..9f3d321a3d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationVerifier/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationVerifier/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn VerifierEnumerateResource(process: P0, flags: VERIFIER_ENUM_RESOURCE_FLAGS, resourcetype: eAvrfResourceTypes, resourcecallback: AVRF_RESOURCE_ENUMERATE_CALLBACK, enumerationcontext: *mut core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn VerifierEnumerateResource(process: super::super::Foundation::HANDLE, flags: VERIFIER_ENUM_RESOURCE_FLAGS, resourcetype: eAvrfResourceTypes, resourcecallback: AVRF_RESOURCE_ENUMERATE_CALLBACK, enumerationcontext: *mut core::ffi::c_void) -> u32 { windows_targets::link!("verifier.dll" "system" fn VerifierEnumerateResource(process : super::super::Foundation:: HANDLE, flags : VERIFIER_ENUM_RESOURCE_FLAGS, resourcetype : u32, resourcecallback : AVRF_RESOURCE_ENUMERATE_CALLBACK, enumerationcontext : *mut core::ffi::c_void) -> u32); - VerifierEnumerateResource(process.param().abi(), core::mem::transmute(flags), resourcetype.0 as _, core::mem::transmute(resourcecallback), core::mem::transmute(enumerationcontext)) + VerifierEnumerateResource(core::mem::transmute(process), core::mem::transmute(flags), resourcetype.0 as _, core::mem::transmute(resourcecallback), core::mem::transmute(enumerationcontext)) } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs b/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs index 66fcd0d791..6eaf3c856c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs @@ -57,20 +57,18 @@ impl windows_core::RuntimeName for IAccessibleWinSAT {} windows_core::imp::define_interface!(IInitiateWinSATAssessment, IInitiateWinSATAssessment_Vtbl, 0xd983fc50_f5bf_49d5_b5ed_cccb18aa7fc1); windows_core::imp::interface_hierarchy!(IInitiateWinSATAssessment, windows_core::IUnknown); impl IInitiateWinSATAssessment { - pub unsafe fn InitiateAssessment(&self, cmdline: P0, pcallbacks: P1, callerhwnd: P2) -> windows_core::Result<()> + pub unsafe fn InitiateAssessment(&self, cmdline: P0, pcallbacks: P1, callerhwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).InitiateAssessment)(windows_core::Interface::as_raw(self), cmdline.param().abi(), pcallbacks.param().abi(), callerhwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).InitiateAssessment)(windows_core::Interface::as_raw(self), cmdline.param().abi(), pcallbacks.param().abi(), core::mem::transmute(callerhwnd.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn InitiateFormalAssessment(&self, pcallbacks: P0, callerhwnd: P1) -> windows_core::Result<()> + pub unsafe fn InitiateFormalAssessment(&self, pcallbacks: P0, callerhwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InitiateFormalAssessment)(windows_core::Interface::as_raw(self), pcallbacks.param().abi(), callerhwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).InitiateFormalAssessment)(windows_core::Interface::as_raw(self), pcallbacks.param().abi(), core::mem::transmute(callerhwnd.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn CancelAssessment(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CancelAssessment)(windows_core::Interface::as_raw(self)).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 439738d87a..a72556e3b0 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 core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(dwdirectorylength.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(dwlength.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -169,15 +169,12 @@ 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(core::mem::transmute(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())), core::mem::transmute(dwresolutionflags)).ok() + GetRequestedRuntimeVersionForCLSID(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(dwresolutionflags)).ok() } #[inline] -pub unsafe fn GetVersionFromProcess(hprocess: P0, pversion: &mut [u16], dwlength: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetVersionFromProcess(hprocess: super::super::Foundation::HANDLE, pversion: &mut [u16], dwlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mscoree.dll" "system" fn GetVersionFromProcess(hprocess : super::super::Foundation:: HANDLE, pversion : windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> windows_core::HRESULT); - GetVersionFromProcess(hprocess.param().abi(), core::mem::transmute(pversion.as_ptr()), pversion.len().try_into().unwrap(), core::mem::transmute(dwlength)).ok() + GetVersionFromProcess(core::mem::transmute(hprocess), core::mem::transmute(pversion.as_ptr()), pversion.len().try_into().unwrap(), core::mem::transmute(dwlength)).ok() } #[inline] pub unsafe fn LoadLibraryShim(szdllname: P0, szversion: P1, pvreserved: *mut core::ffi::c_void, phmoddll: *mut super::super::Foundation::HMODULE) -> windows_core::Result<()> @@ -204,14 +201,12 @@ pub unsafe fn LockClrVersion(hostcallback: FLockClrVersionCallback, pbeginhostse LockClrVersion(core::mem::transmute(hostcallback), core::mem::transmute(pbeginhostsetup), core::mem::transmute(pendhostsetup)).ok() } #[inline] -pub unsafe fn RunDll32ShimW(hwnd: P0, hinst: P1, lpszcmdline: P2, ncmdshow: i32) -> windows_core::Result<()> +pub unsafe fn RunDll32ShimW(hwnd: super::super::Foundation::HWND, hinst: super::super::Foundation::HINSTANCE, lpszcmdline: P2, ncmdshow: i32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("mscoree.dll" "system" fn RunDll32ShimW(hwnd : super::super::Foundation:: HWND, hinst : super::super::Foundation:: HINSTANCE, lpszcmdline : windows_core::PCWSTR, ncmdshow : i32) -> windows_core::HRESULT); - RunDll32ShimW(hwnd.param().abi(), hinst.param().abi(), lpszcmdline.param().abi(), core::mem::transmute(ncmdshow)).ok() + RunDll32ShimW(core::mem::transmute(hwnd), core::mem::transmute(hinst), lpszcmdline.param().abi(), core::mem::transmute(ncmdshow)).ok() } pub const APPDOMAIN_FORCE_TRIVIAL_WAIT_OPERATIONS: APPDOMAIN_SECURITY_FLAGS = APPDOMAIN_SECURITY_FLAGS(8i32); pub const APPDOMAIN_SECURITY_DEFAULT: APPDOMAIN_SECURITY_FLAGS = APPDOMAIN_SECURITY_FLAGS(0i32); @@ -977,11 +972,8 @@ impl ICLRDebugging { { (windows_core::Interface::vtable(self).OpenVirtualProcess)(windows_core::Interface::as_raw(self), core::mem::transmute(modulebaseaddress), pdatatarget.param().abi(), plibraryprovider.param().abi(), core::mem::transmute(pmaxdebuggersupportedversion), core::mem::transmute(riidprocess), core::mem::transmute(ppprocess), core::mem::transmute(pversion), core::mem::transmute(pdwflags)).ok() } - pub unsafe fn CanUnloadNow(&self, hmodule: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CanUnloadNow)(windows_core::Interface::as_raw(self), hmodule.param().abi()).ok() + pub unsafe fn CanUnloadNow(&self, hmodule: super::super::Foundation::HMODULE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CanUnloadNow)(windows_core::Interface::as_raw(self), core::mem::transmute(hmodule)).ok() } } #[repr(C)] @@ -1402,12 +1394,9 @@ impl ICLRMetaHost { (windows_core::Interface::vtable(self).EnumerateInstalledRuntimes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn EnumerateLoadedRuntimes(&self, hndprocess: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn EnumerateLoadedRuntimes(&self, hndprocess: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumerateLoadedRuntimes)(windows_core::Interface::as_raw(self), hndprocess.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumerateLoadedRuntimes)(windows_core::Interface::as_raw(self), core::mem::transmute(hndprocess), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn RequestRuntimeLoadedNotification(&self, pcallbackfunction: RuntimeLoadedCallbackFnPtr) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RequestRuntimeLoadedNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(pcallbackfunction)).ok() @@ -1514,14 +1503,14 @@ windows_core::imp::define_interface!(ICLRMetaHostPolicy, ICLRMetaHostPolicy_Vtbl windows_core::imp::interface_hierarchy!(ICLRMetaHostPolicy, windows_core::IUnknown); impl ICLRMetaHostPolicy { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn GetRequestedRuntime(&self, dwpolicyflags: METAHOST_POLICY_FLAGS, pwzbinary: P1, pcfgstream: P2, pwzversion: windows_core::PWSTR, pcchversion: *mut u32, pwzimageversion: windows_core::PWSTR, pcchimageversion: *mut u32, pdwconfigflags: *mut u32) -> windows_core::Result + pub unsafe fn GetRequestedRuntime(&self, dwpolicyflags: METAHOST_POLICY_FLAGS, pwzbinary: P1, pcfgstream: P2, pwzversion: Option, pcchversion: *mut u32, pwzimageversion: Option, pcchimageversion: *mut u32, pdwconfigflags: *mut u32) -> windows_core::Result where P1: windows_core::Param, P2: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetRequestedRuntime)(windows_core::Interface::as_raw(self), core::mem::transmute(dwpolicyflags), pwzbinary.param().abi(), pcfgstream.param().abi(), core::mem::transmute(pwzversion), core::mem::transmute(pcchversion), core::mem::transmute(pwzimageversion), core::mem::transmute(pcchimageversion), core::mem::transmute(pdwconfigflags), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetRequestedRuntime)(windows_core::Interface::as_raw(self), core::mem::transmute(dwpolicyflags), pwzbinary.param().abi(), pcfgstream.param().abi(), core::mem::transmute(pwzversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchversion), core::mem::transmute(pwzimageversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchimageversion), core::mem::transmute(pdwconfigflags), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1923,18 +1912,15 @@ impl windows_core::RuntimeName for ICLRRuntimeHost {} windows_core::imp::define_interface!(ICLRRuntimeInfo, ICLRRuntimeInfo_Vtbl, 0xbd39d1d2_ba2f_486a_89b0_b4b0cb466891); windows_core::imp::interface_hierarchy!(ICLRRuntimeInfo, windows_core::IUnknown); impl ICLRRuntimeInfo { - pub unsafe fn GetVersionString(&self, pwzbuffer: windows_core::PWSTR, pcchbuffer: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVersionString)(windows_core::Interface::as_raw(self), core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffer)).ok() + pub unsafe fn GetVersionString(&self, pwzbuffer: Option, pcchbuffer: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetVersionString)(windows_core::Interface::as_raw(self), core::mem::transmute(pwzbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffer)).ok() } pub unsafe fn GetRuntimeDirectory(&self, pwzbuffer: windows_core::PWSTR, pcchbuffer: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRuntimeDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffer)).ok() } - pub unsafe fn IsLoaded(&self, hndprocess: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn IsLoaded(&self, hndprocess: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).IsLoaded)(windows_core::Interface::as_raw(self), hndprocess.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).IsLoaded)(windows_core::Interface::as_raw(self), core::mem::transmute(hndprocess), &mut result__).map(|| result__) } pub unsafe fn LoadErrorString(&self, iresourceid: u32, pwzbuffer: windows_core::PWSTR, pcchbuffer: *mut u32, ilocaleid: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).LoadErrorString)(windows_core::Interface::as_raw(self), core::mem::transmute(iresourceid), core::mem::transmute(pwzbuffer), core::mem::transmute(pcchbuffer), core::mem::transmute(ilocaleid)).ok() @@ -1970,8 +1956,8 @@ impl ICLRRuntimeInfo { { (windows_core::Interface::vtable(self).SetDefaultStartupFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstartupflags), pwzhostconfigfile.param().abi()).ok() } - pub unsafe fn GetDefaultStartupFlags(&self, pdwstartupflags: *mut u32, pwzhostconfigfile: windows_core::PWSTR, pcchhostconfigfile: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDefaultStartupFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstartupflags), core::mem::transmute(pwzhostconfigfile), core::mem::transmute(pcchhostconfigfile)).ok() + pub unsafe fn GetDefaultStartupFlags(&self, pdwstartupflags: *mut u32, pwzhostconfigfile: Option, pcchhostconfigfile: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDefaultStartupFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstartupflags), core::mem::transmute(pwzhostconfigfile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchhostconfigfile)).ok() } pub unsafe fn BindAsLegacyV2Runtime(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BindAsLegacyV2Runtime)(windows_core::Interface::as_raw(self)).ok() @@ -2135,11 +2121,8 @@ impl ICLRStrongName { { (windows_core::Interface::vtable(self).GetHashFromFileW)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), core::mem::transmute(pihashalg), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pchhash)).ok() } - pub unsafe fn GetHashFromHandle(&self, hfile: P0, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetHashFromHandle)(windows_core::Interface::as_raw(self), hfile.param().abi(), core::mem::transmute(pihashalg), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pchhash)).ok() + pub unsafe fn GetHashFromHandle(&self, hfile: super::super::Foundation::HANDLE, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetHashFromHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hfile), core::mem::transmute(pihashalg), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pchhash)).ok() } pub unsafe fn StrongNameCompareAssemblies(&self, pwzassembly1: P0, pwzassembly2: P1) -> windows_core::Result where @@ -2669,11 +2652,8 @@ impl windows_core::RuntimeName for ICLRSyncManager {} windows_core::imp::define_interface!(ICLRTask, ICLRTask_Vtbl, 0x28e66a4a_9906_4225_b231_9187c3eb8611); windows_core::imp::interface_hierarchy!(ICLRTask, windows_core::IUnknown); impl ICLRTask { - pub unsafe fn SwitchIn(&self, threadhandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SwitchIn)(windows_core::Interface::as_raw(self), threadhandle.param().abi()).ok() + pub unsafe fn SwitchIn(&self, threadhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SwitchIn)(windows_core::Interface::as_raw(self), core::mem::transmute(threadhandle)).ok() } pub unsafe fn SwitchOut(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SwitchOut)(windows_core::Interface::as_raw(self)).ok() @@ -3094,12 +3074,9 @@ impl ICorRuntimeHost { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LocksHeldByLogicalThread)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn MapFile(&self, hfile: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn MapFile(&self, hfile: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).MapFile)(windows_core::Interface::as_raw(self), hfile.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).MapFile)(windows_core::Interface::as_raw(self), core::mem::transmute(hfile), &mut result__).map(|| result__) } pub unsafe fn GetConfiguration(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3381,21 +3358,16 @@ windows_core::imp::define_interface!(ICorThreadpool, ICorThreadpool_Vtbl, 0x8468 windows_core::imp::interface_hierarchy!(ICorThreadpool, windows_core::IUnknown); impl ICorThreadpool { #[cfg(feature = "Win32_System_Threading")] - pub unsafe fn CorRegisterWaitForSingleObject(&self, phnewwaitobject: *const super::super::Foundation::HANDLE, hwaitobject: P1, callback: super::Threading::WAITORTIMERCALLBACK, context: *const core::ffi::c_void, timeout: u32, executeonlyonce: P5) -> windows_core::Result + pub unsafe fn CorRegisterWaitForSingleObject(&self, phnewwaitobject: *const super::super::Foundation::HANDLE, hwaitobject: super::super::Foundation::HANDLE, callback: super::Threading::WAITORTIMERCALLBACK, context: *const core::ffi::c_void, timeout: u32, executeonlyonce: P5) -> windows_core::Result where - P1: windows_core::Param, P5: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CorRegisterWaitForSingleObject)(windows_core::Interface::as_raw(self), core::mem::transmute(phnewwaitobject), hwaitobject.param().abi(), core::mem::transmute(callback), core::mem::transmute(context), core::mem::transmute(timeout), executeonlyonce.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CorRegisterWaitForSingleObject)(windows_core::Interface::as_raw(self), core::mem::transmute(phnewwaitobject), core::mem::transmute(hwaitobject), core::mem::transmute(callback), core::mem::transmute(context), core::mem::transmute(timeout), executeonlyonce.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn CorUnregisterWait(&self, hwaitobject: P0, completionevent: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn CorUnregisterWait(&self, hwaitobject: super::super::Foundation::HANDLE, completionevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CorUnregisterWait)(windows_core::Interface::as_raw(self), hwaitobject.param().abi(), completionevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CorUnregisterWait)(windows_core::Interface::as_raw(self), core::mem::transmute(hwaitobject), core::mem::transmute(completionevent), &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_Threading")] pub unsafe fn CorQueueUserWorkItem(&self, function: super::Threading::LPTHREAD_START_ROUTINE, context: *const core::ffi::c_void, executeonlyonce: P2) -> windows_core::Result @@ -3410,27 +3382,17 @@ impl ICorThreadpool { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CorCreateTimer)(windows_core::Interface::as_raw(self), core::mem::transmute(phnewtimer), core::mem::transmute(callback), core::mem::transmute(parameter), core::mem::transmute(duetime), core::mem::transmute(period), &mut result__).map(|| result__) } - pub unsafe fn CorChangeTimer(&self, timer: P0, duetime: u32, period: u32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CorChangeTimer(&self, timer: super::super::Foundation::HANDLE, duetime: u32, period: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CorChangeTimer)(windows_core::Interface::as_raw(self), timer.param().abi(), core::mem::transmute(duetime), core::mem::transmute(period), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CorChangeTimer)(windows_core::Interface::as_raw(self), core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period), &mut result__).map(|| result__) } - pub unsafe fn CorDeleteTimer(&self, timer: P0, completionevent: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn CorDeleteTimer(&self, timer: super::super::Foundation::HANDLE, completionevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CorDeleteTimer)(windows_core::Interface::as_raw(self), timer.param().abi(), completionevent.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CorDeleteTimer)(windows_core::Interface::as_raw(self), core::mem::transmute(timer), core::mem::transmute(completionevent), &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_IO")] - pub unsafe fn CorBindIoCompletionCallback(&self, filehandle: P0, callback: super::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CorBindIoCompletionCallback)(windows_core::Interface::as_raw(self), filehandle.param().abi(), core::mem::transmute(callback)).ok() + pub unsafe fn CorBindIoCompletionCallback(&self, filehandle: super::super::Foundation::HANDLE, callback: super::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CorBindIoCompletionCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(filehandle), core::mem::transmute(callback)).ok() } #[cfg(feature = "Win32_System_Threading")] pub unsafe fn CorCallOrQueueUserWorkItem(&self, function: super::Threading::LPTHREAD_START_ROUTINE, context: *const core::ffi::c_void) -> windows_core::Result { @@ -4185,11 +4147,8 @@ impl IHostIoCompletionManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateIoCompletionPort)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn CloseIoCompletionPort(&self, hport: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CloseIoCompletionPort)(windows_core::Interface::as_raw(self), hport.param().abi()).ok() + pub unsafe fn CloseIoCompletionPort(&self, hport: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CloseIoCompletionPort)(windows_core::Interface::as_raw(self), core::mem::transmute(hport)).ok() } pub unsafe fn SetMaxThreads(&self, dwmaxiocompletionthreads: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetMaxThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(dwmaxiocompletionthreads)).ok() @@ -4215,12 +4174,8 @@ impl IHostIoCompletionManager { pub unsafe fn InitializeHostOverlapped(&self, pvoverlapped: *const core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeHostOverlapped)(windows_core::Interface::as_raw(self), core::mem::transmute(pvoverlapped)).ok() } - pub unsafe fn Bind(&self, hport: P0, hhandle: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), hport.param().abi(), hhandle.param().abi()).ok() + pub unsafe fn Bind(&self, hport: super::super::Foundation::HANDLE, hhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), core::mem::transmute(hport), core::mem::transmute(hhandle)).ok() } pub unsafe fn SetMinThreads(&self, dwminiocompletionthreads: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetMinThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(dwminiocompletionthreads)).ok() @@ -4683,11 +4638,8 @@ impl windows_core::RuntimeName for IHostSecurityContext {} windows_core::imp::define_interface!(IHostSecurityManager, IHostSecurityManager_Vtbl, 0x75ad2468_a349_4d02_a764_76a68aee0c4f); windows_core::imp::interface_hierarchy!(IHostSecurityManager, windows_core::IUnknown); impl IHostSecurityManager { - pub unsafe fn ImpersonateLoggedOnUser(&self, htoken: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ImpersonateLoggedOnUser)(windows_core::Interface::as_raw(self), htoken.param().abi()).ok() + pub unsafe fn ImpersonateLoggedOnUser(&self, htoken: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ImpersonateLoggedOnUser)(windows_core::Interface::as_raw(self), core::mem::transmute(htoken)).ok() } pub unsafe fn RevertToSelf(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RevertToSelf)(windows_core::Interface::as_raw(self)).ok() @@ -4699,11 +4651,8 @@ impl IHostSecurityManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).OpenThreadToken)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdesiredaccess), bopenasself.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn SetThreadToken(&self, htoken: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetThreadToken)(windows_core::Interface::as_raw(self), htoken.param().abi()).ok() + pub unsafe fn SetThreadToken(&self, htoken: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetThreadToken)(windows_core::Interface::as_raw(self), core::mem::transmute(htoken)).ok() } pub unsafe fn GetSecurityContext(&self, econtexttype: EContextType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 1085781eb3..c47632897a 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 @@ -449,7 +449,7 @@ impl ICallIndirect { (windows_core::Interface::vtable(self).GetStackSize)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pfderivesfromidispatch.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcmethod.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pwszinterface)).ok() + (windows_core::Interface::vtable(self).GetIID)(windows_core::Interface::as_raw(self), core::mem::transmute(piid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfderivesfromidispatch.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcmethod.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 a5dc15c7af..7928b67b8c 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 P2: 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(core::mem::transmute(pulsize), core::mem::transmute(riid), punk.param().abi(), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), core::mem::transmute(mshlflags)).ok() + CoGetMarshalSizeMax(core::mem::transmute(pulsize), core::mem::transmute(riid), punk.param().abi(), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(mshlflags)).ok() } #[inline] pub unsafe fn CoGetStandardMarshal(riid: *const windows_core::GUID, punk: P1, 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(core::mem::transmute(riid), punk.param().abi(), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), core::mem::transmute(mshlflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CoGetStandardMarshal(core::mem::transmute(riid), punk.param().abi(), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 P2: 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(), core::mem::transmute(riid), punk.param().abi(), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), core::mem::transmute(mshlflags)).ok() + CoMarshalInterface(pstm.param().abi(), core::mem::transmute(riid), punk.param().abi(), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(mshlflags)).ok() } #[inline] pub unsafe fn CoReleaseMarshalData(pstm: P0) -> windows_core::Result<()> @@ -658,17 +658,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), core::mem::transmute(riid), core::mem::transmute(pv.unwrap_or(core::ptr::null())), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), core::mem::transmute(mshlflags), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetUnmarshalClass)(windows_core::Interface::as_raw(self), core::mem::transmute(riid), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(riid), core::mem::transmute(pv.unwrap_or(core::ptr::null())), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), core::mem::transmute(mshlflags), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetMarshalSizeMax)(windows_core::Interface::as_raw(self), core::mem::transmute(riid), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(riid), core::mem::transmute(pv.unwrap_or(core::ptr::null())), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), core::mem::transmute(mshlflags)).ok() + (windows_core::Interface::vtable(self).MarshalInterface)(windows_core::Interface::as_raw(self), pstm.param().abi(), core::mem::transmute(riid), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs index 57b7e0656f..658589cfef 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 P5: 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(core::ptr::null())), core::mem::transmute(pclsid.unwrap_or(core::ptr::null())), punkouter.param().abi(), core::mem::transmute(dwclsctx), core::mem::transmute(grfmode), pwszname.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() + CoGetInstanceFromFile(core::mem::transmute(pserverinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pclsid.unwrap_or(core::mem::zeroed())), punkouter.param().abi(), core::mem::transmute(dwclsctx), core::mem::transmute(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: P2, dwclsctx: super::CLSCTX, pstg: P4, presults: &mut [super::MULTI_QI]) -> windows_core::Result<()> @@ -20,7 +20,7 @@ where P4: 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(core::ptr::null())), core::mem::transmute(pclsid.unwrap_or(core::ptr::null())), punkouter.param().abi(), core::mem::transmute(dwclsctx), pstg.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() + CoGetInstanceFromIStorage(core::mem::transmute(pserverinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pclsid.unwrap_or(core::mem::zeroed())), punkouter.param().abi(), core::mem::transmute(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 @@ -33,24 +33,22 @@ where CoGetInterfaceAndReleaseStream(pstm.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn CreateILockBytesOnHGlobal(hglobal: P0, fdeleteonrelease: P1) -> windows_core::Result +pub unsafe fn CreateILockBytesOnHGlobal(hglobal: Option, fdeleteonrelease: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CreateILockBytesOnHGlobal(hglobal : super::super::super::Foundation:: HGLOBAL, fdeleteonrelease : super::super::super::Foundation:: BOOL, pplkbyt : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateILockBytesOnHGlobal(hglobal.param().abi(), fdeleteonrelease.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateILockBytesOnHGlobal(core::mem::transmute(hglobal.unwrap_or(core::mem::zeroed())), fdeleteonrelease.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn CreateStreamOnHGlobal(hglobal: P0, fdeleteonrelease: P1) -> windows_core::Result +pub unsafe fn CreateStreamOnHGlobal(hglobal: super::super::super::Foundation::HGLOBAL, fdeleteonrelease: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CreateStreamOnHGlobal(hglobal : super::super::super::Foundation:: HGLOBAL, fdeleteonrelease : super::super::super::Foundation:: BOOL, ppstm : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateStreamOnHGlobal(hglobal.param().abi(), fdeleteonrelease.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateStreamOnHGlobal(core::mem::transmute(hglobal), fdeleteonrelease.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn FmtIdToPropStgName(pfmtid: *const windows_core::GUID, oszname: windows_core::PWSTR) -> windows_core::Result<()> { @@ -168,13 +166,10 @@ pub unsafe fn InitPropVariantFromPropVariantVectorElem(propvarin: *const PROPVAR } #[cfg(feature = "Win32_System_Variant")] #[inline] -pub unsafe fn InitPropVariantFromResource(hinst: P0, id: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn InitPropVariantFromResource(hinst: super::super::super::Foundation::HINSTANCE, id: u32) -> windows_core::Result { windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromResource(hinst : super::super::super::Foundation:: HINSTANCE, id : u32, ppropvar : *mut PROPVARIANT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - InitPropVariantFromResource(hinst.param().abi(), core::mem::transmute(id), &mut result__).map(|| core::mem::transmute(result__)) + InitPropVariantFromResource(core::mem::transmute(hinst), core::mem::transmute(id), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -683,7 +678,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(), core::mem::transmute(pcf), core::mem::transmute(lplpszusertype.unwrap_or(core::ptr::null_mut()))).ok() + ReadFmtUserTypeStg(pstg.param().abi(), core::mem::transmute(pcf), core::mem::transmute(lplpszusertype.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetConvertStg(pstg: P0, fconvert: P1) -> windows_core::Result<()> @@ -710,16 +705,16 @@ where P5: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgConvertVariantToProperty(pvar : *const 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), core::mem::transmute(codepage), core::mem::transmute(pprop.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcb), core::mem::transmute(pid), freserved.param().abi(), core::mem::transmute(pcindirect.unwrap_or(core::ptr::null_mut()))) + StgConvertVariantToProperty(core::mem::transmute(pvar), core::mem::transmute(codepage), core::mem::transmute(pprop.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcb), core::mem::transmute(pid), freserved.param().abi(), core::mem::transmute(pcindirect.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn StgCreateDocfile(pwcsname: P0, grfmode: super::STGM, reserved: u32) -> windows_core::Result +pub unsafe fn StgCreateDocfile(pwcsname: P0, grfmode: super::STGM, reserved: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgCreateDocfile(pwcsname : windows_core::PCWSTR, grfmode : super:: STGM, reserved : u32, ppstgopen : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - StgCreateDocfile(pwcsname.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(reserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgCreateDocfile(pwcsname.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn StgCreateDocfileOnILockBytes(plkbyt: P0, grfmode: super::STGM, reserved: u32) -> windows_core::Result @@ -731,32 +726,31 @@ where StgCreateDocfileOnILockBytes(plkbyt.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(reserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn StgCreatePropSetStg(pstorage: P0, dwreserved: u32) -> windows_core::Result +pub unsafe fn StgCreatePropSetStg(pstorage: P0, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgCreatePropSetStg(pstorage : * mut core::ffi::c_void, dwreserved : u32, pppropsetstg : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - StgCreatePropSetStg(pstorage.param().abi(), core::mem::transmute(dwreserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgCreatePropSetStg(pstorage.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn StgCreatePropStg(punk: P0, fmtid: *const windows_core::GUID, pclsid: *const windows_core::GUID, grfflags: u32, dwreserved: u32) -> windows_core::Result +pub unsafe fn StgCreatePropStg(punk: P0, fmtid: *const windows_core::GUID, pclsid: *const windows_core::GUID, grfflags: u32, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgCreatePropStg(punk : * mut core::ffi::c_void, fmtid : *const windows_core::GUID, pclsid : *const windows_core::GUID, grfflags : u32, dwreserved : u32, pppropstg : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - StgCreatePropStg(punk.param().abi(), core::mem::transmute(fmtid), core::mem::transmute(pclsid), core::mem::transmute(grfflags), core::mem::transmute(dwreserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgCreatePropStg(punk.param().abi(), core::mem::transmute(fmtid), core::mem::transmute(pclsid), core::mem::transmute(grfflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn StgCreateStorageEx(pwcsname: P0, grfmode: super::STGM, stgfmt: STGFMT, grfattrs: u32, pstgoptions: Option<*mut STGOPTIONS>, psecuritydescriptor: P5, riid: *const windows_core::GUID, ppobjectopen: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn StgCreateStorageEx(pwcsname: P0, grfmode: super::STGM, stgfmt: STGFMT, grfattrs: u32, pstgoptions: Option<*mut STGOPTIONS>, psecuritydescriptor: Option, riid: *const windows_core::GUID, ppobjectopen: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, - P5: 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(), core::mem::transmute(grfmode), core::mem::transmute(stgfmt), core::mem::transmute(grfattrs), core::mem::transmute(pstgoptions.unwrap_or(core::ptr::null_mut())), psecuritydescriptor.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppobjectopen)).ok() + StgCreateStorageEx(pwcsname.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(stgfmt), core::mem::transmute(grfattrs), core::mem::transmute(pstgoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(riid), core::mem::transmute(ppobjectopen)).ok() } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -818,13 +812,13 @@ where StgOpenLayoutDocfile(pwcsdfname.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(reserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn StgOpenPropStg(punk: P0, fmtid: *const windows_core::GUID, grfflags: u32, dwreserved: u32) -> windows_core::Result +pub unsafe fn StgOpenPropStg(punk: P0, fmtid: *const windows_core::GUID, grfflags: u32, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgOpenPropStg(punk : * mut core::ffi::c_void, fmtid : *const windows_core::GUID, grfflags : u32, dwreserved : u32, pppropstg : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - StgOpenPropStg(punk.param().abi(), core::mem::transmute(fmtid), core::mem::transmute(grfflags), core::mem::transmute(dwreserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgOpenPropStg(punk.param().abi(), core::mem::transmute(fmtid), core::mem::transmute(grfflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn StgOpenStorage(pwcsname: P0, pstgpriority: P1, grfmode: super::STGM, snbexclude: Option<*const *const u16>, reserved: u32) -> windows_core::Result @@ -834,32 +828,31 @@ 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(), core::mem::transmute(grfmode), core::mem::transmute(snbexclude.unwrap_or(core::ptr::null())), core::mem::transmute(reserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgOpenStorage(pwcsname.param().abi(), pstgpriority.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(snbexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn StgOpenStorageEx(pwcsname: P0, grfmode: super::STGM, stgfmt: STGFMT, grfattrs: u32, pstgoptions: Option<*mut STGOPTIONS>, psecuritydescriptor: P5, riid: *const windows_core::GUID, ppobjectopen: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn StgOpenStorageEx(pwcsname: P0, grfmode: super::STGM, stgfmt: STGFMT, grfattrs: u32, pstgoptions: Option<*mut STGOPTIONS>, psecuritydescriptor: Option, riid: *const windows_core::GUID, ppobjectopen: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, - P5: 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(), core::mem::transmute(grfmode), core::mem::transmute(stgfmt), core::mem::transmute(grfattrs), core::mem::transmute(pstgoptions.unwrap_or(core::ptr::null_mut())), psecuritydescriptor.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppobjectopen)).ok() + StgOpenStorageEx(pwcsname.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(stgfmt), core::mem::transmute(grfattrs), core::mem::transmute(pstgoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(riid), core::mem::transmute(ppobjectopen)).ok() } #[inline] -pub unsafe fn StgOpenStorageOnILockBytes(plkbyt: P0, pstgpriority: P1, grfmode: super::STGM, snbexclude: Option<*const *const u16>, reserved: u32) -> windows_core::Result +pub unsafe fn StgOpenStorageOnILockBytes(plkbyt: P0, pstgpriority: P1, grfmode: super::STGM, snbexclude: Option<*const *const u16>, reserved: Option) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, { 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(), core::mem::transmute(grfmode), core::mem::transmute(snbexclude.unwrap_or(core::ptr::null())), core::mem::transmute(reserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgOpenStorageOnILockBytes(plkbyt.param().abi(), pstgpriority.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(snbexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), &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 { +pub unsafe fn StgPropertyLengthAsVariant(pprop: *const SERIALIZEDPROPERTYVALUE, cbprop: u32, codepage: u16, breserved: Option) -> u32 { windows_targets::link!("ole32.dll" "system" fn StgPropertyLengthAsVariant(pprop : *const SERIALIZEDPROPERTYVALUE, cbprop : u32, codepage : u16, breserved : u8) -> u32); - StgPropertyLengthAsVariant(core::mem::transmute(pprop), core::mem::transmute(cbprop), core::mem::transmute(codepage), core::mem::transmute(breserved)) + StgPropertyLengthAsVariant(core::mem::transmute(pprop), core::mem::transmute(cbprop), core::mem::transmute(codepage), core::mem::transmute(breserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -873,7 +866,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(core::ptr::null())), core::mem::transmute(patime.unwrap_or(core::ptr::null())), core::mem::transmute(pmtime.unwrap_or(core::ptr::null()))).ok() + StgSetTimes(lpszname.param().abi(), core::mem::transmute(pctime.unwrap_or(core::mem::zeroed())), core::mem::transmute(patime.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmtime.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -1314,7 +1307,7 @@ windows_core::imp::define_interface!(IEnumSTATPROPSETSTG, IEnumSTATPROPSETSTG_Vt 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)) @@ -1383,7 +1376,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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)) @@ -1457,7 +1450,7 @@ windows_core::imp::define_interface!(IEnumSTATSTG, IEnumSTATSTG_Vtbl, 0x0000000d 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -1602,8 +1595,8 @@ impl windows_core::RuntimeName for IFillLockBytes {} windows_core::imp::define_interface!(ILayoutStorage, ILayoutStorage_Vtbl, 0x0e6d4d90_6738_11cf_9608_00aa00680db4); windows_core::imp::interface_hierarchy!(ILayoutStorage, windows_core::IUnknown); impl ILayoutStorage { - pub unsafe fn LayoutScript(&self, pstoragelayout: &[super::StorageLayout], glfinterleavedflag: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).LayoutScript)(windows_core::Interface::as_raw(self), core::mem::transmute(pstoragelayout.as_ptr()), pstoragelayout.len().try_into().unwrap(), core::mem::transmute(glfinterleavedflag)).ok() + pub unsafe fn LayoutScript(&self, pstoragelayout: &[super::StorageLayout], glfinterleavedflag: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LayoutScript)(windows_core::Interface::as_raw(self), core::mem::transmute(pstoragelayout.as_ptr()), pstoragelayout.len().try_into().unwrap(), core::mem::transmute(glfinterleavedflag.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn BeginMonitor(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BeginMonitor)(windows_core::Interface::as_raw(self)).ok() @@ -1680,10 +1673,10 @@ windows_core::imp::define_interface!(ILockBytes, ILockBytes_Vtbl, 0x0000000a_000 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), core::mem::transmute(uloffset), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadAt)(windows_core::Interface::as_raw(self), core::mem::transmute(uloffset), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(uloffset), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteAt)(windows_core::Interface::as_raw(self), core::mem::transmute(uloffset), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Flush(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() @@ -2368,7 +2361,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(core::ptr::null())), core::mem::transmute(grfmode), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(grfmode), core::mem::transmute(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 @@ -2389,7 +2382,7 @@ impl IStorage { where P3: 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(core::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::mem::zeroed())), pstgdest.param().abi()).ok() } pub unsafe fn MoveElementTo(&self, pwcsname: P0, pstgdest: P1, pwcsnewname: P2, grfflags: STGMOVE) -> windows_core::Result<()> where @@ -2405,9 +2398,9 @@ impl IStorage { pub unsafe fn Revert(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Revert)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn EnumElements(&self, reserved1: u32, reserved2: Option<*const core::ffi::c_void>, reserved3: u32) -> windows_core::Result { + pub unsafe fn EnumElements(&self, reserved1: Option, reserved2: Option<*const core::ffi::c_void>, reserved3: Option) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumElements)(windows_core::Interface::as_raw(self), core::mem::transmute(reserved1), core::mem::transmute(reserved2.unwrap_or(core::ptr::null())), core::mem::transmute(reserved3), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumElements)(windows_core::Interface::as_raw(self), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved3.unwrap_or(core::mem::zeroed())), &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/UI/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/UI/mod.rs index 8e4a792a60..e62ece1930 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/UI/mod.rs @@ -2,12 +2,8 @@ windows_core::imp::define_interface!(IDummyHICONIncluder, IDummyHICONIncluder_Vt windows_core::imp::interface_hierarchy!(IDummyHICONIncluder, windows_core::IUnknown); impl IDummyHICONIncluder { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] - pub unsafe fn Dummy(&self, h1: P0, h2: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Dummy)(windows_core::Interface::as_raw(self), h1.param().abi(), h2.param().abi()).ok() + pub unsafe fn Dummy(&self, h1: super::super::super::UI::WindowsAndMessaging::HICON, h2: super::super::super::Graphics::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Dummy)(windows_core::Interface::as_raw(self), core::mem::transmute(h1), core::mem::transmute(h2)).ok() } } #[repr(C)] 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 0ed4e23df4..e49d2ecfff 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,34 +6,34 @@ where P5: 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(core::mem::transmute(rclassid), szcode.param().abi(), core::mem::transmute(dwfileversionms), core::mem::transmute(dwfileversionls), sztype.param().abi(), pbindctx.param().abi(), core::mem::transmute(dwclscontext), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() + CoGetClassObjectFromURL(core::mem::transmute(rclassid), szcode.param().abi(), core::mem::transmute(dwfileversionms), core::mem::transmute(dwfileversionls), sztype.param().abi(), pbindctx.param().abi(), core::mem::transmute(dwclscontext), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() } #[inline] -pub unsafe fn CoInternetCombineIUri(pbaseuri: P0, prelativeuri: P1, dwcombineflags: u32, ppcombineduri: *mut Option, dwreserved: usize) -> windows_core::Result<()> +pub unsafe fn CoInternetCombineIUri(pbaseuri: P0, prelativeuri: P1, dwcombineflags: u32, ppcombineduri: *mut Option, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetCombineIUri(pbaseuri : * mut core::ffi::c_void, prelativeuri : * mut core::ffi::c_void, dwcombineflags : u32, ppcombineduri : *mut * mut core::ffi::c_void, dwreserved : usize) -> windows_core::HRESULT); - CoInternetCombineIUri(pbaseuri.param().abi(), prelativeuri.param().abi(), core::mem::transmute(dwcombineflags), core::mem::transmute(ppcombineduri), core::mem::transmute(dwreserved)).ok() + CoInternetCombineIUri(pbaseuri.param().abi(), prelativeuri.param().abi(), core::mem::transmute(dwcombineflags), core::mem::transmute(ppcombineduri), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CoInternetCombineUrl(pwzbaseurl: P0, pwzrelativeurl: P1, dwcombineflags: u32, pszresult: &mut [u16], pcchresult: Option<*mut u32>, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn CoInternetCombineUrl(pwzbaseurl: P0, pwzrelativeurl: P1, dwcombineflags: u32, pszresult: &mut [u16], pcchresult: Option<*mut u32>, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, 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(), core::mem::transmute(dwcombineflags), core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), core::mem::transmute(pcchresult.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwreserved)).ok() + CoInternetCombineUrl(pwzbaseurl.param().abi(), pwzrelativeurl.param().abi(), core::mem::transmute(dwcombineflags), core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), core::mem::transmute(pcchresult.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CoInternetCombineUrlEx(pbaseuri: P0, pwzrelativeurl: P1, dwcombineflags: u32, ppcombineduri: *mut Option, dwreserved: usize) -> windows_core::Result<()> +pub unsafe fn CoInternetCombineUrlEx(pbaseuri: P0, pwzrelativeurl: P1, dwcombineflags: u32, ppcombineduri: *mut Option, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetCombineUrlEx(pbaseuri : * mut core::ffi::c_void, pwzrelativeurl : windows_core::PCWSTR, dwcombineflags : u32, ppcombineduri : *mut * mut core::ffi::c_void, dwreserved : usize) -> windows_core::HRESULT); - CoInternetCombineUrlEx(pbaseuri.param().abi(), pwzrelativeurl.param().abi(), core::mem::transmute(dwcombineflags), core::mem::transmute(ppcombineduri), core::mem::transmute(dwreserved)).ok() + CoInternetCombineUrlEx(pbaseuri.param().abi(), pwzrelativeurl.param().abi(), core::mem::transmute(dwcombineflags), core::mem::transmute(ppcombineduri), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CoInternetCompareUrl(pwzurl1: P0, pwzurl2: P1, dwflags: u32) -> windows_core::Result<()> @@ -69,20 +69,20 @@ where CoInternetGetProtocolFlags(pwzurl.param().abi(), core::mem::transmute(pdwflags), core::mem::transmute(dwreserved)).ok() } #[inline] -pub unsafe fn CoInternetGetSecurityUrl(pwszurl: P0, ppwszsecurl: *mut windows_core::PWSTR, psuaction: PSUACTION, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn CoInternetGetSecurityUrl(pwszurl: P0, ppwszsecurl: *mut windows_core::PWSTR, psuaction: PSUACTION, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetGetSecurityUrl(pwszurl : windows_core::PCWSTR, ppwszsecurl : *mut windows_core::PWSTR, psuaction : PSUACTION, dwreserved : u32) -> windows_core::HRESULT); - CoInternetGetSecurityUrl(pwszurl.param().abi(), core::mem::transmute(ppwszsecurl), core::mem::transmute(psuaction), core::mem::transmute(dwreserved)).ok() + CoInternetGetSecurityUrl(pwszurl.param().abi(), core::mem::transmute(ppwszsecurl), core::mem::transmute(psuaction), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CoInternetGetSecurityUrlEx(puri: P0, ppsecuri: *mut Option, psuaction: PSUACTION, dwreserved: usize) -> windows_core::Result<()> +pub unsafe fn CoInternetGetSecurityUrlEx(puri: P0, ppsecuri: *mut Option, psuaction: PSUACTION, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetGetSecurityUrlEx(puri : * mut core::ffi::c_void, ppsecuri : *mut * mut core::ffi::c_void, psuaction : PSUACTION, dwreserved : usize) -> windows_core::HRESULT); - CoInternetGetSecurityUrlEx(puri.param().abi(), core::mem::transmute(ppsecuri), core::mem::transmute(psuaction), core::mem::transmute(dwreserved)).ok() + CoInternetGetSecurityUrlEx(puri.param().abi(), core::mem::transmute(ppsecuri), core::mem::transmute(psuaction), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CoInternetGetSession(dwsessionmode: u32, ppiinternetsession: *mut Option, dwreserved: u32) -> windows_core::Result<()> { @@ -123,12 +123,12 @@ where CoInternetIsFeatureZoneElevationEnabled(szfromurl.param().abi(), sztourl.param().abi(), psecmgr.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CoInternetParseIUri(piuri: P0, parseaction: PARSEACTION, dwflags: u32, pwzresult: &mut [u16], pcchresult: *mut u32, dwreserved: usize) -> windows_core::Result<()> +pub unsafe fn CoInternetParseIUri(piuri: P0, parseaction: PARSEACTION, dwflags: u32, pwzresult: &mut [u16], pcchresult: *mut u32, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetParseIUri(piuri : * mut core::ffi::c_void, parseaction : PARSEACTION, dwflags : u32, pwzresult : windows_core::PWSTR, cchresult : u32, pcchresult : *mut u32, dwreserved : usize) -> windows_core::HRESULT); - CoInternetParseIUri(piuri.param().abi(), core::mem::transmute(parseaction), core::mem::transmute(dwflags), core::mem::transmute(pwzresult.as_ptr()), pwzresult.len().try_into().unwrap(), core::mem::transmute(pcchresult), core::mem::transmute(dwreserved)).ok() + CoInternetParseIUri(piuri.param().abi(), core::mem::transmute(parseaction), core::mem::transmute(dwflags), core::mem::transmute(pwzresult.as_ptr()), pwzresult.len().try_into().unwrap(), core::mem::transmute(pcchresult), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CoInternetParseUrl(pwzurl: P0, parseaction: PARSEACTION, dwflags: u32, pszresult: &mut [u16], pcchresult: *mut u32, dwreserved: u32) -> 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(), core::mem::transmute(queryoptions), core::mem::transmute(dwqueryflags), core::mem::transmute(pvbuffer), core::mem::transmute(cbbuffer), core::mem::transmute(pcbbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwreserved)).ok() + CoInternetQueryInfo(pwzurl.param().abi(), core::mem::transmute(queryoptions), core::mem::transmute(dwqueryflags), core::mem::transmute(pvbuffer), core::mem::transmute(cbbuffer), core::mem::transmute(pcbbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreserved)).ok() } #[inline] pub unsafe fn CoInternetSetFeatureEnabled(featureentry: INTERNETFEATURELIST, dwflags: u32, fenable: P2) -> windows_core::Result<()> @@ -232,12 +232,9 @@ where CreateURLMonikerEx2(pmkctx.param().abi(), puri.param().abi(), core::mem::transmute(ppmk), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn FaultInIEFeature(hwnd: P0, pclassspec: *const super::uCLSSPEC, pquery: Option<*mut super::QUERYCONTEXT>, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FaultInIEFeature(hwnd: super::super::super::Foundation::HWND, pclassspec: *const super::uCLSSPEC, pquery: Option<*mut super::QUERYCONTEXT>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(pclassspec), core::mem::transmute(pquery.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwflags)).ok() + FaultInIEFeature(core::mem::transmute(hwnd), core::mem::transmute(pclassspec), core::mem::transmute(pquery.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn FindMediaType(rgsztypes: P0) -> windows_core::Result @@ -258,14 +255,14 @@ where FindMediaTypeClass(pbc.param().abi(), sztype.param().abi(), core::mem::transmute(pclsid), core::mem::transmute(reserved)).ok() } #[inline] -pub unsafe fn FindMimeFromData(pbc: P0, pwzurl: P1, pbuffer: Option<*const core::ffi::c_void>, cbsize: u32, pwzmimeproposed: P4, dwmimeflags: u32, ppwzmimeout: *mut windows_core::PWSTR, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn FindMimeFromData(pbc: P0, pwzurl: P1, pbuffer: Option<*const core::ffi::c_void>, cbsize: u32, pwzmimeproposed: P4, dwmimeflags: u32, ppwzmimeout: *mut windows_core::PWSTR, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P4: 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(core::ptr::null())), core::mem::transmute(cbsize), pwzmimeproposed.param().abi(), core::mem::transmute(dwmimeflags), core::mem::transmute(ppwzmimeout), core::mem::transmute(dwreserved)).ok() + FindMimeFromData(pbc.param().abi(), pwzurl.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), pwzmimeproposed.param().abi(), core::mem::transmute(dwmimeflags), core::mem::transmute(ppwzmimeout), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn GetClassFileOrMime(pbc: P0, szfilename: P1, pbuffer: Option<*const core::ffi::c_void>, cbsize: u32, szmime: P4, dwreserved: u32) -> windows_core::Result @@ -276,7 +273,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(core::ptr::null())), core::mem::transmute(cbsize), szmime.param().abi(), core::mem::transmute(dwreserved), &mut result__).map(|| core::mem::transmute(result__)) + GetClassFileOrMime(pbc.param().abi(), szfilename.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), szmime.param().abi(), core::mem::transmute(dwreserved), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn GetClassURL(szurl: P0) -> windows_core::Result @@ -476,12 +473,9 @@ where RevokeFormatEnumerator(pbc.param().abi(), pefetc.param().abi()).ok() } #[inline] -pub unsafe fn SetAccessForIEAppContainer(hobject: P0, ieobjecttype: IEObjectType, dwaccessmask: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetAccessForIEAppContainer(hobject: super::super::super::Foundation::HANDLE, ieobjecttype: IEObjectType, dwaccessmask: u32) -> windows_core::Result<()> { windows_targets::link!("urlmon.dll" "system" fn SetAccessForIEAppContainer(hobject : super::super::super::Foundation:: HANDLE, ieobjecttype : IEObjectType, dwaccessmask : u32) -> windows_core::HRESULT); - SetAccessForIEAppContainer(hobject.param().abi(), core::mem::transmute(ieobjecttype), core::mem::transmute(dwaccessmask)).ok() + SetAccessForIEAppContainer(core::mem::transmute(hobject), core::mem::transmute(ieobjecttype), core::mem::transmute(dwaccessmask)).ok() } #[inline] pub unsafe fn SetSoftwareUpdateAdvertisementState(szdistunit: P0, dwadstate: u32, dwadvertisedversionms: u32, dwadvertisedversionls: u32) -> windows_core::Result<()> @@ -594,14 +588,14 @@ where URLOpenStreamW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), param3.param().abi()).ok() } #[inline] -pub unsafe fn UrlMkGetSessionOption(dwoption: u32, pbuffer: Option<*mut core::ffi::c_void>, dwbufferlength: u32, pdwbufferlengthout: *mut u32, dwreserved: u32) -> windows_core::Result<()> { +pub unsafe fn UrlMkGetSessionOption(dwoption: u32, pbuffer: Option<*mut core::ffi::c_void>, dwbufferlength: u32, pdwbufferlengthout: *mut u32, dwreserved: Option) -> 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(core::mem::transmute(dwoption), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwbufferlength), core::mem::transmute(pdwbufferlengthout), core::mem::transmute(dwreserved)).ok() + UrlMkGetSessionOption(core::mem::transmute(dwoption), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbufferlength), core::mem::transmute(pdwbufferlengthout), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn UrlMkSetSessionOption(dwoption: u32, pbuffer: Option<*const core::ffi::c_void>, dwbufferlength: u32, dwreserved: u32) -> windows_core::Result<()> { +pub unsafe fn UrlMkSetSessionOption(dwoption: u32, pbuffer: Option<*const core::ffi::c_void>, dwbufferlength: u32, dwreserved: Option) -> 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(core::mem::transmute(dwoption), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(dwbufferlength), core::mem::transmute(dwreserved)).ok() + UrlMkSetSessionOption(core::mem::transmute(dwoption), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbufferlength), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WriteHitLogging(lplogginginfo: *const HIT_LOGGING_INFO) -> super::super::super::Foundation::BOOL { @@ -1778,14 +1772,13 @@ impl core::ops::Deref for IInternetProtocolEx { } windows_core::imp::interface_hierarchy!(IInternetProtocolEx, windows_core::IUnknown, IInternetProtocolRoot, IInternetProtocol); impl IInternetProtocolEx { - pub unsafe fn StartEx(&self, puri: P0, poiprotsink: P1, poibindinfo: P2, grfpi: u32, dwreserved: P4) -> windows_core::Result<()> + pub unsafe fn StartEx(&self, puri: P0, poiprotsink: P1, poibindinfo: P2, grfpi: u32, dwreserved: super::super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).StartEx)(windows_core::Interface::as_raw(self), puri.param().abi(), poiprotsink.param().abi(), poibindinfo.param().abi(), core::mem::transmute(grfpi), dwreserved.param().abi()).ok() + (windows_core::Interface::vtable(self).StartEx)(windows_core::Interface::as_raw(self), puri.param().abi(), poiprotsink.param().abi(), poibindinfo.param().abi(), core::mem::transmute(grfpi), core::mem::transmute(dwreserved)).ok() } } #[repr(C)] @@ -1888,14 +1881,13 @@ impl windows_core::RuntimeName for IInternetProtocolInfo {} windows_core::imp::define_interface!(IInternetProtocolRoot, IInternetProtocolRoot_Vtbl, 0x79eac9e3_baf9_11ce_8c82_00aa004ba90b); windows_core::imp::interface_hierarchy!(IInternetProtocolRoot, windows_core::IUnknown); impl IInternetProtocolRoot { - pub unsafe fn Start(&self, szurl: P0, poiprotsink: P1, poibindinfo: P2, grfpi: u32, dwreserved: P4) -> windows_core::Result<()> + pub unsafe fn Start(&self, szurl: P0, poiprotsink: P1, poibindinfo: P2, grfpi: u32, dwreserved: super::super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), szurl.param().abi(), poiprotsink.param().abi(), poibindinfo.param().abi(), core::mem::transmute(grfpi), dwreserved.param().abi()).ok() + (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), szurl.param().abi(), poiprotsink.param().abi(), poibindinfo.param().abi(), core::mem::transmute(grfpi), core::mem::transmute(dwreserved)).ok() } pub unsafe fn Continue(&self, pprotocoldata: *const PROTOCOLDATA) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Continue)(windows_core::Interface::as_raw(self), core::mem::transmute(pprotocoldata)).ok() @@ -2269,7 +2261,7 @@ impl IInternetSecurityManagerEx2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).MapUrlToZoneEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), core::mem::transmute(pdwzone), core::mem::transmute(dwflags), core::mem::transmute(ppwszmappedurl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwoutflags.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).MapUrlToZoneEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), core::mem::transmute(pdwzone), core::mem::transmute(dwflags), core::mem::transmute(ppwszmappedurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwoutflags.unwrap_or(core::mem::zeroed()))).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 @@ -2556,13 +2548,12 @@ impl IInternetZoneManager { pub unsafe fn SetZoneActionPolicy(&self, dwzone: u32, dwaction: u32, ppolicy: &[u8], urlzonereg: URLZONEREG) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetZoneActionPolicy)(windows_core::Interface::as_raw(self), core::mem::transmute(dwzone), core::mem::transmute(dwaction), core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), core::mem::transmute(urlzonereg)).ok() } - pub unsafe fn PromptAction(&self, dwaction: u32, hwndparent: P1, pwszurl: P2, pwsztext: P3, dwpromptflags: u32) -> windows_core::Result<()> + pub unsafe fn PromptAction(&self, dwaction: u32, hwndparent: super::super::super::Foundation::HWND, pwszurl: P2, pwsztext: P3, dwpromptflags: u32) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).PromptAction)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaction), hwndparent.param().abi(), pwszurl.param().abi(), pwsztext.param().abi(), core::mem::transmute(dwpromptflags)).ok() + (windows_core::Interface::vtable(self).PromptAction)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaction), core::mem::transmute(hwndparent), pwszurl.param().abi(), pwsztext.param().abi(), core::mem::transmute(dwpromptflags)).ok() } pub unsafe fn LogAction(&self, dwaction: u32, pwszurl: P1, pwsztext: P2, dwlogflags: 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 b20d6e16ed..6ea012235d 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(core::ptr::null()))).ok() + CoAllowSetForegroundWindow(punk.param().abi(), core::mem::transmute(lpvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CoAllowUnmarshalerCLSID(clsid: *const windows_core::GUID) -> windows_core::Result<()> { @@ -117,7 +117,7 @@ where P1: 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(core::mem::transmute(clsid), punkouter.param().abi(), core::mem::transmute(dwclsctx), core::mem::transmute(pserverinfo.unwrap_or(core::ptr::null())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() + CoCreateInstanceEx(core::mem::transmute(clsid), punkouter.param().abi(), core::mem::transmute(dwclsctx), core::mem::transmute(pserverinfo.unwrap_or(core::mem::zeroed())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoCreateInstanceFromApp(clsid: *const windows_core::GUID, punkouter: P1, dwclsctx: CLSCTX, reserved: Option<*const core::ffi::c_void>, presults: &mut [MULTI_QI]) -> windows_core::Result<()> @@ -125,20 +125,17 @@ where P1: 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(core::mem::transmute(clsid), punkouter.param().abi(), core::mem::transmute(dwclsctx), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() + CoCreateInstanceFromApp(core::mem::transmute(clsid), punkouter.param().abi(), core::mem::transmute(dwclsctx), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } #[inline] -pub unsafe fn CoDecrementMTAUsage(cookie: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CoDecrementMTAUsage(cookie: CO_MTA_USAGE_COOKIE) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoDecrementMTAUsage(cookie : CO_MTA_USAGE_COOKIE) -> windows_core::HRESULT); - CoDecrementMTAUsage(cookie.param().abi()).ok() + CoDecrementMTAUsage(core::mem::transmute(cookie)).ok() } #[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(core::ptr::null()))).ok() + CoDisableCallCancellation(core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CoDisconnectContext(dwtimeout: u32) -> windows_core::Result<()> { @@ -146,12 +143,12 @@ pub unsafe fn CoDisconnectContext(dwtimeout: u32) -> windows_core::Result<()> { CoDisconnectContext(core::mem::transmute(dwtimeout)).ok() } #[inline] -pub unsafe fn CoDisconnectObject(punk: P0, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn CoDisconnectObject(punk: P0, dwreserved: Option) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoDisconnectObject(punk : * mut core::ffi::c_void, dwreserved : u32) -> windows_core::HRESULT); - CoDisconnectObject(punk.param().abi(), core::mem::transmute(dwreserved)).ok() + CoDisconnectObject(punk.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CoDosDateTimeToFileTime(ndosdate: u16, ndostime: u16, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { @@ -161,7 +158,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(core::ptr::null()))).ok() + CoEnableCallCancellation(core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CoFileTimeNow() -> windows_core::Result { @@ -180,12 +177,9 @@ pub unsafe fn CoFreeAllLibraries() { CoFreeAllLibraries() } #[inline] -pub unsafe fn CoFreeLibrary(hinst: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CoFreeLibrary(hinst: super::super::Foundation::HINSTANCE) { windows_targets::link!("ole32.dll" "system" fn CoFreeLibrary(hinst : super::super::Foundation:: HINSTANCE)); - CoFreeLibrary(hinst.param().abi()) + CoFreeLibrary(core::mem::transmute(hinst)) } #[inline] pub unsafe fn CoFreeUnusedLibraries() { @@ -193,9 +187,9 @@ pub unsafe fn CoFreeUnusedLibraries() { CoFreeUnusedLibraries() } #[inline] -pub unsafe fn CoFreeUnusedLibrariesEx(dwunloaddelay: u32, dwreserved: u32) { +pub unsafe fn CoFreeUnusedLibrariesEx(dwunloaddelay: u32, dwreserved: Option) { windows_targets::link!("ole32.dll" "system" fn CoFreeUnusedLibrariesEx(dwunloaddelay : u32, dwreserved : u32)); - CoFreeUnusedLibrariesEx(core::mem::transmute(dwunloaddelay), core::mem::transmute(dwreserved)) + CoFreeUnusedLibrariesEx(core::mem::transmute(dwunloaddelay), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CoGetApartmentType(papttype: *mut APTTYPE, paptqualifier: *mut APTTYPEQUALIFIER) -> windows_core::Result<()> { @@ -233,7 +227,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(core::mem::transmute(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__)) + CoGetClassObject(core::mem::transmute(rclsid), dwclscontext.0 as _, core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn CoGetContextToken() -> windows_core::Result { @@ -266,7 +260,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(core::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::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn CoGetObjectContext() -> windows_core::Result @@ -308,21 +302,18 @@ 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(core::ptr::null()))) + CoInitialize(core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), dwcoinit.0 as _) + CoInitializeEx(core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), dwcoinit.0 as _) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CoInitializeSecurity(psecdesc: P0, cauthsvc: i32, asauthsvc: Option<*const SOLE_AUTHENTICATION_SERVICE>, preserved1: Option<*const core::ffi::c_void>, dwauthnlevel: RPC_C_AUTHN_LEVEL, dwimplevel: RPC_C_IMP_LEVEL, pauthlist: Option<*const core::ffi::c_void>, dwcapabilities: EOLE_AUTHENTICATION_CAPABILITIES, preserved3: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CoInitializeSecurity(psecdesc: Option, cauthsvc: i32, asauthsvc: Option<*const SOLE_AUTHENTICATION_SERVICE>, preserved1: Option<*const core::ffi::c_void>, dwauthnlevel: RPC_C_AUTHN_LEVEL, dwimplevel: RPC_C_IMP_LEVEL, pauthlist: Option<*const core::ffi::c_void>, dwcapabilities: EOLE_AUTHENTICATION_CAPABILITIES, preserved3: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(cauthsvc), core::mem::transmute(asauthsvc.unwrap_or(core::ptr::null())), core::mem::transmute(preserved1.unwrap_or(core::ptr::null())), core::mem::transmute(dwauthnlevel), core::mem::transmute(dwimplevel), core::mem::transmute(pauthlist.unwrap_or(core::ptr::null())), dwcapabilities.0 as _, core::mem::transmute(preserved3.unwrap_or(core::ptr::null()))).ok() + CoInitializeSecurity(core::mem::transmute(psecdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(cauthsvc), core::mem::transmute(asauthsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwauthnlevel), core::mem::transmute(dwimplevel), core::mem::transmute(pauthlist.unwrap_or(core::mem::zeroed())), dwcapabilities.0 as _, core::mem::transmute(preserved3.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CoInstall(pbc: P0, dwflags: u32, pclassspec: *const uCLSSPEC, pquery: *const QUERYCONTEXT, pszcodebase: P4) -> windows_core::Result<()> @@ -381,7 +372,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(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() + CoQueryClientBlanket(core::mem::transmute(pauthnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthzsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pserverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(pimplevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprivs.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcapabilities.unwrap_or(core::mem::zeroed()))).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 +382,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(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())), + core::mem::transmute(pwauthnsvc.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthzsvc.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pserverprincname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthnlevel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pimplevel.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pauthinfo.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcapabilites.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -486,12 +477,9 @@ pub unsafe fn CoRevokeClassObject(dwregister: u32) -> windows_core::Result<()> { CoRevokeClassObject(core::mem::transmute(dwregister)).ok() } #[inline] -pub unsafe fn CoRevokeDeviceCatalog(cookie: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CoRevokeDeviceCatalog(cookie: CO_DEVICE_CATALOG_COOKIE) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoRevokeDeviceCatalog(cookie : CO_DEVICE_CATALOG_COOKIE) -> windows_core::HRESULT); - CoRevokeDeviceCatalog(cookie.param().abi()).ok() + CoRevokeDeviceCatalog(core::mem::transmute(cookie)).ok() } #[inline] pub unsafe fn CoRevokeInitializeSpy(ulicookie: u64) -> windows_core::Result<()> { @@ -518,7 +506,7 @@ where P3: 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(), core::mem::transmute(dwauthnsvc), core::mem::transmute(dwauthzsvc), pserverprincname.param().abi(), core::mem::transmute(dwauthnlevel), core::mem::transmute(dwimplevel), core::mem::transmute(pauthinfo.unwrap_or(core::ptr::null())), dwcapabilities.0 as _).ok() + CoSetProxyBlanket(pproxy.param().abi(), core::mem::transmute(dwauthnsvc), core::mem::transmute(dwauthzsvc), pserverprincname.param().abi(), core::mem::transmute(dwauthnlevel), core::mem::transmute(dwimplevel), core::mem::transmute(pauthinfo.unwrap_or(core::mem::zeroed())), dwcapabilities.0 as _).ok() } #[inline] pub unsafe fn CoSuspendClassObjects() -> windows_core::Result<()> { @@ -542,12 +530,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(core::ptr::null()))) + CoTaskMemFree(core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(cb)) + CoTaskMemRealloc(core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(cb)) } #[inline] pub unsafe fn CoTestCancel() -> windows_core::Result<()> { @@ -667,48 +655,47 @@ where CreatePointerMoniker(punk.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn CreateStdProgressIndicator(hwndparent: P0, psztitle: P1, pibsccaller: P2) -> windows_core::Result +pub unsafe fn CreateStdProgressIndicator(hwndparent: super::super::Foundation::HWND, psztitle: P1, pibsccaller: P2) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CreateStdProgressIndicator(hwndparent : super::super::Foundation:: HWND, psztitle : windows_core::PCWSTR, pibsccaller : * mut core::ffi::c_void, ppibsc : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateStdProgressIndicator(hwndparent.param().abi(), psztitle.param().abi(), pibsccaller.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateStdProgressIndicator(core::mem::transmute(hwndparent), psztitle.param().abi(), pibsccaller.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn CreateUri(pwzuri: P0, dwflags: URI_CREATE_FLAGS, dwreserved: usize) -> windows_core::Result +pub unsafe fn CreateUri(pwzuri: P0, dwflags: URI_CREATE_FLAGS, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CreateUri(pwzuri : windows_core::PCWSTR, dwflags : URI_CREATE_FLAGS, dwreserved : usize, ppuri : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateUri(pwzuri.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateUri(pwzuri.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn CreateUriFromMultiByteString(pszansiinputuri: P0, dwencodingflags: u32, dwcodepage: u32, dwcreateflags: u32, dwreserved: usize) -> windows_core::Result +pub unsafe fn CreateUriFromMultiByteString(pszansiinputuri: P0, dwencodingflags: u32, dwcodepage: u32, dwcreateflags: u32, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CreateUriFromMultiByteString(pszansiinputuri : windows_core::PCSTR, dwencodingflags : u32, dwcodepage : u32, dwcreateflags : u32, dwreserved : usize, ppuri : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateUriFromMultiByteString(pszansiinputuri.param().abi(), core::mem::transmute(dwencodingflags), core::mem::transmute(dwcodepage), core::mem::transmute(dwcreateflags), core::mem::transmute(dwreserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateUriFromMultiByteString(pszansiinputuri.param().abi(), core::mem::transmute(dwencodingflags), core::mem::transmute(dwcodepage), core::mem::transmute(dwcreateflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn CreateUriWithFragment(pwzuri: P0, pwzfragment: P1, dwflags: u32, dwreserved: usize) -> windows_core::Result +pub unsafe fn CreateUriWithFragment(pwzuri: P0, pwzfragment: P1, dwflags: u32, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CreateUriWithFragment(pwzuri : windows_core::PCWSTR, pwzfragment : windows_core::PCWSTR, dwflags : u32, dwreserved : usize, ppuri : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateUriWithFragment(pwzuri.param().abi(), pwzfragment.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateUriWithFragment(pwzuri.param().abi(), pwzfragment.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[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(core::ptr::null())), core::mem::transmute(pulreserved.unwrap_or(core::ptr::null())), core::mem::transmute(appshr)).ok() + DcomChannelSetHResult(core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pulreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(appshr)).ok() } #[inline] pub unsafe fn GetClassFile(szfilename: P0) -> windows_core::Result @@ -2826,7 +2813,7 @@ impl IAsyncRpcChannelBuffer { (windows_core::Interface::vtable(self).Receive)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(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), core::mem::transmute(pmsg), core::mem::transmute(pdwdestcontext), core::mem::transmute(ppvdestcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(pdwdestcontext), core::mem::transmute(ppvdestcontext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3894,14 +3881,14 @@ impl IClientSecurity { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), core::mem::transmute(pauthnsvc), core::mem::transmute(pauthzsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pserverprincname), core::mem::transmute(pauthnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pimplevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pauthinfo), core::mem::transmute(pcapabilites.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), core::mem::transmute(pauthnsvc), core::mem::transmute(pauthzsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pserverprincname), core::mem::transmute(pauthnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(pimplevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthinfo), core::mem::transmute(pcapabilites.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetBlanket(&self, pproxy: P0, dwauthnsvc: u32, dwauthzsvc: u32, pserverprincname: P3, 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, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).SetBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), core::mem::transmute(dwauthnsvc), core::mem::transmute(dwauthzsvc), pserverprincname.param().abi(), core::mem::transmute(dwauthnlevel), core::mem::transmute(dwimplevel), core::mem::transmute(pauthinfo.unwrap_or(core::ptr::null())), dwcapabilities.0 as _).ok() + (windows_core::Interface::vtable(self).SetBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), core::mem::transmute(dwauthnsvc), core::mem::transmute(dwauthzsvc), pserverprincname.param().abi(), core::mem::transmute(dwauthnlevel), core::mem::transmute(dwimplevel), core::mem::transmute(pauthinfo.unwrap_or(core::mem::zeroed())), dwcapabilities.0 as _).ok() } pub unsafe fn CopyProxy(&self, pproxy: P0) -> windows_core::Result where @@ -4369,11 +4356,11 @@ impl IDataAdviseHolder { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumAdvise)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SendOnDataChange(&self, pdataobject: P0, dwreserved: u32, advf: u32) -> windows_core::Result<()> + pub unsafe fn SendOnDataChange(&self, pdataobject: P0, dwreserved: Option, advf: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SendOnDataChange)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(advf)).ok() + (windows_core::Interface::vtable(self).SendOnDataChange)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(advf)).ok() } } #[repr(C)] @@ -4610,7 +4597,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), core::mem::transmute(dispidmember), core::mem::transmute(riid), core::mem::transmute(lcid), core::mem::transmute(wflags), core::mem::transmute(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() + (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), core::mem::transmute(dispidmember), core::mem::transmute(riid), core::mem::transmute(lcid), core::mem::transmute(wflags), core::mem::transmute(pdispparams), core::mem::transmute(pvarresult.unwrap_or(core::mem::zeroed())), core::mem::transmute(pexcepinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(puargerr.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -4975,7 +4962,7 @@ windows_core::imp::define_interface!(IEnumFORMATETC, IEnumFORMATETC_Vtbl, 0x0000 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -5043,7 +5030,7 @@ windows_core::imp::define_interface!(IEnumGUID, IEnumGUID_Vtbl, 0x0002e000_0000_ 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)) @@ -5111,7 +5098,7 @@ windows_core::imp::define_interface!(IEnumMoniker, IEnumMoniker_Vtbl, 0x00000102 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)) @@ -5179,7 +5166,7 @@ windows_core::imp::define_interface!(IEnumSTATDATA, IEnumSTATDATA_Vtbl, 0x000001 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -5247,7 +5234,7 @@ windows_core::imp::define_interface!(IEnumString, IEnumString_Vtbl, 0x00000101_0 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)) @@ -5315,7 +5302,7 @@ windows_core::imp::define_interface!(IEnumUnknown, IEnumUnknown_Vtbl, 0x00000100 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -5580,7 +5567,7 @@ windows_core::imp::define_interface!(IForegroundTransfer, IForegroundTransfer_Vt 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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AllowForegroundTransfer)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvreserved.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5857,11 +5844,8 @@ impl IMachineGlobalObjectTable { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clsid), identifier.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RevokeObject(&self, token: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RevokeObject)(windows_core::Interface::as_raw(self), token.param().abi()).ok() + pub unsafe fn RevokeObject(&self, token: MachineGlobalObjectTableRegistrationToken) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RevokeObject)(windows_core::Interface::as_raw(self), core::mem::transmute(token)).ok() } } #[repr(C)] @@ -5915,16 +5899,16 @@ impl IMalloc { (windows_core::Interface::vtable(self).Alloc)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(cb)) + (windows_core::Interface::vtable(self).Realloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null()))) + (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } 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(core::ptr::null()))) + (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } 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(core::ptr::null()))) + (windows_core::Interface::vtable(self).DidAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } pub unsafe fn HeapMinimize(&self) { (windows_core::Interface::vtable(self).HeapMinimize)(windows_core::Interface::as_raw(self)) @@ -7280,7 +7264,7 @@ impl IRpcChannelBuffer { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pmessage), core::mem::transmute(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), core::mem::transmute(pmessage), core::mem::transmute(pstatus.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SendReceive)(windows_core::Interface::as_raw(self), core::mem::transmute(pmessage), core::mem::transmute(pstatus.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FreeBuffer(&self, pmessage: *mut RPCOLEMESSAGE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pmessage)).ok() @@ -7407,7 +7391,7 @@ impl IRpcChannelBuffer3 { (windows_core::Interface::vtable(self).GetCallContext)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(riid), core::mem::transmute(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), core::mem::transmute(pmsg), core::mem::transmute(pdwdestcontext), core::mem::transmute(ppvdestcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(pdwdestcontext), core::mem::transmute(ppvdestcontext.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetState(&self, pmsg: *const RPCOLEMESSAGE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7986,10 +7970,10 @@ windows_core::imp::define_interface!(ISequentialStream, ISequentialStream_Vtbl, 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), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbread.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbread.unwrap_or(core::mem::zeroed()))) } 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), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -8023,7 +8007,7 @@ windows_core::imp::define_interface!(IServerSecurity, IServerSecurity_Vtbl, 0x00 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(core::ptr::null_mut())), core::mem::transmute(pauthzsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pserverprincname), core::mem::transmute(pauthnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pimplevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pprivs), core::mem::transmute(pcapabilities.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), core::mem::transmute(pauthnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthzsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pserverprincname), core::mem::transmute(pauthnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(pimplevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprivs), core::mem::transmute(pcapabilities.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ImpersonateClient(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ImpersonateClient)(windows_core::Interface::as_raw(self)).ok() @@ -8117,7 +8101,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), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetClassForHandler)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdestcontext), core::mem::transmute(pvdestcontext.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) } } #[repr(C)] @@ -8157,7 +8141,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), core::mem::transmute(dlibmove), core::mem::transmute(dworigin), core::mem::transmute(plibnewposition.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), core::mem::transmute(dlibmove), core::mem::transmute(dworigin), core::mem::transmute(plibnewposition.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetSize(&self, libnewsize: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(libnewsize)).ok() @@ -8166,7 +8150,7 @@ impl IStream { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), pstm.param().abi(), core::mem::transmute(cb), core::mem::transmute(pcbread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), pstm.param().abi(), core::mem::transmute(cb), core::mem::transmute(pcbread.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed()))).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() @@ -8375,8 +8359,8 @@ impl ISurrogateService { pub unsafe fn ApplicationFree(&self, rguidapplid: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ApplicationFree)(windows_core::Interface::as_raw(self), core::mem::transmute(rguidapplid)).ok() } - pub unsafe fn CatalogRefresh(&self, ulreserved: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CatalogRefresh)(windows_core::Interface::as_raw(self), core::mem::transmute(ulreserved)).ok() + pub unsafe fn CatalogRefresh(&self, ulreserved: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CatalogRefresh)(windows_core::Interface::as_raw(self), core::mem::transmute(ulreserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ProcessShutdown(&self, shutdowntype: ShutdownType) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ProcessShutdown)(windows_core::Interface::as_raw(self), core::mem::transmute(shutdowntype)).ok() @@ -8765,10 +8749,10 @@ impl ITypeInfo { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), core::mem::transmute(pvinstance), core::mem::transmute(memid), core::mem::transmute(wflags), core::mem::transmute(pdispparams), core::mem::transmute(pvarresult), core::mem::transmute(pexcepinfo), core::mem::transmute(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), core::mem::transmute(memid), core::mem::transmute(pbstrname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrdocstring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwhelpcontext), core::mem::transmute(pbstrhelpfile.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), core::mem::transmute(memid), core::mem::transmute(pbstrname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrdocstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwhelpcontext), core::mem::transmute(pbstrhelpfile.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(memid), core::mem::transmute(invkind), core::mem::transmute(pbstrdllname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pwordinal)).ok() + (windows_core::Interface::vtable(self).GetDllEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(memid), core::mem::transmute(invkind), core::mem::transmute(pbstrdllname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pwordinal)).ok() } pub unsafe fn GetRefTypeInfo(&self, hreftype: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9084,7 +9068,7 @@ impl ITypeInfo2 { (windows_core::Interface::vtable(self).GetImplTypeCustData)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(guid), &mut result__).map(|| core::mem::transmute(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), core::mem::transmute(memid), core::mem::transmute(lcid), core::mem::transmute(pbstrhelpstring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwhelpstringcontext), core::mem::transmute(pbstrhelpstringdll.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), core::mem::transmute(memid), core::mem::transmute(lcid), core::mem::transmute(pbstrhelpstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwhelpstringcontext), core::mem::transmute(pbstrhelpstringdll.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetAllCustData(&self) -> windows_core::Result { @@ -9378,7 +9362,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), core::mem::transmute(index), core::mem::transmute(pbstrname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrdocstring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwhelpcontext), core::mem::transmute(pbstrhelpfile.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(pbstrname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrdocstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwhelpcontext), core::mem::transmute(pbstrhelpfile.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lhashval), core::mem::transmute(pfname)).ok() @@ -9525,7 +9509,7 @@ impl ITypeLib2 { (windows_core::Interface::vtable(self).GetLibStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(pcuniquenames), core::mem::transmute(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), core::mem::transmute(index), core::mem::transmute(lcid), core::mem::transmute(pbstrhelpstring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwhelpstringcontext), core::mem::transmute(pbstrhelpstringdll.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(lcid), core::mem::transmute(pbstrhelpstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwhelpstringcontext), core::mem::transmute(pbstrhelpstringdll.unwrap_or(core::mem::zeroed()))).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 29c9d91240..ad3085812d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs @@ -1499,11 +1499,8 @@ impl ICOMAdminCatalog2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsApplicationInstanceDumpSupported)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn CreateServiceForApplication(&self, bstrapplicationidorname: &windows_core::BSTR, bstrservicename: &windows_core::BSTR, bstrstarttype: &windows_core::BSTR, bstrerrorcontrol: &windows_core::BSTR, bstrdependencies: &windows_core::BSTR, bstrrunas: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, bdesktopok: P7) -> windows_core::Result<()> - where - P7: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateServiceForApplication)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrapplicationidorname), core::mem::transmute_copy(bstrservicename), core::mem::transmute_copy(bstrstarttype), core::mem::transmute_copy(bstrerrorcontrol), core::mem::transmute_copy(bstrdependencies), core::mem::transmute_copy(bstrrunas), core::mem::transmute_copy(bstrpassword), bdesktopok.param().abi()).ok() + pub unsafe fn CreateServiceForApplication(&self, bstrapplicationidorname: &windows_core::BSTR, bstrservicename: &windows_core::BSTR, bstrstarttype: &windows_core::BSTR, bstrerrorcontrol: &windows_core::BSTR, bstrdependencies: &windows_core::BSTR, bstrrunas: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, bdesktopok: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateServiceForApplication)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrapplicationidorname), core::mem::transmute_copy(bstrservicename), core::mem::transmute_copy(bstrstarttype), core::mem::transmute_copy(bstrerrorcontrol), core::mem::transmute_copy(bstrdependencies), core::mem::transmute_copy(bstrrunas), core::mem::transmute_copy(bstrpassword), core::mem::transmute(bdesktopok)).ok() } pub unsafe fn DeleteServiceForApplication(&self, bstrapplicationidorname: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteServiceForApplication)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrapplicationidorname)).ok() @@ -4819,11 +4816,8 @@ impl windows_core::RuntimeName for IContextSecurityPerimeter {} windows_core::imp::define_interface!(IContextState, IContextState_Vtbl, 0x3c05e54b_a42a_11d2_afc4_00c04f8ee1c4); windows_core::imp::interface_hierarchy!(IContextState, windows_core::IUnknown); impl IContextState { - pub unsafe fn SetDeactivateOnReturn(&self, bdeactivate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDeactivateOnReturn)(windows_core::Interface::as_raw(self), bdeactivate.param().abi()).ok() + pub unsafe fn SetDeactivateOnReturn(&self, bdeactivate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDeactivateOnReturn)(windows_core::Interface::as_raw(self), core::mem::transmute(bdeactivate)).ok() } pub unsafe fn GetDeactivateOnReturn(&self, pbdeactivate: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeactivateOnReturn)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdeactivate)).ok() @@ -5177,11 +5171,8 @@ impl ICrmCompensatorVariants { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EndPrepareVariants)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn BeginCommitVariants(&self, brecovery: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).BeginCommitVariants)(windows_core::Interface::as_raw(self), brecovery.param().abi()).ok() + pub unsafe fn BeginCommitVariants(&self, brecovery: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).BeginCommitVariants)(windows_core::Interface::as_raw(self), core::mem::transmute(brecovery)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn CommitRecordVariants(&self, plogrecord: *const super::Variant::VARIANT) -> windows_core::Result { @@ -5191,11 +5182,8 @@ impl ICrmCompensatorVariants { pub unsafe fn EndCommitVariants(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndCommitVariants)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn BeginAbortVariants(&self, brecovery: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).BeginAbortVariants)(windows_core::Interface::as_raw(self), brecovery.param().abi()).ok() + pub unsafe fn BeginAbortVariants(&self, brecovery: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).BeginAbortVariants)(windows_core::Interface::as_raw(self), core::mem::transmute(brecovery)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AbortRecordVariants(&self, plogrecord: *const super::Variant::VARIANT) -> windows_core::Result { @@ -6172,7 +6160,7 @@ impl IGetAppTrackerData { (windows_core::Interface::vtable(self).GetApplicationProcesses)(windows_core::Interface::as_raw(self), core::mem::transmute(partitionid), core::mem::transmute(applicationid), core::mem::transmute(flags), core::mem::transmute(numapplicationprocesses), core::mem::transmute(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), core::mem::transmute(applicationinstanceid), core::mem::transmute(processid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetApplicationProcessDetails)(windows_core::Interface::as_raw(self), core::mem::transmute(applicationinstanceid), core::mem::transmute(processid), core::mem::transmute(flags), core::mem::transmute(summary.unwrap_or(core::mem::zeroed())), core::mem::transmute(statistics.unwrap_or(core::mem::zeroed())), core::mem::transmute(recycleinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(anycomponentshangmonitored.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(applicationinstanceid), core::mem::transmute(processid), core::mem::transmute(partitionid), core::mem::transmute(flags), core::mem::transmute(numapplicationsinprocess), core::mem::transmute(applications)).ok() @@ -6181,7 +6169,7 @@ impl IGetAppTrackerData { (windows_core::Interface::vtable(self).GetComponentsInProcess)(windows_core::Interface::as_raw(self), core::mem::transmute(applicationinstanceid), core::mem::transmute(processid), core::mem::transmute(partitionid), core::mem::transmute(applicationid), core::mem::transmute(flags), core::mem::transmute(numcomponentsinprocess), core::mem::transmute(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), core::mem::transmute(applicationinstanceid), core::mem::transmute(processid), core::mem::transmute(clsid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetComponentDetails)(windows_core::Interface::as_raw(self), core::mem::transmute(applicationinstanceid), core::mem::transmute(processid), core::mem::transmute(clsid), core::mem::transmute(flags), core::mem::transmute(summary.unwrap_or(core::mem::zeroed())), core::mem::transmute(statistics.unwrap_or(core::mem::zeroed())), core::mem::transmute(hangmonitorinfo.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetTrackerDataAsCollectionObject(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8326,11 +8314,8 @@ impl ISecurityProperty { (windows_core::Interface::vtable(self).GetOriginalCallerSID)(windows_core::Interface::as_raw(self), core::mem::transmute(psid)).ok() } #[cfg(feature = "Win32_Security")] - pub unsafe fn ReleaseSID(&self, psid: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseSID)(windows_core::Interface::as_raw(self), psid.param().abi()).ok() + pub unsafe fn ReleaseSID(&self, psid: super::super::Security::PSID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseSID)(windows_core::Interface::as_raw(self), core::mem::transmute(psid)).ok() } } #[repr(C)] 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 7e56db5613..e2d6eb45fe 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs @@ -29,12 +29,9 @@ pub unsafe fn AttachConsole(dwprocessid: u32) -> windows_core::Result<()> { AttachConsole(core::mem::transmute(dwprocessid)).ok() } #[inline] -pub unsafe fn ClosePseudoConsole(hpc: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ClosePseudoConsole(hpc: HPCON) { windows_targets::link!("kernel32.dll" "system" fn ClosePseudoConsole(hpc : HPCON)); - ClosePseudoConsole(hpc.param().abi()) + ClosePseudoConsole(core::mem::transmute(hpc)) } #[inline] pub unsafe fn ConsoleControl(command: CONSOLECONTROL, consoleinformation: *const core::ffi::c_void, consoleinformationlength: u32) -> super::super::Foundation::NTSTATUS { @@ -45,18 +42,14 @@ 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(core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(lpscreenbufferdata.unwrap_or(core::ptr::null()))); + let result__ = CreateConsoleScreenBuffer(core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(lpscreenbufferdata.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreatePseudoConsole(size: COORD, hinput: P1, houtput: P2, dwflags: u32) -> windows_core::Result -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn CreatePseudoConsole(size: COORD, hinput: super::super::Foundation::HANDLE, houtput: super::super::Foundation::HANDLE, dwflags: u32) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreatePseudoConsole(size : COORD, hinput : super::super::Foundation:: HANDLE, houtput : super::super::Foundation:: HANDLE, dwflags : u32, phpc : *mut HPCON) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreatePseudoConsole(core::mem::transmute(size), hinput.param().abi(), houtput.param().abi(), core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) + CreatePseudoConsole(core::mem::transmute(size), core::mem::transmute(hinput), core::mem::transmute(houtput), core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn ExpungeConsoleCommandHistoryA(exename: P0) @@ -75,36 +68,24 @@ where ExpungeConsoleCommandHistoryW(exename.param().abi()) } #[inline] -pub unsafe fn FillConsoleOutputAttribute(hconsoleoutput: P0, wattribute: u16, nlength: u32, dwwritecoord: COORD, lpnumberofattrswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FillConsoleOutputAttribute(hconsoleoutput: super::super::Foundation::HANDLE, wattribute: u16, nlength: u32, dwwritecoord: COORD, lpnumberofattrswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FillConsoleOutputAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, wattribute : u16, nlength : u32, dwwritecoord : COORD, lpnumberofattrswritten : *mut u32) -> super::super::Foundation:: BOOL); - FillConsoleOutputAttribute(hconsoleoutput.param().abi(), core::mem::transmute(wattribute), core::mem::transmute(nlength), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofattrswritten)).ok() + FillConsoleOutputAttribute(core::mem::transmute(hconsoleoutput), core::mem::transmute(wattribute), core::mem::transmute(nlength), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofattrswritten)).ok() } #[inline] -pub unsafe fn FillConsoleOutputCharacterA(hconsoleoutput: P0, ccharacter: i8, nlength: u32, dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FillConsoleOutputCharacterA(hconsoleoutput: super::super::Foundation::HANDLE, ccharacter: i8, nlength: u32, dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FillConsoleOutputCharacterA(hconsoleoutput : super::super::Foundation:: HANDLE, ccharacter : i8, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - FillConsoleOutputCharacterA(hconsoleoutput.param().abi(), core::mem::transmute(ccharacter), core::mem::transmute(nlength), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() + FillConsoleOutputCharacterA(core::mem::transmute(hconsoleoutput), core::mem::transmute(ccharacter), core::mem::transmute(nlength), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() } #[inline] -pub unsafe fn FillConsoleOutputCharacterW(hconsoleoutput: P0, ccharacter: u16, nlength: u32, dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FillConsoleOutputCharacterW(hconsoleoutput: super::super::Foundation::HANDLE, ccharacter: u16, nlength: u32, dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FillConsoleOutputCharacterW(hconsoleoutput : super::super::Foundation:: HANDLE, ccharacter : u16, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - FillConsoleOutputCharacterW(hconsoleoutput.param().abi(), core::mem::transmute(ccharacter), core::mem::transmute(nlength), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() + FillConsoleOutputCharacterW(core::mem::transmute(hconsoleoutput), core::mem::transmute(ccharacter), core::mem::transmute(nlength), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() } #[inline] -pub unsafe fn FlushConsoleInputBuffer(hconsoleinput: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FlushConsoleInputBuffer(hconsoleinput: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FlushConsoleInputBuffer(hconsoleinput : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FlushConsoleInputBuffer(hconsoleinput.param().abi()).ok() + FlushConsoleInputBuffer(core::mem::transmute(hconsoleinput)).ok() } #[inline] pub unsafe fn FreeConsole() -> windows_core::Result<()> { @@ -224,12 +205,9 @@ where GetConsoleCommandHistoryW(core::mem::transmute(commands), core::mem::transmute(commandbufferlength), exename.param().abi()) } #[inline] -pub unsafe fn GetConsoleCursorInfo(hconsoleoutput: P0, lpconsolecursorinfo: *mut CONSOLE_CURSOR_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetConsoleCursorInfo(hconsoleoutput: super::super::Foundation::HANDLE, lpconsolecursorinfo: *mut CONSOLE_CURSOR_INFO) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetConsoleCursorInfo(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolecursorinfo : *mut CONSOLE_CURSOR_INFO) -> super::super::Foundation:: BOOL); - GetConsoleCursorInfo(hconsoleoutput.param().abi(), core::mem::transmute(lpconsolecursorinfo)).ok() + GetConsoleCursorInfo(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpconsolecursorinfo)).ok() } #[inline] pub unsafe fn GetConsoleDisplayMode(lpmodeflags: *mut u32) -> windows_core::Result<()> { @@ -237,12 +215,9 @@ pub unsafe fn GetConsoleDisplayMode(lpmodeflags: *mut u32) -> windows_core::Resu GetConsoleDisplayMode(core::mem::transmute(lpmodeflags)).ok() } #[inline] -pub unsafe fn GetConsoleFontSize(hconsoleoutput: P0, nfont: u32) -> COORD -where - P0: windows_core::Param, -{ +pub unsafe fn GetConsoleFontSize(hconsoleoutput: super::super::Foundation::HANDLE, nfont: u32) -> COORD { windows_targets::link!("kernel32.dll" "system" fn GetConsoleFontSize(hconsoleoutput : super::super::Foundation:: HANDLE, nfont : u32) -> COORD); - GetConsoleFontSize(hconsoleoutput.param().abi(), core::mem::transmute(nfont)) + GetConsoleFontSize(core::mem::transmute(hconsoleoutput), core::mem::transmute(nfont)) } #[inline] pub unsafe fn GetConsoleHistoryInfo(lpconsolehistoryinfo: *mut CONSOLE_HISTORY_INFO) -> windows_core::Result<()> { @@ -250,12 +225,9 @@ pub unsafe fn GetConsoleHistoryInfo(lpconsolehistoryinfo: *mut CONSOLE_HISTORY_I GetConsoleHistoryInfo(core::mem::transmute(lpconsolehistoryinfo)).ok() } #[inline] -pub unsafe fn GetConsoleMode(hconsolehandle: P0, lpmode: *mut CONSOLE_MODE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetConsoleMode(hconsolehandle: super::super::Foundation::HANDLE, lpmode: *mut CONSOLE_MODE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetConsoleMode(hconsolehandle : super::super::Foundation:: HANDLE, lpmode : *mut CONSOLE_MODE) -> super::super::Foundation:: BOOL); - GetConsoleMode(hconsolehandle.param().abi(), core::mem::transmute(lpmode)).ok() + GetConsoleMode(core::mem::transmute(hconsolehandle), core::mem::transmute(lpmode)).ok() } #[inline] pub unsafe fn GetConsoleOriginalTitleA(lpconsoletitle: &mut [u8]) -> u32 { @@ -278,20 +250,14 @@ pub unsafe fn GetConsoleProcessList(lpdwprocesslist: &mut [u32]) -> u32 { GetConsoleProcessList(core::mem::transmute(lpdwprocesslist.as_ptr()), lpdwprocesslist.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetConsoleScreenBufferInfo(hconsoleoutput: P0, lpconsolescreenbufferinfo: *mut CONSOLE_SCREEN_BUFFER_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetConsoleScreenBufferInfo(hconsoleoutput: super::super::Foundation::HANDLE, lpconsolescreenbufferinfo: *mut CONSOLE_SCREEN_BUFFER_INFO) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetConsoleScreenBufferInfo(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolescreenbufferinfo : *mut CONSOLE_SCREEN_BUFFER_INFO) -> super::super::Foundation:: BOOL); - GetConsoleScreenBufferInfo(hconsoleoutput.param().abi(), core::mem::transmute(lpconsolescreenbufferinfo)).ok() + GetConsoleScreenBufferInfo(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpconsolescreenbufferinfo)).ok() } #[inline] -pub unsafe fn GetConsoleScreenBufferInfoEx(hconsoleoutput: P0, lpconsolescreenbufferinfoex: *mut CONSOLE_SCREEN_BUFFER_INFOEX) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetConsoleScreenBufferInfoEx(hconsoleoutput: super::super::Foundation::HANDLE, lpconsolescreenbufferinfoex: *mut CONSOLE_SCREEN_BUFFER_INFOEX) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetConsoleScreenBufferInfoEx(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolescreenbufferinfoex : *mut CONSOLE_SCREEN_BUFFER_INFOEX) -> super::super::Foundation:: BOOL); - GetConsoleScreenBufferInfoEx(hconsoleoutput.param().abi(), core::mem::transmute(lpconsolescreenbufferinfoex)).ok() + GetConsoleScreenBufferInfoEx(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpconsolescreenbufferinfoex)).ok() } #[inline] pub unsafe fn GetConsoleSelectionInfo(lpconsoleselectioninfo: *mut CONSOLE_SELECTION_INFO) -> windows_core::Result<()> { @@ -314,38 +280,30 @@ pub unsafe fn GetConsoleWindow() -> super::super::Foundation::HWND { GetConsoleWindow() } #[inline] -pub unsafe fn GetCurrentConsoleFont(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfont: *mut CONSOLE_FONT_INFO) -> windows_core::Result<()> +pub unsafe fn GetCurrentConsoleFont(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: P1, lpconsolecurrentfont: *mut CONSOLE_FONT_INFO) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCurrentConsoleFont(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfont : *mut CONSOLE_FONT_INFO) -> super::super::Foundation:: BOOL); - GetCurrentConsoleFont(hconsoleoutput.param().abi(), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfont)).ok() + GetCurrentConsoleFont(core::mem::transmute(hconsoleoutput), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfont)).ok() } #[inline] -pub unsafe fn GetCurrentConsoleFontEx(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfontex: *mut CONSOLE_FONT_INFOEX) -> windows_core::Result<()> +pub unsafe fn GetCurrentConsoleFontEx(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: P1, lpconsolecurrentfontex: *mut CONSOLE_FONT_INFOEX) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCurrentConsoleFontEx(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfontex : *mut CONSOLE_FONT_INFOEX) -> super::super::Foundation:: BOOL); - GetCurrentConsoleFontEx(hconsoleoutput.param().abi(), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfontex)).ok() + GetCurrentConsoleFontEx(core::mem::transmute(hconsoleoutput), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfontex)).ok() } #[inline] -pub unsafe fn GetLargestConsoleWindowSize(hconsoleoutput: P0) -> COORD -where - P0: windows_core::Param, -{ +pub unsafe fn GetLargestConsoleWindowSize(hconsoleoutput: super::super::Foundation::HANDLE) -> COORD { windows_targets::link!("kernel32.dll" "system" fn GetLargestConsoleWindowSize(hconsoleoutput : super::super::Foundation:: HANDLE) -> COORD); - GetLargestConsoleWindowSize(hconsoleoutput.param().abi()) + GetLargestConsoleWindowSize(core::mem::transmute(hconsoleoutput)) } #[inline] -pub unsafe fn GetNumberOfConsoleInputEvents(hconsoleinput: P0, lpnumberofevents: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNumberOfConsoleInputEvents(hconsoleinput: super::super::Foundation::HANDLE, lpnumberofevents: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumberOfConsoleInputEvents(hconsoleinput : super::super::Foundation:: HANDLE, lpnumberofevents : *mut u32) -> super::super::Foundation:: BOOL); - GetNumberOfConsoleInputEvents(hconsoleinput.param().abi(), core::mem::transmute(lpnumberofevents)).ok() + GetNumberOfConsoleInputEvents(core::mem::transmute(hconsoleinput), core::mem::transmute(lpnumberofevents)).ok() } #[inline] pub unsafe fn GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons: *mut u32) -> windows_core::Result<()> { @@ -359,124 +317,79 @@ pub unsafe fn GetStdHandle(nstdhandle: STD_HANDLE) -> windows_core::Result(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PeekConsoleInputA(hconsoleinput: super::super::Foundation::HANDLE, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn PeekConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - PeekConsoleInputA(hconsoleinput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() + PeekConsoleInputA(core::mem::transmute(hconsoleinput), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() } #[inline] -pub unsafe fn PeekConsoleInputW(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PeekConsoleInputW(hconsoleinput: super::super::Foundation::HANDLE, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn PeekConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - PeekConsoleInputW(hconsoleinput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() + PeekConsoleInputW(core::mem::transmute(hconsoleinput), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() } #[inline] -pub unsafe fn ReadConsoleA(hconsoleinput: P0, lpbuffer: *mut core::ffi::c_void, nnumberofcharstoread: u32, lpnumberofcharsread: *mut u32, pinputcontrol: Option<*const CONSOLE_READCONSOLE_CONTROL>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleA(hconsoleinput: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nnumberofcharstoread: u32, lpnumberofcharsread: *mut u32, pinputcontrol: Option<*const CONSOLE_READCONSOLE_CONTROL>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofcharstoread), core::mem::transmute(lpnumberofcharsread), core::mem::transmute(pinputcontrol.unwrap_or(core::ptr::null()))).ok() + ReadConsoleA(core::mem::transmute(hconsoleinput), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofcharstoread), core::mem::transmute(lpnumberofcharsread), core::mem::transmute(pinputcontrol.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn ReadConsoleInputA(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleInputA(hconsoleinput: super::super::Foundation::HANDLE, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleInputA(hconsoleinput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() + ReadConsoleInputA(core::mem::transmute(hconsoleinput), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() } #[inline] -pub unsafe fn ReadConsoleInputW(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleInputW(hconsoleinput: super::super::Foundation::HANDLE, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleInputW(hconsoleinput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() + ReadConsoleInputW(core::mem::transmute(hconsoleinput), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventsread)).ok() } #[inline] -pub unsafe fn ReadConsoleOutputA(hconsoleoutput: P0, lpbuffer: *mut CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpreadregion: *mut SMALL_RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleOutputA(hconsoleoutput: super::super::Foundation::HANDLE, lpbuffer: *mut CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpreadregion: *mut SMALL_RECT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputA(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *mut CHAR_INFO, dwbuffersize : COORD, dwbuffercoord : COORD, lpreadregion : *mut SMALL_RECT) -> super::super::Foundation:: BOOL); - ReadConsoleOutputA(hconsoleoutput.param().abi(), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpreadregion)).ok() + ReadConsoleOutputA(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpreadregion)).ok() } #[inline] -pub unsafe fn ReadConsoleOutputAttribute(hconsoleoutput: P0, lpattribute: &mut [u16], dwreadcoord: COORD, lpnumberofattrsread: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleOutputAttribute(hconsoleoutput: super::super::Foundation::HANDLE, lpattribute: &mut [u16], dwreadcoord: COORD, lpnumberofattrsread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, lpattribute : *mut u16, nlength : u32, dwreadcoord : COORD, lpnumberofattrsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputAttribute(hconsoleoutput.param().abi(), core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofattrsread)).ok() + ReadConsoleOutputAttribute(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofattrsread)).ok() } #[inline] -pub unsafe fn ReadConsoleOutputCharacterA(hconsoleoutput: P0, lpcharacter: &mut [u8], dwreadcoord: COORD, lpnumberofcharsread: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleOutputCharacterA(hconsoleoutput: super::super::Foundation::HANDLE, lpcharacter: &mut [u8], dwreadcoord: COORD, lpnumberofcharsread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputCharacterA(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : windows_core::PSTR, nlength : u32, dwreadcoord : COORD, lpnumberofcharsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputCharacterA(hconsoleoutput.param().abi(), core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofcharsread)).ok() + ReadConsoleOutputCharacterA(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofcharsread)).ok() } #[inline] -pub unsafe fn ReadConsoleOutputCharacterW(hconsoleoutput: P0, lpcharacter: &mut [u16], dwreadcoord: COORD, lpnumberofcharsread: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleOutputCharacterW(hconsoleoutput: super::super::Foundation::HANDLE, lpcharacter: &mut [u16], dwreadcoord: COORD, lpnumberofcharsread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputCharacterW(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : windows_core::PWSTR, nlength : u32, dwreadcoord : COORD, lpnumberofcharsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputCharacterW(hconsoleoutput.param().abi(), core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofcharsread)).ok() + ReadConsoleOutputCharacterW(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwreadcoord), core::mem::transmute(lpnumberofcharsread)).ok() } #[inline] -pub unsafe fn ReadConsoleOutputW(hconsoleoutput: P0, lpbuffer: *mut CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpreadregion: *mut SMALL_RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleOutputW(hconsoleoutput: super::super::Foundation::HANDLE, lpbuffer: *mut CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpreadregion: *mut SMALL_RECT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputW(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *mut CHAR_INFO, dwbuffersize : COORD, dwbuffercoord : COORD, lpreadregion : *mut SMALL_RECT) -> super::super::Foundation:: BOOL); - ReadConsoleOutputW(hconsoleoutput.param().abi(), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpreadregion)).ok() + ReadConsoleOutputW(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpreadregion)).ok() } #[inline] -pub unsafe fn ReadConsoleW(hconsoleinput: P0, lpbuffer: *mut core::ffi::c_void, nnumberofcharstoread: u32, lpnumberofcharsread: *mut u32, pinputcontrol: Option<*const CONSOLE_READCONSOLE_CONTROL>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadConsoleW(hconsoleinput: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nnumberofcharstoread: u32, lpnumberofcharsread: *mut u32, pinputcontrol: Option<*const CONSOLE_READCONSOLE_CONTROL>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofcharstoread), core::mem::transmute(lpnumberofcharsread), core::mem::transmute(pinputcontrol.unwrap_or(core::ptr::null()))).ok() + ReadConsoleW(core::mem::transmute(hconsoleinput), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofcharstoread), core::mem::transmute(lpnumberofcharsread), core::mem::transmute(pinputcontrol.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn ResizePseudoConsole(hpc: P0, size: COORD) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ResizePseudoConsole(hpc: HPCON, size: COORD) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ResizePseudoConsole(hpc : HPCON, size : COORD) -> windows_core::HRESULT); - ResizePseudoConsole(hpc.param().abi(), core::mem::transmute(size)).ok() + ResizePseudoConsole(core::mem::transmute(hpc), core::mem::transmute(size)).ok() } #[inline] -pub unsafe fn ScrollConsoleScreenBufferA(hconsoleoutput: P0, lpscrollrectangle: *const SMALL_RECT, lpcliprectangle: Option<*const SMALL_RECT>, dwdestinationorigin: COORD, lpfill: *const CHAR_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScrollConsoleScreenBufferA(hconsoleoutput: super::super::Foundation::HANDLE, lpscrollrectangle: *const SMALL_RECT, lpcliprectangle: Option<*const SMALL_RECT>, dwdestinationorigin: COORD, lpfill: *const CHAR_INFO) -> windows_core::Result<()> { 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(), core::mem::transmute(lpscrollrectangle), core::mem::transmute(lpcliprectangle.unwrap_or(core::ptr::null())), core::mem::transmute(dwdestinationorigin), core::mem::transmute(lpfill)).ok() + ScrollConsoleScreenBufferA(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpscrollrectangle), core::mem::transmute(lpcliprectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdestinationorigin), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScrollConsoleScreenBufferW(hconsoleoutput: super::super::Foundation::HANDLE, lpscrollrectangle: *const SMALL_RECT, lpcliprectangle: Option<*const SMALL_RECT>, dwdestinationorigin: COORD, lpfill: *const CHAR_INFO) -> windows_core::Result<()> { 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(), core::mem::transmute(lpscrollrectangle), core::mem::transmute(lpcliprectangle.unwrap_or(core::ptr::null())), core::mem::transmute(dwdestinationorigin), core::mem::transmute(lpfill)).ok() + ScrollConsoleScreenBufferW(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpscrollrectangle), core::mem::transmute(lpcliprectangle.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdestinationorigin), core::mem::transmute(lpfill)).ok() } #[inline] -pub unsafe fn SetConsoleActiveScreenBuffer(hconsoleoutput: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetConsoleActiveScreenBuffer(hconsoleoutput: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleActiveScreenBuffer(hconsoleoutput : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetConsoleActiveScreenBuffer(hconsoleoutput.param().abi()).ok() + SetConsoleActiveScreenBuffer(core::mem::transmute(hconsoleoutput)).ok() } #[inline] pub unsafe fn SetConsoleCP(wcodepageid: u32) -> windows_core::Result<()> { @@ -484,36 +397,27 @@ pub unsafe fn SetConsoleCP(wcodepageid: u32) -> windows_core::Result<()> { SetConsoleCP(core::mem::transmute(wcodepageid)).ok() } #[inline] -pub unsafe fn SetConsoleCtrlHandler(handlerroutine: PHANDLER_ROUTINE, add: P1) -> windows_core::Result<()> +pub unsafe fn SetConsoleCtrlHandler(handlerroutine: Option, add: P1) -> windows_core::Result<()> where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetConsoleCtrlHandler(handlerroutine : PHANDLER_ROUTINE, add : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetConsoleCtrlHandler(core::mem::transmute(handlerroutine), add.param().abi()).ok() + SetConsoleCtrlHandler(core::mem::transmute(handlerroutine.unwrap_or(core::mem::zeroed())), add.param().abi()).ok() } #[inline] -pub unsafe fn SetConsoleCursorInfo(hconsoleoutput: P0, lpconsolecursorinfo: *const CONSOLE_CURSOR_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetConsoleCursorInfo(hconsoleoutput: super::super::Foundation::HANDLE, lpconsolecursorinfo: *const CONSOLE_CURSOR_INFO) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleCursorInfo(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolecursorinfo : *const CONSOLE_CURSOR_INFO) -> super::super::Foundation:: BOOL); - SetConsoleCursorInfo(hconsoleoutput.param().abi(), core::mem::transmute(lpconsolecursorinfo)).ok() + SetConsoleCursorInfo(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpconsolecursorinfo)).ok() } #[inline] -pub unsafe fn SetConsoleCursorPosition(hconsoleoutput: P0, dwcursorposition: COORD) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetConsoleCursorPosition(hconsoleoutput: super::super::Foundation::HANDLE, dwcursorposition: COORD) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleCursorPosition(hconsoleoutput : super::super::Foundation:: HANDLE, dwcursorposition : COORD) -> super::super::Foundation:: BOOL); - SetConsoleCursorPosition(hconsoleoutput.param().abi(), core::mem::transmute(dwcursorposition)).ok() + SetConsoleCursorPosition(core::mem::transmute(hconsoleoutput), core::mem::transmute(dwcursorposition)).ok() } #[inline] -pub unsafe fn SetConsoleDisplayMode(hconsoleoutput: P0, dwflags: u32, lpnewscreenbufferdimensions: Option<*mut COORD>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetConsoleDisplayMode(hconsoleoutput: super::super::Foundation::HANDLE, dwflags: u32, lpnewscreenbufferdimensions: Option<*mut COORD>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwflags), core::mem::transmute(lpnewscreenbufferdimensions.unwrap_or(core::ptr::null_mut()))).ok() + SetConsoleDisplayMode(core::mem::transmute(hconsoleoutput), core::mem::transmute(dwflags), core::mem::transmute(lpnewscreenbufferdimensions.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SetConsoleHistoryInfo(lpconsolehistoryinfo: *const CONSOLE_HISTORY_INFO) -> windows_core::Result<()> { @@ -521,12 +425,9 @@ pub unsafe fn SetConsoleHistoryInfo(lpconsolehistoryinfo: *const CONSOLE_HISTORY SetConsoleHistoryInfo(core::mem::transmute(lpconsolehistoryinfo)).ok() } #[inline] -pub unsafe fn SetConsoleMode(hconsolehandle: P0, dwmode: CONSOLE_MODE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetConsoleMode(hconsolehandle: super::super::Foundation::HANDLE, dwmode: CONSOLE_MODE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleMode(hconsolehandle : super::super::Foundation:: HANDLE, dwmode : CONSOLE_MODE) -> super::super::Foundation:: BOOL); - SetConsoleMode(hconsolehandle.param().abi(), core::mem::transmute(dwmode)).ok() + SetConsoleMode(core::mem::transmute(hconsolehandle), core::mem::transmute(dwmode)).ok() } #[inline] pub unsafe fn SetConsoleNumberOfCommandsA(number: u32, exename: P1) -> super::super::Foundation::BOOL @@ -550,28 +451,19 @@ pub unsafe fn SetConsoleOutputCP(wcodepageid: u32) -> windows_core::Result<()> { SetConsoleOutputCP(core::mem::transmute(wcodepageid)).ok() } #[inline] -pub unsafe fn SetConsoleScreenBufferInfoEx(hconsoleoutput: P0, lpconsolescreenbufferinfoex: *const CONSOLE_SCREEN_BUFFER_INFOEX) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetConsoleScreenBufferInfoEx(hconsoleoutput: super::super::Foundation::HANDLE, lpconsolescreenbufferinfoex: *const CONSOLE_SCREEN_BUFFER_INFOEX) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleScreenBufferInfoEx(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolescreenbufferinfoex : *const CONSOLE_SCREEN_BUFFER_INFOEX) -> super::super::Foundation:: BOOL); - SetConsoleScreenBufferInfoEx(hconsoleoutput.param().abi(), core::mem::transmute(lpconsolescreenbufferinfoex)).ok() + SetConsoleScreenBufferInfoEx(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpconsolescreenbufferinfoex)).ok() } #[inline] -pub unsafe fn SetConsoleScreenBufferSize(hconsoleoutput: P0, dwsize: COORD) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetConsoleScreenBufferSize(hconsoleoutput: super::super::Foundation::HANDLE, dwsize: COORD) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleScreenBufferSize(hconsoleoutput : super::super::Foundation:: HANDLE, dwsize : COORD) -> super::super::Foundation:: BOOL); - SetConsoleScreenBufferSize(hconsoleoutput.param().abi(), core::mem::transmute(dwsize)).ok() + SetConsoleScreenBufferSize(core::mem::transmute(hconsoleoutput), core::mem::transmute(dwsize)).ok() } #[inline] -pub unsafe fn SetConsoleTextAttribute(hconsoleoutput: P0, wattributes: CONSOLE_CHARACTER_ATTRIBUTES) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetConsoleTextAttribute(hconsoleoutput: super::super::Foundation::HANDLE, wattributes: CONSOLE_CHARACTER_ATTRIBUTES) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleTextAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, wattributes : CONSOLE_CHARACTER_ATTRIBUTES) -> super::super::Foundation:: BOOL); - SetConsoleTextAttribute(hconsoleoutput.param().abi(), core::mem::transmute(wattributes)).ok() + SetConsoleTextAttribute(core::mem::transmute(hconsoleoutput), core::mem::transmute(wattributes)).ok() } #[inline] pub unsafe fn SetConsoleTitleA(lpconsoletitle: P0) -> windows_core::Result<()> @@ -590,110 +482,75 @@ where SetConsoleTitleW(lpconsoletitle.param().abi()).ok() } #[inline] -pub unsafe fn SetConsoleWindowInfo(hconsoleoutput: P0, babsolute: P1, lpconsolewindow: *const SMALL_RECT) -> windows_core::Result<()> +pub unsafe fn SetConsoleWindowInfo(hconsoleoutput: super::super::Foundation::HANDLE, babsolute: P1, lpconsolewindow: *const SMALL_RECT) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetConsoleWindowInfo(hconsoleoutput : super::super::Foundation:: HANDLE, babsolute : super::super::Foundation:: BOOL, lpconsolewindow : *const SMALL_RECT) -> super::super::Foundation:: BOOL); - SetConsoleWindowInfo(hconsoleoutput.param().abi(), babsolute.param().abi(), core::mem::transmute(lpconsolewindow)).ok() + SetConsoleWindowInfo(core::mem::transmute(hconsoleoutput), babsolute.param().abi(), core::mem::transmute(lpconsolewindow)).ok() } #[inline] -pub unsafe fn SetCurrentConsoleFontEx(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfontex: *const CONSOLE_FONT_INFOEX) -> windows_core::Result<()> +pub unsafe fn SetCurrentConsoleFontEx(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: P1, lpconsolecurrentfontex: *const CONSOLE_FONT_INFOEX) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetCurrentConsoleFontEx(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfontex : *const CONSOLE_FONT_INFOEX) -> super::super::Foundation:: BOOL); - SetCurrentConsoleFontEx(hconsoleoutput.param().abi(), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfontex)).ok() + SetCurrentConsoleFontEx(core::mem::transmute(hconsoleoutput), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfontex)).ok() } #[inline] -pub unsafe fn SetStdHandle(nstdhandle: STD_HANDLE, hhandle: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetStdHandle(nstdhandle: STD_HANDLE, hhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetStdHandle(nstdhandle : STD_HANDLE, hhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetStdHandle(core::mem::transmute(nstdhandle), hhandle.param().abi()).ok() + SetStdHandle(core::mem::transmute(nstdhandle), core::mem::transmute(hhandle)).ok() } #[inline] -pub unsafe fn SetStdHandleEx(nstdhandle: STD_HANDLE, hhandle: P1, phprevvalue: Option<*mut super::super::Foundation::HANDLE>) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn SetStdHandleEx(nstdhandle: STD_HANDLE, hhandle: super::super::Foundation::HANDLE, phprevvalue: Option<*mut super::super::Foundation::HANDLE>) -> super::super::Foundation::BOOL { 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(core::mem::transmute(nstdhandle), hhandle.param().abi(), core::mem::transmute(phprevvalue.unwrap_or(core::ptr::null_mut()))) + SetStdHandleEx(core::mem::transmute(nstdhandle), core::mem::transmute(hhandle), core::mem::transmute(phprevvalue.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WriteConsoleA(hconsoleoutput: P0, lpbuffer: &[u8], lpnumberofcharswritten: Option<*mut u32>, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleA(hconsoleoutput: super::super::Foundation::HANDLE, lpbuffer: &[u8], lpnumberofcharswritten: Option<*mut u32>, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + WriteConsoleA(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofcharswritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WriteConsoleInputA(hconsoleinput: P0, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleInputA(hconsoleinput: super::super::Foundation::HANDLE, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *const INPUT_RECORD, nlength : u32, lpnumberofeventswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleInputA(hconsoleinput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventswritten)).ok() + WriteConsoleInputA(core::mem::transmute(hconsoleinput), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventswritten)).ok() } #[inline] -pub unsafe fn WriteConsoleInputW(hconsoleinput: P0, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleInputW(hconsoleinput: super::super::Foundation::HANDLE, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *const INPUT_RECORD, nlength : u32, lpnumberofeventswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleInputW(hconsoleinput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventswritten)).ok() + WriteConsoleInputW(core::mem::transmute(hconsoleinput), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofeventswritten)).ok() } #[inline] -pub unsafe fn WriteConsoleOutputA(hconsoleoutput: P0, lpbuffer: *const CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpwriteregion: *mut SMALL_RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleOutputA(hconsoleoutput: super::super::Foundation::HANDLE, lpbuffer: *const CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpwriteregion: *mut SMALL_RECT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputA(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *const CHAR_INFO, dwbuffersize : COORD, dwbuffercoord : COORD, lpwriteregion : *mut SMALL_RECT) -> super::super::Foundation:: BOOL); - WriteConsoleOutputA(hconsoleoutput.param().abi(), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpwriteregion)).ok() + WriteConsoleOutputA(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpwriteregion)).ok() } #[inline] -pub unsafe fn WriteConsoleOutputAttribute(hconsoleoutput: P0, lpattribute: &[u16], dwwritecoord: COORD, lpnumberofattrswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleOutputAttribute(hconsoleoutput: super::super::Foundation::HANDLE, lpattribute: &[u16], dwwritecoord: COORD, lpnumberofattrswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, lpattribute : *const u16, nlength : u32, dwwritecoord : COORD, lpnumberofattrswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputAttribute(hconsoleoutput.param().abi(), core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofattrswritten)).ok() + WriteConsoleOutputAttribute(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofattrswritten)).ok() } #[inline] -pub unsafe fn WriteConsoleOutputCharacterA(hconsoleoutput: P0, lpcharacter: &[u8], dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleOutputCharacterA(hconsoleoutput: super::super::Foundation::HANDLE, lpcharacter: &[u8], dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputCharacterA(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : windows_core::PCSTR, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputCharacterA(hconsoleoutput.param().abi(), core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() + WriteConsoleOutputCharacterA(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() } #[inline] -pub unsafe fn WriteConsoleOutputCharacterW(hconsoleoutput: P0, lpcharacter: &[u16], dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleOutputCharacterW(hconsoleoutput: super::super::Foundation::HANDLE, lpcharacter: &[u16], dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputCharacterW(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : windows_core::PCWSTR, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputCharacterW(hconsoleoutput.param().abi(), core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() + WriteConsoleOutputCharacterW(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), core::mem::transmute(dwwritecoord), core::mem::transmute(lpnumberofcharswritten)).ok() } #[inline] -pub unsafe fn WriteConsoleOutputW(hconsoleoutput: P0, lpbuffer: *const CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpwriteregion: *mut SMALL_RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleOutputW(hconsoleoutput: super::super::Foundation::HANDLE, lpbuffer: *const CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpwriteregion: *mut SMALL_RECT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputW(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *const CHAR_INFO, dwbuffersize : COORD, dwbuffercoord : COORD, lpwriteregion : *mut SMALL_RECT) -> super::super::Foundation:: BOOL); - WriteConsoleOutputW(hconsoleoutput.param().abi(), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpwriteregion)).ok() + WriteConsoleOutputW(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpbuffer), core::mem::transmute(dwbuffersize), core::mem::transmute(dwbuffercoord), core::mem::transmute(lpwriteregion)).ok() } #[inline] -pub unsafe fn WriteConsoleW(hconsoleoutput: P0, lpbuffer: &[u16], lpnumberofcharswritten: Option<*mut u32>, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteConsoleW(hconsoleoutput: super::super::Foundation::HANDLE, lpbuffer: &[u16], lpnumberofcharswritten: Option<*mut u32>, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() + WriteConsoleW(core::mem::transmute(hconsoleoutput), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofcharswritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))).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 fad144c67e..1a3aabd904 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(core::mem::transmute(correlationvector), core::mem::transmute(version), core::mem::transmute(guid.unwrap_or(core::ptr::null()))) + RtlInitializeCorrelationVector(core::mem::transmute(correlationvector), core::mem::transmute(version), core::mem::transmute(guid.unwrap_or(core::mem::zeroed()))) } #[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 2e51801e06..a2c570f1e2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs @@ -15,21 +15,14 @@ where AddAtomW(lpstring.param().abi()) } #[inline] -pub unsafe fn AddClipboardFormatListener(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AddClipboardFormatListener(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn AddClipboardFormatListener(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - AddClipboardFormatListener(hwnd.param().abi()).ok() + AddClipboardFormatListener(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn ChangeClipboardChain(hwndremove: P0, hwndnewnext: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ChangeClipboardChain(hwndremove: super::super::Foundation::HWND, hwndnewnext: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn ChangeClipboardChain(hwndremove : super::super::Foundation:: HWND, hwndnewnext : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ChangeClipboardChain(hwndremove.param().abi(), hwndnewnext.param().abi()) + ChangeClipboardChain(core::mem::transmute(hwndremove), core::mem::transmute(hwndnewnext)) } #[inline] pub unsafe fn CloseClipboard() -> windows_core::Result<()> { @@ -42,75 +35,46 @@ pub unsafe fn CountClipboardFormats() -> i32 { CountClipboardFormats() } #[inline] -pub unsafe fn DdeAbandonTransaction(idinst: u32, hconv: P1, idtransaction: u32) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn DdeAbandonTransaction(idinst: u32, hconv: HCONV, idtransaction: u32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeAbandonTransaction(idinst : u32, hconv : HCONV, idtransaction : u32) -> super::super::Foundation:: BOOL); - DdeAbandonTransaction(core::mem::transmute(idinst), hconv.param().abi(), core::mem::transmute(idtransaction)) + DdeAbandonTransaction(core::mem::transmute(idinst), core::mem::transmute(hconv), core::mem::transmute(idtransaction)) } #[inline] -pub unsafe fn DdeAccessData(hdata: P0, pcbdatasize: Option<*mut u32>) -> *mut u8 -where - P0: windows_core::Param, -{ +pub unsafe fn DdeAccessData(hdata: HDDEDATA, pcbdatasize: Option<*mut u32>) -> *mut u8 { 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(core::ptr::null_mut()))) + DdeAccessData(core::mem::transmute(hdata), core::mem::transmute(pcbdatasize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DdeAddData(hdata: P0, psrc: &[u8], cboff: u32) -> HDDEDATA -where - P0: windows_core::Param, -{ +pub unsafe fn DdeAddData(hdata: HDDEDATA, psrc: &[u8], cboff: u32) -> HDDEDATA { windows_targets::link!("user32.dll" "system" fn DdeAddData(hdata : HDDEDATA, psrc : *const u8, cb : u32, cboff : u32) -> HDDEDATA); - DdeAddData(hdata.param().abi(), core::mem::transmute(psrc.as_ptr()), psrc.len().try_into().unwrap(), core::mem::transmute(cboff)) + DdeAddData(core::mem::transmute(hdata), core::mem::transmute(psrc.as_ptr()), psrc.len().try_into().unwrap(), core::mem::transmute(cboff)) } #[inline] -pub unsafe fn DdeClientTransaction(pdata: Option<*const u8>, cbdata: u32, hconv: P2, hszitem: P3, wfmt: u32, wtype: DDE_CLIENT_TRANSACTION_TYPE, dwtimeout: u32, pdwresult: Option<*mut u32>) -> HDDEDATA -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DdeClientTransaction(pdata: Option<*const u8>, cbdata: u32, hconv: HCONV, hszitem: Option, wfmt: u32, wtype: DDE_CLIENT_TRANSACTION_TYPE, dwtimeout: u32, pdwresult: Option<*mut u32>) -> HDDEDATA { 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(core::ptr::null())), core::mem::transmute(cbdata), hconv.param().abi(), hszitem.param().abi(), core::mem::transmute(wfmt), core::mem::transmute(wtype), core::mem::transmute(dwtimeout), core::mem::transmute(pdwresult.unwrap_or(core::ptr::null_mut()))) + DdeClientTransaction(core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata), core::mem::transmute(hconv), core::mem::transmute(hszitem.unwrap_or(core::mem::zeroed())), core::mem::transmute(wfmt), core::mem::transmute(wtype), core::mem::transmute(dwtimeout), core::mem::transmute(pdwresult.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DdeCmpStringHandles(hsz1: P0, hsz2: P1) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DdeCmpStringHandles(hsz1: HSZ, hsz2: HSZ) -> i32 { windows_targets::link!("user32.dll" "system" fn DdeCmpStringHandles(hsz1 : HSZ, hsz2 : HSZ) -> i32); - DdeCmpStringHandles(hsz1.param().abi(), hsz2.param().abi()) + DdeCmpStringHandles(core::mem::transmute(hsz1), core::mem::transmute(hsz2)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn DdeConnect(idinst: u32, hszservice: P1, hsztopic: P2, pcc: Option<*const CONVCONTEXT>) -> HCONV -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn DdeConnect(idinst: u32, hszservice: HSZ, hsztopic: HSZ, pcc: Option<*const CONVCONTEXT>) -> HCONV { windows_targets::link!("user32.dll" "system" fn DdeConnect(idinst : u32, hszservice : HSZ, hsztopic : HSZ, pcc : *const CONVCONTEXT) -> HCONV); - DdeConnect(core::mem::transmute(idinst), hszservice.param().abi(), hsztopic.param().abi(), core::mem::transmute(pcc.unwrap_or(core::ptr::null()))) + DdeConnect(core::mem::transmute(idinst), core::mem::transmute(hszservice), core::mem::transmute(hsztopic), core::mem::transmute(pcc.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn DdeConnectList(idinst: u32, hszservice: P1, hsztopic: P2, hconvlist: P3, pcc: Option<*const CONVCONTEXT>) -> HCONVLIST -where - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DdeConnectList(idinst: u32, hszservice: HSZ, hsztopic: HSZ, hconvlist: HCONVLIST, pcc: Option<*const CONVCONTEXT>) -> HCONVLIST { windows_targets::link!("user32.dll" "system" fn DdeConnectList(idinst : u32, hszservice : HSZ, hsztopic : HSZ, hconvlist : HCONVLIST, pcc : *const CONVCONTEXT) -> HCONVLIST); - DdeConnectList(core::mem::transmute(idinst), hszservice.param().abi(), hsztopic.param().abi(), hconvlist.param().abi(), core::mem::transmute(pcc.unwrap_or(core::ptr::null()))) + DdeConnectList(core::mem::transmute(idinst), core::mem::transmute(hszservice), core::mem::transmute(hsztopic), core::mem::transmute(hconvlist), core::mem::transmute(pcc.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DdeCreateDataHandle(idinst: u32, psrc: Option<&[u8]>, cboff: u32, hszitem: P4, wfmt: u32, afcmd: u32) -> HDDEDATA -where - P4: windows_core::Param, -{ +pub unsafe fn DdeCreateDataHandle(idinst: u32, psrc: Option<&[u8]>, cboff: u32, hszitem: Option, wfmt: u32, afcmd: u32) -> HDDEDATA { windows_targets::link!("user32.dll" "system" fn DdeCreateDataHandle(idinst : u32, psrc : *const u8, cb : u32, cboff : u32, hszitem : HSZ, wfmt : u32, afcmd : u32) -> HDDEDATA); - DdeCreateDataHandle(core::mem::transmute(idinst), core::mem::transmute(psrc.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psrc.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(cboff), hszitem.param().abi(), core::mem::transmute(wfmt), core::mem::transmute(afcmd)) + DdeCreateDataHandle(core::mem::transmute(idinst), core::mem::transmute(psrc.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psrc.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(cboff), core::mem::transmute(hszitem.unwrap_or(core::mem::zeroed())), core::mem::transmute(wfmt), core::mem::transmute(afcmd)) } #[inline] pub unsafe fn DdeCreateStringHandleA(idinst: u32, psz: P1, icodepage: i32) -> HSZ @@ -129,52 +93,34 @@ where DdeCreateStringHandleW(core::mem::transmute(idinst), psz.param().abi(), core::mem::transmute(icodepage)) } #[inline] -pub unsafe fn DdeDisconnect(hconv: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DdeDisconnect(hconv: HCONV) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeDisconnect(hconv : HCONV) -> super::super::Foundation:: BOOL); - DdeDisconnect(hconv.param().abi()) + DdeDisconnect(core::mem::transmute(hconv)) } #[inline] -pub unsafe fn DdeDisconnectList(hconvlist: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DdeDisconnectList(hconvlist: HCONVLIST) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeDisconnectList(hconvlist : HCONVLIST) -> super::super::Foundation:: BOOL); - DdeDisconnectList(hconvlist.param().abi()) + DdeDisconnectList(core::mem::transmute(hconvlist)) } #[inline] -pub unsafe fn DdeEnableCallback(idinst: u32, hconv: P1, wcmd: DDE_ENABLE_CALLBACK_CMD) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn DdeEnableCallback(idinst: u32, hconv: HCONV, wcmd: DDE_ENABLE_CALLBACK_CMD) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeEnableCallback(idinst : u32, hconv : HCONV, wcmd : DDE_ENABLE_CALLBACK_CMD) -> super::super::Foundation:: BOOL); - DdeEnableCallback(core::mem::transmute(idinst), hconv.param().abi(), core::mem::transmute(wcmd)) + DdeEnableCallback(core::mem::transmute(idinst), core::mem::transmute(hconv), core::mem::transmute(wcmd)) } #[inline] -pub unsafe fn DdeFreeDataHandle(hdata: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DdeFreeDataHandle(hdata: HDDEDATA) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeFreeDataHandle(hdata : HDDEDATA) -> super::super::Foundation:: BOOL); - DdeFreeDataHandle(hdata.param().abi()) + DdeFreeDataHandle(core::mem::transmute(hdata)) } #[inline] -pub unsafe fn DdeFreeStringHandle(idinst: u32, hsz: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn DdeFreeStringHandle(idinst: u32, hsz: HSZ) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeFreeStringHandle(idinst : u32, hsz : HSZ) -> super::super::Foundation:: BOOL); - DdeFreeStringHandle(core::mem::transmute(idinst), hsz.param().abi()) + DdeFreeStringHandle(core::mem::transmute(idinst), core::mem::transmute(hsz)) } #[inline] -pub unsafe fn DdeGetData(hdata: P0, pdst: Option<&mut [u8]>, cboff: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DdeGetData(hdata: HDDEDATA, pdst: Option<&mut [u8]>, cboff: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn DdeGetData(hdata : HDDEDATA, pdst : *mut u8, cbmax : u32, cboff : u32) -> u32); - DdeGetData(hdata.param().abi(), core::mem::transmute(pdst.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(cboff)) + DdeGetData(core::mem::transmute(hdata), core::mem::transmute(pdst.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(cboff)) } #[inline] pub unsafe fn DdeGetLastError(idinst: u32) -> u32 { @@ -182,115 +128,76 @@ pub unsafe fn DdeGetLastError(idinst: u32) -> u32 { DdeGetLastError(core::mem::transmute(idinst)) } #[inline] -pub unsafe fn DdeImpersonateClient(hconv: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdeImpersonateClient(hconv: HCONV) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DdeImpersonateClient(hconv : HCONV) -> super::super::Foundation:: BOOL); - DdeImpersonateClient(hconv.param().abi()).ok() + DdeImpersonateClient(core::mem::transmute(hconv)).ok() } #[inline] -pub unsafe fn DdeInitializeA(pidinst: *mut u32, pfncallback: PFNCALLBACK, afcmd: DDE_INITIALIZE_COMMAND, ulres: u32) -> u32 { +pub unsafe fn DdeInitializeA(pidinst: *mut u32, pfncallback: PFNCALLBACK, afcmd: DDE_INITIALIZE_COMMAND, ulres: Option) -> u32 { windows_targets::link!("user32.dll" "system" fn DdeInitializeA(pidinst : *mut u32, pfncallback : PFNCALLBACK, afcmd : DDE_INITIALIZE_COMMAND, ulres : u32) -> u32); - DdeInitializeA(core::mem::transmute(pidinst), core::mem::transmute(pfncallback), core::mem::transmute(afcmd), core::mem::transmute(ulres)) + DdeInitializeA(core::mem::transmute(pidinst), core::mem::transmute(pfncallback), core::mem::transmute(afcmd), core::mem::transmute(ulres.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DdeInitializeW(pidinst: *mut u32, pfncallback: PFNCALLBACK, afcmd: DDE_INITIALIZE_COMMAND, ulres: u32) -> u32 { +pub unsafe fn DdeInitializeW(pidinst: *mut u32, pfncallback: PFNCALLBACK, afcmd: DDE_INITIALIZE_COMMAND, ulres: Option) -> u32 { windows_targets::link!("user32.dll" "system" fn DdeInitializeW(pidinst : *mut u32, pfncallback : PFNCALLBACK, afcmd : DDE_INITIALIZE_COMMAND, ulres : u32) -> u32); - DdeInitializeW(core::mem::transmute(pidinst), core::mem::transmute(pfncallback), core::mem::transmute(afcmd), core::mem::transmute(ulres)) + DdeInitializeW(core::mem::transmute(pidinst), core::mem::transmute(pfncallback), core::mem::transmute(afcmd), core::mem::transmute(ulres.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DdeKeepStringHandle(idinst: u32, hsz: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn DdeKeepStringHandle(idinst: u32, hsz: HSZ) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeKeepStringHandle(idinst : u32, hsz : HSZ) -> super::super::Foundation:: BOOL); - DdeKeepStringHandle(core::mem::transmute(idinst), hsz.param().abi()) + DdeKeepStringHandle(core::mem::transmute(idinst), core::mem::transmute(hsz)) } #[inline] -pub unsafe fn DdeNameService(idinst: u32, hsz1: P1, hsz2: P2, afcmd: DDE_NAME_SERVICE_CMD) -> HDDEDATA -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn DdeNameService(idinst: u32, hsz1: Option, hsz2: Option, afcmd: DDE_NAME_SERVICE_CMD) -> HDDEDATA { windows_targets::link!("user32.dll" "system" fn DdeNameService(idinst : u32, hsz1 : HSZ, hsz2 : HSZ, afcmd : DDE_NAME_SERVICE_CMD) -> HDDEDATA); - DdeNameService(core::mem::transmute(idinst), hsz1.param().abi(), hsz2.param().abi(), core::mem::transmute(afcmd)) + DdeNameService(core::mem::transmute(idinst), core::mem::transmute(hsz1.unwrap_or(core::mem::zeroed())), core::mem::transmute(hsz2.unwrap_or(core::mem::zeroed())), core::mem::transmute(afcmd)) } #[inline] -pub unsafe fn DdePostAdvise(idinst: u32, hsztopic: P1, hszitem: P2) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn DdePostAdvise(idinst: u32, hsztopic: HSZ, hszitem: HSZ) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdePostAdvise(idinst : u32, hsztopic : HSZ, hszitem : HSZ) -> super::super::Foundation:: BOOL); - DdePostAdvise(core::mem::transmute(idinst), hsztopic.param().abi(), hszitem.param().abi()) + DdePostAdvise(core::mem::transmute(idinst), core::mem::transmute(hsztopic), core::mem::transmute(hszitem)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn DdeQueryConvInfo(hconv: P0, idtransaction: u32, pconvinfo: *mut CONVINFO) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DdeQueryConvInfo(hconv: HCONV, idtransaction: u32, pconvinfo: *mut CONVINFO) -> u32 { windows_targets::link!("user32.dll" "system" fn DdeQueryConvInfo(hconv : HCONV, idtransaction : u32, pconvinfo : *mut CONVINFO) -> u32); - DdeQueryConvInfo(hconv.param().abi(), core::mem::transmute(idtransaction), core::mem::transmute(pconvinfo)) + DdeQueryConvInfo(core::mem::transmute(hconv), core::mem::transmute(idtransaction), core::mem::transmute(pconvinfo)) } #[inline] -pub unsafe fn DdeQueryNextServer(hconvlist: P0, hconvprev: P1) -> HCONV -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DdeQueryNextServer(hconvlist: HCONVLIST, hconvprev: HCONV) -> HCONV { windows_targets::link!("user32.dll" "system" fn DdeQueryNextServer(hconvlist : HCONVLIST, hconvprev : HCONV) -> HCONV); - DdeQueryNextServer(hconvlist.param().abi(), hconvprev.param().abi()) + DdeQueryNextServer(core::mem::transmute(hconvlist), core::mem::transmute(hconvprev)) } #[inline] -pub unsafe fn DdeQueryStringA(idinst: u32, hsz: P1, psz: Option<&mut [u8]>, icodepage: i32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn DdeQueryStringA(idinst: u32, hsz: HSZ, psz: Option<&mut [u8]>, icodepage: i32) -> u32 { windows_targets::link!("user32.dll" "system" fn DdeQueryStringA(idinst : u32, hsz : HSZ, psz : windows_core::PSTR, cchmax : u32, icodepage : i32) -> u32); - DdeQueryStringA(core::mem::transmute(idinst), hsz.param().abi(), core::mem::transmute(psz.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(icodepage)) + DdeQueryStringA(core::mem::transmute(idinst), core::mem::transmute(hsz), core::mem::transmute(psz.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(icodepage)) } #[inline] -pub unsafe fn DdeQueryStringW(idinst: u32, hsz: P1, psz: Option<&mut [u16]>, icodepage: i32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn DdeQueryStringW(idinst: u32, hsz: HSZ, psz: Option<&mut [u16]>, icodepage: i32) -> u32 { windows_targets::link!("user32.dll" "system" fn DdeQueryStringW(idinst : u32, hsz : HSZ, psz : windows_core::PWSTR, cchmax : u32, icodepage : i32) -> u32); - DdeQueryStringW(core::mem::transmute(idinst), hsz.param().abi(), core::mem::transmute(psz.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(icodepage)) + DdeQueryStringW(core::mem::transmute(idinst), core::mem::transmute(hsz), core::mem::transmute(psz.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(icodepage)) } #[inline] -pub unsafe fn DdeReconnect(hconv: P0) -> HCONV -where - P0: windows_core::Param, -{ +pub unsafe fn DdeReconnect(hconv: HCONV) -> HCONV { windows_targets::link!("user32.dll" "system" fn DdeReconnect(hconv : HCONV) -> HCONV); - DdeReconnect(hconv.param().abi()) + DdeReconnect(core::mem::transmute(hconv)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn DdeSetQualityOfService(hwndclient: P0, pqosnew: *const super::super::Security::SECURITY_QUALITY_OF_SERVICE, pqosprev: *mut super::super::Security::SECURITY_QUALITY_OF_SERVICE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DdeSetQualityOfService(hwndclient: super::super::Foundation::HWND, pqosnew: *const super::super::Security::SECURITY_QUALITY_OF_SERVICE, pqosprev: *mut super::super::Security::SECURITY_QUALITY_OF_SERVICE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DdeSetQualityOfService(hwndclient : super::super::Foundation:: HWND, pqosnew : *const super::super::Security:: SECURITY_QUALITY_OF_SERVICE, pqosprev : *mut super::super::Security:: SECURITY_QUALITY_OF_SERVICE) -> super::super::Foundation:: BOOL); - DdeSetQualityOfService(hwndclient.param().abi(), core::mem::transmute(pqosnew), core::mem::transmute(pqosprev)).ok() + DdeSetQualityOfService(core::mem::transmute(hwndclient), core::mem::transmute(pqosnew), core::mem::transmute(pqosprev)).ok() } #[inline] -pub unsafe fn DdeSetUserHandle(hconv: P0, id: u32, huser: usize) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DdeSetUserHandle(hconv: HCONV, id: u32, huser: usize) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeSetUserHandle(hconv : HCONV, id : u32, huser : usize) -> super::super::Foundation:: BOOL); - DdeSetUserHandle(hconv.param().abi(), core::mem::transmute(id), core::mem::transmute(huser)) + DdeSetUserHandle(core::mem::transmute(hconv), core::mem::transmute(id), core::mem::transmute(huser)) } #[inline] -pub unsafe fn DdeUnaccessData(hdata: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DdeUnaccessData(hdata: HDDEDATA) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DdeUnaccessData(hdata : HDDEDATA) -> super::super::Foundation:: BOOL); - DdeUnaccessData(hdata.param().abi()) + DdeUnaccessData(core::mem::transmute(hdata)) } #[inline] pub unsafe fn DdeUninitialize(idinst: u32) -> super::super::Foundation::BOOL { @@ -329,12 +236,9 @@ where FindAtomW(lpstring.param().abi()) } #[inline] -pub unsafe fn FreeDDElParam(msg: u32, lparam: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn FreeDDElParam(msg: u32, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn FreeDDElParam(msg : u32, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - FreeDDElParam(core::mem::transmute(msg), lparam.param().abi()) + FreeDDElParam(core::mem::transmute(msg), core::mem::transmute(lparam)) } #[inline] pub unsafe fn GetAtomNameA(natom: u16, lpbuffer: &mut [u8]) -> u32 { @@ -459,13 +363,9 @@ pub unsafe fn GlobalGetAtomNameW(natom: u16, lpbuffer: &mut [u16]) -> u32 { GlobalGetAtomNameW(core::mem::transmute(natom), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap()) } #[inline] -pub unsafe fn ImpersonateDdeClientWindow(hwndclient: P0, hwndserver: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImpersonateDdeClientWindow(hwndclient: super::super::Foundation::HWND, hwndserver: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn ImpersonateDdeClientWindow(hwndclient : super::super::Foundation:: HWND, hwndserver : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ImpersonateDdeClientWindow(hwndclient.param().abi(), hwndserver.param().abi()).ok() + ImpersonateDdeClientWindow(core::mem::transmute(hwndclient), core::mem::transmute(hwndserver)).ok() } #[inline] pub unsafe fn InitAtomTable(nsize: u32) -> super::super::Foundation::BOOL { @@ -478,12 +378,9 @@ pub unsafe fn IsClipboardFormatAvailable(format: u32) -> windows_core::Result<() IsClipboardFormatAvailable(core::mem::transmute(format)).ok() } #[inline] -pub unsafe fn OpenClipboard(hwndnewowner: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn OpenClipboard(hwndnewowner: Option) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn OpenClipboard(hwndnewowner : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - OpenClipboard(hwndnewowner.param().abi()).ok() + OpenClipboard(core::mem::transmute(hwndnewowner.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn PackDDElParam(msg: u32, uilo: usize, uihi: usize) -> super::super::Foundation::LPARAM { @@ -507,55 +404,37 @@ where RegisterClipboardFormatW(lpszformat.param().abi()) } #[inline] -pub unsafe fn RemoveClipboardFormatListener(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RemoveClipboardFormatListener(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn RemoveClipboardFormatListener(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - RemoveClipboardFormatListener(hwnd.param().abi()).ok() + RemoveClipboardFormatListener(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn ReuseDDElParam(lparam: P0, msgin: u32, msgout: u32, uilo: usize, uihi: usize) -> super::super::Foundation::LPARAM -where - P0: windows_core::Param, -{ +pub unsafe fn ReuseDDElParam(lparam: super::super::Foundation::LPARAM, msgin: u32, msgout: u32, uilo: usize, uihi: usize) -> super::super::Foundation::LPARAM { windows_targets::link!("user32.dll" "system" fn ReuseDDElParam(lparam : super::super::Foundation:: LPARAM, msgin : u32, msgout : u32, uilo : usize, uihi : usize) -> super::super::Foundation:: LPARAM); - ReuseDDElParam(lparam.param().abi(), core::mem::transmute(msgin), core::mem::transmute(msgout), core::mem::transmute(uilo), core::mem::transmute(uihi)) + ReuseDDElParam(core::mem::transmute(lparam), core::mem::transmute(msgin), core::mem::transmute(msgout), core::mem::transmute(uilo), core::mem::transmute(uihi)) } #[inline] -pub unsafe fn SetClipboardData(uformat: u32, hmem: P1) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn SetClipboardData(uformat: u32, hmem: Option) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn SetClipboardData(uformat : u32, hmem : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - let result__ = SetClipboardData(core::mem::transmute(uformat), hmem.param().abi()); + let result__ = SetClipboardData(core::mem::transmute(uformat), core::mem::transmute(hmem.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetClipboardViewer(hwndnewviewer: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn SetClipboardViewer(hwndnewviewer: super::super::Foundation::HWND) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn SetClipboardViewer(hwndnewviewer : super::super::Foundation:: HWND) -> super::super::Foundation:: HWND); - let result__ = SetClipboardViewer(hwndnewviewer.param().abi()); + let result__ = SetClipboardViewer(core::mem::transmute(hwndnewviewer)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetWinMetaFileBits(lpmeta16data: &[u8], hdcref: P2, lpmfp: Option<*const METAFILEPICT>) -> super::super::Graphics::Gdi::HENHMETAFILE -where - P2: windows_core::Param, -{ +pub unsafe fn SetWinMetaFileBits(lpmeta16data: &[u8], hdcref: Option, lpmfp: Option<*const METAFILEPICT>) -> super::super::Graphics::Gdi::HENHMETAFILE { 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(core::ptr::null()))) + SetWinMetaFileBits(lpmeta16data.len().try_into().unwrap(), core::mem::transmute(lpmeta16data.as_ptr()), core::mem::transmute(hdcref.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpmfp.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn UnpackDDElParam(msg: u32, lparam: P1, puilo: *mut usize, puihi: *mut usize) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn UnpackDDElParam(msg: u32, lparam: super::super::Foundation::LPARAM, puilo: *mut usize, puihi: *mut usize) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn UnpackDDElParam(msg : u32, lparam : super::super::Foundation:: LPARAM, puilo : *mut usize, puihi : *mut usize) -> super::super::Foundation:: BOOL); - UnpackDDElParam(core::mem::transmute(msg), lparam.param().abi(), core::mem::transmute(puilo), core::mem::transmute(puihi)) + UnpackDDElParam(core::mem::transmute(msg), core::mem::transmute(lparam), core::mem::transmute(puilo), core::mem::transmute(puihi)) } pub const APPCLASS_MASK: i32 = 15i32; pub const APPCLASS_MONITOR: DDE_INITIALIZE_COMMAND = DDE_INITIALIZE_COMMAND(1u32); 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 43ab8c53a2..69174efe3a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs @@ -1,15 +1,12 @@ #[inline] -pub unsafe fn PxeAsyncRecvDone(hclientrequest: P0, action: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PxeAsyncRecvDone(hclientrequest: super::super::Foundation::HANDLE, action: u32) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeAsyncRecvDone(hclientrequest : super::super::Foundation:: HANDLE, action : u32) -> u32); - PxeAsyncRecvDone(hclientrequest.param().abi(), core::mem::transmute(action)) + PxeAsyncRecvDone(core::mem::transmute(hclientrequest), core::mem::transmute(action)) } #[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(core::mem::transmute(preplypacket), core::mem::transmute(umaxreplypacketlen), core::mem::transmute(pureplypacketlen), core::mem::transmute(boption), core::mem::transmute(boptionlen), core::mem::transmute(pvalue.unwrap_or(core::ptr::null()))) + PxeDhcpAppendOption(core::mem::transmute(preplypacket), core::mem::transmute(umaxreplypacketlen), core::mem::transmute(pureplypacketlen), core::mem::transmute(boption), core::mem::transmute(boptionlen), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))) } #[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 +16,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(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(uinstance), core::mem::transmute(boption), core::mem::transmute(pboptionlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(core::ptr::null_mut()))) + PxeDhcpGetOptionValue(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(uinstance), core::mem::transmute(boption), core::mem::transmute(pboptionlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoptionvalue.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(boption), core::mem::transmute(uinstance), core::mem::transmute(pboptionlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(core::ptr::null_mut()))) + PxeDhcpGetVendorOptionValue(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(boption), core::mem::transmute(uinstance), core::mem::transmute(pboptionlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoptionvalue.unwrap_or(core::mem::zeroed()))) } #[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 +34,7 @@ where P2: 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(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::ptr::null_mut()))) + PxeDhcpIsValid(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::mem::zeroed()))) } #[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 +54,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(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(uinstance), core::mem::transmute(woption), core::mem::transmute(pwoptionlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(core::ptr::null_mut()))) + PxeDhcpv6GetOptionValue(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(uinstance), core::mem::transmute(woption), core::mem::transmute(pwoptionlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoptionvalue.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(dwenterprisenumber), core::mem::transmute(woption), core::mem::transmute(uinstance), core::mem::transmute(pwoptionlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(core::ptr::null_mut()))) + PxeDhcpv6GetVendorOptionValue(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(dwenterprisenumber), core::mem::transmute(woption), core::mem::transmute(uinstance), core::mem::transmute(pwoptionlen.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoptionvalue.unwrap_or(core::mem::zeroed()))) } #[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 +72,7 @@ where P2: 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(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::ptr::null_mut()))) + PxeDhcpv6IsValid(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::mem::zeroed()))) } #[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 { @@ -93,30 +90,19 @@ pub unsafe fn PxeGetServerInfoEx(uinfotype: u32, pbuffer: *mut core::ffi::c_void PxeGetServerInfoEx(core::mem::transmute(uinfotype), core::mem::transmute(pbuffer), core::mem::transmute(ubufferlen), core::mem::transmute(pubufferused)) } #[inline] -pub unsafe fn PxePacketAllocate(hprovider: P0, hclientrequest: P1, usize: u32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PxePacketAllocate(hprovider: super::super::Foundation::HANDLE, hclientrequest: super::super::Foundation::HANDLE, usize: u32) -> *mut core::ffi::c_void { windows_targets::link!("wdspxe.dll" "system" fn PxePacketAllocate(hprovider : super::super::Foundation:: HANDLE, hclientrequest : super::super::Foundation:: HANDLE, usize : u32) -> *mut core::ffi::c_void); - PxePacketAllocate(hprovider.param().abi(), hclientrequest.param().abi(), core::mem::transmute(usize)) + PxePacketAllocate(core::mem::transmute(hprovider), core::mem::transmute(hclientrequest), core::mem::transmute(usize)) } #[inline] -pub unsafe fn PxePacketFree(hprovider: P0, hclientrequest: P1, ppacket: *const core::ffi::c_void) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PxePacketFree(hprovider: super::super::Foundation::HANDLE, hclientrequest: super::super::Foundation::HANDLE, ppacket: *const core::ffi::c_void) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxePacketFree(hprovider : super::super::Foundation:: HANDLE, hclientrequest : super::super::Foundation:: HANDLE, ppacket : *const core::ffi::c_void) -> u32); - PxePacketFree(hprovider.param().abi(), hclientrequest.param().abi(), core::mem::transmute(ppacket)) + PxePacketFree(core::mem::transmute(hprovider), core::mem::transmute(hclientrequest), core::mem::transmute(ppacket)) } #[inline] -pub unsafe fn PxeProviderEnumClose(henum: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PxeProviderEnumClose(henum: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeProviderEnumClose(henum : super::super::Foundation:: HANDLE) -> u32); - PxeProviderEnumClose(henum.param().abi()) + PxeProviderEnumClose(core::mem::transmute(henum)) } #[inline] pub unsafe fn PxeProviderEnumFirst(phenum: *mut super::super::Foundation::HANDLE) -> u32 { @@ -124,12 +110,9 @@ pub unsafe fn PxeProviderEnumFirst(phenum: *mut super::super::Foundation::HANDLE PxeProviderEnumFirst(core::mem::transmute(phenum)) } #[inline] -pub unsafe fn PxeProviderEnumNext(henum: P0, ppprovider: *mut *mut PXE_PROVIDER) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PxeProviderEnumNext(henum: super::super::Foundation::HANDLE, ppprovider: *mut *mut PXE_PROVIDER) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeProviderEnumNext(henum : super::super::Foundation:: HANDLE, ppprovider : *mut *mut PXE_PROVIDER) -> u32); - PxeProviderEnumNext(henum.param().abi(), core::mem::transmute(ppprovider)) + PxeProviderEnumNext(core::mem::transmute(henum), core::mem::transmute(ppprovider)) } #[inline] pub unsafe fn PxeProviderFreeInfo(pprovider: *const PXE_PROVIDER) -> u32 { @@ -153,15 +136,12 @@ where P3: 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(), core::mem::transmute(index), biscritical.param().abi(), core::mem::transmute(phproviderkey.unwrap_or(core::ptr::null_mut()))) + PxeProviderRegister(pszprovidername.param().abi(), pszmodulepath.param().abi(), core::mem::transmute(index), biscritical.param().abi(), core::mem::transmute(phproviderkey.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PxeProviderSetAttribute(hprovider: P0, attribute: u32, pparameterbuffer: *const core::ffi::c_void, uparamlen: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PxeProviderSetAttribute(hprovider: super::super::Foundation::HANDLE, attribute: u32, pparameterbuffer: *const core::ffi::c_void, uparamlen: u32) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeProviderSetAttribute(hprovider : super::super::Foundation:: HANDLE, attribute : u32, pparameterbuffer : *const core::ffi::c_void, uparamlen : u32) -> u32); - PxeProviderSetAttribute(hprovider.param().abi(), core::mem::transmute(attribute), core::mem::transmute(pparameterbuffer), core::mem::transmute(uparamlen)) + PxeProviderSetAttribute(core::mem::transmute(hprovider), core::mem::transmute(attribute), core::mem::transmute(pparameterbuffer), core::mem::transmute(uparamlen)) } #[inline] pub unsafe fn PxeProviderUnRegister(pszprovidername: P0) -> u32 @@ -172,62 +152,45 @@ where PxeProviderUnRegister(pszprovidername.param().abi()) } #[inline] -pub unsafe fn PxeRegisterCallback(hprovider: P0, callbacktype: u32, pcallbackfunction: *const core::ffi::c_void, pcontext: Option<*const core::ffi::c_void>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PxeRegisterCallback(hprovider: super::super::Foundation::HANDLE, callbacktype: u32, pcallbackfunction: *const core::ffi::c_void, pcontext: Option<*const core::ffi::c_void>) -> u32 { 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(), core::mem::transmute(callbacktype), core::mem::transmute(pcallbackfunction), core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))) + PxeRegisterCallback(core::mem::transmute(hprovider), core::mem::transmute(callbacktype), core::mem::transmute(pcallbackfunction), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PxeSendReply(hclientrequest: P0, ppacket: *const core::ffi::c_void, upacketlen: u32, paddress: *const PXE_ADDRESS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PxeSendReply(hclientrequest: super::super::Foundation::HANDLE, ppacket: *const core::ffi::c_void, upacketlen: u32, paddress: *const PXE_ADDRESS) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeSendReply(hclientrequest : super::super::Foundation:: HANDLE, ppacket : *const core::ffi::c_void, upacketlen : u32, paddress : *const PXE_ADDRESS) -> u32); - PxeSendReply(hclientrequest.param().abi(), core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(paddress)) + PxeSendReply(core::mem::transmute(hclientrequest), core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(paddress)) } #[inline] -pub unsafe fn PxeTrace(hprovider: P0, severity: u32, pszformat: P2) -> u32 +pub unsafe fn PxeTrace(hprovider: super::super::Foundation::HANDLE, severity: u32, pszformat: P2) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wdspxe.dll" "cdecl" fn PxeTrace(hprovider : super::super::Foundation:: HANDLE, severity : u32, pszformat : windows_core::PCWSTR) -> u32); - PxeTrace(hprovider.param().abi(), core::mem::transmute(severity), pszformat.param().abi()) + PxeTrace(core::mem::transmute(hprovider), core::mem::transmute(severity), pszformat.param().abi()) } #[inline] -pub unsafe fn PxeTraceV(hprovider: P0, severity: u32, pszformat: P2, params: *const i8) -> u32 +pub unsafe fn PxeTraceV(hprovider: super::super::Foundation::HANDLE, severity: u32, pszformat: P2, params: *const i8) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wdspxe.dll" "system" fn PxeTraceV(hprovider : super::super::Foundation:: HANDLE, severity : u32, pszformat : windows_core::PCWSTR, params : *const i8) -> u32); - PxeTraceV(hprovider.param().abi(), core::mem::transmute(severity), pszformat.param().abi(), core::mem::transmute(params)) + PxeTraceV(core::mem::transmute(hprovider), core::mem::transmute(severity), pszformat.param().abi(), core::mem::transmute(params)) } #[inline] -pub unsafe fn WdsBpAddOption(hhandle: P0, uoption: u32, uvaluelen: u32, pvalue: *const core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsBpAddOption(hhandle: super::super::Foundation::HANDLE, uoption: u32, uvaluelen: u32, pvalue: *const core::ffi::c_void) -> u32 { windows_targets::link!("wdsbp.dll" "system" fn WdsBpAddOption(hhandle : super::super::Foundation:: HANDLE, uoption : u32, uvaluelen : u32, pvalue : *const core::ffi::c_void) -> u32); - WdsBpAddOption(hhandle.param().abi(), core::mem::transmute(uoption), core::mem::transmute(uvaluelen), core::mem::transmute(pvalue)) + WdsBpAddOption(core::mem::transmute(hhandle), core::mem::transmute(uoption), core::mem::transmute(uvaluelen), core::mem::transmute(pvalue)) } #[inline] -pub unsafe fn WdsBpCloseHandle(hhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsBpCloseHandle(hhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdsbp.dll" "system" fn WdsBpCloseHandle(hhandle : super::super::Foundation:: HANDLE) -> u32); - WdsBpCloseHandle(hhandle.param().abi()) + WdsBpCloseHandle(core::mem::transmute(hhandle)) } #[inline] -pub unsafe fn WdsBpGetOptionBuffer(hhandle: P0, ubufferlen: u32, pbuffer: *mut core::ffi::c_void, pubytes: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsBpGetOptionBuffer(hhandle: super::super::Foundation::HANDLE, ubufferlen: u32, pbuffer: *mut core::ffi::c_void, pubytes: *mut u32) -> u32 { windows_targets::link!("wdsbp.dll" "system" fn WdsBpGetOptionBuffer(hhandle : super::super::Foundation:: HANDLE, ubufferlen : u32, pbuffer : *mut core::ffi::c_void, pubytes : *mut u32) -> u32); - WdsBpGetOptionBuffer(hhandle.param().abi(), core::mem::transmute(ubufferlen), core::mem::transmute(pbuffer), core::mem::transmute(pubytes)) + WdsBpGetOptionBuffer(core::mem::transmute(hhandle), core::mem::transmute(ubufferlen), core::mem::transmute(pbuffer), core::mem::transmute(pubytes)) } #[inline] pub unsafe fn WdsBpInitialize(bpackettype: u8, phhandle: *mut super::super::Foundation::HANDLE) -> u32 { @@ -237,41 +200,32 @@ 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(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(pbpackettype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phhandle)) + WdsBpParseInitialize(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(pbpackettype.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(pbpackettype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phhandle)) + WdsBpParseInitializev6(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), core::mem::transmute(pbpackettype.unwrap_or(core::mem::zeroed())), core::mem::transmute(phhandle)) } #[inline] -pub unsafe fn WdsBpQueryOption(hhandle: P0, uoption: u32, uvaluelen: u32, pvalue: *mut core::ffi::c_void, pubytes: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsBpQueryOption(hhandle: super::super::Foundation::HANDLE, uoption: u32, uvaluelen: u32, pvalue: *mut core::ffi::c_void, pubytes: Option<*mut u32>) -> u32 { 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(), core::mem::transmute(uoption), core::mem::transmute(uvaluelen), core::mem::transmute(pvalue), core::mem::transmute(pubytes.unwrap_or(core::ptr::null_mut()))) + WdsBpQueryOption(core::mem::transmute(hhandle), core::mem::transmute(uoption), core::mem::transmute(uvaluelen), core::mem::transmute(pvalue), core::mem::transmute(pubytes.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hsession), core::mem::transmute(pcred.unwrap_or(core::ptr::null()))).ok() + WdsCliAuthorizeSession(core::mem::transmute(hsession), core::mem::transmute(pcred.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WdsCliCancelTransfer(htransfer: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliCancelTransfer(htransfer: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliCancelTransfer(htransfer : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WdsCliCancelTransfer(htransfer.param().abi()).ok() + WdsCliCancelTransfer(core::mem::transmute(htransfer)).ok() } #[inline] -pub unsafe fn WdsCliClose(handle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliClose(handle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliClose(handle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WdsCliClose(handle.param().abi()).ok() + WdsCliClose(core::mem::transmute(handle)).ok() } #[inline] pub unsafe fn WdsCliCreateSession(pwszserver: P0, pcred: Option<*const WDS_CLI_CRED>) -> windows_core::Result @@ -280,24 +234,18 @@ 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(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliCreateSession(pwszserver.param().abi(), core::mem::transmute(pcred.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliFindFirstImage(hsession: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliFindFirstImage(hsession: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliFindFirstImage(hsession : super::super::Foundation:: HANDLE, phfindhandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliFindFirstImage(hsession.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliFindFirstImage(core::mem::transmute(hsession), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliFindNextImage(handle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliFindNextImage(handle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliFindNextImage(handle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WdsCliFindNextImage(handle.param().abi()).ok() + WdsCliFindNextImage(core::mem::transmute(handle)).ok() } #[inline] pub unsafe fn WdsCliFreeStringArray(ppwszarray: Option<&mut [windows_core::PWSTR]>) -> windows_core::Result<()> { @@ -314,221 +262,153 @@ where WdsCliGetDriverQueryXml(pwszwindirpath.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetEnumerationFlags(handle: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetEnumerationFlags(handle: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetEnumerationFlags(handle : super::super::Foundation:: HANDLE, pdwflags : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetEnumerationFlags(handle.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetEnumerationFlags(core::mem::transmute(handle), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageArchitecture(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageArchitecture(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageArchitecture(hifh : super::super::Foundation:: HANDLE, pdwvalue : *mut CPU_ARCHITECTURE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageArchitecture(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageArchitecture(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageDescription(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageDescription(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageDescription(hifh : super::super::Foundation:: HANDLE, ppwszvalue : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageDescription(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageDescription(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageFiles(hifh: P0, pppwszfiles: *mut *mut windows_core::PWSTR, pdwcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageFiles(hifh: super::super::Foundation::HANDLE, pppwszfiles: *mut *mut windows_core::PWSTR, pdwcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageFiles(hifh : super::super::Foundation:: HANDLE, pppwszfiles : *mut *mut windows_core::PWSTR, pdwcount : *mut u32) -> windows_core::HRESULT); - WdsCliGetImageFiles(hifh.param().abi(), core::mem::transmute(pppwszfiles), core::mem::transmute(pdwcount)).ok() + WdsCliGetImageFiles(core::mem::transmute(hifh), core::mem::transmute(pppwszfiles), core::mem::transmute(pdwcount)).ok() } #[inline] -pub unsafe fn WdsCliGetImageGroup(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageGroup(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageGroup(hifh : super::super::Foundation:: HANDLE, ppwszvalue : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageGroup(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageGroup(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageHalName(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageHalName(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageHalName(hifh : super::super::Foundation:: HANDLE, ppwszvalue : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageHalName(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageHalName(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageHandleFromFindHandle(findhandle: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageHandleFromFindHandle(findhandle: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageHandleFromFindHandle(findhandle : super::super::Foundation:: HANDLE, phimagehandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageHandleFromFindHandle(findhandle.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageHandleFromFindHandle(core::mem::transmute(findhandle), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageHandleFromTransferHandle(htransfer: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageHandleFromTransferHandle(htransfer: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageHandleFromTransferHandle(htransfer : super::super::Foundation:: HANDLE, phimagehandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageHandleFromTransferHandle(htransfer.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageHandleFromTransferHandle(core::mem::transmute(htransfer), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageIndex(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageIndex(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageIndex(hifh : super::super::Foundation:: HANDLE, pdwvalue : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageIndex(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageIndex(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageLanguage(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageLanguage(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageLanguage(hifh : super::super::Foundation:: HANDLE, ppwszvalue : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageLanguage(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageLanguage(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageLanguages(hifh: P0, pppszvalues: *mut *mut *mut i8, pdwnumvalues: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageLanguages(hifh: super::super::Foundation::HANDLE, pppszvalues: *mut *mut *mut i8, pdwnumvalues: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageLanguages(hifh : super::super::Foundation:: HANDLE, pppszvalues : *mut *mut *mut i8, pdwnumvalues : *mut u32) -> windows_core::HRESULT); - WdsCliGetImageLanguages(hifh.param().abi(), core::mem::transmute(pppszvalues), core::mem::transmute(pdwnumvalues)).ok() + WdsCliGetImageLanguages(core::mem::transmute(hifh), core::mem::transmute(pppszvalues), core::mem::transmute(pdwnumvalues)).ok() } #[inline] -pub unsafe fn WdsCliGetImageLastModifiedTime(hifh: P0) -> windows_core::Result<*mut super::super::Foundation::SYSTEMTIME> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageLastModifiedTime(hifh: super::super::Foundation::HANDLE) -> windows_core::Result<*mut super::super::Foundation::SYSTEMTIME> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageLastModifiedTime(hifh : super::super::Foundation:: HANDLE, ppsystimevalue : *mut *mut super::super::Foundation:: SYSTEMTIME) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageLastModifiedTime(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageLastModifiedTime(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageName(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageName(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageName(hifh : super::super::Foundation:: HANDLE, ppwszvalue : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageName(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageName(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageNamespace(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageNamespace(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageNamespace(hifh : super::super::Foundation:: HANDLE, ppwszvalue : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageNamespace(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageNamespace(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageParameter(hifh: P0, paramtype: WDS_CLI_IMAGE_PARAM_TYPE, presponse: *mut core::ffi::c_void, uresponselen: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageParameter(hifh: super::super::Foundation::HANDLE, paramtype: WDS_CLI_IMAGE_PARAM_TYPE, presponse: *mut core::ffi::c_void, uresponselen: u32) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageParameter(hifh : super::super::Foundation:: HANDLE, paramtype : WDS_CLI_IMAGE_PARAM_TYPE, presponse : *mut core::ffi::c_void, uresponselen : u32) -> windows_core::HRESULT); - WdsCliGetImageParameter(hifh.param().abi(), core::mem::transmute(paramtype), core::mem::transmute(presponse), core::mem::transmute(uresponselen)).ok() + WdsCliGetImageParameter(core::mem::transmute(hifh), core::mem::transmute(paramtype), core::mem::transmute(presponse), core::mem::transmute(uresponselen)).ok() } #[inline] -pub unsafe fn WdsCliGetImagePath(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImagePath(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImagePath(hifh : super::super::Foundation:: HANDLE, ppwszvalue : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImagePath(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImagePath(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageSize(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageSize(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageSize(hifh : super::super::Foundation:: HANDLE, pullvalue : *mut u64) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageSize(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageSize(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageType(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageType(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageType(hifh : super::super::Foundation:: HANDLE, pimagetype : *mut WDS_CLI_IMAGE_TYPE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageType(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageType(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetImageVersion(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetImageVersion(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetImageVersion(hifh : super::super::Foundation:: HANDLE, ppwszvalue : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetImageVersion(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetImageVersion(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliGetTransferSize(hifh: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliGetTransferSize(hifh: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliGetTransferSize(hifh : super::super::Foundation:: HANDLE, pullvalue : *mut u64) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliGetTransferSize(hifh.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliGetTransferSize(core::mem::transmute(hifh), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliInitializeLog(hsession: P0, ulclientarchitecture: CPU_ARCHITECTURE, pwszclientid: P2, pwszclientaddress: P3) -> windows_core::Result<()> +pub unsafe fn WdsCliInitializeLog(hsession: super::super::Foundation::HANDLE, ulclientarchitecture: CPU_ARCHITECTURE, pwszclientid: P2, pwszclientaddress: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliInitializeLog(hsession : super::super::Foundation:: HANDLE, ulclientarchitecture : CPU_ARCHITECTURE, pwszclientid : windows_core::PCWSTR, pwszclientaddress : windows_core::PCWSTR) -> windows_core::HRESULT); - WdsCliInitializeLog(hsession.param().abi(), core::mem::transmute(ulclientarchitecture), pwszclientid.param().abi(), pwszclientaddress.param().abi()).ok() + WdsCliInitializeLog(core::mem::transmute(hsession), core::mem::transmute(ulclientarchitecture), pwszclientid.param().abi(), pwszclientaddress.param().abi()).ok() } #[inline] -pub unsafe fn WdsCliLog(hsession: P0, ulloglevel: u32, ulmessagecode: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliLog(hsession: super::super::Foundation::HANDLE, ulloglevel: u32, ulmessagecode: u32) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "cdecl" fn WdsCliLog(hsession : super::super::Foundation:: HANDLE, ulloglevel : u32, ulmessagecode : u32) -> windows_core::HRESULT); - WdsCliLog(hsession.param().abi(), core::mem::transmute(ulloglevel), core::mem::transmute(ulmessagecode)).ok() + WdsCliLog(core::mem::transmute(hsession), core::mem::transmute(ulloglevel), core::mem::transmute(ulmessagecode)).ok() } #[inline] -pub unsafe fn WdsCliObtainDriverPackages(himage: P0, ppwszservername: *mut windows_core::PWSTR, pppwszdriverpackages: *mut *mut windows_core::PWSTR, pulcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliObtainDriverPackages(himage: super::super::Foundation::HANDLE, ppwszservername: *mut windows_core::PWSTR, pppwszdriverpackages: *mut *mut windows_core::PWSTR, pulcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliObtainDriverPackages(himage : super::super::Foundation:: HANDLE, ppwszservername : *mut windows_core::PWSTR, pppwszdriverpackages : *mut *mut windows_core::PWSTR, pulcount : *mut u32) -> windows_core::HRESULT); - WdsCliObtainDriverPackages(himage.param().abi(), core::mem::transmute(ppwszservername), core::mem::transmute(pppwszdriverpackages), core::mem::transmute(pulcount)).ok() + WdsCliObtainDriverPackages(core::mem::transmute(himage), core::mem::transmute(ppwszservername), core::mem::transmute(pppwszdriverpackages), core::mem::transmute(pulcount)).ok() } #[inline] -pub unsafe fn WdsCliObtainDriverPackagesEx(hsession: P0, pwszmachineinfo: P1, ppwszservername: *mut windows_core::PWSTR, pppwszdriverpackages: *mut *mut windows_core::PWSTR, pulcount: *mut u32) -> windows_core::Result<()> +pub unsafe fn WdsCliObtainDriverPackagesEx(hsession: super::super::Foundation::HANDLE, pwszmachineinfo: P1, ppwszservername: *mut windows_core::PWSTR, pppwszdriverpackages: *mut *mut windows_core::PWSTR, pulcount: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliObtainDriverPackagesEx(hsession : super::super::Foundation:: HANDLE, pwszmachineinfo : windows_core::PCWSTR, ppwszservername : *mut windows_core::PWSTR, pppwszdriverpackages : *mut *mut windows_core::PWSTR, pulcount : *mut u32) -> windows_core::HRESULT); - WdsCliObtainDriverPackagesEx(hsession.param().abi(), pwszmachineinfo.param().abi(), core::mem::transmute(ppwszservername), core::mem::transmute(pppwszdriverpackages), core::mem::transmute(pulcount)).ok() + WdsCliObtainDriverPackagesEx(core::mem::transmute(hsession), pwszmachineinfo.param().abi(), core::mem::transmute(ppwszservername), core::mem::transmute(pppwszdriverpackages), core::mem::transmute(pulcount)).ok() } #[inline] -pub unsafe fn WdsCliRegisterTrace(pfn: PFN_WdsCliTraceFunction) -> windows_core::Result<()> { +pub unsafe fn WdsCliRegisterTrace(pfn: Option) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliRegisterTrace(pfn : PFN_WdsCliTraceFunction) -> windows_core::HRESULT); - WdsCliRegisterTrace(core::mem::transmute(pfn)).ok() + WdsCliRegisterTrace(core::mem::transmute(pfn.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WdsCliSetTransferBufferSize(ulsizeinbytes: u32) { @@ -536,7 +416,7 @@ pub unsafe fn WdsCliSetTransferBufferSize(ulsizeinbytes: u32) { WdsCliSetTransferBufferSize(core::mem::transmute(ulsizeinbytes)) } #[inline] -pub unsafe fn WdsCliTransferFile(pwszserver: P0, pwsznamespace: P1, pwszremotefilepath: P2, pwszlocalfilepath: P3, dwflags: u32, dwreserved: u32, pfnwdsclicallback: PFN_WdsCliCallback, pvuserdata: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn WdsCliTransferFile(pwszserver: P0, pwsznamespace: P1, pwszremotefilepath: P2, pwszlocalfilepath: P3, dwflags: u32, dwreserved: u32, pfnwdsclicallback: Option, pvuserdata: Option<*const core::ffi::c_void>) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, @@ -545,25 +425,21 @@ 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(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved), core::mem::transmute(pfnwdsclicallback), core::mem::transmute(pvuserdata.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliTransferFile(pwszserver.param().abi(), pwsznamespace.param().abi(), pwszremotefilepath.param().abi(), pwszlocalfilepath.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved), core::mem::transmute(pfnwdsclicallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvuserdata.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(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 +pub unsafe fn WdsCliTransferImage(himage: super::super::Foundation::HANDLE, pwszlocalpath: P1, dwflags: u32, dwreserved: u32, pfnwdsclicallback: Option, pvuserdata: Option<*const core::ffi::c_void>) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { 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(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved), core::mem::transmute(pfnwdsclicallback), core::mem::transmute(pvuserdata.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + WdsCliTransferImage(core::mem::transmute(himage), pwszlocalpath.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved), core::mem::transmute(pfnwdsclicallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvuserdata.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WdsCliWaitForTransfer(htransfer: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsCliWaitForTransfer(htransfer: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliWaitForTransfer(htransfer : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WdsCliWaitForTransfer(htransfer.param().abi()).ok() + WdsCliWaitForTransfer(core::mem::transmute(htransfer)).ok() } #[inline] pub unsafe fn WdsTransportClientAddRefBuffer(pvbuffer: *const core::ffi::c_void) -> u32 { @@ -571,36 +447,24 @@ pub unsafe fn WdsTransportClientAddRefBuffer(pvbuffer: *const core::ffi::c_void) WdsTransportClientAddRefBuffer(core::mem::transmute(pvbuffer)) } #[inline] -pub unsafe fn WdsTransportClientCancelSession(hsessionkey: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportClientCancelSession(hsessionkey: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientCancelSession(hsessionkey : super::super::Foundation:: HANDLE) -> u32); - WdsTransportClientCancelSession(hsessionkey.param().abi()) + WdsTransportClientCancelSession(core::mem::transmute(hsessionkey)) } #[inline] -pub unsafe fn WdsTransportClientCancelSessionEx(hsessionkey: P0, dwerrorcode: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportClientCancelSessionEx(hsessionkey: super::super::Foundation::HANDLE, dwerrorcode: u32) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientCancelSessionEx(hsessionkey : super::super::Foundation:: HANDLE, dwerrorcode : u32) -> u32); - WdsTransportClientCancelSessionEx(hsessionkey.param().abi(), core::mem::transmute(dwerrorcode)) + WdsTransportClientCancelSessionEx(core::mem::transmute(hsessionkey), core::mem::transmute(dwerrorcode)) } #[inline] -pub unsafe fn WdsTransportClientCloseSession(hsessionkey: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportClientCloseSession(hsessionkey: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientCloseSession(hsessionkey : super::super::Foundation:: HANDLE) -> u32); - WdsTransportClientCloseSession(hsessionkey.param().abi()) + WdsTransportClientCloseSession(core::mem::transmute(hsessionkey)) } #[inline] -pub unsafe fn WdsTransportClientCompleteReceive(hsessionkey: P0, ulsize: u32, pulloffset: *const u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportClientCompleteReceive(hsessionkey: super::super::Foundation::HANDLE, ulsize: u32, pulloffset: *const u64) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientCompleteReceive(hsessionkey : super::super::Foundation:: HANDLE, ulsize : u32, pulloffset : *const u64) -> u32); - WdsTransportClientCompleteReceive(hsessionkey.param().abi(), core::mem::transmute(ulsize), core::mem::transmute(pulloffset)) + WdsTransportClientCompleteReceive(core::mem::transmute(hsessionkey), core::mem::transmute(ulsize), core::mem::transmute(pulloffset)) } #[inline] pub unsafe fn WdsTransportClientInitialize() -> u32 { @@ -613,20 +477,14 @@ pub unsafe fn WdsTransportClientInitializeSession(psessionrequest: *const WDS_TR WdsTransportClientInitializeSession(core::mem::transmute(psessionrequest), core::mem::transmute(pcallerdata), core::mem::transmute(hsessionkey)) } #[inline] -pub unsafe fn WdsTransportClientQueryStatus(hsessionkey: P0, pustatus: *mut u32, puerrorcode: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportClientQueryStatus(hsessionkey: super::super::Foundation::HANDLE, pustatus: *mut u32, puerrorcode: *mut u32) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientQueryStatus(hsessionkey : super::super::Foundation:: HANDLE, pustatus : *mut u32, puerrorcode : *mut u32) -> u32); - WdsTransportClientQueryStatus(hsessionkey.param().abi(), core::mem::transmute(pustatus), core::mem::transmute(puerrorcode)) + WdsTransportClientQueryStatus(core::mem::transmute(hsessionkey), core::mem::transmute(pustatus), core::mem::transmute(puerrorcode)) } #[inline] -pub unsafe fn WdsTransportClientRegisterCallback(hsessionkey: P0, callbackid: TRANSPORTCLIENT_CALLBACK_ID, pfncallback: *const core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportClientRegisterCallback(hsessionkey: super::super::Foundation::HANDLE, callbackid: TRANSPORTCLIENT_CALLBACK_ID, pfncallback: *const core::ffi::c_void) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientRegisterCallback(hsessionkey : super::super::Foundation:: HANDLE, callbackid : TRANSPORTCLIENT_CALLBACK_ID, pfncallback : *const core::ffi::c_void) -> u32); - WdsTransportClientRegisterCallback(hsessionkey.param().abi(), core::mem::transmute(callbackid), core::mem::transmute(pfncallback)) + WdsTransportClientRegisterCallback(core::mem::transmute(hsessionkey), core::mem::transmute(callbackid), core::mem::transmute(pfncallback)) } #[inline] pub unsafe fn WdsTransportClientReleaseBuffer(pvbuffer: *const core::ffi::c_void) -> u32 { @@ -639,70 +497,50 @@ pub unsafe fn WdsTransportClientShutdown() -> u32 { WdsTransportClientShutdown() } #[inline] -pub unsafe fn WdsTransportClientStartSession(hsessionkey: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportClientStartSession(hsessionkey: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientStartSession(hsessionkey : super::super::Foundation:: HANDLE) -> u32); - WdsTransportClientStartSession(hsessionkey.param().abi()) + WdsTransportClientStartSession(core::mem::transmute(hsessionkey)) } #[inline] -pub unsafe fn WdsTransportClientWaitForCompletion(hsessionkey: P0, utimeout: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportClientWaitForCompletion(hsessionkey: super::super::Foundation::HANDLE, utimeout: u32) -> u32 { windows_targets::link!("wdstptc.dll" "system" fn WdsTransportClientWaitForCompletion(hsessionkey : super::super::Foundation:: HANDLE, utimeout : u32) -> u32); - WdsTransportClientWaitForCompletion(hsessionkey.param().abi(), core::mem::transmute(utimeout)) + WdsTransportClientWaitForCompletion(core::mem::transmute(hsessionkey), core::mem::transmute(utimeout)) } #[inline] -pub unsafe fn WdsTransportServerAllocateBuffer(hprovider: P0, ulbuffersize: u32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportServerAllocateBuffer(hprovider: super::super::Foundation::HANDLE, ulbuffersize: u32) -> *mut core::ffi::c_void { windows_targets::link!("wdsmc.dll" "system" fn WdsTransportServerAllocateBuffer(hprovider : super::super::Foundation:: HANDLE, ulbuffersize : u32) -> *mut core::ffi::c_void); - WdsTransportServerAllocateBuffer(hprovider.param().abi(), core::mem::transmute(ulbuffersize)) + WdsTransportServerAllocateBuffer(core::mem::transmute(hprovider), core::mem::transmute(ulbuffersize)) } #[inline] -pub unsafe fn WdsTransportServerCompleteRead(hprovider: P0, ulbytesread: u32, pvuserdata: *const core::ffi::c_void, hreadresult: windows_core::HRESULT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportServerCompleteRead(hprovider: super::super::Foundation::HANDLE, ulbytesread: u32, pvuserdata: *const core::ffi::c_void, hreadresult: windows_core::HRESULT) -> windows_core::Result<()> { windows_targets::link!("wdsmc.dll" "system" fn WdsTransportServerCompleteRead(hprovider : super::super::Foundation:: HANDLE, ulbytesread : u32, pvuserdata : *const core::ffi::c_void, hreadresult : windows_core::HRESULT) -> windows_core::HRESULT); - WdsTransportServerCompleteRead(hprovider.param().abi(), core::mem::transmute(ulbytesread), core::mem::transmute(pvuserdata), core::mem::transmute(hreadresult)).ok() + WdsTransportServerCompleteRead(core::mem::transmute(hprovider), core::mem::transmute(ulbytesread), core::mem::transmute(pvuserdata), core::mem::transmute(hreadresult)).ok() } #[inline] -pub unsafe fn WdsTransportServerFreeBuffer(hprovider: P0, pvbuffer: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportServerFreeBuffer(hprovider: super::super::Foundation::HANDLE, pvbuffer: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("wdsmc.dll" "system" fn WdsTransportServerFreeBuffer(hprovider : super::super::Foundation:: HANDLE, pvbuffer : *const core::ffi::c_void) -> windows_core::HRESULT); - WdsTransportServerFreeBuffer(hprovider.param().abi(), core::mem::transmute(pvbuffer)).ok() + WdsTransportServerFreeBuffer(core::mem::transmute(hprovider), core::mem::transmute(pvbuffer)).ok() } #[inline] -pub unsafe fn WdsTransportServerRegisterCallback(hprovider: P0, callbackid: TRANSPORTPROVIDER_CALLBACK_ID, pfncallback: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WdsTransportServerRegisterCallback(hprovider: super::super::Foundation::HANDLE, callbackid: TRANSPORTPROVIDER_CALLBACK_ID, pfncallback: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("wdsmc.dll" "system" fn WdsTransportServerRegisterCallback(hprovider : super::super::Foundation:: HANDLE, callbackid : TRANSPORTPROVIDER_CALLBACK_ID, pfncallback : *const core::ffi::c_void) -> windows_core::HRESULT); - WdsTransportServerRegisterCallback(hprovider.param().abi(), core::mem::transmute(callbackid), core::mem::transmute(pfncallback)).ok() + WdsTransportServerRegisterCallback(core::mem::transmute(hprovider), core::mem::transmute(callbackid), core::mem::transmute(pfncallback)).ok() } #[inline] -pub unsafe fn WdsTransportServerTrace(hprovider: P0, severity: u32, pwszformat: P2) -> windows_core::Result<()> +pub unsafe fn WdsTransportServerTrace(hprovider: super::super::Foundation::HANDLE, severity: u32, pwszformat: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wdsmc.dll" "cdecl" fn WdsTransportServerTrace(hprovider : super::super::Foundation:: HANDLE, severity : u32, pwszformat : windows_core::PCWSTR) -> windows_core::HRESULT); - WdsTransportServerTrace(hprovider.param().abi(), core::mem::transmute(severity), pwszformat.param().abi()).ok() + WdsTransportServerTrace(core::mem::transmute(hprovider), core::mem::transmute(severity), pwszformat.param().abi()).ok() } #[inline] -pub unsafe fn WdsTransportServerTraceV(hprovider: P0, severity: u32, pwszformat: P2, params: *const i8) -> windows_core::Result<()> +pub unsafe fn WdsTransportServerTraceV(hprovider: super::super::Foundation::HANDLE, severity: u32, pwszformat: P2, params: *const i8) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wdsmc.dll" "system" fn WdsTransportServerTraceV(hprovider : super::super::Foundation:: HANDLE, severity : u32, pwszformat : windows_core::PCWSTR, params : *const i8) -> windows_core::HRESULT); - WdsTransportServerTraceV(hprovider.param().abi(), core::mem::transmute(severity), pwszformat.param().abi(), core::mem::transmute(params)).ok() + WdsTransportServerTraceV(core::mem::transmute(hprovider), core::mem::transmute(severity), pwszformat.param().abi(), core::mem::transmute(params)).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -1154,12 +992,9 @@ impl IWdsTransportConfigurationManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DiagnosticsPolicy)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn get_WdsTransportServicesRunning(&self, brealtimestatus: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn get_WdsTransportServicesRunning(&self, brealtimestatus: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).get_WdsTransportServicesRunning)(windows_core::Interface::as_raw(self), brealtimestatus.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).get_WdsTransportServicesRunning)(windows_core::Interface::as_raw(self), core::mem::transmute(brealtimestatus), &mut result__).map(|| result__) } pub unsafe fn EnableWdsTransportServices(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableWdsTransportServices)(windows_core::Interface::as_raw(self)).ok() @@ -1564,11 +1399,8 @@ impl IWdsTransportDiagnosticsPolicy { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, benabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(benabled)).ok() } pub unsafe fn Components(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1726,11 +1558,8 @@ impl IWdsTransportMulticastSessionPolicy { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SlowClientFallback)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSlowClientFallback(&self, bclientfallback: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSlowClientFallback)(windows_core::Interface::as_raw(self), bclientfallback.param().abi()).ok() + pub unsafe fn SetSlowClientFallback(&self, bclientfallback: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSlowClientFallback)(windows_core::Interface::as_raw(self), core::mem::transmute(bclientfallback)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1909,11 +1738,8 @@ impl IWdsTransportNamespace { pub unsafe fn Register(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Register)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Deregister(&self, bterminatesessions: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Deregister)(windows_core::Interface::as_raw(self), bterminatesessions.param().abi()).ok() + pub unsafe fn Deregister(&self, bterminatesessions: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Deregister)(windows_core::Interface::as_raw(self), core::mem::transmute(bterminatesessions)).ok() } pub unsafe fn Clone(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2223,12 +2049,9 @@ impl IWdsTransportNamespaceManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RetrieveNamespace)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bsznamespacename), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RetrieveNamespaces(&self, bszcontentprovider: &windows_core::BSTR, bsznamespacename: &windows_core::BSTR, bincludetombstones: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn RetrieveNamespaces(&self, bszcontentprovider: &windows_core::BSTR, bsznamespacename: &windows_core::BSTR, bincludetombstones: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RetrieveNamespaces)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bszcontentprovider), core::mem::transmute_copy(bsznamespacename), bincludetombstones.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RetrieveNamespaces)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bszcontentprovider), core::mem::transmute_copy(bsznamespacename), core::mem::transmute(bincludetombstones), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -2841,11 +2664,8 @@ impl IWdsTransportServicePolicy2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnableTftpVariableWindowExtension)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableTftpVariableWindowExtension(&self, benabletftpvariablewindowextension: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableTftpVariableWindowExtension)(windows_core::Interface::as_raw(self), benabletftpvariablewindowextension.param().abi()).ok() + pub unsafe fn SetEnableTftpVariableWindowExtension(&self, benabletftpvariablewindowextension: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableTftpVariableWindowExtension)(windows_core::Interface::as_raw(self), core::mem::transmute(benabletftpvariablewindowextension)).ok() } } #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs index 8c40ddb4ce..d34c00b892 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs @@ -192,11 +192,8 @@ impl IRDPSRAPIApplication { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Shared)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShared(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShared)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetShared(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShared)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn Name(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -325,11 +322,8 @@ impl IRDPSRAPIApplicationFilter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetEnabled(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1086,11 +1080,8 @@ impl IRDPSRAPIInvitation { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Revoked)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetRevoked(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRevoked)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetRevoked(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRevoked)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -2206,11 +2197,8 @@ impl IRDPSRAPIViewer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).VirtualChannelManager)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetSmartSizing(&self, vbsmartsizing: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSmartSizing)(windows_core::Interface::as_raw(self), vbsmartsizing.param().abi()).ok() + pub unsafe fn SetSmartSizing(&self, vbsmartsizing: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSmartSizing)(windows_core::Interface::as_raw(self), core::mem::transmute(vbsmartsizing)).ok() } pub unsafe fn SmartSizing(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2626,11 +2614,8 @@ impl IRDPSRAPIWindow { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Shared)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShared(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShared)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetShared(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShared)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn Name(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2812,11 +2797,8 @@ impl windows_core::RuntimeName for IRDPSRAPIWindowList {} windows_core::imp::define_interface!(IRDPViewerInputSink, IRDPViewerInputSink_Vtbl, 0xbb590853_a6c5_4a7b_8dd4_76b69eea12d5); windows_core::imp::interface_hierarchy!(IRDPViewerInputSink, windows_core::IUnknown); impl IRDPViewerInputSink { - pub unsafe fn SendMouseButtonEvent(&self, buttontype: RDPSRAPI_MOUSE_BUTTON_TYPE, vbbuttondown: P1, xpos: u32, ypos: u32) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SendMouseButtonEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(buttontype), vbbuttondown.param().abi(), core::mem::transmute(xpos), core::mem::transmute(ypos)).ok() + pub unsafe fn SendMouseButtonEvent(&self, buttontype: RDPSRAPI_MOUSE_BUTTON_TYPE, vbbuttondown: super::super::Foundation::VARIANT_BOOL, xpos: u32, ypos: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SendMouseButtonEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(buttontype), core::mem::transmute(vbbuttondown), core::mem::transmute(xpos), core::mem::transmute(ypos)).ok() } pub unsafe fn SendMouseMoveEvent(&self, xpos: u32, ypos: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SendMouseMoveEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(xpos), core::mem::transmute(ypos)).ok() @@ -2824,13 +2806,8 @@ impl IRDPViewerInputSink { pub unsafe fn SendMouseWheelEvent(&self, wheelrotation: u16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SendMouseWheelEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(wheelrotation)).ok() } - pub unsafe fn SendKeyboardEvent(&self, codetype: RDPSRAPI_KBD_CODE_TYPE, keycode: u16, vbkeyup: P2, vbrepeat: P3, vbextended: P4) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).SendKeyboardEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(codetype), core::mem::transmute(keycode), vbkeyup.param().abi(), vbrepeat.param().abi(), vbextended.param().abi()).ok() + pub unsafe fn SendKeyboardEvent(&self, codetype: RDPSRAPI_KBD_CODE_TYPE, keycode: u16, vbkeyup: super::super::Foundation::VARIANT_BOOL, vbrepeat: super::super::Foundation::VARIANT_BOOL, vbextended: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SendKeyboardEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(codetype), core::mem::transmute(keycode), core::mem::transmute(vbkeyup), core::mem::transmute(vbrepeat), core::mem::transmute(vbextended)).ok() } pub unsafe fn SendSyncEvent(&self, syncflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SendSyncEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(syncflags)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/DeveloperLicensing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DeveloperLicensing/mod.rs index 8a3510ab75..e870dcb495 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DeveloperLicensing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DeveloperLicensing/mod.rs @@ -1,11 +1,8 @@ #[inline] -pub unsafe fn AcquireDeveloperLicense(hwndparent: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn AcquireDeveloperLicense(hwndparent: Option) -> windows_core::Result { windows_targets::link!("wsclient.dll" "system" fn AcquireDeveloperLicense(hwndparent : super::super::Foundation:: HWND, pexpiration : *mut super::super::Foundation:: FILETIME) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - AcquireDeveloperLicense(hwndparent.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + AcquireDeveloperLicense(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn CheckDeveloperLicense() -> windows_core::Result { @@ -14,10 +11,7 @@ pub unsafe fn CheckDeveloperLicense() -> windows_core::Result(hwndparent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RemoveDeveloperLicense(hwndparent: Option) -> windows_core::Result<()> { windows_targets::link!("wsclient.dll" "system" fn RemoveDeveloperLicense(hwndparent : super::super::Foundation:: HWND) -> windows_core::HRESULT); - RemoveDeveloperLicense(hwndparent.param().abi()).ok() + RemoveDeveloperLicense(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed()))).ok() } 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 d0f891d1ec..7aecc638ee 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 @@ -5324,7 +5324,7 @@ impl IDebugDocumentText { (windows_core::Interface::vtable(self).GetLineOfPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(ccharacterposition), core::mem::transmute(pclinenumber), core::mem::transmute(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), core::mem::transmute(ccharacterposition), core::mem::transmute(pchartext), core::mem::transmute(pstatextattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcnumchars), core::mem::transmute(cmaxchars)).ok() + (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(ccharacterposition), core::mem::transmute(pchartext), core::mem::transmute(pstatextattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcnumchars), core::mem::transmute(cmaxchars)).ok() } pub unsafe fn GetPositionOfContext(&self, psc: P0, pccharacterposition: *mut u32, cnumchars: *mut u32) -> windows_core::Result<()> where @@ -9212,12 +9212,11 @@ impl windows_core::RuntimeName for ITridentEventSink {} windows_core::imp::define_interface!(IWebAppDiagnosticsObjectInitialization, IWebAppDiagnosticsObjectInitialization_Vtbl, 0x16ff3a42_a5f5_432b_b625_8e8e16f57e15); windows_core::imp::interface_hierarchy!(IWebAppDiagnosticsObjectInitialization, windows_core::IUnknown); impl IWebAppDiagnosticsObjectInitialization { - pub unsafe fn Initialize(&self, hpassedhandle: P0, pdebugapplication: P1) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, hpassedhandle: super::super::super::super::Foundation::HANDLE_PTR, pdebugapplication: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hpassedhandle.param().abi(), pdebugapplication.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hpassedhandle), pdebugapplication.param().abi()).ok() } } #[repr(C)] 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 89b2d98659..641d2beaa8 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 @@ -3668,7 +3668,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(core::ptr::null_mut())), core::mem::transmute(wildcardmatches.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(wildcardmatches.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn RegisterModelForTypeSignature(&self, typesignature: P0, datamodel: P1) -> windows_core::Result<()> where @@ -4054,14 +4054,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(core::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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn EnumerateValues(&self, contextobject: P0) -> windows_core::Result where @@ -4297,7 +4297,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), core::mem::transmute(currentposition), core::mem::transmute(positionspanend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(positionspanend.unwrap_or(core::mem::zeroed())), core::mem::transmute(linetext.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetStack(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4515,7 +4515,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), core::mem::transmute(position), core::mem::transmute(positionspanend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(position), core::mem::transmute(positionspanend.unwrap_or(core::mem::zeroed())), core::mem::transmute(linetext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -4709,7 +4709,7 @@ impl IDataModelScriptDebugStackFrame { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(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), core::mem::transmute(position), core::mem::transmute(positionspanend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(position), core::mem::transmute(positionspanend.unwrap_or(core::mem::zeroed())), core::mem::transmute(linetext.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn IsTransitionPoint(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4837,7 +4837,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(core::ptr::null_mut())), core::mem::transmute(variablemetadata.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(variablemetadata.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5363,13 +5363,13 @@ impl IDebugAdvanced2 { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), core::mem::transmute(context), core::mem::transmute(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), core::mem::transmute(request), core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outbuffersize), core::mem::transmute(outsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), core::mem::transmute(request), core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outbuffersize), core::mem::transmute(outsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSourceFileInformation(&self, which: u32, sourcefile: P1, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FindSourceFileAndToken(&self, startelement: u32, modaddr: u64, file: P2, 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 @@ -5381,12 +5381,12 @@ impl IDebugAdvanced2 { core::mem::transmute(modaddr), file.param().abi(), core::mem::transmute(flags), - core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), + core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(filetokensize), - core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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())), + core::mem::transmute(foundsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -5396,17 +5396,17 @@ impl IDebugAdvanced2 { core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), - core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(infosize.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5485,13 +5485,13 @@ impl IDebugAdvanced3 { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), core::mem::transmute(context), core::mem::transmute(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), core::mem::transmute(request), core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outbuffersize), core::mem::transmute(outsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), core::mem::transmute(request), core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outbuffersize), core::mem::transmute(outsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSourceFileInformation(&self, which: u32, sourcefile: P1, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FindSourceFileAndToken(&self, startelement: u32, modaddr: u64, file: P2, 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 @@ -5503,12 +5503,12 @@ impl IDebugAdvanced3 { core::mem::transmute(modaddr), file.param().abi(), core::mem::transmute(flags), - core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), + core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(filetokensize), - core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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())), + core::mem::transmute(foundsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -5518,23 +5518,23 @@ impl IDebugAdvanced3 { core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), - core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(infosize.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSourceFileInformationWide(&self, which: u32, sourcefile: P1, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FindSourceFileAndTokenWide(&self, startelement: u32, modaddr: u64, file: P2, 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 @@ -5546,12 +5546,12 @@ impl IDebugAdvanced3 { core::mem::transmute(modaddr), file.param().abi(), core::mem::transmute(flags), - core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), + core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(filetokensize), - core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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())), + core::mem::transmute(foundsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -5561,12 +5561,12 @@ impl IDebugAdvanced3 { core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), - core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(infosize.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -5668,13 +5668,13 @@ impl IDebugAdvanced4 { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), core::mem::transmute(context), core::mem::transmute(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), core::mem::transmute(request), core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outbuffersize), core::mem::transmute(outsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), core::mem::transmute(request), core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outbuffersize), core::mem::transmute(outsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSourceFileInformation(&self, which: u32, sourcefile: P1, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FindSourceFileAndToken(&self, startelement: u32, modaddr: u64, file: P2, 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 @@ -5686,12 +5686,12 @@ impl IDebugAdvanced4 { core::mem::transmute(modaddr), file.param().abi(), core::mem::transmute(flags), - core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), + core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(filetokensize), - core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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())), + core::mem::transmute(foundsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -5701,23 +5701,23 @@ impl IDebugAdvanced4 { core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), - core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(infosize.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSourceFileInformationWide(&self, which: u32, sourcefile: P1, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(which), sourcefile.param().abi(), core::mem::transmute(arg64), core::mem::transmute(arg32), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FindSourceFileAndTokenWide(&self, startelement: u32, modaddr: u64, file: P2, 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 @@ -5729,12 +5729,12 @@ impl IDebugAdvanced4 { core::mem::transmute(modaddr), file.param().abi(), core::mem::transmute(flags), - core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), + core::mem::transmute(filetoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(filetokensize), - core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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())), + core::mem::transmute(foundsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -5744,12 +5744,12 @@ impl IDebugAdvanced4 { core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), - core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(infosize.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -5759,13 +5759,13 @@ impl IDebugAdvanced4 { core::mem::transmute(which), core::mem::transmute(arg64), core::mem::transmute(arg32), - core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), - core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(infosize.unwrap_or(core::mem::zeroed())), 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())), - core::mem::transmute(pinfoex.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(stringsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pinfoex.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -5923,7 +5923,7 @@ impl IDebugBreakpoint { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -5932,7 +5932,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -6209,7 +6209,7 @@ impl IDebugBreakpoint2 { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -6218,7 +6218,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -6230,7 +6230,7 @@ impl IDebugBreakpoint2 { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetCommandWide(&self, command: P0) -> windows_core::Result<()> where @@ -6239,7 +6239,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOffsetExpressionWide(&self, expression: P0) -> windows_core::Result<()> where @@ -6541,7 +6541,7 @@ impl IDebugBreakpoint3 { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -6550,7 +6550,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -6562,7 +6562,7 @@ impl IDebugBreakpoint3 { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetCommandWide(&self, command: P0) -> windows_core::Result<()> where @@ -6571,7 +6571,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOffsetExpressionWide(&self, expression: P0) -> windows_core::Result<()> where @@ -6841,7 +6841,7 @@ impl IDebugClient { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -6853,7 +6853,7 @@ impl IDebugClient { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -6866,7 +6866,7 @@ impl IDebugClient { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -6883,10 +6883,10 @@ impl IDebugClient { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -7019,7 +7019,7 @@ impl IDebugClient { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -7028,7 +7028,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -7458,7 +7458,7 @@ impl IDebugClient2 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -7470,7 +7470,7 @@ impl IDebugClient2 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -7483,7 +7483,7 @@ impl IDebugClient2 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -7500,10 +7500,10 @@ impl IDebugClient2 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -7636,7 +7636,7 @@ impl IDebugClient2 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -7645,7 +7645,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -8162,7 +8162,7 @@ impl IDebugClient3 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -8174,7 +8174,7 @@ impl IDebugClient3 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -8187,7 +8187,7 @@ impl IDebugClient3 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -8204,10 +8204,10 @@ impl IDebugClient3 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -8340,7 +8340,7 @@ impl IDebugClient3 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -8349,7 +8349,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -8416,10 +8416,10 @@ impl IDebugClient3 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -8934,7 +8934,7 @@ impl IDebugClient4 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -8946,7 +8946,7 @@ impl IDebugClient4 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -8959,7 +8959,7 @@ impl IDebugClient4 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -8976,10 +8976,10 @@ impl IDebugClient4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -9112,7 +9112,7 @@ impl IDebugClient4 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -9121,7 +9121,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -9188,10 +9188,10 @@ impl IDebugClient4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -9231,10 +9231,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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } } #[repr(C)] @@ -9783,7 +9783,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -9795,7 +9795,7 @@ impl IDebugClient5 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -9808,7 +9808,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -9825,10 +9825,10 @@ impl IDebugClient5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -9961,7 +9961,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -9970,7 +9970,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -10037,10 +10037,10 @@ impl IDebugClient5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -10080,10 +10080,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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P1) -> windows_core::Result<()> where @@ -10092,7 +10092,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -10104,7 +10104,7 @@ impl IDebugClient5 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -10136,7 +10136,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -10145,7 +10145,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -10225,7 +10225,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).GetNumberEventCallbacks)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -10234,7 +10234,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -11040,7 +11040,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -11052,7 +11052,7 @@ impl IDebugClient6 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -11065,7 +11065,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -11082,10 +11082,10 @@ impl IDebugClient6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -11218,7 +11218,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -11227,7 +11227,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -11294,10 +11294,10 @@ impl IDebugClient6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -11337,10 +11337,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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P1) -> windows_core::Result<()> where @@ -11349,7 +11349,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -11361,7 +11361,7 @@ impl IDebugClient6 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -11393,7 +11393,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -11402,7 +11402,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -11482,7 +11482,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).GetNumberEventCallbacks)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -11491,7 +11491,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -12310,7 +12310,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -12322,7 +12322,7 @@ impl IDebugClient7 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -12335,7 +12335,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -12352,10 +12352,10 @@ impl IDebugClient7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -12488,7 +12488,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -12497,7 +12497,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -12564,10 +12564,10 @@ impl IDebugClient7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -12607,10 +12607,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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P1) -> windows_core::Result<()> where @@ -12619,7 +12619,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -12631,7 +12631,7 @@ impl IDebugClient7 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -12663,7 +12663,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -12672,7 +12672,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -12752,7 +12752,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).GetNumberEventCallbacks)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -12761,7 +12761,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -13590,7 +13590,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -13602,7 +13602,7 @@ impl IDebugClient8 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -13615,7 +13615,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P1, flags: u32) -> windows_core::Result where @@ -13632,10 +13632,10 @@ impl IDebugClient8 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -13768,7 +13768,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -13777,7 +13777,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -13844,10 +13844,10 @@ impl IDebugClient8 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -13887,10 +13887,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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(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())), core::mem::transmute(r#type)).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(handle.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type)).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P1) -> windows_core::Result<()> where @@ -13899,7 +13899,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -13911,7 +13911,7 @@ impl IDebugClient8 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -13943,7 +13943,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -13952,7 +13952,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(core::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::mem::zeroed()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P2) -> windows_core::Result<()> where @@ -14032,7 +14032,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).GetNumberEventCallbacks)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -14041,7 +14041,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -14890,7 +14890,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -14910,7 +14910,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -14955,7 +14955,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -14978,7 +14978,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(endoffset)).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14996,9 +14996,9 @@ impl IDebugControl { lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(offset), core::mem::transmute(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(offsetline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(startoffset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(endoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ) .ok() @@ -15008,7 +15008,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15047,11 +15047,11 @@ impl IDebugControl { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -15078,10 +15078,10 @@ impl IDebugControl { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -15126,7 +15126,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -15145,7 +15145,7 @@ impl IDebugControl { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(r#in), core::mem::transmute(outtype), core::mem::transmute(out)).ok() @@ -15178,7 +15178,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15233,10 +15233,10 @@ impl IDebugControl { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(specificevents), core::mem::transmute(specificexceptions), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -15251,7 +15251,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -15260,13 +15260,13 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -15283,12 +15283,12 @@ impl IDebugControl { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -16136,7 +16136,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -16156,7 +16156,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -16201,7 +16201,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -16224,7 +16224,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(endoffset)).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16242,9 +16242,9 @@ impl IDebugControl2 { lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(offset), core::mem::transmute(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(offsetline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(startoffset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(endoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ) .ok() @@ -16254,7 +16254,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16293,11 +16293,11 @@ impl IDebugControl2 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -16324,10 +16324,10 @@ impl IDebugControl2 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -16372,7 +16372,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -16391,7 +16391,7 @@ impl IDebugControl2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(r#in), core::mem::transmute(outtype), core::mem::transmute(out)).ok() @@ -16424,7 +16424,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16479,10 +16479,10 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(specificevents), core::mem::transmute(specificexceptions), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -16497,7 +16497,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -16506,13 +16506,13 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -16529,12 +16529,12 @@ impl IDebugControl2 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -16564,10 +16564,10 @@ impl IDebugControl2 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -17508,7 +17508,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -17528,7 +17528,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -17573,7 +17573,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -17596,7 +17596,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(endoffset)).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17614,9 +17614,9 @@ impl IDebugControl3 { lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(offset), core::mem::transmute(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(offsetline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(startoffset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(endoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ) .ok() @@ -17626,7 +17626,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17665,11 +17665,11 @@ impl IDebugControl3 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -17696,10 +17696,10 @@ impl IDebugControl3 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -17744,7 +17744,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -17763,7 +17763,7 @@ impl IDebugControl3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(r#in), core::mem::transmute(outtype), core::mem::transmute(out)).ok() @@ -17796,7 +17796,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17851,10 +17851,10 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(specificevents), core::mem::transmute(specificexceptions), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -17869,7 +17869,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -17878,13 +17878,13 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -17901,12 +17901,12 @@ impl IDebugControl3 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -17936,10 +17936,10 @@ impl IDebugControl3 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -17992,10 +17992,10 @@ impl IDebugControl3 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -18007,7 +18007,7 @@ impl IDebugControl3 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -19068,7 +19068,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -19088,7 +19088,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -19133,7 +19133,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -19156,7 +19156,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(endoffset)).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -19174,9 +19174,9 @@ impl IDebugControl4 { lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(offset), core::mem::transmute(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(offsetline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(startoffset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(endoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ) .ok() @@ -19186,7 +19186,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -19225,11 +19225,11 @@ impl IDebugControl4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19256,10 +19256,10 @@ impl IDebugControl4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19304,7 +19304,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -19323,7 +19323,7 @@ impl IDebugControl4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(r#in), core::mem::transmute(outtype), core::mem::transmute(out)).ok() @@ -19356,7 +19356,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -19411,10 +19411,10 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(specificevents), core::mem::transmute(specificexceptions), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -19429,7 +19429,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -19438,13 +19438,13 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -19461,12 +19461,12 @@ impl IDebugControl4 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19496,10 +19496,10 @@ impl IDebugControl4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19552,10 +19552,10 @@ impl IDebugControl4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19567,7 +19567,7 @@ impl IDebugControl4 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -19578,7 +19578,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetNextEventIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(relation), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -19588,7 +19588,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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -19633,7 +19633,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P1) -> windows_core::Result where @@ -19643,7 +19643,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).AssembleWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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)( @@ -19651,15 +19651,15 @@ impl IDebugControl4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -19671,7 +19671,7 @@ impl IDebugControl4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -19732,10 +19732,10 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).GetExtensionFunctionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -19744,7 +19744,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -19753,7 +19753,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -19767,12 +19767,12 @@ impl IDebugControl4 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19786,10 +19786,10 @@ impl IDebugControl4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19812,10 +19812,10 @@ impl IDebugControl4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19823,10 +19823,10 @@ impl IDebugControl4 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -19835,7 +19835,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -19844,25 +19844,25 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), core::mem::transmute(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), core::mem::transmute(platformid), core::mem::transmute(win32major), core::mem::transmute(win32minor), core::mem::transmute(kdmajor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), core::mem::transmute(platformid), core::mem::transmute(win32major), core::mem::transmute(win32minor), core::mem::transmute(kdmajor.unwrap_or(core::mem::zeroed())), core::mem::transmute(kdminor.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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(core::ptr::null())), + core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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())), + core::mem::transmute(framecontexts.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecontextssize), core::mem::transmute(framecontextsentrysize), - core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -19875,20 +19875,20 @@ impl IDebugControl4 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(contextsize), - core::mem::transmute(contextused.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(contextused.unwrap_or(core::mem::zeroed())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), ) .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(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags)).ok() @@ -21357,7 +21357,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -21377,7 +21377,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -21422,7 +21422,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -21445,7 +21445,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(endoffset)).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21463,9 +21463,9 @@ impl IDebugControl5 { lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(offset), core::mem::transmute(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(offsetline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(startoffset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(endoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ) .ok() @@ -21475,7 +21475,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21514,11 +21514,11 @@ impl IDebugControl5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -21545,10 +21545,10 @@ impl IDebugControl5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -21593,7 +21593,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -21612,7 +21612,7 @@ impl IDebugControl5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(r#in), core::mem::transmute(outtype), core::mem::transmute(out)).ok() @@ -21645,7 +21645,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21700,10 +21700,10 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(specificevents), core::mem::transmute(specificexceptions), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -21718,7 +21718,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -21727,13 +21727,13 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -21750,12 +21750,12 @@ impl IDebugControl5 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -21785,10 +21785,10 @@ impl IDebugControl5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -21841,10 +21841,10 @@ impl IDebugControl5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -21856,7 +21856,7 @@ impl IDebugControl5 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -21867,7 +21867,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetNextEventIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(relation), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -21877,7 +21877,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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -21922,7 +21922,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P1) -> windows_core::Result where @@ -21932,7 +21932,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).AssembleWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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)( @@ -21940,15 +21940,15 @@ impl IDebugControl5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -21960,7 +21960,7 @@ impl IDebugControl5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -22021,10 +22021,10 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).GetExtensionFunctionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -22033,7 +22033,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -22042,7 +22042,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -22056,12 +22056,12 @@ impl IDebugControl5 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -22075,10 +22075,10 @@ impl IDebugControl5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -22101,10 +22101,10 @@ impl IDebugControl5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -22112,10 +22112,10 @@ impl IDebugControl5 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -22124,7 +22124,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -22133,25 +22133,25 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), core::mem::transmute(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), core::mem::transmute(platformid), core::mem::transmute(win32major), core::mem::transmute(win32minor), core::mem::transmute(kdmajor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), core::mem::transmute(platformid), core::mem::transmute(win32major), core::mem::transmute(win32minor), core::mem::transmute(kdmajor.unwrap_or(core::mem::zeroed())), core::mem::transmute(kdminor.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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(core::ptr::null())), + core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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())), + core::mem::transmute(framecontexts.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecontextssize), core::mem::transmute(framecontextsentrysize), - core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -22164,26 +22164,26 @@ impl IDebugControl5 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(contextsize), - core::mem::transmute(contextused.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(contextused.unwrap_or(core::mem::zeroed())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), ) .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(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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()), core::mem::transmute(flags)).ok() @@ -22191,14 +22191,14 @@ impl IDebugControl5 { 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(core::ptr::null())), + core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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())), + core::mem::transmute(framecontexts.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecontextssize), core::mem::transmute(framecontextsentrysize), - core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -23714,7 +23714,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -23734,7 +23734,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -23779,7 +23779,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -23802,7 +23802,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(endoffset)).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -23820,9 +23820,9 @@ impl IDebugControl6 { lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(offset), core::mem::transmute(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(offsetline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(startoffset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(endoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ) .ok() @@ -23832,7 +23832,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -23871,11 +23871,11 @@ impl IDebugControl6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -23902,10 +23902,10 @@ impl IDebugControl6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -23950,7 +23950,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -23969,7 +23969,7 @@ impl IDebugControl6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(r#in), core::mem::transmute(outtype), core::mem::transmute(out)).ok() @@ -24002,7 +24002,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -24057,10 +24057,10 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(specificevents), core::mem::transmute(specificexceptions), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -24075,7 +24075,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -24084,13 +24084,13 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -24107,12 +24107,12 @@ impl IDebugControl6 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -24142,10 +24142,10 @@ impl IDebugControl6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -24198,10 +24198,10 @@ impl IDebugControl6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -24213,7 +24213,7 @@ impl IDebugControl6 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -24224,7 +24224,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetNextEventIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(relation), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -24234,7 +24234,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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -24279,7 +24279,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P1) -> windows_core::Result where @@ -24289,7 +24289,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).AssembleWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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)( @@ -24297,15 +24297,15 @@ impl IDebugControl6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -24317,7 +24317,7 @@ impl IDebugControl6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -24378,10 +24378,10 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).GetExtensionFunctionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -24390,7 +24390,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -24399,7 +24399,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -24413,12 +24413,12 @@ impl IDebugControl6 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -24432,10 +24432,10 @@ impl IDebugControl6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -24458,10 +24458,10 @@ impl IDebugControl6 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -24469,10 +24469,10 @@ impl IDebugControl6 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -24481,7 +24481,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -24490,25 +24490,25 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), core::mem::transmute(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), core::mem::transmute(platformid), core::mem::transmute(win32major), core::mem::transmute(win32minor), core::mem::transmute(kdmajor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), core::mem::transmute(platformid), core::mem::transmute(win32major), core::mem::transmute(win32minor), core::mem::transmute(kdmajor.unwrap_or(core::mem::zeroed())), core::mem::transmute(kdminor.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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(core::ptr::null())), + core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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())), + core::mem::transmute(framecontexts.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecontextssize), core::mem::transmute(framecontextsentrysize), - core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -24521,26 +24521,26 @@ impl IDebugControl6 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(contextsize), - core::mem::transmute(contextused.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(contextused.unwrap_or(core::mem::zeroed())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), ) .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(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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()), core::mem::transmute(flags)).ok() @@ -24548,14 +24548,14 @@ impl IDebugControl6 { 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(core::ptr::null())), + core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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())), + core::mem::transmute(framecontexts.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecontextssize), core::mem::transmute(framecontextsentrysize), - core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26098,7 +26098,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -26118,7 +26118,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -26163,7 +26163,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -26186,7 +26186,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(endoffset)).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -26204,9 +26204,9 @@ impl IDebugControl7 { lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(offset), core::mem::transmute(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(offsetline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(startoffset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(endoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ) .ok() @@ -26216,7 +26216,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -26255,11 +26255,11 @@ impl IDebugControl7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26286,10 +26286,10 @@ impl IDebugControl7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26334,7 +26334,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), core::mem::transmute(outputlevel), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -26353,7 +26353,7 @@ impl IDebugControl7 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(r#in), core::mem::transmute(outtype), core::mem::transmute(out)).ok() @@ -26386,7 +26386,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -26441,10 +26441,10 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(specificevents), core::mem::transmute(specificexceptions), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -26459,7 +26459,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -26468,13 +26468,13 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(codes.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -26491,12 +26491,12 @@ impl IDebugControl7 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26526,10 +26526,10 @@ impl IDebugControl7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26582,10 +26582,10 @@ impl IDebugControl7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26597,7 +26597,7 @@ impl IDebugControl7 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -26608,7 +26608,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetNextEventIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(relation), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(append)).ok() } pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -26618,7 +26618,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(core::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::mem::zeroed()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -26663,7 +26663,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), format.param().abi(), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P1) -> windows_core::Result where @@ -26673,7 +26673,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).AssembleWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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())), core::mem::transmute(endoffset)).ok() + (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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)( @@ -26681,15 +26681,15 @@ impl IDebugControl7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P1) -> windows_core::Result<()> where @@ -26701,7 +26701,7 @@ impl IDebugControl7 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), core::mem::transmute(desiredtype), core::mem::transmute(value), core::mem::transmute(remainderindex.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P1, flags: u32) -> windows_core::Result<()> where @@ -26762,10 +26762,10 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).GetExtensionFunctionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -26774,7 +26774,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P1) -> windows_core::Result<()> where @@ -26783,7 +26783,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P1) -> windows_core::Result<()> where @@ -26797,12 +26797,12 @@ impl IDebugControl7 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(descriptionused.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26816,10 +26816,10 @@ impl IDebugControl7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26842,10 +26842,10 @@ impl IDebugControl7 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26853,10 +26853,10 @@ impl IDebugControl7 { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(which), buffer.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -26865,7 +26865,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(flags)).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -26874,25 +26874,25 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), core::mem::transmute(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), core::mem::transmute(platformid), core::mem::transmute(win32major), core::mem::transmute(win32minor), core::mem::transmute(kdmajor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), core::mem::transmute(platformid), core::mem::transmute(win32major), core::mem::transmute(win32minor), core::mem::transmute(kdmajor.unwrap_or(core::mem::zeroed())), core::mem::transmute(kdminor.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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(core::ptr::null())), + core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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())), + core::mem::transmute(framecontexts.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecontextssize), core::mem::transmute(framecontextsentrysize), - core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -26905,26 +26905,26 @@ impl IDebugControl7 { core::mem::transmute(r#type), core::mem::transmute(processid), core::mem::transmute(threadid), - core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(contextsize), - core::mem::transmute(contextused.unwrap_or(core::ptr::null_mut())), - core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(contextused.unwrap_or(core::mem::zeroed())), + core::mem::transmute(extrainformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(extrainformationsize), - core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extrainformationused.unwrap_or(core::mem::zeroed())), ) .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(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(frameoffset), core::mem::transmute(stackoffset), core::mem::transmute(instructionoffset), core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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()), core::mem::transmute(flags)).ok() @@ -26932,14 +26932,14 @@ impl IDebugControl7 { 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(core::ptr::null())), + core::mem::transmute(startcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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())), + core::mem::transmute(framecontexts.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecontextssize), core::mem::transmute(framecontextsentrysize), - core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(framesfilled.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -28479,20 +28479,20 @@ windows_core::imp::define_interface!(IDebugDataSpaces, IDebugDataSpaces_Vtbl, 0x 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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(offset), core::mem::transmute(ptrs.as_ptr())).ok() @@ -28501,22 +28501,22 @@ impl IDebugDataSpaces { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -28526,19 +28526,19 @@ impl IDebugDataSpaces { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), core::mem::transmute(msr), core::mem::transmute(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), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -28714,20 +28714,20 @@ windows_core::imp::define_interface!(IDebugDataSpaces2, IDebugDataSpaces2_Vtbl, 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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(offset), core::mem::transmute(ptrs.as_ptr())).ok() @@ -28736,22 +28736,22 @@ impl IDebugDataSpaces2 { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -28761,35 +28761,35 @@ impl IDebugDataSpaces2 { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), core::mem::transmute(msr), core::mem::transmute(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), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(handle), core::mem::transmute(datatype), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), core::mem::transmute(handle), core::mem::transmute(datatype), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).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<()> { @@ -29023,20 +29023,20 @@ windows_core::imp::define_interface!(IDebugDataSpaces3, IDebugDataSpaces3_Vtbl, 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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(offset), core::mem::transmute(ptrs.as_ptr())).ok() @@ -29045,22 +29045,22 @@ impl IDebugDataSpaces3 { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -29070,35 +29070,35 @@ impl IDebugDataSpaces3 { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), core::mem::transmute(msr), core::mem::transmute(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), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(handle), core::mem::transmute(datatype), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), core::mem::transmute(handle), core::mem::transmute(datatype), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).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<()> { @@ -29109,7 +29109,7 @@ impl IDebugDataSpaces3 { (windows_core::Interface::vtable(self).ReadImageNtHeaders)(windows_core::Interface::as_raw(self), core::mem::transmute(imagebase), core::mem::transmute(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), core::mem::transmute(tag), core::mem::transmute(offset), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(totalsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), core::mem::transmute(offset), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(totalsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn StartEnumTagged(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -29393,20 +29393,20 @@ windows_core::imp::define_interface!(IDebugDataSpaces4, IDebugDataSpaces4_Vtbl, 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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(offset), core::mem::transmute(ptrs.as_ptr())).ok() @@ -29415,22 +29415,22 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), core::mem::transmute(interfacetype), core::mem::transmute(busnumber), core::mem::transmute(addressspace), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -29440,35 +29440,35 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), core::mem::transmute(msr), core::mem::transmute(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), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), core::mem::transmute(busdatatype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(processor), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), core::mem::transmute(processor), core::mem::transmute(index), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(handle), core::mem::transmute(datatype), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), core::mem::transmute(handle), core::mem::transmute(datatype), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(datasize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(size), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(filled.unwrap_or(core::mem::zeroed()))).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<()> { @@ -29479,7 +29479,7 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).ReadImageNtHeaders)(windows_core::Interface::as_raw(self), core::mem::transmute(imagebase), core::mem::transmute(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), core::mem::transmute(tag), core::mem::transmute(offset), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(totalsize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), core::mem::transmute(offset), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(totalsize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn StartEnumTagged(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -29492,7 +29492,7 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).EndEnumTagged)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(space), core::mem::transmute(which), core::mem::transmute(offset), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(space), core::mem::transmute(which), core::mem::transmute(offset), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(infosize.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetNextDifferentlyValidOffsetVirtual(&self, offset: u64) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -29506,22 +29506,22 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).SearchVirtual2)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(length), core::mem::transmute(flags), core::mem::transmute(pattern), core::mem::transmute(patternsize), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ReadMultiByteStringVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(maxbytes), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ReadMultiByteStringVirtualWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(maxbytes), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(maxbytes), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ReadUnicodeStringVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(maxbytes), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ReadUnicodeStringVirtualWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical2)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical2)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -30443,15 +30443,15 @@ impl IDebugFAEntryTags { pub unsafe fn SetType(&self, tag: DEBUG_FLR_PARAM_TYPE, entrytype: FA_ENTRY_TYPE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetType)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), core::mem::transmute(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), core::mem::transmute(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 GetProperties(&self, tag: DEBUG_FLR_PARAM_TYPE, name: Option, namesize: Option<*mut u32>, description: Option, descsize: Option<*mut u32>, flags: Option<*mut u32>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), core::mem::transmute(name.unwrap_or(core::mem::zeroed())), core::mem::transmute(namesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(description.unwrap_or(core::mem::zeroed())), core::mem::transmute(descsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SetProperties(&self, tag: DEBUG_FLR_PARAM_TYPE, name: P1, description: P2, flags: u32) -> windows_core::Result<()> + pub unsafe fn SetProperties(&self, tag: DEBUG_FLR_PARAM_TYPE, name: P1, description: P2, flags: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), name.param().abi(), description.param().abi(), core::mem::transmute(flags)).ok() + (windows_core::Interface::vtable(self).SetProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), name.param().abi(), description.param().abi(), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetTagByName(&self, pluginid: P0, tagname: P1) -> windows_core::Result where @@ -30572,7 +30572,7 @@ impl IDebugFailureAnalysis { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), core::mem::transmute(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(core::ptr::null()))) + (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::mem::zeroed()))) } } #[repr(C)] @@ -30693,7 +30693,7 @@ impl IDebugFailureAnalysis2 { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), core::mem::transmute(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(core::ptr::null()))) + (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::mem::zeroed()))) } pub unsafe fn SetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: P1) -> *mut FA_ENTRY where @@ -30980,7 +30980,7 @@ impl IDebugFailureAnalysis3 { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), core::mem::transmute(tag), core::mem::transmute(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(core::ptr::null()))) + (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::mem::zeroed()))) } pub unsafe fn SetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: P1) -> *mut FA_ENTRY where @@ -31778,7 +31778,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(core::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::mem::zeroed()))).ok() } pub unsafe fn EvaluateExtendedExpression(&self, context: P0, expression: P1, bindingcontext: P2, result: *mut Option, metadata: Option<*mut Option>) -> windows_core::Result<()> where @@ -31786,7 +31786,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -31834,7 +31834,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -32015,13 +32015,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), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReadPointers(&self, context: P0, location: Location, pointers: &mut [u64]) -> windows_core::Result<()> where @@ -32163,7 +32163,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(core::ptr::null_mut())), core::mem::transmute(productversion.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(fileversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(productversion.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FindTypeByName(&self, typename: P0) -> windows_core::Result where @@ -32898,7 +32898,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(core::ptr::null_mut())), core::mem::transmute(carriertype.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIntrinsicType)(windows_core::Interface::as_raw(self), core::mem::transmute(intrinsickind.unwrap_or(core::mem::zeroed())), core::mem::transmute(carriertype.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(lsboffield), core::mem::transmute(lengthoffield)).ok() @@ -33324,7 +33324,7 @@ impl IDebugHostTypeSignature { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).IsMatch)(windows_core::Interface::as_raw(self), r#type.param().abi(), core::mem::transmute(ismatch), core::mem::transmute(wildcardmatches.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsMatch)(windows_core::Interface::as_raw(self), r#type.param().abi(), core::mem::transmute(ismatch), core::mem::transmute(wildcardmatches.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn CompareAgainst(&self, typesignature: P0) -> windows_core::Result where @@ -33844,7 +33844,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(desc.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetIndexByName(&self, name: P0) -> windows_core::Result where @@ -33860,10 +33860,10 @@ impl IDebugRegisters { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(register), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(values)).ok() + (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(values)).ok() + (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -34013,7 +34013,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(desc.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetIndexByName(&self, name: P0) -> windows_core::Result where @@ -34029,10 +34029,10 @@ impl IDebugRegisters2 { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), core::mem::transmute(register), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(values)).ok() + (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(values)).ok() + (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(outputcontrol), core::mem::transmute(flags)).ok() @@ -34050,7 +34050,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(desc.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetIndexByNameWide(&self, name: P0) -> windows_core::Result where @@ -34064,10 +34064,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetPseudoDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(typemodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(typeid.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetPseudoDescriptionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(typemodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(typeid.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetPseudoIndexByName(&self, name: P0) -> windows_core::Result where @@ -34084,16 +34084,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), core::mem::transmute(source), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(values)).ok() + (windows_core::Interface::vtable(self).GetPseudoValues)(windows_core::Interface::as_raw(self), core::mem::transmute(source), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(source), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(values)).ok() + (windows_core::Interface::vtable(self).SetPseudoValues)(windows_core::Interface::as_raw(self), core::mem::transmute(source), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(source), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(values)).ok() + (windows_core::Interface::vtable(self).GetValues2)(windows_core::Interface::as_raw(self), core::mem::transmute(source), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(source), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(values)).ok() + (windows_core::Interface::vtable(self).SetValues2)(windows_core::Interface::as_raw(self), core::mem::transmute(source), core::mem::transmute(count), core::mem::transmute(indices.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(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), core::mem::transmute(outputcontrol), core::mem::transmute(source), core::mem::transmute(flags)).ok() @@ -34405,7 +34405,7 @@ impl IDebugSymbolGroup { (windows_core::Interface::vtable(self).RemoveSymbolByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(start), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() @@ -34548,7 +34548,7 @@ impl IDebugSymbolGroup2 { (windows_core::Interface::vtable(self).RemoveSymbolByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(start), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() @@ -34587,7 +34587,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn WriteSymbolWide(&self, index: u32, value: P1) -> windows_core::Result<()> where @@ -34602,10 +34602,10 @@ impl IDebugSymbolGroup2 { (windows_core::Interface::vtable(self).OutputAsTypeWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolTypeName)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolTypeNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSymbolSize(&self, index: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -34620,10 +34620,10 @@ impl IDebugSymbolGroup2 { (windows_core::Interface::vtable(self).GetSymbolRegister)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolValueText)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolValueTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(entry)).ok() @@ -34848,7 +34848,7 @@ impl IDebugSymbols { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -34858,10 +34858,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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -34881,10 +34881,10 @@ impl IDebugSymbols { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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)( @@ -34893,18 +34893,18 @@ impl IDebugSymbols { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -34914,7 +34914,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), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -34938,34 +34938,34 @@ impl IDebugSymbols { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontextsize)).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -34989,7 +34989,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(handle)).ok() @@ -35001,7 +35001,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -35016,7 +35016,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -35031,10 +35031,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(core::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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -35052,13 +35052,13 @@ impl IDebugSymbols { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(flags), core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -35518,7 +35518,7 @@ impl IDebugSymbols2 { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -35528,10 +35528,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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -35551,10 +35551,10 @@ impl IDebugSymbols2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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)( @@ -35563,18 +35563,18 @@ impl IDebugSymbols2 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -35584,7 +35584,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), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -35608,34 +35608,34 @@ impl IDebugSymbols2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontextsize)).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -35659,7 +35659,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(handle)).ok() @@ -35671,7 +35671,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -35686,7 +35686,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -35701,10 +35701,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(core::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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -35722,28 +35722,28 @@ impl IDebugSymbols2 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(flags), core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P2, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -36278,7 +36278,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -36288,10 +36288,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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -36311,10 +36311,10 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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)( @@ -36323,18 +36323,18 @@ impl IDebugSymbols3 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -36344,7 +36344,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), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -36368,34 +36368,34 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontextsize)).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -36419,7 +36419,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(handle)).ok() @@ -36431,7 +36431,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -36446,7 +36446,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -36461,10 +36461,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(core::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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -36482,28 +36482,28 @@ impl IDebugSymbols3 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(flags), core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P2, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -36519,7 +36519,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -36529,10 +36529,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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P1) -> windows_core::Result where @@ -36545,7 +36545,7 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -36555,7 +36555,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), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P1) -> windows_core::Result where @@ -36575,7 +36575,7 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P1) -> windows_core::Result where @@ -36596,7 +36596,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -36605,7 +36605,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -36620,7 +36620,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -36635,10 +36635,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(core::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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -36656,28 +36656,28 @@ impl IDebugSymbols3 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(flags), core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P2, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(base)).ok() @@ -36686,16 +36686,16 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P2, modulename: P3, flags: u32) -> windows_core::Result<()> where @@ -36731,49 +36731,49 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), core::mem::transmute(flags), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bufferneeded.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(bufferneeded.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetFieldTypeAndOffset(&self, module: u64, containertypeid: u32, field: P2, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(containertypeid), field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetFieldTypeAndOffsetWide(&self, module: u64, containertypeid: u32, field: P2, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(containertypeid), field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticSymbol(&self, offset: u64, size: u32, name: P2, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticSymbolWide(&self, offset: u64, size: u32, name: P2, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(core::ptr::null_mut())), core::mem::transmute(idscount), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacements.unwrap_or(core::mem::zeroed())), core::mem::transmute(idscount), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(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::mem::zeroed()))).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(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -36783,41 +36783,41 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(fromid), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P1, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P1, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(fromentry), core::mem::transmute(flags), core::mem::transmute(toentry)).ok() @@ -37870,7 +37870,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -37880,10 +37880,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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -37903,10 +37903,10 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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)( @@ -37915,18 +37915,18 @@ impl IDebugSymbols4 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -37936,7 +37936,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), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -37960,34 +37960,34 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontextsize)).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -38011,7 +38011,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(handle)).ok() @@ -38023,7 +38023,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -38038,7 +38038,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -38053,10 +38053,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(core::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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -38074,28 +38074,28 @@ impl IDebugSymbols4 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(flags), core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P2, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -38111,7 +38111,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -38121,10 +38121,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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P1) -> windows_core::Result where @@ -38137,7 +38137,7 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -38147,7 +38147,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), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P1) -> windows_core::Result where @@ -38167,7 +38167,7 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P1) -> windows_core::Result where @@ -38188,7 +38188,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -38197,7 +38197,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -38212,7 +38212,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -38227,10 +38227,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(core::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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -38248,28 +38248,28 @@ impl IDebugSymbols4 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(flags), core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P2, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(base)).ok() @@ -38278,16 +38278,16 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P2, modulename: P3, flags: u32) -> windows_core::Result<()> where @@ -38323,49 +38323,49 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), core::mem::transmute(flags), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bufferneeded.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(bufferneeded.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetFieldTypeAndOffset(&self, module: u64, containertypeid: u32, field: P2, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(containertypeid), field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetFieldTypeAndOffsetWide(&self, module: u64, containertypeid: u32, field: P2, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(containertypeid), field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticSymbol(&self, offset: u64, size: u32, name: P2, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticSymbolWide(&self, offset: u64, size: u32, name: P2, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(core::ptr::null_mut())), core::mem::transmute(idscount), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacements.unwrap_or(core::mem::zeroed())), core::mem::transmute(idscount), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(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::mem::zeroed()))).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(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -38375,62 +38375,62 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(fromid), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P1, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P1, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(fromentry), core::mem::transmute(flags), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).GetScopeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(inlinecontext), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(inlinecontext), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags), core::mem::transmute(offset), core::mem::transmute(inlinecontext)).ok() @@ -39532,7 +39532,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -39542,10 +39542,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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P1) -> windows_core::Result where @@ -39565,10 +39565,10 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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)( @@ -39577,18 +39577,18 @@ impl IDebugSymbols5 { core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::mem::zeroed())), ) .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), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::ptr::null())), core::mem::transmute(start), core::mem::transmute(params)).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(count), core::mem::transmute(bases.unwrap_or(core::mem::zeroed())), core::mem::transmute(start), core::mem::transmute(params)).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -39598,7 +39598,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), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P1) -> windows_core::Result where @@ -39622,34 +39622,34 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(offset), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontextsize)).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -39673,7 +39673,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(handle)).ok() @@ -39685,7 +39685,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -39700,7 +39700,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -39715,10 +39715,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(core::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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -39736,28 +39736,28 @@ impl IDebugSymbols5 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(flags), core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P2, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -39773,7 +39773,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -39783,10 +39783,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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P1) -> windows_core::Result where @@ -39799,7 +39799,7 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -39809,7 +39809,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), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P1) -> windows_core::Result where @@ -39829,7 +39829,7 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(typeid), core::mem::transmute(module.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P1) -> windows_core::Result where @@ -39850,7 +39850,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -39859,7 +39859,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -39874,7 +39874,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -39889,10 +39889,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(core::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::mem::zeroed()))).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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -39910,28 +39910,28 @@ impl IDebugSymbols5 { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(startelement), file.param().abi(), core::mem::transmute(flags), core::mem::transmute(foundelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_deref().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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P2, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(base), item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(verinfosize.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(which), core::mem::transmute(index), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(typeid), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(index), core::mem::transmute(base)).ok() @@ -39940,16 +39940,16 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(startindex), core::mem::transmute(flags), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(base.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P2, modulename: P3, flags: u32) -> windows_core::Result<()> where @@ -39985,49 +39985,49 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), core::mem::transmute(flags), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bufferneeded.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(bufferneeded.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetFieldTypeAndOffset(&self, module: u64, containertypeid: u32, field: P2, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(containertypeid), field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetFieldTypeAndOffsetWide(&self, module: u64, containertypeid: u32, field: P2, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), core::mem::transmute(module), core::mem::transmute(containertypeid), field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::mem::zeroed())), core::mem::transmute(offset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticSymbol(&self, offset: u64, size: u32, name: P2, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddSyntheticSymbolWide(&self, offset: u64, size: u32, name: P2, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(size), name.param().abi(), core::mem::transmute(flags), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(core::ptr::null_mut())), core::mem::transmute(idscount), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(flags), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(displacements.unwrap_or(core::mem::zeroed())), core::mem::transmute(idscount), core::mem::transmute(entries.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(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::mem::zeroed()))).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(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -40037,62 +40037,62 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(id), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(fromid), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P1, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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::mem::zeroed()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P1, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), core::mem::transmute(line), file.param().abi(), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(entry), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), core::mem::transmute(entry), core::mem::transmute(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::mem::zeroed()))).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), core::mem::transmute(fromentry), core::mem::transmute(flags), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).GetScopeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontextsize)).ok() + (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset), core::mem::transmute(scopeframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(scopecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(inlinecontext), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(offset), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(offset), core::mem::transmute(inlinecontext), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), 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::mem::zeroed())), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(outputcontrol), core::mem::transmute(flags), core::mem::transmute(offset), core::mem::transmute(inlinecontext)).ok() @@ -41237,7 +41237,7 @@ impl IDebugSystemObjects { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(total), core::mem::transmute(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), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -41280,7 +41280,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), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -41315,7 +41315,7 @@ impl IDebugSystemObjects { (windows_core::Interface::vtable(self).GetProcessIdByHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -41709,7 +41709,7 @@ impl IDebugSystemObjects2 { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(total), core::mem::transmute(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), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -41752,7 +41752,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), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -41787,7 +41787,7 @@ impl IDebugSystemObjects2 { (windows_core::Interface::vtable(self).GetProcessIdByHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -42252,7 +42252,7 @@ impl IDebugSystemObjects3 { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(total), core::mem::transmute(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), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -42295,7 +42295,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), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -42330,7 +42330,7 @@ impl IDebugSystemObjects3 { (windows_core::Interface::vtable(self).GetProcessIdByHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -42380,7 +42380,7 @@ impl IDebugSystemObjects3 { (windows_core::Interface::vtable(self).GetSystemByServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -42920,7 +42920,7 @@ impl IDebugSystemObjects4 { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), core::mem::transmute(total), core::mem::transmute(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), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -42963,7 +42963,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), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(start), core::mem::transmute(count), core::mem::transmute(ids.unwrap_or(core::mem::zeroed())), core::mem::transmute(sysids.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -42998,7 +42998,7 @@ impl IDebugSystemObjects4 { (windows_core::Interface::vtable(self).GetProcessIdByHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -43048,13 +43048,13 @@ impl IDebugSystemObjects4 { (windows_core::Interface::vtable(self).GetSystemByServer)(windows_core::Interface::as_raw(self), core::mem::transmute(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(core::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::mem::zeroed()))).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(core::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::mem::zeroed()))).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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -43582,7 +43582,7 @@ impl IDynamicConceptProviderConcept { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), contextobject.param().abi(), core::mem::transmute(conceptid), core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(hasconcept)).ok() + (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), contextobject.param().abi(), core::mem::transmute(conceptid), core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(core::mem::zeroed())), core::mem::transmute(hasconcept)).ok() } pub unsafe fn SetConcept(&self, contextobject: P0, conceptid: *const windows_core::GUID, conceptinterface: P2, conceptmetadata: P3) -> windows_core::Result<()> where @@ -43668,7 +43668,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(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() + (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::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed())), core::mem::transmute(haskey.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetKey(&self, contextobject: P0, key: P1, keyvalue: P2, metadata: P3) -> windows_core::Result<()> where @@ -43862,7 +43862,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetAt(&self, contextobject: P0, indexers: &[Option], value: P3) -> windows_core::Result<()> where @@ -43984,7 +43984,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(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -44021,7 +44021,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(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetKey(&self, key: P0, object: P1, metadata: P2) -> windows_core::Result<()> where @@ -44035,7 +44035,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(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetKeyValue(&self, key: P0, object: P1) -> windows_core::Result<()> where @@ -44107,7 +44107,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -44153,10 +44153,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(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetKey(&self, object: P0, metadata: P1) -> windows_core::Result<()> where @@ -44300,7 +44300,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -44349,7 +44349,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(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetKeyValue(&self, key: P0, object: P1) -> windows_core::Result<()> where @@ -44382,7 +44382,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), core::mem::transmute(conceptid), core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), core::mem::transmute(conceptid), core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetLocation(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -44419,13 +44419,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(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(metadata.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetKey(&self, key: P0, object: P1, metadata: P2) -> windows_core::Result<()> where @@ -44485,7 +44485,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(core::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::mem::zeroed()))).ok() } pub unsafe fn IsEqualTo(&self, other: P0) -> windows_core::Result where @@ -45088,7 +45088,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(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() + (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(name.unwrap_or(core::mem::zeroed())), core::mem::transmute(kind.unwrap_or(core::mem::zeroed())), core::mem::transmute(value.unwrap_or(core::mem::zeroed()))).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 87a52730e8..0bea076d3a 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 @@ -30,22 +30,19 @@ where BindImage(imagename.param().abi(), dllpath.param().abi(), symbolpath.param().abi()).ok() } #[inline] -pub unsafe fn BindImageEx(flags: u32, imagename: P1, dllpath: P2, symbolpath: P3, statusroutine: PIMAGEHLP_STATUS_ROUTINE) -> windows_core::Result<()> +pub unsafe fn BindImageEx(flags: u32, imagename: P1, dllpath: P2, symbolpath: P3, statusroutine: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn BindImageEx(flags : u32, imagename : windows_core::PCSTR, dllpath : windows_core::PCSTR, symbolpath : windows_core::PCSTR, statusroutine : PIMAGEHLP_STATUS_ROUTINE) -> super::super::super::Foundation:: BOOL); - BindImageEx(core::mem::transmute(flags), imagename.param().abi(), dllpath.param().abi(), symbolpath.param().abi(), core::mem::transmute(statusroutine)).ok() + BindImageEx(core::mem::transmute(flags), imagename.param().abi(), dllpath.param().abi(), symbolpath.param().abi(), core::mem::transmute(statusroutine.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CheckRemoteDebuggerPresent(hprocess: P0, pbdebuggerpresent: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CheckRemoteDebuggerPresent(hprocess: super::super::super::Foundation::HANDLE, pbdebuggerpresent: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CheckRemoteDebuggerPresent(hprocess : super::super::super::Foundation:: HANDLE, pbdebuggerpresent : *mut super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - CheckRemoteDebuggerPresent(hprocess.param().abi(), core::mem::transmute(pbdebuggerpresent)).ok() + CheckRemoteDebuggerPresent(core::mem::transmute(hprocess), core::mem::transmute(pbdebuggerpresent)).ok() } #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_System_SystemInformation")] @@ -67,12 +64,9 @@ pub unsafe fn CloseThreadWaitChainSession(wcthandle: *const core::ffi::c_void) { CloseThreadWaitChainSession(core::mem::transmute(wcthandle)) } #[inline] -pub unsafe fn ContinueDebugEvent(dwprocessid: u32, dwthreadid: u32, dwcontinuestatus: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn ContinueDebugEvent(dwprocessid: u32, dwthreadid: u32, dwcontinuestatus: super::super::super::Foundation::NTSTATUS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ContinueDebugEvent(dwprocessid : u32, dwthreadid : u32, dwcontinuestatus : super::super::super::Foundation:: NTSTATUS) -> super::super::super::Foundation:: BOOL); - ContinueDebugEvent(core::mem::transmute(dwprocessid), core::mem::transmute(dwthreadid), dwcontinuestatus.param().abi()).ok() + ContinueDebugEvent(core::mem::transmute(dwprocessid), core::mem::transmute(dwthreadid), core::mem::transmute(dwcontinuestatus)).ok() } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -86,7 +80,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(), core::mem::transmute(callback), core::mem::transmute(userdata.unwrap_or(core::ptr::null()))) + DbgHelpCreateUserDump(filename.param().abi(), core::mem::transmute(callback), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))) } #[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 +88,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(), core::mem::transmute(callback), core::mem::transmute(userdata.unwrap_or(core::ptr::null()))) + DbgHelpCreateUserDumpW(filename.param().abi(), core::mem::transmute(callback), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DebugActiveProcess(dwprocessid: u32) -> windows_core::Result<()> { @@ -112,12 +106,9 @@ pub unsafe fn DebugBreak() { DebugBreak() } #[inline] -pub unsafe fn DebugBreakProcess(process: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DebugBreakProcess(process: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DebugBreakProcess(process : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - DebugBreakProcess(process.param().abi()).ok() + DebugBreakProcess(core::mem::transmute(process)).ok() } #[inline] pub unsafe fn DebugSetProcessKillOnExit(killonexit: P0) -> windows_core::Result<()> @@ -130,99 +121,76 @@ 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(core::ptr::null()))) + DecodePointer(core::mem::transmute(ptr.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DecodeRemotePointer(processhandle: P0, ptr: Option<*const core::ffi::c_void>, decodedptr: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DecodeRemotePointer(processhandle: super::super::super::Foundation::HANDLE, ptr: Option<*const core::ffi::c_void>, decodedptr: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(decodedptr)).ok() + DecodeRemotePointer(core::mem::transmute(processhandle), core::mem::transmute(ptr.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null()))) + DecodeSystemPointer(core::mem::transmute(ptr.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + EncodePointer(core::mem::transmute(ptr.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn EncodeRemotePointer(processhandle: P0, ptr: Option<*const core::ffi::c_void>, encodedptr: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EncodeRemotePointer(processhandle: super::super::super::Foundation::HANDLE, ptr: Option<*const core::ffi::c_void>, encodedptr: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(encodedptr)).ok() + EncodeRemotePointer(core::mem::transmute(processhandle), core::mem::transmute(ptr.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null()))) + EncodeSystemPointer(core::mem::transmute(ptr.unwrap_or(core::mem::zeroed()))) } #[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<()> +pub unsafe fn EnumDirTree(hprocess: Option, rootpath: P1, inputpathname: P2, outputpathbuffer: Option, cb: Option, data: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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), core::mem::transmute(cb), core::mem::transmute(data.unwrap_or(core::ptr::null()))).ok() + EnumDirTree(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), rootpath.param().abi(), inputpathname.param().abi(), core::mem::transmute(outputpathbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cb.unwrap_or(core::mem::zeroed())), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))).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<()> +pub unsafe fn EnumDirTreeW(hprocess: Option, rootpath: P1, inputpathname: P2, outputpathbuffer: Option, cb: Option, data: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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), core::mem::transmute(cb), core::mem::transmute(data.unwrap_or(core::ptr::null()))).ok() + EnumDirTreeW(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), rootpath.param().abi(), inputpathname.param().abi(), core::mem::transmute(outputpathbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cb.unwrap_or(core::mem::zeroed())), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn EnumerateLoadedModules(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumerateLoadedModules(hprocess: super::super::super::Foundation::HANDLE, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + EnumerateLoadedModules(core::mem::transmute(hprocess), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn EnumerateLoadedModules64(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumerateLoadedModules64(hprocess: super::super::super::Foundation::HANDLE, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + EnumerateLoadedModules64(core::mem::transmute(hprocess), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn EnumerateLoadedModulesEx(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumerateLoadedModulesEx(hprocess: super::super::super::Foundation::HANDLE, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + EnumerateLoadedModulesEx(core::mem::transmute(hprocess), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn EnumerateLoadedModulesExW(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumerateLoadedModulesExW(hprocess: super::super::super::Foundation::HANDLE, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + EnumerateLoadedModulesExW(core::mem::transmute(hprocess), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn EnumerateLoadedModulesW64(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumerateLoadedModulesW64(hprocess: super::super::super::Foundation::HANDLE, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + EnumerateLoadedModulesW64(core::mem::transmute(hprocess), core::mem::transmute(enumloadedmodulescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn FatalAppExitA(uaction: u32, lpmessagetext: P1) @@ -256,23 +224,23 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindDebugInfoFileEx(filename: P0, symbolpath: P1, debugfilepath: windows_core::PSTR, callback: PFIND_DEBUG_FILE_CALLBACK, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn FindDebugInfoFileEx(filename: P0, symbolpath: P1, debugfilepath: windows_core::PSTR, callback: Option, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result where P0: windows_core::Param, 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), core::mem::transmute(callback), core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); + let result__ = FindDebugInfoFileEx(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(debugfilepath), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callerdata.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindDebugInfoFileExW(filename: P0, symbolpath: P1, debugfilepath: windows_core::PWSTR, callback: PFIND_DEBUG_FILE_CALLBACKW, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn FindDebugInfoFileExW(filename: P0, symbolpath: P1, debugfilepath: windows_core::PWSTR, callback: Option, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result where P0: windows_core::Param, 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), core::mem::transmute(callback), core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); + let result__ = FindDebugInfoFileExW(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(debugfilepath), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callerdata.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -286,62 +254,57 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindExecutableImageEx(filename: P0, symbolpath: P1, imagefilepath: windows_core::PSTR, callback: PFIND_EXE_FILE_CALLBACK, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn FindExecutableImageEx(filename: P0, symbolpath: P1, imagefilepath: windows_core::PSTR, callback: Option, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result where P0: windows_core::Param, 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), core::mem::transmute(callback), core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); + let result__ = FindExecutableImageEx(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(imagefilepath), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callerdata.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindExecutableImageExW(filename: P0, symbolpath: P1, imagefilepath: windows_core::PWSTR, callback: PFIND_EXE_FILE_CALLBACKW, callerdata: *const core::ffi::c_void) -> windows_core::Result +pub unsafe fn FindExecutableImageExW(filename: P0, symbolpath: P1, imagefilepath: windows_core::PWSTR, callback: Option, callerdata: *const core::ffi::c_void) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindExecutableImageExW(filename : windows_core::PCWSTR, symbolpath : windows_core::PCWSTR, imagefilepath : windows_core::PWSTR, callback : PFIND_EXE_FILE_CALLBACKW, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = FindExecutableImageExW(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(imagefilepath), core::mem::transmute(callback), core::mem::transmute(callerdata)); + let result__ = FindExecutableImageExW(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(imagefilepath), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callerdata)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindFileInPath(hprocess: P0, searchpatha: P1, filename: P2, id: *const core::ffi::c_void, two: u32, three: u32, flags: u32, filepath: windows_core::PSTR) -> super::super::super::Foundation::BOOL +pub unsafe fn FindFileInPath(hprocess: super::super::super::Foundation::HANDLE, searchpatha: P1, filename: P2, id: *const core::ffi::c_void, two: u32, three: u32, flags: u32, filepath: windows_core::PSTR) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindFileInPath(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 : u32, filepath : windows_core::PSTR) -> super::super::super::Foundation:: BOOL); - FindFileInPath(hprocess.param().abi(), searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(id), core::mem::transmute(two), core::mem::transmute(three), core::mem::transmute(flags), core::mem::transmute(filepath)) + FindFileInPath(core::mem::transmute(hprocess), searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(id), core::mem::transmute(two), core::mem::transmute(three), core::mem::transmute(flags), core::mem::transmute(filepath)) } #[inline] -pub unsafe fn FindFileInSearchPath(hprocess: P0, searchpatha: P1, filename: P2, one: u32, two: u32, three: u32, filepath: windows_core::PSTR) -> super::super::super::Foundation::BOOL +pub unsafe fn FindFileInSearchPath(hprocess: super::super::super::Foundation::HANDLE, searchpatha: P1, filename: P2, one: u32, two: u32, three: u32, filepath: windows_core::PSTR) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindFileInSearchPath(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : windows_core::PCSTR, filename : windows_core::PCSTR, one : u32, two : u32, three : u32, filepath : windows_core::PSTR) -> super::super::super::Foundation:: BOOL); - FindFileInSearchPath(hprocess.param().abi(), searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(one), core::mem::transmute(two), core::mem::transmute(three), core::mem::transmute(filepath)) + FindFileInSearchPath(core::mem::transmute(hprocess), searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(one), core::mem::transmute(two), core::mem::transmute(three), core::mem::transmute(filepath)) } #[inline] -pub unsafe fn FlushInstructionCache(hprocess: P0, lpbaseaddress: Option<*const core::ffi::c_void>, dwsize: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FlushInstructionCache(hprocess: super::super::super::Foundation::HANDLE, lpbaseaddress: Option<*const core::ffi::c_void>, dwsize: usize) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(dwsize)).ok() + FlushInstructionCache(core::mem::transmute(hprocess), core::mem::transmute(lpbaseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(dwflags), core::mem::transmute(lpsource.unwrap_or(core::ptr::null())), core::mem::transmute(dwmessageid), core::mem::transmute(dwlanguageid), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(arguments.unwrap_or(core::ptr::null()))) + FormatMessageA(core::mem::transmute(dwflags), core::mem::transmute(lpsource.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmessageid), core::mem::transmute(dwlanguageid), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(arguments.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dwflags), core::mem::transmute(lpsource.unwrap_or(core::ptr::null())), core::mem::transmute(dwmessageid), core::mem::transmute(dwlanguageid), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(arguments.unwrap_or(core::ptr::null()))) + FormatMessageW(core::mem::transmute(dwflags), core::mem::transmute(lpsource.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmessageid), core::mem::transmute(dwlanguageid), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(arguments.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[inline] @@ -381,12 +344,9 @@ pub unsafe fn GetSymLoadError() -> u32 { } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn GetThreadContext(hthread: P0, lpcontext: *mut CONTEXT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadContext(hthread: super::super::super::Foundation::HANDLE, lpcontext: *mut CONTEXT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetThreadContext(hthread : super::super::super::Foundation:: HANDLE, lpcontext : *mut CONTEXT) -> super::super::super::Foundation:: BOOL); - GetThreadContext(hthread.param().abi(), core::mem::transmute(lpcontext)).ok() + GetThreadContext(core::mem::transmute(hthread), core::mem::transmute(lpcontext)).ok() } #[inline] pub unsafe fn GetThreadErrorMode() -> u32 { @@ -394,25 +354,19 @@ pub unsafe fn GetThreadErrorMode() -> u32 { GetThreadErrorMode() } #[inline] -pub unsafe fn GetThreadSelectorEntry(hthread: P0, dwselector: u32, lpselectorentry: *mut LDT_ENTRY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadSelectorEntry(hthread: super::super::super::Foundation::HANDLE, dwselector: u32, lpselectorentry: *mut LDT_ENTRY) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetThreadSelectorEntry(hthread : super::super::super::Foundation:: HANDLE, dwselector : u32, lpselectorentry : *mut LDT_ENTRY) -> super::super::super::Foundation:: BOOL); - GetThreadSelectorEntry(hthread.param().abi(), core::mem::transmute(dwselector), core::mem::transmute(lpselectorentry)).ok() + GetThreadSelectorEntry(core::mem::transmute(hthread), core::mem::transmute(dwselector), core::mem::transmute(lpselectorentry)).ok() } #[inline] -pub unsafe fn GetThreadWaitChain(wcthandle: *const core::ffi::c_void, context: usize, flags: WAIT_CHAIN_THREAD_OPTIONS, threadid: u32, nodecount: *mut u32, nodeinfoarray: *mut WAITCHAIN_NODE_INFO, iscycle: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { +pub unsafe fn GetThreadWaitChain(wcthandle: *const core::ffi::c_void, context: Option, flags: WAIT_CHAIN_THREAD_OPTIONS, threadid: u32, nodecount: *mut u32, nodeinfoarray: *mut WAITCHAIN_NODE_INFO, iscycle: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetThreadWaitChain(wcthandle : *const core::ffi::c_void, context : usize, flags : WAIT_CHAIN_THREAD_OPTIONS, threadid : u32, nodecount : *mut u32, nodeinfoarray : *mut WAITCHAIN_NODE_INFO, iscycle : *mut super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - GetThreadWaitChain(core::mem::transmute(wcthandle), core::mem::transmute(context), core::mem::transmute(flags), core::mem::transmute(threadid), core::mem::transmute(nodecount), core::mem::transmute(nodeinfoarray), core::mem::transmute(iscycle)).ok() + GetThreadWaitChain(core::mem::transmute(wcthandle), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(threadid), core::mem::transmute(nodecount), core::mem::transmute(nodeinfoarray), core::mem::transmute(iscycle)).ok() } #[inline] -pub unsafe fn GetTimestampForLoadedLibrary(module: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetTimestampForLoadedLibrary(module: super::super::super::Foundation::HMODULE) -> u32 { windows_targets::link!("dbghelp.dll" "system" fn GetTimestampForLoadedLibrary(module : super::super::super::Foundation:: HMODULE) -> u32); - GetTimestampForLoadedLibrary(module.param().abi()) + GetTimestampForLoadedLibrary(core::mem::transmute(module)) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_Kernel")] @@ -423,12 +377,9 @@ pub unsafe fn GetXStateFeaturesMask(context: *const CONTEXT, featuremask: *mut u } #[cfg(feature = "Win32_Security_WinTrust")] #[inline] -pub unsafe fn ImageAddCertificate(filehandle: P0, certificate: *const super::super::super::Security::WinTrust::WIN_CERTIFICATE, index: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImageAddCertificate(filehandle: super::super::super::Foundation::HANDLE, certificate: *const super::super::super::Security::WinTrust::WIN_CERTIFICATE, index: *mut u32) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn ImageAddCertificate(filehandle : super::super::super::Foundation:: HANDLE, certificate : *const super::super::super::Security::WinTrust:: WIN_CERTIFICATE, index : *mut u32) -> super::super::super::Foundation:: BOOL); - ImageAddCertificate(filehandle.param().abi(), core::mem::transmute(certificate), core::mem::transmute(index)).ok() + ImageAddCertificate(core::mem::transmute(filehandle), core::mem::transmute(certificate), core::mem::transmute(index)).ok() } #[inline] pub unsafe fn ImageDirectoryEntryToData(base: *const core::ffi::c_void, mappedasimage: P1, directoryentry: IMAGE_DIRECTORY_ENTRY, size: *mut u32) -> *mut core::ffi::c_void @@ -444,41 +395,29 @@ where P1: 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(core::mem::transmute(base), mappedasimage.param().abi(), core::mem::transmute(directoryentry), core::mem::transmute(size), core::mem::transmute(foundheader.unwrap_or(core::ptr::null_mut()))) + ImageDirectoryEntryToDataEx(core::mem::transmute(base), mappedasimage.param().abi(), core::mem::transmute(directoryentry), core::mem::transmute(size), core::mem::transmute(foundheader.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ImageEnumerateCertificates(filehandle: P0, typefilter: u16, certificatecount: *mut u32, indices: Option<&mut [u32]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImageEnumerateCertificates(filehandle: super::super::super::Foundation::HANDLE, typefilter: u16, certificatecount: *mut u32, indices: Option<&mut [u32]>) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn ImageEnumerateCertificates(filehandle : super::super::super::Foundation:: HANDLE, typefilter : u16, certificatecount : *mut u32, indices : *mut u32, indexcount : u32) -> super::super::super::Foundation:: BOOL); - ImageEnumerateCertificates(filehandle.param().abi(), core::mem::transmute(typefilter), core::mem::transmute(certificatecount), core::mem::transmute(indices.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), indices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() + ImageEnumerateCertificates(core::mem::transmute(filehandle), core::mem::transmute(typefilter), core::mem::transmute(certificatecount), core::mem::transmute(indices.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), indices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[cfg(feature = "Win32_Security_WinTrust")] #[inline] -pub unsafe fn ImageGetCertificateData(filehandle: P0, certificateindex: u32, certificate: *mut super::super::super::Security::WinTrust::WIN_CERTIFICATE, requiredlength: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImageGetCertificateData(filehandle: super::super::super::Foundation::HANDLE, certificateindex: u32, certificate: *mut super::super::super::Security::WinTrust::WIN_CERTIFICATE, requiredlength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn ImageGetCertificateData(filehandle : super::super::super::Foundation:: HANDLE, certificateindex : u32, certificate : *mut super::super::super::Security::WinTrust:: WIN_CERTIFICATE, requiredlength : *mut u32) -> super::super::super::Foundation:: BOOL); - ImageGetCertificateData(filehandle.param().abi(), core::mem::transmute(certificateindex), core::mem::transmute(certificate), core::mem::transmute(requiredlength)).ok() + ImageGetCertificateData(core::mem::transmute(filehandle), core::mem::transmute(certificateindex), core::mem::transmute(certificate), core::mem::transmute(requiredlength)).ok() } #[cfg(feature = "Win32_Security_WinTrust")] #[inline] -pub unsafe fn ImageGetCertificateHeader(filehandle: P0, certificateindex: u32, certificateheader: *mut super::super::super::Security::WinTrust::WIN_CERTIFICATE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImageGetCertificateHeader(filehandle: super::super::super::Foundation::HANDLE, certificateindex: u32, certificateheader: *mut super::super::super::Security::WinTrust::WIN_CERTIFICATE) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn ImageGetCertificateHeader(filehandle : super::super::super::Foundation:: HANDLE, certificateindex : u32, certificateheader : *mut super::super::super::Security::WinTrust:: WIN_CERTIFICATE) -> super::super::super::Foundation:: BOOL); - ImageGetCertificateHeader(filehandle.param().abi(), core::mem::transmute(certificateindex), core::mem::transmute(certificateheader)).ok() + ImageGetCertificateHeader(core::mem::transmute(filehandle), core::mem::transmute(certificateindex), core::mem::transmute(certificateheader)).ok() } #[inline] -pub unsafe fn ImageGetDigestStream(filehandle: P0, digestlevel: u32, digestfunction: DIGEST_FUNCTION, digesthandle: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImageGetDigestStream(filehandle: super::super::super::Foundation::HANDLE, digestlevel: u32, digestfunction: DIGEST_FUNCTION, digesthandle: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn ImageGetDigestStream(filehandle : super::super::super::Foundation:: HANDLE, digestlevel : u32, digestfunction : DIGEST_FUNCTION, digesthandle : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - ImageGetDigestStream(filehandle.param().abi(), core::mem::transmute(digestlevel), core::mem::transmute(digestfunction), core::mem::transmute(digesthandle)).ok() + ImageGetDigestStream(core::mem::transmute(filehandle), core::mem::transmute(digestlevel), core::mem::transmute(digestfunction), core::mem::transmute(digesthandle)).ok() } #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] @@ -505,12 +444,9 @@ pub unsafe fn ImageNtHeader(base: *const core::ffi::c_void) -> *mut IMAGE_NT_HEA ImageNtHeader(core::mem::transmute(base)) } #[inline] -pub unsafe fn ImageRemoveCertificate(filehandle: P0, index: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImageRemoveCertificate(filehandle: super::super::super::Foundation::HANDLE, index: u32) -> windows_core::Result<()> { windows_targets::link!("imagehlp.dll" "system" fn ImageRemoveCertificate(filehandle : super::super::super::Foundation:: HANDLE, index : u32) -> super::super::super::Foundation:: BOOL); - ImageRemoveCertificate(filehandle.param().abi(), core::mem::transmute(index)).ok() + ImageRemoveCertificate(core::mem::transmute(filehandle), core::mem::transmute(index)).ok() } #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_System_SystemInformation")] @@ -531,14 +467,14 @@ pub unsafe fn ImageRvaToSection(ntheaders: *const IMAGE_NT_HEADERS64, base: *con #[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(core::mem::transmute(ntheaders), core::mem::transmute(base), core::mem::transmute(rva), core::mem::transmute(lastrvasection.unwrap_or(core::ptr::null()))) + ImageRvaToVa(core::mem::transmute(ntheaders), core::mem::transmute(base), core::mem::transmute(rva), core::mem::transmute(lastrvasection.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_SystemInformation")] #[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(core::mem::transmute(ntheaders), core::mem::transmute(base), core::mem::transmute(rva), core::mem::transmute(lastrvasection.unwrap_or(core::ptr::null()))) + ImageRvaToVa(core::mem::transmute(ntheaders), core::mem::transmute(base), core::mem::transmute(rva), core::mem::transmute(lastrvasection.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] @@ -560,13 +496,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(core::ptr::null_mut())), core::mem::transmute(contextflags), core::mem::transmute(context), core::mem::transmute(contextlength)).ok() + InitializeContext(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(contextflags), core::mem::transmute(context), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(contextflags), core::mem::transmute(context), core::mem::transmute(contextlength), core::mem::transmute(xstatecompactionmask)).ok() + InitializeContext2(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(contextflags), core::mem::transmute(context), core::mem::transmute(contextlength), core::mem::transmute(xstatecompactionmask)).ok() } #[inline] pub unsafe fn IsDebuggerPresent() -> super::super::super::Foundation::BOOL { @@ -578,7 +514,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(core::mem::transmute(context), core::mem::transmute(featureid), core::mem::transmute(length.unwrap_or(core::ptr::null_mut()))) + LocateXStateFeature(core::mem::transmute(context), core::mem::transmute(featureid), core::mem::transmute(length.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MakeSureDirectoryPathExists(dirpath: P0) -> windows_core::Result<()> @@ -625,22 +561,18 @@ 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(core::mem::transmute(baseofdump), core::mem::transmute(streamnumber), core::mem::transmute(dir), core::mem::transmute(streampointer), core::mem::transmute(streamsize.unwrap_or(core::ptr::null_mut()))) + MiniDumpReadDumpStream(core::mem::transmute(baseofdump), core::mem::transmute(streamnumber), core::mem::transmute(dir), core::mem::transmute(streampointer), core::mem::transmute(streamsize.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_Storage_FileSystem", feature = "Win32_System_Kernel", feature = "Win32_System_Memory"))] #[inline] -pub unsafe fn MiniDumpWriteDump(hprocess: P0, processid: u32, hfile: P2, dumptype: MINIDUMP_TYPE, exceptionparam: Option<*const MINIDUMP_EXCEPTION_INFORMATION>, userstreamparam: Option<*const MINIDUMP_USER_STREAM_INFORMATION>, callbackparam: Option<*const MINIDUMP_CALLBACK_INFORMATION>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn MiniDumpWriteDump(hprocess: super::super::super::Foundation::HANDLE, processid: u32, hfile: super::super::super::Foundation::HANDLE, dumptype: MINIDUMP_TYPE, exceptionparam: Option<*const MINIDUMP_EXCEPTION_INFORMATION>, userstreamparam: Option<*const MINIDUMP_USER_STREAM_INFORMATION>, callbackparam: Option<*const MINIDUMP_CALLBACK_INFORMATION>) -> windows_core::Result<()> { 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(), core::mem::transmute(processid), hfile.param().abi(), core::mem::transmute(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() + MiniDumpWriteDump(core::mem::transmute(hprocess), core::mem::transmute(processid), core::mem::transmute(hfile), core::mem::transmute(dumptype), core::mem::transmute(exceptionparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(userstreamparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackparam.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn OpenThreadWaitChainSession(flags: OPEN_THREAD_WAIT_CHAIN_SESSION_FLAGS, callback: PWAITCHAINCALLBACK) -> *mut core::ffi::c_void { +pub unsafe fn OpenThreadWaitChainSession(flags: OPEN_THREAD_WAIT_CHAIN_SESSION_FLAGS, callback: Option) -> *mut core::ffi::c_void { windows_targets::link!("advapi32.dll" "system" fn OpenThreadWaitChainSession(flags : OPEN_THREAD_WAIT_CHAIN_SESSION_FLAGS, callback : PWAITCHAINCALLBACK) -> *mut core::ffi::c_void); - OpenThreadWaitChainSession(core::mem::transmute(flags), core::mem::transmute(callback)) + OpenThreadWaitChainSession(core::mem::transmute(flags), core::mem::transmute(callback.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn OutputDebugStringA(lpoutputstring: P0) @@ -667,7 +599,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(core::ptr::null())), core::mem::transmute(pcontextrecord.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)) + RaiseFailFastException(core::mem::transmute(pexceptionrecord.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcontextrecord.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn RangeMapAddPeImageSections(rmaphandle: *const core::ffi::c_void, imagename: P1, mappedimage: *const core::ffi::c_void, mappingbytes: u32, imagebase: u64, usertag: u64, mappingflags: u32) -> super::super::super::Foundation::BOOL @@ -685,12 +617,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(core::ptr::null()))) + RangeMapFree(core::mem::transmute(rmaphandle.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(rmaphandle), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(requestbytes), core::mem::transmute(flags), core::mem::transmute(donebytes.unwrap_or(core::ptr::null_mut()))) + RangeMapRead(core::mem::transmute(rmaphandle), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(requestbytes), core::mem::transmute(flags), core::mem::transmute(donebytes.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RangeMapRemove(rmaphandle: *const core::ffi::c_void, usertag: u64) -> super::super::super::Foundation::BOOL { @@ -700,7 +632,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(core::mem::transmute(rmaphandle), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(requestbytes), core::mem::transmute(flags), core::mem::transmute(donebytes.unwrap_or(core::ptr::null_mut()))) + RangeMapWrite(core::mem::transmute(rmaphandle), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(requestbytes), core::mem::transmute(flags), core::mem::transmute(donebytes.unwrap_or(core::mem::zeroed()))) } #[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<()> @@ -727,12 +659,9 @@ where ReBaseImage64(currentimagename.param().abi(), symbolpath.param().abi(), frebase.param().abi(), frebasesysfileok.param().abi(), fgoingdown.param().abi(), core::mem::transmute(checkimagesize), core::mem::transmute(oldimagesize), core::mem::transmute(oldimagebase), core::mem::transmute(newimagesize), core::mem::transmute(newimagebase), core::mem::transmute(timestamp)).ok() } #[inline] -pub unsafe fn ReadProcessMemory(hprocess: P0, lpbaseaddress: *const core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, nsize: usize, lpnumberofbytesread: Option<*mut usize>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadProcessMemory(hprocess: super::super::super::Foundation::HANDLE, lpbaseaddress: *const core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, nsize: usize, lpnumberofbytesread: Option<*mut usize>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpbaseaddress), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(lpnumberofbytesread.unwrap_or(core::ptr::null_mut()))).ok() + ReadProcessMemory(core::mem::transmute(hprocess), core::mem::transmute(lpbaseaddress), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(lpnumberofbytesread.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RegisterWaitChainCOMCallback(callstatecallback: PCOGETCALLSTATE, activationstatecallback: PCOGETACTIVATIONSTATE) { @@ -740,12 +669,9 @@ pub unsafe fn RegisterWaitChainCOMCallback(callstatecallback: PCOGETCALLSTATE, a RegisterWaitChainCOMCallback(core::mem::transmute(callstatecallback), core::mem::transmute(activationstatecallback)) } #[inline] -pub unsafe fn RemoveInvalidModuleList(hprocess: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn RemoveInvalidModuleList(hprocess: super::super::super::Foundation::HANDLE) { windows_targets::link!("dbghelp.dll" "system" fn RemoveInvalidModuleList(hprocess : super::super::super::Foundation:: HANDLE)); - RemoveInvalidModuleList(hprocess.param().abi()) + RemoveInvalidModuleList(core::mem::transmute(hprocess)) } #[inline] pub unsafe fn RemoveVectoredContinueHandler(handle: *const core::ffi::c_void) -> u32 { @@ -758,13 +684,12 @@ pub unsafe fn RemoveVectoredExceptionHandler(handle: *const core::ffi::c_void) - RemoveVectoredExceptionHandler(core::mem::transmute(handle)) } #[inline] -pub unsafe fn ReportSymbolLoadSummary(hprocess: P0, ploadmodule: P1, psymboldata: *const DBGHELP_DATA_REPORT_STRUCT) -> super::super::super::Foundation::BOOL +pub unsafe fn ReportSymbolLoadSummary(hprocess: super::super::super::Foundation::HANDLE, ploadmodule: P1, psymboldata: *const DBGHELP_DATA_REPORT_STRUCT) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn ReportSymbolLoadSummary(hprocess : super::super::super::Foundation:: HANDLE, ploadmodule : windows_core::PCWSTR, psymboldata : *const DBGHELP_DATA_REPORT_STRUCT) -> super::super::super::Foundation:: BOOL); - ReportSymbolLoadSummary(hprocess.param().abi(), ploadmodule.param().abi(), core::mem::transmute(psymboldata)) + ReportSymbolLoadSummary(core::mem::transmute(hprocess), ploadmodule.param().abi(), core::mem::transmute(psymboldata)) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -806,7 +731,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(core::mem::transmute(framestoskip), backtrace.len().try_into().unwrap(), core::mem::transmute(backtrace.as_ptr()), core::mem::transmute(backtracehash.unwrap_or(core::ptr::null_mut()))) + RtlCaptureStackBackTrace(core::mem::transmute(framestoskip), backtrace.len().try_into().unwrap(), core::mem::transmute(backtrace.as_ptr()), core::mem::transmute(backtracehash.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -839,7 +764,7 @@ where P5: 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(core::mem::transmute(tableidentifier), core::mem::transmute(baseaddress), core::mem::transmute(length), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), outofprocesscallbackdll.param().abi()) + RtlInstallFunctionTableCallback(core::mem::transmute(tableidentifier), core::mem::transmute(baseaddress), core::mem::transmute(length), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), outofprocesscallbackdll.param().abi()) } #[cfg(target_arch = "aarch64")] #[inline] @@ -848,19 +773,19 @@ where P5: 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(core::mem::transmute(tableidentifier), core::mem::transmute(baseaddress), core::mem::transmute(length), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), outofprocesscallbackdll.param().abi()) + RtlInstallFunctionTableCallback(core::mem::transmute(tableidentifier), core::mem::transmute(baseaddress), core::mem::transmute(length), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), outofprocesscallbackdll.param().abi()) } #[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(core::mem::transmute(controlpc), core::mem::transmute(imagebase), core::mem::transmute(historytable.unwrap_or(core::ptr::null_mut()))) + RtlLookupFunctionEntry(core::mem::transmute(controlpc), core::mem::transmute(imagebase), core::mem::transmute(historytable.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(controlpc), core::mem::transmute(imagebase), core::mem::transmute(historytable.unwrap_or(core::ptr::null_mut()))) + RtlLookupFunctionEntry(core::mem::transmute(controlpc), core::mem::transmute(imagebase), core::mem::transmute(historytable.unwrap_or(core::mem::zeroed()))) } #[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 +801,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(core::mem::transmute(contextrecord), core::mem::transmute(exceptionrecord.unwrap_or(core::ptr::null()))) + RtlRestoreContext(core::mem::transmute(contextrecord), core::mem::transmute(exceptionrecord.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(targetip.unwrap_or(core::ptr::null())), core::mem::transmute(exceptionrecord.unwrap_or(core::ptr::null())), core::mem::transmute(returnvalue)) + RtlUnwind(core::mem::transmute(targetframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(targetip.unwrap_or(core::mem::zeroed())), core::mem::transmute(exceptionrecord.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(targetip.unwrap_or(core::ptr::null())), core::mem::transmute(exceptionrecord.unwrap_or(core::ptr::null())), core::mem::transmute(returnvalue), core::mem::transmute(contextrecord), core::mem::transmute(historytable.unwrap_or(core::ptr::null()))) + RtlUnwindEx(core::mem::transmute(targetframe.unwrap_or(core::mem::zeroed())), core::mem::transmute(targetip.unwrap_or(core::mem::zeroed())), core::mem::transmute(exceptionrecord.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnvalue), core::mem::transmute(contextrecord), core::mem::transmute(historytable.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(handlertype), core::mem::transmute(imagebase), core::mem::transmute(controlpc), core::mem::transmute(functionentry), core::mem::transmute(contextrecord), core::mem::transmute(handlerdata), core::mem::transmute(establisherframe), core::mem::transmute(contextpointers.unwrap_or(core::ptr::null_mut()))) + RtlVirtualUnwind(core::mem::transmute(handlertype), core::mem::transmute(imagebase), core::mem::transmute(controlpc), core::mem::transmute(functionentry), core::mem::transmute(contextrecord), core::mem::transmute(handlerdata), core::mem::transmute(establisherframe), core::mem::transmute(contextpointers.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(handlertype), core::mem::transmute(imagebase), core::mem::transmute(controlpc), core::mem::transmute(functionentry), core::mem::transmute(contextrecord), core::mem::transmute(handlerdata), core::mem::transmute(establisherframe), core::mem::transmute(contextpointers.unwrap_or(core::ptr::null_mut()))) + RtlVirtualUnwind(core::mem::transmute(handlertype), core::mem::transmute(imagebase), core::mem::transmute(controlpc), core::mem::transmute(functionentry), core::mem::transmute(contextrecord), core::mem::transmute(handlerdata), core::mem::transmute(establisherframe), core::mem::transmute(contextpointers.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SearchTreeForFile(rootpath: P0, inputpathname: P1, outputpathbuffer: windows_core::PSTR) -> windows_core::Result<()> @@ -953,23 +878,20 @@ pub unsafe fn SetSymLoadError(error: u32) { } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn SetThreadContext(hthread: P0, lpcontext: *const CONTEXT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadContext(hthread: super::super::super::Foundation::HANDLE, lpcontext: *const CONTEXT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetThreadContext(hthread : super::super::super::Foundation:: HANDLE, lpcontext : *const CONTEXT) -> super::super::super::Foundation:: BOOL); - SetThreadContext(hthread.param().abi(), core::mem::transmute(lpcontext)).ok() + SetThreadContext(core::mem::transmute(hthread), core::mem::transmute(lpcontext)).ok() } #[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(core::mem::transmute(dwnewmode), core::mem::transmute(lpoldmode.unwrap_or(core::ptr::null_mut()))).ok() + SetThreadErrorMode(core::mem::transmute(dwnewmode), core::mem::transmute(lpoldmode.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn SetUnhandledExceptionFilter(lptoplevelexceptionfilter: LPTOP_LEVEL_EXCEPTION_FILTER) -> LPTOP_LEVEL_EXCEPTION_FILTER { +pub unsafe fn SetUnhandledExceptionFilter(lptoplevelexceptionfilter: Option) -> LPTOP_LEVEL_EXCEPTION_FILTER { windows_targets::link!("kernel32.dll" "system" fn SetUnhandledExceptionFilter(lptoplevelexceptionfilter : LPTOP_LEVEL_EXCEPTION_FILTER) -> LPTOP_LEVEL_EXCEPTION_FILTER); - SetUnhandledExceptionFilter(core::mem::transmute(lptoplevelexceptionfilter)) + SetUnhandledExceptionFilter(core::mem::transmute(lptoplevelexceptionfilter.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_Kernel")] @@ -980,147 +902,136 @@ pub unsafe fn SetXStateFeaturesMask(context: *mut CONTEXT, featuremask: u64) -> } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn StackWalk(machinetype: u32, hprocess: P1, hthread: P2, stackframe: *mut STACKFRAME, contextrecord: *mut core::ffi::c_void, readmemoryroutine: PREAD_PROCESS_MEMORY_ROUTINE, functiontableaccessroutine: PFUNCTION_TABLE_ACCESS_ROUTINE, getmodulebaseroutine: PGET_MODULE_BASE_ROUTINE, translateaddress: PTRANSLATE_ADDRESS_ROUTINE) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn StackWalk(machinetype: u32, hprocess: super::super::super::Foundation::HANDLE, hthread: super::super::super::Foundation::HANDLE, stackframe: *mut STACKFRAME, contextrecord: *mut core::ffi::c_void, readmemoryroutine: Option, functiontableaccessroutine: Option, getmodulebaseroutine: Option, translateaddress: Option) -> super::super::super::Foundation::BOOL { windows_targets::link!("dbghelp.dll" "system" fn StackWalk(machinetype : u32, hprocess : super::super::super::Foundation:: HANDLE, hthread : super::super::super::Foundation:: HANDLE, stackframe : *mut STACKFRAME, contextrecord : *mut core::ffi::c_void, readmemoryroutine : PREAD_PROCESS_MEMORY_ROUTINE, functiontableaccessroutine : PFUNCTION_TABLE_ACCESS_ROUTINE, getmodulebaseroutine : PGET_MODULE_BASE_ROUTINE, translateaddress : PTRANSLATE_ADDRESS_ROUTINE) -> super::super::super::Foundation:: BOOL); - StackWalk(core::mem::transmute(machinetype), hprocess.param().abi(), hthread.param().abi(), core::mem::transmute(stackframe), core::mem::transmute(contextrecord), core::mem::transmute(readmemoryroutine), core::mem::transmute(functiontableaccessroutine), core::mem::transmute(getmodulebaseroutine), core::mem::transmute(translateaddress)) + StackWalk(core::mem::transmute(machinetype), core::mem::transmute(hprocess), core::mem::transmute(hthread), core::mem::transmute(stackframe), core::mem::transmute(contextrecord), core::mem::transmute(readmemoryroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(functiontableaccessroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(getmodulebaseroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(translateaddress.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn StackWalk2(machinetype: u32, hprocess: P1, hthread: P2, stackframe: *mut STACKFRAME_EX, contextrecord: *mut core::ffi::c_void, readmemoryroutine: PREAD_PROCESS_MEMORY_ROUTINE64, functiontableaccessroutine: PFUNCTION_TABLE_ACCESS_ROUTINE64, getmodulebaseroutine: PGET_MODULE_BASE_ROUTINE64, translateaddress: PTRANSLATE_ADDRESS_ROUTINE64, gettargetattributevalue: PGET_TARGET_ATTRIBUTE_VALUE64, flags: u32) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn StackWalk2(machinetype: u32, hprocess: super::super::super::Foundation::HANDLE, hthread: super::super::super::Foundation::HANDLE, stackframe: *mut STACKFRAME_EX, contextrecord: *mut core::ffi::c_void, readmemoryroutine: Option, functiontableaccessroutine: Option, getmodulebaseroutine: Option, translateaddress: Option, gettargetattributevalue: Option, flags: u32) -> super::super::super::Foundation::BOOL { windows_targets::link!("dbghelp.dll" "system" fn StackWalk2(machinetype : u32, hprocess : super::super::super::Foundation:: HANDLE, hthread : super::super::super::Foundation:: HANDLE, stackframe : *mut STACKFRAME_EX, contextrecord : *mut core::ffi::c_void, readmemoryroutine : PREAD_PROCESS_MEMORY_ROUTINE64, functiontableaccessroutine : PFUNCTION_TABLE_ACCESS_ROUTINE64, getmodulebaseroutine : PGET_MODULE_BASE_ROUTINE64, translateaddress : PTRANSLATE_ADDRESS_ROUTINE64, gettargetattributevalue : PGET_TARGET_ATTRIBUTE_VALUE64, flags : u32) -> super::super::super::Foundation:: BOOL); - StackWalk2(core::mem::transmute(machinetype), hprocess.param().abi(), hthread.param().abi(), core::mem::transmute(stackframe), core::mem::transmute(contextrecord), core::mem::transmute(readmemoryroutine), core::mem::transmute(functiontableaccessroutine), core::mem::transmute(getmodulebaseroutine), core::mem::transmute(translateaddress), core::mem::transmute(gettargetattributevalue), core::mem::transmute(flags)) -} -#[inline] -pub unsafe fn StackWalk64(machinetype: u32, hprocess: P1, hthread: P2, stackframe: *mut STACKFRAME64, contextrecord: *mut core::ffi::c_void, readmemoryroutine: PREAD_PROCESS_MEMORY_ROUTINE64, functiontableaccessroutine: PFUNCTION_TABLE_ACCESS_ROUTINE64, getmodulebaseroutine: PGET_MODULE_BASE_ROUTINE64, translateaddress: PTRANSLATE_ADDRESS_ROUTINE64) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, - P2: windows_core::Param, -{ + StackWalk2( + core::mem::transmute(machinetype), + core::mem::transmute(hprocess), + core::mem::transmute(hthread), + core::mem::transmute(stackframe), + core::mem::transmute(contextrecord), + core::mem::transmute(readmemoryroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(functiontableaccessroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(getmodulebaseroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(translateaddress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(gettargetattributevalue.unwrap_or(core::mem::zeroed())), + core::mem::transmute(flags), + ) +} +#[inline] +pub unsafe fn StackWalk64(machinetype: u32, hprocess: super::super::super::Foundation::HANDLE, hthread: super::super::super::Foundation::HANDLE, stackframe: *mut STACKFRAME64, contextrecord: *mut core::ffi::c_void, readmemoryroutine: Option, functiontableaccessroutine: Option, getmodulebaseroutine: Option, translateaddress: Option) -> super::super::super::Foundation::BOOL { windows_targets::link!("dbghelp.dll" "system" fn StackWalk64(machinetype : u32, hprocess : super::super::super::Foundation:: HANDLE, hthread : super::super::super::Foundation:: HANDLE, stackframe : *mut STACKFRAME64, contextrecord : *mut core::ffi::c_void, readmemoryroutine : PREAD_PROCESS_MEMORY_ROUTINE64, functiontableaccessroutine : PFUNCTION_TABLE_ACCESS_ROUTINE64, getmodulebaseroutine : PGET_MODULE_BASE_ROUTINE64, translateaddress : PTRANSLATE_ADDRESS_ROUTINE64) -> super::super::super::Foundation:: BOOL); - StackWalk64(core::mem::transmute(machinetype), hprocess.param().abi(), hthread.param().abi(), core::mem::transmute(stackframe), core::mem::transmute(contextrecord), core::mem::transmute(readmemoryroutine), core::mem::transmute(functiontableaccessroutine), core::mem::transmute(getmodulebaseroutine), core::mem::transmute(translateaddress)) + StackWalk64(core::mem::transmute(machinetype), core::mem::transmute(hprocess), core::mem::transmute(hthread), core::mem::transmute(stackframe), core::mem::transmute(contextrecord), core::mem::transmute(readmemoryroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(functiontableaccessroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(getmodulebaseroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(translateaddress.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn StackWalkEx(machinetype: u32, hprocess: P1, hthread: P2, stackframe: *mut STACKFRAME_EX, contextrecord: *mut core::ffi::c_void, readmemoryroutine: PREAD_PROCESS_MEMORY_ROUTINE64, functiontableaccessroutine: PFUNCTION_TABLE_ACCESS_ROUTINE64, getmodulebaseroutine: PGET_MODULE_BASE_ROUTINE64, translateaddress: PTRANSLATE_ADDRESS_ROUTINE64, flags: u32) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn StackWalkEx(machinetype: u32, hprocess: super::super::super::Foundation::HANDLE, hthread: super::super::super::Foundation::HANDLE, stackframe: *mut STACKFRAME_EX, contextrecord: *mut core::ffi::c_void, readmemoryroutine: Option, functiontableaccessroutine: Option, getmodulebaseroutine: Option, translateaddress: Option, flags: u32) -> super::super::super::Foundation::BOOL { windows_targets::link!("dbghelp.dll" "system" fn StackWalkEx(machinetype : u32, hprocess : super::super::super::Foundation:: HANDLE, hthread : super::super::super::Foundation:: HANDLE, stackframe : *mut STACKFRAME_EX, contextrecord : *mut core::ffi::c_void, readmemoryroutine : PREAD_PROCESS_MEMORY_ROUTINE64, functiontableaccessroutine : PFUNCTION_TABLE_ACCESS_ROUTINE64, getmodulebaseroutine : PGET_MODULE_BASE_ROUTINE64, translateaddress : PTRANSLATE_ADDRESS_ROUTINE64, flags : u32) -> super::super::super::Foundation:: BOOL); - StackWalkEx(core::mem::transmute(machinetype), hprocess.param().abi(), hthread.param().abi(), core::mem::transmute(stackframe), core::mem::transmute(contextrecord), core::mem::transmute(readmemoryroutine), core::mem::transmute(functiontableaccessroutine), core::mem::transmute(getmodulebaseroutine), core::mem::transmute(translateaddress), core::mem::transmute(flags)) -} -#[inline] -pub unsafe fn SymAddSourceStream(hprocess: P0, base: u64, streamfile: P2, buffer: Option<&[u8]>) -> windows_core::Result<()> + StackWalkEx( + core::mem::transmute(machinetype), + core::mem::transmute(hprocess), + core::mem::transmute(hthread), + core::mem::transmute(stackframe), + core::mem::transmute(contextrecord), + core::mem::transmute(readmemoryroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(functiontableaccessroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(getmodulebaseroutine.unwrap_or(core::mem::zeroed())), + core::mem::transmute(translateaddress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(flags), + ) +} +#[inline] +pub unsafe fn SymAddSourceStream(hprocess: super::super::super::Foundation::HANDLE, base: u64, streamfile: P2, buffer: Option<&[u8]>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymAddSourceStream(hprocess : super::super::super::Foundation:: HANDLE, base : u64, streamfile : windows_core::PCSTR, buffer : *const u8, size : usize) -> super::super::super::Foundation:: BOOL); - SymAddSourceStream(hprocess.param().abi(), core::mem::transmute(base), streamfile.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())).ok() + SymAddSourceStream(core::mem::transmute(hprocess), core::mem::transmute(base), streamfile.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())).ok() } #[inline] -pub unsafe fn SymAddSourceStreamA(hprocess: P0, base: u64, streamfile: P2, buffer: Option<&[u8]>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymAddSourceStreamA(hprocess: super::super::super::Foundation::HANDLE, base: u64, streamfile: P2, buffer: Option<&[u8]>) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymAddSourceStreamA(hprocess : super::super::super::Foundation:: HANDLE, base : u64, streamfile : windows_core::PCSTR, buffer : *const u8, size : usize) -> super::super::super::Foundation:: BOOL); - SymAddSourceStreamA(hprocess.param().abi(), core::mem::transmute(base), streamfile.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())) + SymAddSourceStreamA(core::mem::transmute(hprocess), core::mem::transmute(base), streamfile.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())) } #[inline] -pub unsafe fn SymAddSourceStreamW(hprocess: P0, base: u64, filespec: P2, buffer: Option<&[u8]>) -> windows_core::Result<()> +pub unsafe fn SymAddSourceStreamW(hprocess: super::super::super::Foundation::HANDLE, base: u64, filespec: P2, buffer: Option<&[u8]>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymAddSourceStreamW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : windows_core::PCWSTR, buffer : *const u8, size : usize) -> super::super::super::Foundation:: BOOL); - SymAddSourceStreamW(hprocess.param().abi(), core::mem::transmute(base), filespec.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())).ok() + SymAddSourceStreamW(core::mem::transmute(hprocess), core::mem::transmute(base), filespec.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())).ok() } #[inline] -pub unsafe fn SymAddSymbol(hprocess: P0, baseofdll: u64, name: P2, address: u64, size: u32, flags: u32) -> windows_core::Result<()> +pub unsafe fn SymAddSymbol(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, name: P2, address: u64, size: u32, flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymAddSymbol(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : windows_core::PCSTR, address : u64, size : u32, flags : u32) -> super::super::super::Foundation:: BOOL); - SymAddSymbol(hprocess.param().abi(), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(address), core::mem::transmute(size), core::mem::transmute(flags)).ok() + SymAddSymbol(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(address), core::mem::transmute(size), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SymAddSymbolW(hprocess: P0, baseofdll: u64, name: P2, address: u64, size: u32, flags: u32) -> windows_core::Result<()> +pub unsafe fn SymAddSymbolW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, name: P2, address: u64, size: u32, flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymAddSymbolW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : windows_core::PCWSTR, address : u64, size : u32, flags : u32) -> super::super::super::Foundation:: BOOL); - SymAddSymbolW(hprocess.param().abi(), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(address), core::mem::transmute(size), core::mem::transmute(flags)).ok() + SymAddSymbolW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(address), core::mem::transmute(size), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SymAddrIncludeInlineTrace(hprocess: P0, address: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SymAddrIncludeInlineTrace(hprocess: super::super::super::Foundation::HANDLE, address: u64) -> u32 { windows_targets::link!("dbghelp.dll" "system" fn SymAddrIncludeInlineTrace(hprocess : super::super::super::Foundation:: HANDLE, address : u64) -> u32); - SymAddrIncludeInlineTrace(hprocess.param().abi(), core::mem::transmute(address)) + SymAddrIncludeInlineTrace(core::mem::transmute(hprocess), core::mem::transmute(address)) } #[inline] -pub unsafe fn SymCleanup(hprocess: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymCleanup(hprocess: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymCleanup(hprocess : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - SymCleanup(hprocess.param().abi()).ok() + SymCleanup(core::mem::transmute(hprocess)).ok() } #[inline] -pub unsafe fn SymCompareInlineTrace(hprocess: P0, address1: u64, inlinecontext1: u32, retaddress1: u64, address2: u64, retaddress2: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SymCompareInlineTrace(hprocess: super::super::super::Foundation::HANDLE, address1: u64, inlinecontext1: u32, retaddress1: u64, address2: u64, retaddress2: u64) -> u32 { windows_targets::link!("dbghelp.dll" "system" fn SymCompareInlineTrace(hprocess : super::super::super::Foundation:: HANDLE, address1 : u64, inlinecontext1 : u32, retaddress1 : u64, address2 : u64, retaddress2 : u64) -> u32); - SymCompareInlineTrace(hprocess.param().abi(), core::mem::transmute(address1), core::mem::transmute(inlinecontext1), core::mem::transmute(retaddress1), core::mem::transmute(address2), core::mem::transmute(retaddress2)) + SymCompareInlineTrace(core::mem::transmute(hprocess), core::mem::transmute(address1), core::mem::transmute(inlinecontext1), core::mem::transmute(retaddress1), core::mem::transmute(address2), core::mem::transmute(retaddress2)) } #[inline] -pub unsafe fn SymDeleteSymbol(hprocess: P0, baseofdll: u64, name: P2, address: u64, flags: u32) -> windows_core::Result<()> +pub unsafe fn SymDeleteSymbol(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, name: P2, address: u64, flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymDeleteSymbol(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : windows_core::PCSTR, address : u64, flags : u32) -> super::super::super::Foundation:: BOOL); - SymDeleteSymbol(hprocess.param().abi(), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(address), core::mem::transmute(flags)).ok() + SymDeleteSymbol(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(address), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SymDeleteSymbolW(hprocess: P0, baseofdll: u64, name: P2, address: u64, flags: u32) -> windows_core::Result<()> +pub unsafe fn SymDeleteSymbolW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, name: P2, address: u64, flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymDeleteSymbolW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : windows_core::PCWSTR, address : u64, flags : u32) -> super::super::super::Foundation:: BOOL); - SymDeleteSymbolW(hprocess.param().abi(), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(address), core::mem::transmute(flags)).ok() + SymDeleteSymbolW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(address), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SymEnumLines(hprocess: P0, base: u64, obj: P2, file: P3, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumLines(hprocess: super::super::super::Foundation::HANDLE, base: u64, obj: P2, file: P3, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: 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(), core::mem::transmute(base), obj.param().abi(), file.param().abi(), core::mem::transmute(enumlinescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumLines(core::mem::transmute(hprocess), core::mem::transmute(base), obj.param().abi(), file.param().abi(), core::mem::transmute(enumlinescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumLinesW(hprocess: P0, base: u64, obj: P2, file: P3, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumLinesW(hprocess: super::super::super::Foundation::HANDLE, base: u64, obj: P2, file: P3, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: 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(), core::mem::transmute(base), obj.param().abi(), file.param().abi(), core::mem::transmute(enumlinescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumLinesW(core::mem::transmute(hprocess), core::mem::transmute(base), obj.param().abi(), file.param().abi(), core::mem::transmute(enumlinescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SymEnumProcesses(enumprocessescallback: PSYM_ENUMPROCESSES_CALLBACK, usercontext: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1128,370 +1039,280 @@ pub unsafe fn SymEnumProcesses(enumprocessescallback: PSYM_ENUMPROCESSES_CALLBAC SymEnumProcesses(core::mem::transmute(enumprocessescallback), core::mem::transmute(usercontext)).ok() } #[inline] -pub unsafe fn SymEnumSourceFileTokens(hprocess: P0, base: u64, callback: PENUMSOURCEFILETOKENSCALLBACK) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumSourceFileTokens(hprocess: super::super::super::Foundation::HANDLE, base: u64, callback: PENUMSOURCEFILETOKENSCALLBACK) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymEnumSourceFileTokens(hprocess : super::super::super::Foundation:: HANDLE, base : u64, callback : PENUMSOURCEFILETOKENSCALLBACK) -> super::super::super::Foundation:: BOOL); - SymEnumSourceFileTokens(hprocess.param().abi(), core::mem::transmute(base), core::mem::transmute(callback)).ok() + SymEnumSourceFileTokens(core::mem::transmute(hprocess), core::mem::transmute(base), core::mem::transmute(callback)).ok() } #[inline] -pub unsafe fn SymEnumSourceFiles(hprocess: P0, modbase: u64, mask: P2, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumSourceFiles(hprocess: super::super::super::Foundation::HANDLE, modbase: u64, mask: P2, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(modbase), mask.param().abi(), core::mem::transmute(cbsrcfiles), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumSourceFiles(core::mem::transmute(hprocess), core::mem::transmute(modbase), mask.param().abi(), core::mem::transmute(cbsrcfiles), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumSourceFilesW(hprocess: P0, modbase: u64, mask: P2, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumSourceFilesW(hprocess: super::super::super::Foundation::HANDLE, modbase: u64, mask: P2, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(modbase), mask.param().abi(), core::mem::transmute(cbsrcfiles), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumSourceFilesW(core::mem::transmute(hprocess), core::mem::transmute(modbase), mask.param().abi(), core::mem::transmute(cbsrcfiles), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumSourceLines(hprocess: P0, base: u64, obj: P2, file: P3, line: u32, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumSourceLines(hprocess: super::super::super::Foundation::HANDLE, base: u64, obj: P2, file: P3, line: Option, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: 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(), core::mem::transmute(base), obj.param().abi(), file.param().abi(), core::mem::transmute(line), core::mem::transmute(flags), core::mem::transmute(enumlinescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumSourceLines(core::mem::transmute(hprocess), core::mem::transmute(base), obj.param().abi(), file.param().abi(), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(enumlinescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumSourceLinesW(hprocess: P0, base: u64, obj: P2, file: P3, line: u32, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumSourceLinesW(hprocess: super::super::super::Foundation::HANDLE, base: u64, obj: P2, file: P3, line: Option, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: 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(), core::mem::transmute(base), obj.param().abi(), file.param().abi(), core::mem::transmute(line), core::mem::transmute(flags), core::mem::transmute(enumlinescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumSourceLinesW(core::mem::transmute(hprocess), core::mem::transmute(base), obj.param().abi(), file.param().abi(), core::mem::transmute(line.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(enumlinescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).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 -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumSym(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> super::super::super::Foundation::BOOL { 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(), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))) + SymEnumSym(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SymEnumSymbols(hprocess: P0, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumSymbols(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumSymbols(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumSymbolsEx(hprocess: P0, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> +pub unsafe fn SymEnumSymbolsEx(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null())), core::mem::transmute(options)).ok() + SymEnumSymbolsEx(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(options)).ok() } #[inline] -pub unsafe fn SymEnumSymbolsExW(hprocess: P0, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> +pub unsafe fn SymEnumSymbolsExW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null())), core::mem::transmute(options)).ok() + SymEnumSymbolsExW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumSymbolsForAddr(hprocess: super::super::super::Foundation::HANDLE, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(address), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumSymbolsForAddr(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumSymbolsForAddrW(hprocess: P0, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumSymbolsForAddrW(hprocess: super::super::super::Foundation::HANDLE, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(address), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumSymbolsForAddrW(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumSymbolsW(hprocess: P0, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumSymbolsW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumSymbolsW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumTypes(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumTypes(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumTypes(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumTypesByName(hprocess: P0, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumTypesByName(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumTypesByName(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumTypesByNameW(hprocess: P0, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymEnumTypesByNameW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, mask: P2, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumTypesByNameW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), mask.param().abi(), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumTypesW(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumTypesW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumTypesW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymEnumerateModules(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumerateModules(hprocess: super::super::super::Foundation::HANDLE, enummodulescallback: PSYM_ENUMMODULES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(enummodulescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumerateModules(core::mem::transmute(hprocess), core::mem::transmute(enummodulescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumerateModules64(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumerateModules64(hprocess: super::super::super::Foundation::HANDLE, enummodulescallback: PSYM_ENUMMODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(enummodulescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumerateModules64(core::mem::transmute(hprocess), core::mem::transmute(enummodulescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumerateModulesW64(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumerateModulesW64(hprocess: super::super::super::Foundation::HANDLE, enummodulescallback: PSYM_ENUMMODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(enummodulescallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumerateModulesW64(core::mem::transmute(hprocess), core::mem::transmute(enummodulescallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymEnumerateSymbols(hprocess: P0, baseofdll: u32, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumerateSymbols(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u32, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumerateSymbols(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumerateSymbols64(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumerateSymbols64(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumerateSymbols64(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymEnumerateSymbolsW(hprocess: P0, baseofdll: u32, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumerateSymbolsW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u32, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumerateSymbolsW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymEnumerateSymbolsW64(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64W, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymEnumerateSymbolsW64(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64W, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymEnumerateSymbolsW64(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).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 +pub unsafe fn SymFindDebugInfoFile(hprocess: super::super::super::Foundation::HANDLE, filename: P1, debugfilepath: windows_core::PSTR, callback: Option, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result where - P0: windows_core::Param, 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), core::mem::transmute(callback), core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); + let result__ = SymFindDebugInfoFile(core::mem::transmute(hprocess), filename.param().abi(), core::mem::transmute(debugfilepath), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callerdata.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SymFindDebugInfoFileW(hprocess: P0, filename: P1, debugfilepath: windows_core::PWSTR, callback: PFIND_DEBUG_FILE_CALLBACKW, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn SymFindDebugInfoFileW(hprocess: super::super::super::Foundation::HANDLE, filename: P1, debugfilepath: windows_core::PWSTR, callback: Option, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result where - P0: windows_core::Param, 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), core::mem::transmute(callback), core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); + let result__ = SymFindDebugInfoFileW(core::mem::transmute(hprocess), filename.param().abi(), core::mem::transmute(debugfilepath), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callerdata.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SymFindExecutableImage(hprocess: P0, filename: P1, imagefilepath: windows_core::PSTR, callback: PFIND_EXE_FILE_CALLBACK, callerdata: *const core::ffi::c_void) -> windows_core::Result +pub unsafe fn SymFindExecutableImage(hprocess: super::super::super::Foundation::HANDLE, filename: P1, imagefilepath: windows_core::PSTR, callback: PFIND_EXE_FILE_CALLBACK, callerdata: *const core::ffi::c_void) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFindExecutableImage(hprocess : super::super::super::Foundation:: HANDLE, filename : 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__ = SymFindExecutableImage(hprocess.param().abi(), filename.param().abi(), core::mem::transmute(imagefilepath), core::mem::transmute(callback), core::mem::transmute(callerdata)); + let result__ = SymFindExecutableImage(core::mem::transmute(hprocess), filename.param().abi(), core::mem::transmute(imagefilepath), core::mem::transmute(callback), core::mem::transmute(callerdata)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SymFindExecutableImageW(hprocess: P0, filename: P1, imagefilepath: windows_core::PWSTR, callback: PFIND_EXE_FILE_CALLBACKW, callerdata: *const core::ffi::c_void) -> windows_core::Result +pub unsafe fn SymFindExecutableImageW(hprocess: super::super::super::Foundation::HANDLE, filename: P1, imagefilepath: windows_core::PWSTR, callback: PFIND_EXE_FILE_CALLBACKW, callerdata: *const core::ffi::c_void) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFindExecutableImageW(hprocess : super::super::super::Foundation:: HANDLE, filename : windows_core::PCWSTR, imagefilepath : windows_core::PWSTR, callback : PFIND_EXE_FILE_CALLBACKW, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = SymFindExecutableImageW(hprocess.param().abi(), filename.param().abi(), core::mem::transmute(imagefilepath), core::mem::transmute(callback), core::mem::transmute(callerdata)); + let result__ = SymFindExecutableImageW(core::mem::transmute(hprocess), filename.param().abi(), core::mem::transmute(imagefilepath), core::mem::transmute(callback), core::mem::transmute(callerdata)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SymFindFileInPath(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::PSTR, callback: PFINDFILEINPATHCALLBACK, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn SymFindFileInPath(hprocess: super::super::super::Foundation::HANDLE, searchpatha: P1, filename: P2, id: Option<*const core::ffi::c_void>, two: u32, three: u32, flags: SYM_FIND_ID_OPTION, foundfile: windows_core::PSTR, callback: Option, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(two), core::mem::transmute(three), core::mem::transmute(flags), core::mem::transmute(foundfile), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + SymFindFileInPath(core::mem::transmute(hprocess), searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(id.unwrap_or(core::mem::zeroed())), core::mem::transmute(two), core::mem::transmute(three), core::mem::transmute(flags), core::mem::transmute(foundfile), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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<()> +pub unsafe fn SymFindFileInPathW(hprocess: super::super::super::Foundation::HANDLE, 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: Option, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(two), core::mem::transmute(three), core::mem::transmute(flags), core::mem::transmute(foundfile), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + SymFindFileInPathW(core::mem::transmute(hprocess), searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(id.unwrap_or(core::mem::zeroed())), core::mem::transmute(two), core::mem::transmute(three), core::mem::transmute(flags), core::mem::transmute(foundfile), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymFromAddr(hprocess: P0, address: u64, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymFromAddr(hprocess: super::super::super::Foundation::HANDLE, address: u64, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> { 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(), core::mem::transmute(address), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(symbol)).ok() + SymFromAddr(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromAddrW(hprocess: P0, address: u64, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymFromAddrW(hprocess: super::super::super::Foundation::HANDLE, address: u64, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> { 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(), core::mem::transmute(address), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(symbol)).ok() + SymFromAddrW(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromIndex(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymFromIndex(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymFromIndex(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymFromIndex(hprocess.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symbol)).ok() + SymFromIndex(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromIndexW(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymFromIndexW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymFromIndexW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymFromIndexW(hprocess.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symbol)).ok() + SymFromIndexW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromInlineContext(hprocess: P0, address: u64, inlinecontext: u32, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymFromInlineContext(hprocess: super::super::super::Foundation::HANDLE, address: u64, inlinecontext: u32, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> { 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(), core::mem::transmute(address), core::mem::transmute(inlinecontext), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(symbol)).ok() + SymFromInlineContext(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(inlinecontext), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromInlineContextW(hprocess: P0, address: u64, inlinecontext: u32, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymFromInlineContextW(hprocess: super::super::super::Foundation::HANDLE, address: u64, inlinecontext: u32, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> { 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(), core::mem::transmute(address), core::mem::transmute(inlinecontext), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(symbol)).ok() + SymFromInlineContextW(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(inlinecontext), core::mem::transmute(displacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromName(hprocess: P0, name: P1, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> +pub unsafe fn SymFromName(hprocess: super::super::super::Foundation::HANDLE, name: P1, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFromName(hprocess : super::super::super::Foundation:: HANDLE, name : windows_core::PCSTR, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymFromName(hprocess.param().abi(), name.param().abi(), core::mem::transmute(symbol)).ok() + SymFromName(core::mem::transmute(hprocess), name.param().abi(), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromNameW(hprocess: P0, name: P1, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> +pub unsafe fn SymFromNameW(hprocess: super::super::super::Foundation::HANDLE, name: P1, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFromNameW(hprocess : super::super::super::Foundation:: HANDLE, name : windows_core::PCWSTR, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymFromNameW(hprocess.param().abi(), name.param().abi(), core::mem::transmute(symbol)).ok() + SymFromNameW(core::mem::transmute(hprocess), name.param().abi(), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromToken(hprocess: P0, base: u64, token: u32, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymFromToken(hprocess: super::super::super::Foundation::HANDLE, base: u64, token: u32, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymFromToken(hprocess : super::super::super::Foundation:: HANDLE, base : u64, token : u32, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymFromToken(hprocess.param().abi(), core::mem::transmute(base), core::mem::transmute(token), core::mem::transmute(symbol)).ok() + SymFromToken(core::mem::transmute(hprocess), core::mem::transmute(base), core::mem::transmute(token), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymFromTokenW(hprocess: P0, base: u64, token: u32, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymFromTokenW(hprocess: super::super::super::Foundation::HANDLE, base: u64, token: u32, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymFromTokenW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, token : u32, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymFromTokenW(hprocess.param().abi(), core::mem::transmute(base), core::mem::transmute(token), core::mem::transmute(symbol)).ok() + SymFromTokenW(core::mem::transmute(hprocess), core::mem::transmute(base), core::mem::transmute(token), core::mem::transmute(symbol)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymFunctionTableAccess(hprocess: P0, addrbase: u32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn SymFunctionTableAccess(hprocess: super::super::super::Foundation::HANDLE, addrbase: u32) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn SymFunctionTableAccess(hprocess : super::super::super::Foundation:: HANDLE, addrbase : u32) -> *mut core::ffi::c_void); - SymFunctionTableAccess(hprocess.param().abi(), core::mem::transmute(addrbase)) + SymFunctionTableAccess(core::mem::transmute(hprocess), core::mem::transmute(addrbase)) } #[inline] -pub unsafe fn SymFunctionTableAccess64(hprocess: P0, addrbase: u64) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn SymFunctionTableAccess64(hprocess: super::super::super::Foundation::HANDLE, addrbase: u64) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn SymFunctionTableAccess64(hprocess : super::super::super::Foundation:: HANDLE, addrbase : u64) -> *mut core::ffi::c_void); - SymFunctionTableAccess64(hprocess.param().abi(), core::mem::transmute(addrbase)) + SymFunctionTableAccess64(core::mem::transmute(hprocess), core::mem::transmute(addrbase)) } #[inline] -pub unsafe fn SymFunctionTableAccess64AccessRoutines(hprocess: P0, addrbase: u64, readmemoryroutine: PREAD_PROCESS_MEMORY_ROUTINE64, getmodulebaseroutine: PGET_MODULE_BASE_ROUTINE64) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn SymFunctionTableAccess64AccessRoutines(hprocess: super::super::super::Foundation::HANDLE, addrbase: u64, readmemoryroutine: Option, getmodulebaseroutine: Option) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn SymFunctionTableAccess64AccessRoutines(hprocess : super::super::super::Foundation:: HANDLE, addrbase : u64, readmemoryroutine : PREAD_PROCESS_MEMORY_ROUTINE64, getmodulebaseroutine : PGET_MODULE_BASE_ROUTINE64) -> *mut core::ffi::c_void); - SymFunctionTableAccess64AccessRoutines(hprocess.param().abi(), core::mem::transmute(addrbase), core::mem::transmute(readmemoryroutine), core::mem::transmute(getmodulebaseroutine)) + SymFunctionTableAccess64AccessRoutines(core::mem::transmute(hprocess), core::mem::transmute(addrbase), core::mem::transmute(readmemoryroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(getmodulebaseroutine.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SymGetExtendedOption(option: IMAGEHLP_EXTENDED_OPTIONS) -> super::super::super::Foundation::BOOL { @@ -1499,14 +1320,13 @@ pub unsafe fn SymGetExtendedOption(option: IMAGEHLP_EXTENDED_OPTIONS) -> super:: SymGetExtendedOption(core::mem::transmute(option)) } #[inline] -pub unsafe fn SymGetFileLineOffsets64(hprocess: P0, modulename: P1, filename: P2, buffer: &mut [u64]) -> u32 +pub unsafe fn SymGetFileLineOffsets64(hprocess: super::super::super::Foundation::HANDLE, modulename: P1, filename: P2, buffer: &mut [u64]) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetFileLineOffsets64(hprocess : super::super::super::Foundation:: HANDLE, modulename : windows_core::PCSTR, filename : windows_core::PCSTR, buffer : *mut u64, bufferlines : u32) -> u32); - SymGetFileLineOffsets64(hprocess.param().abi(), modulename.param().abi(), filename.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) + SymGetFileLineOffsets64(core::mem::transmute(hprocess), modulename.param().abi(), filename.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[inline] pub unsafe fn SymGetHomeDirectory(r#type: IMAGEHLP_HD_TYPE, dir: &mut [u8]) -> windows_core::PSTR { @@ -1520,184 +1340,127 @@ pub unsafe fn SymGetHomeDirectoryW(r#type: IMAGEHLP_HD_TYPE, dir: &mut [u16]) -> } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetLineFromAddr(hprocess: P0, dwaddr: u32, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLineFromAddr(hprocess: super::super::super::Foundation::HANDLE, dwaddr: u32, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINE) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromAddr(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u32, pdwdisplacement : *mut u32, line : *mut IMAGEHLP_LINE) -> super::super::super::Foundation:: BOOL); - SymGetLineFromAddr(hprocess.param().abi(), core::mem::transmute(dwaddr), core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() + SymGetLineFromAddr(core::mem::transmute(hprocess), core::mem::transmute(dwaddr), core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() } #[inline] -pub unsafe fn SymGetLineFromAddr64(hprocess: P0, qwaddr: u64, pdwdisplacement: *mut u32, line64: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLineFromAddr64(hprocess: super::super::super::Foundation::HANDLE, qwaddr: u64, pdwdisplacement: *mut u32, line64: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromAddr64(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, pdwdisplacement : *mut u32, line64 : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromAddr64(hprocess.param().abi(), core::mem::transmute(qwaddr), core::mem::transmute(pdwdisplacement), core::mem::transmute(line64)).ok() + SymGetLineFromAddr64(core::mem::transmute(hprocess), core::mem::transmute(qwaddr), core::mem::transmute(pdwdisplacement), core::mem::transmute(line64)).ok() } #[inline] -pub unsafe fn SymGetLineFromAddrW64(hprocess: P0, dwaddr: u64, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLineFromAddrW64(hprocess: super::super::super::Foundation::HANDLE, dwaddr: u64, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromAddrW64(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u64, pdwdisplacement : *mut u32, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromAddrW64(hprocess.param().abi(), core::mem::transmute(dwaddr), core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() + SymGetLineFromAddrW64(core::mem::transmute(hprocess), core::mem::transmute(dwaddr), core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() } #[inline] -pub unsafe fn SymGetLineFromInlineContext(hprocess: P0, qwaddr: u64, inlinecontext: u32, qwmodulebaseaddress: u64, pdwdisplacement: *mut u32, line64: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLineFromInlineContext(hprocess: super::super::super::Foundation::HANDLE, qwaddr: u64, inlinecontext: u32, qwmodulebaseaddress: Option, pdwdisplacement: *mut u32, line64: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromInlineContext(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, inlinecontext : u32, qwmodulebaseaddress : u64, pdwdisplacement : *mut u32, line64 : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromInlineContext(hprocess.param().abi(), core::mem::transmute(qwaddr), core::mem::transmute(inlinecontext), core::mem::transmute(qwmodulebaseaddress), core::mem::transmute(pdwdisplacement), core::mem::transmute(line64)).ok() + SymGetLineFromInlineContext(core::mem::transmute(hprocess), core::mem::transmute(qwaddr), core::mem::transmute(inlinecontext), core::mem::transmute(qwmodulebaseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdisplacement), core::mem::transmute(line64)).ok() } #[inline] -pub unsafe fn SymGetLineFromInlineContextW(hprocess: P0, dwaddr: u64, inlinecontext: u32, qwmodulebaseaddress: u64, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLineFromInlineContextW(hprocess: super::super::super::Foundation::HANDLE, dwaddr: u64, inlinecontext: u32, qwmodulebaseaddress: Option, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromInlineContextW(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u64, inlinecontext : u32, qwmodulebaseaddress : u64, pdwdisplacement : *mut u32, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromInlineContextW(hprocess.param().abi(), core::mem::transmute(dwaddr), core::mem::transmute(inlinecontext), core::mem::transmute(qwmodulebaseaddress), core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() + SymGetLineFromInlineContextW(core::mem::transmute(hprocess), core::mem::transmute(dwaddr), core::mem::transmute(inlinecontext), core::mem::transmute(qwmodulebaseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdisplacement), core::mem::transmute(line)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetLineFromName(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINE) -> windows_core::Result<()> +pub unsafe fn SymGetLineFromName(hprocess: super::super::super::Foundation::HANDLE, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINE) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromName(hprocess : super::super::super::Foundation:: HANDLE, modulename : windows_core::PCSTR, filename : windows_core::PCSTR, dwlinenumber : u32, pldisplacement : *mut i32, line : *mut IMAGEHLP_LINE) -> super::super::super::Foundation:: BOOL); - SymGetLineFromName(hprocess.param().abi(), modulename.param().abi(), filename.param().abi(), core::mem::transmute(dwlinenumber), core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() + SymGetLineFromName(core::mem::transmute(hprocess), modulename.param().abi(), filename.param().abi(), core::mem::transmute(dwlinenumber), core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() } #[inline] -pub unsafe fn SymGetLineFromName64(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> +pub unsafe fn SymGetLineFromName64(hprocess: super::super::super::Foundation::HANDLE, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromName64(hprocess : super::super::super::Foundation:: HANDLE, modulename : windows_core::PCSTR, filename : windows_core::PCSTR, dwlinenumber : u32, pldisplacement : *mut i32, line : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromName64(hprocess.param().abi(), modulename.param().abi(), filename.param().abi(), core::mem::transmute(dwlinenumber), core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() + SymGetLineFromName64(core::mem::transmute(hprocess), modulename.param().abi(), filename.param().abi(), core::mem::transmute(dwlinenumber), core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() } #[inline] -pub unsafe fn SymGetLineFromNameW64(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> +pub unsafe fn SymGetLineFromNameW64(hprocess: super::super::super::Foundation::HANDLE, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromNameW64(hprocess : super::super::super::Foundation:: HANDLE, modulename : windows_core::PCWSTR, filename : windows_core::PCWSTR, dwlinenumber : u32, pldisplacement : *mut i32, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromNameW64(hprocess.param().abi(), modulename.param().abi(), filename.param().abi(), core::mem::transmute(dwlinenumber), core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() + SymGetLineFromNameW64(core::mem::transmute(hprocess), modulename.param().abi(), filename.param().abi(), core::mem::transmute(dwlinenumber), core::mem::transmute(pldisplacement), core::mem::transmute(line)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetLineNext(hprocess: P0, line: *mut IMAGEHLP_LINE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLineNext(hprocess: super::super::super::Foundation::HANDLE, line: *mut IMAGEHLP_LINE) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineNext(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINE) -> super::super::super::Foundation:: BOOL); - SymGetLineNext(hprocess.param().abi(), core::mem::transmute(line)).ok() + SymGetLineNext(core::mem::transmute(hprocess), core::mem::transmute(line)).ok() } #[inline] -pub unsafe fn SymGetLineNext64(hprocess: P0, line: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLineNext64(hprocess: super::super::super::Foundation::HANDLE, line: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineNext64(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLineNext64(hprocess.param().abi(), core::mem::transmute(line)).ok() + SymGetLineNext64(core::mem::transmute(hprocess), core::mem::transmute(line)).ok() } #[inline] -pub unsafe fn SymGetLineNextW64(hprocess: P0, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLineNextW64(hprocess: super::super::super::Foundation::HANDLE, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLineNextW64(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLineNextW64(hprocess.param().abi(), core::mem::transmute(line)).ok() + SymGetLineNextW64(core::mem::transmute(hprocess), core::mem::transmute(line)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetLinePrev(hprocess: P0, line: *mut IMAGEHLP_LINE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLinePrev(hprocess: super::super::super::Foundation::HANDLE, line: *mut IMAGEHLP_LINE) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLinePrev(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINE) -> super::super::super::Foundation:: BOOL); - SymGetLinePrev(hprocess.param().abi(), core::mem::transmute(line)).ok() + SymGetLinePrev(core::mem::transmute(hprocess), core::mem::transmute(line)).ok() } #[inline] -pub unsafe fn SymGetLinePrev64(hprocess: P0, line: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLinePrev64(hprocess: super::super::super::Foundation::HANDLE, line: *mut IMAGEHLP_LINE64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLinePrev64(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLinePrev64(hprocess.param().abi(), core::mem::transmute(line)).ok() + SymGetLinePrev64(core::mem::transmute(hprocess), core::mem::transmute(line)).ok() } #[inline] -pub unsafe fn SymGetLinePrevW64(hprocess: P0, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetLinePrevW64(hprocess: super::super::super::Foundation::HANDLE, line: *mut IMAGEHLP_LINEW64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetLinePrevW64(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLinePrevW64(hprocess.param().abi(), core::mem::transmute(line)).ok() + SymGetLinePrevW64(core::mem::transmute(hprocess), core::mem::transmute(line)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetModuleBase(hprocess: P0, dwaddr: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetModuleBase(hprocess: super::super::super::Foundation::HANDLE, dwaddr: u32) -> u32 { windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleBase(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u32) -> u32); - SymGetModuleBase(hprocess.param().abi(), core::mem::transmute(dwaddr)) + SymGetModuleBase(core::mem::transmute(hprocess), core::mem::transmute(dwaddr)) } #[inline] -pub unsafe fn SymGetModuleBase64(hprocess: P0, qwaddr: u64) -> u64 -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetModuleBase64(hprocess: super::super::super::Foundation::HANDLE, qwaddr: u64) -> u64 { windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleBase64(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64) -> u64); - SymGetModuleBase64(hprocess.param().abi(), core::mem::transmute(qwaddr)) + SymGetModuleBase64(core::mem::transmute(hprocess), core::mem::transmute(qwaddr)) } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetModuleInfo(hprocess: P0, dwaddr: u32, moduleinfo: *mut IMAGEHLP_MODULE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetModuleInfo(hprocess: super::super::super::Foundation::HANDLE, dwaddr: u32, moduleinfo: *mut IMAGEHLP_MODULE) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleInfo(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u32, moduleinfo : *mut IMAGEHLP_MODULE) -> super::super::super::Foundation:: BOOL); - SymGetModuleInfo(hprocess.param().abi(), core::mem::transmute(dwaddr), core::mem::transmute(moduleinfo)).ok() + SymGetModuleInfo(core::mem::transmute(hprocess), core::mem::transmute(dwaddr), core::mem::transmute(moduleinfo)).ok() } #[inline] -pub unsafe fn SymGetModuleInfo64(hprocess: P0, qwaddr: u64, moduleinfo: *mut IMAGEHLP_MODULE64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetModuleInfo64(hprocess: super::super::super::Foundation::HANDLE, qwaddr: u64, moduleinfo: *mut IMAGEHLP_MODULE64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleInfo64(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, moduleinfo : *mut IMAGEHLP_MODULE64) -> super::super::super::Foundation:: BOOL); - SymGetModuleInfo64(hprocess.param().abi(), core::mem::transmute(qwaddr), core::mem::transmute(moduleinfo)).ok() + SymGetModuleInfo64(core::mem::transmute(hprocess), core::mem::transmute(qwaddr), core::mem::transmute(moduleinfo)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetModuleInfoW(hprocess: P0, dwaddr: u32, moduleinfo: *mut IMAGEHLP_MODULEW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetModuleInfoW(hprocess: super::super::super::Foundation::HANDLE, dwaddr: u32, moduleinfo: *mut IMAGEHLP_MODULEW) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleInfoW(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u32, moduleinfo : *mut IMAGEHLP_MODULEW) -> super::super::super::Foundation:: BOOL); - SymGetModuleInfoW(hprocess.param().abi(), core::mem::transmute(dwaddr), core::mem::transmute(moduleinfo)).ok() + SymGetModuleInfoW(core::mem::transmute(hprocess), core::mem::transmute(dwaddr), core::mem::transmute(moduleinfo)).ok() } #[inline] -pub unsafe fn SymGetModuleInfoW64(hprocess: P0, qwaddr: u64, moduleinfo: *mut IMAGEHLP_MODULEW64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetModuleInfoW64(hprocess: super::super::super::Foundation::HANDLE, qwaddr: u64, moduleinfo: *mut IMAGEHLP_MODULEW64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleInfoW64(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, moduleinfo : *mut IMAGEHLP_MODULEW64) -> super::super::super::Foundation:: BOOL); - SymGetModuleInfoW64(hprocess.param().abi(), core::mem::transmute(qwaddr), core::mem::transmute(moduleinfo)).ok() + SymGetModuleInfoW64(core::mem::transmute(hprocess), core::mem::transmute(qwaddr), core::mem::transmute(moduleinfo)).ok() } #[inline] -pub unsafe fn SymGetOmaps(hprocess: P0, baseofdll: u64, omapto: *mut *mut OMAP, comapto: *mut u64, omapfrom: *mut *mut OMAP, comapfrom: *mut u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetOmaps(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, omapto: *mut *mut OMAP, comapto: *mut u64, omapfrom: *mut *mut OMAP, comapfrom: *mut u64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetOmaps(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, omapto : *mut *mut OMAP, comapto : *mut u64, omapfrom : *mut *mut OMAP, comapfrom : *mut u64) -> super::super::super::Foundation:: BOOL); - SymGetOmaps(hprocess.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(omapto), core::mem::transmute(comapto), core::mem::transmute(omapfrom), core::mem::transmute(comapfrom)).ok() + SymGetOmaps(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(omapto), core::mem::transmute(comapto), core::mem::transmute(omapfrom), core::mem::transmute(comapfrom)).ok() } #[inline] pub unsafe fn SymGetOptions() -> u32 { @@ -1705,369 +1468,300 @@ pub unsafe fn SymGetOptions() -> u32 { SymGetOptions() } #[inline] -pub unsafe fn SymGetScope(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetScope(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetScope(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymGetScope(hprocess.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symbol)).ok() + SymGetScope(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetScopeW(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetScopeW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetScopeW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymGetScopeW(hprocess.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symbol)).ok() + SymGetScopeW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetSearchPath(hprocess: P0, searchpatha: &mut [u8]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetSearchPath(hprocess: super::super::super::Foundation::HANDLE, searchpatha: &mut [u8]) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetSearchPath(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : windows_core::PSTR, searchpathlength : u32) -> super::super::super::Foundation:: BOOL); - SymGetSearchPath(hprocess.param().abi(), core::mem::transmute(searchpatha.as_ptr()), searchpatha.len().try_into().unwrap()).ok() + SymGetSearchPath(core::mem::transmute(hprocess), core::mem::transmute(searchpatha.as_ptr()), searchpatha.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetSearchPathW(hprocess: P0, searchpatha: &mut [u16]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetSearchPathW(hprocess: super::super::super::Foundation::HANDLE, searchpatha: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetSearchPathW(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : windows_core::PWSTR, searchpathlength : u32) -> super::super::super::Foundation:: BOOL); - SymGetSearchPathW(hprocess.param().abi(), core::mem::transmute(searchpatha.as_ptr()), searchpatha.len().try_into().unwrap()).ok() + SymGetSearchPathW(core::mem::transmute(hprocess), core::mem::transmute(searchpatha.as_ptr()), searchpatha.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetSourceFile(hprocess: P0, base: u64, params: P2, filespec: P3, filepath: &mut [u8]) -> windows_core::Result<()> +pub unsafe fn SymGetSourceFile(hprocess: super::super::super::Foundation::HANDLE, base: u64, params: P2, filespec: P3, filepath: &mut [u8]) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFile(hprocess : super::super::super::Foundation:: HANDLE, base : u64, params : windows_core::PCSTR, filespec : windows_core::PCSTR, filepath : windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFile(hprocess.param().abi(), core::mem::transmute(base), params.param().abi(), filespec.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() + SymGetSourceFile(core::mem::transmute(hprocess), core::mem::transmute(base), params.param().abi(), filespec.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetSourceFileChecksum(hprocess: P0, base: u64, filespec: P2, pchecksumtype: *mut u32, pchecksum: &mut [u8], pactualbyteswritten: *mut u32) -> windows_core::Result<()> +pub unsafe fn SymGetSourceFileChecksum(hprocess: super::super::super::Foundation::HANDLE, base: u64, filespec: P2, pchecksumtype: *mut u32, pchecksum: &mut [u8], pactualbyteswritten: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileChecksum(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : windows_core::PCSTR, pchecksumtype : *mut u32, pchecksum : *mut u8, checksumsize : u32, pactualbyteswritten : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileChecksum(hprocess.param().abi(), core::mem::transmute(base), filespec.param().abi(), core::mem::transmute(pchecksumtype), core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), core::mem::transmute(pactualbyteswritten)).ok() + SymGetSourceFileChecksum(core::mem::transmute(hprocess), core::mem::transmute(base), filespec.param().abi(), core::mem::transmute(pchecksumtype), core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), core::mem::transmute(pactualbyteswritten)).ok() } #[inline] -pub unsafe fn SymGetSourceFileChecksumW(hprocess: P0, base: u64, filespec: P2, pchecksumtype: *mut u32, pchecksum: &mut [u8], pactualbyteswritten: *mut u32) -> windows_core::Result<()> +pub unsafe fn SymGetSourceFileChecksumW(hprocess: super::super::super::Foundation::HANDLE, base: u64, filespec: P2, pchecksumtype: *mut u32, pchecksum: &mut [u8], pactualbyteswritten: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileChecksumW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : windows_core::PCWSTR, pchecksumtype : *mut u32, pchecksum : *mut u8, checksumsize : u32, pactualbyteswritten : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileChecksumW(hprocess.param().abi(), core::mem::transmute(base), filespec.param().abi(), core::mem::transmute(pchecksumtype), core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), core::mem::transmute(pactualbyteswritten)).ok() + SymGetSourceFileChecksumW(core::mem::transmute(hprocess), core::mem::transmute(base), filespec.param().abi(), core::mem::transmute(pchecksumtype), core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), core::mem::transmute(pactualbyteswritten)).ok() } #[inline] -pub unsafe fn SymGetSourceFileFromToken(hprocess: P0, token: *const core::ffi::c_void, params: P2, filepath: &mut [u8]) -> windows_core::Result<()> +pub unsafe fn SymGetSourceFileFromToken(hprocess: super::super::super::Foundation::HANDLE, token: *const core::ffi::c_void, params: P2, filepath: &mut [u8]) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromToken(hprocess : super::super::super::Foundation:: HANDLE, token : *const core::ffi::c_void, params : windows_core::PCSTR, filepath : windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromToken(hprocess.param().abi(), core::mem::transmute(token), params.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() + SymGetSourceFileFromToken(core::mem::transmute(hprocess), core::mem::transmute(token), params.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetSourceFileFromTokenByTokenName(hprocess: P0, token: *const core::ffi::c_void, tokenname: P2, params: P3, filepath: &mut [u8]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileFromTokenByTokenName(hprocess: super::super::super::Foundation::HANDLE, token: *const core::ffi::c_void, tokenname: P2, params: P3, filepath: &mut [u8]) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromTokenByTokenName(hprocess : super::super::super::Foundation:: HANDLE, token : *const core::ffi::c_void, tokenname : windows_core::PCSTR, params : windows_core::PCSTR, filepath : windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromTokenByTokenName(hprocess.param().abi(), core::mem::transmute(token), tokenname.param().abi(), params.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()) + SymGetSourceFileFromTokenByTokenName(core::mem::transmute(hprocess), core::mem::transmute(token), tokenname.param().abi(), params.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()) } #[inline] -pub unsafe fn SymGetSourceFileFromTokenByTokenNameW(hprocess: P0, token: *const core::ffi::c_void, tokenname: P2, params: P3, filepath: &mut [u16]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileFromTokenByTokenNameW(hprocess: super::super::super::Foundation::HANDLE, token: *const core::ffi::c_void, tokenname: P2, params: P3, filepath: &mut [u16]) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromTokenByTokenNameW(hprocess : super::super::super::Foundation:: HANDLE, token : *const core::ffi::c_void, tokenname : windows_core::PCWSTR, params : windows_core::PCWSTR, filepath : windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromTokenByTokenNameW(hprocess.param().abi(), core::mem::transmute(token), tokenname.param().abi(), params.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()) + SymGetSourceFileFromTokenByTokenNameW(core::mem::transmute(hprocess), core::mem::transmute(token), tokenname.param().abi(), params.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()) } #[inline] -pub unsafe fn SymGetSourceFileFromTokenW(hprocess: P0, token: *const core::ffi::c_void, params: P2, filepath: &mut [u16]) -> windows_core::Result<()> +pub unsafe fn SymGetSourceFileFromTokenW(hprocess: super::super::super::Foundation::HANDLE, token: *const core::ffi::c_void, params: P2, filepath: &mut [u16]) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromTokenW(hprocess : super::super::super::Foundation:: HANDLE, token : *const core::ffi::c_void, params : windows_core::PCWSTR, filepath : windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromTokenW(hprocess.param().abi(), core::mem::transmute(token), params.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() + SymGetSourceFileFromTokenW(core::mem::transmute(hprocess), core::mem::transmute(token), params.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetSourceFileToken(hprocess: P0, base: u64, filespec: P2, token: *mut *mut core::ffi::c_void, size: *mut u32) -> windows_core::Result<()> +pub unsafe fn SymGetSourceFileToken(hprocess: super::super::super::Foundation::HANDLE, base: u64, filespec: P2, token: *mut *mut core::ffi::c_void, size: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileToken(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : windows_core::PCSTR, token : *mut *mut core::ffi::c_void, size : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileToken(hprocess.param().abi(), core::mem::transmute(base), filespec.param().abi(), core::mem::transmute(token), core::mem::transmute(size)).ok() + SymGetSourceFileToken(core::mem::transmute(hprocess), core::mem::transmute(base), filespec.param().abi(), core::mem::transmute(token), core::mem::transmute(size)).ok() } #[inline] -pub unsafe fn SymGetSourceFileTokenByTokenName(hprocess: P0, base: u64, filespec: P2, tokenname: P3, tokenparameters: P4, token: *mut *mut core::ffi::c_void, size: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileTokenByTokenName(hprocess: super::super::super::Foundation::HANDLE, base: u64, filespec: P2, tokenname: P3, tokenparameters: P4, token: *mut *mut core::ffi::c_void, size: *mut u32) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileTokenByTokenName(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : windows_core::PCSTR, tokenname : windows_core::PCSTR, tokenparameters : windows_core::PCSTR, token : *mut *mut core::ffi::c_void, size : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileTokenByTokenName(hprocess.param().abi(), core::mem::transmute(base), filespec.param().abi(), tokenname.param().abi(), tokenparameters.param().abi(), core::mem::transmute(token), core::mem::transmute(size)) + SymGetSourceFileTokenByTokenName(core::mem::transmute(hprocess), core::mem::transmute(base), filespec.param().abi(), tokenname.param().abi(), tokenparameters.param().abi(), core::mem::transmute(token), core::mem::transmute(size)) } #[inline] -pub unsafe fn SymGetSourceFileTokenByTokenNameW(hprocess: P0, base: u64, filespec: P2, tokenname: P3, tokenparameters: P4, token: *mut *mut core::ffi::c_void, size: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileTokenByTokenNameW(hprocess: super::super::super::Foundation::HANDLE, base: u64, filespec: P2, tokenname: P3, tokenparameters: P4, token: *mut *mut core::ffi::c_void, size: *mut u32) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileTokenByTokenNameW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : windows_core::PCWSTR, tokenname : windows_core::PCWSTR, tokenparameters : windows_core::PCWSTR, token : *mut *mut core::ffi::c_void, size : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileTokenByTokenNameW(hprocess.param().abi(), core::mem::transmute(base), filespec.param().abi(), tokenname.param().abi(), tokenparameters.param().abi(), core::mem::transmute(token), core::mem::transmute(size)) + SymGetSourceFileTokenByTokenNameW(core::mem::transmute(hprocess), core::mem::transmute(base), filespec.param().abi(), tokenname.param().abi(), tokenparameters.param().abi(), core::mem::transmute(token), core::mem::transmute(size)) } #[inline] -pub unsafe fn SymGetSourceFileTokenW(hprocess: P0, base: u64, filespec: P2, token: *mut *mut core::ffi::c_void, size: *mut u32) -> windows_core::Result<()> +pub unsafe fn SymGetSourceFileTokenW(hprocess: super::super::super::Foundation::HANDLE, base: u64, filespec: P2, token: *mut *mut core::ffi::c_void, size: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileTokenW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : windows_core::PCWSTR, token : *mut *mut core::ffi::c_void, size : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileTokenW(hprocess.param().abi(), core::mem::transmute(base), filespec.param().abi(), core::mem::transmute(token), core::mem::transmute(size)).ok() + SymGetSourceFileTokenW(core::mem::transmute(hprocess), core::mem::transmute(base), filespec.param().abi(), core::mem::transmute(token), core::mem::transmute(size)).ok() } #[inline] -pub unsafe fn SymGetSourceFileW(hprocess: P0, base: u64, params: P2, filespec: P3, filepath: &mut [u16]) -> windows_core::Result<()> +pub unsafe fn SymGetSourceFileW(hprocess: super::super::super::Foundation::HANDLE, base: u64, params: P2, filespec: P3, filepath: &mut [u16]) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, params : windows_core::PCWSTR, filespec : windows_core::PCWSTR, filepath : windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileW(hprocess.param().abi(), core::mem::transmute(base), params.param().abi(), filespec.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() + SymGetSourceFileW(core::mem::transmute(hprocess), core::mem::transmute(base), params.param().abi(), filespec.param().abi(), core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetSourceVarFromToken(hprocess: P0, token: *const core::ffi::c_void, params: P2, varname: P3, value: &mut [u8]) -> windows_core::Result<()> +pub unsafe fn SymGetSourceVarFromToken(hprocess: super::super::super::Foundation::HANDLE, token: *const core::ffi::c_void, params: P2, varname: P3, value: &mut [u8]) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceVarFromToken(hprocess : super::super::super::Foundation:: HANDLE, token : *const core::ffi::c_void, params : windows_core::PCSTR, varname : windows_core::PCSTR, value : windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceVarFromToken(hprocess.param().abi(), core::mem::transmute(token), params.param().abi(), varname.param().abi(), core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() + SymGetSourceVarFromToken(core::mem::transmute(hprocess), core::mem::transmute(token), params.param().abi(), varname.param().abi(), core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetSourceVarFromTokenW(hprocess: P0, token: *const core::ffi::c_void, params: P2, varname: P3, value: &mut [u16]) -> windows_core::Result<()> +pub unsafe fn SymGetSourceVarFromTokenW(hprocess: super::super::super::Foundation::HANDLE, token: *const core::ffi::c_void, params: P2, varname: P3, value: &mut [u16]) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceVarFromTokenW(hprocess : super::super::super::Foundation:: HANDLE, token : *const core::ffi::c_void, params : windows_core::PCWSTR, varname : windows_core::PCWSTR, value : windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceVarFromTokenW(hprocess.param().abi(), core::mem::transmute(token), params.param().abi(), varname.param().abi(), core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() + SymGetSourceVarFromTokenW(core::mem::transmute(hprocess), core::mem::transmute(token), params.param().abi(), varname.param().abi(), core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetSymFromAddr(hprocess: P0, dwaddr: u32, pdwdisplacement: Option<*mut u32>, symbol: *mut IMAGEHLP_SYMBOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetSymFromAddr(hprocess: super::super::super::Foundation::HANDLE, dwaddr: u32, pdwdisplacement: Option<*mut u32>, symbol: *mut IMAGEHLP_SYMBOL) -> windows_core::Result<()> { 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(), core::mem::transmute(dwaddr), core::mem::transmute(pdwdisplacement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(symbol)).ok() + SymGetSymFromAddr(core::mem::transmute(hprocess), core::mem::transmute(dwaddr), core::mem::transmute(pdwdisplacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetSymFromAddr64(hprocess: P0, qwaddr: u64, pdwdisplacement: Option<*mut u64>, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetSymFromAddr64(hprocess: super::super::super::Foundation::HANDLE, qwaddr: u64, pdwdisplacement: Option<*mut u64>, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> { 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(), core::mem::transmute(qwaddr), core::mem::transmute(pdwdisplacement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(symbol)).ok() + SymGetSymFromAddr64(core::mem::transmute(hprocess), core::mem::transmute(qwaddr), core::mem::transmute(pdwdisplacement.unwrap_or(core::mem::zeroed())), core::mem::transmute(symbol)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetSymFromName(hprocess: P0, name: P1, symbol: *mut IMAGEHLP_SYMBOL) -> windows_core::Result<()> +pub unsafe fn SymGetSymFromName(hprocess: super::super::super::Foundation::HANDLE, name: P1, symbol: *mut IMAGEHLP_SYMBOL) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSymFromName(hprocess : super::super::super::Foundation:: HANDLE, name : windows_core::PCSTR, symbol : *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation:: BOOL); - SymGetSymFromName(hprocess.param().abi(), name.param().abi(), core::mem::transmute(symbol)).ok() + SymGetSymFromName(core::mem::transmute(hprocess), name.param().abi(), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetSymFromName64(hprocess: P0, name: P1, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> +pub unsafe fn SymGetSymFromName64(hprocess: super::super::super::Foundation::HANDLE, name: P1, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSymFromName64(hprocess : super::super::super::Foundation:: HANDLE, name : windows_core::PCSTR, symbol : *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation:: BOOL); - SymGetSymFromName64(hprocess.param().abi(), name.param().abi(), core::mem::transmute(symbol)).ok() + SymGetSymFromName64(core::mem::transmute(hprocess), name.param().abi(), core::mem::transmute(symbol)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetSymNext(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetSymNext(hprocess: super::super::super::Foundation::HANDLE, symbol: *mut IMAGEHLP_SYMBOL) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetSymNext(hprocess : super::super::super::Foundation:: HANDLE, symbol : *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation:: BOOL); - SymGetSymNext(hprocess.param().abi(), core::mem::transmute(symbol)).ok() + SymGetSymNext(core::mem::transmute(hprocess), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetSymNext64(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetSymNext64(hprocess: super::super::super::Foundation::HANDLE, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetSymNext64(hprocess : super::super::super::Foundation:: HANDLE, symbol : *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation:: BOOL); - SymGetSymNext64(hprocess.param().abi(), core::mem::transmute(symbol)).ok() + SymGetSymNext64(core::mem::transmute(hprocess), core::mem::transmute(symbol)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymGetSymPrev(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetSymPrev(hprocess: super::super::super::Foundation::HANDLE, symbol: *mut IMAGEHLP_SYMBOL) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetSymPrev(hprocess : super::super::super::Foundation:: HANDLE, symbol : *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation:: BOOL); - SymGetSymPrev(hprocess.param().abi(), core::mem::transmute(symbol)).ok() + SymGetSymPrev(core::mem::transmute(hprocess), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetSymPrev64(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetSymPrev64(hprocess: super::super::super::Foundation::HANDLE, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetSymPrev64(hprocess : super::super::super::Foundation:: HANDLE, symbol : *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation:: BOOL); - SymGetSymPrev64(hprocess.param().abi(), core::mem::transmute(symbol)).ok() + SymGetSymPrev64(core::mem::transmute(hprocess), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetSymbolFile(hprocess: P0, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u8], dbgfile: &mut [u8]) -> windows_core::Result<()> +pub unsafe fn SymGetSymbolFile(hprocess: Option, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u8], dbgfile: &mut [u8]) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSymbolFile(hprocess : super::super::super::Foundation:: HANDLE, sympath : windows_core::PCSTR, imagefile : windows_core::PCSTR, r#type : u32, symbolfile : windows_core::PSTR, csymbolfile : usize, dbgfile : windows_core::PSTR, cdbgfile : usize) -> super::super::super::Foundation:: BOOL); - SymGetSymbolFile(hprocess.param().abi(), sympath.param().abi(), imagefile.param().abi(), r#type.0 as _, core::mem::transmute(symbolfile.as_ptr()), symbolfile.len().try_into().unwrap(), core::mem::transmute(dbgfile.as_ptr()), dbgfile.len().try_into().unwrap()).ok() + SymGetSymbolFile(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), sympath.param().abi(), imagefile.param().abi(), r#type.0 as _, core::mem::transmute(symbolfile.as_ptr()), symbolfile.len().try_into().unwrap(), core::mem::transmute(dbgfile.as_ptr()), dbgfile.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetSymbolFileW(hprocess: P0, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u16], dbgfile: &mut [u16]) -> windows_core::Result<()> +pub unsafe fn SymGetSymbolFileW(hprocess: Option, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u16], dbgfile: &mut [u16]) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetSymbolFileW(hprocess : super::super::super::Foundation:: HANDLE, sympath : windows_core::PCWSTR, imagefile : windows_core::PCWSTR, r#type : u32, symbolfile : windows_core::PWSTR, csymbolfile : usize, dbgfile : windows_core::PWSTR, cdbgfile : usize) -> super::super::super::Foundation:: BOOL); - SymGetSymbolFileW(hprocess.param().abi(), sympath.param().abi(), imagefile.param().abi(), r#type.0 as _, core::mem::transmute(symbolfile.as_ptr()), symbolfile.len().try_into().unwrap(), core::mem::transmute(dbgfile.as_ptr()), dbgfile.len().try_into().unwrap()).ok() + SymGetSymbolFileW(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), sympath.param().abi(), imagefile.param().abi(), r#type.0 as _, core::mem::transmute(symbolfile.as_ptr()), symbolfile.len().try_into().unwrap(), core::mem::transmute(dbgfile.as_ptr()), dbgfile.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn SymGetTypeFromName(hprocess: P0, baseofdll: u64, name: P2, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> +pub unsafe fn SymGetTypeFromName(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, name: P2, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetTypeFromName(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : windows_core::PCSTR, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymGetTypeFromName(hprocess.param().abi(), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(symbol)).ok() + SymGetTypeFromName(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetTypeFromNameW(hprocess: P0, baseofdll: u64, name: P2, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> +pub unsafe fn SymGetTypeFromNameW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, name: P2, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetTypeFromNameW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : windows_core::PCWSTR, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymGetTypeFromNameW(hprocess.param().abi(), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(symbol)).ok() + SymGetTypeFromNameW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), name.param().abi(), core::mem::transmute(symbol)).ok() } #[inline] -pub unsafe fn SymGetTypeInfo(hprocess: P0, modbase: u64, typeid: u32, gettype: IMAGEHLP_SYMBOL_TYPE_INFO, pinfo: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetTypeInfo(hprocess: super::super::super::Foundation::HANDLE, modbase: u64, typeid: u32, gettype: IMAGEHLP_SYMBOL_TYPE_INFO, pinfo: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetTypeInfo(hprocess : super::super::super::Foundation:: HANDLE, modbase : u64, typeid : u32, gettype : IMAGEHLP_SYMBOL_TYPE_INFO, pinfo : *mut core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymGetTypeInfo(hprocess.param().abi(), core::mem::transmute(modbase), core::mem::transmute(typeid), core::mem::transmute(gettype), core::mem::transmute(pinfo)).ok() + SymGetTypeInfo(core::mem::transmute(hprocess), core::mem::transmute(modbase), core::mem::transmute(typeid), core::mem::transmute(gettype), core::mem::transmute(pinfo)).ok() } #[inline] -pub unsafe fn SymGetTypeInfoEx(hprocess: P0, modbase: u64, params: *mut IMAGEHLP_GET_TYPE_INFO_PARAMS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetTypeInfoEx(hprocess: super::super::super::Foundation::HANDLE, modbase: u64, params: *mut IMAGEHLP_GET_TYPE_INFO_PARAMS) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymGetTypeInfoEx(hprocess : super::super::super::Foundation:: HANDLE, modbase : u64, params : *mut IMAGEHLP_GET_TYPE_INFO_PARAMS) -> super::super::super::Foundation:: BOOL); - SymGetTypeInfoEx(hprocess.param().abi(), core::mem::transmute(modbase), core::mem::transmute(params)).ok() + SymGetTypeInfoEx(core::mem::transmute(hprocess), core::mem::transmute(modbase), core::mem::transmute(params)).ok() } #[inline] -pub unsafe fn SymGetUnwindInfo(hprocess: P0, address: u64, buffer: Option<*mut core::ffi::c_void>, size: *mut u32) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SymGetUnwindInfo(hprocess: super::super::super::Foundation::HANDLE, address: u64, buffer: Option<*mut core::ffi::c_void>, size: *mut u32) -> super::super::super::Foundation::BOOL { 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(), core::mem::transmute(address), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(size)) + SymGetUnwindInfo(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } #[inline] -pub unsafe fn SymInitialize(hprocess: P0, usersearchpath: P1, finvadeprocess: P2) -> windows_core::Result<()> +pub unsafe fn SymInitialize(hprocess: super::super::super::Foundation::HANDLE, usersearchpath: P1, finvadeprocess: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymInitialize(hprocess : super::super::super::Foundation:: HANDLE, usersearchpath : windows_core::PCSTR, finvadeprocess : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymInitialize(hprocess.param().abi(), usersearchpath.param().abi(), finvadeprocess.param().abi()).ok() + SymInitialize(core::mem::transmute(hprocess), usersearchpath.param().abi(), finvadeprocess.param().abi()).ok() } #[inline] -pub unsafe fn SymInitializeW(hprocess: P0, usersearchpath: P1, finvadeprocess: P2) -> windows_core::Result<()> +pub unsafe fn SymInitializeW(hprocess: super::super::super::Foundation::HANDLE, usersearchpath: P1, finvadeprocess: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymInitializeW(hprocess : super::super::super::Foundation:: HANDLE, usersearchpath : windows_core::PCWSTR, finvadeprocess : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymInitializeW(hprocess.param().abi(), usersearchpath.param().abi(), finvadeprocess.param().abi()).ok() + SymInitializeW(core::mem::transmute(hprocess), usersearchpath.param().abi(), finvadeprocess.param().abi()).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymLoadModule(hprocess: P0, hfile: P1, imagename: P2, modulename: P3, baseofdll: u32, sizeofdll: u32) -> u32 +pub unsafe fn SymLoadModule(hprocess: super::super::super::Foundation::HANDLE, hfile: Option, imagename: P2, modulename: P3, baseofdll: u32, sizeofdll: u32) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymLoadModule(hprocess : super::super::super::Foundation:: HANDLE, hfile : super::super::super::Foundation:: HANDLE, imagename : windows_core::PCSTR, modulename : windows_core::PCSTR, baseofdll : u32, sizeofdll : u32) -> u32); - SymLoadModule(hprocess.param().abi(), hfile.param().abi(), imagename.param().abi(), modulename.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(sizeofdll)) + SymLoadModule(core::mem::transmute(hprocess), core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), imagename.param().abi(), modulename.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(sizeofdll)) } #[inline] -pub unsafe fn SymLoadModule64(hprocess: P0, hfile: P1, imagename: P2, modulename: P3, baseofdll: u64, sizeofdll: u32) -> u64 +pub unsafe fn SymLoadModule64(hprocess: super::super::super::Foundation::HANDLE, hfile: Option, imagename: P2, modulename: P3, baseofdll: u64, sizeofdll: u32) -> u64 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymLoadModule64(hprocess : super::super::super::Foundation:: HANDLE, hfile : super::super::super::Foundation:: HANDLE, imagename : windows_core::PCSTR, modulename : windows_core::PCSTR, baseofdll : u64, sizeofdll : u32) -> u64); - SymLoadModule64(hprocess.param().abi(), hfile.param().abi(), imagename.param().abi(), modulename.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(sizeofdll)) + SymLoadModule64(core::mem::transmute(hprocess), core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), imagename.param().abi(), modulename.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(sizeofdll)) } #[inline] -pub unsafe fn SymLoadModuleEx(hprocess: P0, hfile: P1, imagename: P2, modulename: P3, baseofdll: u64, dllsize: u32, data: Option<*const MODLOAD_DATA>, flags: SYM_LOAD_FLAGS) -> u64 +pub unsafe fn SymLoadModuleEx(hprocess: super::super::super::Foundation::HANDLE, hfile: Option, imagename: P2, modulename: P3, baseofdll: u64, dllsize: u32, data: Option<*const MODLOAD_DATA>, flags: Option) -> u64 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, 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(), core::mem::transmute(baseofdll), core::mem::transmute(dllsize), core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(flags)) + SymLoadModuleEx(core::mem::transmute(hprocess), core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), imagename.param().abi(), modulename.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(dllsize), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn SymLoadModuleExW(hprocess: super::super::super::Foundation::HANDLE, hfile: Option, imagename: P2, modulename: P3, baseofdll: u64, dllsize: u32, data: Option<*const MODLOAD_DATA>, flags: Option) -> u64 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, 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(), core::mem::transmute(baseofdll), core::mem::transmute(dllsize), core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(flags)) + SymLoadModuleExW(core::mem::transmute(hprocess), core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), imagename.param().abi(), modulename.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(dllsize), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[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 +1770,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(core::ptr::null_mut())), core::mem::transmute(matchstop.unwrap_or(core::ptr::null_mut()))).ok() + SymMatchFileName(filename.param().abi(), r#match.param().abi(), core::mem::transmute(filenamestop.unwrap_or(core::mem::zeroed())), core::mem::transmute(matchstop.unwrap_or(core::mem::zeroed()))).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 +1779,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(core::ptr::null_mut())), core::mem::transmute(matchstop.unwrap_or(core::ptr::null_mut()))).ok() + SymMatchFileNameW(filename.param().abi(), r#match.param().abi(), core::mem::transmute(filenamestop.unwrap_or(core::mem::zeroed())), core::mem::transmute(matchstop.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SymMatchString(string: P0, expression: P1, fcase: P2) -> windows_core::Result<()> @@ -2118,120 +1812,82 @@ where SymMatchStringW(string.param().abi(), expression.param().abi(), fcase.param().abi()).ok() } #[inline] -pub unsafe fn SymNext(hprocess: P0, si: *mut SYMBOL_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymNext(hprocess: super::super::super::Foundation::HANDLE, si: *mut SYMBOL_INFO) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymNext(hprocess : super::super::super::Foundation:: HANDLE, si : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymNext(hprocess.param().abi(), core::mem::transmute(si)).ok() + SymNext(core::mem::transmute(hprocess), core::mem::transmute(si)).ok() } #[inline] -pub unsafe fn SymNextW(hprocess: P0, siw: *mut SYMBOL_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymNextW(hprocess: super::super::super::Foundation::HANDLE, siw: *mut SYMBOL_INFOW) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymNextW(hprocess : super::super::super::Foundation:: HANDLE, siw : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymNextW(hprocess.param().abi(), core::mem::transmute(siw)).ok() + SymNextW(core::mem::transmute(hprocess), core::mem::transmute(siw)).ok() } #[inline] -pub unsafe fn SymPrev(hprocess: P0, si: *mut SYMBOL_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymPrev(hprocess: super::super::super::Foundation::HANDLE, si: *mut SYMBOL_INFO) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymPrev(hprocess : super::super::super::Foundation:: HANDLE, si : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymPrev(hprocess.param().abi(), core::mem::transmute(si)).ok() + SymPrev(core::mem::transmute(hprocess), core::mem::transmute(si)).ok() } #[inline] -pub unsafe fn SymPrevW(hprocess: P0, siw: *mut SYMBOL_INFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymPrevW(hprocess: super::super::super::Foundation::HANDLE, siw: *mut SYMBOL_INFOW) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymPrevW(hprocess : super::super::super::Foundation:: HANDLE, siw : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymPrevW(hprocess.param().abi(), core::mem::transmute(siw)).ok() + SymPrevW(core::mem::transmute(hprocess), core::mem::transmute(siw)).ok() } #[inline] -pub unsafe fn SymQueryInlineTrace(hprocess: P0, startaddress: u64, startcontext: u32, startretaddress: u64, curaddress: u64, curcontext: *mut u32, curframeindex: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymQueryInlineTrace(hprocess: super::super::super::Foundation::HANDLE, startaddress: u64, startcontext: u32, startretaddress: u64, curaddress: u64, curcontext: *mut u32, curframeindex: *mut u32) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymQueryInlineTrace(hprocess : super::super::super::Foundation:: HANDLE, startaddress : u64, startcontext : u32, startretaddress : u64, curaddress : u64, curcontext : *mut u32, curframeindex : *mut u32) -> super::super::super::Foundation:: BOOL); - SymQueryInlineTrace(hprocess.param().abi(), core::mem::transmute(startaddress), core::mem::transmute(startcontext), core::mem::transmute(startretaddress), core::mem::transmute(curaddress), core::mem::transmute(curcontext), core::mem::transmute(curframeindex)).ok() + SymQueryInlineTrace(core::mem::transmute(hprocess), core::mem::transmute(startaddress), core::mem::transmute(startcontext), core::mem::transmute(startretaddress), core::mem::transmute(curaddress), core::mem::transmute(curcontext), core::mem::transmute(curframeindex)).ok() } #[inline] -pub unsafe fn SymRefreshModuleList(hprocess: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymRefreshModuleList(hprocess: super::super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymRefreshModuleList(hprocess : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - SymRefreshModuleList(hprocess.param().abi()).ok() + SymRefreshModuleList(core::mem::transmute(hprocess)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymRegisterCallback(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymRegisterCallback(hprocess: super::super::super::Foundation::HANDLE, callbackfunction: PSYMBOL_REGISTERED_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymRegisterCallback(core::mem::transmute(hprocess), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymRegisterCallback64(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymRegisterCallback64(hprocess: super::super::super::Foundation::HANDLE, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymRegisterCallback64(hprocess : super::super::super::Foundation:: HANDLE, callbackfunction : PSYMBOL_REGISTERED_CALLBACK64, usercontext : u64) -> super::super::super::Foundation:: BOOL); - SymRegisterCallback64(hprocess.param().abi(), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext)).ok() + SymRegisterCallback64(core::mem::transmute(hprocess), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext)).ok() } #[inline] -pub unsafe fn SymRegisterCallbackW64(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymRegisterCallbackW64(hprocess: super::super::super::Foundation::HANDLE, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymRegisterCallbackW64(hprocess : super::super::super::Foundation:: HANDLE, callbackfunction : PSYMBOL_REGISTERED_CALLBACK64, usercontext : u64) -> super::super::super::Foundation:: BOOL); - SymRegisterCallbackW64(hprocess.param().abi(), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext)).ok() + SymRegisterCallbackW64(core::mem::transmute(hprocess), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext)).ok() } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymRegisterFunctionEntryCallback(hprocess: P0, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymRegisterFunctionEntryCallback(hprocess: super::super::super::Foundation::HANDLE, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() + SymRegisterFunctionEntryCallback(core::mem::transmute(hprocess), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymRegisterFunctionEntryCallback64(hprocess: P0, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK64, usercontext: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymRegisterFunctionEntryCallback64(hprocess: super::super::super::Foundation::HANDLE, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK64, usercontext: u64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymRegisterFunctionEntryCallback64(hprocess : super::super::super::Foundation:: HANDLE, callbackfunction : PSYMBOL_FUNCENTRY_CALLBACK64, usercontext : u64) -> super::super::super::Foundation:: BOOL); - SymRegisterFunctionEntryCallback64(hprocess.param().abi(), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext)).ok() + SymRegisterFunctionEntryCallback64(core::mem::transmute(hprocess), core::mem::transmute(callbackfunction), core::mem::transmute(usercontext)).ok() } #[inline] -pub unsafe fn SymSearch(hprocess: P0, baseofdll: u64, index: u32, symtag: u32, mask: P4, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> +pub unsafe fn SymSearch(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, index: Option, symtag: Option, mask: P4, address: Option, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P4: 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(), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symtag), mask.param().abi(), core::mem::transmute(address), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null())), core::mem::transmute(options)).ok() + SymSearch(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(symtag.unwrap_or(core::mem::zeroed())), mask.param().abi(), core::mem::transmute(address.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(options)).ok() } #[inline] -pub unsafe fn SymSearchW(hprocess: P0, baseofdll: u64, index: u32, symtag: u32, mask: P4, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> +pub unsafe fn SymSearchW(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, index: Option, symtag: Option, mask: P4, address: Option, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P4: 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(), core::mem::transmute(baseofdll), core::mem::transmute(index), core::mem::transmute(symtag), mask.param().abi(), core::mem::transmute(address), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::ptr::null())), core::mem::transmute(options)).ok() + SymSearchW(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(index.unwrap_or(core::mem::zeroed())), core::mem::transmute(symtag.unwrap_or(core::mem::zeroed())), mask.param().abi(), core::mem::transmute(address.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumsymbolscallback), core::mem::transmute(usercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(options)).ok() } #[inline] -pub unsafe fn SymSetContext(hprocess: P0, stackframe: *const IMAGEHLP_STACK_FRAME, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymSetContext(hprocess: super::super::super::Foundation::HANDLE, stackframe: *const IMAGEHLP_STACK_FRAME, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(stackframe), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() + SymSetContext(core::mem::transmute(hprocess), core::mem::transmute(stackframe), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SymSetExtendedOption(option: IMAGEHLP_EXTENDED_OPTIONS, value: P1) -> super::super::super::Foundation::BOOL @@ -2242,22 +1898,20 @@ where SymSetExtendedOption(core::mem::transmute(option), value.param().abi()) } #[inline] -pub unsafe fn SymSetHomeDirectory(hprocess: P0, dir: P1) -> windows_core::PSTR +pub unsafe fn SymSetHomeDirectory(hprocess: Option, dir: P1) -> windows_core::PSTR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSetHomeDirectory(hprocess : super::super::super::Foundation:: HANDLE, dir : windows_core::PCSTR) -> windows_core::PSTR); - SymSetHomeDirectory(hprocess.param().abi(), dir.param().abi()) + SymSetHomeDirectory(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), dir.param().abi()) } #[inline] -pub unsafe fn SymSetHomeDirectoryW(hprocess: P0, dir: P1) -> windows_core::PWSTR +pub unsafe fn SymSetHomeDirectoryW(hprocess: Option, dir: P1) -> windows_core::PWSTR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSetHomeDirectoryW(hprocess : super::super::super::Foundation:: HANDLE, dir : windows_core::PCWSTR) -> windows_core::PWSTR); - SymSetHomeDirectoryW(hprocess.param().abi(), dir.param().abi()) + SymSetHomeDirectoryW(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), dir.param().abi()) } #[inline] pub unsafe fn SymSetOptions(symoptions: u32) -> u32 { @@ -2265,78 +1919,62 @@ pub unsafe fn SymSetOptions(symoptions: u32) -> u32 { SymSetOptions(core::mem::transmute(symoptions)) } #[inline] -pub unsafe fn SymSetParentWindow(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymSetParentWindow(hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymSetParentWindow(hwnd : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: BOOL); - SymSetParentWindow(hwnd.param().abi()).ok() + SymSetParentWindow(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn SymSetScopeFromAddr(hprocess: P0, address: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymSetScopeFromAddr(hprocess: super::super::super::Foundation::HANDLE, address: u64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymSetScopeFromAddr(hprocess : super::super::super::Foundation:: HANDLE, address : u64) -> super::super::super::Foundation:: BOOL); - SymSetScopeFromAddr(hprocess.param().abi(), core::mem::transmute(address)).ok() + SymSetScopeFromAddr(core::mem::transmute(hprocess), core::mem::transmute(address)).ok() } #[inline] -pub unsafe fn SymSetScopeFromIndex(hprocess: P0, baseofdll: u64, index: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymSetScopeFromIndex(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64, index: u32) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymSetScopeFromIndex(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32) -> super::super::super::Foundation:: BOOL); - SymSetScopeFromIndex(hprocess.param().abi(), core::mem::transmute(baseofdll), core::mem::transmute(index)).ok() + SymSetScopeFromIndex(core::mem::transmute(hprocess), core::mem::transmute(baseofdll), core::mem::transmute(index)).ok() } #[inline] -pub unsafe fn SymSetScopeFromInlineContext(hprocess: P0, address: u64, inlinecontext: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymSetScopeFromInlineContext(hprocess: super::super::super::Foundation::HANDLE, address: u64, inlinecontext: u32) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymSetScopeFromInlineContext(hprocess : super::super::super::Foundation:: HANDLE, address : u64, inlinecontext : u32) -> super::super::super::Foundation:: BOOL); - SymSetScopeFromInlineContext(hprocess.param().abi(), core::mem::transmute(address), core::mem::transmute(inlinecontext)).ok() + SymSetScopeFromInlineContext(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(inlinecontext)).ok() } #[inline] -pub unsafe fn SymSetSearchPath(hprocess: P0, searchpatha: P1) -> windows_core::Result<()> +pub unsafe fn SymSetSearchPath(hprocess: super::super::super::Foundation::HANDLE, searchpatha: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSetSearchPath(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : windows_core::PCSTR) -> super::super::super::Foundation:: BOOL); - SymSetSearchPath(hprocess.param().abi(), searchpatha.param().abi()).ok() + SymSetSearchPath(core::mem::transmute(hprocess), searchpatha.param().abi()).ok() } #[inline] -pub unsafe fn SymSetSearchPathW(hprocess: P0, searchpatha: P1) -> windows_core::Result<()> +pub unsafe fn SymSetSearchPathW(hprocess: super::super::super::Foundation::HANDLE, searchpatha: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSetSearchPathW(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : windows_core::PCWSTR) -> super::super::super::Foundation:: BOOL); - SymSetSearchPathW(hprocess.param().abi(), searchpatha.param().abi()).ok() + SymSetSearchPathW(core::mem::transmute(hprocess), searchpatha.param().abi()).ok() } #[inline] -pub unsafe fn SymSrvDeltaName(hprocess: P0, sympath: P1, r#type: P2, file1: P3, file2: P4) -> windows_core::PCSTR +pub unsafe fn SymSrvDeltaName(hprocess: super::super::super::Foundation::HANDLE, sympath: P1, r#type: P2, file1: P3, file2: P4) -> windows_core::PCSTR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvDeltaName(hprocess : super::super::super::Foundation:: HANDLE, sympath : windows_core::PCSTR, r#type : windows_core::PCSTR, file1 : windows_core::PCSTR, file2 : windows_core::PCSTR) -> windows_core::PCSTR); - SymSrvDeltaName(hprocess.param().abi(), sympath.param().abi(), r#type.param().abi(), file1.param().abi(), file2.param().abi()) + SymSrvDeltaName(core::mem::transmute(hprocess), sympath.param().abi(), r#type.param().abi(), file1.param().abi(), file2.param().abi()) } #[inline] -pub unsafe fn SymSrvDeltaNameW(hprocess: P0, sympath: P1, r#type: P2, file1: P3, file2: P4) -> windows_core::PCWSTR +pub unsafe fn SymSrvDeltaNameW(hprocess: super::super::super::Foundation::HANDLE, sympath: P1, r#type: P2, file1: P3, file2: P4) -> windows_core::PCWSTR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvDeltaNameW(hprocess : super::super::super::Foundation:: HANDLE, sympath : windows_core::PCWSTR, r#type : windows_core::PCWSTR, file1 : windows_core::PCWSTR, file2 : windows_core::PCWSTR) -> windows_core::PCWSTR); - SymSrvDeltaNameW(hprocess.param().abi(), sympath.param().abi(), r#type.param().abi(), file1.param().abi(), file2.param().abi()) + SymSrvDeltaNameW(core::mem::transmute(hprocess), sympath.param().abi(), r#type.param().abi(), file1.param().abi(), file2.param().abi()) } #[inline] pub unsafe fn SymSrvGetFileIndexInfo(file: P0, info: *mut SYMSRV_INDEX_INFO, flags: u32) -> windows_core::Result<()> @@ -2355,24 +1993,22 @@ where SymSrvGetFileIndexInfoW(file.param().abi(), core::mem::transmute(info), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SymSrvGetFileIndexString(hprocess: P0, srvpath: P1, file: P2, index: &mut [u8], flags: u32) -> windows_core::Result<()> +pub unsafe fn SymSrvGetFileIndexString(hprocess: super::super::super::Foundation::HANDLE, srvpath: P1, file: P2, index: &mut [u8], flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexString(hprocess : super::super::super::Foundation:: HANDLE, srvpath : windows_core::PCSTR, file : windows_core::PCSTR, index : windows_core::PSTR, size : usize, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexString(hprocess.param().abi(), srvpath.param().abi(), file.param().abi(), core::mem::transmute(index.as_ptr()), index.len().try_into().unwrap(), core::mem::transmute(flags)).ok() + SymSrvGetFileIndexString(core::mem::transmute(hprocess), srvpath.param().abi(), file.param().abi(), core::mem::transmute(index.as_ptr()), index.len().try_into().unwrap(), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SymSrvGetFileIndexStringW(hprocess: P0, srvpath: P1, file: P2, index: &mut [u16], flags: u32) -> windows_core::Result<()> +pub unsafe fn SymSrvGetFileIndexStringW(hprocess: super::super::super::Foundation::HANDLE, srvpath: P1, file: P2, index: &mut [u16], flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexStringW(hprocess : super::super::super::Foundation:: HANDLE, srvpath : windows_core::PCWSTR, file : windows_core::PCWSTR, index : windows_core::PWSTR, size : usize, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexStringW(hprocess.param().abi(), srvpath.param().abi(), file.param().abi(), core::mem::transmute(index.as_ptr()), index.len().try_into().unwrap(), core::mem::transmute(flags)).ok() + SymSrvGetFileIndexStringW(core::mem::transmute(hprocess), srvpath.param().abi(), file.param().abi(), core::mem::transmute(index.as_ptr()), index.len().try_into().unwrap(), core::mem::transmute(flags)).ok() } #[inline] pub unsafe fn SymSrvGetFileIndexes(file: P0, id: *mut windows_core::GUID, val1: *mut u32, val2: Option<*mut u32>, flags: u32) -> windows_core::Result<()> @@ -2380,7 +2016,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(), core::mem::transmute(id), core::mem::transmute(val1), core::mem::transmute(val2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags)).ok() + SymSrvGetFileIndexes(file.param().abi(), core::mem::transmute(id), core::mem::transmute(val1), core::mem::transmute(val2.unwrap_or(core::mem::zeroed())), core::mem::transmute(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,89 +2024,81 @@ 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(), core::mem::transmute(id), core::mem::transmute(val1), core::mem::transmute(val2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags)).ok() + SymSrvGetFileIndexesW(file.param().abi(), core::mem::transmute(id), core::mem::transmute(val1), core::mem::transmute(val2.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SymSrvGetSupplement(hprocess: P0, sympath: P1, node: P2, file: P3) -> windows_core::PCSTR +pub unsafe fn SymSrvGetSupplement(hprocess: super::super::super::Foundation::HANDLE, sympath: P1, node: P2, file: P3) -> windows_core::PCSTR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetSupplement(hprocess : super::super::super::Foundation:: HANDLE, sympath : windows_core::PCSTR, node : windows_core::PCSTR, file : windows_core::PCSTR) -> windows_core::PCSTR); - SymSrvGetSupplement(hprocess.param().abi(), sympath.param().abi(), node.param().abi(), file.param().abi()) + SymSrvGetSupplement(core::mem::transmute(hprocess), sympath.param().abi(), node.param().abi(), file.param().abi()) } #[inline] -pub unsafe fn SymSrvGetSupplementW(hprocess: P0, sympath: P1, node: P2, file: P3) -> windows_core::PCWSTR +pub unsafe fn SymSrvGetSupplementW(hprocess: super::super::super::Foundation::HANDLE, sympath: P1, node: P2, file: P3) -> windows_core::PCWSTR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetSupplementW(hprocess : super::super::super::Foundation:: HANDLE, sympath : windows_core::PCWSTR, node : windows_core::PCWSTR, file : windows_core::PCWSTR) -> windows_core::PCWSTR); - SymSrvGetSupplementW(hprocess.param().abi(), sympath.param().abi(), node.param().abi(), file.param().abi()) + SymSrvGetSupplementW(core::mem::transmute(hprocess), sympath.param().abi(), node.param().abi(), file.param().abi()) } #[inline] -pub unsafe fn SymSrvIsStore(hprocess: P0, path: P1) -> windows_core::Result<()> +pub unsafe fn SymSrvIsStore(hprocess: Option, path: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvIsStore(hprocess : super::super::super::Foundation:: HANDLE, path : windows_core::PCSTR) -> super::super::super::Foundation:: BOOL); - SymSrvIsStore(hprocess.param().abi(), path.param().abi()).ok() + SymSrvIsStore(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), path.param().abi()).ok() } #[inline] -pub unsafe fn SymSrvIsStoreW(hprocess: P0, path: P1) -> windows_core::Result<()> +pub unsafe fn SymSrvIsStoreW(hprocess: Option, path: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvIsStoreW(hprocess : super::super::super::Foundation:: HANDLE, path : windows_core::PCWSTR) -> super::super::super::Foundation:: BOOL); - SymSrvIsStoreW(hprocess.param().abi(), path.param().abi()).ok() + SymSrvIsStoreW(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), path.param().abi()).ok() } #[inline] -pub unsafe fn SymSrvStoreFile(hprocess: P0, srvpath: P1, file: P2, flags: SYM_SRV_STORE_FILE_FLAGS) -> windows_core::PCSTR +pub unsafe fn SymSrvStoreFile(hprocess: super::super::super::Foundation::HANDLE, srvpath: P1, file: P2, flags: SYM_SRV_STORE_FILE_FLAGS) -> windows_core::PCSTR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvStoreFile(hprocess : super::super::super::Foundation:: HANDLE, srvpath : windows_core::PCSTR, file : windows_core::PCSTR, flags : SYM_SRV_STORE_FILE_FLAGS) -> windows_core::PCSTR); - SymSrvStoreFile(hprocess.param().abi(), srvpath.param().abi(), file.param().abi(), core::mem::transmute(flags)) + SymSrvStoreFile(core::mem::transmute(hprocess), srvpath.param().abi(), file.param().abi(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SymSrvStoreFileW(hprocess: P0, srvpath: P1, file: P2, flags: SYM_SRV_STORE_FILE_FLAGS) -> windows_core::PCWSTR +pub unsafe fn SymSrvStoreFileW(hprocess: super::super::super::Foundation::HANDLE, srvpath: P1, file: P2, flags: SYM_SRV_STORE_FILE_FLAGS) -> windows_core::PCWSTR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvStoreFileW(hprocess : super::super::super::Foundation:: HANDLE, srvpath : windows_core::PCWSTR, file : windows_core::PCWSTR, flags : SYM_SRV_STORE_FILE_FLAGS) -> windows_core::PCWSTR); - SymSrvStoreFileW(hprocess.param().abi(), srvpath.param().abi(), file.param().abi(), core::mem::transmute(flags)) + SymSrvStoreFileW(core::mem::transmute(hprocess), srvpath.param().abi(), file.param().abi(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SymSrvStoreSupplement(hprocess: P0, srvpath: P1, node: P2, file: P3, flags: u32) -> windows_core::PCSTR +pub unsafe fn SymSrvStoreSupplement(hprocess: super::super::super::Foundation::HANDLE, srvpath: P1, node: P2, file: P3, flags: u32) -> windows_core::PCSTR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvStoreSupplement(hprocess : super::super::super::Foundation:: HANDLE, srvpath : windows_core::PCSTR, node : windows_core::PCSTR, file : windows_core::PCSTR, flags : u32) -> windows_core::PCSTR); - SymSrvStoreSupplement(hprocess.param().abi(), srvpath.param().abi(), node.param().abi(), file.param().abi(), core::mem::transmute(flags)) + SymSrvStoreSupplement(core::mem::transmute(hprocess), srvpath.param().abi(), node.param().abi(), file.param().abi(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SymSrvStoreSupplementW(hprocess: P0, sympath: P1, node: P2, file: P3, flags: u32) -> windows_core::PCWSTR +pub unsafe fn SymSrvStoreSupplementW(hprocess: super::super::super::Foundation::HANDLE, sympath: P1, node: P2, file: P3, flags: u32) -> windows_core::PCWSTR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymSrvStoreSupplementW(hprocess : super::super::super::Foundation:: HANDLE, sympath : windows_core::PCWSTR, node : windows_core::PCWSTR, file : windows_core::PCWSTR, flags : u32) -> windows_core::PCWSTR); - SymSrvStoreSupplementW(hprocess.param().abi(), sympath.param().abi(), node.param().abi(), file.param().abi(), core::mem::transmute(flags)) + SymSrvStoreSupplementW(core::mem::transmute(hprocess), sympath.param().abi(), node.param().abi(), file.param().abi(), core::mem::transmute(flags)) } #[cfg(target_arch = "x86")] #[inline] @@ -2485,20 +2113,14 @@ pub unsafe fn SymUnDName64(sym: *const IMAGEHLP_SYMBOL64, undecname: &mut [u8]) } #[cfg(target_arch = "x86")] #[inline] -pub unsafe fn SymUnloadModule(hprocess: P0, baseofdll: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymUnloadModule(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u32) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymUnloadModule(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u32) -> super::super::super::Foundation:: BOOL); - SymUnloadModule(hprocess.param().abi(), core::mem::transmute(baseofdll)).ok() + SymUnloadModule(core::mem::transmute(hprocess), core::mem::transmute(baseofdll)).ok() } #[inline] -pub unsafe fn SymUnloadModule64(hprocess: P0, baseofdll: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SymUnloadModule64(hprocess: super::super::super::Foundation::HANDLE, baseofdll: u64) -> windows_core::Result<()> { windows_targets::link!("dbghelp.dll" "system" fn SymUnloadModule64(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64) -> super::super::super::Foundation:: BOOL); - SymUnloadModule64(hprocess.param().abi(), core::mem::transmute(baseofdll)).ok() + SymUnloadModule64(core::mem::transmute(hprocess), core::mem::transmute(baseofdll)).ok() } #[inline] pub unsafe fn TerminateProcessOnMemoryExhaustion(failedallocationsize: usize) { @@ -2506,12 +2128,9 @@ pub unsafe fn TerminateProcessOnMemoryExhaustion(failedallocationsize: usize) { TerminateProcessOnMemoryExhaustion(core::mem::transmute(failedallocationsize)) } #[inline] -pub unsafe fn TouchFileTimes(filehandle: P0, psystemtime: Option<*const super::super::super::Foundation::SYSTEMTIME>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TouchFileTimes(filehandle: super::super::super::Foundation::HANDLE, psystemtime: Option<*const super::super::super::Foundation::SYSTEMTIME>) -> windows_core::Result<()> { 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(core::ptr::null()))).ok() + TouchFileTimes(core::mem::transmute(filehandle), core::mem::transmute(psystemtime.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn UnDecorateSymbolName(name: P0, outputstring: &mut [u8], flags: u32) -> u32 @@ -2574,36 +2193,24 @@ pub unsafe fn WaitForDebugEventEx(lpdebugevent: *mut DEBUG_EVENT, dwmilliseconds WaitForDebugEventEx(core::mem::transmute(lpdebugevent), core::mem::transmute(dwmilliseconds)).ok() } #[inline] -pub unsafe fn Wow64GetThreadContext(hthread: P0, lpcontext: *mut WOW64_CONTEXT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Wow64GetThreadContext(hthread: super::super::super::Foundation::HANDLE, lpcontext: *mut WOW64_CONTEXT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Wow64GetThreadContext(hthread : super::super::super::Foundation:: HANDLE, lpcontext : *mut WOW64_CONTEXT) -> super::super::super::Foundation:: BOOL); - Wow64GetThreadContext(hthread.param().abi(), core::mem::transmute(lpcontext)).ok() + Wow64GetThreadContext(core::mem::transmute(hthread), core::mem::transmute(lpcontext)).ok() } #[inline] -pub unsafe fn Wow64GetThreadSelectorEntry(hthread: P0, dwselector: u32, lpselectorentry: *mut WOW64_LDT_ENTRY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Wow64GetThreadSelectorEntry(hthread: super::super::super::Foundation::HANDLE, dwselector: u32, lpselectorentry: *mut WOW64_LDT_ENTRY) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Wow64GetThreadSelectorEntry(hthread : super::super::super::Foundation:: HANDLE, dwselector : u32, lpselectorentry : *mut WOW64_LDT_ENTRY) -> super::super::super::Foundation:: BOOL); - Wow64GetThreadSelectorEntry(hthread.param().abi(), core::mem::transmute(dwselector), core::mem::transmute(lpselectorentry)).ok() + Wow64GetThreadSelectorEntry(core::mem::transmute(hthread), core::mem::transmute(dwselector), core::mem::transmute(lpselectorentry)).ok() } #[inline] -pub unsafe fn Wow64SetThreadContext(hthread: P0, lpcontext: *const WOW64_CONTEXT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Wow64SetThreadContext(hthread: super::super::super::Foundation::HANDLE, lpcontext: *const WOW64_CONTEXT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Wow64SetThreadContext(hthread : super::super::super::Foundation:: HANDLE, lpcontext : *const WOW64_CONTEXT) -> super::super::super::Foundation:: BOOL); - Wow64SetThreadContext(hthread.param().abi(), core::mem::transmute(lpcontext)).ok() + Wow64SetThreadContext(core::mem::transmute(hthread), core::mem::transmute(lpcontext)).ok() } #[inline] -pub unsafe fn WriteProcessMemory(hprocess: P0, lpbaseaddress: *const core::ffi::c_void, lpbuffer: *const core::ffi::c_void, nsize: usize, lpnumberofbyteswritten: Option<*mut usize>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WriteProcessMemory(hprocess: super::super::super::Foundation::HANDLE, lpbaseaddress: *const core::ffi::c_void, lpbuffer: *const core::ffi::c_void, nsize: usize, lpnumberofbyteswritten: Option<*mut usize>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpbaseaddress), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(lpnumberofbyteswritten.unwrap_or(core::ptr::null_mut()))).ok() + WriteProcessMemory(core::mem::transmute(hprocess), core::mem::transmute(lpbaseaddress), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(lpnumberofbyteswritten.unwrap_or(core::mem::zeroed()))).ok() } pub const ABNORMAL_RESET_DETECTED: BUGCHECK_ERROR = BUGCHECK_ERROR(327u32); pub const ACPI_BIOS_ERROR: BUGCHECK_ERROR = BUGCHECK_ERROR(165u32); 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 64939dcdab..cdcb5b49da 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 @@ -20,12 +20,9 @@ where ControlTraceW(core::mem::transmute(tracehandle), instancename.param().abi(), core::mem::transmute(properties), core::mem::transmute(controlcode)) } #[inline] -pub unsafe fn CreateTraceInstanceId(reghandle: P0, instinfo: *mut EVENT_INSTANCE_INFO) -> super::super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn CreateTraceInstanceId(reghandle: super::super::super::Foundation::HANDLE, instinfo: *mut EVENT_INSTANCE_INFO) -> super::super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn CreateTraceInstanceId(reghandle : super::super::super::Foundation:: HANDLE, instinfo : *mut EVENT_INSTANCE_INFO) -> super::super::super::Foundation:: WIN32_ERROR); - CreateTraceInstanceId(reghandle.param().abi(), core::mem::transmute(instinfo)) + CreateTraceInstanceId(core::mem::transmute(reghandle), core::mem::transmute(instinfo)) } #[inline] pub unsafe fn CveEventWrite(cveid: P0, additionaldetails: P1) -> i32 @@ -44,12 +41,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(core::mem::transmute(providerid), core::mem::transmute(sourceid.unwrap_or(core::ptr::null())), core::mem::transmute(tracehandle), core::mem::transmute(isenabled), core::mem::transmute(level), core::mem::transmute(matchanykeyword), core::mem::transmute(matchallkeyword), core::mem::transmute(enableproperty), core::mem::transmute(enablefilterdesc.unwrap_or(core::ptr::null()))) + EnableTraceEx(core::mem::transmute(providerid), core::mem::transmute(sourceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(tracehandle), core::mem::transmute(isenabled), core::mem::transmute(level), core::mem::transmute(matchanykeyword), core::mem::transmute(matchallkeyword), core::mem::transmute(enableproperty), core::mem::transmute(enablefilterdesc.unwrap_or(core::mem::zeroed()))) } #[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), core::mem::transmute(providerid), core::mem::transmute(controlcode), core::mem::transmute(level), core::mem::transmute(matchanykeyword), core::mem::transmute(matchallkeyword), core::mem::transmute(timeout), core::mem::transmute(enableparameters.unwrap_or(core::ptr::null()))) + EnableTraceEx2(core::mem::transmute(tracehandle), core::mem::transmute(providerid), core::mem::transmute(controlcode), core::mem::transmute(level), core::mem::transmute(matchanykeyword), core::mem::transmute(matchallkeyword), core::mem::transmute(timeout), core::mem::transmute(enableparameters.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn EnumerateTraceGuids(guidpropertiesarray: &mut [*mut TRACE_GUID_PROPERTIES], guidcount: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { @@ -59,23 +56,22 @@ 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(core::mem::transmute(tracequeryinfoclass), core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outbuffersize), core::mem::transmute(returnlength)) + EnumerateTraceGuidsEx(core::mem::transmute(tracequeryinfoclass), core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outbuffersize), core::mem::transmute(returnlength)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EventAccessControl(guid: *const windows_core::GUID, operation: u32, sid: P2, rights: u32, allowordeny: P4) -> u32 +pub unsafe fn EventAccessControl(guid: *const windows_core::GUID, operation: u32, sid: super::super::super::Security::PSID, rights: u32, allowordeny: P4) -> u32 where - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EventAccessControl(guid : *const windows_core::GUID, operation : u32, sid : super::super::super::Security:: PSID, rights : u32, allowordeny : super::super::super::Foundation:: BOOLEAN) -> u32); - EventAccessControl(core::mem::transmute(guid), core::mem::transmute(operation), sid.param().abi(), core::mem::transmute(rights), allowordeny.param().abi()) + EventAccessControl(core::mem::transmute(guid), core::mem::transmute(operation), core::mem::transmute(sid), core::mem::transmute(rights), allowordeny.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EventAccessQuery(guid: *const windows_core::GUID, buffer: super::super::super::Security::PSECURITY_DESCRIPTOR, buffersize: *mut u32) -> u32 { +pub unsafe fn EventAccessQuery(guid: *const windows_core::GUID, buffer: Option, buffersize: *mut u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EventAccessQuery(guid : *const windows_core::GUID, buffer : super::super::super::Security:: PSECURITY_DESCRIPTOR, buffersize : *mut u32) -> u32); - EventAccessQuery(core::mem::transmute(guid), core::mem::transmute(buffer), core::mem::transmute(buffersize)) + EventAccessQuery(core::mem::transmute(guid), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[inline] pub unsafe fn EventAccessRemove(guid: *const windows_core::GUID) -> u32 { @@ -88,74 +84,52 @@ pub unsafe fn EventActivityIdControl(controlcode: u32, activityid: *mut windows_ EventActivityIdControl(core::mem::transmute(controlcode), core::mem::transmute(activityid)) } #[inline] -pub unsafe fn EventEnabled(reghandle: P0, eventdescriptor: *const EVENT_DESCRIPTOR) -> super::super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn EventEnabled(reghandle: REGHANDLE, eventdescriptor: *const EVENT_DESCRIPTOR) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("advapi32.dll" "system" fn EventEnabled(reghandle : REGHANDLE, eventdescriptor : *const EVENT_DESCRIPTOR) -> super::super::super::Foundation:: BOOLEAN); - EventEnabled(reghandle.param().abi(), core::mem::transmute(eventdescriptor)) + EventEnabled(core::mem::transmute(reghandle), core::mem::transmute(eventdescriptor)) } #[inline] -pub unsafe fn EventProviderEnabled(reghandle: P0, level: u8, keyword: u64) -> super::super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn EventProviderEnabled(reghandle: REGHANDLE, level: u8, keyword: u64) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("advapi32.dll" "system" fn EventProviderEnabled(reghandle : REGHANDLE, level : u8, keyword : u64) -> super::super::super::Foundation:: BOOLEAN); - EventProviderEnabled(reghandle.param().abi(), core::mem::transmute(level), core::mem::transmute(keyword)) + EventProviderEnabled(core::mem::transmute(reghandle), core::mem::transmute(level), core::mem::transmute(keyword)) } #[inline] -pub unsafe fn EventRegister(providerid: *const windows_core::GUID, enablecallback: PENABLECALLBACK, callbackcontext: Option<*const core::ffi::c_void>, reghandle: *mut REGHANDLE) -> u32 { +pub unsafe fn EventRegister(providerid: *const windows_core::GUID, enablecallback: Option, callbackcontext: Option<*const core::ffi::c_void>, reghandle: *mut REGHANDLE) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EventRegister(providerid : *const windows_core::GUID, enablecallback : PENABLECALLBACK, callbackcontext : *const core::ffi::c_void, reghandle : *mut REGHANDLE) -> u32); - EventRegister(core::mem::transmute(providerid), core::mem::transmute(enablecallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(reghandle)) + EventRegister(core::mem::transmute(providerid), core::mem::transmute(enablecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(reghandle)) } #[inline] -pub unsafe fn EventSetInformation(reghandle: P0, informationclass: EVENT_INFO_CLASS, eventinformation: *const core::ffi::c_void, informationlength: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EventSetInformation(reghandle: REGHANDLE, informationclass: EVENT_INFO_CLASS, eventinformation: *const core::ffi::c_void, informationlength: u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EventSetInformation(reghandle : REGHANDLE, informationclass : EVENT_INFO_CLASS, eventinformation : *const core::ffi::c_void, informationlength : u32) -> u32); - EventSetInformation(reghandle.param().abi(), core::mem::transmute(informationclass), core::mem::transmute(eventinformation), core::mem::transmute(informationlength)) + EventSetInformation(core::mem::transmute(reghandle), core::mem::transmute(informationclass), core::mem::transmute(eventinformation), core::mem::transmute(informationlength)) } #[inline] -pub unsafe fn EventUnregister(reghandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EventUnregister(reghandle: REGHANDLE) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EventUnregister(reghandle : REGHANDLE) -> u32); - EventUnregister(reghandle.param().abi()) + EventUnregister(core::mem::transmute(reghandle)) } #[inline] -pub unsafe fn EventWrite(reghandle: P0, eventdescriptor: *const EVENT_DESCRIPTOR, userdata: Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EventWrite(reghandle: REGHANDLE, eventdescriptor: *const EVENT_DESCRIPTOR, userdata: Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EventWrite(reghandle : REGHANDLE, eventdescriptor : *const EVENT_DESCRIPTOR, userdatacount : u32, userdata : *const EVENT_DATA_DESCRIPTOR) -> u32); - EventWrite(reghandle.param().abi(), core::mem::transmute(eventdescriptor), 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()))) + EventWrite(core::mem::transmute(reghandle), core::mem::transmute(eventdescriptor), 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 EventWriteEx(reghandle: P0, eventdescriptor: *const EVENT_DESCRIPTOR, filter: u64, flags: u32, activityid: Option<*const windows_core::GUID>, relatedactivityid: Option<*const windows_core::GUID>, userdata: Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EventWriteEx(reghandle: REGHANDLE, eventdescriptor: *const EVENT_DESCRIPTOR, filter: u64, flags: u32, activityid: Option<*const windows_core::GUID>, relatedactivityid: Option<*const windows_core::GUID>, userdata: Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 { 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(), core::mem::transmute(eventdescriptor), core::mem::transmute(filter), core::mem::transmute(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()))) + EventWriteEx(core::mem::transmute(reghandle), core::mem::transmute(eventdescriptor), core::mem::transmute(filter), core::mem::transmute(flags), core::mem::transmute(activityid.unwrap_or(core::mem::zeroed())), core::mem::transmute(relatedactivityid.unwrap_or(core::mem::zeroed())), 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: P3) -> u32 +pub unsafe fn EventWriteString(reghandle: REGHANDLE, level: u8, keyword: u64, string: P3) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EventWriteString(reghandle : REGHANDLE, level : u8, keyword : u64, string : windows_core::PCWSTR) -> u32); - EventWriteString(reghandle.param().abi(), core::mem::transmute(level), core::mem::transmute(keyword), string.param().abi()) + EventWriteString(core::mem::transmute(reghandle), core::mem::transmute(level), core::mem::transmute(keyword), string.param().abi()) } #[inline] -pub unsafe fn EventWriteTransfer(reghandle: P0, eventdescriptor: *const EVENT_DESCRIPTOR, activityid: Option<*const windows_core::GUID>, relatedactivityid: Option<*const windows_core::GUID>, userdata: Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EventWriteTransfer(reghandle: REGHANDLE, eventdescriptor: *const EVENT_DESCRIPTOR, activityid: Option<*const windows_core::GUID>, relatedactivityid: Option<*const windows_core::GUID>, userdata: Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 { 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(), core::mem::transmute(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()))) + EventWriteTransfer(core::mem::transmute(reghandle), core::mem::transmute(eventdescriptor), core::mem::transmute(activityid.unwrap_or(core::mem::zeroed())), core::mem::transmute(relatedactivityid.unwrap_or(core::mem::zeroed())), 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: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -198,7 +172,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(core::mem::transmute(options), core::mem::transmute(buffercompletioncallback), core::mem::transmute(buffercompletioncontext.unwrap_or(core::ptr::null()))) + OpenTraceFromBufferStream(core::mem::transmute(options), core::mem::transmute(buffercompletioncallback), core::mem::transmute(buffercompletioncontext.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -207,7 +181,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(), core::mem::transmute(options), core::mem::transmute(logfileheader.unwrap_or(core::ptr::null_mut()))) + OpenTraceFromFile(logfilename.param().abi(), core::mem::transmute(options), core::mem::transmute(logfileheader.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -216,17 +190,16 @@ 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(), core::mem::transmute(options), core::mem::transmute(logfileheader.unwrap_or(core::ptr::null_mut()))) + OpenTraceFromRealTimeLogger(loggername.param().abi(), core::mem::transmute(options), core::mem::transmute(logfileheader.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Time")] #[inline] -pub unsafe fn OpenTraceFromRealTimeLoggerWithAllocationOptions(loggername: P0, options: *const ETW_OPEN_TRACE_OPTIONS, allocationsize: usize, memorypartitionhandle: P3, logfileheader: Option<*mut TRACE_LOGFILE_HEADER>) -> u64 +pub unsafe fn OpenTraceFromRealTimeLoggerWithAllocationOptions(loggername: P0, options: *const ETW_OPEN_TRACE_OPTIONS, allocationsize: usize, memorypartitionhandle: Option, logfileheader: Option<*mut TRACE_LOGFILE_HEADER>) -> u64 where P0: windows_core::Param, - P3: 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(), core::mem::transmute(options), core::mem::transmute(allocationsize), memorypartitionhandle.param().abi(), core::mem::transmute(logfileheader.unwrap_or(core::ptr::null_mut()))) + OpenTraceFromRealTimeLoggerWithAllocationOptions(loggername.param().abi(), core::mem::transmute(options), core::mem::transmute(allocationsize), core::mem::transmute(memorypartitionhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(logfileheader.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -237,7 +210,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(core::ptr::null())), core::mem::transmute(endtime.unwrap_or(core::ptr::null()))) + ProcessTrace(core::mem::transmute(handlearray.as_ptr()), handlearray.len().try_into().unwrap(), core::mem::transmute(starttime.unwrap_or(core::mem::zeroed())), core::mem::transmute(endtime.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ProcessTraceAddBufferToBufferStream(tracehandle: u64, buffer: *const ETW_BUFFER_HEADER, buffersize: u32) -> u32 { @@ -275,7 +248,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), core::mem::transmute(informationclass), core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outbuffersize), core::mem::transmute(returnlength)) + QueryTraceProcessingHandle(core::mem::transmute(processinghandle), core::mem::transmute(informationclass), core::mem::transmute(inbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inbuffersize), core::mem::transmute(outbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outbuffersize), core::mem::transmute(returnlength)) } #[inline] pub unsafe fn QueryTraceW(tracehandle: CONTROLTRACE_HANDLE, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -292,7 +265,7 @@ where P6: 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(core::mem::transmute(requestaddress), core::mem::transmute(requestcontext.unwrap_or(core::ptr::null())), core::mem::transmute(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(), core::mem::transmute(registrationhandle)) + RegisterTraceGuidsA(core::mem::transmute(requestaddress), core::mem::transmute(requestcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(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: P5, mofresourcename: P6, registrationhandle: *mut u64) -> u32 @@ -301,7 +274,7 @@ where P6: 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(core::mem::transmute(requestaddress), core::mem::transmute(requestcontext.unwrap_or(core::ptr::null())), core::mem::transmute(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(), core::mem::transmute(registrationhandle)) + RegisterTraceGuidsW(core::mem::transmute(requestaddress), core::mem::transmute(requestcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(registrationhandle)) } #[inline] pub unsafe fn RemoveTraceCallback(pguid: *const windows_core::GUID) -> super::super::super::Foundation::WIN32_ERROR { @@ -348,7 +321,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(core::mem::transmute(payloadfiltercount), core::mem::transmute(payloadfilterptrs), core::mem::transmute(eventmatchallflags.unwrap_or(core::ptr::null())), core::mem::transmute(eventfilterdescriptor)) + TdhAggregatePayloadFilters(core::mem::transmute(payloadfiltercount), core::mem::transmute(payloadfilterptrs), core::mem::transmute(eventmatchallflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventfilterdescriptor)) } #[inline] pub unsafe fn TdhCleanupPayloadEventFilterDescriptor(eventfilterdescriptor: *mut EVENT_FILTER_DESCRIPTOR) -> u32 { @@ -356,12 +329,9 @@ pub unsafe fn TdhCleanupPayloadEventFilterDescriptor(eventfilterdescriptor: *mut TdhCleanupPayloadEventFilterDescriptor(core::mem::transmute(eventfilterdescriptor)) } #[inline] -pub unsafe fn TdhCloseDecodingHandle(handle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TdhCloseDecodingHandle(handle: TDH_HANDLE) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhCloseDecodingHandle(handle : TDH_HANDLE) -> u32); - TdhCloseDecodingHandle(handle.param().abi()) + TdhCloseDecodingHandle(core::mem::transmute(handle)) } #[inline] pub unsafe fn TdhCreatePayloadFilter(providerguid: *const windows_core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, eventmatchany: P2, payloadpredicates: &[PAYLOAD_FILTER_PREDICATE], payloadfilter: *mut *mut core::ffi::c_void) -> u32 @@ -379,45 +349,42 @@ 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(core::mem::transmute(providerguid), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize)) + TdhEnumerateManifestProviderEvents(core::mem::transmute(providerguid), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pguid), core::mem::transmute(eventfieldtype), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbuffersize)) + TdhEnumerateProviderFieldInformation(core::mem::transmute(pguid), core::mem::transmute(eventfieldtype), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(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())), core::mem::transmute(filtercount), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize)) + TdhEnumerateProviderFilters(core::mem::transmute(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())), core::mem::transmute(filtercount), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pbuffersize)) + TdhEnumerateProviders(core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(filter), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(bufferrequired)) + TdhEnumerateProvidersForDecodingSource(core::mem::transmute(filter), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(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 { +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: Option, 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(core::mem::transmute(eventinfo), core::mem::transmute(mapinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pointersize), core::mem::transmute(propertyintype), core::mem::transmute(propertyouttype), core::mem::transmute(propertylength), userdata.len().try_into().unwrap(), core::mem::transmute(userdata.as_ptr()), core::mem::transmute(buffersize), core::mem::transmute(buffer), core::mem::transmute(userdataconsumed)) + TdhFormatProperty(core::mem::transmute(eventinfo), core::mem::transmute(mapinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pointersize), core::mem::transmute(propertyintype), core::mem::transmute(propertyouttype), core::mem::transmute(propertylength), userdata.len().try_into().unwrap(), core::mem::transmute(userdata.as_ptr()), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(userdataconsumed)) } #[inline] -pub unsafe fn TdhGetDecodingParameter(handle: P0, tdhcontext: *mut TDH_CONTEXT) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TdhGetDecodingParameter(handle: TDH_HANDLE, tdhcontext: *mut TDH_CONTEXT) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhGetDecodingParameter(handle : TDH_HANDLE, tdhcontext : *mut TDH_CONTEXT) -> u32); - TdhGetDecodingParameter(handle.param().abi(), core::mem::transmute(tdhcontext)) + TdhGetDecodingParameter(core::mem::transmute(handle), core::mem::transmute(tdhcontext)) } #[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(core::mem::transmute(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())), core::mem::transmute(buffersize)) + TdhGetEventInformation(core::mem::transmute(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::mem::zeroed())), core::mem::transmute(buffersize)) } #[inline] pub unsafe fn TdhGetEventMapInformation(pevent: *const EVENT_RECORD, pmapname: P1, pbuffer: Option<*mut EVENT_MAP_INFO>, pbuffersize: *mut u32) -> u32 @@ -425,12 +392,12 @@ where P1: 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(core::mem::transmute(pevent), pmapname.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbuffersize)) + TdhGetEventMapInformation(core::mem::transmute(pevent), pmapname.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(providerguid), core::mem::transmute(eventdescriptor), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize)) + TdhGetManifestEventInformation(core::mem::transmute(providerguid), core::mem::transmute(eventdescriptor), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[inline] pub unsafe fn TdhGetProperty(pevent: *const EVENT_RECORD, ptdhcontext: Option<&[TDH_CONTEXT]>, ppropertydata: &[PROPERTY_DATA_DESCRIPTOR], pbuffer: &mut [u8]) -> u32 { @@ -443,21 +410,17 @@ pub unsafe fn TdhGetPropertySize(pevent: *const EVENT_RECORD, ptdhcontext: Optio TdhGetPropertySize(core::mem::transmute(pevent), ptdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ptdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ppropertydata.len().try_into().unwrap(), core::mem::transmute(ppropertydata.as_ptr()), core::mem::transmute(ppropertysize)) } #[inline] -pub unsafe fn TdhGetWppMessage(handle: P0, eventrecord: *const EVENT_RECORD, buffersize: *mut u32, buffer: *mut u8) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TdhGetWppMessage(handle: TDH_HANDLE, eventrecord: *const EVENT_RECORD, buffersize: *mut u32, buffer: *mut u8) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhGetWppMessage(handle : TDH_HANDLE, eventrecord : *const EVENT_RECORD, buffersize : *mut u32, buffer : *mut u8) -> u32); - TdhGetWppMessage(handle.param().abi(), core::mem::transmute(eventrecord), core::mem::transmute(buffersize), core::mem::transmute(buffer)) + TdhGetWppMessage(core::mem::transmute(handle), core::mem::transmute(eventrecord), core::mem::transmute(buffersize), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn TdhGetWppProperty(handle: P0, eventrecord: *const EVENT_RECORD, propertyname: P2, buffersize: *mut u32, buffer: *mut u8) -> u32 +pub unsafe fn TdhGetWppProperty(handle: TDH_HANDLE, eventrecord: *const EVENT_RECORD, propertyname: P2, buffersize: *mut u32, buffer: *mut u8) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("tdh.dll" "system" fn TdhGetWppProperty(handle : TDH_HANDLE, eventrecord : *const EVENT_RECORD, propertyname : windows_core::PCWSTR, buffersize : *mut u32, buffer : *mut u8) -> u32); - TdhGetWppProperty(handle.param().abi(), core::mem::transmute(eventrecord), propertyname.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer)) + TdhGetWppProperty(core::mem::transmute(handle), core::mem::transmute(eventrecord), propertyname.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer)) } #[inline] pub unsafe fn TdhLoadManifest(manifest: P0) -> u32 @@ -488,15 +451,12 @@ 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(core::mem::transmute(pguid), core::mem::transmute(eventfieldvalue), core::mem::transmute(eventfieldtype), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbuffersize)) + TdhQueryProviderFieldInformation(core::mem::transmute(pguid), core::mem::transmute(eventfieldvalue), core::mem::transmute(eventfieldtype), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffersize)) } #[inline] -pub unsafe fn TdhSetDecodingParameter(handle: P0, tdhcontext: *const TDH_CONTEXT) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn TdhSetDecodingParameter(handle: TDH_HANDLE, tdhcontext: *const TDH_CONTEXT) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhSetDecodingParameter(handle : TDH_HANDLE, tdhcontext : *const TDH_CONTEXT) -> u32); - TdhSetDecodingParameter(handle.param().abi(), core::mem::transmute(tdhcontext)) + TdhSetDecodingParameter(core::mem::transmute(handle), core::mem::transmute(tdhcontext)) } #[inline] pub unsafe fn TdhUnloadManifest(manifest: P0) -> u32 @@ -519,7 +479,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(core::mem::transmute(tracehandle), core::mem::transmute(eventtrace), core::mem::transmute(instinfo), core::mem::transmute(parentinstinfo.unwrap_or(core::ptr::null()))) + TraceEventInstance(core::mem::transmute(tracehandle), core::mem::transmute(eventtrace), core::mem::transmute(instinfo), core::mem::transmute(parentinstinfo.unwrap_or(core::mem::zeroed()))) } #[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 +494,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), core::mem::transmute(informationclass), core::mem::transmute(traceinformation), core::mem::transmute(informationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) + TraceQueryInformation(core::mem::transmute(sessionhandle), core::mem::transmute(informationclass), core::mem::transmute(traceinformation), core::mem::transmute(informationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[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 2fe4923169..96bba21ad5 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 @@ -1,83 +1,52 @@ #[inline] -pub unsafe fn PssCaptureSnapshot(processhandle: P0, captureflags: PSS_CAPTURE_FLAGS, threadcontextflags: u32, snapshothandle: *mut HPSS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PssCaptureSnapshot(processhandle: super::super::super::Foundation::HANDLE, captureflags: PSS_CAPTURE_FLAGS, threadcontextflags: Option, snapshothandle: *mut HPSS) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssCaptureSnapshot(processhandle : super::super::super::Foundation:: HANDLE, captureflags : PSS_CAPTURE_FLAGS, threadcontextflags : u32, snapshothandle : *mut HPSS) -> u32); - PssCaptureSnapshot(processhandle.param().abi(), core::mem::transmute(captureflags), core::mem::transmute(threadcontextflags), core::mem::transmute(snapshothandle)) + PssCaptureSnapshot(core::mem::transmute(processhandle), core::mem::transmute(captureflags), core::mem::transmute(threadcontextflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(snapshothandle)) } #[inline] -pub unsafe fn PssDuplicateSnapshot(sourceprocesshandle: P0, snapshothandle: P1, targetprocesshandle: P2, targetsnapshothandle: *mut HPSS, flags: PSS_DUPLICATE_FLAGS) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn PssDuplicateSnapshot(sourceprocesshandle: super::super::super::Foundation::HANDLE, snapshothandle: HPSS, targetprocesshandle: super::super::super::Foundation::HANDLE, targetsnapshothandle: *mut HPSS, flags: Option) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssDuplicateSnapshot(sourceprocesshandle : super::super::super::Foundation:: HANDLE, snapshothandle : HPSS, targetprocesshandle : super::super::super::Foundation:: HANDLE, targetsnapshothandle : *mut HPSS, flags : PSS_DUPLICATE_FLAGS) -> u32); - PssDuplicateSnapshot(sourceprocesshandle.param().abi(), snapshothandle.param().abi(), targetprocesshandle.param().abi(), core::mem::transmute(targetsnapshothandle), core::mem::transmute(flags)) + PssDuplicateSnapshot(core::mem::transmute(sourceprocesshandle), core::mem::transmute(snapshothandle), core::mem::transmute(targetprocesshandle), core::mem::transmute(targetsnapshothandle), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PssFreeSnapshot(processhandle: P0, snapshothandle: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn PssFreeSnapshot(processhandle: super::super::super::Foundation::HANDLE, snapshothandle: HPSS) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssFreeSnapshot(processhandle : super::super::super::Foundation:: HANDLE, snapshothandle : HPSS) -> u32); - PssFreeSnapshot(processhandle.param().abi(), snapshothandle.param().abi()) + PssFreeSnapshot(core::mem::transmute(processhandle), core::mem::transmute(snapshothandle)) } #[inline] -pub unsafe fn PssQuerySnapshot(snapshothandle: P0, informationclass: PSS_QUERY_INFORMATION_CLASS, buffer: *mut core::ffi::c_void, bufferlength: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PssQuerySnapshot(snapshothandle: HPSS, informationclass: PSS_QUERY_INFORMATION_CLASS, buffer: *mut core::ffi::c_void, bufferlength: u32) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssQuerySnapshot(snapshothandle : HPSS, informationclass : PSS_QUERY_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, bufferlength : u32) -> u32); - PssQuerySnapshot(snapshothandle.param().abi(), core::mem::transmute(informationclass), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) + PssQuerySnapshot(core::mem::transmute(snapshothandle), core::mem::transmute(informationclass), core::mem::transmute(buffer), core::mem::transmute(bufferlength)) } #[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(core::ptr::null())), core::mem::transmute(walkmarkerhandle)) + PssWalkMarkerCreate(core::mem::transmute(allocator.unwrap_or(core::mem::zeroed())), core::mem::transmute(walkmarkerhandle)) } #[inline] -pub unsafe fn PssWalkMarkerFree(walkmarkerhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PssWalkMarkerFree(walkmarkerhandle: HPSSWALK) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssWalkMarkerFree(walkmarkerhandle : HPSSWALK) -> u32); - PssWalkMarkerFree(walkmarkerhandle.param().abi()) + PssWalkMarkerFree(core::mem::transmute(walkmarkerhandle)) } #[inline] -pub unsafe fn PssWalkMarkerGetPosition(walkmarkerhandle: P0, position: *mut usize) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PssWalkMarkerGetPosition(walkmarkerhandle: HPSSWALK, position: *mut usize) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssWalkMarkerGetPosition(walkmarkerhandle : HPSSWALK, position : *mut usize) -> u32); - PssWalkMarkerGetPosition(walkmarkerhandle.param().abi(), core::mem::transmute(position)) + PssWalkMarkerGetPosition(core::mem::transmute(walkmarkerhandle), core::mem::transmute(position)) } #[inline] -pub unsafe fn PssWalkMarkerSeekToBeginning(walkmarkerhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PssWalkMarkerSeekToBeginning(walkmarkerhandle: HPSSWALK) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssWalkMarkerSeekToBeginning(walkmarkerhandle : HPSSWALK) -> u32); - PssWalkMarkerSeekToBeginning(walkmarkerhandle.param().abi()) + PssWalkMarkerSeekToBeginning(core::mem::transmute(walkmarkerhandle)) } #[inline] -pub unsafe fn PssWalkMarkerSetPosition(walkmarkerhandle: P0, position: usize) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PssWalkMarkerSetPosition(walkmarkerhandle: HPSSWALK, position: usize) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssWalkMarkerSetPosition(walkmarkerhandle : HPSSWALK, position : usize) -> u32); - PssWalkMarkerSetPosition(walkmarkerhandle.param().abi(), core::mem::transmute(position)) + PssWalkMarkerSetPosition(core::mem::transmute(walkmarkerhandle), core::mem::transmute(position)) } #[inline] -pub unsafe fn PssWalkSnapshot(snapshothandle: P0, informationclass: PSS_WALK_INFORMATION_CLASS, walkmarkerhandle: P2, buffer: Option<&mut [u8]>) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn PssWalkSnapshot(snapshothandle: HPSS, informationclass: PSS_WALK_INFORMATION_CLASS, walkmarkerhandle: HPSSWALK, buffer: Option<&mut [u8]>) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssWalkSnapshot(snapshothandle : HPSS, informationclass : PSS_WALK_INFORMATION_CLASS, walkmarkerhandle : HPSSWALK, buffer : *mut core::ffi::c_void, bufferlength : u32) -> u32); - PssWalkSnapshot(snapshothandle.param().abi(), core::mem::transmute(informationclass), walkmarkerhandle.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())) + PssWalkSnapshot(core::mem::transmute(snapshothandle), core::mem::transmute(informationclass), core::mem::transmute(walkmarkerhandle), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs index f559641cb6..405b0e91d0 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs @@ -10,20 +10,14 @@ pub unsafe fn Heap32First(lphe: *mut HEAPENTRY32, th32processid: u32, th32heapid Heap32First(core::mem::transmute(lphe), core::mem::transmute(th32processid), core::mem::transmute(th32heapid)).ok() } #[inline] -pub unsafe fn Heap32ListFirst(hsnapshot: P0, lphl: *mut HEAPLIST32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Heap32ListFirst(hsnapshot: super::super::super::Foundation::HANDLE, lphl: *mut HEAPLIST32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Heap32ListFirst(hsnapshot : super::super::super::Foundation:: HANDLE, lphl : *mut HEAPLIST32) -> super::super::super::Foundation:: BOOL); - Heap32ListFirst(hsnapshot.param().abi(), core::mem::transmute(lphl)).ok() + Heap32ListFirst(core::mem::transmute(hsnapshot), core::mem::transmute(lphl)).ok() } #[inline] -pub unsafe fn Heap32ListNext(hsnapshot: P0, lphl: *mut HEAPLIST32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Heap32ListNext(hsnapshot: super::super::super::Foundation::HANDLE, lphl: *mut HEAPLIST32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Heap32ListNext(hsnapshot : super::super::super::Foundation:: HANDLE, lphl : *mut HEAPLIST32) -> super::super::super::Foundation:: BOOL); - Heap32ListNext(hsnapshot.param().abi(), core::mem::transmute(lphl)).ok() + Heap32ListNext(core::mem::transmute(hsnapshot), core::mem::transmute(lphl)).ok() } #[inline] pub unsafe fn Heap32Next(lphe: *mut HEAPENTRY32) -> windows_core::Result<()> { @@ -31,84 +25,54 @@ pub unsafe fn Heap32Next(lphe: *mut HEAPENTRY32) -> windows_core::Result<()> { Heap32Next(core::mem::transmute(lphe)).ok() } #[inline] -pub unsafe fn Module32First(hsnapshot: P0, lpme: *mut MODULEENTRY32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Module32First(hsnapshot: super::super::super::Foundation::HANDLE, lpme: *mut MODULEENTRY32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Module32First(hsnapshot : super::super::super::Foundation:: HANDLE, lpme : *mut MODULEENTRY32) -> super::super::super::Foundation:: BOOL); - Module32First(hsnapshot.param().abi(), core::mem::transmute(lpme)).ok() + Module32First(core::mem::transmute(hsnapshot), core::mem::transmute(lpme)).ok() } #[inline] -pub unsafe fn Module32FirstW(hsnapshot: P0, lpme: *mut MODULEENTRY32W) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Module32FirstW(hsnapshot: super::super::super::Foundation::HANDLE, lpme: *mut MODULEENTRY32W) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Module32FirstW(hsnapshot : super::super::super::Foundation:: HANDLE, lpme : *mut MODULEENTRY32W) -> super::super::super::Foundation:: BOOL); - Module32FirstW(hsnapshot.param().abi(), core::mem::transmute(lpme)).ok() + Module32FirstW(core::mem::transmute(hsnapshot), core::mem::transmute(lpme)).ok() } #[inline] -pub unsafe fn Module32Next(hsnapshot: P0, lpme: *mut MODULEENTRY32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Module32Next(hsnapshot: super::super::super::Foundation::HANDLE, lpme: *mut MODULEENTRY32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Module32Next(hsnapshot : super::super::super::Foundation:: HANDLE, lpme : *mut MODULEENTRY32) -> super::super::super::Foundation:: BOOL); - Module32Next(hsnapshot.param().abi(), core::mem::transmute(lpme)).ok() + Module32Next(core::mem::transmute(hsnapshot), core::mem::transmute(lpme)).ok() } #[inline] -pub unsafe fn Module32NextW(hsnapshot: P0, lpme: *mut MODULEENTRY32W) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Module32NextW(hsnapshot: super::super::super::Foundation::HANDLE, lpme: *mut MODULEENTRY32W) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Module32NextW(hsnapshot : super::super::super::Foundation:: HANDLE, lpme : *mut MODULEENTRY32W) -> super::super::super::Foundation:: BOOL); - Module32NextW(hsnapshot.param().abi(), core::mem::transmute(lpme)).ok() + Module32NextW(core::mem::transmute(hsnapshot), core::mem::transmute(lpme)).ok() } #[inline] -pub unsafe fn Process32First(hsnapshot: P0, lppe: *mut PROCESSENTRY32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Process32First(hsnapshot: super::super::super::Foundation::HANDLE, lppe: *mut PROCESSENTRY32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Process32First(hsnapshot : super::super::super::Foundation:: HANDLE, lppe : *mut PROCESSENTRY32) -> super::super::super::Foundation:: BOOL); - Process32First(hsnapshot.param().abi(), core::mem::transmute(lppe)).ok() + Process32First(core::mem::transmute(hsnapshot), core::mem::transmute(lppe)).ok() } #[inline] -pub unsafe fn Process32FirstW(hsnapshot: P0, lppe: *mut PROCESSENTRY32W) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Process32FirstW(hsnapshot: super::super::super::Foundation::HANDLE, lppe: *mut PROCESSENTRY32W) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Process32FirstW(hsnapshot : super::super::super::Foundation:: HANDLE, lppe : *mut PROCESSENTRY32W) -> super::super::super::Foundation:: BOOL); - Process32FirstW(hsnapshot.param().abi(), core::mem::transmute(lppe)).ok() + Process32FirstW(core::mem::transmute(hsnapshot), core::mem::transmute(lppe)).ok() } #[inline] -pub unsafe fn Process32Next(hsnapshot: P0, lppe: *mut PROCESSENTRY32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Process32Next(hsnapshot: super::super::super::Foundation::HANDLE, lppe: *mut PROCESSENTRY32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Process32Next(hsnapshot : super::super::super::Foundation:: HANDLE, lppe : *mut PROCESSENTRY32) -> super::super::super::Foundation:: BOOL); - Process32Next(hsnapshot.param().abi(), core::mem::transmute(lppe)).ok() + Process32Next(core::mem::transmute(hsnapshot), core::mem::transmute(lppe)).ok() } #[inline] -pub unsafe fn Process32NextW(hsnapshot: P0, lppe: *mut PROCESSENTRY32W) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Process32NextW(hsnapshot: super::super::super::Foundation::HANDLE, lppe: *mut PROCESSENTRY32W) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Process32NextW(hsnapshot : super::super::super::Foundation:: HANDLE, lppe : *mut PROCESSENTRY32W) -> super::super::super::Foundation:: BOOL); - Process32NextW(hsnapshot.param().abi(), core::mem::transmute(lppe)).ok() + Process32NextW(core::mem::transmute(hsnapshot), core::mem::transmute(lppe)).ok() } #[inline] -pub unsafe fn Thread32First(hsnapshot: P0, lpte: *mut THREADENTRY32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Thread32First(hsnapshot: super::super::super::Foundation::HANDLE, lpte: *mut THREADENTRY32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Thread32First(hsnapshot : super::super::super::Foundation:: HANDLE, lpte : *mut THREADENTRY32) -> super::super::super::Foundation:: BOOL); - Thread32First(hsnapshot.param().abi(), core::mem::transmute(lpte)).ok() + Thread32First(core::mem::transmute(hsnapshot), core::mem::transmute(lpte)).ok() } #[inline] -pub unsafe fn Thread32Next(hsnapshot: P0, lpte: *mut THREADENTRY32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Thread32Next(hsnapshot: super::super::super::Foundation::HANDLE, lpte: *mut THREADENTRY32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn Thread32Next(hsnapshot : super::super::super::Foundation:: HANDLE, lpte : *mut THREADENTRY32) -> super::super::super::Foundation:: BOOL); - Thread32Next(hsnapshot.param().abi(), core::mem::transmute(lpte)).ok() + Thread32Next(core::mem::transmute(hsnapshot), core::mem::transmute(lpte)).ok() } #[inline] pub unsafe fn Toolhelp32ReadProcessMemory(th32processid: u32, lpbaseaddress: *const core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, cbread: usize, lpnumberofbytesread: *mut usize) -> super::super::super::Foundation::BOOL { 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 026e3279cf..faae73d163 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(), core::mem::transmute(i_riid), core::mem::transmute(i_dwreserved1), core::mem::transmute(i_wcbreserved2), core::mem::transmute(i_pvreserved2.unwrap_or(core::ptr::null())), core::mem::transmute(o_ppvobject)).ok() + DtcGetTransactionManager(i_pszhost.param().abi(), i_psztmname.param().abi(), core::mem::transmute(i_riid), core::mem::transmute(i_dwreserved1), core::mem::transmute(i_wcbreserved2), core::mem::transmute(i_pvreserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(i_riid), core::mem::transmute(i_dwreserved1), core::mem::transmute(i_wcbreserved2), core::mem::transmute(i_pvreserved2.unwrap_or(core::ptr::null())), core::mem::transmute(o_ppvobject)).ok() + DtcGetTransactionManagerC(i_pszhost.param().abi(), i_psztmname.param().abi(), core::mem::transmute(i_riid), core::mem::transmute(i_dwreserved1), core::mem::transmute(i_wcbreserved2), core::mem::transmute(i_pvreserved2.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> @@ -3509,7 +3509,7 @@ windows_core::imp::define_interface!(ITransactionVoterBallotAsync2, ITransaction 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), core::mem::transmute(hr), core::mem::transmute(pboidreason.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).VoteRequestDone)(windows_core::Interface::as_raw(self), core::mem::transmute(hr), core::mem::transmute(pboidreason.unwrap_or(core::mem::zeroed()))).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 c87964c132..374a74b171 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs @@ -7,21 +7,17 @@ where CallEnclave(core::mem::transmute(lproutine), core::mem::transmute(lpparameter), fwaitforthread.param().abi(), core::mem::transmute(lpreturnvalue)).ok() } #[inline] -pub unsafe fn CreateEnclave(hprocess: P0, lpaddress: Option<*const core::ffi::c_void>, dwsize: usize, dwinitialcommitment: usize, flenclavetype: u32, lpenclaveinformation: *const core::ffi::c_void, dwinfolength: u32, lpenclaveerror: Option<*mut u32>) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn CreateEnclave(hprocess: super::super::Foundation::HANDLE, lpaddress: Option<*const core::ffi::c_void>, dwsize: usize, dwinitialcommitment: usize, flenclavetype: u32, lpenclaveinformation: *const core::ffi::c_void, dwinfolength: u32, lpenclaveerror: Option<*mut u32>) -> *mut core::ffi::c_void { 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(core::ptr::null())), core::mem::transmute(dwsize), core::mem::transmute(dwinitialcommitment), core::mem::transmute(flenclavetype), core::mem::transmute(lpenclaveinformation), core::mem::transmute(dwinfolength), core::mem::transmute(lpenclaveerror.unwrap_or(core::ptr::null_mut()))) + CreateEnclave(core::mem::transmute(hprocess), core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsize), core::mem::transmute(dwinitialcommitment), core::mem::transmute(flenclavetype), core::mem::transmute(lpenclaveinformation), core::mem::transmute(dwinfolength), core::mem::transmute(lpenclaveerror.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreateEnvironmentBlock(lpenvironment: *mut *mut core::ffi::c_void, htoken: P1, binherit: P2) -> windows_core::Result<()> +pub unsafe fn CreateEnvironmentBlock(lpenvironment: *mut *mut core::ffi::c_void, htoken: Option, binherit: P2) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn CreateEnvironmentBlock(lpenvironment : *mut *mut core::ffi::c_void, htoken : super::super::Foundation:: HANDLE, binherit : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CreateEnvironmentBlock(core::mem::transmute(lpenvironment), htoken.param().abi(), binherit.param().abi()).ok() + CreateEnvironmentBlock(core::mem::transmute(lpenvironment), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), binherit.param().abi()).ok() } #[inline] pub unsafe fn DeleteEnclave(lpaddress: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -36,7 +32,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(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(outputsize)).ok() } #[inline] pub unsafe fn EnclaveGetEnclaveInformation(informationsize: u32, enclaveinformation: *mut ENCLAVE_INFORMATION) -> windows_core::Result<()> { @@ -46,12 +42,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(core::mem::transmute(datatoencrypt), core::mem::transmute(datatoencryptsize), core::mem::transmute(identitypolicy), core::mem::transmute(runtimepolicy), core::mem::transmute(protectedblob.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(protectedblobsize)).ok() + EnclaveSealData(core::mem::transmute(datatoencrypt), core::mem::transmute(datatoencryptsize), core::mem::transmute(identitypolicy), core::mem::transmute(runtimepolicy), core::mem::transmute(protectedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(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(core::mem::transmute(protectedblob), core::mem::transmute(protectedblobsize), core::mem::transmute(decrypteddata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize), core::mem::transmute(decrypteddatasize), core::mem::transmute(sealingidentity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(unsealingflags.unwrap_or(core::ptr::null_mut()))).ok() + EnclaveUnsealData(core::mem::transmute(protectedblob), core::mem::transmute(protectedblobsize), core::mem::transmute(decrypteddata.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), core::mem::transmute(decrypteddatasize), core::mem::transmute(sealingidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(unsealingflags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn EnclaveVerifyAttestationReport(enclavetype: u32, report: *const core::ffi::c_void, reportsize: u32) -> windows_core::Result<()> { @@ -67,22 +63,20 @@ where ExpandEnvironmentStringsA(lpsrc.param().abi(), core::mem::transmute(lpdst.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn ExpandEnvironmentStringsForUserA(htoken: P0, lpsrc: P1, lpdest: &mut [u8]) -> windows_core::Result<()> +pub unsafe fn ExpandEnvironmentStringsForUserA(htoken: Option, lpsrc: P1, lpdest: &mut [u8]) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn ExpandEnvironmentStringsForUserA(htoken : super::super::Foundation:: HANDLE, lpsrc : windows_core::PCSTR, lpdest : windows_core::PSTR, dwsize : u32) -> super::super::Foundation:: BOOL); - ExpandEnvironmentStringsForUserA(htoken.param().abi(), lpsrc.param().abi(), core::mem::transmute(lpdest.as_ptr()), lpdest.len().try_into().unwrap()).ok() + ExpandEnvironmentStringsForUserA(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), lpsrc.param().abi(), core::mem::transmute(lpdest.as_ptr()), lpdest.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn ExpandEnvironmentStringsForUserW(htoken: P0, lpsrc: P1, lpdest: &mut [u16]) -> windows_core::Result<()> +pub unsafe fn ExpandEnvironmentStringsForUserW(htoken: Option, lpsrc: P1, lpdest: &mut [u16]) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn ExpandEnvironmentStringsForUserW(htoken : super::super::Foundation:: HANDLE, lpsrc : windows_core::PCWSTR, lpdest : windows_core::PWSTR, dwsize : u32) -> super::super::Foundation:: BOOL); - ExpandEnvironmentStringsForUserW(htoken.param().abi(), lpsrc.param().abi(), core::mem::transmute(lpdest.as_ptr()), lpdest.len().try_into().unwrap()).ok() + ExpandEnvironmentStringsForUserW(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), lpsrc.param().abi(), core::mem::transmute(lpdest.as_ptr()), lpdest.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn ExpandEnvironmentStringsW(lpsrc: P0, lpdst: Option<&mut [u16]>) -> u32 @@ -155,12 +149,9 @@ where GetEnvironmentVariableW(lpname.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())) } #[inline] -pub unsafe fn InitializeEnclave(hprocess: P0, lpaddress: *const core::ffi::c_void, lpenclaveinformation: *const core::ffi::c_void, dwinfolength: u32, lpenclaveerror: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn InitializeEnclave(hprocess: super::super::Foundation::HANDLE, lpaddress: *const core::ffi::c_void, lpenclaveinformation: *const core::ffi::c_void, dwinfolength: u32, lpenclaveerror: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpaddress), core::mem::transmute(lpenclaveinformation), core::mem::transmute(dwinfolength), core::mem::transmute(lpenclaveerror.unwrap_or(core::ptr::null_mut()))).ok() + InitializeEnclave(core::mem::transmute(hprocess), core::mem::transmute(lpaddress), core::mem::transmute(lpenclaveinformation), core::mem::transmute(dwinfolength), core::mem::transmute(lpenclaveerror.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn IsEnclaveTypeSupported(flenclavetype: u32) -> windows_core::Result<()> { @@ -168,12 +159,9 @@ pub unsafe fn IsEnclaveTypeSupported(flenclavetype: u32) -> windows_core::Result IsEnclaveTypeSupported(core::mem::transmute(flenclavetype)).ok() } #[inline] -pub unsafe fn LoadEnclaveData(hprocess: P0, lpaddress: *const core::ffi::c_void, lpbuffer: *const core::ffi::c_void, nsize: usize, flprotect: u32, lppageinformation: *const core::ffi::c_void, dwinfolength: u32, lpnumberofbyteswritten: *mut usize, lpenclaveerror: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpaddress), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(flprotect), core::mem::transmute(lppageinformation), core::mem::transmute(dwinfolength), core::mem::transmute(lpnumberofbyteswritten), core::mem::transmute(lpenclaveerror.unwrap_or(core::ptr::null_mut()))).ok() + LoadEnclaveData(core::mem::transmute(hprocess), core::mem::transmute(lpaddress), core::mem::transmute(lpbuffer), core::mem::transmute(nsize), core::mem::transmute(flprotect), core::mem::transmute(lppageinformation), core::mem::transmute(dwinfolength), core::mem::transmute(lpnumberofbyteswritten), core::mem::transmute(lpenclaveerror.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn LoadEnclaveImageA(lpenclaveaddress: *const core::ffi::c_void, lpimagename: P1) -> 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 e1a6115d2c..5c66dbac7c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs @@ -38,13 +38,10 @@ where WerFreeString(pwszstr.param().abi()) } #[inline] -pub unsafe fn WerGetFlags(hprocess: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WerGetFlags(hprocess: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn WerGetFlags(hprocess : super::super::Foundation:: HANDLE, pdwflags : *mut WER_FAULT_REPORTING) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WerGetFlags(hprocess.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WerGetFlags(core::mem::transmute(hprocess), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn WerRegisterAdditionalProcess(processid: u32, captureextrainfoforthreadid: u32) -> windows_core::Result<()> { @@ -105,31 +102,22 @@ where } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn WerReportAddDump(hreporthandle: P0, hprocess: P1, hthread: P2, dumptype: WER_DUMP_TYPE, pexceptionparam: Option<*const WER_EXCEPTION_INFORMATION>, pdumpcustomoptions: Option<*const WER_DUMP_CUSTOM_OPTIONS>, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn WerReportAddDump(hreporthandle: HREPORT, hprocess: super::super::Foundation::HANDLE, hthread: Option, dumptype: WER_DUMP_TYPE, pexceptionparam: Option<*const WER_EXCEPTION_INFORMATION>, pdumpcustomoptions: Option<*const WER_DUMP_CUSTOM_OPTIONS>, dwflags: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dumptype), core::mem::transmute(pexceptionparam.unwrap_or(core::ptr::null())), core::mem::transmute(pdumpcustomoptions.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + WerReportAddDump(core::mem::transmute(hreporthandle), core::mem::transmute(hprocess), core::mem::transmute(hthread.unwrap_or(core::mem::zeroed())), core::mem::transmute(dumptype), core::mem::transmute(pexceptionparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdumpcustomoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn WerReportAddFile(hreporthandle: P0, pwzpath: P1, repfiletype: WER_FILE_TYPE, dwfileflags: WER_FILE) -> windows_core::Result<()> +pub unsafe fn WerReportAddFile(hreporthandle: HREPORT, pwzpath: P1, repfiletype: WER_FILE_TYPE, dwfileflags: WER_FILE) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerReportAddFile(hreporthandle : HREPORT, pwzpath : windows_core::PCWSTR, repfiletype : WER_FILE_TYPE, dwfileflags : WER_FILE) -> windows_core::HRESULT); - WerReportAddFile(hreporthandle.param().abi(), pwzpath.param().abi(), core::mem::transmute(repfiletype), core::mem::transmute(dwfileflags)).ok() + WerReportAddFile(core::mem::transmute(hreporthandle), pwzpath.param().abi(), core::mem::transmute(repfiletype), core::mem::transmute(dwfileflags)).ok() } #[inline] -pub unsafe fn WerReportCloseHandle(hreporthandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WerReportCloseHandle(hreporthandle: HREPORT) -> windows_core::Result<()> { windows_targets::link!("wer.dll" "system" fn WerReportCloseHandle(hreporthandle : HREPORT) -> windows_core::HRESULT); - WerReportCloseHandle(hreporthandle.param().abi()).ok() + WerReportCloseHandle(core::mem::transmute(hreporthandle)).ok() } #[inline] pub unsafe fn WerReportCreate(pwzeventtype: P0, reptype: WER_REPORT_TYPE, preportinformation: Option<*const WER_REPORT_INFORMATION>) -> windows_core::Result @@ -138,43 +126,37 @@ 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(), core::mem::transmute(reptype), core::mem::transmute(preportinformation.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + WerReportCreate(pwzeventtype.param().abi(), core::mem::transmute(reptype), core::mem::transmute(preportinformation.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WerReportHang(hwndhungapp: P0, pwzhungapplicationname: P1) -> windows_core::Result<()> +pub unsafe fn WerReportHang(hwndhungapp: super::super::Foundation::HWND, pwzhungapplicationname: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("faultrep.dll" "system" fn WerReportHang(hwndhungapp : super::super::Foundation:: HWND, pwzhungapplicationname : windows_core::PCWSTR) -> windows_core::HRESULT); - WerReportHang(hwndhungapp.param().abi(), pwzhungapplicationname.param().abi()).ok() + WerReportHang(core::mem::transmute(hwndhungapp), pwzhungapplicationname.param().abi()).ok() } #[inline] -pub unsafe fn WerReportSetParameter(hreporthandle: P0, dwparamid: u32, pwzname: P2, pwzvalue: P3) -> windows_core::Result<()> +pub unsafe fn WerReportSetParameter(hreporthandle: HREPORT, dwparamid: u32, pwzname: P2, pwzvalue: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerReportSetParameter(hreporthandle : HREPORT, dwparamid : u32, pwzname : windows_core::PCWSTR, pwzvalue : windows_core::PCWSTR) -> windows_core::HRESULT); - WerReportSetParameter(hreporthandle.param().abi(), core::mem::transmute(dwparamid), pwzname.param().abi(), pwzvalue.param().abi()).ok() + WerReportSetParameter(core::mem::transmute(hreporthandle), core::mem::transmute(dwparamid), pwzname.param().abi(), pwzvalue.param().abi()).ok() } #[inline] -pub unsafe fn WerReportSetUIOption(hreporthandle: P0, repuitypeid: WER_REPORT_UI, pwzvalue: P2) -> windows_core::Result<()> +pub unsafe fn WerReportSetUIOption(hreporthandle: HREPORT, repuitypeid: WER_REPORT_UI, pwzvalue: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerReportSetUIOption(hreporthandle : HREPORT, repuitypeid : WER_REPORT_UI, pwzvalue : windows_core::PCWSTR) -> windows_core::HRESULT); - WerReportSetUIOption(hreporthandle.param().abi(), core::mem::transmute(repuitypeid), pwzvalue.param().abi()).ok() + WerReportSetUIOption(core::mem::transmute(hreporthandle), core::mem::transmute(repuitypeid), pwzvalue.param().abi()).ok() } #[inline] -pub unsafe fn WerReportSubmit(hreporthandle: P0, consent: WER_CONSENT, dwflags: WER_SUBMIT_FLAGS, psubmitresult: Option<*mut WER_SUBMIT_RESULT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WerReportSubmit(hreporthandle: HREPORT, consent: WER_CONSENT, dwflags: WER_SUBMIT_FLAGS, psubmitresult: Option<*mut WER_SUBMIT_RESULT>) -> windows_core::Result<()> { 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(), core::mem::transmute(consent), core::mem::transmute(dwflags), core::mem::transmute(psubmitresult.unwrap_or(core::ptr::null_mut()))).ok() + WerReportSubmit(core::mem::transmute(hreporthandle), core::mem::transmute(consent), core::mem::transmute(dwflags), core::mem::transmute(psubmitresult.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WerSetFlags(dwflags: WER_FAULT_REPORTING) -> windows_core::Result<()> { @@ -182,46 +164,31 @@ pub unsafe fn WerSetFlags(dwflags: WER_FAULT_REPORTING) -> windows_core::Result< WerSetFlags(core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn WerStoreClose(hreportstore: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn WerStoreClose(hreportstore: Option) { windows_targets::link!("wer.dll" "system" fn WerStoreClose(hreportstore : HREPORTSTORE)); - WerStoreClose(hreportstore.param().abi()) + WerStoreClose(core::mem::transmute(hreportstore.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WerStoreGetFirstReportKey(hreportstore: P0, ppszreportkey: Option<*mut windows_core::PCWSTR>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WerStoreGetFirstReportKey(hreportstore: HREPORTSTORE, ppszreportkey: Option<*mut windows_core::PCWSTR>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + WerStoreGetFirstReportKey(core::mem::transmute(hreportstore), core::mem::transmute(ppszreportkey.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WerStoreGetNextReportKey(hreportstore: P0, ppszreportkey: Option<*mut windows_core::PCWSTR>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WerStoreGetNextReportKey(hreportstore: HREPORTSTORE, ppszreportkey: Option<*mut windows_core::PCWSTR>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + WerStoreGetNextReportKey(core::mem::transmute(hreportstore), core::mem::transmute(ppszreportkey.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WerStoreGetReportCount(hreportstore: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WerStoreGetReportCount(hreportstore: HREPORTSTORE) -> windows_core::Result { windows_targets::link!("wer.dll" "system" fn WerStoreGetReportCount(hreportstore : HREPORTSTORE, pdwreportcount : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WerStoreGetReportCount(hreportstore.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WerStoreGetReportCount(core::mem::transmute(hreportstore), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WerStoreGetSizeOnDisk(hreportstore: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WerStoreGetSizeOnDisk(hreportstore: HREPORTSTORE) -> windows_core::Result { windows_targets::link!("wer.dll" "system" fn WerStoreGetSizeOnDisk(hreportstore : HREPORTSTORE, pqwsizeinbytes : *mut u64) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WerStoreGetSizeOnDisk(hreportstore.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WerStoreGetSizeOnDisk(core::mem::transmute(hreportstore), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn WerStoreOpen(repstoretype: REPORT_STORE_TYPES) -> windows_core::Result { @@ -235,40 +202,36 @@ pub unsafe fn WerStorePurge() -> windows_core::Result<()> { WerStorePurge().ok() } #[inline] -pub unsafe fn WerStoreQueryReportMetadataV1(hreportstore: P0, pszreportkey: P1, preportmetadata: *mut WER_REPORT_METADATA_V1) -> windows_core::Result<()> +pub unsafe fn WerStoreQueryReportMetadataV1(hreportstore: HREPORTSTORE, pszreportkey: P1, preportmetadata: *mut WER_REPORT_METADATA_V1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerStoreQueryReportMetadataV1(hreportstore : HREPORTSTORE, pszreportkey : windows_core::PCWSTR, preportmetadata : *mut WER_REPORT_METADATA_V1) -> windows_core::HRESULT); - WerStoreQueryReportMetadataV1(hreportstore.param().abi(), pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() + WerStoreQueryReportMetadataV1(core::mem::transmute(hreportstore), pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() } #[inline] -pub unsafe fn WerStoreQueryReportMetadataV2(hreportstore: P0, pszreportkey: P1, preportmetadata: *mut WER_REPORT_METADATA_V2) -> windows_core::Result<()> +pub unsafe fn WerStoreQueryReportMetadataV2(hreportstore: HREPORTSTORE, pszreportkey: P1, preportmetadata: *mut WER_REPORT_METADATA_V2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerStoreQueryReportMetadataV2(hreportstore : HREPORTSTORE, pszreportkey : windows_core::PCWSTR, preportmetadata : *mut WER_REPORT_METADATA_V2) -> windows_core::HRESULT); - WerStoreQueryReportMetadataV2(hreportstore.param().abi(), pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() + WerStoreQueryReportMetadataV2(core::mem::transmute(hreportstore), pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() } #[inline] -pub unsafe fn WerStoreQueryReportMetadataV3(hreportstore: P0, pszreportkey: P1, preportmetadata: *mut WER_REPORT_METADATA_V3) -> windows_core::Result<()> +pub unsafe fn WerStoreQueryReportMetadataV3(hreportstore: HREPORTSTORE, pszreportkey: P1, preportmetadata: *mut WER_REPORT_METADATA_V3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerStoreQueryReportMetadataV3(hreportstore : HREPORTSTORE, pszreportkey : windows_core::PCWSTR, preportmetadata : *mut WER_REPORT_METADATA_V3) -> windows_core::HRESULT); - WerStoreQueryReportMetadataV3(hreportstore.param().abi(), pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() + WerStoreQueryReportMetadataV3(core::mem::transmute(hreportstore), pszreportkey.param().abi(), core::mem::transmute(preportmetadata)).ok() } #[inline] -pub unsafe fn WerStoreUploadReport(hreportstore: P0, pszreportkey: P1, dwflags: u32, psubmitresult: Option<*mut WER_SUBMIT_RESULT>) -> windows_core::Result<()> +pub unsafe fn WerStoreUploadReport(hreportstore: HREPORTSTORE, pszreportkey: P1, dwflags: u32, psubmitresult: Option<*mut WER_SUBMIT_RESULT>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(), core::mem::transmute(dwflags), core::mem::transmute(psubmitresult.unwrap_or(core::ptr::null_mut()))).ok() + WerStoreUploadReport(core::mem::transmute(hreportstore), pszreportkey.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(psubmitresult.unwrap_or(core::mem::zeroed()))).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 8b4dc86765..f364f17ad9 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs @@ -1,89 +1,71 @@ #[inline] -pub unsafe fn BackupEventLogA(heventlog: P0, lpbackupfilename: P1) -> windows_core::Result<()> +pub unsafe fn BackupEventLogA(heventlog: super::super::Foundation::HANDLE, lpbackupfilename: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BackupEventLogA(heventlog : super::super::Foundation:: HANDLE, lpbackupfilename : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - BackupEventLogA(heventlog.param().abi(), lpbackupfilename.param().abi()).ok() + BackupEventLogA(core::mem::transmute(heventlog), lpbackupfilename.param().abi()).ok() } #[inline] -pub unsafe fn BackupEventLogW(heventlog: P0, lpbackupfilename: P1) -> windows_core::Result<()> +pub unsafe fn BackupEventLogW(heventlog: super::super::Foundation::HANDLE, lpbackupfilename: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BackupEventLogW(heventlog : super::super::Foundation:: HANDLE, lpbackupfilename : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - BackupEventLogW(heventlog.param().abi(), lpbackupfilename.param().abi()).ok() + BackupEventLogW(core::mem::transmute(heventlog), lpbackupfilename.param().abi()).ok() } #[inline] -pub unsafe fn ClearEventLogA(heventlog: P0, lpbackupfilename: P1) -> windows_core::Result<()> +pub unsafe fn ClearEventLogA(heventlog: super::super::Foundation::HANDLE, lpbackupfilename: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ClearEventLogA(heventlog : super::super::Foundation:: HANDLE, lpbackupfilename : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - ClearEventLogA(heventlog.param().abi(), lpbackupfilename.param().abi()).ok() + ClearEventLogA(core::mem::transmute(heventlog), lpbackupfilename.param().abi()).ok() } #[inline] -pub unsafe fn ClearEventLogW(heventlog: P0, lpbackupfilename: P1) -> windows_core::Result<()> +pub unsafe fn ClearEventLogW(heventlog: super::super::Foundation::HANDLE, lpbackupfilename: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ClearEventLogW(heventlog : super::super::Foundation:: HANDLE, lpbackupfilename : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - ClearEventLogW(heventlog.param().abi(), lpbackupfilename.param().abi()).ok() + ClearEventLogW(core::mem::transmute(heventlog), lpbackupfilename.param().abi()).ok() } #[inline] -pub unsafe fn CloseEventLog(heventlog: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseEventLog(heventlog: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CloseEventLog(heventlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CloseEventLog(heventlog.param().abi()).ok() + CloseEventLog(core::mem::transmute(heventlog)).ok() } #[inline] -pub unsafe fn DeregisterEventSource(heventlog: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DeregisterEventSource(heventlog: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn DeregisterEventSource(heventlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeregisterEventSource(heventlog.param().abi()).ok() + DeregisterEventSource(core::mem::transmute(heventlog)).ok() } #[inline] -pub unsafe fn EvtArchiveExportedLog(session: P0, logfilepath: P1, locale: u32, flags: u32) -> windows_core::Result<()> +pub unsafe fn EvtArchiveExportedLog(session: Option, logfilepath: P1, locale: u32, flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wevtapi.dll" "system" fn EvtArchiveExportedLog(session : EVT_HANDLE, logfilepath : windows_core::PCWSTR, locale : u32, flags : u32) -> super::super::Foundation:: BOOL); - EvtArchiveExportedLog(session.param().abi(), logfilepath.param().abi(), core::mem::transmute(locale), core::mem::transmute(flags)).ok() + EvtArchiveExportedLog(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), logfilepath.param().abi(), core::mem::transmute(locale), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn EvtCancel(object: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtCancel(object: Option) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtCancel(object : EVT_HANDLE) -> super::super::Foundation:: BOOL); - EvtCancel(object.param().abi()).ok() + EvtCancel(core::mem::transmute(object.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn EvtClearLog(session: P0, channelpath: P1, targetfilepath: P2, flags: u32) -> windows_core::Result<()> +pub unsafe fn EvtClearLog(session: Option, channelpath: P1, targetfilepath: P2, flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wevtapi.dll" "system" fn EvtClearLog(session : EVT_HANDLE, channelpath : windows_core::PCWSTR, targetfilepath : windows_core::PCWSTR, flags : u32) -> super::super::Foundation:: BOOL); - EvtClearLog(session.param().abi(), channelpath.param().abi(), targetfilepath.param().abi(), core::mem::transmute(flags)).ok() + EvtClearLog(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), channelpath.param().abi(), targetfilepath.param().abi(), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn EvtClose(object: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtClose(object: EVT_HANDLE) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtClose(object : EVT_HANDLE) -> super::super::Foundation:: BOOL); - EvtClose(object.param().abi()).ok() + EvtClose(core::mem::transmute(object)).ok() } #[inline] pub unsafe fn EvtCreateBookmark(bookmarkxml: P0) -> windows_core::Result @@ -101,52 +83,49 @@ pub unsafe fn EvtCreateRenderContext(valuepaths: Option<&[windows_core::PCWSTR]> (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtExportLog(session: P0, path: P1, query: P2, targetfilepath: P3, flags: u32) -> windows_core::Result<()> +pub unsafe fn EvtExportLog(session: Option, path: P1, query: P2, targetfilepath: P3, flags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wevtapi.dll" "system" fn EvtExportLog(session : EVT_HANDLE, path : windows_core::PCWSTR, query : windows_core::PCWSTR, targetfilepath : windows_core::PCWSTR, flags : u32) -> super::super::Foundation:: BOOL); - EvtExportLog(session.param().abi(), path.param().abi(), query.param().abi(), targetfilepath.param().abi(), core::mem::transmute(flags)).ok() + EvtExportLog(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), path.param().abi(), query.param().abi(), targetfilepath.param().abi(), core::mem::transmute(flags)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EvtFormatMessage(publishermetadata: P0, event: P1, messageid: u32, values: Option<&[EVT_VARIANT]>, flags: u32, buffer: Option<&mut [u16]>, bufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EvtFormatMessage(publishermetadata: Option, event: Option, messageid: u32, values: Option<&[EVT_VARIANT]>, flags: u32, buffer: Option<&mut [u16]>, bufferused: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtFormatMessage(publishermetadata : EVT_HANDLE, event : EVT_HANDLE, messageid : u32, valuecount : u32, values : *const EVT_VARIANT, flags : u32, buffersize : u32, buffer : windows_core::PWSTR, bufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtFormatMessage(publishermetadata.param().abi(), event.param().abi(), core::mem::transmute(messageid), values.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(values.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(flags), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(bufferused)).ok() + EvtFormatMessage( + core::mem::transmute(publishermetadata.unwrap_or(core::mem::zeroed())), + core::mem::transmute(event.unwrap_or(core::mem::zeroed())), + core::mem::transmute(messageid), + values.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(values.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + core::mem::transmute(flags), + buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + core::mem::transmute(bufferused), + ) + .ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EvtGetChannelConfigProperty(channelconfig: P0, propertyid: EVT_CHANNEL_CONFIG_PROPERTY_ID, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtGetChannelConfigProperty(channelconfig: EVT_HANDLE, propertyid: EVT_CHANNEL_CONFIG_PROPERTY_ID, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(propertyid), core::mem::transmute(flags), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertyvaluebufferused)).ok() + EvtGetChannelConfigProperty(core::mem::transmute(channelconfig), core::mem::transmute(propertyid), core::mem::transmute(flags), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EvtGetEventInfo(event: P0, propertyid: EVT_EVENT_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtGetEventInfo(event: EVT_HANDLE, propertyid: EVT_EVENT_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(propertyid), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertyvaluebufferused)).ok() + EvtGetEventInfo(core::mem::transmute(event), core::mem::transmute(propertyid), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EvtGetEventMetadataProperty(eventmetadata: P0, propertyid: EVT_EVENT_METADATA_PROPERTY_ID, flags: u32, eventmetadatapropertybuffersize: u32, eventmetadatapropertybuffer: Option<*mut EVT_VARIANT>, eventmetadatapropertybufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtGetEventMetadataProperty(eventmetadata: EVT_HANDLE, propertyid: EVT_EVENT_METADATA_PROPERTY_ID, flags: u32, eventmetadatapropertybuffersize: u32, eventmetadatapropertybuffer: Option<*mut EVT_VARIANT>, eventmetadatapropertybufferused: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(propertyid), core::mem::transmute(flags), core::mem::transmute(eventmetadatapropertybuffersize), core::mem::transmute(eventmetadatapropertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(eventmetadatapropertybufferused)).ok() + EvtGetEventMetadataProperty(core::mem::transmute(eventmetadata), core::mem::transmute(propertyid), core::mem::transmute(flags), core::mem::transmute(eventmetadatapropertybuffersize), core::mem::transmute(eventmetadatapropertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventmetadatapropertybufferused)).ok() } #[inline] pub unsafe fn EvtGetExtendedStatus(buffer: Option<&mut [u16]>, bufferused: *mut u32) -> u32 { @@ -155,18 +134,15 @@ pub unsafe fn EvtGetExtendedStatus(buffer: Option<&mut [u16]>, bufferused: *mut } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EvtGetLogInfo(log: P0, propertyid: EVT_LOG_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtGetLogInfo(log: EVT_HANDLE, propertyid: EVT_LOG_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(propertyid), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertyvaluebufferused)).ok() + EvtGetLogInfo(core::mem::transmute(log), core::mem::transmute(propertyid), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(objectarray), core::mem::transmute(propertyid), core::mem::transmute(arrayindex), core::mem::transmute(flags), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertyvaluebufferused)).ok() + EvtGetObjectArrayProperty(core::mem::transmute(objectarray), core::mem::transmute(propertyid), core::mem::transmute(arrayindex), core::mem::transmute(flags), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } #[inline] pub unsafe fn EvtGetObjectArraySize(objectarray: isize, objectarraysize: *mut u32) -> windows_core::Result<()> { @@ -175,219 +151,154 @@ pub unsafe fn EvtGetObjectArraySize(objectarray: isize, objectarraysize: *mut u3 } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EvtGetPublisherMetadataProperty(publishermetadata: P0, propertyid: EVT_PUBLISHER_METADATA_PROPERTY_ID, flags: u32, publishermetadatapropertybuffersize: u32, publishermetadatapropertybuffer: Option<*mut EVT_VARIANT>, publishermetadatapropertybufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtGetPublisherMetadataProperty(publishermetadata: EVT_HANDLE, propertyid: EVT_PUBLISHER_METADATA_PROPERTY_ID, flags: u32, publishermetadatapropertybuffersize: u32, publishermetadatapropertybuffer: Option<*mut EVT_VARIANT>, publishermetadatapropertybufferused: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(propertyid), core::mem::transmute(flags), core::mem::transmute(publishermetadatapropertybuffersize), core::mem::transmute(publishermetadatapropertybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(publishermetadatapropertybufferused)).ok() + EvtGetPublisherMetadataProperty(core::mem::transmute(publishermetadata), core::mem::transmute(propertyid), core::mem::transmute(flags), core::mem::transmute(publishermetadatapropertybuffersize), core::mem::transmute(publishermetadatapropertybuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(publishermetadatapropertybufferused)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EvtGetQueryInfo(queryorsubscription: P0, propertyid: EVT_QUERY_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtGetQueryInfo(queryorsubscription: EVT_HANDLE, propertyid: EVT_QUERY_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(propertyid), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertyvaluebufferused)).ok() + EvtGetQueryInfo(core::mem::transmute(queryorsubscription), core::mem::transmute(propertyid), core::mem::transmute(propertyvaluebuffersize), core::mem::transmute(propertyvaluebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(propertyvaluebufferused)).ok() } #[inline] -pub unsafe fn EvtNext(resultset: P0, events: &mut [isize], timeout: u32, flags: u32, returned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtNext(resultset: EVT_HANDLE, events: &mut [isize], timeout: u32, flags: u32, returned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtNext(resultset : EVT_HANDLE, eventssize : u32, events : *mut isize, timeout : u32, flags : u32, returned : *mut u32) -> super::super::Foundation:: BOOL); - EvtNext(resultset.param().abi(), events.len().try_into().unwrap(), core::mem::transmute(events.as_ptr()), core::mem::transmute(timeout), core::mem::transmute(flags), core::mem::transmute(returned)).ok() + EvtNext(core::mem::transmute(resultset), events.len().try_into().unwrap(), core::mem::transmute(events.as_ptr()), core::mem::transmute(timeout), core::mem::transmute(flags), core::mem::transmute(returned)).ok() } #[inline] -pub unsafe fn EvtNextChannelPath(channelenum: P0, channelpathbuffer: Option<&mut [u16]>, channelpathbufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtNextChannelPath(channelenum: EVT_HANDLE, channelpathbuffer: Option<&mut [u16]>, channelpathbufferused: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtNextChannelPath(channelenum : EVT_HANDLE, channelpathbuffersize : u32, channelpathbuffer : windows_core::PWSTR, channelpathbufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtNextChannelPath(channelenum.param().abi(), channelpathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(channelpathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(channelpathbufferused)).ok() + EvtNextChannelPath(core::mem::transmute(channelenum), channelpathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(channelpathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(channelpathbufferused)).ok() } #[inline] -pub unsafe fn EvtNextEventMetadata(eventmetadataenum: P0, flags: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn EvtNextEventMetadata(eventmetadataenum: EVT_HANDLE, flags: u32) -> windows_core::Result { windows_targets::link!("wevtapi.dll" "system" fn EvtNextEventMetadata(eventmetadataenum : EVT_HANDLE, flags : u32) -> EVT_HANDLE); - let result__ = EvtNextEventMetadata(eventmetadataenum.param().abi(), core::mem::transmute(flags)); + let result__ = EvtNextEventMetadata(core::mem::transmute(eventmetadataenum), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtNextPublisherId(publisherenum: P0, publisheridbuffer: Option<&mut [u16]>, publisheridbufferused: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtNextPublisherId(publisherenum: EVT_HANDLE, publisheridbuffer: Option<&mut [u16]>, publisheridbufferused: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtNextPublisherId(publisherenum : EVT_HANDLE, publisheridbuffersize : u32, publisheridbuffer : windows_core::PWSTR, publisheridbufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtNextPublisherId(publisherenum.param().abi(), publisheridbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(publisheridbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(publisheridbufferused)).ok() + EvtNextPublisherId(core::mem::transmute(publisherenum), publisheridbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(publisheridbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(publisheridbufferused)).ok() } #[inline] -pub unsafe fn EvtOpenChannelConfig(session: P0, channelpath: P1, flags: u32) -> windows_core::Result +pub unsafe fn EvtOpenChannelConfig(session: Option, channelpath: P1, flags: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wevtapi.dll" "system" fn EvtOpenChannelConfig(session : EVT_HANDLE, channelpath : windows_core::PCWSTR, flags : u32) -> EVT_HANDLE); - let result__ = EvtOpenChannelConfig(session.param().abi(), channelpath.param().abi(), core::mem::transmute(flags)); + let result__ = EvtOpenChannelConfig(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), channelpath.param().abi(), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtOpenChannelEnum(session: P0, flags: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn EvtOpenChannelEnum(session: Option, flags: u32) -> windows_core::Result { windows_targets::link!("wevtapi.dll" "system" fn EvtOpenChannelEnum(session : EVT_HANDLE, flags : u32) -> EVT_HANDLE); - let result__ = EvtOpenChannelEnum(session.param().abi(), core::mem::transmute(flags)); + let result__ = EvtOpenChannelEnum(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtOpenEventMetadataEnum(publishermetadata: P0, flags: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn EvtOpenEventMetadataEnum(publishermetadata: EVT_HANDLE, flags: u32) -> windows_core::Result { windows_targets::link!("wevtapi.dll" "system" fn EvtOpenEventMetadataEnum(publishermetadata : EVT_HANDLE, flags : u32) -> EVT_HANDLE); - let result__ = EvtOpenEventMetadataEnum(publishermetadata.param().abi(), core::mem::transmute(flags)); + let result__ = EvtOpenEventMetadataEnum(core::mem::transmute(publishermetadata), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtOpenLog(session: P0, path: P1, flags: u32) -> windows_core::Result +pub unsafe fn EvtOpenLog(session: Option, path: P1, flags: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("wevtapi.dll" "system" fn EvtOpenLog(session : EVT_HANDLE, path : windows_core::PCWSTR, flags : u32) -> EVT_HANDLE); - let result__ = EvtOpenLog(session.param().abi(), path.param().abi(), core::mem::transmute(flags)); + let result__ = EvtOpenLog(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), path.param().abi(), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtOpenPublisherEnum(session: P0, flags: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn EvtOpenPublisherEnum(session: Option, flags: u32) -> windows_core::Result { windows_targets::link!("wevtapi.dll" "system" fn EvtOpenPublisherEnum(session : EVT_HANDLE, flags : u32) -> EVT_HANDLE); - let result__ = EvtOpenPublisherEnum(session.param().abi(), core::mem::transmute(flags)); + let result__ = EvtOpenPublisherEnum(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtOpenPublisherMetadata(session: P0, publisherid: P1, logfilepath: P2, locale: u32, flags: u32) -> windows_core::Result +pub unsafe fn EvtOpenPublisherMetadata(session: Option, publisherid: P1, logfilepath: P2, locale: u32, flags: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wevtapi.dll" "system" fn EvtOpenPublisherMetadata(session : EVT_HANDLE, publisherid : windows_core::PCWSTR, logfilepath : windows_core::PCWSTR, locale : u32, flags : u32) -> EVT_HANDLE); - let result__ = EvtOpenPublisherMetadata(session.param().abi(), publisherid.param().abi(), logfilepath.param().abi(), core::mem::transmute(locale), core::mem::transmute(flags)); + let result__ = EvtOpenPublisherMetadata(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), publisherid.param().abi(), logfilepath.param().abi(), core::mem::transmute(locale), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtOpenSession(loginclass: EVT_LOGIN_CLASS, login: *const core::ffi::c_void, timeout: u32, flags: u32) -> windows_core::Result { +pub unsafe fn EvtOpenSession(loginclass: EVT_LOGIN_CLASS, login: *const core::ffi::c_void, timeout: Option, flags: Option) -> windows_core::Result { windows_targets::link!("wevtapi.dll" "system" fn EvtOpenSession(loginclass : EVT_LOGIN_CLASS, login : *const core::ffi::c_void, timeout : u32, flags : u32) -> EVT_HANDLE); - let result__ = EvtOpenSession(core::mem::transmute(loginclass), core::mem::transmute(login), core::mem::transmute(timeout), core::mem::transmute(flags)); + let result__ = EvtOpenSession(core::mem::transmute(loginclass), core::mem::transmute(login), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtQuery(session: P0, path: P1, query: P2, flags: u32) -> windows_core::Result +pub unsafe fn EvtQuery(session: Option, path: P1, query: P2, flags: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wevtapi.dll" "system" fn EvtQuery(session : EVT_HANDLE, path : windows_core::PCWSTR, query : windows_core::PCWSTR, flags : u32) -> EVT_HANDLE); - let result__ = EvtQuery(session.param().abi(), path.param().abi(), query.param().abi(), core::mem::transmute(flags)); + let result__ = EvtQuery(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), path.param().abi(), query.param().abi(), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtRender(context: P0, fragment: P1, flags: u32, buffersize: u32, buffer: Option<*mut core::ffi::c_void>, bufferused: *mut u32, propertycount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EvtRender(context: Option, fragment: EVT_HANDLE, flags: u32, buffersize: u32, buffer: Option<*mut core::ffi::c_void>, bufferused: *mut u32, propertycount: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(flags), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferused), core::mem::transmute(propertycount)).ok() + EvtRender(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(fragment), core::mem::transmute(flags), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferused), core::mem::transmute(propertycount)).ok() } #[inline] -pub unsafe fn EvtSaveChannelConfig(channelconfig: P0, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtSaveChannelConfig(channelconfig: EVT_HANDLE, flags: u32) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtSaveChannelConfig(channelconfig : EVT_HANDLE, flags : u32) -> super::super::Foundation:: BOOL); - EvtSaveChannelConfig(channelconfig.param().abi(), core::mem::transmute(flags)).ok() + EvtSaveChannelConfig(core::mem::transmute(channelconfig), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn EvtSeek(resultset: P0, position: i64, bookmark: P2, timeout: u32, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EvtSeek(resultset: EVT_HANDLE, position: i64, bookmark: Option, timeout: Option, flags: u32) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtSeek(resultset : EVT_HANDLE, position : i64, bookmark : EVT_HANDLE, timeout : u32, flags : u32) -> super::super::Foundation:: BOOL); - EvtSeek(resultset.param().abi(), core::mem::transmute(position), bookmark.param().abi(), core::mem::transmute(timeout), core::mem::transmute(flags)).ok() + EvtSeek(core::mem::transmute(resultset), core::mem::transmute(position), core::mem::transmute(bookmark.unwrap_or(core::mem::zeroed())), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EvtSetChannelConfigProperty(channelconfig: P0, propertyid: EVT_CHANNEL_CONFIG_PROPERTY_ID, flags: u32, propertyvalue: *const EVT_VARIANT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EvtSetChannelConfigProperty(channelconfig: EVT_HANDLE, propertyid: EVT_CHANNEL_CONFIG_PROPERTY_ID, flags: u32, propertyvalue: *const EVT_VARIANT) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtSetChannelConfigProperty(channelconfig : EVT_HANDLE, propertyid : EVT_CHANNEL_CONFIG_PROPERTY_ID, flags : u32, propertyvalue : *const EVT_VARIANT) -> super::super::Foundation:: BOOL); - EvtSetChannelConfigProperty(channelconfig.param().abi(), core::mem::transmute(propertyid), core::mem::transmute(flags), core::mem::transmute(propertyvalue)).ok() + EvtSetChannelConfigProperty(core::mem::transmute(channelconfig), core::mem::transmute(propertyid), core::mem::transmute(flags), core::mem::transmute(propertyvalue)).ok() } #[inline] -pub unsafe fn EvtSubscribe(session: P0, signalevent: P1, channelpath: P2, query: P3, bookmark: P4, context: Option<*const core::ffi::c_void>, callback: EVT_SUBSCRIBE_CALLBACK, flags: u32) -> windows_core::Result +pub unsafe fn EvtSubscribe(session: Option, signalevent: Option, channelpath: P2, query: P3, bookmark: Option, context: Option<*const core::ffi::c_void>, callback: Option, flags: u32) -> windows_core::Result where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - 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(core::ptr::null())), core::mem::transmute(callback), core::mem::transmute(flags)); + let result__ = EvtSubscribe(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), core::mem::transmute(signalevent.unwrap_or(core::mem::zeroed())), channelpath.param().abi(), query.param().abi(), core::mem::transmute(bookmark.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn EvtUpdateBookmark(bookmark: P0, event: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn EvtUpdateBookmark(bookmark: EVT_HANDLE, event: EVT_HANDLE) -> windows_core::Result<()> { windows_targets::link!("wevtapi.dll" "system" fn EvtUpdateBookmark(bookmark : EVT_HANDLE, event : EVT_HANDLE) -> super::super::Foundation:: BOOL); - EvtUpdateBookmark(bookmark.param().abi(), event.param().abi()).ok() + EvtUpdateBookmark(core::mem::transmute(bookmark), core::mem::transmute(event)).ok() } #[inline] -pub unsafe fn GetEventLogInformation(heventlog: P0, dwinfolevel: u32, lpbuffer: *mut core::ffi::c_void, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetEventLogInformation(heventlog: super::super::Foundation::HANDLE, dwinfolevel: u32, lpbuffer: *mut core::ffi::c_void, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetEventLogInformation(heventlog : super::super::Foundation:: HANDLE, dwinfolevel : u32, lpbuffer : *mut core::ffi::c_void, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetEventLogInformation(heventlog.param().abi(), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() + GetEventLogInformation(core::mem::transmute(heventlog), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() } #[inline] -pub unsafe fn GetNumberOfEventLogRecords(heventlog: P0, numberofrecords: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNumberOfEventLogRecords(heventlog: super::super::Foundation::HANDLE, numberofrecords: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetNumberOfEventLogRecords(heventlog : super::super::Foundation:: HANDLE, numberofrecords : *mut u32) -> super::super::Foundation:: BOOL); - GetNumberOfEventLogRecords(heventlog.param().abi(), core::mem::transmute(numberofrecords)).ok() + GetNumberOfEventLogRecords(core::mem::transmute(heventlog), core::mem::transmute(numberofrecords)).ok() } #[inline] -pub unsafe fn GetOldestEventLogRecord(heventlog: P0, oldestrecord: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetOldestEventLogRecord(heventlog: super::super::Foundation::HANDLE, oldestrecord: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetOldestEventLogRecord(heventlog : super::super::Foundation:: HANDLE, oldestrecord : *mut u32) -> super::super::Foundation:: BOOL); - GetOldestEventLogRecord(heventlog.param().abi(), core::mem::transmute(oldestrecord)).ok() + GetOldestEventLogRecord(core::mem::transmute(heventlog), core::mem::transmute(oldestrecord)).ok() } #[inline] -pub unsafe fn NotifyChangeEventLog(heventlog: P0, hevent: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn NotifyChangeEventLog(heventlog: super::super::Foundation::HANDLE, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn NotifyChangeEventLog(heventlog : super::super::Foundation:: HANDLE, hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - NotifyChangeEventLog(heventlog.param().abi(), hevent.param().abi()).ok() + NotifyChangeEventLog(core::mem::transmute(heventlog), core::mem::transmute(hevent)).ok() } #[inline] pub unsafe fn OpenBackupEventLogA(lpuncservername: P0, lpfilename: P1) -> windows_core::Result @@ -430,20 +341,14 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn ReadEventLogA(heventlog: P0, dwreadflags: READ_EVENT_LOG_READ_FLAGS, dwrecordoffset: u32, lpbuffer: *mut core::ffi::c_void, nnumberofbytestoread: u32, pnbytesread: *mut u32, pnminnumberofbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadEventLogA(heventlog: super::super::Foundation::HANDLE, dwreadflags: READ_EVENT_LOG_READ_FLAGS, dwrecordoffset: u32, lpbuffer: *mut core::ffi::c_void, nnumberofbytestoread: u32, pnbytesread: *mut u32, pnminnumberofbytesneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ReadEventLogA(heventlog : super::super::Foundation:: HANDLE, dwreadflags : READ_EVENT_LOG_READ_FLAGS, dwrecordoffset : u32, lpbuffer : *mut core::ffi::c_void, nnumberofbytestoread : u32, pnbytesread : *mut u32, pnminnumberofbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - ReadEventLogA(heventlog.param().abi(), core::mem::transmute(dwreadflags), core::mem::transmute(dwrecordoffset), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytestoread), core::mem::transmute(pnbytesread), core::mem::transmute(pnminnumberofbytesneeded)).ok() + ReadEventLogA(core::mem::transmute(heventlog), core::mem::transmute(dwreadflags), core::mem::transmute(dwrecordoffset), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytestoread), core::mem::transmute(pnbytesread), core::mem::transmute(pnminnumberofbytesneeded)).ok() } #[inline] -pub unsafe fn ReadEventLogW(heventlog: P0, dwreadflags: READ_EVENT_LOG_READ_FLAGS, dwrecordoffset: u32, lpbuffer: *mut core::ffi::c_void, nnumberofbytestoread: u32, pnbytesread: *mut u32, pnminnumberofbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReadEventLogW(heventlog: super::super::Foundation::HANDLE, dwreadflags: READ_EVENT_LOG_READ_FLAGS, dwrecordoffset: u32, lpbuffer: *mut core::ffi::c_void, nnumberofbytestoread: u32, pnbytesread: *mut u32, pnminnumberofbytesneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ReadEventLogW(heventlog : super::super::Foundation:: HANDLE, dwreadflags : READ_EVENT_LOG_READ_FLAGS, dwrecordoffset : u32, lpbuffer : *mut core::ffi::c_void, nnumberofbytestoread : u32, pnbytesread : *mut u32, pnminnumberofbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - ReadEventLogW(heventlog.param().abi(), core::mem::transmute(dwreadflags), core::mem::transmute(dwrecordoffset), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytestoread), core::mem::transmute(pnbytesread), core::mem::transmute(pnminnumberofbytesneeded)).ok() + ReadEventLogW(core::mem::transmute(heventlog), core::mem::transmute(dwreadflags), core::mem::transmute(dwrecordoffset), core::mem::transmute(lpbuffer), core::mem::transmute(nnumberofbytestoread), core::mem::transmute(pnbytesread), core::mem::transmute(pnminnumberofbytesneeded)).ok() } #[inline] pub unsafe fn RegisterEventSourceA(lpuncservername: P0, lpsourcename: P1) -> windows_core::Result @@ -467,23 +372,15 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ReportEventA(heventlog: P0, wtype: REPORT_EVENT_TYPE, wcategory: u16, dweventid: u32, lpusersid: P4, dwdatasize: u32, lpstrings: Option<&[windows_core::PCSTR]>, lprawdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn ReportEventA(heventlog: super::super::Foundation::HANDLE, wtype: REPORT_EVENT_TYPE, wcategory: u16, dweventid: u32, lpusersid: Option, dwdatasize: u32, lpstrings: Option<&[windows_core::PCSTR]>, lprawdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(wtype), core::mem::transmute(wcategory), core::mem::transmute(dweventid), lpusersid.param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(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() + ReportEventA(core::mem::transmute(heventlog), core::mem::transmute(wtype), core::mem::transmute(wcategory), core::mem::transmute(dweventid), core::mem::transmute(lpusersid.unwrap_or(core::mem::zeroed())), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwdatasize), core::mem::transmute(lpstrings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lprawdata.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ReportEventW(heventlog: P0, wtype: REPORT_EVENT_TYPE, wcategory: u16, dweventid: u32, lpusersid: P4, dwdatasize: u32, lpstrings: Option<&[windows_core::PCWSTR]>, lprawdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn ReportEventW(heventlog: super::super::Foundation::HANDLE, wtype: REPORT_EVENT_TYPE, wcategory: u16, dweventid: u32, lpusersid: Option, dwdatasize: u32, lpstrings: Option<&[windows_core::PCWSTR]>, lprawdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(wtype), core::mem::transmute(wcategory), core::mem::transmute(dweventid), lpusersid.param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(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() + ReportEventW(core::mem::transmute(heventlog), core::mem::transmute(wtype), core::mem::transmute(wcategory), core::mem::transmute(dweventid), core::mem::transmute(lpusersid.unwrap_or(core::mem::zeroed())), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwdatasize), core::mem::transmute(lpstrings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lprawdata.unwrap_or(core::mem::zeroed()))).ok() } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 bda6dff20b..4166a716b8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs @@ -77,45 +77,41 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn GetAppliedGPOListA(dwflags: u32, pmachinename: P1, psiduser: P2, pguidextension: *const windows_core::GUID, ppgpolist: *mut *mut GROUP_POLICY_OBJECTA) -> u32 +pub unsafe fn GetAppliedGPOListA(dwflags: u32, pmachinename: P1, psiduser: Option, pguidextension: *const windows_core::GUID, ppgpolist: *mut *mut GROUP_POLICY_OBJECTA) -> u32 where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn GetAppliedGPOListA(dwflags : u32, pmachinename : windows_core::PCSTR, psiduser : super::super::Security:: PSID, pguidextension : *const windows_core::GUID, ppgpolist : *mut *mut GROUP_POLICY_OBJECTA) -> u32); - GetAppliedGPOListA(core::mem::transmute(dwflags), pmachinename.param().abi(), psiduser.param().abi(), core::mem::transmute(pguidextension), core::mem::transmute(ppgpolist)) + GetAppliedGPOListA(core::mem::transmute(dwflags), pmachinename.param().abi(), core::mem::transmute(psiduser.unwrap_or(core::mem::zeroed())), core::mem::transmute(pguidextension), core::mem::transmute(ppgpolist)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn GetAppliedGPOListW(dwflags: u32, pmachinename: P1, psiduser: P2, pguidextension: *const windows_core::GUID, ppgpolist: *mut *mut GROUP_POLICY_OBJECTW) -> u32 +pub unsafe fn GetAppliedGPOListW(dwflags: u32, pmachinename: P1, psiduser: Option, pguidextension: *const windows_core::GUID, ppgpolist: *mut *mut GROUP_POLICY_OBJECTW) -> u32 where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn GetAppliedGPOListW(dwflags : u32, pmachinename : windows_core::PCWSTR, psiduser : super::super::Security:: PSID, pguidextension : *const windows_core::GUID, ppgpolist : *mut *mut GROUP_POLICY_OBJECTW) -> u32); - GetAppliedGPOListW(core::mem::transmute(dwflags), pmachinename.param().abi(), psiduser.param().abi(), core::mem::transmute(pguidextension), core::mem::transmute(ppgpolist)) + GetAppliedGPOListW(core::mem::transmute(dwflags), pmachinename.param().abi(), core::mem::transmute(psiduser.unwrap_or(core::mem::zeroed())), core::mem::transmute(pguidextension), core::mem::transmute(ppgpolist)) } #[inline] -pub unsafe fn GetGPOListA(htoken: P0, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTA) -> windows_core::Result<()> +pub unsafe fn GetGPOListA(htoken: Option, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTA) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn GetGPOListA(htoken : super::super::Foundation:: HANDLE, lpname : windows_core::PCSTR, lphostname : windows_core::PCSTR, lpcomputername : windows_core::PCSTR, dwflags : u32, pgpolist : *mut *mut GROUP_POLICY_OBJECTA) -> super::super::Foundation:: BOOL); - GetGPOListA(htoken.param().abi(), lpname.param().abi(), lphostname.param().abi(), lpcomputername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pgpolist)).ok() + GetGPOListA(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), lpname.param().abi(), lphostname.param().abi(), lpcomputername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pgpolist)).ok() } #[inline] -pub unsafe fn GetGPOListW(htoken: P0, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTW) -> windows_core::Result<()> +pub unsafe fn GetGPOListW(htoken: Option, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTW) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn GetGPOListW(htoken : super::super::Foundation:: HANDLE, lpname : windows_core::PCWSTR, lphostname : windows_core::PCWSTR, lpcomputername : windows_core::PCWSTR, dwflags : u32, pgpolist : *mut *mut GROUP_POLICY_OBJECTW) -> super::super::Foundation:: BOOL); - GetGPOListW(htoken.param().abi(), lpname.param().abi(), lphostname.param().abi(), lpcomputername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pgpolist)).ok() + GetGPOListW(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), lpname.param().abi(), lphostname.param().abi(), lpcomputername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pgpolist)).ok() } #[inline] pub unsafe fn GetLocalManagedApplicationData(productcode: P0, displayname: *mut windows_core::PWSTR, supporturl: *mut windows_core::PWSTR) @@ -135,9 +131,9 @@ where } #[cfg(feature = "Win32_UI_Shell")] #[inline] -pub unsafe fn GetManagedApplicationCategories(dwreserved: u32, pappcategory: *mut super::super::UI::Shell::APPCATEGORYINFOLIST) -> u32 { +pub unsafe fn GetManagedApplicationCategories(dwreserved: Option, pappcategory: *mut super::super::UI::Shell::APPCATEGORYINFOLIST) -> u32 { windows_targets::link!("advapi32.dll" "system" fn GetManagedApplicationCategories(dwreserved : u32, pappcategory : *mut super::super::UI::Shell:: APPCATEGORYINFOLIST) -> u32); - GetManagedApplicationCategories(core::mem::transmute(dwreserved), core::mem::transmute(pappcategory)) + GetManagedApplicationCategories(core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pappcategory)) } #[inline] pub unsafe fn GetManagedApplications(pcategory: *const windows_core::GUID, dwqueryflags: u32, dwinfolevel: u32, pdwapps: *mut u32, prgmanagedapps: *mut *mut MANAGEDAPPLICATION) -> u32 { @@ -159,12 +155,9 @@ pub unsafe fn InstallApplication(pinstallinfo: *const INSTALLDATA) -> u32 { InstallApplication(core::mem::transmute(pinstallinfo)) } #[inline] -pub unsafe fn LeaveCriticalPolicySection(hsection: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LeaveCriticalPolicySection(hsection: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn LeaveCriticalPolicySection(hsection : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - LeaveCriticalPolicySection(hsection.param().abi()).ok() + LeaveCriticalPolicySection(core::mem::transmute(hsection)).ok() } #[inline] pub unsafe fn ProcessGroupPolicyCompleted(extensionid: *const windows_core::GUID, pasynchandle: usize, dwstatus: u32) -> u32 { @@ -193,32 +186,27 @@ where RefreshPolicyEx(bmachine.param().abi(), core::mem::transmute(dwoptions)).ok() } #[inline] -pub unsafe fn RegisterGPNotification(hevent: P0, bmachine: P1) -> windows_core::Result<()> +pub unsafe fn RegisterGPNotification(hevent: super::super::Foundation::HANDLE, bmachine: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn RegisterGPNotification(hevent : super::super::Foundation:: HANDLE, bmachine : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterGPNotification(hevent.param().abi(), bmachine.param().abi()).ok() + RegisterGPNotification(core::mem::transmute(hevent), bmachine.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RsopAccessCheckByType(psecuritydescriptor: P0, pprincipalselfsid: P1, prsoptoken: *const core::ffi::c_void, dwdesiredaccessmask: u32, pobjecttypelist: Option<&[super::super::Security::OBJECT_TYPE_LIST]>, pgenericmapping: *const super::super::Security::GENERIC_MAPPING, pprivilegeset: Option<*const super::super::Security::PRIVILEGE_SET>, pdwprivilegesetlength: Option<*const u32>, pdwgrantedaccessmask: *mut u32, pbaccessstatus: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RsopAccessCheckByType(psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, pprincipalselfsid: Option, prsoptoken: *const core::ffi::c_void, dwdesiredaccessmask: u32, pobjecttypelist: Option<&[super::super::Security::OBJECT_TYPE_LIST]>, pgenericmapping: *const super::super::Security::GENERIC_MAPPING, pprivilegeset: Option<*const super::super::Security::PRIVILEGE_SET>, pdwprivilegesetlength: Option<*const u32>, pdwgrantedaccessmask: *mut u32, pbaccessstatus: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { 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(), + core::mem::transmute(psecuritydescriptor), + core::mem::transmute(pprincipalselfsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(prsoptoken), core::mem::transmute(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()), core::mem::transmute(pgenericmapping), - core::mem::transmute(pprivilegeset.unwrap_or(core::ptr::null())), - core::mem::transmute(pdwprivilegesetlength.unwrap_or(core::ptr::null())), + core::mem::transmute(pprivilegeset.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pdwprivilegesetlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwgrantedaccessmask), core::mem::transmute(pbaccessstatus), ) @@ -261,12 +249,9 @@ where UninstallApplication(productcode.param().abi(), core::mem::transmute(dwstatus)) } #[inline] -pub unsafe fn UnregisterGPNotification(hevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterGPNotification(hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn UnregisterGPNotification(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - UnregisterGPNotification(hevent.param().abi()).ok() + UnregisterGPNotification(core::mem::transmute(hevent)).ok() } pub const ABSENT: APPSTATE = APPSTATE(0i32); pub const ADMXCOMMENTS_EXTENSION_GUID: windows_core::GUID = windows_core::GUID::from_u128(0x6c5a2a86_9eb3_42b9_aa83_a7371ba011b9); @@ -698,12 +683,9 @@ impl IGPM { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetRSOP)(windows_core::Interface::as_raw(self), core::mem::transmute(gpmrsopmode), core::mem::transmute_copy(bstrnamespace), core::mem::transmute(lflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreatePermission(&self, bstrtrustee: &windows_core::BSTR, perm: GPMPermissionType, binheritable: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn CreatePermission(&self, bstrtrustee: &windows_core::BSTR, perm: GPMPermissionType, binheritable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePermission)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrtrustee), core::mem::transmute(perm), binheritable.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePermission)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrtrustee), core::mem::transmute(perm), core::mem::transmute(binheritable), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateSearchCriteria(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1902,15 +1884,9 @@ impl IGPMConstants { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SOMOU)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn get_SecurityFlags(&self, vbowner: P0, vbgroup: P1, vbdacl: P2, vbsacl: P3) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { + pub unsafe fn get_SecurityFlags(&self, vbowner: super::super::Foundation::VARIANT_BOOL, vbgroup: super::super::Foundation::VARIANT_BOOL, vbdacl: super::super::Foundation::VARIANT_BOOL, vbsacl: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).get_SecurityFlags)(windows_core::Interface::as_raw(self), vbowner.param().abi(), vbgroup.param().abi(), vbdacl.param().abi(), vbsacl.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).get_SecurityFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(vbowner), core::mem::transmute(vbgroup), core::mem::transmute(vbdacl), core::mem::transmute(vbsacl), &mut result__).map(|| result__) } pub unsafe fn DoNotValidateDC(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2000,12 +1976,9 @@ impl IGPMConstants { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RsopPlanningAssumeSlowLink)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn get_RsopPlanningLoopbackOption(&self, vbmerge: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn get_RsopPlanningLoopbackOption(&self, vbmerge: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).get_RsopPlanningLoopbackOption)(windows_core::Interface::as_raw(self), vbmerge.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).get_RsopPlanningLoopbackOption)(windows_core::Interface::as_raw(self), core::mem::transmute(vbmerge), &mut result__).map(|| result__) } pub unsafe fn RsopPlanningAssumeUserWQLFilterTrue(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3364,12 +3337,9 @@ impl IGPMDomain2 { (windows_core::Interface::vtable(self).SearchStarterGPOs)(windows_core::Interface::as_raw(self), pigpmsearchcriteria.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn LoadStarterGPO(&self, bstrloadfile: &windows_core::BSTR, boverwrite: P1, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn LoadStarterGPO(&self, bstrloadfile: &windows_core::BSTR, boverwrite: super::super::Foundation::VARIANT_BOOL, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).LoadStarterGPO)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrloadfile), boverwrite.param().abi(), core::mem::transmute(pvargpmprogress), core::mem::transmute(pvargpmcancel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).LoadStarterGPO)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrloadfile), core::mem::transmute(boverwrite), core::mem::transmute(pvargpmprogress), core::mem::transmute(pvargpmcancel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn RestoreStarterGPO(&self, pigpmtmplbackup: P0, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result @@ -3644,17 +3614,11 @@ impl IGPMGPO { { (windows_core::Interface::vtable(self).SetWMIFilter)(windows_core::Interface::as_raw(self), pigpmwmifilter.param().abi()).ok() } - pub unsafe fn SetUserEnabled(&self, vbenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUserEnabled)(windows_core::Interface::as_raw(self), vbenabled.param().abi()).ok() + pub unsafe fn SetUserEnabled(&self, vbenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUserEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(vbenabled)).ok() } - pub unsafe fn SetComputerEnabled(&self, vbenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetComputerEnabled)(windows_core::Interface::as_raw(self), vbenabled.param().abi()).ok() + pub unsafe fn SetComputerEnabled(&self, vbenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetComputerEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(vbenabled)).ok() } pub unsafe fn IsUserEnabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4340,21 +4304,15 @@ impl IGPMGPOLink { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetEnabled(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn Enforced(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enforced)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnforced(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnforced)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetEnforced(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnforced)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn SOMLinkOrder(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5719,11 +5677,8 @@ impl IGPMSOM { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GPOInheritanceBlocked)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetGPOInheritanceBlocked(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGPOInheritanceBlocked)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetGPOInheritanceBlocked(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGPOInheritanceBlocked)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn Name(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6362,13 +6317,9 @@ impl IGPMStarterGPO { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn Save(&self, bstrsavefile: &windows_core::BSTR, boverwrite: P1, bsaveassystem: P2, bstrlanguage: *const super::Variant::VARIANT, bstrauthor: *const super::Variant::VARIANT, bstrproduct: *const super::Variant::VARIANT, bstruniqueid: *const super::Variant::VARIANT, bstrversion: *const super::Variant::VARIANT, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result - where - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn Save(&self, bstrsavefile: &windows_core::BSTR, boverwrite: super::super::Foundation::VARIANT_BOOL, bsaveassystem: super::super::Foundation::VARIANT_BOOL, bstrlanguage: *const super::Variant::VARIANT, bstrauthor: *const super::Variant::VARIANT, bstrproduct: *const super::Variant::VARIANT, bstruniqueid: *const super::Variant::VARIANT, bstrversion: *const super::Variant::VARIANT, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrsavefile), boverwrite.param().abi(), bsaveassystem.param().abi(), core::mem::transmute(bstrlanguage), core::mem::transmute(bstrauthor), core::mem::transmute(bstrproduct), core::mem::transmute(bstruniqueid), core::mem::transmute(bstrversion), core::mem::transmute(pvargpmprogress), core::mem::transmute(pvargpmcancel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrsavefile), core::mem::transmute(boverwrite), core::mem::transmute(bsaveassystem), core::mem::transmute(bstrlanguage), core::mem::transmute(bstrauthor), core::mem::transmute(bstrproduct), core::mem::transmute(bstruniqueid), core::mem::transmute(bstrversion), core::mem::transmute(pvargpmprogress), core::mem::transmute(pvargpmcancel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Backup(&self, bstrbackupdir: &windows_core::BSTR, bstrcomment: &windows_core::BSTR, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> 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 3ce9c58222..e04e518504 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 P2: 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(core::mem::transmute(network), core::mem::transmute(id), settings.param().abi(), core::mem::transmute(endpoint), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnCreateEndpoint(core::mem::transmute(network), core::mem::transmute(id), settings.param().abi(), core::mem::transmute(endpoint), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnCreateGuestNetworkService(id: *const windows_core::GUID, settings: P1, guestnetworkservice: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -37,7 +37,7 @@ where P1: 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(core::mem::transmute(id), settings.param().abi(), core::mem::transmute(guestnetworkservice), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnCreateGuestNetworkService(core::mem::transmute(id), settings.param().abi(), core::mem::transmute(guestnetworkservice), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnCreateLoadBalancer(id: *const windows_core::GUID, settings: P1, loadbalancer: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -45,7 +45,7 @@ where P1: 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(core::mem::transmute(id), settings.param().abi(), core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnCreateLoadBalancer(core::mem::transmute(id), settings.param().abi(), core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnCreateNamespace(id: *const windows_core::GUID, settings: P1, namespace: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -53,7 +53,7 @@ where P1: 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(core::mem::transmute(id), settings.param().abi(), core::mem::transmute(namespace), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnCreateNamespace(core::mem::transmute(id), settings.param().abi(), core::mem::transmute(namespace), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnCreateNetwork(id: *const windows_core::GUID, settings: P1, network: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -61,32 +61,32 @@ where P1: 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(core::mem::transmute(id), settings.param().abi(), core::mem::transmute(network), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnCreateNetwork(core::mem::transmute(id), settings.param().abi(), core::mem::transmute(network), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnDeleteEndpoint(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnDeleteGuestNetworkService(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnDeleteLoadBalancer(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnDeleteNamespace(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnDeleteNetwork(core::mem::transmute(id), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(endpoints), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnEnumerateEndpoints(query.param().abi(), core::mem::transmute(endpoints), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnEnumerateLoadBalancers(query.param().abi(), core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(namespaces), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnEnumerateNamespaces(query.param().abi(), core::mem::transmute(namespaces), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(networks), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnEnumerateNetworks(query.param().abi(), core::mem::transmute(networks), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::ptr::null_mut()))) + HcnFreeGuestNetworkPortReservations(core::mem::transmute(portentries.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn HcnModifyEndpoint(endpoint: *const core::ffi::c_void, settings: P1, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -136,7 +136,7 @@ where P1: 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(core::mem::transmute(endpoint), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnModifyEndpoint(core::mem::transmute(endpoint), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnModifyGuestNetworkService(guestnetworkservice: *const core::ffi::c_void, settings: P1, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -144,7 +144,7 @@ where P1: 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(core::mem::transmute(guestnetworkservice), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnModifyGuestNetworkService(core::mem::transmute(guestnetworkservice), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnModifyLoadBalancer(loadbalancer: *const core::ffi::c_void, settings: P1, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -152,7 +152,7 @@ where P1: 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(core::mem::transmute(loadbalancer), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnModifyLoadBalancer(core::mem::transmute(loadbalancer), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnModifyNamespace(namespace: *const core::ffi::c_void, settings: P1, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -160,7 +160,7 @@ where P1: 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(core::mem::transmute(namespace), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnModifyNamespace(core::mem::transmute(namespace), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnModifyNetwork(network: *const core::ffi::c_void, settings: P1, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -168,27 +168,27 @@ where P1: 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(core::mem::transmute(network), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnModifyNetwork(core::mem::transmute(network), settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(endpoint), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnOpenEndpoint(core::mem::transmute(id), core::mem::transmute(endpoint), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnOpenLoadBalancer(core::mem::transmute(id), core::mem::transmute(loadbalancer), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(namespace), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnOpenNamespace(core::mem::transmute(id), core::mem::transmute(namespace), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(id), core::mem::transmute(network), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnOpenNetwork(core::mem::transmute(id), core::mem::transmute(network), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnQueryEndpointAddresses(endpoint: *const core::ffi::c_void, query: P1, addresses: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -196,7 +196,7 @@ where P1: 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(core::mem::transmute(endpoint), query.param().abi(), core::mem::transmute(addresses), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnQueryEndpointAddresses(core::mem::transmute(endpoint), query.param().abi(), core::mem::transmute(addresses), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnQueryEndpointProperties(endpoint: *const core::ffi::c_void, query: P1, properties: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -204,7 +204,7 @@ where P1: 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(core::mem::transmute(endpoint), query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnQueryEndpointProperties(core::mem::transmute(endpoint), query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnQueryEndpointStats(endpoint: *const core::ffi::c_void, query: P1, stats: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -212,7 +212,7 @@ where P1: 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(core::mem::transmute(endpoint), query.param().abi(), core::mem::transmute(stats), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnQueryEndpointStats(core::mem::transmute(endpoint), query.param().abi(), core::mem::transmute(stats), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnQueryLoadBalancerProperties(loadbalancer: *const core::ffi::c_void, query: P1, properties: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -220,7 +220,7 @@ where P1: 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(core::mem::transmute(loadbalancer), query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnQueryLoadBalancerProperties(core::mem::transmute(loadbalancer), query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnQueryNamespaceProperties(namespace: *const core::ffi::c_void, query: P1, properties: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -228,7 +228,7 @@ where P1: 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(core::mem::transmute(namespace), query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnQueryNamespaceProperties(core::mem::transmute(namespace), query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcnQueryNetworkProperties(network: *const core::ffi::c_void, query: P1, properties: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -236,7 +236,7 @@ where P1: 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(core::mem::transmute(network), query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() + HcnQueryNetworkProperties(core::mem::transmute(network), query.param().abi(), core::mem::transmute(properties), core::mem::transmute(errorrecord.unwrap_or(core::mem::zeroed()))).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<()> { @@ -249,12 +249,9 @@ pub unsafe fn HcnRegisterServiceCallback(callback: HCN_NOTIFICATION_CALLBACK, co HcnRegisterServiceCallback(core::mem::transmute(callback), core::mem::transmute(context), core::mem::transmute(callbackhandle)).ok() } #[inline] -pub unsafe fn HcnReleaseGuestNetworkServicePortReservationHandle(portreservationhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcnReleaseGuestNetworkServicePortReservationHandle(portreservationhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnReleaseGuestNetworkServicePortReservationHandle(portreservationhandle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - HcnReleaseGuestNetworkServicePortReservationHandle(portreservationhandle.param().abi()).ok() + HcnReleaseGuestNetworkServicePortReservationHandle(core::mem::transmute(portreservationhandle)).ok() } #[inline] pub unsafe fn HcnReserveGuestNetworkServicePort(guestnetworkservice: *const core::ffi::c_void, protocol: HCN_PORT_PROTOCOL, access: HCN_PORT_ACCESS, port: u16) -> 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 11a908a3cb..cba2daf6d4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs @@ -1,12 +1,10 @@ #[inline] -pub unsafe fn HcsAddResourceToOperation(operation: P0, r#type: HCS_RESOURCE_TYPE, uri: P2, handle: P3) -> windows_core::Result<()> +pub unsafe fn HcsAddResourceToOperation(operation: HCS_OPERATION, r#type: HCS_RESOURCE_TYPE, uri: P2, handle: super::super::Foundation::HANDLE) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsAddResourceToOperation(operation : HCS_OPERATION, r#type : HCS_RESOURCE_TYPE, uri : windows_core::PCWSTR, handle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - HcsAddResourceToOperation(operation.param().abi(), core::mem::transmute(r#type), uri.param().abi(), handle.param().abi()).ok() + HcsAddResourceToOperation(core::mem::transmute(operation), core::mem::transmute(r#type), uri.param().abi(), core::mem::transmute(handle)).ok() } #[inline] pub unsafe fn HcsAttachLayerStorageFilter(layerpath: P0, layerdata: P1) -> windows_core::Result<()> @@ -18,70 +16,54 @@ where HcsAttachLayerStorageFilter(layerpath.param().abi(), layerdata.param().abi()).ok() } #[inline] -pub unsafe fn HcsCancelOperation(operation: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsCancelOperation(operation: HCS_OPERATION) -> windows_core::Result<()> { windows_targets::link!("computecore.dll" "system" fn HcsCancelOperation(operation : HCS_OPERATION) -> windows_core::HRESULT); - HcsCancelOperation(operation.param().abi()).ok() + HcsCancelOperation(core::mem::transmute(operation)).ok() } #[inline] -pub unsafe fn HcsCloseComputeSystem(computesystem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn HcsCloseComputeSystem(computesystem: HCS_SYSTEM) { windows_targets::link!("computecore.dll" "system" fn HcsCloseComputeSystem(computesystem : HCS_SYSTEM)); - HcsCloseComputeSystem(computesystem.param().abi()) + HcsCloseComputeSystem(core::mem::transmute(computesystem)) } #[inline] -pub unsafe fn HcsCloseOperation(operation: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn HcsCloseOperation(operation: HCS_OPERATION) { windows_targets::link!("computecore.dll" "system" fn HcsCloseOperation(operation : HCS_OPERATION)); - HcsCloseOperation(operation.param().abi()) + HcsCloseOperation(core::mem::transmute(operation)) } #[inline] -pub unsafe fn HcsCloseProcess(process: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn HcsCloseProcess(process: HCS_PROCESS) { windows_targets::link!("computecore.dll" "system" fn HcsCloseProcess(process : HCS_PROCESS)); - HcsCloseProcess(process.param().abi()) + HcsCloseProcess(core::mem::transmute(process)) } #[inline] -pub unsafe fn HcsCrashComputeSystem(computesystem: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsCrashComputeSystem(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsCrashComputeSystem(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsCrashComputeSystem(computesystem.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsCrashComputeSystem(core::mem::transmute(computesystem), core::mem::transmute(operation), options.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn HcsCreateComputeSystem(id: P0, configuration: P1, operation: P2, securitydescriptor: Option<*const super::super::Security::SECURITY_DESCRIPTOR>) -> windows_core::Result +pub unsafe fn HcsCreateComputeSystem(id: P0, configuration: P1, operation: HCS_OPERATION, securitydescriptor: Option<*const super::super::Security::SECURITY_DESCRIPTOR>) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { 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(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + HcsCreateComputeSystem(id.param().abi(), configuration.param().abi(), core::mem::transmute(operation), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn HcsCreateComputeSystemInNamespace(idnamespace: P0, id: P1, configuration: P2, operation: P3, options: Option<*const HCS_CREATE_OPTIONS>) -> windows_core::Result +pub unsafe fn HcsCreateComputeSystemInNamespace(idnamespace: P0, id: P1, configuration: P2, operation: HCS_OPERATION, options: Option<*const HCS_CREATE_OPTIONS>) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { 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(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + HcsCreateComputeSystemInNamespace(idnamespace.param().abi(), id.param().abi(), configuration.param().abi(), core::mem::transmute(operation), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn HcsCreateEmptyGuestStateFile(gueststatefilepath: P0) -> windows_core::Result<()> @@ -100,26 +82,24 @@ where HcsCreateEmptyRuntimeStateFile(runtimestatefilepath.param().abi()).ok() } #[inline] -pub unsafe fn HcsCreateOperation(context: Option<*const core::ffi::c_void>, callback: HCS_OPERATION_COMPLETION) -> HCS_OPERATION { +pub unsafe fn HcsCreateOperation(context: Option<*const core::ffi::c_void>, callback: Option) -> 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(core::ptr::null())), core::mem::transmute(callback)) + HcsCreateOperation(core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(eventtypes), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(callback)) + HcsCreateOperationWithNotifications(core::mem::transmute(eventtypes), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn HcsCreateProcess(computesystem: P0, processparameters: P1, operation: P2, securitydescriptor: Option<*const super::super::Security::SECURITY_DESCRIPTOR>) -> windows_core::Result +pub unsafe fn HcsCreateProcess(computesystem: HCS_SYSTEM, processparameters: P1, operation: HCS_OPERATION, securitydescriptor: Option<*const super::super::Security::SECURITY_DESCRIPTOR>) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { 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(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + HcsCreateProcess(core::mem::transmute(computesystem), processparameters.param().abi(), core::mem::transmute(operation), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn HcsDestroyLayer(layerpath: P0) -> windows_core::Result<()> @@ -138,23 +118,21 @@ where HcsDetachLayerStorageFilter(layerpath.param().abi()).ok() } #[inline] -pub unsafe fn HcsEnumerateComputeSystems(query: P0, operation: P1) -> windows_core::Result<()> +pub unsafe fn HcsEnumerateComputeSystems(query: P0, operation: HCS_OPERATION) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsEnumerateComputeSystems(query : windows_core::PCWSTR, operation : HCS_OPERATION) -> windows_core::HRESULT); - HcsEnumerateComputeSystems(query.param().abi(), operation.param().abi()).ok() + HcsEnumerateComputeSystems(query.param().abi(), core::mem::transmute(operation)).ok() } #[inline] -pub unsafe fn HcsEnumerateComputeSystemsInNamespace(idnamespace: P0, query: P1, operation: P2) -> windows_core::Result<()> +pub unsafe fn HcsEnumerateComputeSystemsInNamespace(idnamespace: P0, query: P1, operation: HCS_OPERATION) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsEnumerateComputeSystemsInNamespace(idnamespace : windows_core::PCWSTR, query : windows_core::PCWSTR, operation : HCS_OPERATION) -> windows_core::HRESULT); - HcsEnumerateComputeSystemsInNamespace(idnamespace.param().abi(), query.param().abi(), operation.param().abi()).ok() + HcsEnumerateComputeSystemsInNamespace(idnamespace.param().abi(), query.param().abi(), core::mem::transmute(operation)).ok() } #[inline] pub unsafe fn HcsExportLayer(layerpath: P0, exportfolderpath: P1, layerdata: P2, options: P3) -> windows_core::Result<()> @@ -179,106 +157,71 @@ where HcsExportLegacyWritableLayer(writablelayermountpath.param().abi(), writablelayerfolderpath.param().abi(), exportfolderpath.param().abi(), layerdata.param().abi()).ok() } #[inline] -pub unsafe fn HcsFormatWritableLayerVhd(vhdhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsFormatWritableLayerVhd(vhdhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("computestorage.dll" "system" fn HcsFormatWritableLayerVhd(vhdhandle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - HcsFormatWritableLayerVhd(vhdhandle.param().abi()).ok() + HcsFormatWritableLayerVhd(core::mem::transmute(vhdhandle)).ok() } #[inline] -pub unsafe fn HcsGetComputeSystemFromOperation(operation: P0) -> HCS_SYSTEM -where - P0: windows_core::Param, -{ +pub unsafe fn HcsGetComputeSystemFromOperation(operation: HCS_OPERATION) -> HCS_SYSTEM { windows_targets::link!("computecore.dll" "system" fn HcsGetComputeSystemFromOperation(operation : HCS_OPERATION) -> HCS_SYSTEM); - HcsGetComputeSystemFromOperation(operation.param().abi()) + HcsGetComputeSystemFromOperation(core::mem::transmute(operation)) } #[inline] -pub unsafe fn HcsGetComputeSystemProperties(computesystem: P0, operation: P1, propertyquery: P2) -> windows_core::Result<()> +pub unsafe fn HcsGetComputeSystemProperties(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, propertyquery: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsGetComputeSystemProperties(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, propertyquery : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsGetComputeSystemProperties(computesystem.param().abi(), operation.param().abi(), propertyquery.param().abi()).ok() + HcsGetComputeSystemProperties(core::mem::transmute(computesystem), core::mem::transmute(operation), propertyquery.param().abi()).ok() } #[inline] -pub unsafe fn HcsGetLayerVhdMountPath(vhdhandle: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn HcsGetLayerVhdMountPath(vhdhandle: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("computestorage.dll" "system" fn HcsGetLayerVhdMountPath(vhdhandle : super::super::Foundation:: HANDLE, mountpath : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - HcsGetLayerVhdMountPath(vhdhandle.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + HcsGetLayerVhdMountPath(core::mem::transmute(vhdhandle), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn HcsGetOperationContext(operation: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn HcsGetOperationContext(operation: HCS_OPERATION) -> *mut core::ffi::c_void { windows_targets::link!("computecore.dll" "system" fn HcsGetOperationContext(operation : HCS_OPERATION) -> *mut core::ffi::c_void); - HcsGetOperationContext(operation.param().abi()) + HcsGetOperationContext(core::mem::transmute(operation)) } #[inline] -pub unsafe fn HcsGetOperationId(operation: P0) -> u64 -where - P0: windows_core::Param, -{ +pub unsafe fn HcsGetOperationId(operation: HCS_OPERATION) -> u64 { windows_targets::link!("computecore.dll" "system" fn HcsGetOperationId(operation : HCS_OPERATION) -> u64); - HcsGetOperationId(operation.param().abi()) + HcsGetOperationId(core::mem::transmute(operation)) } #[inline] -pub unsafe fn HcsGetOperationResult(operation: P0, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsGetOperationResult(operation: HCS_OPERATION, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + HcsGetOperationResult(core::mem::transmute(operation), core::mem::transmute(resultdocument.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn HcsGetOperationResultAndProcessInfo(operation: P0, processinformation: Option<*mut HCS_PROCESS_INFORMATION>, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsGetOperationResultAndProcessInfo(operation: HCS_OPERATION, processinformation: Option<*mut HCS_PROCESS_INFORMATION>, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(resultdocument.unwrap_or(core::ptr::null_mut()))).ok() + HcsGetOperationResultAndProcessInfo(core::mem::transmute(operation), core::mem::transmute(processinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultdocument.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn HcsGetOperationType(operation: P0) -> HCS_OPERATION_TYPE -where - P0: windows_core::Param, -{ +pub unsafe fn HcsGetOperationType(operation: HCS_OPERATION) -> HCS_OPERATION_TYPE { windows_targets::link!("computecore.dll" "system" fn HcsGetOperationType(operation : HCS_OPERATION) -> HCS_OPERATION_TYPE); - HcsGetOperationType(operation.param().abi()) + HcsGetOperationType(core::mem::transmute(operation)) } #[inline] -pub unsafe fn HcsGetProcessFromOperation(operation: P0) -> HCS_PROCESS -where - P0: windows_core::Param, -{ +pub unsafe fn HcsGetProcessFromOperation(operation: HCS_OPERATION) -> HCS_PROCESS { windows_targets::link!("computecore.dll" "system" fn HcsGetProcessFromOperation(operation : HCS_OPERATION) -> HCS_PROCESS); - HcsGetProcessFromOperation(operation.param().abi()) + HcsGetProcessFromOperation(core::mem::transmute(operation)) } #[inline] -pub unsafe fn HcsGetProcessInfo(process: P0, operation: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn HcsGetProcessInfo(process: HCS_PROCESS, operation: HCS_OPERATION) -> windows_core::Result<()> { windows_targets::link!("computecore.dll" "system" fn HcsGetProcessInfo(process : HCS_PROCESS, operation : HCS_OPERATION) -> windows_core::HRESULT); - HcsGetProcessInfo(process.param().abi(), operation.param().abi()).ok() + HcsGetProcessInfo(core::mem::transmute(process), core::mem::transmute(operation)).ok() } #[inline] -pub unsafe fn HcsGetProcessProperties(process: P0, operation: P1, propertyquery: P2) -> windows_core::Result<()> +pub unsafe fn HcsGetProcessProperties(process: HCS_PROCESS, operation: HCS_OPERATION, propertyquery: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsGetProcessProperties(process : HCS_PROCESS, operation : HCS_OPERATION, propertyquery : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsGetProcessProperties(process.param().abi(), operation.param().abi(), propertyquery.param().abi()).ok() + HcsGetProcessProperties(core::mem::transmute(process), core::mem::transmute(operation), propertyquery.param().abi()).ok() } #[inline] pub unsafe fn HcsGetProcessorCompatibilityFromSavedState(runtimefilename: P0, processorfeaturesstring: Option<*mut windows_core::PCWSTR>) -> windows_core::Result<()> @@ -286,7 +229,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(core::ptr::null_mut()))).ok() + HcsGetProcessorCompatibilityFromSavedState(runtimefilename.param().abi(), core::mem::transmute(processorfeaturesstring.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcsGetServiceProperties(propertyquery: P0) -> windows_core::Result @@ -346,25 +289,20 @@ where HcsInitializeWritableLayer(writablelayerpath.param().abi(), layerdata.param().abi(), options.param().abi()).ok() } #[inline] -pub unsafe fn HcsModifyComputeSystem(computesystem: P0, operation: P1, configuration: P2, identity: P3) -> windows_core::Result<()> +pub unsafe fn HcsModifyComputeSystem(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, configuration: P2, identity: Option) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsModifyComputeSystem(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, configuration : windows_core::PCWSTR, identity : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - HcsModifyComputeSystem(computesystem.param().abi(), operation.param().abi(), configuration.param().abi(), identity.param().abi()).ok() + HcsModifyComputeSystem(core::mem::transmute(computesystem), core::mem::transmute(operation), configuration.param().abi(), core::mem::transmute(identity.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn HcsModifyProcess(process: P0, operation: P1, settings: P2) -> windows_core::Result<()> +pub unsafe fn HcsModifyProcess(process: HCS_PROCESS, operation: HCS_OPERATION, settings: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsModifyProcess(process : HCS_PROCESS, operation : HCS_OPERATION, settings : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsModifyProcess(process.param().abi(), operation.param().abi(), settings.param().abi()).ok() + HcsModifyProcess(core::mem::transmute(process), core::mem::transmute(operation), settings.param().abi()).ok() } #[inline] pub unsafe fn HcsModifyServiceSettings(settings: P0, result: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -372,7 +310,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(core::ptr::null_mut()))).ok() + HcsModifyServiceSettings(settings.param().abi(), core::mem::transmute(result.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn HcsOpenComputeSystem(id: P0, requestedaccess: u32) -> windows_core::Result @@ -394,33 +332,26 @@ where HcsOpenComputeSystemInNamespace(idnamespace.param().abi(), id.param().abi(), core::mem::transmute(requestedaccess), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn HcsOpenProcess(computesystem: P0, processid: u32, requestedaccess: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn HcsOpenProcess(computesystem: HCS_SYSTEM, processid: u32, requestedaccess: u32) -> windows_core::Result { windows_targets::link!("computecore.dll" "system" fn HcsOpenProcess(computesystem : HCS_SYSTEM, processid : u32, requestedaccess : u32, process : *mut HCS_PROCESS) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - HcsOpenProcess(computesystem.param().abi(), core::mem::transmute(processid), core::mem::transmute(requestedaccess), &mut result__).map(|| core::mem::transmute(result__)) + HcsOpenProcess(core::mem::transmute(computesystem), core::mem::transmute(processid), core::mem::transmute(requestedaccess), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn HcsPauseComputeSystem(computesystem: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsPauseComputeSystem(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsPauseComputeSystem(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsPauseComputeSystem(computesystem.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsPauseComputeSystem(core::mem::transmute(computesystem), core::mem::transmute(operation), options.param().abi()).ok() } #[inline] -pub unsafe fn HcsResumeComputeSystem(computesystem: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsResumeComputeSystem(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsResumeComputeSystem(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsResumeComputeSystem(computesystem.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsResumeComputeSystem(core::mem::transmute(computesystem), core::mem::transmute(operation), options.param().abi()).ok() } #[inline] pub unsafe fn HcsRevokeVmAccess(vmid: P0, filepath: P1) -> windows_core::Result<()> @@ -440,56 +371,41 @@ where HcsRevokeVmGroupAccess(filepath.param().abi()).ok() } #[inline] -pub unsafe fn HcsSaveComputeSystem(computesystem: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsSaveComputeSystem(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsSaveComputeSystem(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsSaveComputeSystem(computesystem.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsSaveComputeSystem(core::mem::transmute(computesystem), core::mem::transmute(operation), options.param().abi()).ok() } #[inline] -pub unsafe fn HcsSetComputeSystemCallback(computesystem: P0, callbackoptions: HCS_EVENT_OPTIONS, context: Option<*const core::ffi::c_void>, callback: HCS_EVENT_CALLBACK) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsSetComputeSystemCallback(computesystem: HCS_SYSTEM, callbackoptions: HCS_EVENT_OPTIONS, context: Option<*const core::ffi::c_void>, callback: HCS_EVENT_CALLBACK) -> windows_core::Result<()> { 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(), core::mem::transmute(callbackoptions), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(callback)).ok() + HcsSetComputeSystemCallback(core::mem::transmute(computesystem), core::mem::transmute(callbackoptions), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback)).ok() } #[inline] -pub unsafe fn HcsSetOperationCallback(operation: P0, context: Option<*const core::ffi::c_void>, callback: HCS_OPERATION_COMPLETION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsSetOperationCallback(operation: HCS_OPERATION, context: Option<*const core::ffi::c_void>, callback: HCS_OPERATION_COMPLETION) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(callback)).ok() + HcsSetOperationCallback(core::mem::transmute(operation), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback)).ok() } #[inline] -pub unsafe fn HcsSetOperationContext(operation: P0, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsSetOperationContext(operation: HCS_OPERATION, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(core::ptr::null()))).ok() + HcsSetOperationContext(core::mem::transmute(operation), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsSetProcessCallback(process: HCS_PROCESS, callbackoptions: HCS_EVENT_OPTIONS, context: *const core::ffi::c_void, callback: HCS_EVENT_CALLBACK) -> windows_core::Result<()> { windows_targets::link!("computecore.dll" "system" fn HcsSetProcessCallback(process : HCS_PROCESS, callbackoptions : HCS_EVENT_OPTIONS, context : *const core::ffi::c_void, callback : HCS_EVENT_CALLBACK) -> windows_core::HRESULT); - HcsSetProcessCallback(process.param().abi(), core::mem::transmute(callbackoptions), core::mem::transmute(context), core::mem::transmute(callback)).ok() + HcsSetProcessCallback(core::mem::transmute(process), core::mem::transmute(callbackoptions), core::mem::transmute(context), core::mem::transmute(callback)).ok() } #[inline] -pub unsafe fn HcsSetupBaseOSLayer(layerpath: P0, vhdhandle: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsSetupBaseOSLayer(layerpath: P0, vhdhandle: super::super::Foundation::HANDLE, options: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computestorage.dll" "system" fn HcsSetupBaseOSLayer(layerpath : windows_core::PCWSTR, vhdhandle : super::super::Foundation:: HANDLE, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsSetupBaseOSLayer(layerpath.param().abi(), vhdhandle.param().abi(), options.param().abi()).ok() + HcsSetupBaseOSLayer(layerpath.param().abi(), core::mem::transmute(vhdhandle), options.param().abi()).ok() } #[inline] pub unsafe fn HcsSetupBaseOSVolume(layerpath: P0, volumepath: P1, options: P2) -> windows_core::Result<()> @@ -502,34 +418,28 @@ where HcsSetupBaseOSVolume(layerpath.param().abi(), volumepath.param().abi(), options.param().abi()).ok() } #[inline] -pub unsafe fn HcsShutDownComputeSystem(computesystem: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsShutDownComputeSystem(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsShutDownComputeSystem(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsShutDownComputeSystem(computesystem.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsShutDownComputeSystem(core::mem::transmute(computesystem), core::mem::transmute(operation), options.param().abi()).ok() } #[inline] -pub unsafe fn HcsSignalProcess(process: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsSignalProcess(process: HCS_PROCESS, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsSignalProcess(process : HCS_PROCESS, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsSignalProcess(process.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsSignalProcess(core::mem::transmute(process), core::mem::transmute(operation), options.param().abi()).ok() } #[inline] -pub unsafe fn HcsStartComputeSystem(computesystem: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsStartComputeSystem(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsStartComputeSystem(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsStartComputeSystem(computesystem.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsStartComputeSystem(core::mem::transmute(computesystem), core::mem::transmute(operation), options.param().abi()).ok() } #[inline] pub unsafe fn HcsSubmitWerReport(settings: P0) -> windows_core::Result<()> @@ -540,56 +450,40 @@ where HcsSubmitWerReport(settings.param().abi()).ok() } #[inline] -pub unsafe fn HcsTerminateComputeSystem(computesystem: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsTerminateComputeSystem(computesystem: HCS_SYSTEM, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsTerminateComputeSystem(computesystem : HCS_SYSTEM, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsTerminateComputeSystem(computesystem.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsTerminateComputeSystem(core::mem::transmute(computesystem), core::mem::transmute(operation), options.param().abi()).ok() } #[inline] -pub unsafe fn HcsTerminateProcess(process: P0, operation: P1, options: P2) -> windows_core::Result<()> +pub unsafe fn HcsTerminateProcess(process: HCS_PROCESS, operation: HCS_OPERATION, options: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsTerminateProcess(process : HCS_PROCESS, operation : HCS_OPERATION, options : windows_core::PCWSTR) -> windows_core::HRESULT); - HcsTerminateProcess(process.param().abi(), operation.param().abi(), options.param().abi()).ok() + HcsTerminateProcess(core::mem::transmute(process), core::mem::transmute(operation), options.param().abi()).ok() } #[inline] -pub unsafe fn HcsWaitForComputeSystemExit(computesystem: P0, timeoutms: u32, result: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsWaitForComputeSystemExit(computesystem: HCS_SYSTEM, timeoutms: u32, result: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { 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(), core::mem::transmute(timeoutms), core::mem::transmute(result.unwrap_or(core::ptr::null_mut()))).ok() + HcsWaitForComputeSystemExit(core::mem::transmute(computesystem), core::mem::transmute(timeoutms), core::mem::transmute(result.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn HcsWaitForOperationResult(operation: P0, timeoutms: u32, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsWaitForOperationResult(operation: HCS_OPERATION, timeoutms: u32, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { 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(), core::mem::transmute(timeoutms), core::mem::transmute(resultdocument.unwrap_or(core::ptr::null_mut()))).ok() + HcsWaitForOperationResult(core::mem::transmute(operation), core::mem::transmute(timeoutms), core::mem::transmute(resultdocument.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsWaitForOperationResultAndProcessInfo(operation: HCS_OPERATION, timeoutms: u32, processinformation: Option<*mut HCS_PROCESS_INFORMATION>, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { 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(), core::mem::transmute(timeoutms), core::mem::transmute(processinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(resultdocument.unwrap_or(core::ptr::null_mut()))).ok() + HcsWaitForOperationResultAndProcessInfo(core::mem::transmute(operation), core::mem::transmute(timeoutms), core::mem::transmute(processinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultdocument.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn HcsWaitForProcessExit(computesystem: P0, timeoutms: u32, result: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HcsWaitForProcessExit(computesystem: HCS_PROCESS, timeoutms: u32, result: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { 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(), core::mem::transmute(timeoutms), core::mem::transmute(result.unwrap_or(core::ptr::null_mut()))).ok() + HcsWaitForProcessExit(core::mem::transmute(computesystem), core::mem::transmute(timeoutms), core::mem::transmute(result.unwrap_or(core::mem::zeroed()))).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 3ddefd2048..e0bf5de758 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 P2: 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(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), hostmode.param().abi(), core::mem::transmute(oldmode.unwrap_or(core::ptr::null_mut()))).ok() + ForceNestedHostMode(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), hostmode.param().abi(), core::mem::transmute(oldmode.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), core::mem::transmute(virtualaddress), core::mem::transmute(physicaladdress), core::mem::transmute(unmappedregionsize.unwrap_or(core::ptr::null_mut()))).ok() + GuestVirtualAddressToPhysicalAddress(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), core::mem::transmute(virtualaddress), core::mem::transmute(physicaladdress), core::mem::transmute(unmappedregionsize.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(devicehosthandle), core::mem::transmute(devicetype), core::mem::transmute(deviceclassid), core::mem::transmute(deviceinstanceid), core::mem::transmute(deviceinterface), core::mem::transmute(devicecontext.unwrap_or(core::ptr::null())), core::mem::transmute(devicehandle)).ok() + HdvCreateDeviceInstance(core::mem::transmute(devicehosthandle), core::mem::transmute(devicetype), core::mem::transmute(deviceclassid), core::mem::transmute(deviceinstanceid), core::mem::transmute(deviceinterface), core::mem::transmute(devicecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicehandle)).ok() } #[inline] pub unsafe fn HdvCreateGuestMemoryAperture(requestor: *const core::ffi::c_void, guestphysicaladdress: u64, bytecount: u32, writeprotected: P3, mappedaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -153,12 +153,9 @@ where HdvCreateGuestMemoryAperture(core::mem::transmute(requestor), core::mem::transmute(guestphysicaladdress), core::mem::transmute(bytecount), writeprotected.param().abi(), core::mem::transmute(mappedaddress)).ok() } #[inline] -pub unsafe fn HdvCreateSectionBackedMmioRange(requestor: *const core::ffi::c_void, barindex: HDV_PCI_BAR_SELECTOR, offsetinpages: u64, lengthinpages: u64, mappingflags: HDV_MMIO_MAPPING_FLAGS, sectionhandle: P5, sectionoffsetinpages: u64) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn HdvCreateSectionBackedMmioRange(requestor: *const core::ffi::c_void, barindex: HDV_PCI_BAR_SELECTOR, offsetinpages: u64, lengthinpages: u64, mappingflags: HDV_MMIO_MAPPING_FLAGS, sectionhandle: super::super::Foundation::HANDLE, sectionoffsetinpages: u64) -> windows_core::Result<()> { windows_targets::link!("vmdevicehost.dll" "system" fn HdvCreateSectionBackedMmioRange(requestor : *const core::ffi::c_void, barindex : HDV_PCI_BAR_SELECTOR, offsetinpages : u64, lengthinpages : u64, mappingflags : HDV_MMIO_MAPPING_FLAGS, sectionhandle : super::super::Foundation:: HANDLE, sectionoffsetinpages : u64) -> windows_core::HRESULT); - HdvCreateSectionBackedMmioRange(core::mem::transmute(requestor), core::mem::transmute(barindex), core::mem::transmute(offsetinpages), core::mem::transmute(lengthinpages), core::mem::transmute(mappingflags), sectionhandle.param().abi(), core::mem::transmute(sectionoffsetinpages)).ok() + HdvCreateSectionBackedMmioRange(core::mem::transmute(requestor), core::mem::transmute(barindex), core::mem::transmute(offsetinpages), core::mem::transmute(lengthinpages), core::mem::transmute(mappingflags), core::mem::transmute(sectionhandle), core::mem::transmute(sectionoffsetinpages)).ok() } #[inline] pub unsafe fn HdvDeliverGuestInterrupt(requestor: *const core::ffi::c_void, msiaddress: u64, msidata: u32) -> windows_core::Result<()> { @@ -177,21 +174,15 @@ pub unsafe fn HdvDestroySectionBackedMmioRange(requestor: *const core::ffi::c_vo } #[cfg(feature = "Win32_System_HostComputeSystem")] #[inline] -pub unsafe fn HdvInitializeDeviceHost(computesystem: P0, devicehosthandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HdvInitializeDeviceHost(computesystem: super::HostComputeSystem::HCS_SYSTEM, devicehosthandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vmdevicehost.dll" "system" fn HdvInitializeDeviceHost(computesystem : super::HostComputeSystem:: HCS_SYSTEM, devicehosthandle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - HdvInitializeDeviceHost(computesystem.param().abi(), core::mem::transmute(devicehosthandle)).ok() + HdvInitializeDeviceHost(core::mem::transmute(computesystem), core::mem::transmute(devicehosthandle)).ok() } #[cfg(feature = "Win32_System_HostComputeSystem")] #[inline] -pub unsafe fn HdvInitializeDeviceHostEx(computesystem: P0, flags: HDV_DEVICE_HOST_FLAGS, devicehosthandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HdvInitializeDeviceHostEx(computesystem: super::HostComputeSystem::HCS_SYSTEM, flags: HDV_DEVICE_HOST_FLAGS, devicehosthandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vmdevicehost.dll" "system" fn HdvInitializeDeviceHostEx(computesystem : super::HostComputeSystem:: HCS_SYSTEM, flags : HDV_DEVICE_HOST_FLAGS, devicehosthandle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - HdvInitializeDeviceHostEx(computesystem.param().abi(), core::mem::transmute(flags), core::mem::transmute(devicehosthandle)).ok() + HdvInitializeDeviceHostEx(core::mem::transmute(computesystem), core::mem::transmute(flags), core::mem::transmute(devicehosthandle)).ok() } #[inline] pub unsafe fn HdvReadGuestMemory(requestor: *const core::ffi::c_void, guestphysicaladdress: u64, buffer: &mut [u8]) -> windows_core::Result<()> { @@ -199,12 +190,9 @@ pub unsafe fn HdvReadGuestMemory(requestor: *const core::ffi::c_void, guestphysi HdvReadGuestMemory(core::mem::transmute(requestor), core::mem::transmute(guestphysicaladdress), buffer.len().try_into().unwrap(), core::mem::transmute(buffer.as_ptr())).ok() } #[inline] -pub unsafe fn HdvRegisterDoorbell(requestor: *const core::ffi::c_void, barindex: HDV_PCI_BAR_SELECTOR, baroffset: u64, triggervalue: u64, flags: u64, doorbellevent: P5) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn HdvRegisterDoorbell(requestor: *const core::ffi::c_void, barindex: HDV_PCI_BAR_SELECTOR, baroffset: u64, triggervalue: u64, flags: u64, doorbellevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("vmdevicehost.dll" "system" fn HdvRegisterDoorbell(requestor : *const core::ffi::c_void, barindex : HDV_PCI_BAR_SELECTOR, baroffset : u64, triggervalue : u64, flags : u64, doorbellevent : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - HdvRegisterDoorbell(core::mem::transmute(requestor), core::mem::transmute(barindex), core::mem::transmute(baroffset), core::mem::transmute(triggervalue), core::mem::transmute(flags), doorbellevent.param().abi()).ok() + HdvRegisterDoorbell(core::mem::transmute(requestor), core::mem::transmute(barindex), core::mem::transmute(baroffset), core::mem::transmute(triggervalue), core::mem::transmute(flags), core::mem::transmute(doorbellevent)).ok() } #[inline] pub unsafe fn HdvTeardownDeviceHost(devicehosthandle: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -292,12 +280,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(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(physicaladdress), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + ReadGuestPhysicalAddress(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(physicaladdress), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(rawsavedmemoryoffset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() + ReadGuestRawSavedMemory(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(rawsavedmemoryoffset), core::mem::transmute(buffer), core::mem::transmute(buffersize), core::mem::transmute(bytesread.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ReadSavedStateGlobalVariable(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, globalname: P2, buffer: *mut core::ffi::c_void, buffersize: u32) -> windows_core::Result<()> @@ -323,7 +311,7 @@ where P2: 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(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), globalname.param().abi(), core::mem::transmute(virtualaddress), core::mem::transmute(size.unwrap_or(core::ptr::null_mut()))).ok() + ResolveSavedStateGlobalVariableAddress(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), globalname.param().abi(), core::mem::transmute(virtualaddress), core::mem::transmute(size.unwrap_or(core::mem::zeroed()))).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<()> { @@ -341,60 +329,41 @@ pub unsafe fn SetSavedStateSymbolProviderDebugInfoCallback(vmsavedstatedumphandl SetSavedStateSymbolProviderDebugInfoCallback(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(callback)).ok() } #[inline] -pub unsafe fn WHvAcceptPartitionMigration(migrationhandle: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WHvAcceptPartitionMigration(migrationhandle: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("winhvplatform.dll" "system" fn WHvAcceptPartitionMigration(migrationhandle : super::super::Foundation:: HANDLE, partition : *mut WHV_PARTITION_HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WHvAcceptPartitionMigration(migrationhandle.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WHvAcceptPartitionMigration(core::mem::transmute(migrationhandle), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WHvAdviseGpaRange(partition: P0, gparanges: &[WHV_MEMORY_RANGE_ENTRY], advice: WHV_ADVISE_GPA_RANGE_CODE, advicebuffer: *const core::ffi::c_void, advicebuffersizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvAdviseGpaRange(partition: WHV_PARTITION_HANDLE, gparanges: &[WHV_MEMORY_RANGE_ENTRY], advice: WHV_ADVISE_GPA_RANGE_CODE, advicebuffer: *const core::ffi::c_void, advicebuffersizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvAdviseGpaRange(partition : WHV_PARTITION_HANDLE, gparanges : *const WHV_MEMORY_RANGE_ENTRY, gparangescount : u32, advice : WHV_ADVISE_GPA_RANGE_CODE, advicebuffer : *const core::ffi::c_void, advicebuffersizeinbytes : u32) -> windows_core::HRESULT); - WHvAdviseGpaRange(partition.param().abi(), core::mem::transmute(gparanges.as_ptr()), gparanges.len().try_into().unwrap(), core::mem::transmute(advice), core::mem::transmute(advicebuffer), core::mem::transmute(advicebuffersizeinbytes)).ok() + WHvAdviseGpaRange(core::mem::transmute(partition), core::mem::transmute(gparanges.as_ptr()), gparanges.len().try_into().unwrap(), core::mem::transmute(advice), core::mem::transmute(advicebuffer), core::mem::transmute(advicebuffersizeinbytes)).ok() } #[inline] 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(core::ptr::null())), core::mem::transmute(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(|| core::mem::transmute(result__)) + WHvAllocateVpciResource(core::mem::transmute(providerid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WHvCancelPartitionMigration(partition: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvCancelPartitionMigration(partition: WHV_PARTITION_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvCancelPartitionMigration(partition : WHV_PARTITION_HANDLE) -> windows_core::HRESULT); - WHvCancelPartitionMigration(partition.param().abi()).ok() + WHvCancelPartitionMigration(core::mem::transmute(partition)).ok() } #[inline] -pub unsafe fn WHvCancelRunVirtualProcessor(partition: P0, vpindex: u32, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvCancelRunVirtualProcessor(partition: WHV_PARTITION_HANDLE, vpindex: u32, flags: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvCancelRunVirtualProcessor(partition : WHV_PARTITION_HANDLE, vpindex : u32, flags : u32) -> windows_core::HRESULT); - WHvCancelRunVirtualProcessor(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(flags)).ok() + WHvCancelRunVirtualProcessor(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn WHvCompletePartitionMigration(partition: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvCompletePartitionMigration(partition: WHV_PARTITION_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvCompletePartitionMigration(partition : WHV_PARTITION_HANDLE) -> windows_core::HRESULT); - WHvCompletePartitionMigration(partition.param().abi()).ok() + WHvCompletePartitionMigration(core::mem::transmute(partition)).ok() } #[inline] -pub unsafe fn WHvCreateNotificationPort(partition: P0, parameters: *const WHV_NOTIFICATION_PORT_PARAMETERS, eventhandle: P2, porthandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn WHvCreateNotificationPort(partition: WHV_PARTITION_HANDLE, parameters: *const WHV_NOTIFICATION_PORT_PARAMETERS, eventhandle: super::super::Foundation::HANDLE, porthandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvCreateNotificationPort(partition : WHV_PARTITION_HANDLE, parameters : *const WHV_NOTIFICATION_PORT_PARAMETERS, eventhandle : super::super::Foundation:: HANDLE, porthandle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - WHvCreateNotificationPort(partition.param().abi(), core::mem::transmute(parameters), eventhandle.param().abi(), core::mem::transmute(porthandle)).ok() + WHvCreateNotificationPort(core::mem::transmute(partition), core::mem::transmute(parameters), core::mem::transmute(eventhandle), core::mem::transmute(porthandle)).ok() } #[inline] pub unsafe fn WHvCreatePartition() -> windows_core::Result { @@ -403,78 +372,49 @@ pub unsafe fn WHvCreatePartition() -> windows_core::Result WHvCreatePartition(&mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WHvCreateTrigger(partition: P0, parameters: *const WHV_TRIGGER_PARAMETERS, triggerhandle: *mut *mut core::ffi::c_void, eventhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvCreateTrigger(partition: WHV_PARTITION_HANDLE, parameters: *const WHV_TRIGGER_PARAMETERS, triggerhandle: *mut *mut core::ffi::c_void, eventhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvCreateTrigger(partition : WHV_PARTITION_HANDLE, parameters : *const WHV_TRIGGER_PARAMETERS, triggerhandle : *mut *mut core::ffi::c_void, eventhandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WHvCreateTrigger(partition.param().abi(), core::mem::transmute(parameters), core::mem::transmute(triggerhandle), core::mem::transmute(eventhandle)).ok() + WHvCreateTrigger(core::mem::transmute(partition), core::mem::transmute(parameters), core::mem::transmute(triggerhandle), core::mem::transmute(eventhandle)).ok() } #[inline] -pub unsafe fn WHvCreateVirtualProcessor(partition: P0, vpindex: u32, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvCreateVirtualProcessor(partition: WHV_PARTITION_HANDLE, vpindex: u32, flags: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvCreateVirtualProcessor(partition : WHV_PARTITION_HANDLE, vpindex : u32, flags : u32) -> windows_core::HRESULT); - WHvCreateVirtualProcessor(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(flags)).ok() + WHvCreateVirtualProcessor(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn WHvCreateVirtualProcessor2(partition: P0, vpindex: u32, properties: &[WHV_VIRTUAL_PROCESSOR_PROPERTY]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvCreateVirtualProcessor2(partition: WHV_PARTITION_HANDLE, vpindex: u32, properties: &[WHV_VIRTUAL_PROCESSOR_PROPERTY]) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvCreateVirtualProcessor2(partition : WHV_PARTITION_HANDLE, vpindex : u32, properties : *const WHV_VIRTUAL_PROCESSOR_PROPERTY, propertycount : u32) -> windows_core::HRESULT); - WHvCreateVirtualProcessor2(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap()).ok() + WHvCreateVirtualProcessor2(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn WHvCreateVpciDevice(partition: P0, logicaldeviceid: u64, vpciresource: P2, flags: WHV_CREATE_VPCI_DEVICE_FLAGS, notificationeventhandle: P4) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn WHvCreateVpciDevice(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, vpciresource: super::super::Foundation::HANDLE, flags: WHV_CREATE_VPCI_DEVICE_FLAGS, notificationeventhandle: Option) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvCreateVpciDevice(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, vpciresource : super::super::Foundation:: HANDLE, flags : WHV_CREATE_VPCI_DEVICE_FLAGS, notificationeventhandle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WHvCreateVpciDevice(partition.param().abi(), core::mem::transmute(logicaldeviceid), vpciresource.param().abi(), core::mem::transmute(flags), notificationeventhandle.param().abi()).ok() + WHvCreateVpciDevice(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(vpciresource), core::mem::transmute(flags), core::mem::transmute(notificationeventhandle.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WHvDeleteNotificationPort(partition: P0, porthandle: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvDeleteNotificationPort(partition: WHV_PARTITION_HANDLE, porthandle: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvDeleteNotificationPort(partition : WHV_PARTITION_HANDLE, porthandle : *const core::ffi::c_void) -> windows_core::HRESULT); - WHvDeleteNotificationPort(partition.param().abi(), core::mem::transmute(porthandle)).ok() + WHvDeleteNotificationPort(core::mem::transmute(partition), core::mem::transmute(porthandle)).ok() } #[inline] -pub unsafe fn WHvDeletePartition(partition: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvDeletePartition(partition: WHV_PARTITION_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvDeletePartition(partition : WHV_PARTITION_HANDLE) -> windows_core::HRESULT); - WHvDeletePartition(partition.param().abi()).ok() + WHvDeletePartition(core::mem::transmute(partition)).ok() } #[inline] -pub unsafe fn WHvDeleteTrigger(partition: P0, triggerhandle: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvDeleteTrigger(partition: WHV_PARTITION_HANDLE, triggerhandle: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvDeleteTrigger(partition : WHV_PARTITION_HANDLE, triggerhandle : *const core::ffi::c_void) -> windows_core::HRESULT); - WHvDeleteTrigger(partition.param().abi(), core::mem::transmute(triggerhandle)).ok() + WHvDeleteTrigger(core::mem::transmute(partition), core::mem::transmute(triggerhandle)).ok() } #[inline] -pub unsafe fn WHvDeleteVirtualProcessor(partition: P0, vpindex: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvDeleteVirtualProcessor(partition: WHV_PARTITION_HANDLE, vpindex: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvDeleteVirtualProcessor(partition : WHV_PARTITION_HANDLE, vpindex : u32) -> windows_core::HRESULT); - WHvDeleteVirtualProcessor(partition.param().abi(), core::mem::transmute(vpindex)).ok() + WHvDeleteVirtualProcessor(core::mem::transmute(partition), core::mem::transmute(vpindex)).ok() } #[inline] -pub unsafe fn WHvDeleteVpciDevice(partition: P0, logicaldeviceid: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvDeleteVpciDevice(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvDeleteVpciDevice(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64) -> windows_core::HRESULT); - WHvDeleteVpciDevice(partition.param().abi(), core::mem::transmute(logicaldeviceid)).ok() + WHvDeleteVpciDevice(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid)).ok() } #[inline] pub unsafe fn WHvEmulatorCreateEmulator(callbacks: *const WHV_EMULATOR_CALLBACKS, emulator: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -501,397 +441,251 @@ 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(core::mem::transmute(capabilitycode), core::mem::transmute(capabilitybuffer), core::mem::transmute(capabilitybuffersizeinbytes), core::mem::transmute(writtensizeinbytes.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetCapability(core::mem::transmute(capabilitycode), core::mem::transmute(capabilitybuffer), core::mem::transmute(capabilitybuffersizeinbytes), core::mem::transmute(writtensizeinbytes.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WHvGetInterruptTargetVpSet(partition: P0, destination: u64, destinationmode: WHV_INTERRUPT_DESTINATION_MODE, targetvps: &mut [u32], targetvpcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetInterruptTargetVpSet(partition: WHV_PARTITION_HANDLE, destination: u64, destinationmode: WHV_INTERRUPT_DESTINATION_MODE, targetvps: &mut [u32], targetvpcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetInterruptTargetVpSet(partition : WHV_PARTITION_HANDLE, destination : u64, destinationmode : WHV_INTERRUPT_DESTINATION_MODE, targetvps : *mut u32, vpcount : u32, targetvpcount : *mut u32) -> windows_core::HRESULT); - WHvGetInterruptTargetVpSet(partition.param().abi(), core::mem::transmute(destination), core::mem::transmute(destinationmode), core::mem::transmute(targetvps.as_ptr()), targetvps.len().try_into().unwrap(), core::mem::transmute(targetvpcount)).ok() + WHvGetInterruptTargetVpSet(core::mem::transmute(partition), core::mem::transmute(destination), core::mem::transmute(destinationmode), core::mem::transmute(targetvps.as_ptr()), targetvps.len().try_into().unwrap(), core::mem::transmute(targetvpcount)).ok() } #[inline] -pub unsafe fn WHvGetPartitionCounters(partition: P0, counterset: WHV_PARTITION_COUNTER_SET, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetPartitionCounters(partition: WHV_PARTITION_HANDLE, counterset: WHV_PARTITION_COUNTER_SET, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(counterset), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetPartitionCounters(core::mem::transmute(partition), core::mem::transmute(counterset), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetPartitionProperty(partition: WHV_PARTITION_HANDLE, propertycode: WHV_PARTITION_PROPERTY_CODE, propertybuffer: *mut core::ffi::c_void, propertybuffersizeinbytes: u32, writtensizeinbytes: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(propertycode), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersizeinbytes), core::mem::transmute(writtensizeinbytes.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetPartitionProperty(core::mem::transmute(partition), core::mem::transmute(propertycode), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersizeinbytes), core::mem::transmute(writtensizeinbytes.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVirtualProcessorCounters(partition: WHV_PARTITION_HANDLE, vpindex: u32, counterset: WHV_PROCESSOR_COUNTER_SET, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(vpindex), core::mem::transmute(counterset), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetVirtualProcessorCounters(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(counterset), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WHvGetVirtualProcessorCpuidOutput(partition: P0, vpindex: u32, eax: u32, ecx: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVirtualProcessorCpuidOutput(partition: WHV_PARTITION_HANDLE, vpindex: u32, eax: u32, ecx: u32) -> windows_core::Result { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVirtualProcessorCpuidOutput(partition : WHV_PARTITION_HANDLE, vpindex : u32, eax : u32, ecx : u32, cpuidoutput : *mut WHV_CPUID_OUTPUT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WHvGetVirtualProcessorCpuidOutput(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(eax), core::mem::transmute(ecx), &mut result__).map(|| core::mem::transmute(result__)) + WHvGetVirtualProcessorCpuidOutput(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(eax), core::mem::transmute(ecx), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WHvGetVirtualProcessorInterruptControllerState(partition: P0, vpindex: u32, state: *mut core::ffi::c_void, statesize: u32, writtensize: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVirtualProcessorInterruptControllerState(partition: WHV_PARTITION_HANDLE, vpindex: u32, state: *mut core::ffi::c_void, statesize: u32, writtensize: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(vpindex), core::mem::transmute(state), core::mem::transmute(statesize), core::mem::transmute(writtensize.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetVirtualProcessorInterruptControllerState(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(state), core::mem::transmute(statesize), core::mem::transmute(writtensize.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVirtualProcessorInterruptControllerState2(partition: WHV_PARTITION_HANDLE, vpindex: u32, state: *mut core::ffi::c_void, statesize: u32, writtensize: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(vpindex), core::mem::transmute(state), core::mem::transmute(statesize), core::mem::transmute(writtensize.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetVirtualProcessorInterruptControllerState2(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(state), core::mem::transmute(statesize), core::mem::transmute(writtensize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WHvGetVirtualProcessorRegisters(partition: P0, vpindex: u32, registernames: *const WHV_REGISTER_NAME, registercount: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVirtualProcessorRegisters(partition: WHV_PARTITION_HANDLE, vpindex: u32, registernames: *const WHV_REGISTER_NAME, registercount: u32) -> windows_core::Result { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVirtualProcessorRegisters(partition : WHV_PARTITION_HANDLE, vpindex : u32, registernames : *const WHV_REGISTER_NAME, registercount : u32, registervalues : *mut WHV_REGISTER_VALUE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WHvGetVirtualProcessorRegisters(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(registernames), core::mem::transmute(registercount), &mut result__).map(|| core::mem::transmute(result__)) + WHvGetVirtualProcessorRegisters(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(registernames), core::mem::transmute(registercount), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WHvGetVirtualProcessorState(partition: P0, vpindex: u32, statetype: WHV_VIRTUAL_PROCESSOR_STATE_TYPE, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVirtualProcessorState(partition: WHV_PARTITION_HANDLE, vpindex: u32, statetype: WHV_VIRTUAL_PROCESSOR_STATE_TYPE, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(vpindex), core::mem::transmute(statetype), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetVirtualProcessorState(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(statetype), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WHvGetVirtualProcessorXsaveState(partition: P0, vpindex: u32, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVirtualProcessorXsaveState(partition: WHV_PARTITION_HANDLE, vpindex: u32, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVirtualProcessorXsaveState(partition : WHV_PARTITION_HANDLE, vpindex : u32, buffer : *mut core::ffi::c_void, buffersizeinbytes : u32, byteswritten : *mut u32) -> windows_core::HRESULT); - WHvGetVirtualProcessorXsaveState(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes), core::mem::transmute(byteswritten)).ok() + WHvGetVirtualProcessorXsaveState(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes), core::mem::transmute(byteswritten)).ok() } #[inline] -pub unsafe fn WHvGetVpciDeviceInterruptTarget(partition: P0, logicaldeviceid: u64, index: u32, multimessagenumber: u32, target: *mut WHV_VPCI_INTERRUPT_TARGET, targetsizeinbytes: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVpciDeviceInterruptTarget(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, index: u32, multimessagenumber: u32, target: *mut WHV_VPCI_INTERRUPT_TARGET, targetsizeinbytes: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(logicaldeviceid), core::mem::transmute(index), core::mem::transmute(multimessagenumber), core::mem::transmute(target), core::mem::transmute(targetsizeinbytes), core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetVpciDeviceInterruptTarget(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(index), core::mem::transmute(multimessagenumber), core::mem::transmute(target), core::mem::transmute(targetsizeinbytes), core::mem::transmute(byteswritten.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WHvGetVpciDeviceNotification(partition: P0, logicaldeviceid: u64, notification: *mut WHV_VPCI_DEVICE_NOTIFICATION, notificationsizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVpciDeviceNotification(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, notification: *mut WHV_VPCI_DEVICE_NOTIFICATION, notificationsizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVpciDeviceNotification(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, notification : *mut WHV_VPCI_DEVICE_NOTIFICATION, notificationsizeinbytes : u32) -> windows_core::HRESULT); - WHvGetVpciDeviceNotification(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(notification), core::mem::transmute(notificationsizeinbytes)).ok() + WHvGetVpciDeviceNotification(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(notification), core::mem::transmute(notificationsizeinbytes)).ok() } #[inline] -pub unsafe fn WHvGetVpciDeviceProperty(partition: P0, logicaldeviceid: u64, propertycode: WHV_VPCI_DEVICE_PROPERTY_CODE, propertybuffer: *mut core::ffi::c_void, propertybuffersizeinbytes: u32, writtensizeinbytes: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvGetVpciDeviceProperty(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, propertycode: WHV_VPCI_DEVICE_PROPERTY_CODE, propertybuffer: *mut core::ffi::c_void, propertybuffersizeinbytes: u32, writtensizeinbytes: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(logicaldeviceid), core::mem::transmute(propertycode), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersizeinbytes), core::mem::transmute(writtensizeinbytes.unwrap_or(core::ptr::null_mut()))).ok() + WHvGetVpciDeviceProperty(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(propertycode), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersizeinbytes), core::mem::transmute(writtensizeinbytes.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvMapGpaRange(partition: WHV_PARTITION_HANDLE, sourceaddress: *const core::ffi::c_void, guestaddress: u64, sizeinbytes: u64, flags: WHV_MAP_GPA_RANGE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvMapGpaRange(partition : WHV_PARTITION_HANDLE, sourceaddress : *const core::ffi::c_void, guestaddress : u64, sizeinbytes : u64, flags : WHV_MAP_GPA_RANGE_FLAGS) -> windows_core::HRESULT); - WHvMapGpaRange(partition.param().abi(), core::mem::transmute(sourceaddress), core::mem::transmute(guestaddress), core::mem::transmute(sizeinbytes), core::mem::transmute(flags)).ok() + WHvMapGpaRange(core::mem::transmute(partition), core::mem::transmute(sourceaddress), core::mem::transmute(guestaddress), core::mem::transmute(sizeinbytes), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn WHvMapGpaRange2(partition: P0, process: P1, sourceaddress: *const core::ffi::c_void, guestaddress: u64, sizeinbytes: u64, flags: WHV_MAP_GPA_RANGE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn WHvMapGpaRange2(partition: WHV_PARTITION_HANDLE, process: super::super::Foundation::HANDLE, sourceaddress: *const core::ffi::c_void, guestaddress: u64, sizeinbytes: u64, flags: WHV_MAP_GPA_RANGE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvMapGpaRange2(partition : WHV_PARTITION_HANDLE, process : super::super::Foundation:: HANDLE, sourceaddress : *const core::ffi::c_void, guestaddress : u64, sizeinbytes : u64, flags : WHV_MAP_GPA_RANGE_FLAGS) -> windows_core::HRESULT); - WHvMapGpaRange2(partition.param().abi(), process.param().abi(), core::mem::transmute(sourceaddress), core::mem::transmute(guestaddress), core::mem::transmute(sizeinbytes), core::mem::transmute(flags)).ok() + WHvMapGpaRange2(core::mem::transmute(partition), core::mem::transmute(process), core::mem::transmute(sourceaddress), core::mem::transmute(guestaddress), core::mem::transmute(sizeinbytes), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn WHvMapVpciDeviceInterrupt(partition: P0, logicaldeviceid: u64, index: u32, messagecount: u32, target: *const WHV_VPCI_INTERRUPT_TARGET, msiaddress: *mut u64, msidata: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvMapVpciDeviceInterrupt(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, index: u32, messagecount: u32, target: *const WHV_VPCI_INTERRUPT_TARGET, msiaddress: *mut u64, msidata: *mut u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvMapVpciDeviceInterrupt(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, index : u32, messagecount : u32, target : *const WHV_VPCI_INTERRUPT_TARGET, msiaddress : *mut u64, msidata : *mut u32) -> windows_core::HRESULT); - WHvMapVpciDeviceInterrupt(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(index), core::mem::transmute(messagecount), core::mem::transmute(target), core::mem::transmute(msiaddress), core::mem::transmute(msidata)).ok() + WHvMapVpciDeviceInterrupt(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(index), core::mem::transmute(messagecount), core::mem::transmute(target), core::mem::transmute(msiaddress), core::mem::transmute(msidata)).ok() } #[inline] -pub unsafe fn WHvMapVpciDeviceMmioRanges(partition: P0, logicaldeviceid: u64, mappingcount: *mut u32, mappings: *mut *mut WHV_VPCI_MMIO_MAPPING) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvMapVpciDeviceMmioRanges(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, mappingcount: *mut u32, mappings: *mut *mut WHV_VPCI_MMIO_MAPPING) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvMapVpciDeviceMmioRanges(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, mappingcount : *mut u32, mappings : *mut *mut WHV_VPCI_MMIO_MAPPING) -> windows_core::HRESULT); - WHvMapVpciDeviceMmioRanges(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(mappingcount), core::mem::transmute(mappings)).ok() + WHvMapVpciDeviceMmioRanges(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(mappingcount), core::mem::transmute(mappings)).ok() } #[inline] -pub unsafe fn WHvPostVirtualProcessorSynicMessage(partition: P0, vpindex: u32, sintindex: u32, message: *const core::ffi::c_void, messagesizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvPostVirtualProcessorSynicMessage(partition: WHV_PARTITION_HANDLE, vpindex: u32, sintindex: u32, message: *const core::ffi::c_void, messagesizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvPostVirtualProcessorSynicMessage(partition : WHV_PARTITION_HANDLE, vpindex : u32, sintindex : u32, message : *const core::ffi::c_void, messagesizeinbytes : u32) -> windows_core::HRESULT); - WHvPostVirtualProcessorSynicMessage(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(sintindex), core::mem::transmute(message), core::mem::transmute(messagesizeinbytes)).ok() + WHvPostVirtualProcessorSynicMessage(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(sintindex), core::mem::transmute(message), core::mem::transmute(messagesizeinbytes)).ok() } #[inline] -pub unsafe fn WHvQueryGpaRangeDirtyBitmap(partition: P0, guestaddress: u64, rangesizeinbytes: u64, bitmap: Option<*mut u64>, bitmapsizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvQueryGpaRangeDirtyBitmap(partition: WHV_PARTITION_HANDLE, guestaddress: u64, rangesizeinbytes: u64, bitmap: Option<*mut u64>, bitmapsizeinbytes: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(guestaddress), core::mem::transmute(rangesizeinbytes), core::mem::transmute(bitmap.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bitmapsizeinbytes)).ok() + WHvQueryGpaRangeDirtyBitmap(core::mem::transmute(partition), core::mem::transmute(guestaddress), core::mem::transmute(rangesizeinbytes), core::mem::transmute(bitmap.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvReadGpaRange(partition: WHV_PARTITION_HANDLE, vpindex: u32, guestaddress: u64, controls: WHV_ACCESS_GPA_CONTROLS, data: *mut core::ffi::c_void, datasizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvReadGpaRange(partition : WHV_PARTITION_HANDLE, vpindex : u32, guestaddress : u64, controls : WHV_ACCESS_GPA_CONTROLS, data : *mut core::ffi::c_void, datasizeinbytes : u32) -> windows_core::HRESULT); - WHvReadGpaRange(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(guestaddress), core::mem::transmute(controls), core::mem::transmute(data), core::mem::transmute(datasizeinbytes)).ok() + WHvReadGpaRange(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(guestaddress), core::mem::transmute(controls), core::mem::transmute(data), core::mem::transmute(datasizeinbytes)).ok() } #[inline] -pub unsafe fn WHvReadVpciDeviceRegister(partition: P0, logicaldeviceid: u64, register: *const WHV_VPCI_DEVICE_REGISTER, data: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvReadVpciDeviceRegister(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, register: *const WHV_VPCI_DEVICE_REGISTER, data: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvReadVpciDeviceRegister(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, register : *const WHV_VPCI_DEVICE_REGISTER, data : *mut core::ffi::c_void) -> windows_core::HRESULT); - WHvReadVpciDeviceRegister(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(register), core::mem::transmute(data)).ok() + WHvReadVpciDeviceRegister(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(register), core::mem::transmute(data)).ok() } #[inline] -pub unsafe fn WHvRegisterPartitionDoorbellEvent(partition: P0, matchdata: *const WHV_DOORBELL_MATCH_DATA, eventhandle: P2) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn WHvRegisterPartitionDoorbellEvent(partition: WHV_PARTITION_HANDLE, matchdata: *const WHV_DOORBELL_MATCH_DATA, eventhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvRegisterPartitionDoorbellEvent(partition : WHV_PARTITION_HANDLE, matchdata : *const WHV_DOORBELL_MATCH_DATA, eventhandle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WHvRegisterPartitionDoorbellEvent(partition.param().abi(), core::mem::transmute(matchdata), eventhandle.param().abi()).ok() + WHvRegisterPartitionDoorbellEvent(core::mem::transmute(partition), core::mem::transmute(matchdata), core::mem::transmute(eventhandle)).ok() } #[inline] -pub unsafe fn WHvRequestInterrupt(partition: P0, interrupt: *const WHV_INTERRUPT_CONTROL, interruptcontrolsize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvRequestInterrupt(partition: WHV_PARTITION_HANDLE, interrupt: *const WHV_INTERRUPT_CONTROL, interruptcontrolsize: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvRequestInterrupt(partition : WHV_PARTITION_HANDLE, interrupt : *const WHV_INTERRUPT_CONTROL, interruptcontrolsize : u32) -> windows_core::HRESULT); - WHvRequestInterrupt(partition.param().abi(), core::mem::transmute(interrupt), core::mem::transmute(interruptcontrolsize)).ok() + WHvRequestInterrupt(core::mem::transmute(partition), core::mem::transmute(interrupt), core::mem::transmute(interruptcontrolsize)).ok() } #[inline] -pub unsafe fn WHvRequestVpciDeviceInterrupt(partition: P0, logicaldeviceid: u64, msiaddress: u64, msidata: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvRequestVpciDeviceInterrupt(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, msiaddress: u64, msidata: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvRequestVpciDeviceInterrupt(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, msiaddress : u64, msidata : u32) -> windows_core::HRESULT); - WHvRequestVpciDeviceInterrupt(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(msiaddress), core::mem::transmute(msidata)).ok() + WHvRequestVpciDeviceInterrupt(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(msiaddress), core::mem::transmute(msidata)).ok() } #[inline] -pub unsafe fn WHvResetPartition(partition: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvResetPartition(partition: WHV_PARTITION_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvResetPartition(partition : WHV_PARTITION_HANDLE) -> windows_core::HRESULT); - WHvResetPartition(partition.param().abi()).ok() + WHvResetPartition(core::mem::transmute(partition)).ok() } #[inline] -pub unsafe fn WHvResumePartitionTime(partition: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvResumePartitionTime(partition: WHV_PARTITION_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvResumePartitionTime(partition : WHV_PARTITION_HANDLE) -> windows_core::HRESULT); - WHvResumePartitionTime(partition.param().abi()).ok() + WHvResumePartitionTime(core::mem::transmute(partition)).ok() } #[inline] -pub unsafe fn WHvRetargetVpciDeviceInterrupt(partition: P0, logicaldeviceid: u64, msiaddress: u64, msidata: u32, target: *const WHV_VPCI_INTERRUPT_TARGET) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvRetargetVpciDeviceInterrupt(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, msiaddress: u64, msidata: u32, target: *const WHV_VPCI_INTERRUPT_TARGET) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvRetargetVpciDeviceInterrupt(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, msiaddress : u64, msidata : u32, target : *const WHV_VPCI_INTERRUPT_TARGET) -> windows_core::HRESULT); - WHvRetargetVpciDeviceInterrupt(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(msiaddress), core::mem::transmute(msidata), core::mem::transmute(target)).ok() + WHvRetargetVpciDeviceInterrupt(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(msiaddress), core::mem::transmute(msidata), core::mem::transmute(target)).ok() } #[inline] -pub unsafe fn WHvRunVirtualProcessor(partition: P0, vpindex: u32, exitcontext: *mut core::ffi::c_void, exitcontextsizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvRunVirtualProcessor(partition: WHV_PARTITION_HANDLE, vpindex: u32, exitcontext: *mut core::ffi::c_void, exitcontextsizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvRunVirtualProcessor(partition : WHV_PARTITION_HANDLE, vpindex : u32, exitcontext : *mut core::ffi::c_void, exitcontextsizeinbytes : u32) -> windows_core::HRESULT); - WHvRunVirtualProcessor(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(exitcontext), core::mem::transmute(exitcontextsizeinbytes)).ok() + WHvRunVirtualProcessor(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(exitcontext), core::mem::transmute(exitcontextsizeinbytes)).ok() } #[inline] -pub unsafe fn WHvSetNotificationPortProperty(partition: P0, porthandle: *const core::ffi::c_void, propertycode: WHV_NOTIFICATION_PORT_PROPERTY_CODE, propertyvalue: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetNotificationPortProperty(partition: WHV_PARTITION_HANDLE, porthandle: *const core::ffi::c_void, propertycode: WHV_NOTIFICATION_PORT_PROPERTY_CODE, propertyvalue: u64) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetNotificationPortProperty(partition : WHV_PARTITION_HANDLE, porthandle : *const core::ffi::c_void, propertycode : WHV_NOTIFICATION_PORT_PROPERTY_CODE, propertyvalue : u64) -> windows_core::HRESULT); - WHvSetNotificationPortProperty(partition.param().abi(), core::mem::transmute(porthandle), core::mem::transmute(propertycode), core::mem::transmute(propertyvalue)).ok() + WHvSetNotificationPortProperty(core::mem::transmute(partition), core::mem::transmute(porthandle), core::mem::transmute(propertycode), core::mem::transmute(propertyvalue)).ok() } #[inline] -pub unsafe fn WHvSetPartitionProperty(partition: P0, propertycode: WHV_PARTITION_PROPERTY_CODE, propertybuffer: *const core::ffi::c_void, propertybuffersizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetPartitionProperty(partition: WHV_PARTITION_HANDLE, propertycode: WHV_PARTITION_PROPERTY_CODE, propertybuffer: *const core::ffi::c_void, propertybuffersizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetPartitionProperty(partition : WHV_PARTITION_HANDLE, propertycode : WHV_PARTITION_PROPERTY_CODE, propertybuffer : *const core::ffi::c_void, propertybuffersizeinbytes : u32) -> windows_core::HRESULT); - WHvSetPartitionProperty(partition.param().abi(), core::mem::transmute(propertycode), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersizeinbytes)).ok() + WHvSetPartitionProperty(core::mem::transmute(partition), core::mem::transmute(propertycode), core::mem::transmute(propertybuffer), core::mem::transmute(propertybuffersizeinbytes)).ok() } #[inline] -pub unsafe fn WHvSetVirtualProcessorInterruptControllerState(partition: P0, vpindex: u32, state: *const core::ffi::c_void, statesize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetVirtualProcessorInterruptControllerState(partition: WHV_PARTITION_HANDLE, vpindex: u32, state: *const core::ffi::c_void, statesize: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetVirtualProcessorInterruptControllerState(partition : WHV_PARTITION_HANDLE, vpindex : u32, state : *const core::ffi::c_void, statesize : u32) -> windows_core::HRESULT); - WHvSetVirtualProcessorInterruptControllerState(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(state), core::mem::transmute(statesize)).ok() + WHvSetVirtualProcessorInterruptControllerState(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(state), core::mem::transmute(statesize)).ok() } #[inline] -pub unsafe fn WHvSetVirtualProcessorInterruptControllerState2(partition: P0, vpindex: u32, state: *const core::ffi::c_void, statesize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetVirtualProcessorInterruptControllerState2(partition: WHV_PARTITION_HANDLE, vpindex: u32, state: *const core::ffi::c_void, statesize: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetVirtualProcessorInterruptControllerState2(partition : WHV_PARTITION_HANDLE, vpindex : u32, state : *const core::ffi::c_void, statesize : u32) -> windows_core::HRESULT); - WHvSetVirtualProcessorInterruptControllerState2(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(state), core::mem::transmute(statesize)).ok() + WHvSetVirtualProcessorInterruptControllerState2(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(state), core::mem::transmute(statesize)).ok() } #[inline] -pub unsafe fn WHvSetVirtualProcessorRegisters(partition: P0, vpindex: u32, registernames: *const WHV_REGISTER_NAME, registercount: u32, registervalues: *const WHV_REGISTER_VALUE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetVirtualProcessorRegisters(partition: WHV_PARTITION_HANDLE, vpindex: u32, registernames: *const WHV_REGISTER_NAME, registercount: u32, registervalues: *const WHV_REGISTER_VALUE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetVirtualProcessorRegisters(partition : WHV_PARTITION_HANDLE, vpindex : u32, registernames : *const WHV_REGISTER_NAME, registercount : u32, registervalues : *const WHV_REGISTER_VALUE) -> windows_core::HRESULT); - WHvSetVirtualProcessorRegisters(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(registernames), core::mem::transmute(registercount), core::mem::transmute(registervalues)).ok() + WHvSetVirtualProcessorRegisters(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(registernames), core::mem::transmute(registercount), core::mem::transmute(registervalues)).ok() } #[inline] -pub unsafe fn WHvSetVirtualProcessorState(partition: P0, vpindex: u32, statetype: WHV_VIRTUAL_PROCESSOR_STATE_TYPE, buffer: *const core::ffi::c_void, buffersizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetVirtualProcessorState(partition: WHV_PARTITION_HANDLE, vpindex: u32, statetype: WHV_VIRTUAL_PROCESSOR_STATE_TYPE, buffer: *const core::ffi::c_void, buffersizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetVirtualProcessorState(partition : WHV_PARTITION_HANDLE, vpindex : u32, statetype : WHV_VIRTUAL_PROCESSOR_STATE_TYPE, buffer : *const core::ffi::c_void, buffersizeinbytes : u32) -> windows_core::HRESULT); - WHvSetVirtualProcessorState(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(statetype), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes)).ok() + WHvSetVirtualProcessorState(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(statetype), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes)).ok() } #[inline] -pub unsafe fn WHvSetVirtualProcessorXsaveState(partition: P0, vpindex: u32, buffer: *const core::ffi::c_void, buffersizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetVirtualProcessorXsaveState(partition: WHV_PARTITION_HANDLE, vpindex: u32, buffer: *const core::ffi::c_void, buffersizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetVirtualProcessorXsaveState(partition : WHV_PARTITION_HANDLE, vpindex : u32, buffer : *const core::ffi::c_void, buffersizeinbytes : u32) -> windows_core::HRESULT); - WHvSetVirtualProcessorXsaveState(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes)).ok() + WHvSetVirtualProcessorXsaveState(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(buffer), core::mem::transmute(buffersizeinbytes)).ok() } #[cfg(feature = "Win32_System_Power")] #[inline] -pub unsafe fn WHvSetVpciDevicePowerState(partition: P0, logicaldeviceid: u64, powerstate: super::Power::DEVICE_POWER_STATE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetVpciDevicePowerState(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, powerstate: super::Power::DEVICE_POWER_STATE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetVpciDevicePowerState(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, powerstate : super::Power:: DEVICE_POWER_STATE) -> windows_core::HRESULT); - WHvSetVpciDevicePowerState(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(powerstate)).ok() + WHvSetVpciDevicePowerState(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(powerstate)).ok() } #[inline] -pub unsafe fn WHvSetupPartition(partition: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSetupPartition(partition: WHV_PARTITION_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSetupPartition(partition : WHV_PARTITION_HANDLE) -> windows_core::HRESULT); - WHvSetupPartition(partition.param().abi()).ok() + WHvSetupPartition(core::mem::transmute(partition)).ok() } #[inline] -pub unsafe fn WHvSignalVirtualProcessorSynicEvent(partition: P0, synicevent: WHV_SYNIC_EVENT_PARAMETERS, newlysignaled: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSignalVirtualProcessorSynicEvent(partition: WHV_PARTITION_HANDLE, synicevent: WHV_SYNIC_EVENT_PARAMETERS, newlysignaled: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + WHvSignalVirtualProcessorSynicEvent(core::mem::transmute(partition), core::mem::transmute(synicevent), core::mem::transmute(newlysignaled.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WHvStartPartitionMigration(partition: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WHvStartPartitionMigration(partition: WHV_PARTITION_HANDLE) -> windows_core::Result { windows_targets::link!("winhvplatform.dll" "system" fn WHvStartPartitionMigration(partition : WHV_PARTITION_HANDLE, migrationhandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WHvStartPartitionMigration(partition.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WHvStartPartitionMigration(core::mem::transmute(partition), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WHvSuspendPartitionTime(partition: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvSuspendPartitionTime(partition: WHV_PARTITION_HANDLE) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvSuspendPartitionTime(partition : WHV_PARTITION_HANDLE) -> windows_core::HRESULT); - WHvSuspendPartitionTime(partition.param().abi()).ok() + WHvSuspendPartitionTime(core::mem::transmute(partition)).ok() } #[inline] -pub unsafe fn WHvTranslateGva(partition: P0, vpindex: u32, gva: u64, translateflags: WHV_TRANSLATE_GVA_FLAGS, translationresult: *mut WHV_TRANSLATE_GVA_RESULT, gpa: *mut u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvTranslateGva(partition: WHV_PARTITION_HANDLE, vpindex: u32, gva: u64, translateflags: WHV_TRANSLATE_GVA_FLAGS, translationresult: *mut WHV_TRANSLATE_GVA_RESULT, gpa: *mut u64) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvTranslateGva(partition : WHV_PARTITION_HANDLE, vpindex : u32, gva : u64, translateflags : WHV_TRANSLATE_GVA_FLAGS, translationresult : *mut WHV_TRANSLATE_GVA_RESULT, gpa : *mut u64) -> windows_core::HRESULT); - WHvTranslateGva(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(gva), core::mem::transmute(translateflags), core::mem::transmute(translationresult), core::mem::transmute(gpa)).ok() + WHvTranslateGva(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(gva), core::mem::transmute(translateflags), core::mem::transmute(translationresult), core::mem::transmute(gpa)).ok() } #[inline] -pub unsafe fn WHvUnmapGpaRange(partition: P0, guestaddress: u64, sizeinbytes: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvUnmapGpaRange(partition: WHV_PARTITION_HANDLE, guestaddress: u64, sizeinbytes: u64) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvUnmapGpaRange(partition : WHV_PARTITION_HANDLE, guestaddress : u64, sizeinbytes : u64) -> windows_core::HRESULT); - WHvUnmapGpaRange(partition.param().abi(), core::mem::transmute(guestaddress), core::mem::transmute(sizeinbytes)).ok() + WHvUnmapGpaRange(core::mem::transmute(partition), core::mem::transmute(guestaddress), core::mem::transmute(sizeinbytes)).ok() } #[inline] -pub unsafe fn WHvUnmapVpciDeviceInterrupt(partition: P0, logicaldeviceid: u64, index: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvUnmapVpciDeviceInterrupt(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, index: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvUnmapVpciDeviceInterrupt(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, index : u32) -> windows_core::HRESULT); - WHvUnmapVpciDeviceInterrupt(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(index)).ok() + WHvUnmapVpciDeviceInterrupt(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(index)).ok() } #[inline] -pub unsafe fn WHvUnmapVpciDeviceMmioRanges(partition: P0, logicaldeviceid: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvUnmapVpciDeviceMmioRanges(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvUnmapVpciDeviceMmioRanges(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64) -> windows_core::HRESULT); - WHvUnmapVpciDeviceMmioRanges(partition.param().abi(), core::mem::transmute(logicaldeviceid)).ok() + WHvUnmapVpciDeviceMmioRanges(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid)).ok() } #[inline] -pub unsafe fn WHvUnregisterPartitionDoorbellEvent(partition: P0, matchdata: *const WHV_DOORBELL_MATCH_DATA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvUnregisterPartitionDoorbellEvent(partition: WHV_PARTITION_HANDLE, matchdata: *const WHV_DOORBELL_MATCH_DATA) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvUnregisterPartitionDoorbellEvent(partition : WHV_PARTITION_HANDLE, matchdata : *const WHV_DOORBELL_MATCH_DATA) -> windows_core::HRESULT); - WHvUnregisterPartitionDoorbellEvent(partition.param().abi(), core::mem::transmute(matchdata)).ok() + WHvUnregisterPartitionDoorbellEvent(core::mem::transmute(partition), core::mem::transmute(matchdata)).ok() } #[inline] -pub unsafe fn WHvUpdateTriggerParameters(partition: P0, parameters: *const WHV_TRIGGER_PARAMETERS, triggerhandle: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvUpdateTriggerParameters(partition: WHV_PARTITION_HANDLE, parameters: *const WHV_TRIGGER_PARAMETERS, triggerhandle: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvUpdateTriggerParameters(partition : WHV_PARTITION_HANDLE, parameters : *const WHV_TRIGGER_PARAMETERS, triggerhandle : *const core::ffi::c_void) -> windows_core::HRESULT); - WHvUpdateTriggerParameters(partition.param().abi(), core::mem::transmute(parameters), core::mem::transmute(triggerhandle)).ok() + WHvUpdateTriggerParameters(core::mem::transmute(partition), core::mem::transmute(parameters), core::mem::transmute(triggerhandle)).ok() } #[inline] -pub unsafe fn WHvWriteGpaRange(partition: P0, vpindex: u32, guestaddress: u64, controls: WHV_ACCESS_GPA_CONTROLS, data: *const core::ffi::c_void, datasizeinbytes: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvWriteGpaRange(partition: WHV_PARTITION_HANDLE, vpindex: u32, guestaddress: u64, controls: WHV_ACCESS_GPA_CONTROLS, data: *const core::ffi::c_void, datasizeinbytes: u32) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvWriteGpaRange(partition : WHV_PARTITION_HANDLE, vpindex : u32, guestaddress : u64, controls : WHV_ACCESS_GPA_CONTROLS, data : *const core::ffi::c_void, datasizeinbytes : u32) -> windows_core::HRESULT); - WHvWriteGpaRange(partition.param().abi(), core::mem::transmute(vpindex), core::mem::transmute(guestaddress), core::mem::transmute(controls), core::mem::transmute(data), core::mem::transmute(datasizeinbytes)).ok() + WHvWriteGpaRange(core::mem::transmute(partition), core::mem::transmute(vpindex), core::mem::transmute(guestaddress), core::mem::transmute(controls), core::mem::transmute(data), core::mem::transmute(datasizeinbytes)).ok() } #[inline] -pub unsafe fn WHvWriteVpciDeviceRegister(partition: P0, logicaldeviceid: u64, register: *const WHV_VPCI_DEVICE_REGISTER, data: *const core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WHvWriteVpciDeviceRegister(partition: WHV_PARTITION_HANDLE, logicaldeviceid: u64, register: *const WHV_VPCI_DEVICE_REGISTER, data: *const core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvWriteVpciDeviceRegister(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, register : *const WHV_VPCI_DEVICE_REGISTER, data : *const core::ffi::c_void) -> windows_core::HRESULT); - WHvWriteVpciDeviceRegister(partition.param().abi(), core::mem::transmute(logicaldeviceid), core::mem::transmute(register), core::mem::transmute(data)).ok() + WHvWriteVpciDeviceRegister(core::mem::transmute(partition), core::mem::transmute(logicaldeviceid), core::mem::transmute(register), core::mem::transmute(data)).ok() } pub const ARM64_RegisterActlrEl1: REGISTER_ID = REGISTER_ID(145i32); pub const ARM64_RegisterAmairEl1: REGISTER_ID = REGISTER_ID(148i32); 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 8070ffe002..645519b438 100644 --- a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs @@ -1,95 +1,67 @@ #[inline] -pub unsafe fn BindIoCompletionCallback(filehandle: P0, function: LPOVERLAPPED_COMPLETION_ROUTINE, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BindIoCompletionCallback(filehandle: super::super::Foundation::HANDLE, function: LPOVERLAPPED_COMPLETION_ROUTINE, flags: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn BindIoCompletionCallback(filehandle : super::super::Foundation:: HANDLE, function : LPOVERLAPPED_COMPLETION_ROUTINE, flags : u32) -> super::super::Foundation:: BOOL); - BindIoCompletionCallback(filehandle.param().abi(), core::mem::transmute(function), core::mem::transmute(flags)).ok() + BindIoCompletionCallback(core::mem::transmute(filehandle), core::mem::transmute(function), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn CancelIo(hfile: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CancelIo(hfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CancelIo(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CancelIo(hfile.param().abi()).ok() + CancelIo(core::mem::transmute(hfile)).ok() } #[inline] -pub unsafe fn CancelIoEx(hfile: P0, lpoverlapped: Option<*const OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CancelIoEx(hfile: super::super::Foundation::HANDLE, lpoverlapped: Option<*const OVERLAPPED>) -> windows_core::Result<()> { 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(core::ptr::null()))).ok() + CancelIoEx(core::mem::transmute(hfile), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CancelSynchronousIo(hthread: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CancelSynchronousIo(hthread: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CancelSynchronousIo(hthread : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CancelSynchronousIo(hthread.param().abi()).ok() + CancelSynchronousIo(core::mem::transmute(hthread)).ok() } #[inline] -pub unsafe fn CreateIoCompletionPort(filehandle: P0, existingcompletionport: P1, completionkey: usize, numberofconcurrentthreads: u32) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CreateIoCompletionPort(filehandle: super::super::Foundation::HANDLE, existingcompletionport: Option, completionkey: usize, numberofconcurrentthreads: u32) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateIoCompletionPort(filehandle : super::super::Foundation:: HANDLE, existingcompletionport : super::super::Foundation:: HANDLE, completionkey : usize, numberofconcurrentthreads : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateIoCompletionPort(filehandle.param().abi(), existingcompletionport.param().abi(), core::mem::transmute(completionkey), core::mem::transmute(numberofconcurrentthreads)); + let result__ = CreateIoCompletionPort(core::mem::transmute(filehandle), core::mem::transmute(existingcompletionport.unwrap_or(core::mem::zeroed())), core::mem::transmute(completionkey), core::mem::transmute(numberofconcurrentthreads)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn DeviceIoControl(hdevice: P0, dwiocontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DeviceIoControl(hdevice: super::super::Foundation::HANDLE, dwiocontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwiocontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() + DeviceIoControl(core::mem::transmute(hdevice), core::mem::transmute(dwiocontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetOverlappedResult(hfile: P0, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P3) -> windows_core::Result<()> +pub unsafe fn GetOverlappedResult(hfile: super::super::Foundation::HANDLE, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetOverlappedResult(hfile : super::super::Foundation:: HANDLE, lpoverlapped : *const OVERLAPPED, lpnumberofbytestransferred : *mut u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetOverlappedResult(hfile.param().abi(), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.param().abi()).ok() + GetOverlappedResult(core::mem::transmute(hfile), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.param().abi()).ok() } #[inline] -pub unsafe fn GetOverlappedResultEx(hfile: P0, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, dwmilliseconds: u32, balertable: P4) -> windows_core::Result<()> +pub unsafe fn GetOverlappedResultEx(hfile: super::super::Foundation::HANDLE, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, dwmilliseconds: u32, balertable: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetOverlappedResultEx(hfile : super::super::Foundation:: HANDLE, lpoverlapped : *const OVERLAPPED, lpnumberofbytestransferred : *mut u32, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetOverlappedResultEx(hfile.param().abi(), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), core::mem::transmute(dwmilliseconds), balertable.param().abi()).ok() + GetOverlappedResultEx(core::mem::transmute(hfile), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), core::mem::transmute(dwmilliseconds), balertable.param().abi()).ok() } #[inline] -pub unsafe fn GetQueuedCompletionStatus(completionport: P0, lpnumberofbytestransferred: *mut u32, lpcompletionkey: *mut usize, lpoverlapped: *mut *mut OVERLAPPED, dwmilliseconds: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetQueuedCompletionStatus(completionport: super::super::Foundation::HANDLE, lpnumberofbytestransferred: *mut u32, lpcompletionkey: *mut usize, lpoverlapped: *mut *mut OVERLAPPED, dwmilliseconds: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetQueuedCompletionStatus(completionport : super::super::Foundation:: HANDLE, lpnumberofbytestransferred : *mut u32, lpcompletionkey : *mut usize, lpoverlapped : *mut *mut OVERLAPPED, dwmilliseconds : u32) -> super::super::Foundation:: BOOL); - GetQueuedCompletionStatus(completionport.param().abi(), core::mem::transmute(lpnumberofbytestransferred), core::mem::transmute(lpcompletionkey), core::mem::transmute(lpoverlapped), core::mem::transmute(dwmilliseconds)).ok() + GetQueuedCompletionStatus(core::mem::transmute(completionport), core::mem::transmute(lpnumberofbytestransferred), core::mem::transmute(lpcompletionkey), core::mem::transmute(lpoverlapped), core::mem::transmute(dwmilliseconds)).ok() } #[inline] -pub unsafe fn GetQueuedCompletionStatusEx(completionport: P0, lpcompletionportentries: &mut [OVERLAPPED_ENTRY], ulnumentriesremoved: *mut u32, dwmilliseconds: u32, falertable: P5) -> windows_core::Result<()> +pub unsafe fn GetQueuedCompletionStatusEx(completionport: super::super::Foundation::HANDLE, lpcompletionportentries: &mut [OVERLAPPED_ENTRY], ulnumentriesremoved: *mut u32, dwmilliseconds: u32, falertable: P5) -> windows_core::Result<()> where - P0: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetQueuedCompletionStatusEx(completionport : super::super::Foundation:: HANDLE, lpcompletionportentries : *mut OVERLAPPED_ENTRY, ulcount : u32, ulnumentriesremoved : *mut u32, dwmilliseconds : u32, falertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetQueuedCompletionStatusEx(completionport.param().abi(), core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len().try_into().unwrap(), core::mem::transmute(ulnumentriesremoved), core::mem::transmute(dwmilliseconds), falertable.param().abi()).ok() + GetQueuedCompletionStatusEx(core::mem::transmute(completionport), core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len().try_into().unwrap(), core::mem::transmute(ulnumentriesremoved), core::mem::transmute(dwmilliseconds), falertable.param().abi()).ok() } #[inline] -pub unsafe fn PostQueuedCompletionStatus(completionport: P0, dwnumberofbytestransferred: u32, dwcompletionkey: usize, lpoverlapped: Option<*const OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PostQueuedCompletionStatus(completionport: super::super::Foundation::HANDLE, dwnumberofbytestransferred: u32, dwcompletionkey: usize, lpoverlapped: Option<*const OVERLAPPED>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwnumberofbytestransferred), core::mem::transmute(dwcompletionkey), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() + PostQueuedCompletionStatus(core::mem::transmute(completionport), core::mem::transmute(dwnumberofbytestransferred), core::mem::transmute(dwcompletionkey), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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 894cd76906..c0133d1851 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs @@ -1712,7 +1712,7 @@ impl IMSAdminBase3W { where P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetChildPaths)(windows_core::Interface::as_raw(self), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetChildPaths)(windows_core::Interface::as_raw(self), core::mem::transmute(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::mem::zeroed()))).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 f0d139932e..3cb3be381e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs @@ -1,11 +1,7 @@ #[inline] -pub unsafe fn AssignProcessToJobObject(hjob: P0, hprocess: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AssignProcessToJobObject(hjob: super::super::Foundation::HANDLE, hprocess: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn AssignProcessToJobObject(hjob : super::super::Foundation:: HANDLE, hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AssignProcessToJobObject(hjob.param().abi(), hprocess.param().abi()).ok() + AssignProcessToJobObject(core::mem::transmute(hjob), core::mem::transmute(hprocess)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -14,7 +10,7 @@ where P1: 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(core::ptr::null())), lpname.param().abi()); + let result__ = CreateJobObjectA(core::mem::transmute(lpjobattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -24,7 +20,7 @@ where P1: 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(core::ptr::null())), lpname.param().abi()); + let result__ = CreateJobObjectW(core::mem::transmute(lpjobattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -38,13 +34,9 @@ pub unsafe fn FreeMemoryJobObject(buffer: *const core::ffi::c_void) { FreeMemoryJobObject(core::mem::transmute(buffer)) } #[inline] -pub unsafe fn IsProcessInJob(processhandle: P0, jobhandle: P1, result: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IsProcessInJob(processhandle: super::super::Foundation::HANDLE, jobhandle: Option, result: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn IsProcessInJob(processhandle : super::super::Foundation:: HANDLE, jobhandle : super::super::Foundation:: HANDLE, result : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - IsProcessInJob(processhandle.param().abi(), jobhandle.param().abi(), core::mem::transmute(result)).ok() + IsProcessInJob(core::mem::transmute(processhandle), core::mem::transmute(jobhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(result)).ok() } #[inline] pub unsafe fn OpenJobObjectA(dwdesiredaccess: u32, binherithandle: P1, lpname: P2) -> windows_core::Result @@ -67,55 +59,40 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn QueryInformationJobObject(hjob: P0, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *mut core::ffi::c_void, cbjobobjectinformationlength: u32, lpreturnlength: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryInformationJobObject(hjob: Option, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *mut core::ffi::c_void, cbjobobjectinformationlength: u32, lpreturnlength: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(jobobjectinformationclass), core::mem::transmute(lpjobobjectinformation), core::mem::transmute(cbjobobjectinformationlength), core::mem::transmute(lpreturnlength.unwrap_or(core::ptr::null_mut()))).ok() + QueryInformationJobObject(core::mem::transmute(hjob.unwrap_or(core::mem::zeroed())), core::mem::transmute(jobobjectinformationclass), core::mem::transmute(lpjobobjectinformation), core::mem::transmute(cbjobobjectinformationlength), core::mem::transmute(lpreturnlength.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn QueryIoRateControlInformationJobObject(hjob: P0, volumename: P1, infoblocks: *mut *mut JOBOBJECT_IO_RATE_CONTROL_INFORMATION, infoblockcount: *mut u32) -> u32 +pub unsafe fn QueryIoRateControlInformationJobObject(hjob: Option, volumename: P1, infoblocks: *mut *mut JOBOBJECT_IO_RATE_CONTROL_INFORMATION, infoblockcount: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn QueryIoRateControlInformationJobObject(hjob : super::super::Foundation:: HANDLE, volumename : windows_core::PCWSTR, infoblocks : *mut *mut JOBOBJECT_IO_RATE_CONTROL_INFORMATION, infoblockcount : *mut u32) -> u32); - QueryIoRateControlInformationJobObject(hjob.param().abi(), volumename.param().abi(), core::mem::transmute(infoblocks), core::mem::transmute(infoblockcount)) + QueryIoRateControlInformationJobObject(core::mem::transmute(hjob.unwrap_or(core::mem::zeroed())), volumename.param().abi(), core::mem::transmute(infoblocks), core::mem::transmute(infoblockcount)) } #[inline] -pub unsafe fn SetInformationJobObject(hjob: P0, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *const core::ffi::c_void, cbjobobjectinformationlength: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetInformationJobObject(hjob: super::super::Foundation::HANDLE, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *const core::ffi::c_void, cbjobobjectinformationlength: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetInformationJobObject(hjob : super::super::Foundation:: HANDLE, jobobjectinformationclass : JOBOBJECTINFOCLASS, lpjobobjectinformation : *const core::ffi::c_void, cbjobobjectinformationlength : u32) -> super::super::Foundation:: BOOL); - SetInformationJobObject(hjob.param().abi(), core::mem::transmute(jobobjectinformationclass), core::mem::transmute(lpjobobjectinformation), core::mem::transmute(cbjobobjectinformationlength)).ok() + SetInformationJobObject(core::mem::transmute(hjob), core::mem::transmute(jobobjectinformationclass), core::mem::transmute(lpjobobjectinformation), core::mem::transmute(cbjobobjectinformationlength)).ok() } #[inline] -pub unsafe fn SetIoRateControlInformationJobObject(hjob: P0, ioratecontrolinfo: *const JOBOBJECT_IO_RATE_CONTROL_INFORMATION) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetIoRateControlInformationJobObject(hjob: super::super::Foundation::HANDLE, ioratecontrolinfo: *const JOBOBJECT_IO_RATE_CONTROL_INFORMATION) -> u32 { windows_targets::link!("kernel32.dll" "system" fn SetIoRateControlInformationJobObject(hjob : super::super::Foundation:: HANDLE, ioratecontrolinfo : *const JOBOBJECT_IO_RATE_CONTROL_INFORMATION) -> u32); - SetIoRateControlInformationJobObject(hjob.param().abi(), core::mem::transmute(ioratecontrolinfo)) + SetIoRateControlInformationJobObject(core::mem::transmute(hjob), core::mem::transmute(ioratecontrolinfo)) } #[inline] -pub unsafe fn TerminateJobObject(hjob: P0, uexitcode: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TerminateJobObject(hjob: super::super::Foundation::HANDLE, uexitcode: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn TerminateJobObject(hjob : super::super::Foundation:: HANDLE, uexitcode : u32) -> super::super::Foundation:: BOOL); - TerminateJobObject(hjob.param().abi(), core::mem::transmute(uexitcode)).ok() + TerminateJobObject(core::mem::transmute(hjob), core::mem::transmute(uexitcode)).ok() } #[inline] -pub unsafe fn UserHandleGrantAccess(huserhandle: P0, hjob: P1, bgrant: P2) -> windows_core::Result<()> +pub unsafe fn UserHandleGrantAccess(huserhandle: super::super::Foundation::HANDLE, hjob: super::super::Foundation::HANDLE, bgrant: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn UserHandleGrantAccess(huserhandle : super::super::Foundation:: HANDLE, hjob : super::super::Foundation:: HANDLE, bgrant : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UserHandleGrantAccess(huserhandle.param().abi(), hjob.param().abi(), bgrant.param().abi()).ok() + UserHandleGrantAccess(core::mem::transmute(huserhandle), core::mem::transmute(hjob), bgrant.param().abi()).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 23fe1ecc66..e22bcea801 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(core::mem::transmute(r#ref), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) + JsAddRef(core::mem::transmute(r#ref), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(function), core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), core::mem::transmute(result.unwrap_or(core::ptr::null_mut()))) + JsCallFunction(core::mem::transmute(function), core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), core::mem::transmute(result.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn JsCollectGarbage(runtime: *const core::ffi::c_void) -> JsErrorCode { @@ -79,14 +79,14 @@ pub unsafe fn JsCreateError(message: *const core::ffi::c_void, error: *mut *mut JsCreateError(core::mem::transmute(message), core::mem::transmute(error)) } #[inline] -pub unsafe fn JsCreateExternalObject(data: Option<*const core::ffi::c_void>, finalizecallback: JsFinalizeCallback, object: *mut *mut core::ffi::c_void) -> JsErrorCode { +pub unsafe fn JsCreateExternalObject(data: Option<*const core::ffi::c_void>, finalizecallback: Option, 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(core::ptr::null())), core::mem::transmute(finalizecallback), core::mem::transmute(object)) + JsCreateExternalObject(core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(finalizecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(nativefunction), core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(function)) + JsCreateFunction(core::mem::transmute(nativefunction), core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(function)) } #[inline] pub unsafe fn JsCreateObject(object: *mut *mut core::ffi::c_void) -> JsErrorCode { @@ -104,9 +104,9 @@ pub unsafe fn JsCreateReferenceError(message: *const core::ffi::c_void, error: * JsCreateReferenceError(core::mem::transmute(message), core::mem::transmute(error)) } #[inline] -pub unsafe fn JsCreateRuntime(attributes: JsRuntimeAttributes, runtimeversion: JsRuntimeVersion, threadservice: JsThreadServiceCallback, runtime: *mut *mut core::ffi::c_void) -> JsErrorCode { +pub unsafe fn JsCreateRuntime(attributes: JsRuntimeAttributes, runtimeversion: JsRuntimeVersion, threadservice: Option, runtime: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateRuntime(attributes : JsRuntimeAttributes, runtimeversion : JsRuntimeVersion, threadservice : JsThreadServiceCallback, runtime : *mut *mut core::ffi::c_void) -> JsErrorCode); - JsCreateRuntime(core::mem::transmute(attributes), core::mem::transmute(runtimeversion), core::mem::transmute(threadservice), core::mem::transmute(runtime)) + JsCreateRuntime(core::mem::transmute(attributes), core::mem::transmute(runtimeversion), core::mem::transmute(threadservice.unwrap_or(core::mem::zeroed())), core::mem::transmute(runtime)) } #[inline] pub unsafe fn JsCreateSyntaxError(message: *const core::ffi::c_void, error: *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(core::ptr::null_mut()))) + JsIdle(core::mem::transmute(nextidletick.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(r#ref), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) + JsRelease(core::mem::transmute(r#ref), core::mem::transmute(count.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn JsRunScript(script: P0, sourcecontext: usize, sourceurl: P2, 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(core::ptr::null_mut())), core::mem::transmute(buffersize)) + JsSerializeScript(script.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(object), core::mem::transmute(externaldata.unwrap_or(core::ptr::null()))) + JsSetExternalData(core::mem::transmute(object), core::mem::transmute(externaldata.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(runtime), core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(beforecollectcallback)) + JsSetRuntimeBeforeCollectCallback(core::mem::transmute(runtime), core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(runtime), core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(allocationcallback)) + JsSetRuntimeMemoryAllocationCallback(core::mem::transmute(runtime), core::mem::transmute(callbackstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 3357285a48..41fe4a39d3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs @@ -27,196 +27,161 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn DisableThreadLibraryCalls(hlibmodule: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DisableThreadLibraryCalls(hlibmodule: super::super::Foundation::HMODULE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DisableThreadLibraryCalls(hlibmodule : super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - DisableThreadLibraryCalls(hlibmodule.param().abi()).ok() + DisableThreadLibraryCalls(core::mem::transmute(hlibmodule)).ok() } #[inline] -pub unsafe fn EndUpdateResourceA(hupdate: P0, fdiscard: P1) -> windows_core::Result<()> +pub unsafe fn EndUpdateResourceA(hupdate: super::super::Foundation::HANDLE, fdiscard: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EndUpdateResourceA(hupdate : super::super::Foundation:: HANDLE, fdiscard : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EndUpdateResourceA(hupdate.param().abi(), fdiscard.param().abi()).ok() + EndUpdateResourceA(core::mem::transmute(hupdate), fdiscard.param().abi()).ok() } #[inline] -pub unsafe fn EndUpdateResourceW(hupdate: P0, fdiscard: P1) -> windows_core::Result<()> +pub unsafe fn EndUpdateResourceW(hupdate: super::super::Foundation::HANDLE, fdiscard: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EndUpdateResourceW(hupdate : super::super::Foundation:: HANDLE, fdiscard : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EndUpdateResourceW(hupdate.param().abi(), fdiscard.param().abi()).ok() + EndUpdateResourceW(core::mem::transmute(hupdate), fdiscard.param().abi()).ok() } #[inline] -pub unsafe fn EnumResourceLanguagesA(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: isize) -> windows_core::Result<()> +pub unsafe fn EnumResourceLanguagesA(hmodule: Option, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: isize) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumResourceLanguagesA(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCSTR, lpname : windows_core::PCSTR, lpenumfunc : ENUMRESLANGPROCA, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceLanguagesA(hmodule.param().abi(), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() + EnumResourceLanguagesA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn EnumResourceLanguagesExA(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> +pub unsafe fn EnumResourceLanguagesExA(hmodule: Option, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: Option, dwflags: u32, langid: u16) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumResourceLanguagesExA(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCSTR, lpname : windows_core::PCSTR, lpenumfunc : ENUMRESLANGPROCA, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceLanguagesExA(hmodule.param().abi(), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() + EnumResourceLanguagesExA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() } #[inline] -pub unsafe fn EnumResourceLanguagesExW(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> +pub unsafe fn EnumResourceLanguagesExW(hmodule: Option, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: Option, dwflags: u32, langid: u16) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumResourceLanguagesExW(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCWSTR, lpname : windows_core::PCWSTR, lpenumfunc : ENUMRESLANGPROCW, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceLanguagesExW(hmodule.param().abi(), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() + EnumResourceLanguagesExW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() } #[inline] -pub unsafe fn EnumResourceLanguagesW(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: isize) -> windows_core::Result<()> +pub unsafe fn EnumResourceLanguagesW(hmodule: Option, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: isize) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumResourceLanguagesW(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCWSTR, lpname : windows_core::PCWSTR, lpenumfunc : ENUMRESLANGPROCW, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceLanguagesW(hmodule.param().abi(), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() + EnumResourceLanguagesW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn EnumResourceNamesA(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize) -> windows_core::Result<()> +pub unsafe fn EnumResourceNamesA(hmodule: Option, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumResourceNamesA(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCSTR, lpenumfunc : ENUMRESNAMEPROCA, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceNamesA(hmodule.param().abi(), lptype.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() + EnumResourceNamesA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn EnumResourceNamesExA(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> +pub unsafe fn EnumResourceNamesExA(hmodule: Option, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumResourceNamesExA(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCSTR, lpenumfunc : ENUMRESNAMEPROCA, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceNamesExA(hmodule.param().abi(), lptype.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() + EnumResourceNamesExA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() } #[inline] -pub unsafe fn EnumResourceNamesExW(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCW, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> +pub unsafe fn EnumResourceNamesExW(hmodule: Option, lptype: P1, lpenumfunc: ENUMRESNAMEPROCW, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumResourceNamesExW(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCWSTR, lpenumfunc : ENUMRESNAMEPROCW, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceNamesExW(hmodule.param().abi(), lptype.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() + EnumResourceNamesExW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() } #[inline] -pub unsafe fn EnumResourceNamesW(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCW, lparam: isize) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceNamesW(hmodule: Option, lptype: P1, lpenumfunc: ENUMRESNAMEPROCW, lparam: isize) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn EnumResourceNamesW(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCWSTR, lpenumfunc : ENUMRESNAMEPROCW, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceNamesW(hmodule.param().abi(), lptype.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)) + EnumResourceNamesW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumResourceTypesA(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCA, lparam: isize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumResourceTypesA(hmodule: Option, lpenumfunc: ENUMRESTYPEPROCA, lparam: isize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn EnumResourceTypesA(hmodule : super::super::Foundation:: HMODULE, lpenumfunc : ENUMRESTYPEPROCA, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceTypesA(hmodule.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() + EnumResourceTypesA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn EnumResourceTypesExA(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCA, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumResourceTypesExA(hmodule: Option, lpenumfunc: ENUMRESTYPEPROCA, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn EnumResourceTypesExA(hmodule : super::super::Foundation:: HMODULE, lpenumfunc : ENUMRESTYPEPROCA, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceTypesExA(hmodule.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() + EnumResourceTypesExA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() } #[inline] -pub unsafe fn EnumResourceTypesExW(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCW, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumResourceTypesExW(hmodule: Option, lpenumfunc: ENUMRESTYPEPROCW, lparam: isize, dwflags: u32, langid: u16) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn EnumResourceTypesExW(hmodule : super::super::Foundation:: HMODULE, lpenumfunc : ENUMRESTYPEPROCW, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceTypesExW(hmodule.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() + EnumResourceTypesExW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam), core::mem::transmute(dwflags), core::mem::transmute(langid)).ok() } #[inline] -pub unsafe fn EnumResourceTypesW(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCW, lparam: isize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumResourceTypesW(hmodule: Option, lpenumfunc: ENUMRESTYPEPROCW, lparam: isize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn EnumResourceTypesW(hmodule : super::super::Foundation:: HMODULE, lpenumfunc : ENUMRESTYPEPROCW, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceTypesW(hmodule.param().abi(), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() + EnumResourceTypesW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn FindResourceA(hmodule: P0, lpname: P1, lptype: P2) -> windows_core::Result +pub unsafe fn FindResourceA(hmodule: Option, lpname: P1, lptype: P2) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindResourceA(hmodule : super::super::Foundation:: HMODULE, lpname : windows_core::PCSTR, lptype : windows_core::PCSTR) -> super::super::Foundation:: HRSRC); - let result__ = FindResourceA(hmodule.param().abi(), lpname.param().abi(), lptype.param().abi()); + let result__ = FindResourceA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lpname.param().abi(), lptype.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindResourceExA(hmodule: P0, lptype: P1, lpname: P2, wlanguage: u16) -> windows_core::Result +pub unsafe fn FindResourceExA(hmodule: Option, lptype: P1, lpname: P2, wlanguage: u16) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindResourceExA(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCSTR, lpname : windows_core::PCSTR, wlanguage : u16) -> super::super::Foundation:: HRSRC); - let result__ = FindResourceExA(hmodule.param().abi(), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(wlanguage)); + let result__ = FindResourceExA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(wlanguage)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindResourceExW(hmodule: P0, lptype: P1, lpname: P2, wlanguage: u16) -> super::super::Foundation::HRSRC +pub unsafe fn FindResourceExW(hmodule: Option, lptype: P1, lpname: P2, wlanguage: u16) -> super::super::Foundation::HRSRC where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindResourceExW(hmodule : super::super::Foundation:: HMODULE, lptype : windows_core::PCWSTR, lpname : windows_core::PCWSTR, wlanguage : u16) -> super::super::Foundation:: HRSRC); - FindResourceExW(hmodule.param().abi(), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(wlanguage)) + FindResourceExW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(wlanguage)) } #[inline] -pub unsafe fn FindResourceW(hmodule: P0, lpname: P1, lptype: P2) -> super::super::Foundation::HRSRC +pub unsafe fn FindResourceW(hmodule: Option, lpname: P1, lptype: P2) -> super::super::Foundation::HRSRC where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindResourceW(hmodule : super::super::Foundation:: HMODULE, lpname : windows_core::PCWSTR, lptype : windows_core::PCWSTR) -> super::super::Foundation:: HRSRC); - FindResourceW(hmodule.param().abi(), lpname.param().abi(), lptype.param().abi()) + FindResourceW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), lpname.param().abi(), lptype.param().abi()) } #[inline] -pub unsafe fn FreeLibraryAndExitThread(hlibmodule: P0, dwexitcode: u32) -> ! -where - P0: windows_core::Param, -{ +pub unsafe fn FreeLibraryAndExitThread(hlibmodule: super::super::Foundation::HMODULE, dwexitcode: u32) -> ! { windows_targets::link!("kernel32.dll" "system" fn FreeLibraryAndExitThread(hlibmodule : super::super::Foundation:: HMODULE, dwexitcode : u32) -> !); - FreeLibraryAndExitThread(hlibmodule.param().abi(), core::mem::transmute(dwexitcode)) + FreeLibraryAndExitThread(core::mem::transmute(hlibmodule), core::mem::transmute(dwexitcode)) } #[inline] -pub unsafe fn FreeResource(hresdata: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FreeResource(hresdata: super::super::Foundation::HGLOBAL) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn FreeResource(hresdata : super::super::Foundation:: HGLOBAL) -> super::super::Foundation:: BOOL); - FreeResource(hresdata.param().abi()) + FreeResource(core::mem::transmute(hresdata)) } #[inline] pub unsafe fn GetDllDirectoryA(lpbuffer: Option<&mut [u8]>) -> u32 { @@ -229,20 +194,14 @@ pub unsafe fn GetDllDirectoryW(lpbuffer: Option<&mut [u16]>) -> u32 { GetDllDirectoryW(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()))) } #[inline] -pub unsafe fn GetModuleFileNameA(hmodule: P0, lpfilename: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetModuleFileNameA(hmodule: Option, lpfilename: &mut [u8]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetModuleFileNameA(hmodule : super::super::Foundation:: HMODULE, lpfilename : windows_core::PSTR, nsize : u32) -> u32); - GetModuleFileNameA(hmodule.param().abi(), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + GetModuleFileNameA(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetModuleFileNameW(hmodule: P0, lpfilename: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetModuleFileNameW(hmodule: Option, lpfilename: &mut [u16]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetModuleFileNameW(hmodule : super::super::Foundation:: HMODULE, lpfilename : windows_core::PWSTR, nsize : u32) -> u32); - GetModuleFileNameW(hmodule.param().abi(), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + GetModuleFileNameW(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] pub unsafe fn GetModuleHandleA(lpmodulename: P0) -> windows_core::Result @@ -279,13 +238,12 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetProcAddress(hmodule: P0, lpprocname: P1) -> super::super::Foundation::FARPROC +pub unsafe fn GetProcAddress(hmodule: super::super::Foundation::HMODULE, lpprocname: P1) -> super::super::Foundation::FARPROC where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetProcAddress(hmodule : super::super::Foundation:: HMODULE, lpprocname : windows_core::PCSTR) -> super::super::Foundation:: FARPROC); - GetProcAddress(hmodule.param().abi(), lpprocname.param().abi()) + GetProcAddress(core::mem::transmute(hmodule), lpprocname.param().abi()) } #[inline] pub unsafe fn LoadLibraryA(lplibfilename: P0) -> windows_core::Result @@ -297,23 +255,21 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadLibraryExA(lplibfilename: P0, hfile: P1, dwflags: LOAD_LIBRARY_FLAGS) -> windows_core::Result +pub unsafe fn LoadLibraryExA(lplibfilename: P0, hfile: Option, dwflags: LOAD_LIBRARY_FLAGS) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn LoadLibraryExA(lplibfilename : windows_core::PCSTR, hfile : super::super::Foundation:: HANDLE, dwflags : LOAD_LIBRARY_FLAGS) -> super::super::Foundation:: HMODULE); - let result__ = LoadLibraryExA(lplibfilename.param().abi(), hfile.param().abi(), core::mem::transmute(dwflags)); + let result__ = LoadLibraryExA(lplibfilename.param().abi(), core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadLibraryExW(lplibfilename: P0, hfile: P1, dwflags: LOAD_LIBRARY_FLAGS) -> windows_core::Result +pub unsafe fn LoadLibraryExW(lplibfilename: P0, hfile: Option, dwflags: LOAD_LIBRARY_FLAGS) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn LoadLibraryExW(lplibfilename : windows_core::PCWSTR, hfile : super::super::Foundation:: HANDLE, dwflags : LOAD_LIBRARY_FLAGS) -> super::super::Foundation:: HMODULE); - let result__ = LoadLibraryExW(lplibfilename.param().abi(), hfile.param().abi(), core::mem::transmute(dwflags)); + let result__ = LoadLibraryExW(lplibfilename.param().abi(), core::mem::transmute(hfile.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -334,41 +290,33 @@ where LoadModule(lpmodulename.param().abi(), core::mem::transmute(lpparameterblock)) } #[inline] -pub unsafe fn LoadPackagedLibrary(lpwlibfilename: P0, reserved: u32) -> windows_core::Result +pub unsafe fn LoadPackagedLibrary(lpwlibfilename: P0, reserved: Option) -> windows_core::Result where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn LoadPackagedLibrary(lpwlibfilename : windows_core::PCWSTR, reserved : u32) -> super::super::Foundation:: HMODULE); - let result__ = LoadPackagedLibrary(lpwlibfilename.param().abi(), core::mem::transmute(reserved)); + let result__ = LoadPackagedLibrary(lpwlibfilename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadResource(hmodule: P0, hresinfo: P1) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn LoadResource(hmodule: Option, hresinfo: super::super::Foundation::HRSRC) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn LoadResource(hmodule : super::super::Foundation:: HMODULE, hresinfo : super::super::Foundation:: HRSRC) -> super::super::Foundation:: HGLOBAL); - let result__ = LoadResource(hmodule.param().abi(), hresinfo.param().abi()); + let result__ = LoadResource(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(hresinfo)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LockResource(hresdata: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn LockResource(hresdata: super::super::Foundation::HGLOBAL) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn LockResource(hresdata : super::super::Foundation:: HGLOBAL) -> *mut core::ffi::c_void); - LockResource(hresdata.param().abi()) + LockResource(core::mem::transmute(hresdata)) } #[inline] -pub unsafe fn QueryOptionalDelayLoadedAPI(hparentmodule: P0, lpdllname: P1, lpprocname: P2, reserved: u32) -> windows_core::Result<()> +pub unsafe fn QueryOptionalDelayLoadedAPI(hparentmodule: super::super::Foundation::HMODULE, lpdllname: P1, lpprocname: P2, reserved: Option) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("api-ms-win-core-libraryloader-l2-1-0.dll" "system" fn QueryOptionalDelayLoadedAPI(hparentmodule : super::super::Foundation:: HMODULE, lpdllname : windows_core::PCSTR, lpprocname : windows_core::PCSTR, reserved : u32) -> super::super::Foundation:: BOOL); - QueryOptionalDelayLoadedAPI(hparentmodule.param().abi(), lpdllname.param().abi(), lpprocname.param().abi(), core::mem::transmute(reserved)).ok() + QueryOptionalDelayLoadedAPI(core::mem::transmute(hparentmodule), lpdllname.param().abi(), lpprocname.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RemoveDllDirectory(cookie: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -397,33 +345,27 @@ where SetDllDirectoryW(lppathname.param().abi()).ok() } #[inline] -pub unsafe fn SizeofResource(hmodule: P0, hresinfo: P1) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SizeofResource(hmodule: Option, hresinfo: super::super::Foundation::HRSRC) -> u32 { windows_targets::link!("kernel32.dll" "system" fn SizeofResource(hmodule : super::super::Foundation:: HMODULE, hresinfo : super::super::Foundation:: HRSRC) -> u32); - SizeofResource(hmodule.param().abi(), hresinfo.param().abi()) + SizeofResource(core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(hresinfo)) } #[inline] -pub unsafe fn UpdateResourceA(hupdate: P0, lptype: P1, lpname: P2, wlanguage: u16, lpdata: Option<*const core::ffi::c_void>, cb: u32) -> windows_core::Result<()> +pub unsafe fn UpdateResourceA(hupdate: super::super::Foundation::HANDLE, lptype: P1, lpname: P2, wlanguage: u16, lpdata: Option<*const core::ffi::c_void>, cb: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(wlanguage), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(cb)).ok() + UpdateResourceA(core::mem::transmute(hupdate), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(wlanguage), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> +pub unsafe fn UpdateResourceW(hupdate: super::super::Foundation::HANDLE, lptype: P1, lpname: P2, wlanguage: u16, lpdata: Option<*const core::ffi::c_void>, cb: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(wlanguage), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(cb)).ok() + UpdateResourceW(core::mem::transmute(hupdate), lptype.param().abi(), lpname.param().abi(), core::mem::transmute(wlanguage), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 33f361f5e1..ebe4dda7da 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(), core::mem::transmute(nmaxmessagesize), core::mem::transmute(lreadtimeout), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))); + let result__ = CreateMailslotA(lpname.param().abi(), core::mem::transmute(nmaxmessagesize), core::mem::transmute(lreadtimeout), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -15,22 +15,16 @@ 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(), core::mem::transmute(nmaxmessagesize), core::mem::transmute(lreadtimeout), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))); + let result__ = CreateMailslotW(lpname.param().abi(), core::mem::transmute(nmaxmessagesize), core::mem::transmute(lreadtimeout), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetMailslotInfo(hmailslot: P0, lpmaxmessagesize: Option<*mut u32>, lpnextsize: Option<*mut u32>, lpmessagecount: Option<*mut u32>, lpreadtimeout: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetMailslotInfo(hmailslot: super::super::Foundation::HANDLE, lpmaxmessagesize: Option<*mut u32>, lpnextsize: Option<*mut u32>, lpmessagecount: Option<*mut u32>, lpreadtimeout: Option<*mut u32>) -> windows_core::Result<()> { 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(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() + GetMailslotInfo(core::mem::transmute(hmailslot), core::mem::transmute(lpmaxmessagesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnextsize.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpmessagecount.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreadtimeout.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetMailslotInfo(hmailslot: P0, lreadtimeout: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetMailslotInfo(hmailslot: super::super::Foundation::HANDLE, lreadtimeout: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetMailslotInfo(hmailslot : super::super::Foundation:: HANDLE, lreadtimeout : u32) -> super::super::Foundation:: BOOL); - SetMailslotInfo(hmailslot.param().abi(), core::mem::transmute(lreadtimeout)).ok() + SetMailslotInfo(core::mem::transmute(hmailslot), core::mem::transmute(lreadtimeout)).ok() } 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 662116dc19..54d30130c4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs @@ -6,93 +6,78 @@ pub unsafe fn AddSecureMemoryCacheCallback(pfncallback: PSECURE_MEMORY_CACHE_CAL AddSecureMemoryCacheCallback(core::mem::transmute(pfncallback)).ok() } #[inline] -pub unsafe fn AllocateUserPhysicalPages(hprocess: P0, numberofpages: *mut usize, pagearray: *mut usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AllocateUserPhysicalPages(hprocess: super::super::Foundation::HANDLE, numberofpages: *mut usize, pagearray: *mut usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn AllocateUserPhysicalPages(hprocess : super::super::Foundation:: HANDLE, numberofpages : *mut usize, pagearray : *mut usize) -> super::super::Foundation:: BOOL); - AllocateUserPhysicalPages(hprocess.param().abi(), core::mem::transmute(numberofpages), core::mem::transmute(pagearray)).ok() + AllocateUserPhysicalPages(core::mem::transmute(hprocess), core::mem::transmute(numberofpages), core::mem::transmute(pagearray)).ok() } #[inline] -pub unsafe fn AllocateUserPhysicalPages2(objecthandle: P0, numberofpages: *mut usize, pagearray: *mut usize, extendedparameters: Option<&mut [MEM_EXTENDED_PARAMETER]>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn AllocateUserPhysicalPages2(objecthandle: super::super::Foundation::HANDLE, numberofpages: *mut usize, pagearray: *mut usize, extendedparameters: Option<&mut [MEM_EXTENDED_PARAMETER]>) -> super::super::Foundation::BOOL { windows_targets::link!("api-ms-win-core-memory-l1-1-8.dll" "system" fn AllocateUserPhysicalPages2(objecthandle : super::super::Foundation:: HANDLE, numberofpages : *mut usize, pagearray : *mut usize, extendedparameters : *mut MEM_EXTENDED_PARAMETER, extendedparametercount : u32) -> super::super::Foundation:: BOOL); - AllocateUserPhysicalPages2(objecthandle.param().abi(), core::mem::transmute(numberofpages), core::mem::transmute(pagearray), 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())) + AllocateUserPhysicalPages2(core::mem::transmute(objecthandle), core::mem::transmute(numberofpages), core::mem::transmute(pagearray), 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 AllocateUserPhysicalPagesNuma(hprocess: P0, numberofpages: *mut usize, pagearray: *mut usize, nndpreferred: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AllocateUserPhysicalPagesNuma(hprocess: super::super::Foundation::HANDLE, numberofpages: *mut usize, pagearray: *mut usize, nndpreferred: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn AllocateUserPhysicalPagesNuma(hprocess : super::super::Foundation:: HANDLE, numberofpages : *mut usize, pagearray : *mut usize, nndpreferred : u32) -> super::super::Foundation:: BOOL); - AllocateUserPhysicalPagesNuma(hprocess.param().abi(), core::mem::transmute(numberofpages), core::mem::transmute(pagearray), core::mem::transmute(nndpreferred)).ok() + AllocateUserPhysicalPagesNuma(core::mem::transmute(hprocess), core::mem::transmute(numberofpages), core::mem::transmute(pagearray), core::mem::transmute(nndpreferred)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileMapping2(file: P0, securityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, desiredaccess: u32, pageprotection: PAGE_PROTECTION_FLAGS, allocationattributes: u32, maximumsize: u64, name: P6, extendedparameters: Option<&mut [MEM_EXTENDED_PARAMETER]>) -> windows_core::Result +pub unsafe fn CreateFileMapping2(file: super::super::Foundation::HANDLE, securityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, desiredaccess: u32, pageprotection: PAGE_PROTECTION_FLAGS, allocationattributes: u32, maximumsize: u64, name: P6, extendedparameters: Option<&mut [MEM_EXTENDED_PARAMETER]>) -> windows_core::Result where - P0: windows_core::Param, P6: 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(core::ptr::null())), core::mem::transmute(desiredaccess), core::mem::transmute(pageprotection), core::mem::transmute(allocationattributes), core::mem::transmute(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(core::mem::transmute(file), core::mem::transmute(securityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(pageprotection), core::mem::transmute(allocationattributes), core::mem::transmute(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")] #[inline] -pub unsafe fn CreateFileMappingA(hfile: P0, lpfilemappingattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flprotect: PAGE_PROTECTION_FLAGS, dwmaximumsizehigh: u32, dwmaximumsizelow: u32, lpname: P5) -> windows_core::Result +pub unsafe fn CreateFileMappingA(hfile: super::super::Foundation::HANDLE, lpfilemappingattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flprotect: PAGE_PROTECTION_FLAGS, dwmaximumsizehigh: u32, dwmaximumsizelow: u32, lpname: P5) -> windows_core::Result where - P0: windows_core::Param, P5: 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(core::ptr::null())), core::mem::transmute(flprotect), core::mem::transmute(dwmaximumsizehigh), core::mem::transmute(dwmaximumsizelow), lpname.param().abi()); + let result__ = CreateFileMappingA(core::mem::transmute(hfile), core::mem::transmute(lpfilemappingattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(flprotect), core::mem::transmute(dwmaximumsizehigh), core::mem::transmute(dwmaximumsizelow), 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 CreateFileMappingFromApp(hfile: P0, securityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, pageprotection: PAGE_PROTECTION_FLAGS, maximumsize: u64, name: P4) -> windows_core::Result +pub unsafe fn CreateFileMappingFromApp(hfile: super::super::Foundation::HANDLE, securityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, pageprotection: PAGE_PROTECTION_FLAGS, maximumsize: u64, name: P4) -> windows_core::Result where - P0: windows_core::Param, P4: 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(core::ptr::null())), core::mem::transmute(pageprotection), core::mem::transmute(maximumsize), name.param().abi()); + let result__ = CreateFileMappingFromApp(core::mem::transmute(hfile), core::mem::transmute(securityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pageprotection), core::mem::transmute(maximumsize), name.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileMappingNumaA(hfile: P0, lpfilemappingattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flprotect: PAGE_PROTECTION_FLAGS, dwmaximumsizehigh: u32, dwmaximumsizelow: u32, lpname: P5, nndpreferred: u32) -> windows_core::Result +pub unsafe fn CreateFileMappingNumaA(hfile: super::super::Foundation::HANDLE, lpfilemappingattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flprotect: PAGE_PROTECTION_FLAGS, dwmaximumsizehigh: u32, dwmaximumsizelow: u32, lpname: P5, nndpreferred: u32) -> windows_core::Result where - P0: windows_core::Param, P5: 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(core::ptr::null())), core::mem::transmute(flprotect), core::mem::transmute(dwmaximumsizehigh), core::mem::transmute(dwmaximumsizelow), lpname.param().abi(), core::mem::transmute(nndpreferred)); + let result__ = CreateFileMappingNumaA(core::mem::transmute(hfile), core::mem::transmute(lpfilemappingattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(flprotect), core::mem::transmute(dwmaximumsizehigh), core::mem::transmute(dwmaximumsizelow), lpname.param().abi(), core::mem::transmute(nndpreferred)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileMappingNumaW(hfile: P0, lpfilemappingattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flprotect: PAGE_PROTECTION_FLAGS, dwmaximumsizehigh: u32, dwmaximumsizelow: u32, lpname: P5, nndpreferred: u32) -> windows_core::Result +pub unsafe fn CreateFileMappingNumaW(hfile: super::super::Foundation::HANDLE, lpfilemappingattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flprotect: PAGE_PROTECTION_FLAGS, dwmaximumsizehigh: u32, dwmaximumsizelow: u32, lpname: P5, nndpreferred: u32) -> windows_core::Result where - P0: windows_core::Param, P5: 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(core::ptr::null())), core::mem::transmute(flprotect), core::mem::transmute(dwmaximumsizehigh), core::mem::transmute(dwmaximumsizelow), lpname.param().abi(), core::mem::transmute(nndpreferred)); + let result__ = CreateFileMappingNumaW(core::mem::transmute(hfile), core::mem::transmute(lpfilemappingattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(flprotect), core::mem::transmute(dwmaximumsizehigh), core::mem::transmute(dwmaximumsizelow), lpname.param().abi(), core::mem::transmute(nndpreferred)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateFileMappingW(hfile: P0, lpfilemappingattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flprotect: PAGE_PROTECTION_FLAGS, dwmaximumsizehigh: u32, dwmaximumsizelow: u32, lpname: P5) -> windows_core::Result +pub unsafe fn CreateFileMappingW(hfile: super::super::Foundation::HANDLE, lpfilemappingattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flprotect: PAGE_PROTECTION_FLAGS, dwmaximumsizehigh: u32, dwmaximumsizelow: u32, lpname: P5) -> windows_core::Result where - P0: windows_core::Param, P5: 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(core::ptr::null())), core::mem::transmute(flprotect), core::mem::transmute(dwmaximumsizehigh), core::mem::transmute(dwmaximumsizelow), lpname.param().abi()); + let result__ = CreateFileMappingW(core::mem::transmute(hfile), core::mem::transmute(lpfilemappingattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(flprotect), core::mem::transmute(dwmaximumsizehigh), core::mem::transmute(dwmaximumsizelow), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -112,12 +97,9 @@ pub unsafe fn FlushViewOfFile(lpbaseaddress: *const core::ffi::c_void, dwnumbero FlushViewOfFile(core::mem::transmute(lpbaseaddress), core::mem::transmute(dwnumberofbytestoflush)).ok() } #[inline] -pub unsafe fn FreeUserPhysicalPages(hprocess: P0, numberofpages: *mut usize, pagearray: *const usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn FreeUserPhysicalPages(hprocess: super::super::Foundation::HANDLE, numberofpages: *mut usize, pagearray: *const usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn FreeUserPhysicalPages(hprocess : super::super::Foundation:: HANDLE, numberofpages : *mut usize, pagearray : *const usize) -> super::super::Foundation:: BOOL); - FreeUserPhysicalPages(hprocess.param().abi(), core::mem::transmute(numberofpages), core::mem::transmute(pagearray)).ok() + FreeUserPhysicalPages(core::mem::transmute(hprocess), core::mem::transmute(numberofpages), core::mem::transmute(pagearray)).ok() } #[inline] pub unsafe fn GetLargePageMinimum() -> usize { @@ -141,12 +123,9 @@ pub unsafe fn GetProcessHeaps(processheaps: &mut [super::super::Foundation::HAND GetProcessHeaps(processheaps.len().try_into().unwrap(), core::mem::transmute(processheaps.as_ptr())) } #[inline] -pub unsafe fn GetProcessWorkingSetSizeEx(hprocess: P0, lpminimumworkingsetsize: *mut usize, lpmaximumworkingsetsize: *mut usize, flags: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessWorkingSetSizeEx(hprocess: super::super::Foundation::HANDLE, lpminimumworkingsetsize: *mut usize, lpmaximumworkingsetsize: *mut usize, flags: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetProcessWorkingSetSizeEx(hprocess : super::super::Foundation:: HANDLE, lpminimumworkingsetsize : *mut usize, lpmaximumworkingsetsize : *mut usize, flags : *mut u32) -> super::super::Foundation:: BOOL); - GetProcessWorkingSetSizeEx(hprocess.param().abi(), core::mem::transmute(lpminimumworkingsetsize), core::mem::transmute(lpmaximumworkingsetsize), core::mem::transmute(flags)) + GetProcessWorkingSetSizeEx(core::mem::transmute(hprocess), core::mem::transmute(lpminimumworkingsetsize), core::mem::transmute(lpmaximumworkingsetsize), core::mem::transmute(flags)) } #[inline] pub unsafe fn GetSystemFileCacheSize(lpminimumfilecachesize: *mut usize, lpmaximumfilecachesize: *mut usize, lpflags: *mut u32) -> windows_core::Result<()> { @@ -156,7 +135,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(core::mem::transmute(dwflags), core::mem::transmute(lpbaseaddress), core::mem::transmute(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()))) + GetWriteWatch(core::mem::transmute(dwflags), core::mem::transmute(lpbaseaddress), core::mem::transmute(dwregionsize), core::mem::transmute(lpaddresses.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwcount.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwgranularity.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GlobalAlloc(uflags: GLOBAL_ALLOC_FLAGS, dwbytes: usize) -> windows_core::Result { @@ -165,12 +144,9 @@ pub unsafe fn GlobalAlloc(uflags: GLOBAL_ALLOC_FLAGS, dwbytes: usize) -> windows (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GlobalFlags(hmem: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalFlags(hmem: super::super::Foundation::HGLOBAL) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GlobalFlags(hmem : super::super::Foundation:: HGLOBAL) -> u32); - GlobalFlags(hmem.param().abi()) + GlobalFlags(core::mem::transmute(hmem)) } #[inline] pub unsafe fn GlobalHandle(pmem: *const core::ffi::c_void) -> windows_core::Result { @@ -179,53 +155,35 @@ pub unsafe fn GlobalHandle(pmem: *const core::ffi::c_void) -> windows_core::Resu (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GlobalLock(hmem: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalLock(hmem: super::super::Foundation::HGLOBAL) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn GlobalLock(hmem : super::super::Foundation:: HGLOBAL) -> *mut core::ffi::c_void); - GlobalLock(hmem.param().abi()) + GlobalLock(core::mem::transmute(hmem)) } #[inline] -pub unsafe fn GlobalReAlloc(hmem: P0, dwbytes: usize, uflags: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalReAlloc(hmem: super::super::Foundation::HGLOBAL, dwbytes: usize, uflags: u32) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn GlobalReAlloc(hmem : super::super::Foundation:: HGLOBAL, dwbytes : usize, uflags : u32) -> super::super::Foundation:: HGLOBAL); - let result__ = GlobalReAlloc(hmem.param().abi(), core::mem::transmute(dwbytes), core::mem::transmute(uflags)); + let result__ = GlobalReAlloc(core::mem::transmute(hmem), core::mem::transmute(dwbytes), core::mem::transmute(uflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GlobalSize(hmem: P0) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalSize(hmem: super::super::Foundation::HGLOBAL) -> usize { windows_targets::link!("kernel32.dll" "system" fn GlobalSize(hmem : super::super::Foundation:: HGLOBAL) -> usize); - GlobalSize(hmem.param().abi()) + GlobalSize(core::mem::transmute(hmem)) } #[inline] -pub unsafe fn GlobalUnlock(hmem: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalUnlock(hmem: super::super::Foundation::HGLOBAL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GlobalUnlock(hmem : super::super::Foundation:: HGLOBAL) -> super::super::Foundation:: BOOL); - GlobalUnlock(hmem.param().abi()).ok() + GlobalUnlock(core::mem::transmute(hmem)).ok() } #[inline] -pub unsafe fn HeapAlloc(hheap: P0, dwflags: HEAP_FLAGS, dwbytes: usize) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn HeapAlloc(hheap: super::super::Foundation::HANDLE, dwflags: HEAP_FLAGS, dwbytes: usize) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn HeapAlloc(hheap : super::super::Foundation:: HANDLE, dwflags : HEAP_FLAGS, dwbytes : usize) -> *mut core::ffi::c_void); - HeapAlloc(hheap.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwbytes)) + HeapAlloc(core::mem::transmute(hheap), core::mem::transmute(dwflags), core::mem::transmute(dwbytes)) } #[inline] -pub unsafe fn HeapCompact(hheap: P0, dwflags: HEAP_FLAGS) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn HeapCompact(hheap: super::super::Foundation::HANDLE, dwflags: HEAP_FLAGS) -> usize { windows_targets::link!("kernel32.dll" "system" fn HeapCompact(hheap : super::super::Foundation:: HANDLE, dwflags : HEAP_FLAGS) -> usize); - HeapCompact(hheap.param().abi(), core::mem::transmute(dwflags)) + HeapCompact(core::mem::transmute(hheap), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn HeapCreate(floptions: HEAP_FLAGS, dwinitialsize: usize, dwmaximumsize: usize) -> windows_core::Result { @@ -234,96 +192,69 @@ pub unsafe fn HeapCreate(floptions: HEAP_FLAGS, dwinitialsize: usize, dwmaximums (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn HeapDestroy(hheap: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HeapDestroy(hheap: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn HeapDestroy(hheap : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - HeapDestroy(hheap.param().abi()).ok() + HeapDestroy(core::mem::transmute(hheap)).ok() } #[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(core::mem::transmute(hheap), core::mem::transmute(dwflags), core::mem::transmute(lpmem.unwrap_or(core::ptr::null()))).ok() + HeapFree(core::mem::transmute(hheap), core::mem::transmute(dwflags), core::mem::transmute(lpmem.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn HeapLock(hheap: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HeapLock(hheap: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn HeapLock(hheap : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - HeapLock(hheap.param().abi()).ok() + HeapLock(core::mem::transmute(hheap)).ok() } #[inline] -pub unsafe fn HeapQueryInformation(heaphandle: P0, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: Option<*mut core::ffi::c_void>, heapinformationlength: usize, returnlength: Option<*mut usize>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HeapQueryInformation(heaphandle: Option, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: Option<*mut core::ffi::c_void>, heapinformationlength: usize, returnlength: Option<*mut usize>) -> windows_core::Result<()> { 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(), core::mem::transmute(heapinformationclass), core::mem::transmute(heapinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(heapinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))).ok() + HeapQueryInformation(core::mem::transmute(heaphandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(heapinformationclass), core::mem::transmute(heapinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(heapinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(hheap), core::mem::transmute(dwflags), core::mem::transmute(lpmem.unwrap_or(core::ptr::null())), core::mem::transmute(dwbytes)) + HeapReAlloc(core::mem::transmute(hheap), core::mem::transmute(dwflags), core::mem::transmute(lpmem.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbytes)) } #[inline] -pub unsafe fn HeapSetInformation(heaphandle: P0, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: Option<*const core::ffi::c_void>, heapinformationlength: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HeapSetInformation(heaphandle: Option, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: Option<*const core::ffi::c_void>, heapinformationlength: usize) -> windows_core::Result<()> { 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(), core::mem::transmute(heapinformationclass), core::mem::transmute(heapinformation.unwrap_or(core::ptr::null())), core::mem::transmute(heapinformationlength)).ok() + HeapSetInformation(core::mem::transmute(heaphandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(heapinformationclass), core::mem::transmute(heapinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(heapinformationlength)).ok() } #[inline] -pub unsafe fn HeapSize(hheap: P0, dwflags: HEAP_FLAGS, lpmem: *const core::ffi::c_void) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn HeapSize(hheap: super::super::Foundation::HANDLE, dwflags: HEAP_FLAGS, lpmem: *const core::ffi::c_void) -> usize { windows_targets::link!("kernel32.dll" "system" fn HeapSize(hheap : super::super::Foundation:: HANDLE, dwflags : HEAP_FLAGS, lpmem : *const core::ffi::c_void) -> usize); - HeapSize(hheap.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpmem)) + HeapSize(core::mem::transmute(hheap), core::mem::transmute(dwflags), core::mem::transmute(lpmem)) } #[inline] -pub unsafe fn HeapSummary(hheap: P0, dwflags: u32, lpsummary: *mut HEAP_SUMMARY) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn HeapSummary(hheap: super::super::Foundation::HANDLE, dwflags: u32, lpsummary: *mut HEAP_SUMMARY) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn HeapSummary(hheap : super::super::Foundation:: HANDLE, dwflags : u32, lpsummary : *mut HEAP_SUMMARY) -> super::super::Foundation:: BOOL); - HeapSummary(hheap.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpsummary)) + HeapSummary(core::mem::transmute(hheap), core::mem::transmute(dwflags), core::mem::transmute(lpsummary)) } #[inline] -pub unsafe fn HeapUnlock(hheap: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HeapUnlock(hheap: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn HeapUnlock(hheap : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - HeapUnlock(hheap.param().abi()).ok() + HeapUnlock(core::mem::transmute(hheap)).ok() } #[inline] -pub unsafe fn HeapValidate(hheap: P0, dwflags: HEAP_FLAGS, lpmem: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn HeapValidate(hheap: super::super::Foundation::HANDLE, dwflags: HEAP_FLAGS, lpmem: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(dwflags), core::mem::transmute(lpmem.unwrap_or(core::ptr::null()))) + HeapValidate(core::mem::transmute(hheap), core::mem::transmute(dwflags), core::mem::transmute(lpmem.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn HeapWalk(hheap: P0, lpentry: *mut PROCESS_HEAP_ENTRY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HeapWalk(hheap: super::super::Foundation::HANDLE, lpentry: *mut PROCESS_HEAP_ENTRY) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn HeapWalk(hheap : super::super::Foundation:: HANDLE, lpentry : *mut PROCESS_HEAP_ENTRY) -> super::super::Foundation:: BOOL); - HeapWalk(hheap.param().abi(), core::mem::transmute(lpentry)).ok() + HeapWalk(core::mem::transmute(hheap), core::mem::transmute(lpentry)).ok() } #[inline] -pub unsafe fn IsBadCodePtr(lpfn: super::super::Foundation::FARPROC) -> windows_core::Result<()> { +pub unsafe fn IsBadCodePtr(lpfn: Option) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn IsBadCodePtr(lpfn : super::super::Foundation:: FARPROC) -> super::super::Foundation:: BOOL); - IsBadCodePtr(core::mem::transmute(lpfn)).ok() + IsBadCodePtr(core::mem::transmute(lpfn.unwrap_or(core::mem::zeroed()))).ok() } #[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(core::ptr::null())), core::mem::transmute(ucb)) + IsBadReadPtr(core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), core::mem::transmute(ucb)) } #[inline] pub unsafe fn IsBadStringPtrA(lpsz: P0, ucchmax: usize) -> super::super::Foundation::BOOL @@ -344,7 +275,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(core::ptr::null())), core::mem::transmute(ucb)) + IsBadWritePtr(core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), core::mem::transmute(ucb)) } #[inline] pub unsafe fn LocalAlloc(uflags: LOCAL_ALLOC_FLAGS, ubytes: usize) -> windows_core::Result { @@ -353,12 +284,9 @@ pub unsafe fn LocalAlloc(uflags: LOCAL_ALLOC_FLAGS, ubytes: usize) -> windows_co (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LocalFlags(hmem: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn LocalFlags(hmem: super::super::Foundation::HLOCAL) -> u32 { windows_targets::link!("kernel32.dll" "system" fn LocalFlags(hmem : super::super::Foundation:: HLOCAL) -> u32); - LocalFlags(hmem.param().abi()) + LocalFlags(core::mem::transmute(hmem)) } #[inline] pub unsafe fn LocalHandle(pmem: *const core::ffi::c_void) -> windows_core::Result { @@ -367,37 +295,25 @@ pub unsafe fn LocalHandle(pmem: *const core::ffi::c_void) -> windows_core::Resul (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LocalLock(hmem: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn LocalLock(hmem: super::super::Foundation::HLOCAL) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn LocalLock(hmem : super::super::Foundation:: HLOCAL) -> *mut core::ffi::c_void); - LocalLock(hmem.param().abi()) + LocalLock(core::mem::transmute(hmem)) } #[inline] -pub unsafe fn LocalReAlloc(hmem: P0, ubytes: usize, uflags: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn LocalReAlloc(hmem: Option, ubytes: usize, uflags: u32) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn LocalReAlloc(hmem : super::super::Foundation:: HLOCAL, ubytes : usize, uflags : u32) -> super::super::Foundation:: HLOCAL); - let result__ = LocalReAlloc(hmem.param().abi(), core::mem::transmute(ubytes), core::mem::transmute(uflags)); + let result__ = LocalReAlloc(core::mem::transmute(hmem.unwrap_or(core::mem::zeroed())), core::mem::transmute(ubytes), core::mem::transmute(uflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LocalSize(hmem: P0) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn LocalSize(hmem: super::super::Foundation::HLOCAL) -> usize { windows_targets::link!("kernel32.dll" "system" fn LocalSize(hmem : super::super::Foundation:: HLOCAL) -> usize); - LocalSize(hmem.param().abi()) + LocalSize(core::mem::transmute(hmem)) } #[inline] -pub unsafe fn LocalUnlock(hmem: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LocalUnlock(hmem: super::super::Foundation::HLOCAL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn LocalUnlock(hmem : super::super::Foundation:: HLOCAL) -> super::super::Foundation:: BOOL); - LocalUnlock(hmem.param().abi()).ok() + LocalUnlock(core::mem::transmute(hmem)).ok() } #[inline] pub unsafe fn MapUserPhysicalPages(virtualaddress: *const core::ffi::c_void, pagearray: Option<&[usize]>) -> windows_core::Result<()> { @@ -407,66 +323,62 @@ 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(core::mem::transmute(virtualaddresses), core::mem::transmute(numberofpages), core::mem::transmute(pagearray.unwrap_or(core::ptr::null()))).ok() + MapUserPhysicalPagesScatter(core::mem::transmute(virtualaddresses), core::mem::transmute(numberofpages), core::mem::transmute(pagearray.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn MapViewOfFile(hfilemappingobject: P0, dwdesiredaccess: FILE_MAP, dwfileoffsethigh: u32, dwfileoffsetlow: u32, dwnumberofbytestomap: usize) -> MEMORY_MAPPED_VIEW_ADDRESS -where - P0: windows_core::Param, -{ +pub unsafe fn MapViewOfFile(hfilemappingobject: super::super::Foundation::HANDLE, dwdesiredaccess: FILE_MAP, dwfileoffsethigh: u32, dwfileoffsetlow: u32, dwnumberofbytestomap: usize) -> MEMORY_MAPPED_VIEW_ADDRESS { windows_targets::link!("kernel32.dll" "system" fn MapViewOfFile(hfilemappingobject : super::super::Foundation:: HANDLE, dwdesiredaccess : FILE_MAP, dwfileoffsethigh : u32, dwfileoffsetlow : u32, dwnumberofbytestomap : usize) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFile(hfilemappingobject.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwnumberofbytestomap)) + MapViewOfFile(core::mem::transmute(hfilemappingobject), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwnumberofbytestomap)) } #[inline] -pub unsafe fn MapViewOfFile3(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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MapViewOfFile3(filemapping: super::super::Foundation::HANDLE, process: Option, 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 { 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(core::ptr::null())), core::mem::transmute(offset), core::mem::transmute(viewsize), core::mem::transmute(allocationtype), core::mem::transmute(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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ + MapViewOfFile3( + core::mem::transmute(filemapping), + core::mem::transmute(process.unwrap_or(core::mem::zeroed())), + core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(offset), + core::mem::transmute(viewsize), + core::mem::transmute(allocationtype), + core::mem::transmute(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: super::super::Foundation::HANDLE, process: Option, 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 { 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(core::ptr::null())), core::mem::transmute(offset), core::mem::transmute(viewsize), core::mem::transmute(allocationtype), core::mem::transmute(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 -where - P0: windows_core::Param, -{ + MapViewOfFile3FromApp( + core::mem::transmute(filemapping), + core::mem::transmute(process.unwrap_or(core::mem::zeroed())), + core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), + core::mem::transmute(offset), + core::mem::transmute(viewsize), + core::mem::transmute(allocationtype), + core::mem::transmute(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: super::super::Foundation::HANDLE, dwdesiredaccess: FILE_MAP, dwfileoffsethigh: u32, dwfileoffsetlow: u32, dwnumberofbytestomap: usize, lpbaseaddress: Option<*const core::ffi::c_void>) -> MEMORY_MAPPED_VIEW_ADDRESS { 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwnumberofbytestomap), core::mem::transmute(lpbaseaddress.unwrap_or(core::ptr::null()))) + MapViewOfFileEx(core::mem::transmute(hfilemappingobject), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwnumberofbytestomap), core::mem::transmute(lpbaseaddress.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn MapViewOfFileExNuma(hfilemappingobject: super::super::Foundation::HANDLE, dwdesiredaccess: FILE_MAP, dwfileoffsethigh: u32, dwfileoffsetlow: u32, dwnumberofbytestomap: usize, lpbaseaddress: Option<*const core::ffi::c_void>, nndpreferred: u32) -> MEMORY_MAPPED_VIEW_ADDRESS { 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwnumberofbytestomap), core::mem::transmute(lpbaseaddress.unwrap_or(core::ptr::null())), core::mem::transmute(nndpreferred)) + MapViewOfFileExNuma(core::mem::transmute(hfilemappingobject), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwfileoffsethigh), core::mem::transmute(dwfileoffsetlow), core::mem::transmute(dwnumberofbytestomap), core::mem::transmute(lpbaseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(nndpreferred)) } #[inline] -pub unsafe fn MapViewOfFileFromApp(hfilemappingobject: P0, desiredaccess: FILE_MAP, fileoffset: u64, numberofbytestomap: usize) -> MEMORY_MAPPED_VIEW_ADDRESS -where - P0: windows_core::Param, -{ +pub unsafe fn MapViewOfFileFromApp(hfilemappingobject: super::super::Foundation::HANDLE, desiredaccess: FILE_MAP, fileoffset: u64, numberofbytestomap: usize) -> MEMORY_MAPPED_VIEW_ADDRESS { windows_targets::link!("kernel32.dll" "system" fn MapViewOfFileFromApp(hfilemappingobject : super::super::Foundation:: HANDLE, desiredaccess : FILE_MAP, fileoffset : u64, numberofbytestomap : usize) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFileFromApp(hfilemappingobject.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(fileoffset), core::mem::transmute(numberofbytestomap)) + MapViewOfFileFromApp(core::mem::transmute(hfilemappingobject), core::mem::transmute(desiredaccess), core::mem::transmute(fileoffset), core::mem::transmute(numberofbytestomap)) } #[inline] -pub unsafe fn MapViewOfFileNuma2(filemappinghandle: P0, processhandle: P1, offset: u64, baseaddress: Option<*const core::ffi::c_void>, viewsize: usize, allocationtype: u32, pageprotection: u32, preferrednode: u32) -> MEMORY_MAPPED_VIEW_ADDRESS -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MapViewOfFileNuma2(filemappinghandle: super::super::Foundation::HANDLE, processhandle: super::super::Foundation::HANDLE, offset: u64, baseaddress: Option<*const core::ffi::c_void>, viewsize: usize, allocationtype: u32, pageprotection: u32, preferrednode: u32) -> MEMORY_MAPPED_VIEW_ADDRESS { 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(), core::mem::transmute(offset), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), core::mem::transmute(viewsize), core::mem::transmute(allocationtype), core::mem::transmute(pageprotection), core::mem::transmute(preferrednode)) + MapViewOfFileNuma2(core::mem::transmute(filemappinghandle), core::mem::transmute(processhandle), core::mem::transmute(offset), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(viewsize), core::mem::transmute(allocationtype), core::mem::transmute(pageprotection), core::mem::transmute(preferrednode)) } #[inline] pub unsafe fn OfferVirtualMemory(virtualaddress: &mut [u8], priority: OFFER_PRIORITY) -> u32 { @@ -474,13 +386,12 @@ pub unsafe fn OfferVirtualMemory(virtualaddress: &mut [u8], priority: OFFER_PRIO OfferVirtualMemory(core::mem::transmute(virtualaddress.as_ptr()), virtualaddress.len().try_into().unwrap(), core::mem::transmute(priority)) } #[inline] -pub unsafe fn OpenDedicatedMemoryPartition(partition: P0, dedicatedmemorytypeid: u64, desiredaccess: u32, inherithandle: P3) -> super::super::Foundation::HANDLE +pub unsafe fn OpenDedicatedMemoryPartition(partition: super::super::Foundation::HANDLE, dedicatedmemorytypeid: u64, desiredaccess: u32, inherithandle: P3) -> super::super::Foundation::HANDLE where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("api-ms-win-core-memory-l1-1-8.dll" "system" fn OpenDedicatedMemoryPartition(partition : super::super::Foundation:: HANDLE, dedicatedmemorytypeid : u64, desiredaccess : u32, inherithandle : super::super::Foundation:: BOOL) -> super::super::Foundation:: HANDLE); - OpenDedicatedMemoryPartition(partition.param().abi(), core::mem::transmute(dedicatedmemorytypeid), core::mem::transmute(desiredaccess), inherithandle.param().abi()) + OpenDedicatedMemoryPartition(core::mem::transmute(partition), core::mem::transmute(dedicatedmemorytypeid), core::mem::transmute(desiredaccess), inherithandle.param().abi()) } #[inline] pub unsafe fn OpenFileMappingA(dwdesiredaccess: u32, binherithandle: P1, lpname: P2) -> windows_core::Result @@ -513,36 +424,24 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn PrefetchVirtualMemory(hprocess: P0, virtualaddresses: &[WIN32_MEMORY_RANGE_ENTRY], flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PrefetchVirtualMemory(hprocess: super::super::Foundation::HANDLE, virtualaddresses: &[WIN32_MEMORY_RANGE_ENTRY], flags: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn PrefetchVirtualMemory(hprocess : super::super::Foundation:: HANDLE, numberofentries : usize, virtualaddresses : *const WIN32_MEMORY_RANGE_ENTRY, flags : u32) -> super::super::Foundation:: BOOL); - PrefetchVirtualMemory(hprocess.param().abi(), virtualaddresses.len().try_into().unwrap(), core::mem::transmute(virtualaddresses.as_ptr()), core::mem::transmute(flags)).ok() + PrefetchVirtualMemory(core::mem::transmute(hprocess), virtualaddresses.len().try_into().unwrap(), core::mem::transmute(virtualaddresses.as_ptr()), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn QueryMemoryResourceNotification(resourcenotificationhandle: P0, resourcestate: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryMemoryResourceNotification(resourcenotificationhandle: super::super::Foundation::HANDLE, resourcestate: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryMemoryResourceNotification(resourcenotificationhandle : super::super::Foundation:: HANDLE, resourcestate : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - QueryMemoryResourceNotification(resourcenotificationhandle.param().abi(), core::mem::transmute(resourcestate)).ok() + QueryMemoryResourceNotification(core::mem::transmute(resourcenotificationhandle), core::mem::transmute(resourcestate)).ok() } #[inline] -pub unsafe fn QueryPartitionInformation(partition: P0, partitioninformationclass: WIN32_MEMORY_PARTITION_INFORMATION_CLASS, partitioninformation: *mut core::ffi::c_void, partitioninformationlength: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn QueryPartitionInformation(partition: super::super::Foundation::HANDLE, partitioninformationclass: WIN32_MEMORY_PARTITION_INFORMATION_CLASS, partitioninformation: *mut core::ffi::c_void, partitioninformationlength: u32) -> super::super::Foundation::BOOL { windows_targets::link!("api-ms-win-core-memory-l1-1-8.dll" "system" fn QueryPartitionInformation(partition : super::super::Foundation:: HANDLE, partitioninformationclass : WIN32_MEMORY_PARTITION_INFORMATION_CLASS, partitioninformation : *mut core::ffi::c_void, partitioninformationlength : u32) -> super::super::Foundation:: BOOL); - QueryPartitionInformation(partition.param().abi(), core::mem::transmute(partitioninformationclass), core::mem::transmute(partitioninformation), core::mem::transmute(partitioninformationlength)) + QueryPartitionInformation(core::mem::transmute(partition), core::mem::transmute(partitioninformationclass), core::mem::transmute(partitioninformation), core::mem::transmute(partitioninformationlength)) } #[inline] -pub unsafe fn QueryVirtualMemoryInformation(process: P0, virtualaddress: *const core::ffi::c_void, memoryinformationclass: WIN32_MEMORY_INFORMATION_CLASS, memoryinformation: *mut core::ffi::c_void, memoryinformationsize: usize, returnsize: Option<*mut usize>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe 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: Option<*mut usize>) -> windows_core::Result<()> { 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(), core::mem::transmute(virtualaddress), core::mem::transmute(memoryinformationclass), core::mem::transmute(memoryinformation), core::mem::transmute(memoryinformationsize), core::mem::transmute(returnsize.unwrap_or(core::ptr::null_mut()))).ok() + QueryVirtualMemoryInformation(core::mem::transmute(process), core::mem::transmute(virtualaddress), core::mem::transmute(memoryinformationclass), core::mem::transmute(memoryinformation), core::mem::transmute(memoryinformationsize), core::mem::transmute(returnsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ReclaimVirtualMemory(virtualaddress: &[u8]) -> u32 { @@ -585,29 +484,19 @@ pub unsafe fn RtlIsZeroMemory(buffer: *const core::ffi::c_void, length: usize) - RtlIsZeroMemory(core::mem::transmute(buffer), core::mem::transmute(length)) } #[inline] -pub unsafe fn SetProcessValidCallTargets(hprocess: P0, virtualaddress: *const core::ffi::c_void, regionsize: usize, offsetinformation: &mut [CFG_CALL_TARGET_INFO]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessValidCallTargets(hprocess: super::super::Foundation::HANDLE, virtualaddress: *const core::ffi::c_void, regionsize: usize, offsetinformation: &mut [CFG_CALL_TARGET_INFO]) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-memory-l1-1-3.dll" "system" fn SetProcessValidCallTargets(hprocess : super::super::Foundation:: HANDLE, virtualaddress : *const core::ffi::c_void, regionsize : usize, numberofoffsets : u32, offsetinformation : *mut CFG_CALL_TARGET_INFO) -> super::super::Foundation:: BOOL); - SetProcessValidCallTargets(hprocess.param().abi(), core::mem::transmute(virtualaddress), core::mem::transmute(regionsize), offsetinformation.len().try_into().unwrap(), core::mem::transmute(offsetinformation.as_ptr())).ok() + SetProcessValidCallTargets(core::mem::transmute(hprocess), core::mem::transmute(virtualaddress), core::mem::transmute(regionsize), offsetinformation.len().try_into().unwrap(), core::mem::transmute(offsetinformation.as_ptr())).ok() } #[inline] -pub unsafe fn SetProcessValidCallTargetsForMappedView(process: P0, virtualaddress: *const core::ffi::c_void, regionsize: usize, offsetinformation: &mut [CFG_CALL_TARGET_INFO], section: P5, expectedfileoffset: u64) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn SetProcessValidCallTargetsForMappedView(process: super::super::Foundation::HANDLE, virtualaddress: *const core::ffi::c_void, regionsize: usize, offsetinformation: &mut [CFG_CALL_TARGET_INFO], section: super::super::Foundation::HANDLE, expectedfileoffset: u64) -> super::super::Foundation::BOOL { windows_targets::link!("api-ms-win-core-memory-l1-1-7.dll" "system" fn SetProcessValidCallTargetsForMappedView(process : super::super::Foundation:: HANDLE, virtualaddress : *const core::ffi::c_void, regionsize : usize, numberofoffsets : u32, offsetinformation : *mut CFG_CALL_TARGET_INFO, section : super::super::Foundation:: HANDLE, expectedfileoffset : u64) -> super::super::Foundation:: BOOL); - SetProcessValidCallTargetsForMappedView(process.param().abi(), core::mem::transmute(virtualaddress), core::mem::transmute(regionsize), offsetinformation.len().try_into().unwrap(), core::mem::transmute(offsetinformation.as_ptr()), section.param().abi(), core::mem::transmute(expectedfileoffset)) + SetProcessValidCallTargetsForMappedView(core::mem::transmute(process), core::mem::transmute(virtualaddress), core::mem::transmute(regionsize), offsetinformation.len().try_into().unwrap(), core::mem::transmute(offsetinformation.as_ptr()), core::mem::transmute(section), core::mem::transmute(expectedfileoffset)) } #[inline] -pub unsafe fn SetProcessWorkingSetSizeEx(hprocess: P0, dwminimumworkingsetsize: usize, dwmaximumworkingsetsize: usize, flags: SETPROCESSWORKINGSETSIZEEX_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessWorkingSetSizeEx(hprocess: super::super::Foundation::HANDLE, dwminimumworkingsetsize: usize, dwmaximumworkingsetsize: usize, flags: SETPROCESSWORKINGSETSIZEEX_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetProcessWorkingSetSizeEx(hprocess : super::super::Foundation:: HANDLE, dwminimumworkingsetsize : usize, dwmaximumworkingsetsize : usize, flags : SETPROCESSWORKINGSETSIZEEX_FLAGS) -> super::super::Foundation:: BOOL); - SetProcessWorkingSetSizeEx(hprocess.param().abi(), core::mem::transmute(dwminimumworkingsetsize), core::mem::transmute(dwmaximumworkingsetsize), core::mem::transmute(flags)).ok() + SetProcessWorkingSetSizeEx(core::mem::transmute(hprocess), core::mem::transmute(dwminimumworkingsetsize), core::mem::transmute(dwmaximumworkingsetsize), core::mem::transmute(flags)).ok() } #[inline] pub unsafe fn SetSystemFileCacheSize(minimumfilecachesize: usize, maximumfilecachesize: usize, flags: u32) -> windows_core::Result<()> { @@ -620,12 +509,9 @@ pub unsafe fn UnmapViewOfFile(lpbaseaddress: MEMORY_MAPPED_VIEW_ADDRESS) -> wind UnmapViewOfFile(core::mem::transmute(lpbaseaddress)).ok() } #[inline] -pub unsafe fn UnmapViewOfFile2(process: P0, baseaddress: MEMORY_MAPPED_VIEW_ADDRESS, unmapflags: UNMAP_VIEW_OF_FILE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnmapViewOfFile2(process: super::super::Foundation::HANDLE, baseaddress: MEMORY_MAPPED_VIEW_ADDRESS, unmapflags: UNMAP_VIEW_OF_FILE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-memory-l1-1-5.dll" "system" fn UnmapViewOfFile2(process : super::super::Foundation:: HANDLE, baseaddress : MEMORY_MAPPED_VIEW_ADDRESS, unmapflags : UNMAP_VIEW_OF_FILE_FLAGS) -> super::super::Foundation:: BOOL); - UnmapViewOfFile2(process.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(unmapflags)).ok() + UnmapViewOfFile2(core::mem::transmute(process), core::mem::transmute(baseaddress), core::mem::transmute(unmapflags)).ok() } #[inline] pub unsafe fn UnmapViewOfFileEx(baseaddress: MEMORY_MAPPED_VIEW_ADDRESS, unmapflags: UNMAP_VIEW_OF_FILE_FLAGS) -> windows_core::Result<()> { @@ -640,44 +526,32 @@ 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(core::ptr::null())), core::mem::transmute(dwsize), core::mem::transmute(flallocationtype), core::mem::transmute(flprotect)) + VirtualAlloc(core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsize), core::mem::transmute(flallocationtype), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualAlloc2(process: Option, 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 { 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(core::ptr::null())), core::mem::transmute(size), core::mem::transmute(allocationtype), core::mem::transmute(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(core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), core::mem::transmute(allocationtype), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualAlloc2FromApp(process: Option, 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 { 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(core::ptr::null())), core::mem::transmute(size), core::mem::transmute(allocationtype), core::mem::transmute(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(core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), core::mem::transmute(allocationtype), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualAllocEx(hprocess: super::super::Foundation::HANDLE, 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 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(core::ptr::null())), core::mem::transmute(dwsize), core::mem::transmute(flallocationtype), core::mem::transmute(flprotect)) + VirtualAllocEx(core::mem::transmute(hprocess), core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsize), core::mem::transmute(flallocationtype), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualAllocExNuma(hprocess: super::super::Foundation::HANDLE, lpaddress: Option<*const core::ffi::c_void>, dwsize: usize, flallocationtype: VIRTUAL_ALLOCATION_TYPE, flprotect: u32, nndpreferred: u32) -> *mut core::ffi::c_void { 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(core::ptr::null())), core::mem::transmute(dwsize), core::mem::transmute(flallocationtype), core::mem::transmute(flprotect), core::mem::transmute(nndpreferred)) + VirtualAllocExNuma(core::mem::transmute(hprocess), core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsize), core::mem::transmute(flallocationtype), core::mem::transmute(flprotect), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(size), core::mem::transmute(allocationtype), core::mem::transmute(protection)) + VirtualAllocFromApp(core::mem::transmute(baseaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), core::mem::transmute(allocationtype), core::mem::transmute(protection)) } #[inline] pub unsafe fn VirtualFree(lpaddress: *mut core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> windows_core::Result<()> { @@ -685,12 +559,9 @@ pub unsafe fn VirtualFree(lpaddress: *mut core::ffi::c_void, dwsize: usize, dwfr VirtualFree(core::mem::transmute(lpaddress), core::mem::transmute(dwsize), core::mem::transmute(dwfreetype)).ok() } #[inline] -pub unsafe fn VirtualFreeEx(hprocess: P0, lpaddress: *mut core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualFreeEx(hprocess: super::super::Foundation::HANDLE, lpaddress: *mut core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn VirtualFreeEx(hprocess : super::super::Foundation:: HANDLE, lpaddress : *mut core::ffi::c_void, dwsize : usize, dwfreetype : VIRTUAL_FREE_TYPE) -> super::super::Foundation:: BOOL); - VirtualFreeEx(hprocess.param().abi(), core::mem::transmute(lpaddress), core::mem::transmute(dwsize), core::mem::transmute(dwfreetype)).ok() + VirtualFreeEx(core::mem::transmute(hprocess), core::mem::transmute(lpaddress), core::mem::transmute(dwsize), core::mem::transmute(dwfreetype)).ok() } #[inline] pub unsafe fn VirtualLock(lpaddress: *const core::ffi::c_void, dwsize: usize) -> windows_core::Result<()> { @@ -703,12 +574,9 @@ pub unsafe fn VirtualProtect(lpaddress: *const core::ffi::c_void, dwsize: usize, VirtualProtect(core::mem::transmute(lpaddress), core::mem::transmute(dwsize), core::mem::transmute(flnewprotect), core::mem::transmute(lpfloldprotect)).ok() } #[inline] -pub unsafe fn VirtualProtectEx(hprocess: P0, lpaddress: *const core::ffi::c_void, dwsize: usize, flnewprotect: PAGE_PROTECTION_FLAGS, lpfloldprotect: *mut PAGE_PROTECTION_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualProtectEx(hprocess: super::super::Foundation::HANDLE, lpaddress: *const core::ffi::c_void, dwsize: usize, flnewprotect: PAGE_PROTECTION_FLAGS, lpfloldprotect: *mut PAGE_PROTECTION_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn VirtualProtectEx(hprocess : super::super::Foundation:: HANDLE, lpaddress : *const core::ffi::c_void, dwsize : usize, flnewprotect : PAGE_PROTECTION_FLAGS, lpfloldprotect : *mut PAGE_PROTECTION_FLAGS) -> super::super::Foundation:: BOOL); - VirtualProtectEx(hprocess.param().abi(), core::mem::transmute(lpaddress), core::mem::transmute(dwsize), core::mem::transmute(flnewprotect), core::mem::transmute(lpfloldprotect)).ok() + VirtualProtectEx(core::mem::transmute(hprocess), core::mem::transmute(lpaddress), core::mem::transmute(dwsize), core::mem::transmute(flnewprotect), core::mem::transmute(lpfloldprotect)).ok() } #[inline] pub unsafe fn VirtualProtectFromApp(address: *const core::ffi::c_void, size: usize, newprotection: u32, oldprotection: *mut u32) -> windows_core::Result<()> { @@ -718,15 +586,12 @@ 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(core::ptr::null())), core::mem::transmute(lpbuffer), core::mem::transmute(dwlength)) + VirtualQuery(core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffer), core::mem::transmute(dwlength)) } #[inline] -pub unsafe fn VirtualQueryEx(hprocess: P0, lpaddress: Option<*const core::ffi::c_void>, lpbuffer: *mut MEMORY_BASIC_INFORMATION, dwlength: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualQueryEx(hprocess: super::super::Foundation::HANDLE, lpaddress: Option<*const core::ffi::c_void>, lpbuffer: *mut MEMORY_BASIC_INFORMATION, dwlength: usize) -> usize { 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(core::ptr::null())), core::mem::transmute(lpbuffer), core::mem::transmute(dwlength)) + VirtualQueryEx(core::mem::transmute(hprocess), core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbuffer), core::mem::transmute(dwlength)) } #[inline] pub unsafe fn VirtualUnlock(lpaddress: *const core::ffi::c_void, dwsize: usize) -> windows_core::Result<()> { @@ -734,12 +599,9 @@ pub unsafe fn VirtualUnlock(lpaddress: *const core::ffi::c_void, dwsize: usize) VirtualUnlock(core::mem::transmute(lpaddress), core::mem::transmute(dwsize)).ok() } #[inline] -pub unsafe fn VirtualUnlockEx(process: P0, address: *const core::ffi::c_void, size: usize) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualUnlockEx(process: Option, address: *const core::ffi::c_void, size: usize) -> super::super::Foundation::BOOL { windows_targets::link!("api-ms-win-core-memory-l1-1-5.dll" "system" fn VirtualUnlockEx(process : super::super::Foundation:: HANDLE, address : *const core::ffi::c_void, size : usize) -> super::super::Foundation:: BOOL); - VirtualUnlockEx(process.param().abi(), core::mem::transmute(address), core::mem::transmute(size)) + VirtualUnlockEx(core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(address), core::mem::transmute(size)) } #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] 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 a869f7f7e2..4b4bdc8946 100644 --- a/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs @@ -14,12 +14,9 @@ pub unsafe fn MQBeginTransaction() -> windows_core::Result(hcursor: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MQCloseCursor(hcursor: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("mqrt.dll" "system" fn MQCloseCursor(hcursor : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - MQCloseCursor(hcursor.param().abi()).ok() + MQCloseCursor(core::mem::transmute(hcursor)).ok() } #[inline] pub unsafe fn MQCloseQueue(hqueue: isize) -> windows_core::Result<()> { @@ -34,12 +31,9 @@ pub unsafe fn MQCreateCursor(hqueue: isize) -> windows_core::Result(psecuritydescriptor: P0, pqueueprops: *mut MQQUEUEPROPS, lpwcsformatname: windows_core::PWSTR, lpdwformatnamelength: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MQCreateQueue(psecuritydescriptor: Option, pqueueprops: *mut MQQUEUEPROPS, lpwcsformatname: Option, lpdwformatnamelength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mqrt.dll" "system" fn MQCreateQueue(psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, pqueueprops : *mut MQQUEUEPROPS, lpwcsformatname : windows_core::PWSTR, lpdwformatnamelength : *mut u32) -> windows_core::HRESULT); - MQCreateQueue(psecuritydescriptor.param().abi(), core::mem::transmute(pqueueprops), core::mem::transmute(lpwcsformatname), core::mem::transmute(lpdwformatnamelength)).ok() + MQCreateQueue(core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(pqueueprops), core::mem::transmute(lpwcsformatname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwformatnamelength)).ok() } #[inline] pub unsafe fn MQDeleteQueue(lpwcsformatname: P0) -> windows_core::Result<()> @@ -55,12 +49,9 @@ pub unsafe fn MQFreeMemory(pvmemory: *const core::ffi::c_void) { MQFreeMemory(core::mem::transmute(pvmemory)) } #[inline] -pub unsafe fn MQFreeSecurityContext(hsecuritycontext: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn MQFreeSecurityContext(hsecuritycontext: super::super::Foundation::HANDLE) { windows_targets::link!("mqrt.dll" "system" fn MQFreeSecurityContext(hsecuritycontext : super::super::Foundation:: HANDLE)); - MQFreeSecurityContext(hsecuritycontext.param().abi()) + MQFreeSecurityContext(core::mem::transmute(hsecuritycontext)) } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -69,7 +60,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(core::ptr::null())), core::mem::transmute(pqmprops)).ok() + MQGetMachineProperties(lpwcsmachinename.param().abi(), core::mem::transmute(pguidmachineid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pqmprops)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -108,13 +99,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(core::ptr::null())), core::mem::transmute(dwcertbufferlength), &mut result__).map(|| core::mem::transmute(result__)) + MQGetSecurityContext(core::mem::transmute(lpcertbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertbufferlength), &mut result__).map(|| core::mem::transmute(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(core::ptr::null())), core::mem::transmute(dwcertbufferlength), &mut result__).map(|| core::mem::transmute(result__)) + MQGetSecurityContextEx(core::mem::transmute(lpcertbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcertbufferlength), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn MQHandleToFormatName(hqueue: isize, lpwcsformatname: windows_core::PWSTR, lpdwformatnamelength: *mut u32) -> windows_core::Result<()> { @@ -134,32 +125,23 @@ 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(core::ptr::null())), core::mem::transmute(pcolumns), core::mem::transmute(psort), &mut result__).map(|| core::mem::transmute(result__)) + MQLocateBegin(lpwcscontext.param().abi(), core::mem::transmute(prestriction.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcolumns), core::mem::transmute(psort), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn MQLocateEnd(henum: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MQLocateEnd(henum: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("mqrt.dll" "system" fn MQLocateEnd(henum : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - MQLocateEnd(henum.param().abi()).ok() + MQLocateEnd(core::mem::transmute(henum)).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn MQLocateNext(henum: P0, pcprops: *mut u32, apropvar: *mut super::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MQLocateNext(henum: super::super::Foundation::HANDLE, pcprops: *mut u32, apropvar: *mut super::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { windows_targets::link!("mqrt.dll" "system" fn MQLocateNext(henum : super::super::Foundation:: HANDLE, pcprops : *mut u32, apropvar : *mut super::Com::StructuredStorage:: PROPVARIANT) -> windows_core::HRESULT); - MQLocateNext(henum.param().abi(), core::mem::transmute(pcprops), core::mem::transmute(apropvar)).ok() + MQLocateNext(core::mem::transmute(henum), core::mem::transmute(pcprops), core::mem::transmute(apropvar)).ok() } #[inline] -pub unsafe fn MQMarkMessageRejected(hqueue: P0, ulllookupid: u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MQMarkMessageRejected(hqueue: super::super::Foundation::HANDLE, ulllookupid: u64) -> windows_core::Result<()> { windows_targets::link!("mqrt.dll" "system" fn MQMarkMessageRejected(hqueue : super::super::Foundation:: HANDLE, ulllookupid : u64) -> windows_core::HRESULT); - MQMarkMessageRejected(hqueue.param().abi(), core::mem::transmute(ulllookupid)).ok() + MQMarkMessageRejected(core::mem::transmute(hqueue), core::mem::transmute(ulllookupid)).ok() } #[inline] pub unsafe fn MQMgmtAction(pcomputername: P0, pobjectname: P1, paction: P2) -> windows_core::Result<()> @@ -214,22 +196,21 @@ pub unsafe fn MQPurgeQueue(hqueue: isize) -> windows_core::Result<()> { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_DistributedTransactionCoordinator", feature = "Win32_System_IO", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn MQReceiveMessage(hsource: isize, dwtimeout: u32, dwaction: u32, pmessageprops: Option<*mut MQMSGPROPS>, lpoverlapped: Option<*mut super::IO::OVERLAPPED>, fnreceivecallback: PMQRECEIVECALLBACK, hcursor: P6, ptransaction: P7) -> windows_core::Result<()> +pub unsafe fn MQReceiveMessage(hsource: isize, dwtimeout: u32, dwaction: u32, pmessageprops: Option<*mut MQMSGPROPS>, lpoverlapped: Option<*mut super::IO::OVERLAPPED>, fnreceivecallback: Option, hcursor: Option, ptransaction: P7) -> windows_core::Result<()> where - P6: windows_core::Param, P7: 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(core::mem::transmute(hsource), core::mem::transmute(dwtimeout), core::mem::transmute(dwaction), core::mem::transmute(pmessageprops.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(fnreceivecallback), hcursor.param().abi(), ptransaction.param().abi()).ok() + MQReceiveMessage(core::mem::transmute(hsource), core::mem::transmute(dwtimeout), core::mem::transmute(dwaction), core::mem::transmute(pmessageprops.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(fnreceivecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(hcursor.unwrap_or(core::mem::zeroed())), ptransaction.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_DistributedTransactionCoordinator", feature = "Win32_System_IO", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn MQReceiveMessageByLookupId(hsource: isize, ulllookupid: u64, dwlookupaction: u32, pmessageprops: Option<*mut MQMSGPROPS>, lpoverlapped: Option<*mut super::IO::OVERLAPPED>, fnreceivecallback: PMQRECEIVECALLBACK, ptransaction: P6) -> windows_core::Result<()> +pub unsafe fn MQReceiveMessageByLookupId(hsource: isize, ulllookupid: u64, dwlookupaction: u32, pmessageprops: Option<*mut MQMSGPROPS>, lpoverlapped: Option<*mut super::IO::OVERLAPPED>, fnreceivecallback: Option, ptransaction: P6) -> windows_core::Result<()> where P6: 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(core::mem::transmute(hsource), core::mem::transmute(ulllookupid), core::mem::transmute(dwlookupaction), core::mem::transmute(pmessageprops.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(fnreceivecallback), ptransaction.param().abi()).ok() + MQReceiveMessageByLookupId(core::mem::transmute(hsource), core::mem::transmute(ulllookupid), core::mem::transmute(dwlookupaction), core::mem::transmute(pmessageprops.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(fnreceivecallback.unwrap_or(core::mem::zeroed())), ptransaction.param().abi()).ok() } #[inline] pub unsafe fn MQRegisterCertificate(dwflags: u32, lpcertbuffer: *const core::ffi::c_void, dwcertbufferlength: u32) -> windows_core::Result<()> { @@ -256,13 +237,12 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn MQSetQueueSecurity(lpwcsformatname: P0, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P2) -> windows_core::Result<()> +pub unsafe fn MQSetQueueSecurity(lpwcsformatname: P0, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQSetQueueSecurity(lpwcsformatname : windows_core::PCWSTR, securityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> windows_core::HRESULT); - MQSetQueueSecurity(lpwcsformatname.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()).ok() + MQSetQueueSecurity(lpwcsformatname.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed()))).ok() } pub const DEFAULT_M_ACKNOWLEDGE: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_M_APPSPECIFIC: MQDEFAULT = MQDEFAULT(0i32); diff --git a/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs index 324d3386c6..f079e244ec 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs @@ -1231,13 +1231,11 @@ impl IComponent { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), lpconsole.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn Notify(&self, lpdataobject: P0, event: MMC_NOTIFY_TYPE, arg: P2, param3: P3) -> windows_core::Result<()> + pub unsafe fn Notify(&self, lpdataobject: P0, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param3: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), lpdataobject.param().abi(), core::mem::transmute(event), arg.param().abi(), param3.param().abi()).ok() + (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), lpdataobject.param().abi(), core::mem::transmute(event), core::mem::transmute(arg), core::mem::transmute(param3)).ok() } pub unsafe fn Destroy(&self, cookie: isize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self), core::mem::transmute(cookie)).ok() @@ -1431,13 +1429,11 @@ impl IComponentData { (windows_core::Interface::vtable(self).CreateComponent)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn Notify(&self, lpdataobject: P0, event: MMC_NOTIFY_TYPE, arg: P2, param3: P3) -> windows_core::Result<()> + pub unsafe fn Notify(&self, lpdataobject: P0, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param3: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), lpdataobject.param().abi(), core::mem::transmute(event), arg.param().abi(), param3.param().abi()).ok() + (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), lpdataobject.param().abi(), core::mem::transmute(event), core::mem::transmute(arg), core::mem::transmute(param3)).ok() } pub unsafe fn Destroy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self)).ok() @@ -1625,12 +1621,11 @@ impl IConsole { (windows_core::Interface::vtable(self).QueryResultImageList)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn UpdateAllViews(&self, lpdataobject: P0, data: P1, hint: isize) -> windows_core::Result<()> + pub unsafe fn UpdateAllViews(&self, lpdataobject: P0, data: super::super::Foundation::LPARAM, hint: isize) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateAllViews)(windows_core::Interface::as_raw(self), lpdataobject.param().abi(), data.param().abi(), core::mem::transmute(hint)).ok() + (windows_core::Interface::vtable(self).UpdateAllViews)(windows_core::Interface::as_raw(self), lpdataobject.param().abi(), core::mem::transmute(data), core::mem::transmute(hint)).ok() } pub unsafe fn MessageBox(&self, lpsztext: P0, lpsztitle: P1, fustyle: u32) -> windows_core::Result where @@ -2072,12 +2067,9 @@ impl windows_core::RuntimeName for IConsolePower {} windows_core::imp::define_interface!(IConsolePowerSink, IConsolePowerSink_Vtbl, 0x3333759f_fe4f_4975_b143_fec0a5dd6d65); windows_core::imp::interface_hierarchy!(IConsolePowerSink, windows_core::IUnknown); impl IConsolePowerSink { - pub unsafe fn OnPowerBroadcast(&self, nevent: u32, lparam: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn OnPowerBroadcast(&self, nevent: u32, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnPowerBroadcast)(windows_core::Interface::as_raw(self), core::mem::transmute(nevent), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnPowerBroadcast)(windows_core::Interface::as_raw(self), core::mem::transmute(nevent), core::mem::transmute(lparam), &mut result__).map(|| result__) } } #[repr(C)] @@ -2268,12 +2260,9 @@ impl IContextMenuProvider { { (windows_core::Interface::vtable(self).AddThirdPartyExtensionItems)(windows_core::Interface::as_raw(self), pidataobject.param().abi()).ok() } - pub unsafe fn ShowContextMenu(&self, hwndparent: P0, xpos: i32, ypos: i32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn ShowContextMenu(&self, hwndparent: super::super::Foundation::HWND, xpos: i32, ypos: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ShowContextMenu)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(xpos), core::mem::transmute(ypos), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ShowContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(xpos), core::mem::transmute(ypos), &mut result__).map(|| result__) } } #[repr(C)] @@ -2570,12 +2559,8 @@ impl IExtendControlbar { { (windows_core::Interface::vtable(self).SetControlbar)(windows_core::Interface::as_raw(self), pcontrolbar.param().abi()).ok() } - pub unsafe fn ControlbarNotify(&self, event: MMC_NOTIFY_TYPE, arg: P1, param2: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ControlbarNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(event), arg.param().abi(), param2.param().abi()).ok() + pub unsafe fn ControlbarNotify(&self, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param2: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ControlbarNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(event), core::mem::transmute(arg), core::mem::transmute(param2)).ok() } } #[repr(C)] @@ -3061,11 +3046,8 @@ impl IImageList { pub unsafe fn ImageListSetIcon(&self, picon: *const isize, nloc: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ImageListSetIcon)(windows_core::Interface::as_raw(self), core::mem::transmute(picon), core::mem::transmute(nloc)).ok() } - pub unsafe fn ImageListSetStrip(&self, pbmapsm: *const isize, pbmaplg: *const isize, nstartloc: i32, cmask: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).ImageListSetStrip)(windows_core::Interface::as_raw(self), core::mem::transmute(pbmapsm), core::mem::transmute(pbmaplg), core::mem::transmute(nstartloc), cmask.param().abi()).ok() + pub unsafe fn ImageListSetStrip(&self, pbmapsm: *const isize, pbmaplg: *const isize, nstartloc: i32, cmask: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ImageListSetStrip)(windows_core::Interface::as_raw(self), core::mem::transmute(pbmapsm), core::mem::transmute(pbmaplg), core::mem::transmute(nstartloc), core::mem::transmute(cmask)).ok() } } #[repr(C)] @@ -3308,18 +3290,12 @@ windows_core::imp::define_interface!(IPropertySheetCallback, IPropertySheetCallb windows_core::imp::interface_hierarchy!(IPropertySheetCallback, windows_core::IUnknown); impl IPropertySheetCallback { #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn AddPage(&self, hpage: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddPage)(windows_core::Interface::as_raw(self), hpage.param().abi()).ok() + pub unsafe fn AddPage(&self, hpage: super::super::UI::Controls::HPROPSHEETPAGE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddPage)(windows_core::Interface::as_raw(self), core::mem::transmute(hpage)).ok() } #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn RemovePage(&self, hpage: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemovePage)(windows_core::Interface::as_raw(self), hpage.param().abi()).ok() + pub unsafe fn RemovePage(&self, hpage: super::super::UI::Controls::HPROPSHEETPAGE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemovePage)(windows_core::Interface::as_raw(self), core::mem::transmute(hpage)).ok() } } #[repr(C)] @@ -3377,14 +3353,13 @@ impl IPropertySheetProvider { { (windows_core::Interface::vtable(self).FindPropertySheet)(windows_core::Interface::as_raw(self), core::mem::transmute(hitem), lpcomponent.param().abi(), lpdataobject.param().abi()).ok() } - pub unsafe fn AddPrimaryPages(&self, lpunknown: P0, bcreatehandle: P1, hnotifywindow: P2, bscopepane: P3) -> windows_core::Result<()> + pub unsafe fn AddPrimaryPages(&self, lpunknown: P0, bcreatehandle: P1, hnotifywindow: super::super::Foundation::HWND, bscopepane: P3) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).AddPrimaryPages)(windows_core::Interface::as_raw(self), lpunknown.param().abi(), bcreatehandle.param().abi(), hnotifywindow.param().abi(), bscopepane.param().abi()).ok() + (windows_core::Interface::vtable(self).AddPrimaryPages)(windows_core::Interface::as_raw(self), lpunknown.param().abi(), bcreatehandle.param().abi(), core::mem::transmute(hnotifywindow), bscopepane.param().abi()).ok() } pub unsafe fn AddExtensionPages(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddExtensionPages)(windows_core::Interface::as_raw(self)).ok() @@ -3528,12 +3503,9 @@ impl IResultData { pub unsafe fn DeleteItem(&self, itemid: isize, ncol: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteItem)(windows_core::Interface::as_raw(self), core::mem::transmute(itemid), core::mem::transmute(ncol)).ok() } - pub unsafe fn FindItemByLParam(&self, lparam: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn FindItemByLParam(&self, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindItemByLParam)(windows_core::Interface::as_raw(self), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).FindItemByLParam)(windows_core::Interface::as_raw(self), core::mem::transmute(lparam), &mut result__).map(|| result__) } pub unsafe fn DeleteAllRsltItems(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteAllRsltItems)(windows_core::Interface::as_raw(self)).ok() @@ -3563,11 +3535,8 @@ impl IResultData { pub unsafe fn UpdateItem(&self, itemid: isize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpdateItem)(windows_core::Interface::as_raw(self), core::mem::transmute(itemid)).ok() } - pub unsafe fn Sort(&self, ncolumn: i32, dwsortoptions: u32, luserparam: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Sort)(windows_core::Interface::as_raw(self), core::mem::transmute(ncolumn), core::mem::transmute(dwsortoptions), luserparam.param().abi()).ok() + pub unsafe fn Sort(&self, ncolumn: i32, dwsortoptions: u32, luserparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Sort)(windows_core::Interface::as_raw(self), core::mem::transmute(ncolumn), core::mem::transmute(dwsortoptions), core::mem::transmute(luserparam)).ok() } pub unsafe fn SetDescBarText(&self, desctext: P0) -> windows_core::Result<()> where @@ -3750,11 +3719,8 @@ impl windows_core::RuntimeName for IResultData2 {} windows_core::imp::define_interface!(IResultDataCompare, IResultDataCompare_Vtbl, 0xe8315a52_7a1a_11d0_a2d2_00c04fd909dd); windows_core::imp::interface_hierarchy!(IResultDataCompare, windows_core::IUnknown); impl IResultDataCompare { - pub unsafe fn Compare(&self, luserparam: P0, cookiea: isize, cookieb: isize, pnresult: *mut i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Compare)(windows_core::Interface::as_raw(self), luserparam.param().abi(), core::mem::transmute(cookiea), core::mem::transmute(cookieb), core::mem::transmute(pnresult)).ok() + pub unsafe fn Compare(&self, luserparam: super::super::Foundation::LPARAM, cookiea: isize, cookieb: isize, pnresult: *mut i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Compare)(windows_core::Interface::as_raw(self), core::mem::transmute(luserparam), core::mem::transmute(cookiea), core::mem::transmute(cookieb), core::mem::transmute(pnresult)).ok() } } #[repr(C)] @@ -3823,11 +3789,8 @@ impl IResultOwnerData { pub unsafe fn CacheHint(&self, nstartindex: i32, nendindex: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CacheHint)(windows_core::Interface::as_raw(self), core::mem::transmute(nstartindex), core::mem::transmute(nendindex)).ok() } - pub unsafe fn SortItems(&self, ncolumn: i32, dwsortoptions: u32, luserparam: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SortItems)(windows_core::Interface::as_raw(self), core::mem::transmute(ncolumn), core::mem::transmute(dwsortoptions), luserparam.param().abi()).ok() + pub unsafe fn SortItems(&self, ncolumn: i32, dwsortoptions: u32, luserparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SortItems)(windows_core::Interface::as_raw(self), core::mem::transmute(ncolumn), core::mem::transmute(dwsortoptions), core::mem::transmute(luserparam)).ok() } } #[repr(C)] @@ -4295,12 +4258,8 @@ windows_core::imp::define_interface!(IToolbar, IToolbar_Vtbl, 0x43136eb9_d36c_11 windows_core::imp::interface_hierarchy!(IToolbar, windows_core::IUnknown); impl IToolbar { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn AddBitmap(&self, nimages: i32, hbmp: P1, cxsize: i32, cysize: i32, crmask: P4) -> windows_core::Result<()> - where - P1: windows_core::Param, - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(nimages), hbmp.param().abi(), core::mem::transmute(cxsize), core::mem::transmute(cysize), crmask.param().abi()).ok() + pub unsafe fn AddBitmap(&self, nimages: i32, hbmp: super::super::Graphics::Gdi::HBITMAP, cxsize: i32, cysize: i32, crmask: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(nimages), core::mem::transmute(hbmp), core::mem::transmute(cxsize), core::mem::transmute(cysize), core::mem::transmute(crmask)).ok() } pub unsafe fn AddButtons(&self, nbuttons: i32, lpbuttons: *const MMCBUTTON) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddButtons)(windows_core::Interface::as_raw(self), core::mem::transmute(nbuttons), core::mem::transmute(lpbuttons)).ok() 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 49f6df633b..bb5b475eba 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 super::Variant:: VARIANT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DispCallFunc(core::mem::transmute(pvinstance.unwrap_or(core::ptr::null())), core::mem::transmute(ovft), core::mem::transmute(cc), core::mem::transmute(vtreturn), core::mem::transmute(cactuals), core::mem::transmute(prgvt), core::mem::transmute(prgpvarg), &mut result__).map(|| core::mem::transmute(result__)) + DispCallFunc(core::mem::transmute(pvinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(ovft), core::mem::transmute(cc), core::mem::transmute(vtreturn), core::mem::transmute(cactuals), core::mem::transmute(prgvt), core::mem::transmute(prgpvarg), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -80,7 +80,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 super::Variant:: VARIANT, puargerr : *mut u32) -> windows_core::HRESULT); - DispGetParam(core::mem::transmute(pdispparams), core::mem::transmute(position), core::mem::transmute(vttarg), core::mem::transmute(pvarresult), core::mem::transmute(puargerr.unwrap_or(core::ptr::null_mut()))).ok() + DispGetParam(core::mem::transmute(pdispparams), core::mem::transmute(position), core::mem::transmute(vttarg), core::mem::transmute(pvarresult), core::mem::transmute(puargerr.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] #[inline] @@ -104,7 +104,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(core::mem::transmute(rclsid), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppunk)).ok() + GetActiveObject(core::mem::transmute(rclsid), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppunk)).ok() } #[inline] pub unsafe fn GetAltMonthNames(lcid: u32) -> windows_core::Result<*mut windows_core::PWSTR> { @@ -178,12 +178,9 @@ pub unsafe fn HRGN_UserUnmarshal64(param0: *const u32, param1: *const u8, param2 } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn IsAccelerator(haccel: P0, caccelentries: i32, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG, lpwcmd: *mut u16) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsAccelerator(haccel: super::super::UI::WindowsAndMessaging::HACCEL, caccelentries: i32, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG, lpwcmd: *mut u16) -> super::super::Foundation::BOOL { windows_targets::link!("ole32.dll" "system" fn IsAccelerator(haccel : super::super::UI::WindowsAndMessaging:: HACCEL, caccelentries : i32, lpmsg : *const super::super::UI::WindowsAndMessaging:: MSG, lpwcmd : *mut u16) -> super::super::Foundation:: BOOL); - IsAccelerator(haccel.param().abi(), core::mem::transmute(caccelentries), core::mem::transmute(lpmsg), core::mem::transmute(lpwcmd)) + IsAccelerator(core::mem::transmute(haccel), core::mem::transmute(caccelentries), core::mem::transmute(lpmsg), core::mem::transmute(lpwcmd)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -247,21 +244,21 @@ pub unsafe fn OleBuildVersion() -> u32 { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] -pub unsafe fn OleConvertOLESTREAMToIStorage2(lpolestream: *const super::Com::StructuredStorage::OLESTREAM, pstg: P1, ptd: Option<*const super::Com::DVTARGETDEVICE>, opt: u32, pvcallbackcontext: Option<*const core::ffi::c_void>, pqueryconvertolelinkcallback: OLESTREAMQUERYCONVERTOLELINKCALLBACK) -> windows_core::Result<()> +pub unsafe fn OleConvertOLESTREAMToIStorage2(lpolestream: *const super::Com::StructuredStorage::OLESTREAM, pstg: P1, ptd: Option<*const super::Com::DVTARGETDEVICE>, opt: Option, pvcallbackcontext: Option<*const core::ffi::c_void>, pqueryconvertolelinkcallback: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(lpolestream), pstg.param().abi(), core::mem::transmute(ptd.unwrap_or(core::ptr::null())), core::mem::transmute(opt), core::mem::transmute(pvcallbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pqueryconvertolelinkcallback)).ok() + OleConvertOLESTREAMToIStorage2(core::mem::transmute(lpolestream), pstg.param().abi(), core::mem::transmute(ptd.unwrap_or(core::mem::zeroed())), core::mem::transmute(opt.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pqueryconvertolelinkcallback.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] #[inline] -pub unsafe fn OleConvertOLESTREAMToIStorageEx2(polestm: *const super::Com::StructuredStorage::OLESTREAM, pstg: P1, pcfformat: *mut u16, plwwidth: *mut i32, plheight: *mut i32, pdwsize: *mut u32, pmedium: *mut super::Com::STGMEDIUM, opt: u32, pvcallbackcontext: Option<*const core::ffi::c_void>, pqueryconvertolelinkcallback: OLESTREAMQUERYCONVERTOLELINKCALLBACK) -> windows_core::Result<()> +pub unsafe fn OleConvertOLESTREAMToIStorageEx2(polestm: *const super::Com::StructuredStorage::OLESTREAM, pstg: P1, pcfformat: *mut u16, plwwidth: *mut i32, plheight: *mut i32, pdwsize: *mut u32, pmedium: *mut super::Com::STGMEDIUM, opt: Option, pvcallbackcontext: Option<*const core::ffi::c_void>, pqueryconvertolelinkcallback: Option) -> windows_core::Result<()> where P1: 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(core::mem::transmute(polestm), pstg.param().abi(), core::mem::transmute(pcfformat), core::mem::transmute(plwwidth), core::mem::transmute(plheight), core::mem::transmute(pdwsize), core::mem::transmute(pmedium), core::mem::transmute(opt), core::mem::transmute(pvcallbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pqueryconvertolelinkcallback)).ok() + OleConvertOLESTREAMToIStorageEx2(core::mem::transmute(polestm), pstg.param().abi(), core::mem::transmute(pcfformat), core::mem::transmute(plwwidth), core::mem::transmute(plheight), core::mem::transmute(pdwsize), core::mem::transmute(pmedium), core::mem::transmute(opt.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pqueryconvertolelinkcallback.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -425,12 +422,9 @@ where } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn OleCreateMenuDescriptor(hmenucombined: P0, lpmenuwidths: *const OLEMENUGROUPWIDTHS) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn OleCreateMenuDescriptor(hmenucombined: super::super::UI::WindowsAndMessaging::HMENU, lpmenuwidths: *const OLEMENUGROUPWIDTHS) -> isize { windows_targets::link!("ole32.dll" "system" fn OleCreateMenuDescriptor(hmenucombined : super::super::UI::WindowsAndMessaging:: HMENU, lpmenuwidths : *const OLEMENUGROUPWIDTHS) -> isize); - OleCreateMenuDescriptor(hmenucombined.param().abi(), core::mem::transmute(lpmenuwidths)) + OleCreateMenuDescriptor(core::mem::transmute(hmenucombined), core::mem::transmute(lpmenuwidths)) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] @@ -444,13 +438,12 @@ where OleCreatePictureIndirect(core::mem::transmute(lppictdesc), &T::IID, fown.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn OleCreatePropertyFrame(hwndowner: P0, x: u32, y: u32, lpszcaption: P3, cobjects: u32, ppunk: *const Option, cpages: u32, ppageclsid: *const windows_core::GUID, lcid: u32, dwreserved: u32, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn OleCreatePropertyFrame(hwndowner: super::super::Foundation::HWND, x: u32, y: u32, lpszcaption: P3, cobjects: u32, ppunk: *const Option, cpages: u32, ppageclsid: *const windows_core::GUID, lcid: u32, dwreserved: Option, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P3: 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(), core::mem::transmute(x), core::mem::transmute(y), lpszcaption.param().abi(), core::mem::transmute(cobjects), core::mem::transmute(ppunk), core::mem::transmute(cpages), core::mem::transmute(ppageclsid), core::mem::transmute(lcid), core::mem::transmute(dwreserved), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() + OleCreatePropertyFrame(core::mem::transmute(hwndowner), core::mem::transmute(x), core::mem::transmute(y), lpszcaption.param().abi(), core::mem::transmute(cobjects), core::mem::transmute(ppunk), core::mem::transmute(cpages), core::mem::transmute(ppageclsid), core::mem::transmute(lcid), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn OleCreatePropertyFrameIndirect(lpparams: *const OCPFIPARAMS) -> windows_core::Result<()> { @@ -485,22 +478,18 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn OleDraw(punknown: P0, dwaspect: u32, hdcdraw: P2, lprcbounds: *const super::super::Foundation::RECT) -> windows_core::Result<()> +pub unsafe fn OleDraw(punknown: P0, dwaspect: u32, hdcdraw: super::super::Graphics::Gdi::HDC, lprcbounds: *const super::super::Foundation::RECT) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleDraw(punknown : * mut core::ffi::c_void, dwaspect : u32, hdcdraw : super::super::Graphics::Gdi:: HDC, lprcbounds : *const super::super::Foundation:: RECT) -> windows_core::HRESULT); - OleDraw(punknown.param().abi(), core::mem::transmute(dwaspect), hdcdraw.param().abi(), core::mem::transmute(lprcbounds)).ok() + OleDraw(punknown.param().abi(), core::mem::transmute(dwaspect), core::mem::transmute(hdcdraw), core::mem::transmute(lprcbounds)).ok() } #[cfg(feature = "Win32_System_Memory")] #[inline] -pub unsafe fn OleDuplicateData(hsrc: P0, cfformat: CLIPBOARD_FORMAT, uiflags: super::Memory::GLOBAL_ALLOC_FLAGS) -> super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn OleDuplicateData(hsrc: super::super::Foundation::HANDLE, cfformat: CLIPBOARD_FORMAT, uiflags: super::Memory::GLOBAL_ALLOC_FLAGS) -> super::super::Foundation::HANDLE { windows_targets::link!("ole32.dll" "system" fn OleDuplicateData(hsrc : super::super::Foundation:: HANDLE, cfformat : CLIPBOARD_FORMAT, uiflags : super::Memory:: GLOBAL_ALLOC_FLAGS) -> super::super::Foundation:: HANDLE); - OleDuplicateData(hsrc.param().abi(), core::mem::transmute(cfformat), core::mem::transmute(uiflags)) + OleDuplicateData(core::mem::transmute(hsrc), core::mem::transmute(cfformat), core::mem::transmute(uiflags)) } #[inline] pub unsafe fn OleFlushClipboard() -> windows_core::Result<()> { @@ -546,18 +535,14 @@ where } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn OleIconToCursor(hinstexe: P0, hicon: P1) -> super::super::UI::WindowsAndMessaging::HCURSOR -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn OleIconToCursor(hinstexe: super::super::Foundation::HINSTANCE, hicon: super::super::UI::WindowsAndMessaging::HICON) -> super::super::UI::WindowsAndMessaging::HCURSOR { windows_targets::link!("oleaut32.dll" "system" fn OleIconToCursor(hinstexe : super::super::Foundation:: HINSTANCE, hicon : super::super::UI::WindowsAndMessaging:: HICON) -> super::super::UI::WindowsAndMessaging:: HCURSOR); - OleIconToCursor(hinstexe.param().abi(), hicon.param().abi()) + OleIconToCursor(core::mem::transmute(hinstexe), core::mem::transmute(hicon)) } #[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(core::ptr::null()))).ok() + OleInitialize(core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -630,13 +615,13 @@ pub unsafe fn OleLoadPictureFileEx(varfilename: &super::Variant::VARIANT, xsized OleLoadPictureFileEx(core::mem::transmute_copy(varfilename), core::mem::transmute(xsizedesired), core::mem::transmute(ysizedesired), core::mem::transmute(dwflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn OleLoadPicturePath(szurlorpath: P0, punkcaller: P1, dwreserved: u32, clrreserved: u32, riid: *const windows_core::GUID, ppvret: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn OleLoadPicturePath(szurlorpath: P0, punkcaller: P1, dwreserved: Option, clrreserved: u32, riid: *const windows_core::GUID, ppvret: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn OleLoadPicturePath(szurlorpath : windows_core::PCWSTR, punkcaller : * mut core::ffi::c_void, dwreserved : u32, clrreserved : u32, riid : *const windows_core::GUID, ppvret : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - OleLoadPicturePath(szurlorpath.param().abi(), punkcaller.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(clrreserved), core::mem::transmute(riid), core::mem::transmute(ppvret)).ok() + OleLoadPicturePath(szurlorpath.param().abi(), punkcaller.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(clrreserved), core::mem::transmute(riid), core::mem::transmute(ppvret)).ok() } #[inline] pub unsafe fn OleLockRunning(punknown: P0, flock: P1, flastunlockcloses: P2) -> windows_core::Result<()> @@ -650,14 +635,13 @@ where } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn OleMetafilePictFromIconAndLabel(hicon: P0, lpszlabel: P1, lpszsourcefile: P2, iiconindex: u32) -> windows_core::Result +pub unsafe fn OleMetafilePictFromIconAndLabel(hicon: super::super::UI::WindowsAndMessaging::HICON, lpszlabel: P1, lpszsourcefile: P2, iiconindex: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleMetafilePictFromIconAndLabel(hicon : super::super::UI::WindowsAndMessaging:: HICON, lpszlabel : windows_core::PCWSTR, lpszsourcefile : windows_core::PCWSTR, iiconindex : u32) -> super::super::Foundation:: HGLOBAL); - let result__ = OleMetafilePictFromIconAndLabel(hicon.param().abi(), lpszlabel.param().abi(), lpszsourcefile.param().abi(), core::mem::transmute(iiconindex)); + let result__ = OleMetafilePictFromIconAndLabel(core::mem::transmute(hicon), lpszlabel.param().abi(), lpszsourcefile.param().abi(), core::mem::transmute(iiconindex)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -774,15 +758,13 @@ where OleSetContainedObject(punknown.param().abi(), fcontained.param().abi()).ok() } #[inline] -pub unsafe fn OleSetMenuDescriptor(holemenu: isize, hwndframe: P1, hwndactiveobject: P2, lpframe: P3, lpactiveobj: P4) -> windows_core::Result<()> +pub unsafe fn OleSetMenuDescriptor(holemenu: isize, hwndframe: super::super::Foundation::HWND, hwndactiveobject: super::super::Foundation::HWND, lpframe: P3, lpactiveobj: P4) -> windows_core::Result<()> where - P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleSetMenuDescriptor(holemenu : isize, hwndframe : super::super::Foundation:: HWND, hwndactiveobject : super::super::Foundation:: HWND, lpframe : * mut core::ffi::c_void, lpactiveobj : * mut core::ffi::c_void) -> windows_core::HRESULT); - OleSetMenuDescriptor(core::mem::transmute(holemenu), hwndframe.param().abi(), hwndactiveobject.param().abi(), lpframe.param().abi(), lpactiveobj.param().abi()).ok() + OleSetMenuDescriptor(core::mem::transmute(holemenu), core::mem::transmute(hwndframe), core::mem::transmute(hwndactiveobject), lpframe.param().abi(), lpactiveobj.param().abi()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -795,37 +777,32 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn OleTranslateColor(clr: u32, hpal: P1) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn OleTranslateColor(clr: u32, hpal: super::super::Graphics::Gdi::HPALETTE) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn OleTranslateColor(clr : u32, hpal : super::super::Graphics::Gdi:: HPALETTE, lpcolorref : *mut super::super::Foundation:: COLORREF) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - OleTranslateColor(core::mem::transmute(clr), hpal.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + OleTranslateColor(core::mem::transmute(clr), core::mem::transmute(hpal), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn OleUIAddVerbMenuA(lpoleobj: P0, lpszshorttype: P1, hmenu: P2, upos: u32, uidverbmin: u32, uidverbmax: u32, baddconvert: P6, idconvert: u32, lphmenu: *mut super::super::UI::WindowsAndMessaging::HMENU) -> super::super::Foundation::BOOL +pub unsafe fn OleUIAddVerbMenuA(lpoleobj: P0, lpszshorttype: P1, hmenu: super::super::UI::WindowsAndMessaging::HMENU, upos: u32, uidverbmin: u32, uidverbmax: u32, baddconvert: P6, idconvert: u32, lphmenu: *mut super::super::UI::WindowsAndMessaging::HMENU) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("oledlg.dll" "system" fn OleUIAddVerbMenuA(lpoleobj : * mut core::ffi::c_void, lpszshorttype : windows_core::PCSTR, hmenu : super::super::UI::WindowsAndMessaging:: HMENU, upos : u32, uidverbmin : u32, uidverbmax : u32, baddconvert : super::super::Foundation:: BOOL, idconvert : u32, lphmenu : *mut super::super::UI::WindowsAndMessaging:: HMENU) -> super::super::Foundation:: BOOL); - OleUIAddVerbMenuA(lpoleobj.param().abi(), lpszshorttype.param().abi(), hmenu.param().abi(), core::mem::transmute(upos), core::mem::transmute(uidverbmin), core::mem::transmute(uidverbmax), baddconvert.param().abi(), core::mem::transmute(idconvert), core::mem::transmute(lphmenu)) + OleUIAddVerbMenuA(lpoleobj.param().abi(), lpszshorttype.param().abi(), core::mem::transmute(hmenu), core::mem::transmute(upos), core::mem::transmute(uidverbmin), core::mem::transmute(uidverbmax), baddconvert.param().abi(), core::mem::transmute(idconvert), core::mem::transmute(lphmenu)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn OleUIAddVerbMenuW(lpoleobj: P0, lpszshorttype: P1, hmenu: P2, upos: u32, uidverbmin: u32, uidverbmax: u32, baddconvert: P6, idconvert: u32, lphmenu: *mut super::super::UI::WindowsAndMessaging::HMENU) -> super::super::Foundation::BOOL +pub unsafe fn OleUIAddVerbMenuW(lpoleobj: P0, lpszshorttype: P1, hmenu: super::super::UI::WindowsAndMessaging::HMENU, upos: u32, uidverbmin: u32, uidverbmax: u32, baddconvert: P6, idconvert: u32, lphmenu: *mut super::super::UI::WindowsAndMessaging::HMENU) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("oledlg.dll" "system" fn OleUIAddVerbMenuW(lpoleobj : * mut core::ffi::c_void, lpszshorttype : windows_core::PCWSTR, hmenu : super::super::UI::WindowsAndMessaging:: HMENU, upos : u32, uidverbmin : u32, uidverbmax : u32, baddconvert : super::super::Foundation:: BOOL, idconvert : u32, lphmenu : *mut super::super::UI::WindowsAndMessaging:: HMENU) -> super::super::Foundation:: BOOL); - OleUIAddVerbMenuW(lpoleobj.param().abi(), lpszshorttype.param().abi(), hmenu.param().abi(), core::mem::transmute(upos), core::mem::transmute(uidverbmin), core::mem::transmute(uidverbmax), baddconvert.param().abi(), core::mem::transmute(idconvert), core::mem::transmute(lphmenu)) + OleUIAddVerbMenuW(lpoleobj.param().abi(), lpszshorttype.param().abi(), core::mem::transmute(hmenu), core::mem::transmute(upos), core::mem::transmute(uidverbmin), core::mem::transmute(uidverbmax), baddconvert.param().abi(), core::mem::transmute(idconvert), core::mem::transmute(lphmenu)) } #[cfg(feature = "Win32_Media")] #[inline] @@ -926,40 +903,32 @@ pub unsafe fn OleUIPasteSpecialW(param0: *const OLEUIPASTESPECIALW) -> u32 { OleUIPasteSpecialW(core::mem::transmute(param0)) } #[inline] -pub unsafe fn OleUIPromptUserA(ntemplate: i32, hwndparent: P1) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn OleUIPromptUserA(ntemplate: i32, hwndparent: super::super::Foundation::HWND) -> i32 { windows_targets::link!("oledlg.dll" "cdecl" fn OleUIPromptUserA(ntemplate : i32, hwndparent : super::super::Foundation:: HWND) -> i32); - OleUIPromptUserA(core::mem::transmute(ntemplate), hwndparent.param().abi()) + OleUIPromptUserA(core::mem::transmute(ntemplate), core::mem::transmute(hwndparent)) } #[inline] -pub unsafe fn OleUIPromptUserW(ntemplate: i32, hwndparent: P1) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn OleUIPromptUserW(ntemplate: i32, hwndparent: super::super::Foundation::HWND) -> i32 { windows_targets::link!("oledlg.dll" "cdecl" fn OleUIPromptUserW(ntemplate : i32, hwndparent : super::super::Foundation:: HWND) -> i32); - OleUIPromptUserW(core::mem::transmute(ntemplate), hwndparent.param().abi()) + OleUIPromptUserW(core::mem::transmute(ntemplate), core::mem::transmute(hwndparent)) } #[inline] -pub unsafe fn OleUIUpdateLinksA(lpoleuilinkcntr: P0, hwndparent: P1, lpsztitle: P2, clinks: i32) -> super::super::Foundation::BOOL +pub unsafe fn OleUIUpdateLinksA(lpoleuilinkcntr: P0, hwndparent: super::super::Foundation::HWND, lpsztitle: P2, clinks: i32) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("oledlg.dll" "system" fn OleUIUpdateLinksA(lpoleuilinkcntr : * mut core::ffi::c_void, hwndparent : super::super::Foundation:: HWND, lpsztitle : windows_core::PCSTR, clinks : i32) -> super::super::Foundation:: BOOL); - OleUIUpdateLinksA(lpoleuilinkcntr.param().abi(), hwndparent.param().abi(), lpsztitle.param().abi(), core::mem::transmute(clinks)) + OleUIUpdateLinksA(lpoleuilinkcntr.param().abi(), core::mem::transmute(hwndparent), lpsztitle.param().abi(), core::mem::transmute(clinks)) } #[inline] -pub unsafe fn OleUIUpdateLinksW(lpoleuilinkcntr: P0, hwndparent: P1, lpsztitle: P2, clinks: i32) -> super::super::Foundation::BOOL +pub unsafe fn OleUIUpdateLinksW(lpoleuilinkcntr: P0, hwndparent: super::super::Foundation::HWND, lpsztitle: P2, clinks: i32) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("oledlg.dll" "system" fn OleUIUpdateLinksW(lpoleuilinkcntr : * mut core::ffi::c_void, hwndparent : super::super::Foundation:: HWND, lpsztitle : windows_core::PCWSTR, clinks : i32) -> super::super::Foundation:: BOOL); - OleUIUpdateLinksW(lpoleuilinkcntr.param().abi(), hwndparent.param().abi(), lpsztitle.param().abi(), core::mem::transmute(clinks)) + OleUIUpdateLinksW(lpoleuilinkcntr.param().abi(), core::mem::transmute(hwndparent), lpsztitle.param().abi(), core::mem::transmute(clinks)) } #[inline] pub unsafe fn OleUninitialize() { @@ -981,13 +950,12 @@ where RegisterActiveObject(punk.param().abi(), core::mem::transmute(rclsid), core::mem::transmute(dwflags), core::mem::transmute(pdwregister)).ok() } #[inline] -pub unsafe fn RegisterDragDrop(hwnd: P0, pdroptarget: P1) -> windows_core::Result<()> +pub unsafe fn RegisterDragDrop(hwnd: super::super::Foundation::HWND, pdroptarget: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn RegisterDragDrop(hwnd : super::super::Foundation:: HWND, pdroptarget : * mut core::ffi::c_void) -> windows_core::HRESULT); - RegisterDragDrop(hwnd.param().abi(), pdroptarget.param().abi()).ok() + RegisterDragDrop(core::mem::transmute(hwnd), pdroptarget.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1020,15 +988,12 @@ 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(core::mem::transmute(dwregister), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null_mut()))).ok() + RevokeActiveObject(core::mem::transmute(dwregister), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RevokeDragDrop(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RevokeDragDrop(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn RevokeDragDrop(hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - RevokeDragDrop(hwnd.param().abi()).ok() + RevokeDragDrop(core::mem::transmute(hwnd)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1375,13 +1340,10 @@ pub unsafe fn VarBstrCmp(bstrleft: &windows_core::BSTR, bstrright: &windows_core VarBstrCmp(core::mem::transmute_copy(bstrleft), core::mem::transmute_copy(bstrright), core::mem::transmute(lcid), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn VarBstrFromBool(boolin: P0, lcid: u32, dwflags: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarBstrFromBool(boolin: super::super::Foundation::VARIANT_BOOL, lcid: u32, dwflags: u32) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarBstrFromBool(boolin : super::super::Foundation:: VARIANT_BOOL, lcid : u32, dwflags : u32, pbstrout : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarBstrFromBool(boolin.param().abi(), core::mem::transmute(lcid), core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) + VarBstrFromBool(core::mem::transmute(boolin), core::mem::transmute(lcid), core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1520,13 +1482,10 @@ pub unsafe fn VarCyFix(cyin: super::Com::CY) -> windows_core::Result(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarCyFromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarCyFromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pcyout : *mut super::Com:: CY) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarCyFromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarCyFromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1682,13 +1641,10 @@ pub unsafe fn VarCySub(cyleft: super::Com::CY, cyright: super::Com::CY) -> windo VarCySub(core::mem::transmute(cyleft), core::mem::transmute(cyright), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarDateFromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarDateFromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarDateFromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pdateout : *mut f64) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarDateFromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarDateFromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1829,13 +1785,10 @@ pub unsafe fn VarDecFix(pdecin: *const super::super::Foundation::DECIMAL) -> win VarDecFix(core::mem::transmute(pdecin), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarDecFromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarDecFromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarDecFromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pdecout : *mut super::super::Foundation:: DECIMAL) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarDecFromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarDecFromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2028,12 +1981,9 @@ pub unsafe fn VarFormatPercent(pvarin: *const super::Variant::VARIANT, inumdig: VarFormatPercent(core::mem::transmute(pvarin), core::mem::transmute(inumdig), core::mem::transmute(iinclead), core::mem::transmute(iuseparens), core::mem::transmute(igroup), core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarI1FromBool(boolin: P0, pcout: windows_core::PSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn VarI1FromBool(boolin: super::super::Foundation::VARIANT_BOOL, pcout: windows_core::PSTR) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn VarI1FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pcout : windows_core::PSTR) -> windows_core::HRESULT); - VarI1FromBool(boolin.param().abi(), core::mem::transmute(pcout)).ok() + VarI1FromBool(core::mem::transmute(boolin), core::mem::transmute(pcout)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2114,13 +2064,10 @@ pub unsafe fn VarI1FromUI8(i64in: u64, pcout: windows_core::PSTR) -> windows_cor VarI1FromUI8(core::mem::transmute(i64in), core::mem::transmute(pcout)).ok() } #[inline] -pub unsafe fn VarI2FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarI2FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarI2FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, psout : *mut i16) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarI2FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarI2FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2214,13 +2161,10 @@ pub unsafe fn VarI2FromUI8(ui64in: u64) -> windows_core::Result { VarI2FromUI8(core::mem::transmute(ui64in), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarI4FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarI4FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarI4FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, plout : *mut i32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarI4FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarI4FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2315,13 +2259,10 @@ pub unsafe fn VarI4FromUI8(ui64in: u64) -> windows_core::Result { VarI4FromUI8(core::mem::transmute(ui64in), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarI8FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarI8FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarI8FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pi64out : *mut i64) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarI8FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarI8FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2499,13 +2440,10 @@ pub unsafe fn VarR4CmpR8(fltleft: f32, dblright: f64) -> VARCMP { VarR4CmpR8(core::mem::transmute(fltleft), core::mem::transmute(dblright)) } #[inline] -pub unsafe fn VarR4FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarR4FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarR4FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pfltout : *mut f32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarR4FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarR4FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2599,13 +2537,10 @@ pub unsafe fn VarR4FromUI8(ui64in: u64) -> windows_core::Result { VarR4FromUI8(core::mem::transmute(ui64in), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarR8FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarR8FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarR8FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pdblout : *mut f64) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarR8FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarR8FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2729,16 +2664,13 @@ 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(), core::mem::transmute(ifirstday), core::mem::transmute(ifirstweek), core::mem::transmute(lcid), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null()))).ok() + VarTokenizeFormatString(pstrformat.param().abi(), core::mem::transmute(rgbtok.as_ptr()), rgbtok.len().try_into().unwrap(), core::mem::transmute(ifirstday), core::mem::transmute(ifirstweek), core::mem::transmute(lcid), core::mem::transmute(pcbactual.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn VarUI1FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarUI1FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarUI1FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pbout : *mut u8) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarUI1FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarUI1FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2833,13 +2765,10 @@ pub unsafe fn VarUI1FromUI8(ui64in: u64) -> windows_core::Result { VarUI1FromUI8(core::mem::transmute(ui64in), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarUI2FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarUI2FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarUI2FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, puiout : *mut u16) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarUI2FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarUI2FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2933,13 +2862,10 @@ pub unsafe fn VarUI2FromUI8(i64in: u64) -> windows_core::Result { VarUI2FromUI8(core::mem::transmute(i64in), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarUI4FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarUI4FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarUI4FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pulout : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarUI4FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarUI4FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -3034,13 +2960,10 @@ pub unsafe fn VarUI4FromUI8(ui64in: u64) -> windows_core::Result { VarUI4FromUI8(core::mem::transmute(ui64in), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn VarUI8FromBool(boolin: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn VarUI8FromBool(boolin: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn VarUI8FromBool(boolin : super::super::Foundation:: VARIANT_BOOL, pi64out : *mut u64) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - VarUI8FromBool(boolin.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + VarUI8FromBool(core::mem::transmute(boolin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -5197,7 +5120,7 @@ impl IDispatchEx { where P6: windows_core::Param, { - (windows_core::Interface::vtable(self).InvokeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(lcid), core::mem::transmute(wflags), core::mem::transmute(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() + (windows_core::Interface::vtable(self).InvokeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(lcid), core::mem::transmute(wflags), core::mem::transmute(pdp), core::mem::transmute(pvarres.unwrap_or(core::mem::zeroed())), core::mem::transmute(pei.unwrap_or(core::mem::zeroed())), pspcaller.param().abi()).ok() } pub unsafe fn DeleteMemberByName(&self, bstrname: &windows_core::BSTR, grfdex: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteMemberByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), core::mem::transmute(grfdex)).ok() @@ -5386,11 +5309,8 @@ impl windows_core::RuntimeName for IDropSource {} windows_core::imp::define_interface!(IDropSourceNotify, IDropSourceNotify_Vtbl, 0x0000012b_0000_0000_c000_000000000046); windows_core::imp::interface_hierarchy!(IDropSourceNotify, windows_core::IUnknown); impl IDropSourceNotify { - pub unsafe fn DragEnterTarget(&self, hwndtarget: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DragEnterTarget)(windows_core::Interface::as_raw(self), hwndtarget.param().abi()).ok() + pub unsafe fn DragEnterTarget(&self, hwndtarget: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DragEnterTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtarget)).ok() } pub unsafe fn DragLeaveTarget(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DragLeaveTarget)(windows_core::Interface::as_raw(self)).ok() @@ -5565,7 +5485,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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -5942,25 +5862,16 @@ impl IFont { (windows_core::Interface::vtable(self).QueryTextMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(ptm)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn AddRefHfont(&self, hfont: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddRefHfont)(windows_core::Interface::as_raw(self), hfont.param().abi()).ok() + pub unsafe fn AddRefHfont(&self, hfont: super::super::Graphics::Gdi::HFONT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddRefHfont)(windows_core::Interface::as_raw(self), core::mem::transmute(hfont)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseHfont(&self, hfont: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseHfont)(windows_core::Interface::as_raw(self), hfont.param().abi()).ok() + pub unsafe fn ReleaseHfont(&self, hfont: super::super::Graphics::Gdi::HFONT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseHfont)(windows_core::Interface::as_raw(self), core::mem::transmute(hfont)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetHdc(&self, hdc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHdc)(windows_core::Interface::as_raw(self), hdc.param().abi()).ok() + pub unsafe fn SetHdc(&self, hdc: super::super::Graphics::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHdc)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc)).ok() } } #[repr(C)] @@ -6736,7 +6647,7 @@ impl IOleCache2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateCache)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), core::mem::transmute(grfupdf), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).UpdateCache)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), core::mem::transmute(grfupdf), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn DiscardCache(&self, dwdiscardoptions: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DiscardCache)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdiscardoptions)).ok() @@ -7551,7 +7462,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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsg.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn OnFrameWindowActivate(&self, factivate: P0) -> windows_core::Result<()> where @@ -7647,26 +7558,16 @@ impl core::ops::Deref for IOleInPlaceFrame { windows_core::imp::interface_hierarchy!(IOleInPlaceFrame, windows_core::IUnknown, IOleWindow, IOleInPlaceUIWindow); impl IOleInPlaceFrame { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn InsertMenus(&self, hmenushared: P0, lpmenuwidths: *mut OLEMENUGROUPWIDTHS) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InsertMenus)(windows_core::Interface::as_raw(self), hmenushared.param().abi(), core::mem::transmute(lpmenuwidths)).ok() + pub unsafe fn InsertMenus(&self, hmenushared: super::super::UI::WindowsAndMessaging::HMENU, lpmenuwidths: *mut OLEMENUGROUPWIDTHS) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InsertMenus)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenushared), core::mem::transmute(lpmenuwidths)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetMenu(&self, hmenushared: P0, holemenu: isize, hwndactiveobject: P2) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMenu)(windows_core::Interface::as_raw(self), hmenushared.param().abi(), core::mem::transmute(holemenu), hwndactiveobject.param().abi()).ok() + pub unsafe fn SetMenu(&self, hmenushared: super::super::UI::WindowsAndMessaging::HMENU, holemenu: isize, hwndactiveobject: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenushared), core::mem::transmute(holemenu), core::mem::transmute(hwndactiveobject)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn RemoveMenus(&self, hmenushared: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemoveMenus)(windows_core::Interface::as_raw(self), hmenushared.param().abi()).ok() + pub unsafe fn RemoveMenus(&self, hmenushared: super::super::UI::WindowsAndMessaging::HMENU) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemoveMenus)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenushared)).ok() } pub unsafe fn SetStatusText(&self, pszstatustext: P0) -> windows_core::Result<()> where @@ -7835,13 +7736,9 @@ impl core::ops::Deref for IOleInPlaceObjectWindowless { } windows_core::imp::interface_hierarchy!(IOleInPlaceObjectWindowless, windows_core::IUnknown, IOleWindow, IOleInPlaceObject); impl IOleInPlaceObjectWindowless { - pub unsafe fn OnWindowMessage(&self, msg: u32, wparam: P1, lparam: P2) -> windows_core::Result - where - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn OnWindowMessage(&self, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } pub unsafe fn GetDropTarget(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8127,11 +8024,8 @@ impl IOleInPlaceSiteWindowless { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), core::mem::transmute(prect), core::mem::transmute(grfflags), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ReleaseDC(&self, hdc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), hdc.param().abi()).ok() + pub unsafe fn ReleaseDC(&self, hdc: super::super::Graphics::Gdi::HDC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc)).ok() } pub unsafe fn InvalidateRect(&self, prect: *const super::super::Foundation::RECT, ferase: P1) -> windows_core::Result<()> where @@ -8140,12 +8034,11 @@ impl IOleInPlaceSiteWindowless { (windows_core::Interface::vtable(self).InvalidateRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prect), ferase.param().abi()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn InvalidateRgn(&self, hrgn: P0, ferase: P1) -> windows_core::Result<()> + pub unsafe fn InvalidateRgn(&self, hrgn: super::super::Graphics::Gdi::HRGN, ferase: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InvalidateRgn)(windows_core::Interface::as_raw(self), hrgn.param().abi(), ferase.param().abi()).ok() + (windows_core::Interface::vtable(self).InvalidateRgn)(windows_core::Interface::as_raw(self), core::mem::transmute(hrgn), ferase.param().abi()).ok() } pub unsafe fn ScrollRect(&self, dx: i32, dy: i32, prectscroll: *const super::super::Foundation::RECT, prectclip: *const super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ScrollRect)(windows_core::Interface::as_raw(self), core::mem::transmute(dx), core::mem::transmute(dy), core::mem::transmute(prectscroll), core::mem::transmute(prectclip)).ok() @@ -8153,13 +8046,9 @@ impl IOleInPlaceSiteWindowless { pub unsafe fn AdjustRect(&self, prc: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AdjustRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc)).ok() } - pub unsafe fn OnDefWindowMessage(&self, msg: u32, wparam: P1, lparam: P2) -> windows_core::Result - where - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn OnDefWindowMessage(&self, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnDefWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnDefWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } } #[repr(C)] @@ -8687,12 +8576,11 @@ impl IOleObject { (windows_core::Interface::vtable(self).GetClipboardData)(windows_core::Interface::as_raw(self), core::mem::transmute(dwreserved), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn DoVerb(&self, iverb: i32, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG, pactivesite: P2, lindex: i32, hwndparent: P4, lprcposrect: *const super::super::Foundation::RECT) -> windows_core::Result<()> + pub unsafe fn DoVerb(&self, iverb: i32, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG, pactivesite: P2, lindex: i32, hwndparent: super::super::Foundation::HWND, lprcposrect: *const super::super::Foundation::RECT) -> windows_core::Result<()> where P2: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).DoVerb)(windows_core::Interface::as_raw(self), core::mem::transmute(iverb), core::mem::transmute(lpmsg), pactivesite.param().abi(), core::mem::transmute(lindex), hwndparent.param().abi(), core::mem::transmute(lprcposrect)).ok() + (windows_core::Interface::vtable(self).DoVerb)(windows_core::Interface::as_raw(self), core::mem::transmute(iverb), core::mem::transmute(lpmsg), pactivesite.param().abi(), core::mem::transmute(lindex), core::mem::transmute(hwndparent), core::mem::transmute(lprcposrect)).ok() } pub unsafe fn EnumVerbs(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9125,7 +9013,7 @@ impl IOleUILinkContainerA { (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), lpszdisplayname.param().abi(), core::mem::transmute(lenfilename), core::mem::transmute(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), core::mem::transmute(dwlink), core::mem::transmute(lplpszdisplayname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplenfilename), core::mem::transmute(lplpszfulllinktype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpszshortlinktype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpfsourceavailable), core::mem::transmute(lpfisselected)).ok() + (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), core::mem::transmute(lplpszdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplenfilename), core::mem::transmute(lplpszfulllinktype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpszshortlinktype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfsourceavailable), core::mem::transmute(lpfisselected)).ok() } pub unsafe fn OpenLinkSource(&self, dwlink: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OpenLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink)).ok() @@ -9241,7 +9129,7 @@ impl IOleUILinkContainerW { (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), lpszdisplayname.param().abi(), core::mem::transmute(lenfilename), core::mem::transmute(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), core::mem::transmute(dwlink), core::mem::transmute(lplpszdisplayname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplenfilename), core::mem::transmute(lplpszfulllinktype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpszshortlinktype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpfsourceavailable), core::mem::transmute(lpfisselected)).ok() + (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), core::mem::transmute(lplpszdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplenfilename), core::mem::transmute(lplpszfulllinktype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpszshortlinktype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfsourceavailable), core::mem::transmute(lpfisselected)).ok() } pub unsafe fn OpenLinkSource(&self, dwlink: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OpenLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink)).ok() @@ -9422,23 +9310,22 @@ windows_core::imp::define_interface!(IOleUIObjInfoA, IOleUIObjInfoA_Vtbl, 0); 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), core::mem::transmute(dwobject), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(lpdwobjsize), core::mem::transmute(lplpszlabel.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpsztype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpszshorttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpszlocation.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwobject), core::mem::transmute(lpclassid), core::mem::transmute(lpwformat), core::mem::transmute(lpconvertdefaultclassid), core::mem::transmute(lplpclsidexclude), core::mem::transmute(lpcclsidexclude.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(lpclassid), core::mem::transmute(lpwformat), core::mem::transmute(lpconvertdefaultclassid), core::mem::transmute(lplpclsidexclude), core::mem::transmute(lpcclsidexclude.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwobject), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(phmetapict.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdvaspect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pncurrentscale.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: P1, dvaspect: u32, ncurrentscale: i32, brelativetoorig: P4) -> windows_core::Result<()> + pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: super::super::Foundation::HGLOBAL, dvaspect: u32, ncurrentscale: i32, brelativetoorig: P4) -> windows_core::Result<()> where - P1: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), hmetapict.param().abi(), core::mem::transmute(dvaspect), core::mem::transmute(ncurrentscale), brelativetoorig.param().abi()).ok() + (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(hmetapict), core::mem::transmute(dvaspect), core::mem::transmute(ncurrentscale), brelativetoorig.param().abi()).ok() } } #[repr(C)] @@ -9497,23 +9384,22 @@ windows_core::imp::define_interface!(IOleUIObjInfoW, IOleUIObjInfoW_Vtbl, 0); 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), core::mem::transmute(dwobject), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(lpdwobjsize), core::mem::transmute(lplpszlabel.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpsztype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpszshorttype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpszlocation.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwobject), core::mem::transmute(lpclassid), core::mem::transmute(lpwformat), core::mem::transmute(lpconvertdefaultclassid), core::mem::transmute(lplpclsidexclude), core::mem::transmute(lpcclsidexclude.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(lpclassid), core::mem::transmute(lpwformat), core::mem::transmute(lpconvertdefaultclassid), core::mem::transmute(lplpclsidexclude), core::mem::transmute(lpcclsidexclude.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwobject), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(phmetapict.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdvaspect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pncurrentscale.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: P1, dvaspect: u32, ncurrentscale: i32, brelativetoorig: P4) -> windows_core::Result<()> + pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: super::super::Foundation::HGLOBAL, dvaspect: u32, ncurrentscale: i32, brelativetoorig: P4) -> windows_core::Result<()> where - P1: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), hmetapict.param().abi(), core::mem::transmute(dvaspect), core::mem::transmute(ncurrentscale), brelativetoorig.param().abi()).ok() + (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(hmetapict), core::mem::transmute(dvaspect), core::mem::transmute(ncurrentscale), brelativetoorig.param().abi()).ok() } } #[repr(C)] @@ -10214,17 +10100,11 @@ impl IPicture { (windows_core::Interface::vtable(self).Height)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Render(&self, hdc: P0, x: i32, y: i32, cx: i32, cy: i32, xsrc: i32, ysrc: i32, cxsrc: i32, cysrc: i32, prcwbounds: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(cxsrc), core::mem::transmute(cysrc), core::mem::transmute(prcwbounds)).ok() + pub unsafe fn Render(&self, hdc: super::super::Graphics::Gdi::HDC, x: i32, y: i32, cx: i32, cy: i32, xsrc: i32, ysrc: i32, cxsrc: i32, cysrc: i32, prcwbounds: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(cxsrc), core::mem::transmute(cysrc), core::mem::transmute(prcwbounds)).ok() } - pub unsafe fn set_hPal(&self, hpal: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_hPal)(windows_core::Interface::as_raw(self), hpal.param().abi()).ok() + pub unsafe fn set_hPal(&self, hpal: OLE_HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_hPal)(windows_core::Interface::as_raw(self), core::mem::transmute(hpal)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn CurDC(&self) -> windows_core::Result { @@ -10232,11 +10112,8 @@ impl IPicture { (windows_core::Interface::vtable(self).CurDC)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SelectPicture(&self, hdcin: P0, phdcout: *mut super::super::Graphics::Gdi::HDC, phbmpout: *mut OLE_HANDLE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SelectPicture)(windows_core::Interface::as_raw(self), hdcin.param().abi(), core::mem::transmute(phdcout), core::mem::transmute(phbmpout)).ok() + pub unsafe fn SelectPicture(&self, hdcin: super::super::Graphics::Gdi::HDC, phdcout: *mut super::super::Graphics::Gdi::HDC, phbmpout: *mut OLE_HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectPicture)(windows_core::Interface::as_raw(self), core::mem::transmute(hdcin), core::mem::transmute(phdcout), core::mem::transmute(phbmpout)).ok() } pub unsafe fn KeepOriginalFormat(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10473,11 +10350,8 @@ impl IPicture2 { (windows_core::Interface::vtable(self).Height)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Render(&self, hdc: P0, x: i32, y: i32, cx: i32, cy: i32, xsrc: i32, ysrc: i32, cxsrc: i32, cysrc: i32, prcwbounds: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(cxsrc), core::mem::transmute(cysrc), core::mem::transmute(prcwbounds)).ok() + pub unsafe fn Render(&self, hdc: super::super::Graphics::Gdi::HDC, x: i32, y: i32, cx: i32, cy: i32, xsrc: i32, ysrc: i32, cxsrc: i32, cysrc: i32, prcwbounds: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Render)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(xsrc), core::mem::transmute(ysrc), core::mem::transmute(cxsrc), core::mem::transmute(cysrc), core::mem::transmute(prcwbounds)).ok() } pub unsafe fn set_hPal(&self, hpal: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).set_hPal)(windows_core::Interface::as_raw(self), core::mem::transmute(hpal)).ok() @@ -10488,11 +10362,8 @@ impl IPicture2 { (windows_core::Interface::vtable(self).CurDC)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SelectPicture(&self, hdcin: P0, phdcout: *mut super::super::Graphics::Gdi::HDC, phbmpout: *mut usize) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SelectPicture)(windows_core::Interface::as_raw(self), hdcin.param().abi(), core::mem::transmute(phdcout), core::mem::transmute(phbmpout)).ok() + pub unsafe fn SelectPicture(&self, hdcin: super::super::Graphics::Gdi::HDC, phdcout: *mut super::super::Graphics::Gdi::HDC, phbmpout: *mut usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectPicture)(windows_core::Interface::as_raw(self), core::mem::transmute(hdcin), core::mem::transmute(phdcout), core::mem::transmute(phbmpout)).ok() } pub unsafe fn KeepOriginalFormat(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10906,12 +10777,11 @@ impl IPropertyPage { { (windows_core::Interface::vtable(self).SetPageSite)(windows_core::Interface::as_raw(self), ppagesite.param().abi()).ok() } - pub unsafe fn Activate(&self, hwndparent: P0, prect: *const super::super::Foundation::RECT, bmodal: P2) -> windows_core::Result<()> + pub unsafe fn Activate(&self, hwndparent: super::super::Foundation::HWND, prect: *const super::super::Foundation::RECT, bmodal: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(prect), bmodal.param().abi()).ok() + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(prect), bmodal.param().abi()).ok() } pub unsafe fn Deactivate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self)).ok() @@ -11790,21 +11660,11 @@ impl windows_core::RuntimeName for IRecordInfo {} windows_core::imp::define_interface!(ISimpleFrameSite, ISimpleFrameSite_Vtbl, 0x742b0e01_14e6_101b_914e_00aa00300cab); windows_core::imp::interface_hierarchy!(ISimpleFrameSite, windows_core::IUnknown); impl ISimpleFrameSite { - pub unsafe fn PreMessageFilter(&self, hwnd: P0, msg: u32, wp: P2, lp: P3, plresult: *mut super::super::Foundation::LRESULT, pdwcookie: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).PreMessageFilter)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(msg), wp.param().abi(), lp.param().abi(), core::mem::transmute(plresult), core::mem::transmute(pdwcookie)).ok() + pub unsafe fn PreMessageFilter(&self, hwnd: super::super::Foundation::HWND, msg: u32, wp: super::super::Foundation::WPARAM, lp: super::super::Foundation::LPARAM, plresult: *mut super::super::Foundation::LRESULT, pdwcookie: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PreMessageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wp), core::mem::transmute(lp), core::mem::transmute(plresult), core::mem::transmute(pdwcookie)).ok() } - pub unsafe fn PostMessageFilter(&self, hwnd: P0, msg: u32, wp: P2, lp: P3, plresult: *mut super::super::Foundation::LRESULT, dwcookie: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).PostMessageFilter)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(msg), wp.param().abi(), lp.param().abi(), core::mem::transmute(plresult), core::mem::transmute(dwcookie)).ok() + pub unsafe fn PostMessageFilter(&self, hwnd: super::super::Foundation::HWND, msg: u32, wp: super::super::Foundation::WPARAM, lp: super::super::Foundation::LPARAM, plresult: *mut super::super::Foundation::LRESULT, dwcookie: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PostMessageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wp), core::mem::transmute(lp), core::mem::transmute(plresult), core::mem::transmute(dwcookie)).ok() } } #[repr(C)] @@ -12169,19 +12029,25 @@ windows_core::imp::define_interface!(IViewObject, IViewObject_Vtbl, 0x0000010d_0 windows_core::imp::interface_hierarchy!(IViewObject, windows_core::IUnknown); impl IViewObject { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] - pub unsafe fn Draw(&self, dwdrawaspect: super::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: Option<*const super::Com::DVTARGETDEVICE>, hdctargetdev: P4, hdcdraw: P5, lprcbounds: Option<*const super::super::Foundation::RECTL>, lprcwbounds: Option<*const super::super::Foundation::RECTL>, pfncontinue: isize, dwcontinue: usize) -> windows_core::Result<()> - where - P4: windows_core::Param, - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(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())), core::mem::transmute(pfncontinue), core::mem::transmute(dwcontinue)).ok() + pub unsafe fn Draw(&self, dwdrawaspect: super::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: Option<*const super::Com::DVTARGETDEVICE>, hdctargetdev: Option, hdcdraw: super::super::Graphics::Gdi::HDC, lprcbounds: Option<*const super::super::Foundation::RECTL>, lprcwbounds: Option<*const super::super::Foundation::RECTL>, pfncontinue: Option, dwcontinue: usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Draw)( + windows_core::Interface::as_raw(self), + core::mem::transmute(dwdrawaspect), + core::mem::transmute(lindex), + core::mem::transmute(pvaspect), + core::mem::transmute(ptd.unwrap_or(core::mem::zeroed())), + core::mem::transmute(hdctargetdev.unwrap_or(core::mem::zeroed())), + core::mem::transmute(hdcdraw), + core::mem::transmute(lprcbounds.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lprcwbounds.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfncontinue.unwrap_or(core::mem::zeroed())), + core::mem::transmute(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: P4, ppcolorset: *mut *mut super::super::Graphics::Gdi::LOGPALETTE) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetColorSet)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(pvaspect), core::mem::transmute(ptd.unwrap_or(core::ptr::null())), hictargetdev.param().abi(), core::mem::transmute(ppcolorset)).ok() + pub unsafe fn GetColorSet(&self, dwdrawaspect: super::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: Option<*const super::Com::DVTARGETDEVICE>, hictargetdev: Option, ppcolorset: *mut *mut super::super::Graphics::Gdi::LOGPALETTE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetColorSet)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(pvaspect), core::mem::transmute(ptd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hictargetdev.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { @@ -12199,7 +12065,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(core::ptr::null_mut())), core::mem::transmute(padvf.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(padvf.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppadvsink)).ok() } } #[repr(C)] @@ -12353,12 +12219,9 @@ impl IViewObjectEx { (windows_core::Interface::vtable(self).QueryHitRect)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaspect), core::mem::transmute(prectbounds), core::mem::transmute(prectloc), core::mem::transmute(lclosehint), &mut result__).map(|| result__) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] - pub unsafe fn GetNaturalExtent(&self, dwaspect: super::Com::DVASPECT, lindex: i32, ptd: *const super::Com::DVTARGETDEVICE, hictargetdev: P3, pextentinfo: *const DVEXTENTINFO) -> windows_core::Result - where - P3: windows_core::Param, - { + pub unsafe fn GetNaturalExtent(&self, dwaspect: super::Com::DVASPECT, lindex: i32, ptd: *const super::Com::DVTARGETDEVICE, hictargetdev: super::super::Graphics::Gdi::HDC, pextentinfo: *const DVEXTENTINFO) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetNaturalExtent)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaspect), core::mem::transmute(lindex), core::mem::transmute(ptd), hictargetdev.param().abi(), core::mem::transmute(pextentinfo), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetNaturalExtent)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaspect), core::mem::transmute(lindex), core::mem::transmute(ptd), core::mem::transmute(hictargetdev), core::mem::transmute(pextentinfo), &mut result__).map(|| result__) } } #[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 6e623c4fc0..e5ce4f8f68 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs @@ -48,17 +48,11 @@ impl IWPCProviderConfig { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetUserSummary)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrsid), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn Configure(&self, hwnd: P0, bstrsid: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute_copy(bstrsid)).ok() + pub unsafe fn Configure(&self, hwnd: Option, bstrsid: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute_copy(bstrsid)).ok() } - pub unsafe fn RequestOverride(&self, hwnd: P0, bstrpath: &windows_core::BSTR, dwflags: WPCFLAG_RESTRICTION) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RequestOverride)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute_copy(bstrpath), dwflags.0 as _).ok() + pub unsafe fn RequestOverride(&self, hwnd: Option, bstrpath: &windows_core::BSTR, dwflags: WPCFLAG_RESTRICTION) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RequestOverride)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute_copy(bstrpath), dwflags.0 as _).ok() } } #[repr(C)] @@ -262,13 +256,12 @@ impl IWPCWebSettings { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSettings)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn RequestURLOverride(&self, hwnd: P0, pcszurl: P1, ppcszsuburls: Option<&[windows_core::PCWSTR]>) -> windows_core::Result + pub unsafe fn RequestURLOverride(&self, hwnd: Option, pcszurl: P1, ppcszsuburls: Option<&[windows_core::PCWSTR]>) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RequestURLOverride)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pcszurl.param().abi(), ppcszsuburls.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppcszsuburls.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RequestURLOverride)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pcszurl.param().abi(), ppcszsuburls.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppcszsuburls.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).map(|| result__) } } #[repr(C)] @@ -380,7 +373,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), core::mem::transmute(pguidid), core::mem::transmute(ppszname.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetWebFilterInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidid), core::mem::transmute(ppszname.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Performance/HardwareCounterProfiling/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Performance/HardwareCounterProfiling/mod.rs index d5daba1fc6..4cbea6463e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Performance/HardwareCounterProfiling/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Performance/HardwareCounterProfiling/mod.rs @@ -1,34 +1,22 @@ #[inline] -pub unsafe fn DisableThreadProfiling(performancedatahandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DisableThreadProfiling(performancedatahandle: super::super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn DisableThreadProfiling(performancedatahandle : super::super::super::Foundation:: HANDLE) -> u32); - DisableThreadProfiling(performancedatahandle.param().abi()) + DisableThreadProfiling(core::mem::transmute(performancedatahandle)) } #[inline] -pub unsafe fn EnableThreadProfiling(threadhandle: P0, flags: u32, hardwarecounters: u64, performancedatahandle: *mut super::super::super::Foundation::HANDLE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn EnableThreadProfiling(threadhandle: super::super::super::Foundation::HANDLE, flags: u32, hardwarecounters: u64, performancedatahandle: *mut super::super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn EnableThreadProfiling(threadhandle : super::super::super::Foundation:: HANDLE, flags : u32, hardwarecounters : u64, performancedatahandle : *mut super::super::super::Foundation:: HANDLE) -> u32); - EnableThreadProfiling(threadhandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(hardwarecounters), core::mem::transmute(performancedatahandle)) + EnableThreadProfiling(core::mem::transmute(threadhandle), core::mem::transmute(flags), core::mem::transmute(hardwarecounters), core::mem::transmute(performancedatahandle)) } #[inline] -pub unsafe fn QueryThreadProfiling(threadhandle: P0, enabled: *mut super::super::super::Foundation::BOOLEAN) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn QueryThreadProfiling(threadhandle: super::super::super::Foundation::HANDLE, enabled: *mut super::super::super::Foundation::BOOLEAN) -> u32 { windows_targets::link!("kernel32.dll" "system" fn QueryThreadProfiling(threadhandle : super::super::super::Foundation:: HANDLE, enabled : *mut super::super::super::Foundation:: BOOLEAN) -> u32); - QueryThreadProfiling(threadhandle.param().abi(), core::mem::transmute(enabled)) + QueryThreadProfiling(core::mem::transmute(threadhandle), core::mem::transmute(enabled)) } #[inline] -pub unsafe fn ReadThreadProfilingData(performancedatahandle: P0, flags: u32, performancedata: *mut PERFORMANCE_DATA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ReadThreadProfilingData(performancedatahandle: super::super::super::Foundation::HANDLE, flags: u32, performancedata: *mut PERFORMANCE_DATA) -> u32 { windows_targets::link!("kernel32.dll" "system" fn ReadThreadProfilingData(performancedatahandle : super::super::super::Foundation:: HANDLE, flags : u32, performancedata : *mut PERFORMANCE_DATA) -> u32); - ReadThreadProfilingData(performancedatahandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(performancedata)) + ReadThreadProfilingData(core::mem::transmute(performancedatahandle), core::mem::transmute(flags), core::mem::transmute(performancedata)) } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 aeecf35b4f..490a8d99b1 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs @@ -46,40 +46,36 @@ where LoadPerfCounterTextStringsW(lpcommandline.param().abi(), bquietmodearg.param().abi()) } #[inline] -pub unsafe fn PdhAddCounterA(hquery: P0, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 +pub unsafe fn PdhAddCounterA(hquery: PDH_HQUERY, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhAddCounterA(hquery : PDH_HQUERY, szfullcounterpath : windows_core::PCSTR, dwuserdata : usize, phcounter : *mut PDH_HCOUNTER) -> u32); - PdhAddCounterA(hquery.param().abi(), szfullcounterpath.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phcounter)) + PdhAddCounterA(core::mem::transmute(hquery), szfullcounterpath.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phcounter)) } #[inline] -pub unsafe fn PdhAddCounterW(hquery: P0, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 +pub unsafe fn PdhAddCounterW(hquery: PDH_HQUERY, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhAddCounterW(hquery : PDH_HQUERY, szfullcounterpath : windows_core::PCWSTR, dwuserdata : usize, phcounter : *mut PDH_HCOUNTER) -> u32); - PdhAddCounterW(hquery.param().abi(), szfullcounterpath.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phcounter)) + PdhAddCounterW(core::mem::transmute(hquery), szfullcounterpath.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phcounter)) } #[inline] -pub unsafe fn PdhAddEnglishCounterA(hquery: P0, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 +pub unsafe fn PdhAddEnglishCounterA(hquery: PDH_HQUERY, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhAddEnglishCounterA(hquery : PDH_HQUERY, szfullcounterpath : windows_core::PCSTR, dwuserdata : usize, phcounter : *mut PDH_HCOUNTER) -> u32); - PdhAddEnglishCounterA(hquery.param().abi(), szfullcounterpath.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phcounter)) + PdhAddEnglishCounterA(core::mem::transmute(hquery), szfullcounterpath.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phcounter)) } #[inline] -pub unsafe fn PdhAddEnglishCounterW(hquery: P0, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 +pub unsafe fn PdhAddEnglishCounterW(hquery: PDH_HQUERY, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhAddEnglishCounterW(hquery : PDH_HQUERY, szfullcounterpath : windows_core::PCWSTR, dwuserdata : usize, phcounter : *mut PDH_HCOUNTER) -> u32); - PdhAddEnglishCounterW(hquery.param().abi(), szfullcounterpath.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phcounter)) + PdhAddEnglishCounterW(core::mem::transmute(hquery), szfullcounterpath.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phcounter)) } #[inline] pub unsafe fn PdhBindInputDataSourceA(phdatasource: *mut PDH_HLOG, logfilenamelist: P1) -> u32 @@ -118,20 +114,14 @@ pub unsafe fn PdhBrowseCountersW(pbrowsedlgdata: *const PDH_BROWSE_DLG_CONFIG_W) PdhBrowseCountersW(core::mem::transmute(pbrowsedlgdata)) } #[inline] -pub unsafe fn PdhCalculateCounterFromRawValue(hcounter: P0, dwformat: PDH_FMT, rawvalue1: *const PDH_RAW_COUNTER, rawvalue2: *const PDH_RAW_COUNTER, fmtvalue: *mut PDH_FMT_COUNTERVALUE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhCalculateCounterFromRawValue(hcounter: PDH_HCOUNTER, dwformat: PDH_FMT, rawvalue1: *const PDH_RAW_COUNTER, rawvalue2: *const PDH_RAW_COUNTER, fmtvalue: *mut PDH_FMT_COUNTERVALUE) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhCalculateCounterFromRawValue(hcounter : PDH_HCOUNTER, dwformat : PDH_FMT, rawvalue1 : *const PDH_RAW_COUNTER, rawvalue2 : *const PDH_RAW_COUNTER, fmtvalue : *mut PDH_FMT_COUNTERVALUE) -> u32); - PdhCalculateCounterFromRawValue(hcounter.param().abi(), core::mem::transmute(dwformat), core::mem::transmute(rawvalue1), core::mem::transmute(rawvalue2), core::mem::transmute(fmtvalue)) + PdhCalculateCounterFromRawValue(core::mem::transmute(hcounter), core::mem::transmute(dwformat), core::mem::transmute(rawvalue1), core::mem::transmute(rawvalue2), core::mem::transmute(fmtvalue)) } #[inline] -pub unsafe fn PdhCloseLog(hlog: P0, dwflags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhCloseLog(hlog: PDH_HLOG, dwflags: u32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhCloseLog(hlog : PDH_HLOG, dwflags : u32) -> u32); - PdhCloseLog(hlog.param().abi(), core::mem::transmute(dwflags)) + PdhCloseLog(core::mem::transmute(hlog), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn PdhCloseQuery(hquery: PDH_HQUERY) -> u32 { @@ -144,13 +134,9 @@ pub unsafe fn PdhCollectQueryData(hquery: PDH_HQUERY) -> u32 { PdhCollectQueryData(core::mem::transmute(hquery)) } #[inline] -pub unsafe fn PdhCollectQueryDataEx(hquery: P0, dwintervaltime: u32, hnewdataevent: P2) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn PdhCollectQueryDataEx(hquery: PDH_HQUERY, dwintervaltime: u32, hnewdataevent: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhCollectQueryDataEx(hquery : PDH_HQUERY, dwintervaltime : u32, hnewdataevent : super::super::Foundation:: HANDLE) -> u32); - PdhCollectQueryDataEx(hquery.param().abi(), core::mem::transmute(dwintervaltime), hnewdataevent.param().abi()) + PdhCollectQueryDataEx(core::mem::transmute(hquery), core::mem::transmute(dwintervaltime), core::mem::transmute(hnewdataevent)) } #[inline] pub unsafe fn PdhCollectQueryDataWithTime(hquery: PDH_HQUERY, plltimestamp: *mut i64) -> u32 { @@ -158,12 +144,9 @@ pub unsafe fn PdhCollectQueryDataWithTime(hquery: PDH_HQUERY, plltimestamp: *mut PdhCollectQueryDataWithTime(core::mem::transmute(hquery), core::mem::transmute(plltimestamp)) } #[inline] -pub unsafe fn PdhComputeCounterStatistics(hcounter: P0, dwformat: PDH_FMT, dwfirstentry: u32, dwnumentries: u32, lprawvaluearray: *const PDH_RAW_COUNTER, data: *mut PDH_STATISTICS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhComputeCounterStatistics(hcounter: PDH_HCOUNTER, dwformat: PDH_FMT, dwfirstentry: u32, dwnumentries: u32, lprawvaluearray: *const PDH_RAW_COUNTER, data: *mut PDH_STATISTICS) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhComputeCounterStatistics(hcounter : PDH_HCOUNTER, dwformat : PDH_FMT, dwfirstentry : u32, dwnumentries : u32, lprawvaluearray : *const PDH_RAW_COUNTER, data : *mut PDH_STATISTICS) -> u32); - PdhComputeCounterStatistics(hcounter.param().abi(), core::mem::transmute(dwformat), core::mem::transmute(dwfirstentry), core::mem::transmute(dwnumentries), core::mem::transmute(lprawvaluearray), core::mem::transmute(data)) + PdhComputeCounterStatistics(core::mem::transmute(hcounter), core::mem::transmute(dwformat), core::mem::transmute(dwfirstentry), core::mem::transmute(dwnumentries), core::mem::transmute(lprawvaluearray), core::mem::transmute(data)) } #[inline] pub unsafe fn PdhConnectMachineA(szmachinename: P0) -> u32 @@ -198,215 +181,198 @@ where PdhCreateSQLTablesW(szdatasource.param().abi()) } #[inline] -pub unsafe fn PdhEnumLogSetNamesA(szdatasource: P0, mszdatasetnamelist: windows_core::PSTR, pcchbufferlength: *mut u32) -> u32 +pub unsafe fn PdhEnumLogSetNamesA(szdatasource: P0, mszdatasetnamelist: Option, pcchbufferlength: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumLogSetNamesA(szdatasource : windows_core::PCSTR, mszdatasetnamelist : windows_core::PSTR, pcchbufferlength : *mut u32) -> u32); - PdhEnumLogSetNamesA(szdatasource.param().abi(), core::mem::transmute(mszdatasetnamelist), core::mem::transmute(pcchbufferlength)) + PdhEnumLogSetNamesA(szdatasource.param().abi(), core::mem::transmute(mszdatasetnamelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbufferlength)) } #[inline] -pub unsafe fn PdhEnumLogSetNamesW(szdatasource: P0, mszdatasetnamelist: windows_core::PWSTR, pcchbufferlength: *mut u32) -> u32 +pub unsafe fn PdhEnumLogSetNamesW(szdatasource: P0, mszdatasetnamelist: Option, pcchbufferlength: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumLogSetNamesW(szdatasource : windows_core::PCWSTR, mszdatasetnamelist : windows_core::PWSTR, pcchbufferlength : *mut u32) -> u32); - PdhEnumLogSetNamesW(szdatasource.param().abi(), core::mem::transmute(mszdatasetnamelist), core::mem::transmute(pcchbufferlength)) + PdhEnumLogSetNamesW(szdatasource.param().abi(), core::mem::transmute(mszdatasetnamelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbufferlength)) } #[inline] -pub unsafe fn PdhEnumMachinesA(szdatasource: P0, mszmachinelist: windows_core::PSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhEnumMachinesA(szdatasource: P0, mszmachinelist: Option, pcchbuffersize: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumMachinesA(szdatasource : windows_core::PCSTR, mszmachinelist : windows_core::PSTR, pcchbuffersize : *mut u32) -> u32); - PdhEnumMachinesA(szdatasource.param().abi(), core::mem::transmute(mszmachinelist), core::mem::transmute(pcchbuffersize)) + PdhEnumMachinesA(szdatasource.param().abi(), core::mem::transmute(mszmachinelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhEnumMachinesHA(hdatasource: P0, mszmachinelist: windows_core::PSTR, pcchbuffersize: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhEnumMachinesHA(hdatasource: Option, mszmachinelist: Option, pcchbuffersize: *mut u32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhEnumMachinesHA(hdatasource : PDH_HLOG, mszmachinelist : windows_core::PSTR, pcchbuffersize : *mut u32) -> u32); - PdhEnumMachinesHA(hdatasource.param().abi(), core::mem::transmute(mszmachinelist), core::mem::transmute(pcchbuffersize)) + PdhEnumMachinesHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), core::mem::transmute(mszmachinelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhEnumMachinesHW(hdatasource: P0, mszmachinelist: windows_core::PWSTR, pcchbuffersize: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhEnumMachinesHW(hdatasource: Option, mszmachinelist: Option, pcchbuffersize: *mut u32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhEnumMachinesHW(hdatasource : PDH_HLOG, mszmachinelist : windows_core::PWSTR, pcchbuffersize : *mut u32) -> u32); - PdhEnumMachinesHW(hdatasource.param().abi(), core::mem::transmute(mszmachinelist), core::mem::transmute(pcchbuffersize)) + PdhEnumMachinesHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), core::mem::transmute(mszmachinelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhEnumMachinesW(szdatasource: P0, mszmachinelist: windows_core::PWSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhEnumMachinesW(szdatasource: P0, mszmachinelist: Option, pcchbuffersize: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumMachinesW(szdatasource : windows_core::PCWSTR, mszmachinelist : windows_core::PWSTR, pcchbuffersize : *mut u32) -> u32); - PdhEnumMachinesW(szdatasource.param().abi(), core::mem::transmute(mszmachinelist), core::mem::transmute(pcchbuffersize)) + PdhEnumMachinesW(szdatasource.param().abi(), core::mem::transmute(mszmachinelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhEnumObjectItemsA(szdatasource: P0, szmachinename: P1, szobjectname: P2, mszcounterlist: windows_core::PSTR, pcchcounterlistlength: *mut u32, mszinstancelist: windows_core::PSTR, pcchinstancelistlength: *mut u32, dwdetaillevel: PERF_DETAIL, dwflags: u32) -> u32 +pub unsafe fn PdhEnumObjectItemsA(szdatasource: P0, szmachinename: P1, szobjectname: P2, mszcounterlist: Option, pcchcounterlistlength: *mut u32, mszinstancelist: Option, pcchinstancelistlength: *mut u32, dwdetaillevel: PERF_DETAIL, dwflags: u32) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectItemsA(szdatasource : windows_core::PCSTR, szmachinename : windows_core::PCSTR, szobjectname : windows_core::PCSTR, mszcounterlist : windows_core::PSTR, pcchcounterlistlength : *mut u32, mszinstancelist : windows_core::PSTR, pcchinstancelistlength : *mut u32, dwdetaillevel : PERF_DETAIL, dwflags : u32) -> u32); - PdhEnumObjectItemsA(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) + PdhEnumObjectItemsA(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhEnumObjectItemsHA(hdatasource: P0, szmachinename: P1, szobjectname: P2, mszcounterlist: windows_core::PSTR, pcchcounterlistlength: *mut u32, mszinstancelist: windows_core::PSTR, pcchinstancelistlength: *mut u32, dwdetaillevel: PERF_DETAIL, dwflags: u32) -> u32 +pub unsafe fn PdhEnumObjectItemsHA(hdatasource: Option, szmachinename: P1, szobjectname: P2, mszcounterlist: Option, pcchcounterlistlength: *mut u32, mszinstancelist: Option, pcchinstancelistlength: *mut u32, dwdetaillevel: PERF_DETAIL, dwflags: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectItemsHA(hdatasource : PDH_HLOG, szmachinename : windows_core::PCSTR, szobjectname : windows_core::PCSTR, mszcounterlist : windows_core::PSTR, pcchcounterlistlength : *mut u32, mszinstancelist : windows_core::PSTR, pcchinstancelistlength : *mut u32, dwdetaillevel : PERF_DETAIL, dwflags : u32) -> u32); - PdhEnumObjectItemsHA(hdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) + PdhEnumObjectItemsHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhEnumObjectItemsHW(hdatasource: P0, szmachinename: P1, szobjectname: P2, mszcounterlist: windows_core::PWSTR, pcchcounterlistlength: *mut u32, mszinstancelist: windows_core::PWSTR, pcchinstancelistlength: *mut u32, dwdetaillevel: PERF_DETAIL, dwflags: u32) -> u32 +pub unsafe fn PdhEnumObjectItemsHW(hdatasource: Option, szmachinename: P1, szobjectname: P2, mszcounterlist: Option, pcchcounterlistlength: *mut u32, mszinstancelist: Option, pcchinstancelistlength: *mut u32, dwdetaillevel: PERF_DETAIL, dwflags: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectItemsHW(hdatasource : PDH_HLOG, szmachinename : windows_core::PCWSTR, szobjectname : windows_core::PCWSTR, mszcounterlist : windows_core::PWSTR, pcchcounterlistlength : *mut u32, mszinstancelist : windows_core::PWSTR, pcchinstancelistlength : *mut u32, dwdetaillevel : PERF_DETAIL, dwflags : u32) -> u32); - PdhEnumObjectItemsHW(hdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) + PdhEnumObjectItemsHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhEnumObjectItemsW(szdatasource: P0, szmachinename: P1, szobjectname: P2, mszcounterlist: windows_core::PWSTR, pcchcounterlistlength: *mut u32, mszinstancelist: windows_core::PWSTR, pcchinstancelistlength: *mut u32, dwdetaillevel: PERF_DETAIL, dwflags: u32) -> u32 +pub unsafe fn PdhEnumObjectItemsW(szdatasource: P0, szmachinename: P1, szobjectname: P2, mszcounterlist: Option, pcchcounterlistlength: *mut u32, mszinstancelist: Option, pcchinstancelistlength: *mut u32, dwdetaillevel: PERF_DETAIL, dwflags: u32) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectItemsW(szdatasource : windows_core::PCWSTR, szmachinename : windows_core::PCWSTR, szobjectname : windows_core::PCWSTR, mszcounterlist : windows_core::PWSTR, pcchcounterlistlength : *mut u32, mszinstancelist : windows_core::PWSTR, pcchinstancelistlength : *mut u32, dwdetaillevel : PERF_DETAIL, dwflags : u32) -> u32); - PdhEnumObjectItemsW(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) + PdhEnumObjectItemsW(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhEnumObjectsA(szdatasource: P0, szmachinename: P1, mszobjectlist: windows_core::PSTR, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 +pub unsafe fn PdhEnumObjectsA(szdatasource: P0, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectsA(szdatasource : windows_core::PCSTR, szmachinename : windows_core::PCSTR, mszobjectlist : windows_core::PSTR, pcchbuffersize : *mut u32, dwdetaillevel : PERF_DETAIL, brefresh : super::super::Foundation:: BOOL) -> u32); - PdhEnumObjectsA(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) + PdhEnumObjectsA(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) } #[inline] -pub unsafe fn PdhEnumObjectsHA(hdatasource: P0, szmachinename: P1, mszobjectlist: windows_core::PSTR, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 +pub unsafe fn PdhEnumObjectsHA(hdatasource: Option, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectsHA(hdatasource : PDH_HLOG, szmachinename : windows_core::PCSTR, mszobjectlist : windows_core::PSTR, pcchbuffersize : *mut u32, dwdetaillevel : PERF_DETAIL, brefresh : super::super::Foundation:: BOOL) -> u32); - PdhEnumObjectsHA(hdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) + PdhEnumObjectsHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) } #[inline] -pub unsafe fn PdhEnumObjectsHW(hdatasource: P0, szmachinename: P1, mszobjectlist: windows_core::PWSTR, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 +pub unsafe fn PdhEnumObjectsHW(hdatasource: Option, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectsHW(hdatasource : PDH_HLOG, szmachinename : windows_core::PCWSTR, mszobjectlist : windows_core::PWSTR, pcchbuffersize : *mut u32, dwdetaillevel : PERF_DETAIL, brefresh : super::super::Foundation:: BOOL) -> u32); - PdhEnumObjectsHW(hdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) + PdhEnumObjectsHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) } #[inline] -pub unsafe fn PdhEnumObjectsW(szdatasource: P0, szmachinename: P1, mszobjectlist: windows_core::PWSTR, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 +pub unsafe fn PdhEnumObjectsW(szdatasource: P0, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectsW(szdatasource : windows_core::PCWSTR, szmachinename : windows_core::PCWSTR, mszobjectlist : windows_core::PWSTR, pcchbuffersize : *mut u32, dwdetaillevel : PERF_DETAIL, brefresh : super::super::Foundation:: BOOL) -> u32); - PdhEnumObjectsW(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) + PdhEnumObjectsW(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) } #[inline] -pub unsafe fn PdhExpandCounterPathA(szwildcardpath: P0, mszexpandedpathlist: windows_core::PSTR, pcchpathlistlength: *mut u32) -> u32 +pub unsafe fn PdhExpandCounterPathA(szwildcardpath: P0, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhExpandCounterPathA(szwildcardpath : windows_core::PCSTR, mszexpandedpathlist : windows_core::PSTR, pcchpathlistlength : *mut u32) -> u32); - PdhExpandCounterPathA(szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist), core::mem::transmute(pcchpathlistlength)) + PdhExpandCounterPathA(szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength)) } #[inline] -pub unsafe fn PdhExpandCounterPathW(szwildcardpath: P0, mszexpandedpathlist: windows_core::PWSTR, pcchpathlistlength: *mut u32) -> u32 +pub unsafe fn PdhExpandCounterPathW(szwildcardpath: P0, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhExpandCounterPathW(szwildcardpath : windows_core::PCWSTR, mszexpandedpathlist : windows_core::PWSTR, pcchpathlistlength : *mut u32) -> u32); - PdhExpandCounterPathW(szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist), core::mem::transmute(pcchpathlistlength)) + PdhExpandCounterPathW(szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength)) } #[inline] -pub unsafe fn PdhExpandWildCardPathA(szdatasource: P0, szwildcardpath: P1, mszexpandedpathlist: windows_core::PSTR, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 +pub unsafe fn PdhExpandWildCardPathA(szdatasource: P0, szwildcardpath: P1, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhExpandWildCardPathA(szdatasource : windows_core::PCSTR, szwildcardpath : windows_core::PCSTR, mszexpandedpathlist : windows_core::PSTR, pcchpathlistlength : *mut u32, dwflags : u32) -> u32); - PdhExpandWildCardPathA(szdatasource.param().abi(), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist), core::mem::transmute(pcchpathlistlength), core::mem::transmute(dwflags)) + PdhExpandWildCardPathA(szdatasource.param().abi(), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhExpandWildCardPathHA(hdatasource: P0, szwildcardpath: P1, mszexpandedpathlist: windows_core::PSTR, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 +pub unsafe fn PdhExpandWildCardPathHA(hdatasource: Option, szwildcardpath: P1, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhExpandWildCardPathHA(hdatasource : PDH_HLOG, szwildcardpath : windows_core::PCSTR, mszexpandedpathlist : windows_core::PSTR, pcchpathlistlength : *mut u32, dwflags : u32) -> u32); - PdhExpandWildCardPathHA(hdatasource.param().abi(), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist), core::mem::transmute(pcchpathlistlength), core::mem::transmute(dwflags)) + PdhExpandWildCardPathHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhExpandWildCardPathHW(hdatasource: P0, szwildcardpath: P1, mszexpandedpathlist: windows_core::PWSTR, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 +pub unsafe fn PdhExpandWildCardPathHW(hdatasource: Option, szwildcardpath: P1, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhExpandWildCardPathHW(hdatasource : PDH_HLOG, szwildcardpath : windows_core::PCWSTR, mszexpandedpathlist : windows_core::PWSTR, pcchpathlistlength : *mut u32, dwflags : u32) -> u32); - PdhExpandWildCardPathHW(hdatasource.param().abi(), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist), core::mem::transmute(pcchpathlistlength), core::mem::transmute(dwflags)) + PdhExpandWildCardPathHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhExpandWildCardPathW(szdatasource: P0, szwildcardpath: P1, mszexpandedpathlist: windows_core::PWSTR, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 +pub unsafe fn PdhExpandWildCardPathW(szdatasource: P0, szwildcardpath: P1, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32, dwflags: u32) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhExpandWildCardPathW(szdatasource : windows_core::PCWSTR, szwildcardpath : windows_core::PCWSTR, mszexpandedpathlist : windows_core::PWSTR, pcchpathlistlength : *mut u32, dwflags : u32) -> u32); - PdhExpandWildCardPathW(szdatasource.param().abi(), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist), core::mem::transmute(pcchpathlistlength), core::mem::transmute(dwflags)) + PdhExpandWildCardPathW(szdatasource.param().abi(), szwildcardpath.param().abi(), core::mem::transmute(mszexpandedpathlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchpathlistlength), core::mem::transmute(dwflags)) } #[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(core::mem::transmute(dwcountertype), core::mem::transmute(dwformat), core::mem::transmute(ptimebase.unwrap_or(core::ptr::null())), core::mem::transmute(prawvalue1), core::mem::transmute(prawvalue2), core::mem::transmute(pfmtvalue)) + PdhFormatFromRawValue(core::mem::transmute(dwcountertype), core::mem::transmute(dwformat), core::mem::transmute(ptimebase.unwrap_or(core::mem::zeroed())), core::mem::transmute(prawvalue1), core::mem::transmute(prawvalue2), core::mem::transmute(pfmtvalue)) } #[inline] -pub unsafe fn PdhGetCounterInfoA(hcounter: P0, bretrieveexplaintext: P1, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_A>) -> u32 +pub unsafe fn PdhGetCounterInfoA(hcounter: PDH_HCOUNTER, bretrieveexplaintext: P1, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_A>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterInfoA(hcounter : PDH_HCOUNTER, bretrieveexplaintext : super::super::Foundation:: BOOLEAN, pdwbuffersize : *mut u32, lpbuffer : *mut PDH_COUNTER_INFO_A) -> u32); - PdhGetCounterInfoA(hcounter.param().abi(), bretrieveexplaintext.param().abi(), core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut()))) + PdhGetCounterInfoA(core::mem::transmute(hcounter), bretrieveexplaintext.param().abi(), core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetCounterInfoW(hcounter: P0, bretrieveexplaintext: P1, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_W>) -> u32 +pub unsafe fn PdhGetCounterInfoW(hcounter: PDH_HCOUNTER, bretrieveexplaintext: P1, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_W>) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterInfoW(hcounter : PDH_HCOUNTER, bretrieveexplaintext : super::super::Foundation:: BOOLEAN, pdwbuffersize : *mut u32, lpbuffer : *mut PDH_COUNTER_INFO_W) -> u32); - PdhGetCounterInfoW(hcounter.param().abi(), bretrieveexplaintext.param().abi(), core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut()))) + PdhGetCounterInfoW(core::mem::transmute(hcounter), bretrieveexplaintext.param().abi(), core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetCounterTimeBase(hcounter: P0, ptimebase: *mut i64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetCounterTimeBase(hcounter: PDH_HCOUNTER, ptimebase: *mut i64) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterTimeBase(hcounter : PDH_HCOUNTER, ptimebase : *mut i64) -> u32); - PdhGetCounterTimeBase(hcounter.param().abi(), core::mem::transmute(ptimebase)) + PdhGetCounterTimeBase(core::mem::transmute(hcounter), core::mem::transmute(ptimebase)) } #[inline] pub unsafe fn PdhGetDataSourceTimeRangeA(szdatasource: P0, pdwnumentries: *mut u32, pinfo: *mut PDH_TIME_INFO, pdwbuffersize: *mut u32) -> u32 @@ -417,9 +383,9 @@ where PdhGetDataSourceTimeRangeA(szdatasource.param().abi(), core::mem::transmute(pdwnumentries), core::mem::transmute(pinfo), core::mem::transmute(pdwbuffersize)) } #[inline] -pub unsafe fn PdhGetDataSourceTimeRangeH(hdatasource: PDH_HLOG, pdwnumentries: *mut u32, pinfo: *mut PDH_TIME_INFO, pdwbuffersize: *mut u32) -> u32 { +pub unsafe fn PdhGetDataSourceTimeRangeH(hdatasource: Option, pdwnumentries: *mut u32, pinfo: *mut PDH_TIME_INFO, pdwbuffersize: *mut u32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetDataSourceTimeRangeH(hdatasource : PDH_HLOG, pdwnumentries : *mut u32, pinfo : *mut PDH_TIME_INFO, pdwbuffersize : *mut u32) -> u32); - PdhGetDataSourceTimeRangeH(core::mem::transmute(hdatasource), core::mem::transmute(pdwnumentries), core::mem::transmute(pinfo), core::mem::transmute(pdwbuffersize)) + PdhGetDataSourceTimeRangeH(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwnumentries), core::mem::transmute(pinfo), core::mem::transmute(pdwbuffersize)) } #[inline] pub unsafe fn PdhGetDataSourceTimeRangeW(szdatasource: P0, pdwnumentries: *mut u32, pinfo: *mut PDH_TIME_INFO, pdwbuffersize: *mut u32) -> u32 @@ -430,157 +396,126 @@ where PdhGetDataSourceTimeRangeW(szdatasource.param().abi(), core::mem::transmute(pdwnumentries), core::mem::transmute(pinfo), core::mem::transmute(pdwbuffersize)) } #[inline] -pub unsafe fn PdhGetDefaultPerfCounterA(szdatasource: P0, szmachinename: P1, szobjectname: P2, szdefaultcountername: windows_core::PSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhGetDefaultPerfCounterA(szdatasource: P0, szmachinename: P1, szobjectname: P2, szdefaultcountername: Option, pcchbuffersize: *mut u32) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDefaultPerfCounterA(szdatasource : windows_core::PCSTR, szmachinename : windows_core::PCSTR, szobjectname : windows_core::PCSTR, szdefaultcountername : windows_core::PSTR, pcchbuffersize : *mut u32) -> u32); - PdhGetDefaultPerfCounterA(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername), core::mem::transmute(pcchbuffersize)) + PdhGetDefaultPerfCounterA(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhGetDefaultPerfCounterHA(hdatasource: P0, szmachinename: P1, szobjectname: P2, szdefaultcountername: windows_core::PSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhGetDefaultPerfCounterHA(hdatasource: Option, szmachinename: P1, szobjectname: P2, szdefaultcountername: Option, pcchbuffersize: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDefaultPerfCounterHA(hdatasource : PDH_HLOG, szmachinename : windows_core::PCSTR, szobjectname : windows_core::PCSTR, szdefaultcountername : windows_core::PSTR, pcchbuffersize : *mut u32) -> u32); - PdhGetDefaultPerfCounterHA(hdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername), core::mem::transmute(pcchbuffersize)) + PdhGetDefaultPerfCounterHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhGetDefaultPerfCounterHW(hdatasource: P0, szmachinename: P1, szobjectname: P2, szdefaultcountername: windows_core::PWSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhGetDefaultPerfCounterHW(hdatasource: Option, szmachinename: P1, szobjectname: P2, szdefaultcountername: Option, pcchbuffersize: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDefaultPerfCounterHW(hdatasource : PDH_HLOG, szmachinename : windows_core::PCWSTR, szobjectname : windows_core::PCWSTR, szdefaultcountername : windows_core::PWSTR, pcchbuffersize : *mut u32) -> u32); - PdhGetDefaultPerfCounterHW(hdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername), core::mem::transmute(pcchbuffersize)) + PdhGetDefaultPerfCounterHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhGetDefaultPerfCounterW(szdatasource: P0, szmachinename: P1, szobjectname: P2, szdefaultcountername: windows_core::PWSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhGetDefaultPerfCounterW(szdatasource: P0, szmachinename: P1, szobjectname: P2, szdefaultcountername: Option, pcchbuffersize: *mut u32) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDefaultPerfCounterW(szdatasource : windows_core::PCWSTR, szmachinename : windows_core::PCWSTR, szobjectname : windows_core::PCWSTR, szdefaultcountername : windows_core::PWSTR, pcchbuffersize : *mut u32) -> u32); - PdhGetDefaultPerfCounterW(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername), core::mem::transmute(pcchbuffersize)) + PdhGetDefaultPerfCounterW(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(szdefaultcountername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhGetDefaultPerfObjectA(szdatasource: P0, szmachinename: P1, szdefaultobjectname: windows_core::PSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhGetDefaultPerfObjectA(szdatasource: P0, szmachinename: P1, szdefaultobjectname: Option, pcchbuffersize: *mut u32) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDefaultPerfObjectA(szdatasource : windows_core::PCSTR, szmachinename : windows_core::PCSTR, szdefaultobjectname : windows_core::PSTR, pcchbuffersize : *mut u32) -> u32); - PdhGetDefaultPerfObjectA(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname), core::mem::transmute(pcchbuffersize)) + PdhGetDefaultPerfObjectA(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhGetDefaultPerfObjectHA(hdatasource: P0, szmachinename: P1, szdefaultobjectname: windows_core::PSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhGetDefaultPerfObjectHA(hdatasource: Option, szmachinename: P1, szdefaultobjectname: Option, pcchbuffersize: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDefaultPerfObjectHA(hdatasource : PDH_HLOG, szmachinename : windows_core::PCSTR, szdefaultobjectname : windows_core::PSTR, pcchbuffersize : *mut u32) -> u32); - PdhGetDefaultPerfObjectHA(hdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname), core::mem::transmute(pcchbuffersize)) + PdhGetDefaultPerfObjectHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhGetDefaultPerfObjectHW(hdatasource: P0, szmachinename: P1, szdefaultobjectname: windows_core::PWSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhGetDefaultPerfObjectHW(hdatasource: Option, szmachinename: P1, szdefaultobjectname: Option, pcchbuffersize: *mut u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDefaultPerfObjectHW(hdatasource : PDH_HLOG, szmachinename : windows_core::PCWSTR, szdefaultobjectname : windows_core::PWSTR, pcchbuffersize : *mut u32) -> u32); - PdhGetDefaultPerfObjectHW(hdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname), core::mem::transmute(pcchbuffersize)) + PdhGetDefaultPerfObjectHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[inline] -pub unsafe fn PdhGetDefaultPerfObjectW(szdatasource: P0, szmachinename: P1, szdefaultobjectname: windows_core::PWSTR, pcchbuffersize: *mut u32) -> u32 +pub unsafe fn PdhGetDefaultPerfObjectW(szdatasource: P0, szmachinename: P1, szdefaultobjectname: Option, pcchbuffersize: *mut u32) -> u32 where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetDefaultPerfObjectW(szdatasource : windows_core::PCWSTR, szmachinename : windows_core::PCWSTR, szdefaultobjectname : windows_core::PWSTR, pcchbuffersize : *mut u32) -> u32); - PdhGetDefaultPerfObjectW(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname), core::mem::transmute(pcchbuffersize)) + PdhGetDefaultPerfObjectW(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(szdefaultobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize)) } #[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(core::ptr::null_mut()))) + PdhGetDllVersion(core::mem::transmute(lpdwversion.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetFormattedCounterArrayA(hcounter: P0, dwformat: PDH_FMT, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_FMT_COUNTERVALUE_ITEM_A>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetFormattedCounterArrayA(hcounter: PDH_HCOUNTER, 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 : PDH_HCOUNTER, dwformat : PDH_FMT, lpdwbuffersize : *mut u32, lpdwitemcount : *mut u32, itembuffer : *mut PDH_FMT_COUNTERVALUE_ITEM_A) -> u32); - PdhGetFormattedCounterArrayA(hcounter.param().abi(), core::mem::transmute(dwformat), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::ptr::null_mut()))) + PdhGetFormattedCounterArrayA(core::mem::transmute(hcounter), core::mem::transmute(dwformat), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetFormattedCounterArrayW(hcounter: P0, dwformat: PDH_FMT, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_FMT_COUNTERVALUE_ITEM_W>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetFormattedCounterArrayW(hcounter: PDH_HCOUNTER, 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 : PDH_HCOUNTER, dwformat : PDH_FMT, lpdwbuffersize : *mut u32, lpdwitemcount : *mut u32, itembuffer : *mut PDH_FMT_COUNTERVALUE_ITEM_W) -> u32); - PdhGetFormattedCounterArrayW(hcounter.param().abi(), core::mem::transmute(dwformat), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::ptr::null_mut()))) + PdhGetFormattedCounterArrayW(core::mem::transmute(hcounter), core::mem::transmute(dwformat), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetFormattedCounterValue(hcounter: P0, dwformat: PDH_FMT, lpdwtype: Option<*mut u32>, pvalue: *mut PDH_FMT_COUNTERVALUE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetFormattedCounterValue(hcounter: PDH_HCOUNTER, dwformat: PDH_FMT, lpdwtype: Option<*mut u32>, pvalue: *mut PDH_FMT_COUNTERVALUE) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetFormattedCounterValue(hcounter : PDH_HCOUNTER, dwformat : PDH_FMT, lpdwtype : *mut u32, pvalue : *mut PDH_FMT_COUNTERVALUE) -> u32); - PdhGetFormattedCounterValue(hcounter.param().abi(), core::mem::transmute(dwformat), core::mem::transmute(lpdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvalue)) + PdhGetFormattedCounterValue(core::mem::transmute(hcounter), core::mem::transmute(dwformat), core::mem::transmute(lpdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue)) } #[inline] -pub unsafe fn PdhGetLogFileSize(hlog: P0, llsize: *mut i64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetLogFileSize(hlog: PDH_HLOG, llsize: *mut i64) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetLogFileSize(hlog : PDH_HLOG, llsize : *mut i64) -> u32); - PdhGetLogFileSize(hlog.param().abi(), core::mem::transmute(llsize)) + PdhGetLogFileSize(core::mem::transmute(hlog), core::mem::transmute(llsize)) } #[inline] -pub unsafe fn PdhGetLogSetGUID(hlog: P0, pguid: Option<*mut windows_core::GUID>, prunid: Option<*mut i32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetLogSetGUID(hlog: PDH_HLOG, pguid: Option<*mut windows_core::GUID>, prunid: Option<*mut i32>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetLogSetGUID(hlog : PDH_HLOG, pguid : *mut windows_core::GUID, prunid : *mut i32) -> u32); - PdhGetLogSetGUID(hlog.param().abi(), core::mem::transmute(pguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prunid.unwrap_or(core::ptr::null_mut()))) + PdhGetLogSetGUID(core::mem::transmute(hlog), core::mem::transmute(pguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(prunid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetRawCounterArrayA(hcounter: P0, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_RAW_COUNTER_ITEM_A>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetRawCounterArrayA(hcounter: PDH_HCOUNTER, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_RAW_COUNTER_ITEM_A>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetRawCounterArrayA(hcounter : PDH_HCOUNTER, lpdwbuffersize : *mut u32, lpdwitemcount : *mut u32, itembuffer : *mut PDH_RAW_COUNTER_ITEM_A) -> u32); - PdhGetRawCounterArrayA(hcounter.param().abi(), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::ptr::null_mut()))) + PdhGetRawCounterArrayA(core::mem::transmute(hcounter), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetRawCounterArrayW(hcounter: P0, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_RAW_COUNTER_ITEM_W>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetRawCounterArrayW(hcounter: PDH_HCOUNTER, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_RAW_COUNTER_ITEM_W>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetRawCounterArrayW(hcounter : PDH_HCOUNTER, lpdwbuffersize : *mut u32, lpdwitemcount : *mut u32, itembuffer : *mut PDH_RAW_COUNTER_ITEM_W) -> u32); - PdhGetRawCounterArrayW(hcounter.param().abi(), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::ptr::null_mut()))) + PdhGetRawCounterArrayW(core::mem::transmute(hcounter), core::mem::transmute(lpdwbuffersize), core::mem::transmute(lpdwitemcount), core::mem::transmute(itembuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetRawCounterValue(hcounter: P0, lpdwtype: Option<*mut u32>, pvalue: *mut PDH_RAW_COUNTER) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhGetRawCounterValue(hcounter: PDH_HCOUNTER, lpdwtype: Option<*mut u32>, pvalue: *mut PDH_RAW_COUNTER) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetRawCounterValue(hcounter : PDH_HCOUNTER, lpdwtype : *mut u32, pvalue : *mut PDH_RAW_COUNTER) -> u32); - PdhGetRawCounterValue(hcounter.param().abi(), core::mem::transmute(lpdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvalue)) + PdhGetRawCounterValue(core::mem::transmute(hcounter), core::mem::transmute(lpdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue)) } #[inline] -pub unsafe fn PdhIsRealTimeQuery(hquery: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PdhIsRealTimeQuery(hquery: PDH_HQUERY) -> super::super::Foundation::BOOL { windows_targets::link!("pdh.dll" "system" fn PdhIsRealTimeQuery(hquery : PDH_HQUERY) -> super::super::Foundation:: BOOL); - PdhIsRealTimeQuery(hquery.param().abi()) + PdhIsRealTimeQuery(core::mem::transmute(hquery)) } #[inline] pub unsafe fn PdhLookupPerfIndexByNameA(szmachinename: P0, sznamebuffer: P1, pdwindex: *mut u32) -> u32 @@ -601,50 +536,48 @@ where PdhLookupPerfIndexByNameW(szmachinename.param().abi(), sznamebuffer.param().abi(), core::mem::transmute(pdwindex)) } #[inline] -pub unsafe fn PdhLookupPerfNameByIndexA(szmachinename: P0, dwnameindex: u32, sznamebuffer: windows_core::PSTR, pcchnamebuffersize: *mut u32) -> u32 +pub unsafe fn PdhLookupPerfNameByIndexA(szmachinename: P0, dwnameindex: u32, sznamebuffer: Option, pcchnamebuffersize: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhLookupPerfNameByIndexA(szmachinename : windows_core::PCSTR, dwnameindex : u32, sznamebuffer : windows_core::PSTR, pcchnamebuffersize : *mut u32) -> u32); - PdhLookupPerfNameByIndexA(szmachinename.param().abi(), core::mem::transmute(dwnameindex), core::mem::transmute(sznamebuffer), core::mem::transmute(pcchnamebuffersize)) + PdhLookupPerfNameByIndexA(szmachinename.param().abi(), core::mem::transmute(dwnameindex), core::mem::transmute(sznamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchnamebuffersize)) } #[inline] -pub unsafe fn PdhLookupPerfNameByIndexW(szmachinename: P0, dwnameindex: u32, sznamebuffer: windows_core::PWSTR, pcchnamebuffersize: *mut u32) -> u32 +pub unsafe fn PdhLookupPerfNameByIndexW(szmachinename: P0, dwnameindex: u32, sznamebuffer: Option, pcchnamebuffersize: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhLookupPerfNameByIndexW(szmachinename : windows_core::PCWSTR, dwnameindex : u32, sznamebuffer : windows_core::PWSTR, pcchnamebuffersize : *mut u32) -> u32); - PdhLookupPerfNameByIndexW(szmachinename.param().abi(), core::mem::transmute(dwnameindex), core::mem::transmute(sznamebuffer), core::mem::transmute(pcchnamebuffersize)) + PdhLookupPerfNameByIndexW(szmachinename.param().abi(), core::mem::transmute(dwnameindex), core::mem::transmute(sznamebuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchnamebuffersize)) } #[inline] -pub unsafe fn PdhMakeCounterPathA(pcounterpathelements: *const PDH_COUNTER_PATH_ELEMENTS_A, szfullpathbuffer: windows_core::PSTR, pcchbuffersize: *mut u32, dwflags: PDH_PATH_FLAGS) -> u32 { +pub unsafe fn PdhMakeCounterPathA(pcounterpathelements: *const PDH_COUNTER_PATH_ELEMENTS_A, szfullpathbuffer: Option, pcchbuffersize: *mut u32, dwflags: PDH_PATH_FLAGS) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhMakeCounterPathA(pcounterpathelements : *const PDH_COUNTER_PATH_ELEMENTS_A, szfullpathbuffer : windows_core::PSTR, pcchbuffersize : *mut u32, dwflags : PDH_PATH_FLAGS) -> u32); - PdhMakeCounterPathA(core::mem::transmute(pcounterpathelements), core::mem::transmute(szfullpathbuffer), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwflags)) + PdhMakeCounterPathA(core::mem::transmute(pcounterpathelements), core::mem::transmute(szfullpathbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhMakeCounterPathW(pcounterpathelements: *const PDH_COUNTER_PATH_ELEMENTS_W, szfullpathbuffer: windows_core::PWSTR, pcchbuffersize: *mut u32, dwflags: PDH_PATH_FLAGS) -> u32 { +pub unsafe fn PdhMakeCounterPathW(pcounterpathelements: *const PDH_COUNTER_PATH_ELEMENTS_W, szfullpathbuffer: Option, pcchbuffersize: *mut u32, dwflags: PDH_PATH_FLAGS) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhMakeCounterPathW(pcounterpathelements : *const PDH_COUNTER_PATH_ELEMENTS_W, szfullpathbuffer : windows_core::PWSTR, pcchbuffersize : *mut u32, dwflags : PDH_PATH_FLAGS) -> u32); - PdhMakeCounterPathW(core::mem::transmute(pcounterpathelements), core::mem::transmute(szfullpathbuffer), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwflags)) + PdhMakeCounterPathW(core::mem::transmute(pcounterpathelements), core::mem::transmute(szfullpathbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhOpenLogA(szlogfilename: P0, dwaccessflags: PDH_LOG, lpdwlogtype: *mut PDH_LOG_TYPE, hquery: P3, dwmaxsize: u32, szusercaption: P5, phlog: *mut PDH_HLOG) -> u32 +pub unsafe fn PdhOpenLogA(szlogfilename: P0, dwaccessflags: PDH_LOG, lpdwlogtype: *mut PDH_LOG_TYPE, hquery: Option, dwmaxsize: u32, szusercaption: P5, phlog: *mut PDH_HLOG) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhOpenLogA(szlogfilename : windows_core::PCSTR, dwaccessflags : PDH_LOG, lpdwlogtype : *mut PDH_LOG_TYPE, hquery : PDH_HQUERY, dwmaxsize : u32, szusercaption : windows_core::PCSTR, phlog : *mut PDH_HLOG) -> u32); - PdhOpenLogA(szlogfilename.param().abi(), core::mem::transmute(dwaccessflags), core::mem::transmute(lpdwlogtype), hquery.param().abi(), core::mem::transmute(dwmaxsize), szusercaption.param().abi(), core::mem::transmute(phlog)) + PdhOpenLogA(szlogfilename.param().abi(), core::mem::transmute(dwaccessflags), core::mem::transmute(lpdwlogtype), core::mem::transmute(hquery.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmaxsize), szusercaption.param().abi(), core::mem::transmute(phlog)) } #[inline] -pub unsafe fn PdhOpenLogW(szlogfilename: P0, dwaccessflags: PDH_LOG, lpdwlogtype: *mut PDH_LOG_TYPE, hquery: P3, dwmaxsize: u32, szusercaption: P5, phlog: *mut PDH_HLOG) -> u32 +pub unsafe fn PdhOpenLogW(szlogfilename: P0, dwaccessflags: PDH_LOG, lpdwlogtype: *mut PDH_LOG_TYPE, hquery: Option, dwmaxsize: u32, szusercaption: P5, phlog: *mut PDH_HLOG) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhOpenLogW(szlogfilename : windows_core::PCWSTR, dwaccessflags : PDH_LOG, lpdwlogtype : *mut PDH_LOG_TYPE, hquery : PDH_HQUERY, dwmaxsize : u32, szusercaption : windows_core::PCWSTR, phlog : *mut PDH_HLOG) -> u32); - PdhOpenLogW(szlogfilename.param().abi(), core::mem::transmute(dwaccessflags), core::mem::transmute(lpdwlogtype), hquery.param().abi(), core::mem::transmute(dwmaxsize), szusercaption.param().abi(), core::mem::transmute(phlog)) + PdhOpenLogW(szlogfilename.param().abi(), core::mem::transmute(dwaccessflags), core::mem::transmute(lpdwlogtype), core::mem::transmute(hquery.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmaxsize), szusercaption.param().abi(), core::mem::transmute(phlog)) } #[inline] pub unsafe fn PdhOpenQueryA(szdatasource: P0, dwuserdata: usize, phquery: *mut PDH_HQUERY) -> u32 @@ -655,12 +588,9 @@ where PdhOpenQueryA(szdatasource.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phquery)) } #[inline] -pub unsafe fn PdhOpenQueryH(hdatasource: P0, dwuserdata: usize, phquery: *mut PDH_HQUERY) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhOpenQueryH(hdatasource: Option, dwuserdata: usize, phquery: *mut PDH_HQUERY) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhOpenQueryH(hdatasource : PDH_HLOG, dwuserdata : usize, phquery : *mut PDH_HQUERY) -> u32); - PdhOpenQueryH(hdatasource.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(phquery)) + PdhOpenQueryH(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwuserdata), core::mem::transmute(phquery)) } #[inline] pub unsafe fn PdhOpenQueryW(szdatasource: P0, dwuserdata: usize, phquery: *mut PDH_HQUERY) -> u32 @@ -676,7 +606,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(core::ptr::null_mut())), core::mem::transmute(pdwbuffersize), core::mem::transmute(dwflags)) + PdhParseCounterPathA(szfullpathbuffer.param().abi(), core::mem::transmute(pcounterpathelements.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbuffersize), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn PdhParseCounterPathW(szfullpathbuffer: P0, pcounterpathelements: Option<*mut PDH_COUNTER_PATH_ELEMENTS_W>, pdwbuffersize: *mut u32, dwflags: u32) -> u32 @@ -684,55 +614,43 @@ 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(core::ptr::null_mut())), core::mem::transmute(pdwbuffersize), core::mem::transmute(dwflags)) + PdhParseCounterPathW(szfullpathbuffer.param().abi(), core::mem::transmute(pcounterpathelements.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbuffersize), core::mem::transmute(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 +pub unsafe fn PdhParseInstanceNameA(szinstancestring: P0, szinstancename: Option, pcchinstancenamelength: *mut u32, szparentname: Option, pcchparentnamelength: *mut u32, lpindex: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhParseInstanceNameA(szinstancestring : windows_core::PCSTR, szinstancename : windows_core::PSTR, pcchinstancenamelength : *mut u32, szparentname : windows_core::PSTR, pcchparentnamelength : *mut u32, lpindex : *mut u32) -> u32); - PdhParseInstanceNameA(szinstancestring.param().abi(), core::mem::transmute(szinstancename), core::mem::transmute(pcchinstancenamelength), core::mem::transmute(szparentname), core::mem::transmute(pcchparentnamelength), core::mem::transmute(lpindex)) + PdhParseInstanceNameA(szinstancestring.param().abi(), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchinstancenamelength), core::mem::transmute(szparentname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchparentnamelength), core::mem::transmute(lpindex)) } #[inline] -pub unsafe fn PdhParseInstanceNameW(szinstancestring: P0, szinstancename: windows_core::PWSTR, pcchinstancenamelength: *mut u32, szparentname: windows_core::PWSTR, pcchparentnamelength: *mut u32, lpindex: *mut u32) -> u32 +pub unsafe fn PdhParseInstanceNameW(szinstancestring: P0, szinstancename: Option, pcchinstancenamelength: *mut u32, szparentname: Option, pcchparentnamelength: *mut u32, lpindex: *mut u32) -> u32 where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhParseInstanceNameW(szinstancestring : windows_core::PCWSTR, szinstancename : windows_core::PWSTR, pcchinstancenamelength : *mut u32, szparentname : windows_core::PWSTR, pcchparentnamelength : *mut u32, lpindex : *mut u32) -> u32); - PdhParseInstanceNameW(szinstancestring.param().abi(), core::mem::transmute(szinstancename), core::mem::transmute(pcchinstancenamelength), core::mem::transmute(szparentname), core::mem::transmute(pcchparentnamelength), core::mem::transmute(lpindex)) + PdhParseInstanceNameW(szinstancestring.param().abi(), core::mem::transmute(szinstancename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchinstancenamelength), core::mem::transmute(szparentname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchparentnamelength), core::mem::transmute(lpindex)) } #[inline] -pub unsafe fn PdhReadRawLogRecord(hlog: P0, ftrecord: super::super::Foundation::FILETIME, prawlogrecord: Option<*mut PDH_RAW_LOG_RECORD>, pdwbufferlength: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhReadRawLogRecord(hlog: PDH_HLOG, 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 : PDH_HLOG, ftrecord : super::super::Foundation:: FILETIME, prawlogrecord : *mut PDH_RAW_LOG_RECORD, pdwbufferlength : *mut u32) -> u32); - PdhReadRawLogRecord(hlog.param().abi(), core::mem::transmute(ftrecord), core::mem::transmute(prawlogrecord.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwbufferlength)) + PdhReadRawLogRecord(core::mem::transmute(hlog), core::mem::transmute(ftrecord), core::mem::transmute(prawlogrecord.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbufferlength)) } #[inline] -pub unsafe fn PdhRemoveCounter(hcounter: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhRemoveCounter(hcounter: PDH_HCOUNTER) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhRemoveCounter(hcounter : PDH_HCOUNTER) -> u32); - PdhRemoveCounter(hcounter.param().abi()) + PdhRemoveCounter(core::mem::transmute(hcounter)) } #[inline] -pub unsafe fn PdhSelectDataSourceA(hwndowner: P0, dwflags: PDH_SELECT_DATA_SOURCE_FLAGS, szdatasource: windows_core::PSTR, pcchbufferlength: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhSelectDataSourceA(hwndowner: super::super::Foundation::HWND, dwflags: PDH_SELECT_DATA_SOURCE_FLAGS, szdatasource: windows_core::PSTR, pcchbufferlength: *mut u32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhSelectDataSourceA(hwndowner : super::super::Foundation:: HWND, dwflags : PDH_SELECT_DATA_SOURCE_FLAGS, szdatasource : windows_core::PSTR, pcchbufferlength : *mut u32) -> u32); - PdhSelectDataSourceA(hwndowner.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(szdatasource), core::mem::transmute(pcchbufferlength)) + PdhSelectDataSourceA(core::mem::transmute(hwndowner), core::mem::transmute(dwflags), core::mem::transmute(szdatasource), core::mem::transmute(pcchbufferlength)) } #[inline] -pub unsafe fn PdhSelectDataSourceW(hwndowner: P0, dwflags: PDH_SELECT_DATA_SOURCE_FLAGS, szdatasource: windows_core::PWSTR, pcchbufferlength: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhSelectDataSourceW(hwndowner: super::super::Foundation::HWND, dwflags: PDH_SELECT_DATA_SOURCE_FLAGS, szdatasource: windows_core::PWSTR, pcchbufferlength: *mut u32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhSelectDataSourceW(hwndowner : super::super::Foundation:: HWND, dwflags : PDH_SELECT_DATA_SOURCE_FLAGS, szdatasource : windows_core::PWSTR, pcchbufferlength : *mut u32) -> u32); - PdhSelectDataSourceW(hwndowner.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(szdatasource), core::mem::transmute(pcchbufferlength)) + PdhSelectDataSourceW(core::mem::transmute(hwndowner), core::mem::transmute(dwflags), core::mem::transmute(szdatasource), core::mem::transmute(pcchbufferlength)) } #[inline] pub unsafe fn PdhSetCounterScaleFactor(hcounter: PDH_HCOUNTER, lfactor: i32) -> u32 { @@ -750,38 +668,30 @@ pub unsafe fn PdhSetLogSetRunID(hlog: PDH_HLOG, runid: i32) -> u32 { PdhSetLogSetRunID(core::mem::transmute(hlog), core::mem::transmute(runid)) } #[inline] -pub unsafe fn PdhSetQueryTimeRange(hquery: P0, pinfo: *const PDH_TIME_INFO) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhSetQueryTimeRange(hquery: PDH_HQUERY, pinfo: *const PDH_TIME_INFO) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhSetQueryTimeRange(hquery : PDH_HQUERY, pinfo : *const PDH_TIME_INFO) -> u32); - PdhSetQueryTimeRange(hquery.param().abi(), core::mem::transmute(pinfo)) + PdhSetQueryTimeRange(core::mem::transmute(hquery), core::mem::transmute(pinfo)) } #[inline] -pub unsafe fn PdhUpdateLogA(hlog: P0, szuserstring: P1) -> u32 +pub unsafe fn PdhUpdateLogA(hlog: PDH_HLOG, szuserstring: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhUpdateLogA(hlog : PDH_HLOG, szuserstring : windows_core::PCSTR) -> u32); - PdhUpdateLogA(hlog.param().abi(), szuserstring.param().abi()) + PdhUpdateLogA(core::mem::transmute(hlog), szuserstring.param().abi()) } #[inline] -pub unsafe fn PdhUpdateLogFileCatalog(hlog: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PdhUpdateLogFileCatalog(hlog: PDH_HLOG) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhUpdateLogFileCatalog(hlog : PDH_HLOG) -> u32); - PdhUpdateLogFileCatalog(hlog.param().abi()) + PdhUpdateLogFileCatalog(core::mem::transmute(hlog)) } #[inline] -pub unsafe fn PdhUpdateLogW(hlog: P0, szuserstring: P1) -> u32 +pub unsafe fn PdhUpdateLogW(hlog: PDH_HLOG, szuserstring: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhUpdateLogW(hlog : PDH_HLOG, szuserstring : windows_core::PCWSTR) -> u32); - PdhUpdateLogW(hlog.param().abi(), szuserstring.param().abi()) + PdhUpdateLogW(core::mem::transmute(hlog), szuserstring.param().abi()) } #[inline] pub unsafe fn PdhValidatePathA(szfullpathbuffer: P0) -> u32 @@ -792,22 +702,20 @@ where PdhValidatePathA(szfullpathbuffer.param().abi()) } #[inline] -pub unsafe fn PdhValidatePathExA(hdatasource: P0, szfullpathbuffer: P1) -> u32 +pub unsafe fn PdhValidatePathExA(hdatasource: Option, szfullpathbuffer: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhValidatePathExA(hdatasource : PDH_HLOG, szfullpathbuffer : windows_core::PCSTR) -> u32); - PdhValidatePathExA(hdatasource.param().abi(), szfullpathbuffer.param().abi()) + PdhValidatePathExA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szfullpathbuffer.param().abi()) } #[inline] -pub unsafe fn PdhValidatePathExW(hdatasource: P0, szfullpathbuffer: P1) -> u32 +pub unsafe fn PdhValidatePathExW(hdatasource: Option, szfullpathbuffer: P1) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhValidatePathExW(hdatasource : PDH_HLOG, szfullpathbuffer : windows_core::PCWSTR) -> u32); - PdhValidatePathExW(hdatasource.param().abi(), szfullpathbuffer.param().abi()) + PdhValidatePathExW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szfullpathbuffer.param().abi()) } #[inline] pub unsafe fn PdhValidatePathW(szfullpathbuffer: P0) -> u32 @@ -834,61 +742,42 @@ where PdhVerifySQLDBW(szdatasource.param().abi()) } #[inline] -pub unsafe fn PerfAddCounters(hquery: P0, pcounters: *mut PERF_COUNTER_IDENTIFIER, cbcounters: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfAddCounters(hquery: super::super::Foundation::HANDLE, pcounters: *mut PERF_COUNTER_IDENTIFIER, cbcounters: u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfAddCounters(hquery : super::super::Foundation:: HANDLE, pcounters : *mut PERF_COUNTER_IDENTIFIER, cbcounters : u32) -> u32); - PerfAddCounters(hquery.param().abi(), core::mem::transmute(pcounters), core::mem::transmute(cbcounters)) + PerfAddCounters(core::mem::transmute(hquery), core::mem::transmute(pcounters), core::mem::transmute(cbcounters)) } #[inline] -pub unsafe fn PerfCloseQueryHandle(hquery: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfCloseQueryHandle(hquery: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfCloseQueryHandle(hquery : super::super::Foundation:: HANDLE) -> u32); - PerfCloseQueryHandle(hquery.param().abi()) + PerfCloseQueryHandle(core::mem::transmute(hquery)) } #[inline] -pub unsafe fn PerfCreateInstance(providerhandle: P0, countersetguid: *const windows_core::GUID, name: P2, id: u32) -> *mut PERF_COUNTERSET_INSTANCE +pub unsafe fn PerfCreateInstance(providerhandle: super::super::Foundation::HANDLE, countersetguid: *const windows_core::GUID, name: P2, id: u32) -> *mut PERF_COUNTERSET_INSTANCE where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PerfCreateInstance(providerhandle : super::super::Foundation:: HANDLE, countersetguid : *const windows_core::GUID, name : windows_core::PCWSTR, id : u32) -> *mut PERF_COUNTERSET_INSTANCE); - PerfCreateInstance(providerhandle.param().abi(), core::mem::transmute(countersetguid), name.param().abi(), core::mem::transmute(id)) + PerfCreateInstance(core::mem::transmute(providerhandle), core::mem::transmute(countersetguid), name.param().abi(), core::mem::transmute(id)) } #[inline] -pub unsafe fn PerfDecrementULongCounterValue(provider: P0, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfDecrementULongCounterValue(provider: super::super::Foundation::HANDLE, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfDecrementULongCounterValue(provider : super::super::Foundation:: HANDLE, instance : *mut PERF_COUNTERSET_INSTANCE, counterid : u32, value : u32) -> u32); - PerfDecrementULongCounterValue(provider.param().abi(), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) + PerfDecrementULongCounterValue(core::mem::transmute(provider), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) } #[inline] -pub unsafe fn PerfDecrementULongLongCounterValue(provider: P0, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfDecrementULongLongCounterValue(provider: super::super::Foundation::HANDLE, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u64) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfDecrementULongLongCounterValue(provider : super::super::Foundation:: HANDLE, instance : *mut PERF_COUNTERSET_INSTANCE, counterid : u32, value : u64) -> u32); - PerfDecrementULongLongCounterValue(provider.param().abi(), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) + PerfDecrementULongLongCounterValue(core::mem::transmute(provider), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) } #[inline] -pub unsafe fn PerfDeleteCounters(hquery: P0, pcounters: *mut PERF_COUNTER_IDENTIFIER, cbcounters: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfDeleteCounters(hquery: super::super::Foundation::HANDLE, pcounters: *mut PERF_COUNTER_IDENTIFIER, cbcounters: u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfDeleteCounters(hquery : super::super::Foundation:: HANDLE, pcounters : *mut PERF_COUNTER_IDENTIFIER, cbcounters : u32) -> u32); - PerfDeleteCounters(hquery.param().abi(), core::mem::transmute(pcounters), core::mem::transmute(cbcounters)) + PerfDeleteCounters(core::mem::transmute(hquery), core::mem::transmute(pcounters), core::mem::transmute(cbcounters)) } #[inline] -pub unsafe fn PerfDeleteInstance(provider: P0, instanceblock: *const PERF_COUNTERSET_INSTANCE) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfDeleteInstance(provider: super::super::Foundation::HANDLE, instanceblock: *const PERF_COUNTERSET_INSTANCE) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfDeleteInstance(provider : super::super::Foundation:: HANDLE, instanceblock : *const PERF_COUNTERSET_INSTANCE) -> u32); - PerfDeleteInstance(provider.param().abi(), core::mem::transmute(instanceblock)) + PerfDeleteInstance(core::mem::transmute(provider), core::mem::transmute(instanceblock)) } #[inline] pub unsafe fn PerfEnumerateCounterSet(szmachine: P0, pcountersetids: Option<&mut [windows_core::GUID]>, pccountersetidsactual: *mut u32) -> u32 @@ -904,23 +793,17 @@ 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(), core::mem::transmute(pcountersetid), core::mem::transmute(pinstances.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbinstances), core::mem::transmute(pcbinstancesactual)) + PerfEnumerateCounterSetInstances(szmachine.param().abi(), core::mem::transmute(pcountersetid), core::mem::transmute(pinstances.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinstances), core::mem::transmute(pcbinstancesactual)) } #[inline] -pub unsafe fn PerfIncrementULongCounterValue(provider: P0, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfIncrementULongCounterValue(provider: super::super::Foundation::HANDLE, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfIncrementULongCounterValue(provider : super::super::Foundation:: HANDLE, instance : *mut PERF_COUNTERSET_INSTANCE, counterid : u32, value : u32) -> u32); - PerfIncrementULongCounterValue(provider.param().abi(), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) + PerfIncrementULongCounterValue(core::mem::transmute(provider), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) } #[inline] -pub unsafe fn PerfIncrementULongLongCounterValue(provider: P0, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfIncrementULongLongCounterValue(provider: super::super::Foundation::HANDLE, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u64) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfIncrementULongLongCounterValue(provider : super::super::Foundation:: HANDLE, instance : *mut PERF_COUNTERSET_INSTANCE, counterid : u32, value : u64) -> u32); - PerfIncrementULongLongCounterValue(provider.param().abi(), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) + PerfIncrementULongLongCounterValue(core::mem::transmute(provider), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) } #[inline] pub unsafe fn PerfOpenQueryHandle(szmachine: P0, phquery: *mut super::super::Foundation::HANDLE) -> u32 @@ -931,20 +814,14 @@ where PerfOpenQueryHandle(szmachine.param().abi(), core::mem::transmute(phquery)) } #[inline] -pub unsafe fn PerfQueryCounterData(hquery: P0, pcounterblock: Option<*mut PERF_DATA_HEADER>, cbcounterblock: u32, pcbcounterblockactual: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfQueryCounterData(hquery: super::super::Foundation::HANDLE, pcounterblock: Option<*mut PERF_DATA_HEADER>, cbcounterblock: u32, pcbcounterblockactual: *mut u32) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(cbcounterblock), core::mem::transmute(pcbcounterblockactual)) + PerfQueryCounterData(core::mem::transmute(hquery), core::mem::transmute(pcounterblock.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbcounterblock), core::mem::transmute(pcbcounterblockactual)) } #[inline] -pub unsafe fn PerfQueryCounterInfo(hquery: P0, pcounters: Option<*mut PERF_COUNTER_IDENTIFIER>, cbcounters: u32, pcbcountersactual: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfQueryCounterInfo(hquery: super::super::Foundation::HANDLE, pcounters: Option<*mut PERF_COUNTER_IDENTIFIER>, cbcounters: u32, pcbcountersactual: *mut u32) -> u32 { 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(core::ptr::null_mut())), core::mem::transmute(cbcounters), core::mem::transmute(pcbcountersactual)) + PerfQueryCounterInfo(core::mem::transmute(hquery), core::mem::transmute(pcounters.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbcounters), core::mem::transmute(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 @@ -955,63 +832,47 @@ where PerfQueryCounterSetRegistrationInfo(szmachine.param().abi(), core::mem::transmute(pcountersetid), core::mem::transmute(requestcode), core::mem::transmute(requestlangid), core::mem::transmute(pbreginfo.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbreginfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbreginfoactual)) } #[inline] -pub unsafe fn PerfQueryInstance(providerhandle: P0, countersetguid: *const windows_core::GUID, name: P2, id: u32) -> *mut PERF_COUNTERSET_INSTANCE +pub unsafe fn PerfQueryInstance(providerhandle: super::super::Foundation::HANDLE, countersetguid: *const windows_core::GUID, name: P2, id: u32) -> *mut PERF_COUNTERSET_INSTANCE where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PerfQueryInstance(providerhandle : super::super::Foundation:: HANDLE, countersetguid : *const windows_core::GUID, name : windows_core::PCWSTR, id : u32) -> *mut PERF_COUNTERSET_INSTANCE); - PerfQueryInstance(providerhandle.param().abi(), core::mem::transmute(countersetguid), name.param().abi(), core::mem::transmute(id)) + PerfQueryInstance(core::mem::transmute(providerhandle), core::mem::transmute(countersetguid), name.param().abi(), core::mem::transmute(id)) } #[inline] -pub unsafe fn PerfSetCounterRefValue(provider: P0, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, address: *const core::ffi::c_void) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfSetCounterRefValue(provider: super::super::Foundation::HANDLE, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, address: *const core::ffi::c_void) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfSetCounterRefValue(provider : super::super::Foundation:: HANDLE, instance : *mut PERF_COUNTERSET_INSTANCE, counterid : u32, address : *const core::ffi::c_void) -> u32); - PerfSetCounterRefValue(provider.param().abi(), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(address)) + PerfSetCounterRefValue(core::mem::transmute(provider), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(address)) } #[inline] -pub unsafe fn PerfSetCounterSetInfo(providerhandle: P0, template: *mut PERF_COUNTERSET_INFO, templatesize: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfSetCounterSetInfo(providerhandle: super::super::Foundation::HANDLE, template: *mut PERF_COUNTERSET_INFO, templatesize: u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfSetCounterSetInfo(providerhandle : super::super::Foundation:: HANDLE, template : *mut PERF_COUNTERSET_INFO, templatesize : u32) -> u32); - PerfSetCounterSetInfo(providerhandle.param().abi(), core::mem::transmute(template), core::mem::transmute(templatesize)) + PerfSetCounterSetInfo(core::mem::transmute(providerhandle), core::mem::transmute(template), core::mem::transmute(templatesize)) } #[inline] -pub unsafe fn PerfSetULongCounterValue(provider: P0, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfSetULongCounterValue(provider: super::super::Foundation::HANDLE, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u32) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfSetULongCounterValue(provider : super::super::Foundation:: HANDLE, instance : *mut PERF_COUNTERSET_INSTANCE, counterid : u32, value : u32) -> u32); - PerfSetULongCounterValue(provider.param().abi(), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) + PerfSetULongCounterValue(core::mem::transmute(provider), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) } #[inline] -pub unsafe fn PerfSetULongLongCounterValue(provider: P0, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u64) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfSetULongLongCounterValue(provider: super::super::Foundation::HANDLE, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u64) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfSetULongLongCounterValue(provider : super::super::Foundation:: HANDLE, instance : *mut PERF_COUNTERSET_INSTANCE, counterid : u32, value : u64) -> u32); - PerfSetULongLongCounterValue(provider.param().abi(), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) + PerfSetULongLongCounterValue(core::mem::transmute(provider), core::mem::transmute(instance), core::mem::transmute(counterid), core::mem::transmute(value)) } #[inline] -pub unsafe fn PerfStartProvider(providerguid: *const windows_core::GUID, controlcallback: PERFLIBREQUEST, phprovider: *mut super::super::Foundation::HANDLE) -> u32 { +pub unsafe fn PerfStartProvider(providerguid: *const windows_core::GUID, controlcallback: Option, phprovider: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfStartProvider(providerguid : *const windows_core::GUID, controlcallback : PERFLIBREQUEST, phprovider : *mut super::super::Foundation:: HANDLE) -> u32); - PerfStartProvider(core::mem::transmute(providerguid), core::mem::transmute(controlcallback), core::mem::transmute(phprovider)) + PerfStartProvider(core::mem::transmute(providerguid), core::mem::transmute(controlcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(phprovider)) } #[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(core::mem::transmute(providerguid), core::mem::transmute(providercontext.unwrap_or(core::ptr::null())), core::mem::transmute(provider)) + PerfStartProviderEx(core::mem::transmute(providerguid), core::mem::transmute(providercontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(provider)) } #[inline] -pub unsafe fn PerfStopProvider(providerhandle: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PerfStopProvider(providerhandle: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfStopProvider(providerhandle : super::super::Foundation:: HANDLE) -> u32); - PerfStopProvider(providerhandle.param().abi()) + PerfStopProvider(core::mem::transmute(providerhandle)) } #[inline] pub unsafe fn QueryPerformanceCounter(lpperformancecount: *mut i64) -> windows_core::Result<()> { @@ -1309,11 +1170,8 @@ impl IAlertDataCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EventLog)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEventLog(&self, log: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventLog)(windows_core::Interface::as_raw(self), log.param().abi()).ok() + pub unsafe fn SetEventLog(&self, log: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventLog)(windows_core::Interface::as_raw(self), core::mem::transmute(log)).ok() } pub unsafe fn SampleInterval(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1333,11 +1191,8 @@ impl IAlertDataCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).TaskRunAsSelf)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetTaskRunAsSelf(&self, runasself: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTaskRunAsSelf)(windows_core::Interface::as_raw(self), runasself.param().abi()).ok() + pub unsafe fn SetTaskRunAsSelf(&self, runasself: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTaskRunAsSelf)(windows_core::Interface::as_raw(self), core::mem::transmute(runasself)).ok() } pub unsafe fn TaskArguments(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1565,21 +1420,15 @@ impl IApiTracingDataCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LogApiNamesOnly)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLogApiNamesOnly(&self, logapinames: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogApiNamesOnly)(windows_core::Interface::as_raw(self), logapinames.param().abi()).ok() + pub unsafe fn SetLogApiNamesOnly(&self, logapinames: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogApiNamesOnly)(windows_core::Interface::as_raw(self), core::mem::transmute(logapinames)).ok() } pub unsafe fn LogApisRecursively(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LogApisRecursively)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLogApisRecursively(&self, logrecursively: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogApisRecursively)(windows_core::Interface::as_raw(self), logrecursively.param().abi()).ok() + pub unsafe fn SetLogApisRecursively(&self, logrecursively: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogApisRecursively)(windows_core::Interface::as_raw(self), core::mem::transmute(logrecursively)).ok() } pub unsafe fn ExePath(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1858,11 +1707,8 @@ impl IConfigurationDataCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).QueryNetworkAdapters)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetQueryNetworkAdapters(&self, network: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetQueryNetworkAdapters)(windows_core::Interface::as_raw(self), network.param().abi()).ok() + pub unsafe fn SetQueryNetworkAdapters(&self, network: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetQueryNetworkAdapters)(windows_core::Interface::as_raw(self), core::mem::transmute(network)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn RegistryKeys(&self) -> windows_core::Result<*mut super::Com::SAFEARRAY> { @@ -2299,21 +2145,15 @@ impl core::ops::Deref for ICounterItem2 { } windows_core::imp::interface_hierarchy!(ICounterItem2, windows_core::IUnknown, ICounterItem); impl ICounterItem2 { - pub unsafe fn SetSelected(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSelected)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetSelected(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSelected)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn Selected(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Selected)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetVisible(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetVisible(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn Visible(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2581,31 +2421,22 @@ impl IDataCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LogAppend)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLogAppend(&self, append: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogAppend)(windows_core::Interface::as_raw(self), append.param().abi()).ok() + pub unsafe fn SetLogAppend(&self, append: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogAppend)(windows_core::Interface::as_raw(self), core::mem::transmute(append)).ok() } pub unsafe fn LogCircular(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LogCircular)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLogCircular(&self, circular: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogCircular)(windows_core::Interface::as_raw(self), circular.param().abi()).ok() + pub unsafe fn SetLogCircular(&self, circular: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogCircular)(windows_core::Interface::as_raw(self), core::mem::transmute(circular)).ok() } pub unsafe fn LogOverwrite(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LogOverwrite)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLogOverwrite(&self, overwrite: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogOverwrite)(windows_core::Interface::as_raw(self), overwrite.param().abi()).ok() + pub unsafe fn SetLogOverwrite(&self, overwrite: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogOverwrite)(windows_core::Interface::as_raw(self), core::mem::transmute(overwrite)).ok() } pub unsafe fn Name(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2633,12 +2464,9 @@ impl IDataCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SetXml)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(xml), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateOutputLocation(&self, latest: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateOutputLocation(&self, latest: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateOutputLocation)(windows_core::Interface::as_raw(self), latest.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).CreateOutputLocation)(windows_core::Interface::as_raw(self), core::mem::transmute(latest), &mut result__).map(|| core::mem::transmute(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -3175,11 +3003,8 @@ impl IDataCollectorSet { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Segment)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSegment(&self, segment: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSegment)(windows_core::Interface::as_raw(self), segment.param().abi()).ok() + pub unsafe fn SetSegment(&self, segment: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSegment)(windows_core::Interface::as_raw(self), core::mem::transmute(segment)).ok() } pub unsafe fn SegmentMaxDuration(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3242,11 +3067,8 @@ impl IDataCollectorSet { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).TaskRunAsSelf)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetTaskRunAsSelf(&self, runasself: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTaskRunAsSelf)(windows_core::Interface::as_raw(self), runasself.param().abi()).ok() + pub unsafe fn SetTaskRunAsSelf(&self, runasself: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTaskRunAsSelf)(windows_core::Interface::as_raw(self), core::mem::transmute(runasself)).ok() } pub unsafe fn TaskArguments(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3270,11 +3092,8 @@ impl IDataCollectorSet { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SchedulesEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSchedulesEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSchedulesEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetSchedulesEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSchedulesEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn UserAccount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3295,11 +3114,8 @@ impl IDataCollectorSet { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).StopOnCompletion)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetStopOnCompletion(&self, stop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStopOnCompletion)(windows_core::Interface::as_raw(self), stop.param().abi()).ok() + pub unsafe fn SetStopOnCompletion(&self, stop: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStopOnCompletion)(windows_core::Interface::as_raw(self), core::mem::transmute(stop)).ok() } pub unsafe fn DataManager(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3318,17 +3134,11 @@ impl IDataCollectorSet { pub unsafe fn Delete(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Start(&self, synchronous: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), synchronous.param().abi()).ok() + pub unsafe fn Start(&self, synchronous: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), core::mem::transmute(synchronous)).ok() } - pub unsafe fn Stop(&self, synchronous: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), synchronous.param().abi()).ok() + pub unsafe fn Stop(&self, synchronous: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), core::mem::transmute(synchronous)).ok() } pub unsafe fn SetXml(&self, xml: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4160,21 +3970,15 @@ impl IDataManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, fenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(fenabled)).ok() } pub unsafe fn CheckBeforeRunning(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CheckBeforeRunning)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetCheckBeforeRunning(&self, fcheck: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCheckBeforeRunning)(windows_core::Interface::as_raw(self), fcheck.param().abi()).ok() + pub unsafe fn SetCheckBeforeRunning(&self, fcheck: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCheckBeforeRunning)(windows_core::Interface::as_raw(self), core::mem::transmute(fcheck)).ok() } pub unsafe fn MinFreeDisk(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5531,51 +5335,36 @@ impl ISystemMonitor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Counters)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetShowVerticalGrid(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowVerticalGrid)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowVerticalGrid(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowVerticalGrid)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowVerticalGrid(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowVerticalGrid)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowHorizontalGrid(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowHorizontalGrid)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowHorizontalGrid(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowHorizontalGrid)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowHorizontalGrid(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowHorizontalGrid)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowLegend(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowLegend)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowLegend(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowLegend)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowLegend(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowLegend)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowScaleLabels(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowScaleLabels)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowScaleLabels(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowScaleLabels)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowScaleLabels(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowScaleLabels)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowValueBar(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowValueBar)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowValueBar(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowValueBar)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowValueBar(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5609,11 +5398,8 @@ impl ISystemMonitor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DisplayType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetManualUpdate(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetManualUpdate)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetManualUpdate(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetManualUpdate)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ManualUpdate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5705,21 +5491,15 @@ impl ISystemMonitor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Highlight)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetHighlight(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHighlight)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetHighlight(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHighlight)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowToolbar(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowToolbar)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowToolbar(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowToolbar)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowToolbar(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowToolbar)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn Paste(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Paste)(windows_core::Interface::as_raw(self)).ok() @@ -5730,11 +5510,8 @@ impl ISystemMonitor { pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetReadOnly(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReadOnly)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetReadOnly(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReadOnly)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ReadOnly(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5747,11 +5524,8 @@ impl ISystemMonitor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ReportValueType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMonitorDuplicateInstances(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMonitorDuplicateInstances)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetMonitorDuplicateInstances(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMonitorDuplicateInstances)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn MonitorDuplicateInstances(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6580,41 +6354,29 @@ impl core::ops::Deref for ISystemMonitor2 { } windows_core::imp::interface_hierarchy!(ISystemMonitor2, windows_core::IUnknown, ISystemMonitor); impl ISystemMonitor2 { - pub unsafe fn SetEnableDigitGrouping(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableDigitGrouping)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetEnableDigitGrouping(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableDigitGrouping)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn EnableDigitGrouping(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnableDigitGrouping)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableToolTips(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableToolTips)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetEnableToolTips(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableToolTips)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn EnableToolTips(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnableToolTips)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowTimeAxisLabels(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowTimeAxisLabels)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowTimeAxisLabels(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowTimeAxisLabels)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowTimeAxisLabels(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowTimeAxisLabels)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetChartScroll(&self, bscroll: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetChartScroll)(windows_core::Interface::as_raw(self), bscroll.param().abi()).ok() + pub unsafe fn SetChartScroll(&self, bscroll: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetChartScroll)(windows_core::Interface::as_raw(self), core::mem::transmute(bscroll)).ok() } pub unsafe fn ChartScroll(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6627,11 +6389,8 @@ impl ISystemMonitor2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DataPointCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn ScaleToFit(&self, bselectedcountersonly: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ScaleToFit)(windows_core::Interface::as_raw(self), bselectedcountersonly.param().abi()).ok() + pub unsafe fn ScaleToFit(&self, bselectedcountersonly: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ScaleToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(bselectedcountersonly)).ok() } pub unsafe fn SaveAs(&self, bstrfilename: &windows_core::BSTR, esysmonfiletype: SysmonFileType) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveAs)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfilename), core::mem::transmute(esysmonfiletype)).ok() @@ -6656,11 +6415,8 @@ impl ISystemMonitor2 { pub unsafe fn GetLogViewRange(&self, starttime: *mut f64, stoptime: *mut f64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogViewRange)(windows_core::Interface::as_raw(self), core::mem::transmute(starttime), core::mem::transmute(stoptime)).ok() } - pub unsafe fn BatchingLock(&self, flock: P0, ebatchreason: SysmonBatchReason) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).BatchingLock)(windows_core::Interface::as_raw(self), flock.param().abi(), core::mem::transmute(ebatchreason)).ok() + pub unsafe fn BatchingLock(&self, flock: super::super::Foundation::VARIANT_BOOL, ebatchreason: SysmonBatchReason) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).BatchingLock)(windows_core::Interface::as_raw(self), core::mem::transmute(flock), core::mem::transmute(ebatchreason)).ok() } pub unsafe fn LoadSettings(&self, bstrsettingfilename: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).LoadSettings)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrsettingfilename)).ok() @@ -7044,21 +6800,15 @@ impl ITraceDataCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).PreallocateFile)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPreallocateFile(&self, allocate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPreallocateFile)(windows_core::Interface::as_raw(self), allocate.param().abi()).ok() + pub unsafe fn SetPreallocateFile(&self, allocate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPreallocateFile)(windows_core::Interface::as_raw(self), core::mem::transmute(allocate)).ok() } pub unsafe fn ProcessMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ProcessMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetProcessMode(&self, process: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetProcessMode)(windows_core::Interface::as_raw(self), process.param().abi()).ok() + pub unsafe fn SetProcessMode(&self, process: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetProcessMode)(windows_core::Interface::as_raw(self), core::mem::transmute(process)).ok() } pub unsafe fn RealTimeBuffersLost(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7574,11 +7324,8 @@ impl ITraceDataProvider { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FilterEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFilterEnabled(&self, filterenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFilterEnabled)(windows_core::Interface::as_raw(self), filterenabled.param().abi()).ok() + pub unsafe fn SetFilterEnabled(&self, filterenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFilterEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(filterenabled)).ok() } pub unsafe fn FilterType(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8291,11 +8038,8 @@ impl IValueMapItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn Key(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9876,21 +9620,15 @@ impl _ICounterItemUnion { pub unsafe fn GetStatistics(&self, max: *mut f64, min: *mut f64, avg: *mut f64, status: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), core::mem::transmute(max), core::mem::transmute(min), core::mem::transmute(avg), core::mem::transmute(status)).ok() } - pub unsafe fn SetSelected(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSelected)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetSelected(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSelected)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn Selected(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Selected)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetVisible(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetVisible(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn Visible(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10146,51 +9884,36 @@ impl _ISystemMonitorUnion { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Counters)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetShowVerticalGrid(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowVerticalGrid)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowVerticalGrid(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowVerticalGrid)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowVerticalGrid(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowVerticalGrid)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowHorizontalGrid(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowHorizontalGrid)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowHorizontalGrid(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowHorizontalGrid)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowHorizontalGrid(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowHorizontalGrid)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowLegend(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowLegend)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowLegend(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowLegend)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowLegend(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowLegend)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowScaleLabels(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowScaleLabels)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowScaleLabels(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowScaleLabels)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowScaleLabels(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowScaleLabels)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowValueBar(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowValueBar)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowValueBar(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowValueBar)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowValueBar(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10224,11 +9947,8 @@ impl _ISystemMonitorUnion { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DisplayType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetManualUpdate(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetManualUpdate)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetManualUpdate(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetManualUpdate)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ManualUpdate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10320,21 +10040,15 @@ impl _ISystemMonitorUnion { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Highlight)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetHighlight(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHighlight)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetHighlight(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHighlight)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowToolbar(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowToolbar)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowToolbar(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowToolbar)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowToolbar(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowToolbar)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn Paste(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Paste)(windows_core::Interface::as_raw(self)).ok() @@ -10345,11 +10059,8 @@ impl _ISystemMonitorUnion { pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetReadOnly(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReadOnly)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetReadOnly(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReadOnly)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ReadOnly(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10362,11 +10073,8 @@ impl _ISystemMonitorUnion { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ReportValueType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMonitorDuplicateInstances(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMonitorDuplicateInstances)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetMonitorDuplicateInstances(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMonitorDuplicateInstances)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn MonitorDuplicateInstances(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10405,41 +10113,29 @@ impl _ISystemMonitorUnion { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SqlLogSetName)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetEnableDigitGrouping(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableDigitGrouping)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetEnableDigitGrouping(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableDigitGrouping)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn EnableDigitGrouping(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnableDigitGrouping)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableToolTips(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableToolTips)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetEnableToolTips(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableToolTips)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn EnableToolTips(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnableToolTips)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowTimeAxisLabels(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowTimeAxisLabels)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetShowTimeAxisLabels(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowTimeAxisLabels)(windows_core::Interface::as_raw(self), core::mem::transmute(bstate)).ok() } pub unsafe fn ShowTimeAxisLabels(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowTimeAxisLabels)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetChartScroll(&self, bscroll: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetChartScroll)(windows_core::Interface::as_raw(self), bscroll.param().abi()).ok() + pub unsafe fn SetChartScroll(&self, bscroll: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetChartScroll)(windows_core::Interface::as_raw(self), core::mem::transmute(bscroll)).ok() } pub unsafe fn ChartScroll(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10452,11 +10148,8 @@ impl _ISystemMonitorUnion { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DataPointCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn ScaleToFit(&self, bselectedcountersonly: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ScaleToFit)(windows_core::Interface::as_raw(self), bselectedcountersonly.param().abi()).ok() + pub unsafe fn ScaleToFit(&self, bselectedcountersonly: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ScaleToFit)(windows_core::Interface::as_raw(self), core::mem::transmute(bselectedcountersonly)).ok() } pub unsafe fn SaveAs(&self, bstrfilename: &windows_core::BSTR, esysmonfiletype: SysmonFileType) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveAs)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfilename), core::mem::transmute(esysmonfiletype)).ok() @@ -10481,11 +10174,8 @@ impl _ISystemMonitorUnion { pub unsafe fn GetLogViewRange(&self, starttime: *mut f64, stoptime: *mut f64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogViewRange)(windows_core::Interface::as_raw(self), core::mem::transmute(starttime), core::mem::transmute(stoptime)).ok() } - pub unsafe fn BatchingLock(&self, flock: P0, ebatchreason: SysmonBatchReason) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).BatchingLock)(windows_core::Interface::as_raw(self), flock.param().abi(), core::mem::transmute(ebatchreason)).ok() + pub unsafe fn BatchingLock(&self, flock: super::super::Foundation::VARIANT_BOOL, ebatchreason: SysmonBatchReason) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).BatchingLock)(windows_core::Interface::as_raw(self), core::mem::transmute(flock), core::mem::transmute(ebatchreason)).ok() } pub unsafe fn LoadSettings(&self, bstrsettingfilename: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).LoadSettings)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrsettingfilename)).ok() 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 91e9ef98c2..318762bf3b 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(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesread), core::mem::transmute(ntimeout)).ok() + CallNamedPipeA(lpnamedpipename.param().abi(), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesread), core::mem::transmute(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,16 +12,13 @@ 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(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesread), core::mem::transmute(ntimeout)) + CallNamedPipeW(lpnamedpipename.param().abi(), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesread), core::mem::transmute(ntimeout)) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ConnectNamedPipe(hnamedpipe: P0, lpoverlapped: Option<*mut super::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ConnectNamedPipe(hnamedpipe: super::super::Foundation::HANDLE, lpoverlapped: Option<*mut super::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + ConnectNamedPipe(core::mem::transmute(hnamedpipe), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_FileSystem"))] #[inline] @@ -30,7 +27,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(), core::mem::transmute(dwopenmode), core::mem::transmute(dwpipemode), core::mem::transmute(nmaxinstances), core::mem::transmute(noutbuffersize), core::mem::transmute(ninbuffersize), core::mem::transmute(ndefaulttimeout), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))); + let result__ = CreateNamedPipeA(lpname.param().abi(), core::mem::transmute(dwopenmode), core::mem::transmute(dwpipemode), core::mem::transmute(nmaxinstances), core::mem::transmute(noutbuffersize), core::mem::transmute(ninbuffersize), core::mem::transmute(ndefaulttimeout), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_FileSystem"))] @@ -40,143 +37,101 @@ 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(), core::mem::transmute(dwopenmode), core::mem::transmute(dwpipemode), core::mem::transmute(nmaxinstances), core::mem::transmute(noutbuffersize), core::mem::transmute(ninbuffersize), core::mem::transmute(ndefaulttimeout), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) + CreateNamedPipeW(lpname.param().abi(), core::mem::transmute(dwopenmode), core::mem::transmute(dwpipemode), core::mem::transmute(nmaxinstances), core::mem::transmute(noutbuffersize), core::mem::transmute(ninbuffersize), core::mem::transmute(ndefaulttimeout), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hreadpipe), core::mem::transmute(hwritepipe), core::mem::transmute(lppipeattributes.unwrap_or(core::ptr::null())), core::mem::transmute(nsize)).ok() + CreatePipe(core::mem::transmute(hreadpipe), core::mem::transmute(hwritepipe), core::mem::transmute(lppipeattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } #[inline] -pub unsafe fn DisconnectNamedPipe(hnamedpipe: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DisconnectNamedPipe(hnamedpipe: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DisconnectNamedPipe(hnamedpipe : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DisconnectNamedPipe(hnamedpipe.param().abi()).ok() + DisconnectNamedPipe(core::mem::transmute(hnamedpipe)).ok() } #[inline] -pub unsafe fn GetNamedPipeClientComputerNameA(pipe: P0, clientcomputername: &mut [u8]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeClientComputerNameA(pipe: super::super::Foundation::HANDLE, clientcomputername: &mut [u8]) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeClientComputerNameA(pipe : super::super::Foundation:: HANDLE, clientcomputername : windows_core::PSTR, clientcomputernamelength : u32) -> super::super::Foundation:: BOOL); - GetNamedPipeClientComputerNameA(pipe.param().abi(), core::mem::transmute(clientcomputername.as_ptr()), clientcomputername.len().try_into().unwrap()).ok() + GetNamedPipeClientComputerNameA(core::mem::transmute(pipe), core::mem::transmute(clientcomputername.as_ptr()), clientcomputername.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn GetNamedPipeClientComputerNameW(pipe: P0, clientcomputername: windows_core::PWSTR, clientcomputernamelength: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeClientComputerNameW(pipe: super::super::Foundation::HANDLE, clientcomputername: windows_core::PWSTR, clientcomputernamelength: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeClientComputerNameW(pipe : super::super::Foundation:: HANDLE, clientcomputername : windows_core::PWSTR, clientcomputernamelength : u32) -> super::super::Foundation:: BOOL); - GetNamedPipeClientComputerNameW(pipe.param().abi(), core::mem::transmute(clientcomputername), core::mem::transmute(clientcomputernamelength)) + GetNamedPipeClientComputerNameW(core::mem::transmute(pipe), core::mem::transmute(clientcomputername), core::mem::transmute(clientcomputernamelength)) } #[inline] -pub unsafe fn GetNamedPipeClientProcessId(pipe: P0, clientprocessid: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeClientProcessId(pipe: super::super::Foundation::HANDLE, clientprocessid: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeClientProcessId(pipe : super::super::Foundation:: HANDLE, clientprocessid : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeClientProcessId(pipe.param().abi(), core::mem::transmute(clientprocessid)).ok() + GetNamedPipeClientProcessId(core::mem::transmute(pipe), core::mem::transmute(clientprocessid)).ok() } #[inline] -pub unsafe fn GetNamedPipeClientSessionId(pipe: P0, clientsessionid: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeClientSessionId(pipe: super::super::Foundation::HANDLE, clientsessionid: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeClientSessionId(pipe : super::super::Foundation:: HANDLE, clientsessionid : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeClientSessionId(pipe.param().abi(), core::mem::transmute(clientsessionid)).ok() + GetNamedPipeClientSessionId(core::mem::transmute(pipe), core::mem::transmute(clientsessionid)).ok() } #[inline] -pub unsafe fn GetNamedPipeHandleStateA(hnamedpipe: P0, lpstate: Option<*mut NAMED_PIPE_MODE>, lpcurinstances: Option<*mut u32>, lpmaxcollectioncount: Option<*mut u32>, lpcollectdatatimeout: Option<*mut u32>, lpusername: Option<&mut [u8]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeHandleStateA(hnamedpipe: super::super::Foundation::HANDLE, lpstate: Option<*mut NAMED_PIPE_MODE>, lpcurinstances: Option<*mut u32>, lpmaxcollectioncount: Option<*mut u32>, lpcollectdatatimeout: Option<*mut u32>, lpusername: Option<&mut [u8]>) -> windows_core::Result<()> { 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(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(hnamedpipe), + core::mem::transmute(lpstate.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcurinstances.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpmaxcollectioncount.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcollectdatatimeout.unwrap_or(core::mem::zeroed())), 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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeHandleStateW(hnamedpipe: super::super::Foundation::HANDLE, 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 { 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(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(hnamedpipe), + core::mem::transmute(lpstate.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcurinstances.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpmaxcollectioncount.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcollectdatatimeout.unwrap_or(core::mem::zeroed())), 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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeInfo(hnamedpipe: super::super::Foundation::HANDLE, lpflags: Option<*mut NAMED_PIPE_MODE>, lpoutbuffersize: Option<*mut u32>, lpinbuffersize: Option<*mut u32>, lpmaxinstances: Option<*mut u32>) -> windows_core::Result<()> { 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(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() + GetNamedPipeInfo(core::mem::transmute(hnamedpipe), core::mem::transmute(lpflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoutbuffersize.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpinbuffersize.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpmaxinstances.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetNamedPipeServerProcessId(pipe: P0, serverprocessid: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeServerProcessId(pipe: super::super::Foundation::HANDLE, serverprocessid: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeServerProcessId(pipe : super::super::Foundation:: HANDLE, serverprocessid : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeServerProcessId(pipe.param().abi(), core::mem::transmute(serverprocessid)).ok() + GetNamedPipeServerProcessId(core::mem::transmute(pipe), core::mem::transmute(serverprocessid)).ok() } #[inline] -pub unsafe fn GetNamedPipeServerSessionId(pipe: P0, serversessionid: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNamedPipeServerSessionId(pipe: super::super::Foundation::HANDLE, serversessionid: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeServerSessionId(pipe : super::super::Foundation:: HANDLE, serversessionid : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeServerSessionId(pipe.param().abi(), core::mem::transmute(serversessionid)).ok() + GetNamedPipeServerSessionId(core::mem::transmute(pipe), core::mem::transmute(serversessionid)).ok() } #[inline] -pub unsafe fn ImpersonateNamedPipeClient(hnamedpipe: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ImpersonateNamedPipeClient(hnamedpipe: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ImpersonateNamedPipeClient(hnamedpipe : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ImpersonateNamedPipeClient(hnamedpipe.param().abi()).ok() + ImpersonateNamedPipeClient(core::mem::transmute(hnamedpipe)).ok() } #[inline] -pub unsafe fn PeekNamedPipe(hnamedpipe: P0, lpbuffer: Option<*mut core::ffi::c_void>, nbuffersize: u32, lpbytesread: Option<*mut u32>, lptotalbytesavail: Option<*mut u32>, lpbytesleftthismessage: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PeekNamedPipe(hnamedpipe: super::super::Foundation::HANDLE, lpbuffer: Option<*mut core::ffi::c_void>, nbuffersize: u32, lpbytesread: Option<*mut u32>, lptotalbytesavail: Option<*mut u32>, lpbytesleftthismessage: Option<*mut u32>) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(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() + PeekNamedPipe(core::mem::transmute(hnamedpipe), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nbuffersize), core::mem::transmute(lpbytesread.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptotalbytesavail.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbytesleftthismessage.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetNamedPipeHandleState(hnamedpipe: super::super::Foundation::HANDLE, lpmode: Option<*const NAMED_PIPE_MODE>, lpmaxcollectioncount: Option<*const u32>, lpcollectdatatimeout: Option<*const u32>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(lpmaxcollectioncount.unwrap_or(core::ptr::null())), core::mem::transmute(lpcollectdatatimeout.unwrap_or(core::ptr::null()))).ok() + SetNamedPipeHandleState(core::mem::transmute(hnamedpipe), core::mem::transmute(lpmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpmaxcollectioncount.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcollectdatatimeout.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn TransactNamedPipe(hnamedpipe: P0, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesread: *mut u32, lpoverlapped: Option<*mut super::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TransactNamedPipe(hnamedpipe: super::super::Foundation::HANDLE, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesread: *mut u32, lpoverlapped: Option<*mut super::IO::OVERLAPPED>) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesread), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() + TransactNamedPipe(core::mem::transmute(hnamedpipe), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesread), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).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 8c4a8bfa8a..54e7dc7d98 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(core::mem::transmute(informationlevel), core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(outputbufferlength)) + CallNtPowerInformation(core::mem::transmute(informationlevel), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength)) } #[inline] pub unsafe fn CanUserWritePwrScheme() -> super::super::Foundation::BOOLEAN { @@ -21,12 +21,12 @@ 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(core::mem::transmute(queryindex), core::mem::transmute(queryinterpretationflags), core::mem::transmute(queryflags), core::mem::transmute(preturnbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbuffersize)) + DevicePowerEnumDevices(core::mem::transmute(queryindex), core::mem::transmute(queryinterpretationflags), core::mem::transmute(queryflags), core::mem::transmute(preturnbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuffersize)) } #[inline] -pub unsafe fn DevicePowerOpen(debugmask: u32) -> super::super::Foundation::BOOLEAN { +pub unsafe fn DevicePowerOpen(debugmask: Option) -> super::super::Foundation::BOOLEAN { windows_targets::link!("powrprof.dll" "system" fn DevicePowerOpen(debugmask : u32) -> super::super::Foundation:: BOOLEAN); - DevicePowerOpen(core::mem::transmute(debugmask)) + DevicePowerOpen(core::mem::transmute(debugmask.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DevicePowerSetDeviceState(devicedescription: P0, setflags: u32, setdata: Option<*const core::ffi::c_void>) -> u32 @@ -34,15 +34,12 @@ 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(), core::mem::transmute(setflags), core::mem::transmute(setdata.unwrap_or(core::ptr::null()))) + DevicePowerSetDeviceState(devicedescription.param().abi(), core::mem::transmute(setflags), core::mem::transmute(setdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn EnumPwrSchemes(lpfn: PWRSCHEMESENUMPROC, lparam: P1) -> super::super::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn EnumPwrSchemes(lpfn: PWRSCHEMESENUMPROC, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOLEAN { windows_targets::link!("powrprof.dll" "system" fn EnumPwrSchemes(lpfn : PWRSCHEMESENUMPROC, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOLEAN); - EnumPwrSchemes(core::mem::transmute(lpfn), lparam.param().abi()) + EnumPwrSchemes(core::mem::transmute(lpfn), core::mem::transmute(lparam)) } #[inline] pub unsafe fn GetActivePwrScheme(puiid: *mut u32) -> super::super::Foundation::BOOLEAN { @@ -55,12 +52,9 @@ pub unsafe fn GetCurrentPowerPolicies(pglobalpowerpolicy: *mut GLOBAL_POWER_POLI GetCurrentPowerPolicies(core::mem::transmute(pglobalpowerpolicy), core::mem::transmute(ppowerpolicy)) } #[inline] -pub unsafe fn GetDevicePowerState(hdevice: P0, pfon: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetDevicePowerState(hdevice: super::super::Foundation::HANDLE, pfon: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetDevicePowerState(hdevice : super::super::Foundation:: HANDLE, pfon : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetDevicePowerState(hdevice.param().abi(), core::mem::transmute(pfon)) + GetDevicePowerState(core::mem::transmute(hdevice), core::mem::transmute(pfon)) } #[inline] pub unsafe fn GetPwrCapabilities(lpspc: *mut SYSTEM_POWER_CAPABILITIES) -> super::super::Foundation::BOOLEAN { @@ -108,21 +102,15 @@ pub unsafe fn PowerCanRestoreIndividualDefaultPowerScheme(schemeguid: *const win PowerCanRestoreIndividualDefaultPowerScheme(core::mem::transmute(schemeguid)) } #[inline] -pub unsafe fn PowerClearRequest(powerrequest: P0, requesttype: POWER_REQUEST_TYPE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PowerClearRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn PowerClearRequest(powerrequest : super::super::Foundation:: HANDLE, requesttype : POWER_REQUEST_TYPE) -> super::super::Foundation:: BOOL); - PowerClearRequest(powerrequest.param().abi(), core::mem::transmute(requesttype)).ok() + PowerClearRequest(core::mem::transmute(powerrequest), core::mem::transmute(requesttype)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerCreatePossibleSetting(rootsystempowerkey: P0, subgroupofpowersettingsguid: *const windows_core::GUID, powersettingguid: *const windows_core::GUID, possiblesettingindex: u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerCreatePossibleSetting(rootsystempowerkey: Option, subgroupofpowersettingsguid: *const windows_core::GUID, powersettingguid: *const windows_core::GUID, possiblesettingindex: u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerCreatePossibleSetting(rootsystempowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, possiblesettingindex : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerCreatePossibleSetting(rootsystempowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid), core::mem::transmute(powersettingguid), core::mem::transmute(possiblesettingindex)) + PowerCreatePossibleSetting(core::mem::transmute(rootsystempowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid), core::mem::transmute(powersettingguid), core::mem::transmute(possiblesettingindex)) } #[cfg(feature = "Win32_System_Threading")] #[inline] @@ -133,21 +121,15 @@ pub unsafe fn PowerCreateRequest(context: *const super::Threading::REASON_CONTEX } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerCreateSetting(rootsystempowerkey: P0, subgroupofpowersettingsguid: *const windows_core::GUID, powersettingguid: *const windows_core::GUID) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerCreateSetting(rootsystempowerkey: Option, subgroupofpowersettingsguid: *const windows_core::GUID, powersettingguid: *const windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerCreateSetting(rootsystempowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerCreateSetting(rootsystempowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid), core::mem::transmute(powersettingguid)) + PowerCreateSetting(core::mem::transmute(rootsystempowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid), core::mem::transmute(powersettingguid)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerDeleteScheme(rootpowerkey: P0, schemeguid: *const windows_core::GUID) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerDeleteScheme(rootpowerkey: Option, schemeguid: *const windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerDeleteScheme(rootpowerkey : super::Registry:: HKEY, schemeguid : *const windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerDeleteScheme(rootpowerkey.param().abi(), core::mem::transmute(schemeguid)) + PowerDeleteScheme(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid)) } #[inline] pub unsafe fn PowerDeterminePlatformRole() -> POWER_PLATFORM_ROLE { @@ -161,45 +143,35 @@ pub unsafe fn PowerDeterminePlatformRoleEx(version: POWER_PLATFORM_ROLE_VERSION) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerDuplicateScheme(rootpowerkey: P0, sourceschemeguid: *const windows_core::GUID, destinationschemeguid: *mut *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerDuplicateScheme(rootpowerkey: Option, sourceschemeguid: *const windows_core::GUID, destinationschemeguid: *mut *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerDuplicateScheme(rootpowerkey : super::Registry:: HKEY, sourceschemeguid : *const windows_core::GUID, destinationschemeguid : *mut *mut windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerDuplicateScheme(rootpowerkey.param().abi(), core::mem::transmute(sourceschemeguid), core::mem::transmute(destinationschemeguid)) + PowerDuplicateScheme(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(sourceschemeguid), core::mem::transmute(destinationschemeguid)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerEnumerate(rootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, accessflags: POWER_DATA_ACCESSOR, index: u32, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerEnumerate(rootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, accessflags: POWER_DATA_ACCESSOR, index: u32, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(accessflags), core::mem::transmute(index), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize)) + PowerEnumerate(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(accessflags), core::mem::transmute(index), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerGetActiveScheme(userrootpowerkey: P0, activepolicyguid: *mut *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerGetActiveScheme(userrootpowerkey: Option, activepolicyguid: *mut *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerGetActiveScheme(userrootpowerkey : super::Registry:: HKEY, activepolicyguid : *mut *mut windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerGetActiveScheme(userrootpowerkey.param().abi(), core::mem::transmute(activepolicyguid)) + PowerGetActiveScheme(core::mem::transmute(userrootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(activepolicyguid)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerImportPowerScheme(rootpowerkey: P0, importfilenamepath: P1, destinationschemeguid: *mut *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerImportPowerScheme(rootpowerkey: Option, importfilenamepath: P1, destinationschemeguid: *mut *mut windows_core::GUID) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerImportPowerScheme(rootpowerkey : super::Registry:: HKEY, importfilenamepath : windows_core::PCWSTR, destinationschemeguid : *mut *mut windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerImportPowerScheme(rootpowerkey.param().abi(), importfilenamepath.param().abi(), core::mem::transmute(destinationschemeguid)) + PowerImportPowerScheme(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), importfilenamepath.param().abi(), core::mem::transmute(destinationschemeguid)) } #[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(core::ptr::null())), core::mem::transmute(settingguid.unwrap_or(core::ptr::null()))) + PowerIsSettingRangeDefined(core::mem::transmute(subkeyguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(settingguid.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -221,166 +193,115 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadACDefaultIndex(rootpowerkey: P0, schemepersonalityguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: *const windows_core::GUID, acdefaultindex: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadACDefaultIndex(rootpowerkey: Option, schemepersonalityguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: *const windows_core::GUID, acdefaultindex: *mut u32) -> u32 { 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(), core::mem::transmute(schemepersonalityguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid), core::mem::transmute(acdefaultindex)) + PowerReadACDefaultIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemepersonalityguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid), core::mem::transmute(acdefaultindex)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadACValue(rootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, r#type: Option<*mut u32>, buffer: Option<*mut u8>, buffersize: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadACValue(rootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, r#type: Option<*mut u32>, buffer: Option<*mut u8>, buffersize: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(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()))) + PowerReadACValue(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadACValueIndex(rootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, acvalueindex: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadACValueIndex(rootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, acvalueindex: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(acvalueindex)) + PowerReadACValueIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(acvalueindex)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadDCDefaultIndex(rootpowerkey: P0, schemepersonalityguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: *const windows_core::GUID, dcdefaultindex: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadDCDefaultIndex(rootpowerkey: Option, schemepersonalityguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: *const windows_core::GUID, dcdefaultindex: *mut u32) -> u32 { 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(), core::mem::transmute(schemepersonalityguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid), core::mem::transmute(dcdefaultindex)) + PowerReadDCDefaultIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemepersonalityguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid), core::mem::transmute(dcdefaultindex)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadDCValue(rootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, r#type: Option<*mut u32>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadDCValue(rootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, r#type: Option<*mut u32>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(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)) + PowerReadDCValue(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadDCValueIndex(rootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, dcvalueindex: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadDCValueIndex(rootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, dcvalueindex: *mut u32) -> u32 { 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(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(dcvalueindex)) + PowerReadDCValueIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(dcvalueindex)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadDescription(rootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadDescription(rootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(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())), core::mem::transmute(buffersize)) + PowerReadDescription(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadFriendlyName(rootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadFriendlyName(rootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(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())), core::mem::transmute(buffersize)) + PowerReadFriendlyName(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadIconResourceSpecifier(rootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadIconResourceSpecifier(rootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(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())), core::mem::transmute(buffersize)) + PowerReadIconResourceSpecifier(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadPossibleDescription(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, possiblesettingindex: u32, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadPossibleDescription(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, possiblesettingindex: u32, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize)) + PowerReadPossibleDescription(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadPossibleFriendlyName(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, possiblesettingindex: u32, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadPossibleFriendlyName(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, possiblesettingindex: u32, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize)) + PowerReadPossibleFriendlyName(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadPossibleValue(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, r#type: Option<*mut u32>, possiblesettingindex: u32, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadPossibleValue(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, r#type: Option<*mut u32>, possiblesettingindex: u32, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(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(possiblesettingindex), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize)) + PowerReadPossibleValue(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type.unwrap_or(core::mem::zeroed())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null()))) + PowerReadSettingAttributes(core::mem::transmute(subgroupguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadValueIncrement(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valueincrement: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadValueIncrement(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valueincrement: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(valueincrement)) + PowerReadValueIncrement(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(valueincrement)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadValueMax(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valuemaximum: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadValueMax(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valuemaximum: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(valuemaximum)) + PowerReadValueMax(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuemaximum)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadValueMin(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valueminimum: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadValueMin(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valueminimum: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(valueminimum)) + PowerReadValueMin(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(valueminimum)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerReadValueUnitsSpecifier(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerReadValueUnitsSpecifier(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize)) + PowerReadValueUnitsSpecifier(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(version), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(registrationhandle)).ok() + PowerRegisterForEffectivePowerModeNotifications(core::mem::transmute(version), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(registrationhandle)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn PowerRegisterSuspendResumeNotification(flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS, recipient: P1, registrationhandle: *mut *mut core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR -where - P1: windows_core::Param, -{ +pub unsafe fn PowerRegisterSuspendResumeNotification(flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS, recipient: super::super::Foundation::HANDLE, registrationhandle: *mut *mut core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerRegisterSuspendResumeNotification(flags : super::super::UI::WindowsAndMessaging:: REGISTER_NOTIFICATION_FLAGS, recipient : super::super::Foundation:: HANDLE, registrationhandle : *mut *mut core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - PowerRegisterSuspendResumeNotification(core::mem::transmute(flags), recipient.param().abi(), core::mem::transmute(registrationhandle)) + PowerRegisterSuspendResumeNotification(core::mem::transmute(flags), core::mem::transmute(recipient), core::mem::transmute(registrationhandle)) } #[inline] pub unsafe fn PowerRemovePowerSetting(powersettingsubkeyguid: *const windows_core::GUID, powersettingguid: *const windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { @@ -409,48 +330,36 @@ pub unsafe fn PowerRestoreIndividualDefaultPowerScheme(schemeguid: *const window } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerSetActiveScheme(userrootpowerkey: P0, schemeguid: Option<*const windows_core::GUID>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerSetActiveScheme(userrootpowerkey: Option, schemeguid: Option<*const windows_core::GUID>) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null()))) + PowerSetActiveScheme(core::mem::transmute(userrootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PowerSetRequest(powerrequest: P0, requesttype: POWER_REQUEST_TYPE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PowerSetRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn PowerSetRequest(powerrequest : super::super::Foundation:: HANDLE, requesttype : POWER_REQUEST_TYPE) -> super::super::Foundation:: BOOL); - PowerSetRequest(powerrequest.param().abi(), core::mem::transmute(requesttype)).ok() + PowerSetRequest(core::mem::transmute(powerrequest), core::mem::transmute(requesttype)).ok() } #[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(core::mem::transmute(accessflags), core::mem::transmute(powerguid.unwrap_or(core::ptr::null()))) + PowerSettingAccessCheck(core::mem::transmute(accessflags), core::mem::transmute(powerguid.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(accessflags), core::mem::transmute(powerguid.unwrap_or(core::ptr::null())), core::mem::transmute(accesstype)) + PowerSettingAccessCheckEx(core::mem::transmute(accessflags), core::mem::transmute(powerguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(accesstype)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn PowerSettingRegisterNotification(settingguid: *const windows_core::GUID, flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS, recipient: P2, registrationhandle: *mut *mut core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR -where - P2: windows_core::Param, -{ +pub unsafe fn PowerSettingRegisterNotification(settingguid: *const windows_core::GUID, flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS, recipient: super::super::Foundation::HANDLE, registrationhandle: *mut *mut core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerSettingRegisterNotification(settingguid : *const windows_core::GUID, flags : super::super::UI::WindowsAndMessaging:: REGISTER_NOTIFICATION_FLAGS, recipient : super::super::Foundation:: HANDLE, registrationhandle : *mut *mut core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - PowerSettingRegisterNotification(core::mem::transmute(settingguid), core::mem::transmute(flags), recipient.param().abi(), core::mem::transmute(registrationhandle)) + PowerSettingRegisterNotification(core::mem::transmute(settingguid), core::mem::transmute(flags), core::mem::transmute(recipient), core::mem::transmute(registrationhandle)) } #[inline] -pub unsafe fn PowerSettingUnregisterNotification(registrationhandle: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerSettingUnregisterNotification(registrationhandle: HPOWERNOTIFY) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerSettingUnregisterNotification(registrationhandle : HPOWERNOTIFY) -> super::super::Foundation:: WIN32_ERROR); - PowerSettingUnregisterNotification(registrationhandle.param().abi()) + PowerSettingUnregisterNotification(core::mem::transmute(registrationhandle)) } #[inline] pub unsafe fn PowerUnregisterFromEffectivePowerModeNotifications(registrationhandle: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -458,143 +367,98 @@ pub unsafe fn PowerUnregisterFromEffectivePowerModeNotifications(registrationhan PowerUnregisterFromEffectivePowerModeNotifications(core::mem::transmute(registrationhandle)).ok() } #[inline] -pub unsafe fn PowerUnregisterSuspendResumeNotification(registrationhandle: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerUnregisterSuspendResumeNotification(registrationhandle: HPOWERNOTIFY) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("powrprof.dll" "system" fn PowerUnregisterSuspendResumeNotification(registrationhandle : HPOWERNOTIFY) -> super::super::Foundation:: WIN32_ERROR); - PowerUnregisterSuspendResumeNotification(registrationhandle.param().abi()) + PowerUnregisterSuspendResumeNotification(core::mem::transmute(registrationhandle)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteACDefaultIndex(rootsystempowerkey: P0, schemepersonalityguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: *const windows_core::GUID, defaultacindex: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteACDefaultIndex(rootsystempowerkey: Option, schemepersonalityguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: *const windows_core::GUID, defaultacindex: u32) -> u32 { 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(), core::mem::transmute(schemepersonalityguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid), core::mem::transmute(defaultacindex)) + PowerWriteACDefaultIndex(core::mem::transmute(rootsystempowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemepersonalityguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid), core::mem::transmute(defaultacindex)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteACValueIndex(rootpowerkey: P0, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, acvalueindex: u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteACValueIndex(rootpowerkey: Option, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, acvalueindex: u32) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(schemeguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(acvalueindex)) + PowerWriteACValueIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(acvalueindex)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteDCDefaultIndex(rootsystempowerkey: P0, schemepersonalityguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: *const windows_core::GUID, defaultdcindex: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteDCDefaultIndex(rootsystempowerkey: Option, schemepersonalityguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: *const windows_core::GUID, defaultdcindex: u32) -> u32 { 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(), core::mem::transmute(schemepersonalityguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid), core::mem::transmute(defaultdcindex)) + PowerWriteDCDefaultIndex(core::mem::transmute(rootsystempowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemepersonalityguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid), core::mem::transmute(defaultdcindex)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteDCValueIndex(rootpowerkey: P0, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, dcvalueindex: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteDCValueIndex(rootpowerkey: Option, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, dcvalueindex: u32) -> u32 { 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(), core::mem::transmute(schemeguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(dcvalueindex)) + PowerWriteDCValueIndex(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(dcvalueindex)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteDescription(rootpowerkey: P0, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteDescription(rootpowerkey: Option, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(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()) + PowerWriteDescription(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteFriendlyName(rootpowerkey: P0, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteFriendlyName(rootpowerkey: Option, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(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()) + PowerWriteFriendlyName(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteIconResourceSpecifier(rootpowerkey: P0, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteIconResourceSpecifier(rootpowerkey: Option, schemeguid: *const windows_core::GUID, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(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()) + PowerWriteIconResourceSpecifier(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(schemeguid), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWritePossibleDescription(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWritePossibleDescription(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) + PowerWritePossibleDescription(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWritePossibleFriendlyName(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWritePossibleFriendlyName(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) + PowerWritePossibleFriendlyName(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWritePossibleValue(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, r#type: u32, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWritePossibleValue(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, r#type: u32, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(r#type), core::mem::transmute(possiblesettingindex), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) + PowerWritePossibleValue(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#type), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(attributes)) + PowerWriteSettingAttributes(core::mem::transmute(subgroupguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(attributes)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteValueIncrement(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valueincrement: u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteValueIncrement(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valueincrement: u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(valueincrement)) + PowerWriteValueIncrement(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(valueincrement)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteValueMax(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valuemaximum: u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteValueMax(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valuemaximum: u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(valuemaximum)) + PowerWriteValueMax(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(valuemaximum)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteValueMin(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valueminimum: u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteValueMin(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, valueminimum: u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(valueminimum)) + PowerWriteValueMin(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(valueminimum)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerWriteValueUnitsSpecifier(rootpowerkey: P0, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn PowerWriteValueUnitsSpecifier(rootpowerkey: Option, subgroupofpowersettingsguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) + PowerWriteValueUnitsSpecifier(core::mem::transmute(rootpowerkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(powersettingguid.unwrap_or(core::mem::zeroed())), 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 { @@ -613,22 +477,16 @@ pub unsafe fn ReadPwrScheme(uiid: u32, ppowerpolicy: *mut POWER_POLICY) -> super } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn RegisterPowerSettingNotification(hrecipient: P0, powersettingguid: *const windows_core::GUID, flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterPowerSettingNotification(hrecipient: super::super::Foundation::HANDLE, powersettingguid: *const windows_core::GUID, flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn RegisterPowerSettingNotification(hrecipient : super::super::Foundation:: HANDLE, powersettingguid : *const windows_core::GUID, flags : super::super::UI::WindowsAndMessaging:: REGISTER_NOTIFICATION_FLAGS) -> HPOWERNOTIFY); - let result__ = RegisterPowerSettingNotification(hrecipient.param().abi(), core::mem::transmute(powersettingguid), core::mem::transmute(flags)); + let result__ = RegisterPowerSettingNotification(core::mem::transmute(hrecipient), core::mem::transmute(powersettingguid), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn RegisterSuspendResumeNotification(hrecipient: P0, flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterSuspendResumeNotification(hrecipient: super::super::Foundation::HANDLE, flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn RegisterSuspendResumeNotification(hrecipient : super::super::Foundation:: HANDLE, flags : super::super::UI::WindowsAndMessaging:: REGISTER_NOTIFICATION_FLAGS) -> HPOWERNOTIFY); - let result__ = RegisterSuspendResumeNotification(hrecipient.param().abi(), core::mem::transmute(flags)); + let result__ = RegisterSuspendResumeNotification(core::mem::transmute(hrecipient), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -639,7 +497,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(core::mem::transmute(uiid), core::mem::transmute(pglobalpowerpolicy.unwrap_or(core::ptr::null())), core::mem::transmute(ppowerpolicy.unwrap_or(core::ptr::null()))) + SetActivePwrScheme(core::mem::transmute(uiid), core::mem::transmute(pglobalpowerpolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppowerpolicy.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetSuspendState(bhibernate: P0, bforce: P1, bwakeupeventsdisabled: P2) -> super::super::Foundation::BOOLEAN @@ -666,25 +524,19 @@ pub unsafe fn SetThreadExecutionState(esflags: EXECUTION_STATE) -> EXECUTION_STA SetThreadExecutionState(core::mem::transmute(esflags)) } #[inline] -pub unsafe fn UnregisterPowerSettingNotification(handle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterPowerSettingNotification(handle: HPOWERNOTIFY) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UnregisterPowerSettingNotification(handle : HPOWERNOTIFY) -> super::super::Foundation:: BOOL); - UnregisterPowerSettingNotification(handle.param().abi()).ok() + UnregisterPowerSettingNotification(core::mem::transmute(handle)).ok() } #[inline] -pub unsafe fn UnregisterSuspendResumeNotification(handle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterSuspendResumeNotification(handle: HPOWERNOTIFY) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UnregisterSuspendResumeNotification(handle : HPOWERNOTIFY) -> super::super::Foundation:: BOOL); - UnregisterSuspendResumeNotification(handle.param().abi()).ok() + UnregisterSuspendResumeNotification(core::mem::transmute(handle)).ok() } #[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(core::ptr::null_mut())), core::mem::transmute(ppowerpolicy.unwrap_or(core::ptr::null_mut()))) + ValidatePowerPolicies(core::mem::transmute(pglobalpowerpolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppowerpolicy.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WriteGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN { diff --git a/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs index f4bfba23a3..f2fc261457 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn EmptyWorkingSet(hprocess: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EmptyWorkingSet(hprocess: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn EmptyWorkingSet(hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - EmptyWorkingSet(hprocess.param().abi()).ok() + EmptyWorkingSet(core::mem::transmute(hprocess)).ok() } #[inline] pub unsafe fn EnumDeviceDrivers(lpimagebase: *mut *mut core::ffi::c_void, cb: u32, lpcbneeded: *mut u32) -> windows_core::Result<()> { @@ -22,20 +19,14 @@ pub unsafe fn EnumPageFilesW(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKW, pconte EnumPageFilesW(core::mem::transmute(pcallbackroutine), core::mem::transmute(pcontext)).ok() } #[inline] -pub unsafe fn EnumProcessModules(hprocess: P0, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumProcessModules(hprocess: super::super::Foundation::HANDLE, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn EnumProcessModules(hprocess : super::super::Foundation:: HANDLE, lphmodule : *mut super::super::Foundation:: HMODULE, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - EnumProcessModules(hprocess.param().abi(), core::mem::transmute(lphmodule), core::mem::transmute(cb), core::mem::transmute(lpcbneeded)).ok() + EnumProcessModules(core::mem::transmute(hprocess), core::mem::transmute(lphmodule), core::mem::transmute(cb), core::mem::transmute(lpcbneeded)).ok() } #[inline] -pub unsafe fn EnumProcessModulesEx(hprocess: P0, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32, dwfilterflag: ENUM_PROCESS_MODULES_EX_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumProcessModulesEx(hprocess: super::super::Foundation::HANDLE, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32, dwfilterflag: ENUM_PROCESS_MODULES_EX_FLAGS) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn EnumProcessModulesEx(hprocess : super::super::Foundation:: HANDLE, lphmodule : *mut super::super::Foundation:: HMODULE, cb : u32, lpcbneeded : *mut u32, dwfilterflag : ENUM_PROCESS_MODULES_EX_FLAGS) -> super::super::Foundation:: BOOL); - EnumProcessModulesEx(hprocess.param().abi(), core::mem::transmute(lphmodule), core::mem::transmute(cb), core::mem::transmute(lpcbneeded), core::mem::transmute(dwfilterflag)).ok() + EnumProcessModulesEx(core::mem::transmute(hprocess), core::mem::transmute(lphmodule), core::mem::transmute(cb), core::mem::transmute(lpcbneeded), core::mem::transmute(dwfilterflag)).ok() } #[inline] pub unsafe fn EnumProcesses(lpidprocess: *mut u32, cb: u32, lpcbneeded: *mut u32) -> windows_core::Result<()> { @@ -63,65 +54,39 @@ pub unsafe fn GetDeviceDriverFileNameW(imagebase: *const core::ffi::c_void, lpfi GetDeviceDriverFileNameW(core::mem::transmute(imagebase), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetMappedFileNameA(hprocess: P0, lpv: *const core::ffi::c_void, lpfilename: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMappedFileNameA(hprocess: super::super::Foundation::HANDLE, lpv: *const core::ffi::c_void, lpfilename: &mut [u8]) -> u32 { windows_targets::link!("psapi.dll" "system" fn GetMappedFileNameA(hprocess : super::super::Foundation:: HANDLE, lpv : *const core::ffi::c_void, lpfilename : windows_core::PSTR, nsize : u32) -> u32); - GetMappedFileNameA(hprocess.param().abi(), core::mem::transmute(lpv), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + GetMappedFileNameA(core::mem::transmute(hprocess), core::mem::transmute(lpv), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetMappedFileNameW(hprocess: P0, lpv: *const core::ffi::c_void, lpfilename: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMappedFileNameW(hprocess: super::super::Foundation::HANDLE, lpv: *const core::ffi::c_void, lpfilename: &mut [u16]) -> u32 { windows_targets::link!("psapi.dll" "system" fn GetMappedFileNameW(hprocess : super::super::Foundation:: HANDLE, lpv : *const core::ffi::c_void, lpfilename : windows_core::PWSTR, nsize : u32) -> u32); - GetMappedFileNameW(hprocess.param().abi(), core::mem::transmute(lpv), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + GetMappedFileNameW(core::mem::transmute(hprocess), core::mem::transmute(lpv), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetModuleBaseNameA(hprocess: P0, hmodule: P1, lpbasename: &mut [u8]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetModuleBaseNameA(hprocess: super::super::Foundation::HANDLE, hmodule: Option, lpbasename: &mut [u8]) -> u32 { windows_targets::link!("psapi.dll" "system" fn GetModuleBaseNameA(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpbasename : windows_core::PSTR, nsize : u32) -> u32); - GetModuleBaseNameA(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) + GetModuleBaseNameA(core::mem::transmute(hprocess), core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetModuleBaseNameW(hprocess: P0, hmodule: P1, lpbasename: &mut [u16]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetModuleBaseNameW(hprocess: super::super::Foundation::HANDLE, hmodule: Option, lpbasename: &mut [u16]) -> u32 { windows_targets::link!("psapi.dll" "system" fn GetModuleBaseNameW(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpbasename : windows_core::PWSTR, nsize : u32) -> u32); - GetModuleBaseNameW(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) + GetModuleBaseNameW(core::mem::transmute(hprocess), core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetModuleFileNameExA(hprocess: P0, hmodule: P1, lpfilename: &mut [u8]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetModuleFileNameExA(hprocess: Option, hmodule: Option, lpfilename: &mut [u8]) -> u32 { windows_targets::link!("psapi.dll" "system" fn GetModuleFileNameExA(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpfilename : windows_core::PSTR, nsize : u32) -> u32); - GetModuleFileNameExA(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + GetModuleFileNameExA(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetModuleFileNameExW(hprocess: P0, hmodule: P1, lpfilename: &mut [u16]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetModuleFileNameExW(hprocess: Option, hmodule: Option, lpfilename: &mut [u16]) -> u32 { windows_targets::link!("psapi.dll" "system" fn GetModuleFileNameExW(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpfilename : windows_core::PWSTR, nsize : u32) -> u32); - GetModuleFileNameExW(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + GetModuleFileNameExW(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetModuleInformation(hprocess: P0, hmodule: P1, lpmodinfo: *mut MODULEINFO, cb: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetModuleInformation(hprocess: super::super::Foundation::HANDLE, hmodule: super::super::Foundation::HMODULE, lpmodinfo: *mut MODULEINFO, cb: u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn GetModuleInformation(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpmodinfo : *mut MODULEINFO, cb : u32) -> super::super::Foundation:: BOOL); - GetModuleInformation(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpmodinfo), core::mem::transmute(cb)).ok() + GetModuleInformation(core::mem::transmute(hprocess), core::mem::transmute(hmodule), core::mem::transmute(lpmodinfo), core::mem::transmute(cb)).ok() } #[inline] pub unsafe fn GetPerformanceInfo(pperformanceinformation: *mut PERFORMANCE_INFORMATION, cb: u32) -> windows_core::Result<()> { @@ -129,60 +94,39 @@ pub unsafe fn GetPerformanceInfo(pperformanceinformation: *mut PERFORMANCE_INFOR GetPerformanceInfo(core::mem::transmute(pperformanceinformation), core::mem::transmute(cb)).ok() } #[inline] -pub unsafe fn GetProcessImageFileNameA(hprocess: P0, lpimagefilename: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessImageFileNameA(hprocess: super::super::Foundation::HANDLE, lpimagefilename: &mut [u8]) -> u32 { windows_targets::link!("psapi.dll" "system" fn GetProcessImageFileNameA(hprocess : super::super::Foundation:: HANDLE, lpimagefilename : windows_core::PSTR, nsize : u32) -> u32); - GetProcessImageFileNameA(hprocess.param().abi(), core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) + GetProcessImageFileNameA(core::mem::transmute(hprocess), core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetProcessImageFileNameW(hprocess: P0, lpimagefilename: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessImageFileNameW(hprocess: super::super::Foundation::HANDLE, lpimagefilename: &mut [u16]) -> u32 { windows_targets::link!("psapi.dll" "system" fn GetProcessImageFileNameW(hprocess : super::super::Foundation:: HANDLE, lpimagefilename : windows_core::PWSTR, nsize : u32) -> u32); - GetProcessImageFileNameW(hprocess.param().abi(), core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) + GetProcessImageFileNameW(core::mem::transmute(hprocess), core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetProcessMemoryInfo(process: P0, ppsmemcounters: *mut PROCESS_MEMORY_COUNTERS, cb: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessMemoryInfo(process: super::super::Foundation::HANDLE, ppsmemcounters: *mut PROCESS_MEMORY_COUNTERS, cb: u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn GetProcessMemoryInfo(process : super::super::Foundation:: HANDLE, ppsmemcounters : *mut PROCESS_MEMORY_COUNTERS, cb : u32) -> super::super::Foundation:: BOOL); - GetProcessMemoryInfo(process.param().abi(), core::mem::transmute(ppsmemcounters), core::mem::transmute(cb)).ok() + GetProcessMemoryInfo(core::mem::transmute(process), core::mem::transmute(ppsmemcounters), core::mem::transmute(cb)).ok() } #[inline] -pub unsafe fn GetWsChanges(hprocess: P0, lpwatchinfo: *mut PSAPI_WS_WATCH_INFORMATION, cb: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetWsChanges(hprocess: super::super::Foundation::HANDLE, lpwatchinfo: *mut PSAPI_WS_WATCH_INFORMATION, cb: u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn GetWsChanges(hprocess : super::super::Foundation:: HANDLE, lpwatchinfo : *mut PSAPI_WS_WATCH_INFORMATION, cb : u32) -> super::super::Foundation:: BOOL); - GetWsChanges(hprocess.param().abi(), core::mem::transmute(lpwatchinfo), core::mem::transmute(cb)).ok() + GetWsChanges(core::mem::transmute(hprocess), core::mem::transmute(lpwatchinfo), core::mem::transmute(cb)).ok() } #[inline] -pub unsafe fn GetWsChangesEx(hprocess: P0, lpwatchinfoex: *mut PSAPI_WS_WATCH_INFORMATION_EX, cb: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetWsChangesEx(hprocess: super::super::Foundation::HANDLE, lpwatchinfoex: *mut PSAPI_WS_WATCH_INFORMATION_EX, cb: *mut u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn GetWsChangesEx(hprocess : super::super::Foundation:: HANDLE, lpwatchinfoex : *mut PSAPI_WS_WATCH_INFORMATION_EX, cb : *mut u32) -> super::super::Foundation:: BOOL); - GetWsChangesEx(hprocess.param().abi(), core::mem::transmute(lpwatchinfoex), core::mem::transmute(cb)).ok() + GetWsChangesEx(core::mem::transmute(hprocess), core::mem::transmute(lpwatchinfoex), core::mem::transmute(cb)).ok() } #[inline] -pub unsafe fn InitializeProcessForWsWatch(hprocess: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn InitializeProcessForWsWatch(hprocess: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn InitializeProcessForWsWatch(hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - InitializeProcessForWsWatch(hprocess.param().abi()).ok() + InitializeProcessForWsWatch(core::mem::transmute(hprocess)).ok() } #[inline] -pub unsafe fn K32EmptyWorkingSet(hprocess: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32EmptyWorkingSet(hprocess: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32EmptyWorkingSet(hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - K32EmptyWorkingSet(hprocess.param().abi()) + K32EmptyWorkingSet(core::mem::transmute(hprocess)) } #[inline] pub unsafe fn K32EnumDeviceDrivers(lpimagebase: *mut *mut core::ffi::c_void, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL { @@ -200,20 +144,14 @@ pub unsafe fn K32EnumPageFilesW(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKW, pco K32EnumPageFilesW(core::mem::transmute(pcallbackroutine), core::mem::transmute(pcontext)) } #[inline] -pub unsafe fn K32EnumProcessModules(hprocess: P0, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32EnumProcessModules(hprocess: super::super::Foundation::HANDLE, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32EnumProcessModules(hprocess : super::super::Foundation:: HANDLE, lphmodule : *mut super::super::Foundation:: HMODULE, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - K32EnumProcessModules(hprocess.param().abi(), core::mem::transmute(lphmodule), core::mem::transmute(cb), core::mem::transmute(lpcbneeded)) + K32EnumProcessModules(core::mem::transmute(hprocess), core::mem::transmute(lphmodule), core::mem::transmute(cb), core::mem::transmute(lpcbneeded)) } #[inline] -pub unsafe fn K32EnumProcessModulesEx(hprocess: P0, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32, dwfilterflag: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32EnumProcessModulesEx(hprocess: super::super::Foundation::HANDLE, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32, dwfilterflag: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32EnumProcessModulesEx(hprocess : super::super::Foundation:: HANDLE, lphmodule : *mut super::super::Foundation:: HMODULE, cb : u32, lpcbneeded : *mut u32, dwfilterflag : u32) -> super::super::Foundation:: BOOL); - K32EnumProcessModulesEx(hprocess.param().abi(), core::mem::transmute(lphmodule), core::mem::transmute(cb), core::mem::transmute(lpcbneeded), core::mem::transmute(dwfilterflag)) + K32EnumProcessModulesEx(core::mem::transmute(hprocess), core::mem::transmute(lphmodule), core::mem::transmute(cb), core::mem::transmute(lpcbneeded), core::mem::transmute(dwfilterflag)) } #[inline] pub unsafe fn K32EnumProcesses(lpidprocess: *mut u32, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL { @@ -241,65 +179,39 @@ pub unsafe fn K32GetDeviceDriverFileNameW(imagebase: *const core::ffi::c_void, l K32GetDeviceDriverFileNameW(core::mem::transmute(imagebase), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetMappedFileNameA(hprocess: P0, lpv: *const core::ffi::c_void, lpfilename: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn K32GetMappedFileNameA(hprocess: super::super::Foundation::HANDLE, lpv: *const core::ffi::c_void, lpfilename: &mut [u8]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn K32GetMappedFileNameA(hprocess : super::super::Foundation:: HANDLE, lpv : *const core::ffi::c_void, lpfilename : windows_core::PSTR, nsize : u32) -> u32); - K32GetMappedFileNameA(hprocess.param().abi(), core::mem::transmute(lpv), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + K32GetMappedFileNameA(core::mem::transmute(hprocess), core::mem::transmute(lpv), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetMappedFileNameW(hprocess: P0, lpv: *const core::ffi::c_void, lpfilename: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn K32GetMappedFileNameW(hprocess: super::super::Foundation::HANDLE, lpv: *const core::ffi::c_void, lpfilename: &mut [u16]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn K32GetMappedFileNameW(hprocess : super::super::Foundation:: HANDLE, lpv : *const core::ffi::c_void, lpfilename : windows_core::PWSTR, nsize : u32) -> u32); - K32GetMappedFileNameW(hprocess.param().abi(), core::mem::transmute(lpv), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + K32GetMappedFileNameW(core::mem::transmute(hprocess), core::mem::transmute(lpv), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetModuleBaseNameA(hprocess: P0, hmodule: P1, lpbasename: &mut [u8]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn K32GetModuleBaseNameA(hprocess: super::super::Foundation::HANDLE, hmodule: Option, lpbasename: &mut [u8]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn K32GetModuleBaseNameA(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpbasename : windows_core::PSTR, nsize : u32) -> u32); - K32GetModuleBaseNameA(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) + K32GetModuleBaseNameA(core::mem::transmute(hprocess), core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetModuleBaseNameW(hprocess: P0, hmodule: P1, lpbasename: &mut [u16]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn K32GetModuleBaseNameW(hprocess: super::super::Foundation::HANDLE, hmodule: Option, lpbasename: &mut [u16]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn K32GetModuleBaseNameW(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpbasename : windows_core::PWSTR, nsize : u32) -> u32); - K32GetModuleBaseNameW(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) + K32GetModuleBaseNameW(core::mem::transmute(hprocess), core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetModuleFileNameExA(hprocess: P0, hmodule: P1, lpfilename: &mut [u8]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn K32GetModuleFileNameExA(hprocess: Option, hmodule: Option, lpfilename: &mut [u8]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn K32GetModuleFileNameExA(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpfilename : windows_core::PSTR, nsize : u32) -> u32); - K32GetModuleFileNameExA(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + K32GetModuleFileNameExA(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetModuleFileNameExW(hprocess: P0, hmodule: P1, lpfilename: &mut [u16]) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn K32GetModuleFileNameExW(hprocess: Option, hmodule: Option, lpfilename: &mut [u16]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn K32GetModuleFileNameExW(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpfilename : windows_core::PWSTR, nsize : u32) -> u32); - K32GetModuleFileNameExW(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) + K32GetModuleFileNameExW(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmodule.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetModuleInformation(hprocess: P0, hmodule: P1, lpmodinfo: *mut MODULEINFO, cb: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn K32GetModuleInformation(hprocess: super::super::Foundation::HANDLE, hmodule: super::super::Foundation::HMODULE, lpmodinfo: *mut MODULEINFO, cb: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32GetModuleInformation(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpmodinfo : *mut MODULEINFO, cb : u32) -> super::super::Foundation:: BOOL); - K32GetModuleInformation(hprocess.param().abi(), hmodule.param().abi(), core::mem::transmute(lpmodinfo), core::mem::transmute(cb)) + K32GetModuleInformation(core::mem::transmute(hprocess), core::mem::transmute(hmodule), core::mem::transmute(lpmodinfo), core::mem::transmute(cb)) } #[inline] pub unsafe fn K32GetPerformanceInfo(pperformanceinformation: *mut PERFORMANCE_INFORMATION, cb: u32) -> super::super::Foundation::BOOL { @@ -307,84 +219,54 @@ pub unsafe fn K32GetPerformanceInfo(pperformanceinformation: *mut PERFORMANCE_IN K32GetPerformanceInfo(core::mem::transmute(pperformanceinformation), core::mem::transmute(cb)) } #[inline] -pub unsafe fn K32GetProcessImageFileNameA(hprocess: P0, lpimagefilename: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn K32GetProcessImageFileNameA(hprocess: super::super::Foundation::HANDLE, lpimagefilename: &mut [u8]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn K32GetProcessImageFileNameA(hprocess : super::super::Foundation:: HANDLE, lpimagefilename : windows_core::PSTR, nsize : u32) -> u32); - K32GetProcessImageFileNameA(hprocess.param().abi(), core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) + K32GetProcessImageFileNameA(core::mem::transmute(hprocess), core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetProcessImageFileNameW(hprocess: P0, lpimagefilename: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn K32GetProcessImageFileNameW(hprocess: super::super::Foundation::HANDLE, lpimagefilename: &mut [u16]) -> u32 { windows_targets::link!("kernel32.dll" "system" fn K32GetProcessImageFileNameW(hprocess : super::super::Foundation:: HANDLE, lpimagefilename : windows_core::PWSTR, nsize : u32) -> u32); - K32GetProcessImageFileNameW(hprocess.param().abi(), core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) + K32GetProcessImageFileNameW(core::mem::transmute(hprocess), core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn K32GetProcessMemoryInfo(process: P0, ppsmemcounters: *mut PROCESS_MEMORY_COUNTERS, cb: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32GetProcessMemoryInfo(process: super::super::Foundation::HANDLE, ppsmemcounters: *mut PROCESS_MEMORY_COUNTERS, cb: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32GetProcessMemoryInfo(process : super::super::Foundation:: HANDLE, ppsmemcounters : *mut PROCESS_MEMORY_COUNTERS, cb : u32) -> super::super::Foundation:: BOOL); - K32GetProcessMemoryInfo(process.param().abi(), core::mem::transmute(ppsmemcounters), core::mem::transmute(cb)) + K32GetProcessMemoryInfo(core::mem::transmute(process), core::mem::transmute(ppsmemcounters), core::mem::transmute(cb)) } #[inline] -pub unsafe fn K32GetWsChanges(hprocess: P0, lpwatchinfo: *mut PSAPI_WS_WATCH_INFORMATION, cb: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32GetWsChanges(hprocess: super::super::Foundation::HANDLE, lpwatchinfo: *mut PSAPI_WS_WATCH_INFORMATION, cb: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32GetWsChanges(hprocess : super::super::Foundation:: HANDLE, lpwatchinfo : *mut PSAPI_WS_WATCH_INFORMATION, cb : u32) -> super::super::Foundation:: BOOL); - K32GetWsChanges(hprocess.param().abi(), core::mem::transmute(lpwatchinfo), core::mem::transmute(cb)) + K32GetWsChanges(core::mem::transmute(hprocess), core::mem::transmute(lpwatchinfo), core::mem::transmute(cb)) } #[inline] -pub unsafe fn K32GetWsChangesEx(hprocess: P0, lpwatchinfoex: *mut PSAPI_WS_WATCH_INFORMATION_EX, cb: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32GetWsChangesEx(hprocess: super::super::Foundation::HANDLE, lpwatchinfoex: *mut PSAPI_WS_WATCH_INFORMATION_EX, cb: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32GetWsChangesEx(hprocess : super::super::Foundation:: HANDLE, lpwatchinfoex : *mut PSAPI_WS_WATCH_INFORMATION_EX, cb : *mut u32) -> super::super::Foundation:: BOOL); - K32GetWsChangesEx(hprocess.param().abi(), core::mem::transmute(lpwatchinfoex), core::mem::transmute(cb)) + K32GetWsChangesEx(core::mem::transmute(hprocess), core::mem::transmute(lpwatchinfoex), core::mem::transmute(cb)) } #[inline] -pub unsafe fn K32InitializeProcessForWsWatch(hprocess: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32InitializeProcessForWsWatch(hprocess: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32InitializeProcessForWsWatch(hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - K32InitializeProcessForWsWatch(hprocess.param().abi()) + K32InitializeProcessForWsWatch(core::mem::transmute(hprocess)) } #[inline] -pub unsafe fn K32QueryWorkingSet(hprocess: P0, pv: *mut core::ffi::c_void, cb: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32QueryWorkingSet(hprocess: super::super::Foundation::HANDLE, pv: *mut core::ffi::c_void, cb: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32QueryWorkingSet(hprocess : super::super::Foundation:: HANDLE, pv : *mut core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - K32QueryWorkingSet(hprocess.param().abi(), core::mem::transmute(pv), core::mem::transmute(cb)) + K32QueryWorkingSet(core::mem::transmute(hprocess), core::mem::transmute(pv), core::mem::transmute(cb)) } #[inline] -pub unsafe fn K32QueryWorkingSetEx(hprocess: P0, pv: *mut core::ffi::c_void, cb: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn K32QueryWorkingSetEx(hprocess: super::super::Foundation::HANDLE, pv: *mut core::ffi::c_void, cb: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn K32QueryWorkingSetEx(hprocess : super::super::Foundation:: HANDLE, pv : *mut core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - K32QueryWorkingSetEx(hprocess.param().abi(), core::mem::transmute(pv), core::mem::transmute(cb)) + K32QueryWorkingSetEx(core::mem::transmute(hprocess), core::mem::transmute(pv), core::mem::transmute(cb)) } #[inline] -pub unsafe fn QueryWorkingSet(hprocess: P0, pv: *mut core::ffi::c_void, cb: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryWorkingSet(hprocess: super::super::Foundation::HANDLE, pv: *mut core::ffi::c_void, cb: u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn QueryWorkingSet(hprocess : super::super::Foundation:: HANDLE, pv : *mut core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - QueryWorkingSet(hprocess.param().abi(), core::mem::transmute(pv), core::mem::transmute(cb)).ok() + QueryWorkingSet(core::mem::transmute(hprocess), core::mem::transmute(pv), core::mem::transmute(cb)).ok() } #[inline] -pub unsafe fn QueryWorkingSetEx(hprocess: P0, pv: *mut core::ffi::c_void, cb: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryWorkingSetEx(hprocess: super::super::Foundation::HANDLE, pv: *mut core::ffi::c_void, cb: u32) -> windows_core::Result<()> { windows_targets::link!("psapi.dll" "system" fn QueryWorkingSetEx(hprocess : super::super::Foundation:: HANDLE, pv : *mut core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - QueryWorkingSetEx(hprocess.param().abi(), core::mem::transmute(pv), core::mem::transmute(cb)).ok() + QueryWorkingSetEx(core::mem::transmute(hprocess), core::mem::transmute(pv), core::mem::transmute(cb)).ok() } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 20bea6e588..7565197573 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs @@ -734,11 +734,8 @@ impl IRTCClient { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EventFilter)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPreferredMediaTypes(&self, lmediatypes: i32, fpersistent: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPreferredMediaTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(lmediatypes), fpersistent.param().abi()).ok() + pub unsafe fn SetPreferredMediaTypes(&self, lmediatypes: i32, fpersistent: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPreferredMediaTypes)(windows_core::Interface::as_raw(self), core::mem::transmute(lmediatypes), core::mem::transmute(fpersistent)).ok() } pub unsafe fn PreferredMediaTypes(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -763,13 +760,9 @@ impl IRTCClient { (windows_core::Interface::vtable(self).ListenForIncomingSessions)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn get_NetworkAddresses(&self, ftcp: P0, fexternal: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn get_NetworkAddresses(&self, ftcp: super::super::Foundation::VARIANT_BOOL, fexternal: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).get_NetworkAddresses)(windows_core::Interface::as_raw(self), ftcp.param().abi(), fexternal.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).get_NetworkAddresses)(windows_core::Interface::as_raw(self), core::mem::transmute(ftcp), core::mem::transmute(fexternal), &mut result__).map(|| core::mem::transmute(result__)) } pub unsafe fn put_Volume(&self, endevice: RTC_AUDIO_DEVICE, lvolume: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).put_Volume)(windows_core::Interface::as_raw(self), core::mem::transmute(endevice), core::mem::transmute(lvolume)).ok() @@ -778,11 +771,8 @@ impl IRTCClient { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_Volume)(windows_core::Interface::as_raw(self), core::mem::transmute(endevice), &mut result__).map(|| result__) } - pub unsafe fn put_AudioMuted(&self, endevice: RTC_AUDIO_DEVICE, fmuted: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).put_AudioMuted)(windows_core::Interface::as_raw(self), core::mem::transmute(endevice), fmuted.param().abi()).ok() + pub unsafe fn put_AudioMuted(&self, endevice: RTC_AUDIO_DEVICE, fmuted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).put_AudioMuted)(windows_core::Interface::as_raw(self), core::mem::transmute(endevice), core::mem::transmute(fmuted)).ok() } pub unsafe fn get_AudioMuted(&self, endevice: RTC_AUDIO_DEVICE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -807,11 +797,8 @@ impl IRTCClient { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_PreferredVolume)(windows_core::Interface::as_raw(self), core::mem::transmute(endevice), &mut result__).map(|| result__) } - pub unsafe fn SetPreferredAEC(&self, benable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPreferredAEC)(windows_core::Interface::as_raw(self), benable.param().abi()).ok() + pub unsafe fn SetPreferredAEC(&self, benable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPreferredAEC)(windows_core::Interface::as_raw(self), core::mem::transmute(benable)).ok() } pub unsafe fn PreferredAEC(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -870,11 +857,8 @@ impl IRTCClient { pub unsafe fn SetLocalUserName(&self, bstrusername: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetLocalUserName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrusername)).ok() } - pub unsafe fn PlayRing(&self, entype: RTC_RING_TYPE, bplay: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PlayRing)(windows_core::Interface::as_raw(self), core::mem::transmute(entype), bplay.param().abi()).ok() + pub unsafe fn PlayRing(&self, entype: RTC_RING_TYPE, bplay: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PlayRing)(windows_core::Interface::as_raw(self), core::mem::transmute(entype), core::mem::transmute(bplay)).ok() } pub unsafe fn SendDTMF(&self, endtmf: RTC_DTMF) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SendDTMF)(windows_core::Interface::as_raw(self), core::mem::transmute(endtmf)).ok() @@ -1349,12 +1333,8 @@ impl IRTCClient2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_AnswerMode)(windows_core::Interface::as_raw(self), core::mem::transmute(entype), &mut result__).map(|| result__) } - pub unsafe fn InvokeTuningWizardEx(&self, hwndparent: isize, fallowaudio: P1, fallowvideo: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).InvokeTuningWizardEx)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), fallowaudio.param().abi(), fallowvideo.param().abi()).ok() + pub unsafe fn InvokeTuningWizardEx(&self, hwndparent: isize, fallowaudio: super::super::Foundation::VARIANT_BOOL, fallowvideo: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InvokeTuningWizardEx)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(fallowaudio), core::mem::transmute(fallowvideo)).ok() } pub unsafe fn Version(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1658,22 +1638,16 @@ windows_core::imp::define_interface!(IRTCClientPresence, IRTCClientPresence_Vtbl windows_core::imp::interface_hierarchy!(IRTCClientPresence, windows_core::IUnknown); impl IRTCClientPresence { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn EnablePresence(&self, fusestorage: P0, varstorage: &super::Variant::VARIANT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnablePresence)(windows_core::Interface::as_raw(self), fusestorage.param().abi(), core::mem::transmute_copy(varstorage)).ok() + pub unsafe fn EnablePresence(&self, fusestorage: super::super::Foundation::VARIANT_BOOL, varstorage: &super::Variant::VARIANT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnablePresence)(windows_core::Interface::as_raw(self), core::mem::transmute(fusestorage), core::mem::transmute_copy(varstorage)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Export(&self, varstorage: &super::Variant::VARIANT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Export)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(varstorage)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn Import(&self, varstorage: &super::Variant::VARIANT, freplaceall: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Import)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(varstorage), freplaceall.param().abi()).ok() + pub unsafe fn Import(&self, varstorage: &super::Variant::VARIANT, freplaceall: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Import)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(varstorage), core::mem::transmute(freplaceall)).ok() } pub unsafe fn EnumerateBuddies(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1688,13 +1662,12 @@ impl IRTCClientPresence { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_Buddy)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn AddBuddy(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fpersistent: P3, pprofile: P4, lflags: i32) -> windows_core::Result + pub unsafe fn AddBuddy(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fpersistent: super::super::Foundation::VARIANT_BOOL, pprofile: P4, lflags: i32) -> windows_core::Result where - P3: windows_core::Param, P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddBuddy)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrdata), fpersistent.param().abi(), pprofile.param().abi(), core::mem::transmute(lflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).AddBuddy)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrdata), core::mem::transmute(fpersistent), pprofile.param().abi(), core::mem::transmute(lflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn RemoveBuddy(&self, pbuddy: P0) -> windows_core::Result<()> where @@ -1715,13 +1688,9 @@ impl IRTCClientPresence { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_Watcher)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn AddWatcher(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fblocked: P3, fpersistent: P4) -> windows_core::Result - where - P3: windows_core::Param, - P4: windows_core::Param, - { + pub unsafe fn AddWatcher(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fblocked: super::super::Foundation::VARIANT_BOOL, fpersistent: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddWatcher)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrdata), fblocked.param().abi(), fpersistent.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).AddWatcher)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrdata), core::mem::transmute(fblocked), core::mem::transmute(fpersistent), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn RemoveWatcher(&self, pwatcher: P0) -> windows_core::Result<()> where @@ -2013,13 +1982,12 @@ impl IRTCClientPresence2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_Group)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrgroupname), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn AddWatcherEx(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, enstate: RTC_WATCHER_STATE, fpersistent: P4, enscope: RTC_ACE_SCOPE, pprofile: P6, lflags: i32) -> windows_core::Result + pub unsafe fn AddWatcherEx(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, enstate: RTC_WATCHER_STATE, fpersistent: super::super::Foundation::VARIANT_BOOL, enscope: RTC_ACE_SCOPE, pprofile: P6, lflags: i32) -> windows_core::Result where - P4: windows_core::Param, P6: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddWatcherEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrdata), core::mem::transmute(enstate), fpersistent.param().abi(), core::mem::transmute(enscope), pprofile.param().abi(), core::mem::transmute(lflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).AddWatcherEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrdata), core::mem::transmute(enstate), core::mem::transmute(fpersistent), core::mem::transmute(enscope), pprofile.param().abi(), core::mem::transmute(lflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn get_WatcherEx(&self, enmode: RTC_WATCHER_MATCH_MODE, bstrpresentityuri: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2041,13 +2009,12 @@ impl IRTCClientPresence2 { pub unsafe fn GetLocalPresenceInfo(&self, penstatus: *mut RTC_PRESENCE_STATUS, pbstrnotes: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLocalPresenceInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(penstatus), core::mem::transmute(pbstrnotes)).ok() } - pub unsafe fn AddBuddyEx(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fpersistent: P3, ensubscriptiontype: RTC_BUDDY_SUBSCRIPTION_TYPE, pprofile: P5, lflags: i32) -> windows_core::Result + pub unsafe fn AddBuddyEx(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fpersistent: super::super::Foundation::VARIANT_BOOL, ensubscriptiontype: RTC_BUDDY_SUBSCRIPTION_TYPE, pprofile: P5, lflags: i32) -> windows_core::Result where - P3: windows_core::Param, P5: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddBuddyEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrdata), fpersistent.param().abi(), core::mem::transmute(ensubscriptiontype), pprofile.param().abi(), core::mem::transmute(lflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).AddBuddyEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpresentityuri), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrdata), core::mem::transmute(fpersistent), core::mem::transmute(ensubscriptiontype), pprofile.param().abi(), core::mem::transmute(lflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2524,7 +2491,7 @@ windows_core::imp::define_interface!(IRTCEnumBuddies, IRTCEnumBuddies_Vtbl, 0xf7 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2592,7 +2559,7 @@ windows_core::imp::define_interface!(IRTCEnumGroups, IRTCEnumGroups_Vtbl, 0x7423 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2660,7 +2627,7 @@ windows_core::imp::define_interface!(IRTCEnumParticipants, 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2728,7 +2695,7 @@ windows_core::imp::define_interface!(IRTCEnumPresenceDevices, IRTCEnumPresenceDe 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2796,7 +2763,7 @@ windows_core::imp::define_interface!(IRTCEnumProfiles, IRTCEnumProfiles_Vtbl, 0x 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2864,7 +2831,7 @@ windows_core::imp::define_interface!(IRTCEnumUserSearchResults, IRTCEnumUserSear 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2932,7 +2899,7 @@ windows_core::imp::define_interface!(IRTCEnumWatchers, IRTCEnumWatchers_Vtbl, 0x 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -3874,11 +3841,8 @@ impl IRTCPresenceContact { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Persistent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPersistent(&self, fpersistent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPersistent)(windows_core::Interface::as_raw(self), fpersistent.param().abi()).ok() + pub unsafe fn SetPersistent(&self, fpersistent: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPersistent)(windows_core::Interface::as_raw(self), core::mem::transmute(fpersistent)).ok() } } #[repr(C)] 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 78f5e78006..58b9d49bc1 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs @@ -14,26 +14,20 @@ pub unsafe fn ApplicationRecoveryInProgress() -> windows_core::Result(hprocess: P0, precoverycallback: *mut super::WindowsProgramming::APPLICATION_RECOVERY_CALLBACK, ppvparameter: Option<*mut *mut core::ffi::c_void>, pdwpinginterval: Option<*mut u32>, pdwflags: Option<*mut u32>) -> windows_core::HRESULT -where - P0: windows_core::Param, -{ +pub unsafe fn GetApplicationRecoveryCallback(hprocess: super::super::Foundation::HANDLE, precoverycallback: *mut super::WindowsProgramming::APPLICATION_RECOVERY_CALLBACK, ppvparameter: Option<*mut *mut core::ffi::c_void>, pdwpinginterval: Option<*mut u32>, pdwflags: Option<*mut u32>) -> windows_core::HRESULT { 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(), core::mem::transmute(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()))) + GetApplicationRecoveryCallback(core::mem::transmute(hprocess), core::mem::transmute(precoverycallback), core::mem::transmute(ppvparameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwpinginterval.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetApplicationRestartSettings(hprocess: P0, pwzcommandline: windows_core::PWSTR, pcchsize: *mut u32, pdwflags: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetApplicationRestartSettings(hprocess: super::super::Foundation::HANDLE, pwzcommandline: Option, pcchsize: *mut u32, pdwflags: Option<*mut u32>) -> windows_core::Result<()> { 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), core::mem::transmute(pcchsize), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() + GetApplicationRestartSettings(core::mem::transmute(hprocess), core::mem::transmute(pwzcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsize), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(precoveycallback), core::mem::transmute(pvparameter.unwrap_or(core::ptr::null())), core::mem::transmute(dwpinginterval), core::mem::transmute(dwflags)).ok() + RegisterApplicationRecoveryCallback(core::mem::transmute(precoveycallback), core::mem::transmute(pvparameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwpinginterval), core::mem::transmute(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 4bdb29d800..9f94a4c8d8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs @@ -1,254 +1,243 @@ #[inline] -pub unsafe fn GetRegistryValueWithFallbackW(hkeyprimary: P0, pwszprimarysubkey: P1, hkeyfallback: P2, pwszfallbacksubkey: P3, pwszvalue: P4, dwflags: u32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, cbdatain: u32, pcbdataout: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetRegistryValueWithFallbackW(hkeyprimary: Option, pwszprimarysubkey: P1, hkeyfallback: Option, pwszfallbacksubkey: P3, pwszvalue: P4, dwflags: u32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, cbdatain: u32, pcbdataout: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, 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(), core::mem::transmute(dwflags), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdatain), core::mem::transmute(pcbdataout.unwrap_or(core::ptr::null_mut()))) + GetRegistryValueWithFallbackW(core::mem::transmute(hkeyprimary.unwrap_or(core::mem::zeroed())), pwszprimarysubkey.param().abi(), core::mem::transmute(hkeyfallback.unwrap_or(core::mem::zeroed())), pwszfallbacksubkey.param().abi(), pwszvalue.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdatain), core::mem::transmute(pcbdataout.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegCloseKey(hkey: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegCloseKey(hkey: HKEY) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegCloseKey(hkey : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCloseKey(hkey.param().abi()) + RegCloseKey(core::mem::transmute(hkey)) } #[inline] -pub unsafe fn RegConnectRegistryA(lpmachinename: P0, hkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegConnectRegistryA(lpmachinename: P0, hkey: HKEY, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegConnectRegistryA(lpmachinename : windows_core::PCSTR, hkey : HKEY, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegConnectRegistryA(lpmachinename.param().abi(), hkey.param().abi(), core::mem::transmute(phkresult)) + RegConnectRegistryA(lpmachinename.param().abi(), core::mem::transmute(hkey), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegConnectRegistryExA(lpmachinename: P0, hkey: P1, flags: u32, phkresult: *mut HKEY) -> i32 +pub unsafe fn RegConnectRegistryExA(lpmachinename: P0, hkey: HKEY, flags: u32, phkresult: *mut HKEY) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegConnectRegistryExA(lpmachinename : windows_core::PCSTR, hkey : HKEY, flags : u32, phkresult : *mut HKEY) -> i32); - RegConnectRegistryExA(lpmachinename.param().abi(), hkey.param().abi(), core::mem::transmute(flags), core::mem::transmute(phkresult)) + RegConnectRegistryExA(lpmachinename.param().abi(), core::mem::transmute(hkey), core::mem::transmute(flags), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegConnectRegistryExW(lpmachinename: P0, hkey: P1, flags: u32, phkresult: *mut HKEY) -> i32 +pub unsafe fn RegConnectRegistryExW(lpmachinename: P0, hkey: HKEY, flags: u32, phkresult: *mut HKEY) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegConnectRegistryExW(lpmachinename : windows_core::PCWSTR, hkey : HKEY, flags : u32, phkresult : *mut HKEY) -> i32); - RegConnectRegistryExW(lpmachinename.param().abi(), hkey.param().abi(), core::mem::transmute(flags), core::mem::transmute(phkresult)) + RegConnectRegistryExW(lpmachinename.param().abi(), core::mem::transmute(hkey), core::mem::transmute(flags), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegConnectRegistryW(lpmachinename: P0, hkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegConnectRegistryW(lpmachinename: P0, hkey: HKEY, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegConnectRegistryW(lpmachinename : windows_core::PCWSTR, hkey : HKEY, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegConnectRegistryW(lpmachinename.param().abi(), hkey.param().abi(), core::mem::transmute(phkresult)) + RegConnectRegistryW(lpmachinename.param().abi(), core::mem::transmute(hkey), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegCopyTreeA(hkeysrc: P0, lpsubkey: P1, hkeydest: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCopyTreeA(hkeysrc: HKEY, lpsubkey: P1, hkeydest: HKEY) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegCopyTreeA(hkeysrc : HKEY, lpsubkey : windows_core::PCSTR, hkeydest : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCopyTreeA(hkeysrc.param().abi(), lpsubkey.param().abi(), hkeydest.param().abi()) + RegCopyTreeA(core::mem::transmute(hkeysrc), lpsubkey.param().abi(), core::mem::transmute(hkeydest)) } #[inline] -pub unsafe fn RegCopyTreeW(hkeysrc: P0, lpsubkey: P1, hkeydest: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCopyTreeW(hkeysrc: HKEY, lpsubkey: P1, hkeydest: HKEY) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegCopyTreeW(hkeysrc : HKEY, lpsubkey : windows_core::PCWSTR, hkeydest : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCopyTreeW(hkeysrc.param().abi(), lpsubkey.param().abi(), hkeydest.param().abi()) + RegCopyTreeW(core::mem::transmute(hkeysrc), lpsubkey.param().abi(), core::mem::transmute(hkeydest)) } #[inline] -pub unsafe fn RegCreateKeyA(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyA(hkey: HKEY, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyA(hkey : HKEY, lpsubkey : windows_core::PCSTR, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCreateKeyA(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(phkresult)) + RegCreateKeyA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(phkresult)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegCreateKeyExA(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P3, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: Option<*mut REG_CREATE_KEY_DISPOSITION>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyExA(hkey: HKEY, lpsubkey: P1, reserved: Option, lpclass: P3, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: Option<*mut REG_CREATE_KEY_DISPOSITION>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P3: 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(), core::mem::transmute(reserved), lpclass.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut()))) + RegCreateKeyExA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpclass.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegCreateKeyExW(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P3, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: Option<*mut REG_CREATE_KEY_DISPOSITION>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyExW(hkey: HKEY, lpsubkey: P1, reserved: Option, lpclass: P3, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: Option<*mut REG_CREATE_KEY_DISPOSITION>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P3: 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(), core::mem::transmute(reserved), lpclass.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut()))) + RegCreateKeyExW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpclass.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegCreateKeyTransactedA(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P3, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: Option<*mut REG_CREATE_KEY_DISPOSITION>, htransaction: P9, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyTransactedA(hkey: HKEY, lpsubkey: P1, reserved: Option, lpclass: P3, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: Option<*mut REG_CREATE_KEY_DISPOSITION>, htransaction: super::super::Foundation::HANDLE, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, - P9: 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(), core::mem::transmute(reserved), lpclass.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut())), htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(core::ptr::null()))) + RegCreateKeyTransactedA( + core::mem::transmute(hkey), + lpsubkey.param().abi(), + core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), + lpclass.param().abi(), + core::mem::transmute(dwoptions), + core::mem::transmute(samdesired), + core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phkresult), + core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed())), + core::mem::transmute(htransaction), + core::mem::transmute(pextendedparemeter.unwrap_or(core::mem::zeroed())), + ) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegCreateKeyTransactedW(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P3, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: Option<*mut REG_CREATE_KEY_DISPOSITION>, htransaction: P9, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyTransactedW(hkey: HKEY, lpsubkey: P1, reserved: Option, lpclass: P3, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: Option<*mut REG_CREATE_KEY_DISPOSITION>, htransaction: super::super::Foundation::HANDLE, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, - P9: 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(), core::mem::transmute(reserved), lpclass.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut())), htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(core::ptr::null()))) + RegCreateKeyTransactedW( + core::mem::transmute(hkey), + lpsubkey.param().abi(), + core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), + lpclass.param().abi(), + core::mem::transmute(dwoptions), + core::mem::transmute(samdesired), + core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(phkresult), + core::mem::transmute(lpdwdisposition.unwrap_or(core::mem::zeroed())), + core::mem::transmute(htransaction), + core::mem::transmute(pextendedparemeter.unwrap_or(core::mem::zeroed())), + ) } #[inline] -pub unsafe fn RegCreateKeyW(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyW(hkey: HKEY, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCreateKeyW(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(phkresult)) + RegCreateKeyW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegDeleteKeyA(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyA(hkey: HKEY, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyA(hkey : HKEY, lpsubkey : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyA(hkey.param().abi(), lpsubkey.param().abi()) + RegDeleteKeyA(core::mem::transmute(hkey), lpsubkey.param().abi()) } #[inline] -pub unsafe fn RegDeleteKeyExA(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyExA(hkey: HKEY, lpsubkey: P1, samdesired: u32, reserved: Option) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyExA(hkey : HKEY, lpsubkey : windows_core::PCSTR, samdesired : u32, reserved : u32) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyExA(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(reserved)) + RegDeleteKeyExA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegDeleteKeyExW(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyExW(hkey: HKEY, lpsubkey: P1, samdesired: u32, reserved: Option) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyExW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, samdesired : u32, reserved : u32) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyExW(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(reserved)) + RegDeleteKeyExW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegDeleteKeyTransactedA(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32, htransaction: P4, pextendedparameter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyTransactedA(hkey: HKEY, lpsubkey: P1, samdesired: u32, reserved: Option, htransaction: super::super::Foundation::HANDLE, pextendedparameter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P4: 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(), core::mem::transmute(samdesired), core::mem::transmute(reserved), htransaction.param().abi(), core::mem::transmute(pextendedparameter.unwrap_or(core::ptr::null()))) + RegDeleteKeyTransactedA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction), core::mem::transmute(pextendedparameter.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegDeleteKeyTransactedW(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32, htransaction: P4, pextendedparameter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyTransactedW(hkey: HKEY, lpsubkey: P1, samdesired: u32, reserved: Option, htransaction: super::super::Foundation::HANDLE, pextendedparameter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P4: 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(), core::mem::transmute(samdesired), core::mem::transmute(reserved), htransaction.param().abi(), core::mem::transmute(pextendedparameter.unwrap_or(core::ptr::null()))) + RegDeleteKeyTransactedW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(htransaction), core::mem::transmute(pextendedparameter.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegDeleteKeyValueA(hkey: P0, lpsubkey: P1, lpvaluename: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyValueA(hkey: HKEY, lpsubkey: P1, lpvaluename: P2) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyValueA(hkey : HKEY, lpsubkey : windows_core::PCSTR, lpvaluename : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyValueA(hkey.param().abi(), lpsubkey.param().abi(), lpvaluename.param().abi()) + RegDeleteKeyValueA(core::mem::transmute(hkey), lpsubkey.param().abi(), lpvaluename.param().abi()) } #[inline] -pub unsafe fn RegDeleteKeyValueW(hkey: P0, lpsubkey: P1, lpvaluename: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyValueW(hkey: HKEY, lpsubkey: P1, lpvaluename: P2) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyValueW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, lpvaluename : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyValueW(hkey.param().abi(), lpsubkey.param().abi(), lpvaluename.param().abi()) + RegDeleteKeyValueW(core::mem::transmute(hkey), lpsubkey.param().abi(), lpvaluename.param().abi()) } #[inline] -pub unsafe fn RegDeleteKeyW(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyW(hkey: HKEY, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyW(hkey : HKEY, lpsubkey : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyW(hkey.param().abi(), lpsubkey.param().abi()) + RegDeleteKeyW(core::mem::transmute(hkey), lpsubkey.param().abi()) } #[inline] -pub unsafe fn RegDeleteTreeA(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteTreeA(hkey: HKEY, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteTreeA(hkey : HKEY, lpsubkey : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteTreeA(hkey.param().abi(), lpsubkey.param().abi()) + RegDeleteTreeA(core::mem::transmute(hkey), lpsubkey.param().abi()) } #[inline] -pub unsafe fn RegDeleteTreeW(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteTreeW(hkey: HKEY, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteTreeW(hkey : HKEY, lpsubkey : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteTreeW(hkey.param().abi(), lpsubkey.param().abi()) + RegDeleteTreeW(core::mem::transmute(hkey), lpsubkey.param().abi()) } #[inline] -pub unsafe fn RegDeleteValueA(hkey: P0, lpvaluename: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteValueA(hkey: HKEY, lpvaluename: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteValueA(hkey : HKEY, lpvaluename : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteValueA(hkey.param().abi(), lpvaluename.param().abi()) + RegDeleteValueA(core::mem::transmute(hkey), lpvaluename.param().abi()) } #[inline] -pub unsafe fn RegDeleteValueW(hkey: P0, lpvaluename: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteValueW(hkey: HKEY, lpvaluename: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegDeleteValueW(hkey : HKEY, lpvaluename : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteValueW(hkey.param().abi(), lpvaluename.param().abi()) + RegDeleteValueW(core::mem::transmute(hkey), lpvaluename.param().abi()) } #[inline] pub unsafe fn RegDisablePredefinedCache() -> super::super::Foundation::WIN32_ERROR { @@ -261,172 +250,134 @@ pub unsafe fn RegDisablePredefinedCacheEx() -> super::super::Foundation::WIN32_E RegDisablePredefinedCacheEx() } #[inline] -pub unsafe fn RegDisableReflectionKey(hbase: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegDisableReflectionKey(hbase: HKEY) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegDisableReflectionKey(hbase : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegDisableReflectionKey(hbase.param().abi()) + RegDisableReflectionKey(core::mem::transmute(hbase)) } #[inline] -pub unsafe fn RegEnableReflectionKey(hbase: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegEnableReflectionKey(hbase: HKEY) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegEnableReflectionKey(hbase : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegEnableReflectionKey(hbase.param().abi()) + RegEnableReflectionKey(core::mem::transmute(hbase)) } #[inline] -pub unsafe fn RegEnumKeyA(hkey: P0, dwindex: u32, lpname: Option<&mut [u8]>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegEnumKeyA(hkey: HKEY, dwindex: u32, lpname: Option<&mut [u8]>) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyA(hkey : HKEY, dwindex : u32, lpname : windows_core::PSTR, cchname : u32) -> super::super::Foundation:: WIN32_ERROR); - RegEnumKeyA(hkey.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + RegEnumKeyA(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn RegEnumKeyExA(hkey: P0, dwindex: u32, lpname: windows_core::PSTR, lpcchname: *mut u32, lpreserved: Option<*const u32>, lpclass: windows_core::PSTR, lpcchclass: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegEnumKeyExA(hkey: HKEY, dwindex: u32, lpname: Option, lpcchname: *mut u32, lpreserved: Option<*const u32>, lpclass: Option, lpcchclass: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpname), core::mem::transmute(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()))) + RegEnumKeyExA(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(lpname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchname), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpftlastwritetime.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn RegEnumKeyExW(hkey: HKEY, dwindex: u32, lpname: Option, lpcchname: *mut u32, lpreserved: Option<*const u32>, lpclass: Option, lpcchclass: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpname), core::mem::transmute(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()))) + RegEnumKeyExW(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(lpname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchname), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpftlastwritetime.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegEnumKeyW(hkey: P0, dwindex: u32, lpname: Option<&mut [u16]>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegEnumKeyW(hkey: HKEY, dwindex: u32, lpname: Option<&mut [u16]>) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyW(hkey : HKEY, dwindex : u32, lpname : windows_core::PWSTR, cchname : u32) -> super::super::Foundation:: WIN32_ERROR); - RegEnumKeyW(hkey.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + RegEnumKeyW(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(lpname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn RegEnumValueA(hkey: P0, dwindex: u32, lpvaluename: windows_core::PSTR, lpcchvaluename: *mut u32, lpreserved: Option<*const u32>, lptype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegEnumValueA(hkey: HKEY, dwindex: u32, lpvaluename: Option, lpcchvaluename: *mut u32, lpreserved: Option<*const u32>, lptype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpvaluename), core::mem::transmute(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()))) + RegEnumValueA(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(lpvaluename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchvaluename), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, -{ +pub unsafe fn RegEnumValueW(hkey: HKEY, dwindex: u32, lpvaluename: Option, lpcchvaluename: *mut u32, lpreserved: Option<*const u32>, lptype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpvaluename), core::mem::transmute(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()))) + RegEnumValueW(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(lpvaluename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchvaluename), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegFlushKey(hkey: P0) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegFlushKey(hkey: HKEY) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegFlushKey(hkey : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegFlushKey(hkey.param().abi()) + RegFlushKey(core::mem::transmute(hkey)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegGetKeySecurity(hkey: P0, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegGetKeySecurity(hkey: HKEY, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: Option, lpcbsecuritydescriptor: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegGetKeySecurity(hkey : HKEY, securityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegGetKeySecurity(hkey.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(lpcbsecuritydescriptor)) + RegGetKeySecurity(core::mem::transmute(hkey), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbsecuritydescriptor)) } #[inline] -pub unsafe fn RegGetValueA(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 +pub unsafe fn RegGetValueA(hkey: HKEY, 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 where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(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()))) + RegGetValueA(core::mem::transmute(hkey), lpsubkey.param().abi(), lpvalue.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn RegGetValueW(hkey: HKEY, 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 where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(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()))) + RegGetValueW(core::mem::transmute(hkey), lpsubkey.param().abi(), lpvalue.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegLoadAppKeyA(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadAppKeyA(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: Option) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegLoadAppKeyA(lpfile : windows_core::PCSTR, phkresult : *mut HKEY, samdesired : u32, dwoptions : u32, reserved : u32) -> super::super::Foundation:: WIN32_ERROR); - RegLoadAppKeyA(lpfile.param().abi(), core::mem::transmute(phkresult), core::mem::transmute(samdesired), core::mem::transmute(dwoptions), core::mem::transmute(reserved)) + RegLoadAppKeyA(lpfile.param().abi(), core::mem::transmute(phkresult), core::mem::transmute(samdesired), core::mem::transmute(dwoptions), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegLoadAppKeyW(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadAppKeyW(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: Option) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegLoadAppKeyW(lpfile : windows_core::PCWSTR, phkresult : *mut HKEY, samdesired : u32, dwoptions : u32, reserved : u32) -> super::super::Foundation:: WIN32_ERROR); - RegLoadAppKeyW(lpfile.param().abi(), core::mem::transmute(phkresult), core::mem::transmute(samdesired), core::mem::transmute(dwoptions), core::mem::transmute(reserved)) + RegLoadAppKeyW(lpfile.param().abi(), core::mem::transmute(phkresult), core::mem::transmute(samdesired), core::mem::transmute(dwoptions), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegLoadKeyA(hkey: P0, lpsubkey: P1, lpfile: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadKeyA(hkey: HKEY, lpsubkey: P1, lpfile: P2) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegLoadKeyA(hkey : HKEY, lpsubkey : windows_core::PCSTR, lpfile : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegLoadKeyA(hkey.param().abi(), lpsubkey.param().abi(), lpfile.param().abi()) + RegLoadKeyA(core::mem::transmute(hkey), lpsubkey.param().abi(), lpfile.param().abi()) } #[inline] -pub unsafe fn RegLoadKeyW(hkey: P0, lpsubkey: P1, lpfile: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadKeyW(hkey: HKEY, lpsubkey: P1, lpfile: P2) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegLoadKeyW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, lpfile : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegLoadKeyW(hkey.param().abi(), lpsubkey.param().abi(), lpfile.param().abi()) + RegLoadKeyW(core::mem::transmute(hkey), lpsubkey.param().abi(), lpfile.param().abi()) } #[inline] -pub unsafe fn RegLoadMUIStringA(hkey: P0, pszvalue: P1, pszoutbuf: Option<&mut [u8]>, pcbdata: Option<*mut u32>, flags: u32, pszdirectory: P6) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadMUIStringA(hkey: HKEY, pszvalue: P1, pszoutbuf: Option<&mut [u8]>, pcbdata: Option<*mut u32>, flags: u32, pszdirectory: P6) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P6: 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(core::ptr::null_mut())), core::mem::transmute(flags), pszdirectory.param().abi()) + RegLoadMUIStringA(core::mem::transmute(hkey), 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::mem::zeroed())), core::mem::transmute(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: P6) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadMUIStringW(hkey: HKEY, pszvalue: P1, pszoutbuf: Option, cboutbuf: u32, pcbdata: Option<*mut u32>, flags: u32, pszdirectory: P6) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P6: 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), core::mem::transmute(cboutbuf), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags), pszdirectory.param().abi()) + RegLoadMUIStringW(core::mem::transmute(hkey), pszvalue.param().abi(), core::mem::transmute(pszoutbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuf), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), pszdirectory.param().abi()) } #[inline] -pub unsafe fn RegNotifyChangeKeyValue(hkey: P0, bwatchsubtree: P1, dwnotifyfilter: REG_NOTIFY_FILTER, hevent: P3, fasynchronous: P4) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegNotifyChangeKeyValue(hkey: HKEY, bwatchsubtree: P1, dwnotifyfilter: REG_NOTIFY_FILTER, hevent: Option, fasynchronous: P4) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegNotifyChangeKeyValue(hkey : HKEY, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : REG_NOTIFY_FILTER, hevent : super::super::Foundation:: HANDLE, fasynchronous : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - RegNotifyChangeKeyValue(hkey.param().abi(), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), hevent.param().abi(), fasynchronous.param().abi()) + RegNotifyChangeKeyValue(core::mem::transmute(hkey), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), fasynchronous.param().abi()) } #[inline] pub unsafe fn RegOpenCurrentUser(samdesired: u32, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR { @@ -434,354 +385,299 @@ pub unsafe fn RegOpenCurrentUser(samdesired: u32, phkresult: *mut HKEY) -> super RegOpenCurrentUser(core::mem::transmute(samdesired), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegOpenKeyA(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyA(hkey: HKEY, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyA(hkey : HKEY, lpsubkey : windows_core::PCSTR, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyA(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(phkresult)) + RegOpenKeyA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegOpenKeyExA(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyExA(hkey: HKEY, lpsubkey: P1, uloptions: Option, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyExA(hkey : HKEY, lpsubkey : windows_core::PCSTR, uloptions : u32, samdesired : REG_SAM_FLAGS, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyExA(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(uloptions), core::mem::transmute(samdesired), core::mem::transmute(phkresult)) + RegOpenKeyExA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(uloptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegOpenKeyExW(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyExW(hkey: HKEY, lpsubkey: P1, uloptions: Option, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyExW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, uloptions : u32, samdesired : REG_SAM_FLAGS, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyExW(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(uloptions), core::mem::transmute(samdesired), core::mem::transmute(phkresult)) + RegOpenKeyExW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(uloptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegOpenKeyTransactedA(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: P5, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyTransactedA(hkey: HKEY, lpsubkey: P1, uloptions: Option, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: super::super::Foundation::HANDLE, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P5: 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(), core::mem::transmute(uloptions), core::mem::transmute(samdesired), core::mem::transmute(phkresult), htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(core::ptr::null()))) + RegOpenKeyTransactedA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(uloptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(phkresult), core::mem::transmute(htransaction), core::mem::transmute(pextendedparemeter.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegOpenKeyTransactedW(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: P5, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyTransactedW(hkey: HKEY, lpsubkey: P1, uloptions: Option, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: super::super::Foundation::HANDLE, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P5: 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(), core::mem::transmute(uloptions), core::mem::transmute(samdesired), core::mem::transmute(phkresult), htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(core::ptr::null()))) + RegOpenKeyTransactedW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(uloptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(phkresult), core::mem::transmute(htransaction), core::mem::transmute(pextendedparemeter.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegOpenKeyW(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyW(hkey: HKEY, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyW(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(phkresult)) + RegOpenKeyW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegOpenUserClassesRoot(htoken: P0, dwoptions: u32, samdesired: u32, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegOpenUserClassesRoot(htoken: super::super::Foundation::HANDLE, dwoptions: Option, samdesired: u32, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegOpenUserClassesRoot(htoken : super::super::Foundation:: HANDLE, dwoptions : u32, samdesired : u32, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenUserClassesRoot(htoken.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(phkresult)) + RegOpenUserClassesRoot(core::mem::transmute(htoken), core::mem::transmute(dwoptions.unwrap_or(core::mem::zeroed())), core::mem::transmute(samdesired), core::mem::transmute(phkresult)) } #[inline] -pub unsafe fn RegOverridePredefKey(hkey: P0, hnewhkey: P1) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn RegOverridePredefKey(hkey: HKEY, hnewhkey: Option) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegOverridePredefKey(hkey : HKEY, hnewhkey : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOverridePredefKey(hkey.param().abi(), hnewhkey.param().abi()) + RegOverridePredefKey(core::mem::transmute(hkey), core::mem::transmute(hnewhkey.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegQueryInfoKeyA(hkey: P0, lpclass: windows_core::PSTR, lpcchclass: Option<*mut u32>, lpreserved: Option<*const u32>, lpcsubkeys: Option<*mut u32>, lpcbmaxsubkeylen: Option<*mut u32>, lpcbmaxclasslen: Option<*mut u32>, lpcvalues: Option<*mut u32>, lpcbmaxvaluenamelen: Option<*mut u32>, lpcbmaxvaluelen: Option<*mut u32>, lpcbsecuritydescriptor: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegQueryInfoKeyA(hkey: HKEY, lpclass: Option, lpcchclass: Option<*mut u32>, lpreserved: Option<*const u32>, lpcsubkeys: Option<*mut u32>, lpcbmaxsubkeylen: Option<*mut u32>, lpcbmaxclasslen: Option<*mut u32>, lpcvalues: Option<*mut u32>, lpcbmaxvaluenamelen: Option<*mut u32>, lpcbmaxvaluelen: Option<*mut u32>, lpcbsecuritydescriptor: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegQueryInfoKeyA(hkey : HKEY, lpclass : windows_core::PSTR, lpcchclass : *mut u32, lpreserved : *const u32, lpcsubkeys : *mut u32, lpcbmaxsubkeylen : *mut u32, lpcbmaxclasslen : *mut u32, lpcvalues : *mut u32, lpcbmaxvaluenamelen : *mut u32, lpcbmaxvaluelen : *mut u32, lpcbsecuritydescriptor : *mut u32, lpftlastwritetime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: WIN32_ERROR); RegQueryInfoKeyA( - hkey.param().abi(), - core::mem::transmute(lpclass), - 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())), + core::mem::transmute(hkey), + core::mem::transmute(lpclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcchclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcsubkeys.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbmaxsubkeylen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbmaxclasslen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcvalues.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbmaxvaluenamelen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbmaxvaluelen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpftlastwritetime.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn RegQueryInfoKeyW(hkey: P0, lpclass: windows_core::PWSTR, lpcchclass: Option<*mut u32>, lpreserved: Option<*const u32>, lpcsubkeys: Option<*mut u32>, lpcbmaxsubkeylen: Option<*mut u32>, lpcbmaxclasslen: Option<*mut u32>, lpcvalues: Option<*mut u32>, lpcbmaxvaluenamelen: Option<*mut u32>, lpcbmaxvaluelen: Option<*mut u32>, lpcbsecuritydescriptor: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegQueryInfoKeyW(hkey: HKEY, lpclass: Option, lpcchclass: Option<*mut u32>, lpreserved: Option<*const u32>, lpcsubkeys: Option<*mut u32>, lpcbmaxsubkeylen: Option<*mut u32>, lpcbmaxclasslen: Option<*mut u32>, lpcvalues: Option<*mut u32>, lpcbmaxvaluenamelen: Option<*mut u32>, lpcbmaxvaluelen: Option<*mut u32>, lpcbsecuritydescriptor: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegQueryInfoKeyW(hkey : HKEY, lpclass : windows_core::PWSTR, lpcchclass : *mut u32, lpreserved : *const u32, lpcsubkeys : *mut u32, lpcbmaxsubkeylen : *mut u32, lpcbmaxclasslen : *mut u32, lpcvalues : *mut u32, lpcbmaxvaluenamelen : *mut u32, lpcbmaxvaluelen : *mut u32, lpcbsecuritydescriptor : *mut u32, lpftlastwritetime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: WIN32_ERROR); RegQueryInfoKeyW( - hkey.param().abi(), - core::mem::transmute(lpclass), - 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())), + core::mem::transmute(hkey), + core::mem::transmute(lpclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcchclass.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcsubkeys.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbmaxsubkeylen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbmaxclasslen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcvalues.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbmaxvaluenamelen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbmaxvaluelen.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpftlastwritetime.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn RegQueryMultipleValuesA(hkey: P0, val_list: &mut [VALENTA], lpvaluebuf: windows_core::PSTR, ldwtotsize: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegQueryMultipleValuesA(hkey: HKEY, val_list: &mut [VALENTA], lpvaluebuf: Option, ldwtotsize: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut()))) + RegQueryMultipleValuesA(core::mem::transmute(hkey), core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(ldwtotsize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegQueryMultipleValuesW(hkey: P0, val_list: &mut [VALENTW], lpvaluebuf: windows_core::PWSTR, ldwtotsize: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegQueryMultipleValuesW(hkey: HKEY, val_list: &mut [VALENTW], lpvaluebuf: Option, ldwtotsize: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut()))) + RegQueryMultipleValuesW(core::mem::transmute(hkey), core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), core::mem::transmute(lpvaluebuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(ldwtotsize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegQueryReflectionKey(hbase: P0, bisreflectiondisabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn RegQueryReflectionKey(hbase: HKEY, bisreflectiondisabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegQueryReflectionKey(hbase : HKEY, bisreflectiondisabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - RegQueryReflectionKey(hbase.param().abi(), core::mem::transmute(bisreflectiondisabled)) + RegQueryReflectionKey(core::mem::transmute(hbase), core::mem::transmute(bisreflectiondisabled)) } #[inline] -pub unsafe fn RegQueryValueA(hkey: P0, lpsubkey: P1, lpdata: windows_core::PSTR, lpcbdata: Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryValueA(hkey: HKEY, lpsubkey: P1, lpdata: Option, lpcbdata: Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + RegQueryValueA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn RegQueryValueExA(hkey: HKEY, 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 where - P0: windows_core::Param, 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(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()))) + RegQueryValueExA(core::mem::transmute(hkey), lpvaluename.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn RegQueryValueExW(hkey: HKEY, 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 where - P0: windows_core::Param, 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(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()))) + RegQueryValueExW(core::mem::transmute(hkey), lpvaluename.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegQueryValueW(hkey: P0, lpsubkey: P1, lpdata: windows_core::PWSTR, lpcbdata: Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryValueW(hkey: HKEY, lpsubkey: P1, lpdata: Option, lpcbdata: Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + RegQueryValueW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegRenameKey(hkey: P0, lpsubkeyname: P1, lpnewkeyname: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegRenameKey(hkey: HKEY, lpsubkeyname: P1, lpnewkeyname: P2) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegRenameKey(hkey : HKEY, lpsubkeyname : windows_core::PCWSTR, lpnewkeyname : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegRenameKey(hkey.param().abi(), lpsubkeyname.param().abi(), lpnewkeyname.param().abi()) + RegRenameKey(core::mem::transmute(hkey), lpsubkeyname.param().abi(), lpnewkeyname.param().abi()) } #[inline] -pub unsafe fn RegReplaceKeyA(hkey: P0, lpsubkey: P1, lpnewfile: P2, lpoldfile: P3) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegReplaceKeyA(hkey: HKEY, lpsubkey: P1, lpnewfile: P2, lpoldfile: P3) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegReplaceKeyA(hkey : HKEY, lpsubkey : windows_core::PCSTR, lpnewfile : windows_core::PCSTR, lpoldfile : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegReplaceKeyA(hkey.param().abi(), lpsubkey.param().abi(), lpnewfile.param().abi(), lpoldfile.param().abi()) + RegReplaceKeyA(core::mem::transmute(hkey), lpsubkey.param().abi(), lpnewfile.param().abi(), lpoldfile.param().abi()) } #[inline] -pub unsafe fn RegReplaceKeyW(hkey: P0, lpsubkey: P1, lpnewfile: P2, lpoldfile: P3) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegReplaceKeyW(hkey: HKEY, lpsubkey: P1, lpnewfile: P2, lpoldfile: P3) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegReplaceKeyW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, lpnewfile : windows_core::PCWSTR, lpoldfile : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegReplaceKeyW(hkey.param().abi(), lpsubkey.param().abi(), lpnewfile.param().abi(), lpoldfile.param().abi()) + RegReplaceKeyW(core::mem::transmute(hkey), lpsubkey.param().abi(), lpnewfile.param().abi(), lpoldfile.param().abi()) } #[inline] -pub unsafe fn RegRestoreKeyA(hkey: P0, lpfile: P1, dwflags: REG_RESTORE_KEY_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegRestoreKeyA(hkey: HKEY, lpfile: P1, dwflags: REG_RESTORE_KEY_FLAGS) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegRestoreKeyA(hkey : HKEY, lpfile : windows_core::PCSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - RegRestoreKeyA(hkey.param().abi(), lpfile.param().abi(), dwflags.0 as _) + RegRestoreKeyA(core::mem::transmute(hkey), lpfile.param().abi(), dwflags.0 as _) } #[inline] -pub unsafe fn RegRestoreKeyW(hkey: P0, lpfile: P1, dwflags: REG_RESTORE_KEY_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegRestoreKeyW(hkey: HKEY, lpfile: P1, dwflags: REG_RESTORE_KEY_FLAGS) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegRestoreKeyW(hkey : HKEY, lpfile : windows_core::PCWSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - RegRestoreKeyW(hkey.param().abi(), lpfile.param().abi(), dwflags.0 as _) + RegRestoreKeyW(core::mem::transmute(hkey), lpfile.param().abi(), dwflags.0 as _) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegSaveKeyA(hkey: P0, lpfile: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSaveKeyA(hkey: HKEY, lpfile: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, 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(core::ptr::null()))) + RegSaveKeyA(core::mem::transmute(hkey), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegSaveKeyExA(hkey: P0, lpfile: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: REG_SAVE_FORMAT) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSaveKeyExA(hkey: HKEY, lpfile: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: REG_SAVE_FORMAT) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(flags)) + RegSaveKeyExA(core::mem::transmute(hkey), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegSaveKeyExW(hkey: P0, lpfile: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: REG_SAVE_FORMAT) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSaveKeyExW(hkey: HKEY, lpfile: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: REG_SAVE_FORMAT) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(flags)) + RegSaveKeyExW(core::mem::transmute(hkey), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegSaveKeyW(hkey: P0, lpfile: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSaveKeyW(hkey: HKEY, lpfile: P1, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, 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(core::ptr::null()))) + RegSaveKeyW(core::mem::transmute(hkey), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RegSetKeySecurity(hkey: P0, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P2) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn RegSetKeySecurity(hkey: HKEY, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegSetKeySecurity(hkey : HKEY, securityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - RegSetKeySecurity(hkey.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()) + RegSetKeySecurity(core::mem::transmute(hkey), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)) } #[inline] -pub unsafe fn RegSetKeyValueA(hkey: P0, lpsubkey: P1, lpvaluename: P2, dwtype: u32, lpdata: Option<*const core::ffi::c_void>, cbdata: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetKeyValueA(hkey: HKEY, lpsubkey: P1, lpvaluename: P2, dwtype: u32, lpdata: Option<*const core::ffi::c_void>, cbdata: u32) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(dwtype), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata)) + RegSetKeyValueA(core::mem::transmute(hkey), lpsubkey.param().abi(), lpvaluename.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +pub unsafe fn RegSetKeyValueW(hkey: HKEY, lpsubkey: P1, lpvaluename: P2, dwtype: u32, lpdata: Option<*const core::ffi::c_void>, cbdata: u32) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(dwtype), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata)) + RegSetKeyValueW(core::mem::transmute(hkey), lpsubkey.param().abi(), lpvaluename.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata)) } #[inline] -pub unsafe fn RegSetValueA(hkey: P0, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetValueA(hkey: HKEY, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSetValueA(hkey : HKEY, lpsubkey : windows_core::PCSTR, dwtype : REG_VALUE_TYPE, lpdata : windows_core::PCSTR, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueA(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + RegSetValueA(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn RegSetValueExA(hkey: P0, lpvaluename: P1, reserved: u32, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetValueExA(hkey: HKEY, lpvaluename: P1, reserved: Option, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSetValueExA(hkey : HKEY, lpvaluename : windows_core::PCSTR, reserved : u32, dwtype : REG_VALUE_TYPE, lpdata : *const u8, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueExA(hkey.param().abi(), lpvaluename.param().abi(), core::mem::transmute(reserved), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + RegSetValueExA(core::mem::transmute(hkey), lpvaluename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn RegSetValueExW(hkey: P0, lpvaluename: P1, reserved: u32, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetValueExW(hkey: HKEY, lpvaluename: P1, reserved: Option, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSetValueExW(hkey : HKEY, lpvaluename : windows_core::PCWSTR, reserved : u32, dwtype : REG_VALUE_TYPE, lpdata : *const u8, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueExW(hkey.param().abi(), lpvaluename.param().abi(), core::mem::transmute(reserved), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + RegSetValueExW(core::mem::transmute(hkey), lpvaluename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn RegSetValueW(hkey: P0, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: P3, cbdata: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetValueW(hkey: HKEY, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: P3, cbdata: u32) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegSetValueW(hkey : HKEY, lpsubkey : windows_core::PCWSTR, dwtype : REG_VALUE_TYPE, lpdata : windows_core::PCWSTR, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueW(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(dwtype), lpdata.param().abi(), core::mem::transmute(cbdata)) + RegSetValueW(core::mem::transmute(hkey), lpsubkey.param().abi(), core::mem::transmute(dwtype), lpdata.param().abi(), core::mem::transmute(cbdata)) } #[inline] -pub unsafe fn RegUnLoadKeyA(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegUnLoadKeyA(hkey: HKEY, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegUnLoadKeyA(hkey : HKEY, lpsubkey : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegUnLoadKeyA(hkey.param().abi(), lpsubkey.param().abi()) + RegUnLoadKeyA(core::mem::transmute(hkey), lpsubkey.param().abi()) } #[inline] -pub unsafe fn RegUnLoadKeyW(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegUnLoadKeyW(hkey: HKEY, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegUnLoadKeyW(hkey : HKEY, lpsubkey : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegUnLoadKeyW(hkey.param().abi(), lpsubkey.param().abi()) + RegUnLoadKeyW(core::mem::transmute(hkey), lpsubkey.param().abi()) } pub const AGP_FLAG_NO_1X_RATE: i32 = 1i32; pub const AGP_FLAG_NO_2X_RATE: i32 = 2i32; 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 f05b18ed15..a804d5f84e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs @@ -4,12 +4,9 @@ pub unsafe fn ProcessIdToSessionId(dwprocessid: u32, psessionid: *mut u32) -> wi ProcessIdToSessionId(core::mem::transmute(dwprocessid), core::mem::transmute(psessionid)).ok() } #[inline] -pub unsafe fn WTSCloseServer(hserver: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn WTSCloseServer(hserver: super::super::Foundation::HANDLE) { windows_targets::link!("wtsapi32.dll" "system" fn WTSCloseServer(hserver : super::super::Foundation:: HANDLE)); - WTSCloseServer(hserver.param().abi()) + WTSCloseServer(core::mem::transmute(hserver)) } #[inline] pub unsafe fn WTSConnectSessionA(logonid: u32, targetlogonid: u32, ppassword: P2, bwait: P3) -> windows_core::Result<()> @@ -30,31 +27,28 @@ where WTSConnectSessionW(core::mem::transmute(logonid), core::mem::transmute(targetlogonid), ppassword.param().abi(), bwait.param().abi()).ok() } #[inline] -pub unsafe fn WTSCreateListenerA(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *const WTSLISTENERCONFIGA, flag: u32) -> windows_core::Result<()> +pub unsafe fn WTSCreateListenerA(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *const WTSLISTENERCONFIGA, flag: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSCreateListenerA(hserver : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, reserved : u32, plistenername : windows_core::PCSTR, pbuffer : *const WTSLISTENERCONFIGA, flag : u32) -> super::super::Foundation:: BOOL); - WTSCreateListenerA(hserver.param().abi(), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer), core::mem::transmute(flag)).ok() + WTSCreateListenerA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer), core::mem::transmute(flag)).ok() } #[inline] -pub unsafe fn WTSCreateListenerW(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *const WTSLISTENERCONFIGW, flag: u32) -> windows_core::Result<()> +pub unsafe fn WTSCreateListenerW(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *const WTSLISTENERCONFIGW, flag: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSCreateListenerW(hserver : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, reserved : u32, plistenername : windows_core::PCWSTR, pbuffer : *const WTSLISTENERCONFIGW, flag : u32) -> super::super::Foundation:: BOOL); - WTSCreateListenerW(hserver.param().abi(), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer), core::mem::transmute(flag)).ok() + WTSCreateListenerW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer), core::mem::transmute(flag)).ok() } #[inline] -pub unsafe fn WTSDisconnectSession(hserver: P0, sessionid: u32, bwait: P2) -> windows_core::Result<()> +pub unsafe fn WTSDisconnectSession(hserver: Option, sessionid: u32, bwait: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSDisconnectSession(hserver : super::super::Foundation:: HANDLE, sessionid : u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSDisconnectSession(hserver.param().abi(), core::mem::transmute(sessionid), bwait.param().abi()).ok() + WTSDisconnectSession(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), bwait.param().abi()).ok() } #[inline] pub unsafe fn WTSEnableChildSessions(benable: P0) -> super::super::Foundation::BOOL @@ -65,54 +59,36 @@ where WTSEnableChildSessions(benable.param().abi()) } #[inline] -pub unsafe fn WTSEnumerateListenersA(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plisteners: Option<*mut *mut i8>, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateListenersA(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plisteners: Option<*mut *mut i8>, pcount: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(preserved), core::mem::transmute(reserved), core::mem::transmute(plisteners.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcount)).ok() + WTSEnumerateListenersA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), core::mem::transmute(plisteners.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateListenersW(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plisteners: Option<*mut *mut u16>, pcount: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(preserved), core::mem::transmute(reserved), core::mem::transmute(plisteners.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcount)).ok() + WTSEnumerateListenersW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), core::mem::transmute(plisteners.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcount)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn WTSEnumerateProcessesA(hserver: P0, reserved: u32, version: u32, ppprocessinfo: *mut *mut WTS_PROCESS_INFOA, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateProcessesA(hserver: Option, reserved: u32, version: u32, ppprocessinfo: *mut *mut WTS_PROCESS_INFOA, pcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateProcessesA(hserver : super::super::Foundation:: HANDLE, reserved : u32, version : u32, ppprocessinfo : *mut *mut WTS_PROCESS_INFOA, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateProcessesA(hserver.param().abi(), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() + WTSEnumerateProcessesA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() } #[inline] -pub unsafe fn WTSEnumerateProcessesExA(hserver: P0, plevel: *mut u32, sessionid: u32, ppprocessinfo: *mut windows_core::PSTR, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateProcessesExA(hserver: Option, plevel: *mut u32, sessionid: u32, ppprocessinfo: *mut windows_core::PSTR, pcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateProcessesExA(hserver : super::super::Foundation:: HANDLE, plevel : *mut u32, sessionid : u32, ppprocessinfo : *mut windows_core::PSTR, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateProcessesExA(hserver.param().abi(), core::mem::transmute(plevel), core::mem::transmute(sessionid), core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() + WTSEnumerateProcessesExA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevel), core::mem::transmute(sessionid), core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() } #[inline] -pub unsafe fn WTSEnumerateProcessesExW(hserver: P0, plevel: *mut u32, sessionid: u32, ppprocessinfo: *mut windows_core::PWSTR, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateProcessesExW(hserver: Option, plevel: *mut u32, sessionid: u32, ppprocessinfo: *mut windows_core::PWSTR, pcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateProcessesExW(hserver : super::super::Foundation:: HANDLE, plevel : *mut u32, sessionid : u32, ppprocessinfo : *mut windows_core::PWSTR, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateProcessesExW(hserver.param().abi(), core::mem::transmute(plevel), core::mem::transmute(sessionid), core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() + WTSEnumerateProcessesExW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevel), core::mem::transmute(sessionid), core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn WTSEnumerateProcessesW(hserver: P0, reserved: u32, version: u32, ppprocessinfo: *mut *mut WTS_PROCESS_INFOW, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateProcessesW(hserver: Option, reserved: u32, version: u32, ppprocessinfo: *mut *mut WTS_PROCESS_INFOW, pcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateProcessesW(hserver : super::super::Foundation:: HANDLE, reserved : u32, version : u32, ppprocessinfo : *mut *mut WTS_PROCESS_INFOW, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateProcessesW(hserver.param().abi(), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() + WTSEnumerateProcessesW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppprocessinfo), core::mem::transmute(pcount)).ok() } #[inline] pub unsafe fn WTSEnumerateServersA(pdomainname: P0, reserved: u32, version: u32, ppserverinfo: *mut *mut WTS_SERVER_INFOA, pcount: *mut u32) -> windows_core::Result<()> @@ -131,36 +107,24 @@ where WTSEnumerateServersW(pdomainname.param().abi(), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppserverinfo), core::mem::transmute(pcount)).ok() } #[inline] -pub unsafe fn WTSEnumerateSessionsA(hserver: P0, reserved: u32, version: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFOA, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateSessionsA(hserver: Option, reserved: u32, version: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFOA, pcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateSessionsA(hserver : super::super::Foundation:: HANDLE, reserved : u32, version : u32, ppsessioninfo : *mut *mut WTS_SESSION_INFOA, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateSessionsA(hserver.param().abi(), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() + WTSEnumerateSessionsA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() } #[inline] -pub unsafe fn WTSEnumerateSessionsExA(hserver: P0, plevel: *mut u32, filter: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFO_1A, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateSessionsExA(hserver: Option, plevel: *mut u32, filter: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFO_1A, pcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateSessionsExA(hserver : super::super::Foundation:: HANDLE, plevel : *mut u32, filter : u32, ppsessioninfo : *mut *mut WTS_SESSION_INFO_1A, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateSessionsExA(hserver.param().abi(), core::mem::transmute(plevel), core::mem::transmute(filter), core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() + WTSEnumerateSessionsExA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevel), core::mem::transmute(filter), core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() } #[inline] -pub unsafe fn WTSEnumerateSessionsExW(hserver: P0, plevel: *mut u32, filter: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFO_1W, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateSessionsExW(hserver: Option, plevel: *mut u32, filter: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFO_1W, pcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateSessionsExW(hserver : super::super::Foundation:: HANDLE, plevel : *mut u32, filter : u32, ppsessioninfo : *mut *mut WTS_SESSION_INFO_1W, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateSessionsExW(hserver.param().abi(), core::mem::transmute(plevel), core::mem::transmute(filter), core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() + WTSEnumerateSessionsExW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevel), core::mem::transmute(filter), core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() } #[inline] -pub unsafe fn WTSEnumerateSessionsW(hserver: P0, reserved: u32, version: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFOW, pcount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnumerateSessionsW(hserver: Option, reserved: u32, version: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFOW, pcount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateSessionsW(hserver : super::super::Foundation:: HANDLE, reserved : u32, version : u32, ppsessioninfo : *mut *mut WTS_SESSION_INFOW, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateSessionsW(hserver.param().abi(), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() + WTSEnumerateSessionsW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved), core::mem::transmute(version), core::mem::transmute(ppsessioninfo), core::mem::transmute(pcount)).ok() } #[inline] pub unsafe fn WTSFreeMemory(pmemory: *mut core::ffi::c_void) { @@ -189,23 +153,21 @@ pub unsafe fn WTSGetChildSessionId(psessionid: *mut u32) -> super::super::Founda } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn WTSGetListenerSecurityA(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> +pub unsafe fn WTSGetListenerSecurityA(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: Option, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSGetListenerSecurityA(hserver : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, reserved : u32, plistenername : windows_core::PCSTR, securityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::super::Foundation:: BOOL); - WTSGetListenerSecurityA(hserver.param().abi(), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() + WTSGetListenerSecurityA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn WTSGetListenerSecurityW(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> +pub unsafe fn WTSGetListenerSecurityW(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: Option, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSGetListenerSecurityW(hserver : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, reserved : u32, plistenername : windows_core::PCWSTR, securityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::super::Foundation:: BOOL); - WTSGetListenerSecurityW(hserver.param().abi(), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() + WTSGetListenerSecurityW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded)).ok() } #[inline] pub unsafe fn WTSIsChildSessionsEnabled(pbenabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { @@ -213,13 +175,12 @@ pub unsafe fn WTSIsChildSessionsEnabled(pbenabled: *mut super::super::Foundation WTSIsChildSessionsEnabled(core::mem::transmute(pbenabled)) } #[inline] -pub unsafe fn WTSLogoffSession(hserver: P0, sessionid: u32, bwait: P2) -> windows_core::Result<()> +pub unsafe fn WTSLogoffSession(hserver: Option, sessionid: u32, bwait: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSLogoffSession(hserver : super::super::Foundation:: HANDLE, sessionid : u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSLogoffSession(hserver.param().abi(), core::mem::transmute(sessionid), bwait.param().abi()).ok() + WTSLogoffSession(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), bwait.param().abi()).ok() } #[inline] pub unsafe fn WTSOpenServerA(pservername: P0) -> super::super::Foundation::HANDLE @@ -254,38 +215,30 @@ where WTSOpenServerW(pservername.param().abi()) } #[inline] -pub unsafe fn WTSQueryListenerConfigA(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *mut WTSLISTENERCONFIGA) -> windows_core::Result<()> +pub unsafe fn WTSQueryListenerConfigA(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *mut WTSLISTENERCONFIGA) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryListenerConfigA(hserver : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, reserved : u32, plistenername : windows_core::PCSTR, pbuffer : *mut WTSLISTENERCONFIGA) -> super::super::Foundation:: BOOL); - WTSQueryListenerConfigA(hserver.param().abi(), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer)).ok() + WTSQueryListenerConfigA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer)).ok() } #[inline] -pub unsafe fn WTSQueryListenerConfigW(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *mut WTSLISTENERCONFIGW) -> windows_core::Result<()> +pub unsafe fn WTSQueryListenerConfigW(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *mut WTSLISTENERCONFIGW) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryListenerConfigW(hserver : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, reserved : u32, plistenername : windows_core::PCWSTR, pbuffer : *mut WTSLISTENERCONFIGW) -> super::super::Foundation:: BOOL); - WTSQueryListenerConfigW(hserver.param().abi(), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer)).ok() + WTSQueryListenerConfigW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer)).ok() } #[inline] -pub unsafe fn WTSQuerySessionInformationA(hserver: P0, sessionid: u32, wtsinfoclass: WTS_INFO_CLASS, ppbuffer: *mut windows_core::PSTR, pbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSQuerySessionInformationA(hserver: Option, sessionid: u32, wtsinfoclass: WTS_INFO_CLASS, ppbuffer: *mut windows_core::PSTR, pbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSQuerySessionInformationA(hserver : super::super::Foundation:: HANDLE, sessionid : u32, wtsinfoclass : WTS_INFO_CLASS, ppbuffer : *mut windows_core::PSTR, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - WTSQuerySessionInformationA(hserver.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(wtsinfoclass), core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() + WTSQuerySessionInformationA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), core::mem::transmute(wtsinfoclass), core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() } #[inline] -pub unsafe fn WTSQuerySessionInformationW(hserver: P0, sessionid: u32, wtsinfoclass: WTS_INFO_CLASS, ppbuffer: *mut windows_core::PWSTR, pbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSQuerySessionInformationW(hserver: Option, sessionid: u32, wtsinfoclass: WTS_INFO_CLASS, ppbuffer: *mut windows_core::PWSTR, pbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSQuerySessionInformationW(hserver : super::super::Foundation:: HANDLE, sessionid : u32, wtsinfoclass : WTS_INFO_CLASS, ppbuffer : *mut windows_core::PWSTR, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - WTSQuerySessionInformationW(hserver.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(wtsinfoclass), core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() + WTSQuerySessionInformationW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), core::mem::transmute(wtsinfoclass), core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() } #[inline] pub unsafe fn WTSQueryUserConfigA(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, ppbuffer: *mut windows_core::PSTR, pbytesreturned: *mut u32) -> windows_core::Result<()> @@ -311,73 +264,57 @@ pub unsafe fn WTSQueryUserToken(sessionid: u32, phtoken: *mut super::super::Foun WTSQueryUserToken(core::mem::transmute(sessionid), core::mem::transmute(phtoken)).ok() } #[inline] -pub unsafe fn WTSRegisterSessionNotification(hwnd: P0, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSRegisterSessionNotification(hwnd: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSRegisterSessionNotification(hwnd : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - WTSRegisterSessionNotification(hwnd.param().abi(), core::mem::transmute(dwflags)).ok() + WTSRegisterSessionNotification(core::mem::transmute(hwnd), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn WTSRegisterSessionNotificationEx(hserver: P0, hwnd: P1, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn WTSRegisterSessionNotificationEx(hserver: Option, hwnd: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSRegisterSessionNotificationEx(hserver : super::super::Foundation:: HANDLE, hwnd : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - WTSRegisterSessionNotificationEx(hserver.param().abi(), hwnd.param().abi(), core::mem::transmute(dwflags)).ok() + WTSRegisterSessionNotificationEx(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn WTSSendMessageA(hserver: P0, sessionid: u32, ptitle: &[u8], pmessage: &[u8], style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P9) -> windows_core::Result<()> +pub unsafe fn WTSSendMessageA(hserver: Option, sessionid: u32, ptitle: &[u8], pmessage: &[u8], style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P9) -> windows_core::Result<()> where - P0: windows_core::Param, P9: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSSendMessageA(hserver : super::super::Foundation:: HANDLE, sessionid : u32, ptitle : windows_core::PCSTR, titlelength : u32, pmessage : windows_core::PCSTR, messagelength : u32, style : super::super::UI::WindowsAndMessaging:: MESSAGEBOX_STYLE, timeout : u32, presponse : *mut super::super::UI::WindowsAndMessaging:: MESSAGEBOX_RESULT, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSSendMessageA(hserver.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(ptitle.as_ptr()), ptitle.len().try_into().unwrap(), core::mem::transmute(pmessage.as_ptr()), pmessage.len().try_into().unwrap(), core::mem::transmute(style), core::mem::transmute(timeout), core::mem::transmute(presponse), bwait.param().abi()).ok() + WTSSendMessageA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), core::mem::transmute(ptitle.as_ptr()), ptitle.len().try_into().unwrap(), core::mem::transmute(pmessage.as_ptr()), pmessage.len().try_into().unwrap(), core::mem::transmute(style), core::mem::transmute(timeout), core::mem::transmute(presponse), bwait.param().abi()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn WTSSendMessageW(hserver: P0, sessionid: u32, ptitle: P2, titlelength: u32, pmessage: P4, messagelength: u32, style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P9) -> windows_core::Result<()> +pub unsafe fn WTSSendMessageW(hserver: Option, sessionid: u32, ptitle: P2, titlelength: u32, pmessage: P4, messagelength: u32, style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P9) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, P9: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSSendMessageW(hserver : super::super::Foundation:: HANDLE, sessionid : u32, ptitle : windows_core::PCWSTR, titlelength : u32, pmessage : windows_core::PCWSTR, messagelength : u32, style : super::super::UI::WindowsAndMessaging:: MESSAGEBOX_STYLE, timeout : u32, presponse : *mut super::super::UI::WindowsAndMessaging:: MESSAGEBOX_RESULT, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSSendMessageW(hserver.param().abi(), core::mem::transmute(sessionid), ptitle.param().abi(), core::mem::transmute(titlelength), pmessage.param().abi(), core::mem::transmute(messagelength), core::mem::transmute(style), core::mem::transmute(timeout), core::mem::transmute(presponse), bwait.param().abi()).ok() + WTSSendMessageW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), ptitle.param().abi(), core::mem::transmute(titlelength), pmessage.param().abi(), core::mem::transmute(messagelength), core::mem::transmute(style), core::mem::transmute(timeout), core::mem::transmute(presponse), bwait.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn WTSSetListenerSecurityA(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P5) -> windows_core::Result<()> +pub unsafe fn WTSSetListenerSecurityA(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSSetListenerSecurityA(hserver : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, reserved : u32, plistenername : windows_core::PCSTR, securityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: BOOL); - WTSSetListenerSecurityA(hserver.param().abi(), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()).ok() + WTSSetListenerSecurityA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn WTSSetListenerSecurityW(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: P5) -> windows_core::Result<()> +pub unsafe fn WTSSetListenerSecurityW(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, securityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSSetListenerSecurityW(hserver : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, reserved : u32, plistenername : windows_core::PCWSTR, securityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: BOOL); - WTSSetListenerSecurityW(hserver.param().abi(), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(securityinformation), psecuritydescriptor.param().abi()).ok() + WTSSetListenerSecurityW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)).ok() } #[inline] -pub unsafe fn WTSSetRenderHint(prenderhintid: *mut u64, hwndowner: P1, renderhinttype: u32, phintdata: Option<&[u8]>) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn WTSSetRenderHint(prenderhintid: *mut u64, hwndowner: super::super::Foundation::HWND, renderhinttype: u32, phintdata: Option<&[u8]>) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSSetRenderHint(prenderhintid : *mut u64, hwndowner : super::super::Foundation:: HWND, renderhinttype : u32, cbhintdatalength : u32, phintdata : *const u8) -> windows_core::HRESULT); - WTSSetRenderHint(core::mem::transmute(prenderhintid), hwndowner.param().abi(), core::mem::transmute(renderhinttype), phintdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(phintdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + WTSSetRenderHint(core::mem::transmute(prenderhintid), core::mem::transmute(hwndowner), core::mem::transmute(renderhinttype), phintdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(phintdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[inline] pub unsafe fn WTSSetUserConfigA(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, pbuffer: &[u8]) -> windows_core::Result<()> @@ -399,12 +336,9 @@ where WTSSetUserConfigW(pservername.param().abi(), pusername.param().abi(), core::mem::transmute(wtsconfigclass), pbuffer.param().abi(), core::mem::transmute(datalength)).ok() } #[inline] -pub unsafe fn WTSShutdownSystem(hserver: P0, shutdownflag: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSShutdownSystem(hserver: Option, shutdownflag: u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSShutdownSystem(hserver : super::super::Foundation:: HANDLE, shutdownflag : u32) -> super::super::Foundation:: BOOL); - WTSShutdownSystem(hserver.param().abi(), core::mem::transmute(shutdownflag)).ok() + WTSShutdownSystem(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(shutdownflag)).ok() } #[inline] pub unsafe fn WTSStartRemoteControlSessionA(ptargetservername: P0, targetlogonid: u32, hotkeyvk: u8, hotkeymodifiers: u16) -> windows_core::Result<()> @@ -428,46 +362,32 @@ pub unsafe fn WTSStopRemoteControlSession(logonid: u32) -> windows_core::Result< WTSStopRemoteControlSession(core::mem::transmute(logonid)).ok() } #[inline] -pub unsafe fn WTSTerminateProcess(hserver: P0, processid: u32, exitcode: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSTerminateProcess(hserver: Option, processid: u32, exitcode: u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSTerminateProcess(hserver : super::super::Foundation:: HANDLE, processid : u32, exitcode : u32) -> super::super::Foundation:: BOOL); - WTSTerminateProcess(hserver.param().abi(), core::mem::transmute(processid), core::mem::transmute(exitcode)).ok() + WTSTerminateProcess(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(processid), core::mem::transmute(exitcode)).ok() } #[inline] -pub unsafe fn WTSUnRegisterSessionNotification(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSUnRegisterSessionNotification(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSUnRegisterSessionNotification(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - WTSUnRegisterSessionNotification(hwnd.param().abi()).ok() + WTSUnRegisterSessionNotification(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn WTSUnRegisterSessionNotificationEx(hserver: P0, hwnd: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn WTSUnRegisterSessionNotificationEx(hserver: Option, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSUnRegisterSessionNotificationEx(hserver : super::super::Foundation:: HANDLE, hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - WTSUnRegisterSessionNotificationEx(hserver.param().abi(), hwnd.param().abi()).ok() + WTSUnRegisterSessionNotificationEx(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn WTSVirtualChannelClose(hchannelhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSVirtualChannelClose(hchannelhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelClose(hchannelhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - WTSVirtualChannelClose(hchannelhandle.param().abi()).ok() + WTSVirtualChannelClose(core::mem::transmute(hchannelhandle)).ok() } #[inline] -pub unsafe fn WTSVirtualChannelOpen(hserver: P0, sessionid: u32, pvirtualname: P2) -> windows_core::Result +pub unsafe fn WTSVirtualChannelOpen(hserver: Option, sessionid: u32, pvirtualname: P2) -> windows_core::Result where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelOpen(hserver : super::super::Foundation:: HANDLE, sessionid : u32, pvirtualname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = WTSVirtualChannelOpen(hserver.param().abi(), core::mem::transmute(sessionid), pvirtualname.param().abi()); + let result__ = WTSVirtualChannelOpen(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), pvirtualname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -480,52 +400,34 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn WTSVirtualChannelPurgeInput(hchannelhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSVirtualChannelPurgeInput(hchannelhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelPurgeInput(hchannelhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - WTSVirtualChannelPurgeInput(hchannelhandle.param().abi()).ok() + WTSVirtualChannelPurgeInput(core::mem::transmute(hchannelhandle)).ok() } #[inline] -pub unsafe fn WTSVirtualChannelPurgeOutput(hchannelhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSVirtualChannelPurgeOutput(hchannelhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelPurgeOutput(hchannelhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - WTSVirtualChannelPurgeOutput(hchannelhandle.param().abi()).ok() + WTSVirtualChannelPurgeOutput(core::mem::transmute(hchannelhandle)).ok() } #[inline] -pub unsafe fn WTSVirtualChannelQuery(hchannelhandle: P0, param1: WTS_VIRTUAL_CLASS, ppbuffer: *mut *mut core::ffi::c_void, pbytesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSVirtualChannelQuery(hchannelhandle: super::super::Foundation::HANDLE, param1: WTS_VIRTUAL_CLASS, ppbuffer: *mut *mut core::ffi::c_void, pbytesreturned: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelQuery(hchannelhandle : super::super::Foundation:: HANDLE, param1 : WTS_VIRTUAL_CLASS, ppbuffer : *mut *mut core::ffi::c_void, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - WTSVirtualChannelQuery(hchannelhandle.param().abi(), core::mem::transmute(param1), core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() + WTSVirtualChannelQuery(core::mem::transmute(hchannelhandle), core::mem::transmute(param1), core::mem::transmute(ppbuffer), core::mem::transmute(pbytesreturned)).ok() } #[inline] -pub unsafe fn WTSVirtualChannelRead(hchannelhandle: P0, timeout: u32, buffer: &mut [u8], pbytesread: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSVirtualChannelRead(hchannelhandle: super::super::Foundation::HANDLE, timeout: u32, buffer: &mut [u8], pbytesread: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelRead(hchannelhandle : super::super::Foundation:: HANDLE, timeout : u32, buffer : windows_core::PSTR, buffersize : u32, pbytesread : *mut u32) -> super::super::Foundation:: BOOL); - WTSVirtualChannelRead(hchannelhandle.param().abi(), core::mem::transmute(timeout), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(pbytesread)).ok() + WTSVirtualChannelRead(core::mem::transmute(hchannelhandle), core::mem::transmute(timeout), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(pbytesread)).ok() } #[inline] -pub unsafe fn WTSVirtualChannelWrite(hchannelhandle: P0, buffer: &[u8], pbyteswritten: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSVirtualChannelWrite(hchannelhandle: super::super::Foundation::HANDLE, buffer: &[u8], pbyteswritten: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelWrite(hchannelhandle : super::super::Foundation:: HANDLE, buffer : windows_core::PCSTR, length : u32, pbyteswritten : *mut u32) -> super::super::Foundation:: BOOL); - WTSVirtualChannelWrite(hchannelhandle.param().abi(), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(pbyteswritten)).ok() + WTSVirtualChannelWrite(core::mem::transmute(hchannelhandle), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(pbyteswritten)).ok() } #[inline] -pub unsafe fn WTSWaitSystemEvent(hserver: P0, eventmask: u32, peventflags: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WTSWaitSystemEvent(hserver: Option, eventmask: u32, peventflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSWaitSystemEvent(hserver : super::super::Foundation:: HANDLE, eventmask : u32, peventflags : *mut u32) -> super::super::Foundation:: BOOL); - WTSWaitSystemEvent(hserver.param().abi(), core::mem::transmute(eventmask), core::mem::transmute(peventflags)).ok() + WTSWaitSystemEvent(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventmask), core::mem::transmute(peventflags)).ok() } #[repr(C)] #[derive(Clone, Debug, PartialEq)] @@ -1325,11 +1227,8 @@ impl IAudioEndpoint { pub unsafe fn SetStreamFlags(&self, streamflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetStreamFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(streamflags)).ok() } - pub unsafe fn SetEventHandle(&self, eventhandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventHandle)(windows_core::Interface::as_raw(self), eventhandle.param().abi()).ok() + pub unsafe fn SetEventHandle(&self, eventhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(eventhandle)).ok() } } #[repr(C)] @@ -1990,21 +1889,15 @@ impl core::ops::Deref for IRemoteDesktopClientTouchPointer { windows_core::imp::interface_hierarchy!(IRemoteDesktopClientTouchPointer, windows_core::IUnknown, super::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl IRemoteDesktopClientTouchPointer { - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn Enabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEventsEnabled(&self, eventsenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventsEnabled)(windows_core::Interface::as_raw(self), eventsenabled.param().abi()).ok() + pub unsafe fn SetEventsEnabled(&self, eventsenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventsEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(eventsenabled)).ok() } pub unsafe fn EventsEnabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2162,11 +2055,8 @@ impl windows_core::RuntimeName for ITSGAccountingEngine {} windows_core::imp::define_interface!(ITSGAuthenticateUserSink, ITSGAuthenticateUserSink_Vtbl, 0x2c3e2e73_a782_47f9_8dfb_77ee1ed27a03); windows_core::imp::interface_hierarchy!(ITSGAuthenticateUserSink, windows_core::IUnknown); impl ITSGAuthenticateUserSink { - pub unsafe fn OnUserAuthenticated(&self, username: &windows_core::BSTR, userdomain: &windows_core::BSTR, context: usize, usertoken: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnUserAuthenticated)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(username), core::mem::transmute_copy(userdomain), core::mem::transmute(context), usertoken.param().abi()).ok() + pub unsafe fn OnUserAuthenticated(&self, username: &windows_core::BSTR, userdomain: &windows_core::BSTR, context: usize, usertoken: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnUserAuthenticated)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(username), core::mem::transmute_copy(userdomain), core::mem::transmute(context), core::mem::transmute(usertoken)).ok() } pub unsafe fn OnUserAuthenticationFailed(&self, context: usize, genericerrorcode: windows_core::HRESULT, specificerrorcode: windows_core::HRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnUserAuthenticationFailed)(windows_core::Interface::as_raw(self), core::mem::transmute(context), core::mem::transmute(genericerrorcode), core::mem::transmute(specificerrorcode)).ok() @@ -2326,12 +2216,11 @@ impl windows_core::RuntimeName for ITSGAuthorizeResourceSink {} windows_core::imp::define_interface!(ITSGPolicyEngine, ITSGPolicyEngine_Vtbl, 0x8bc24f08_6223_42f4_a5b4_8e37cd135bbd); windows_core::imp::interface_hierarchy!(ITSGPolicyEngine, windows_core::IUnknown); impl ITSGPolicyEngine { - pub unsafe fn AuthorizeConnection(&self, mainsessionid: windows_core::GUID, username: &windows_core::BSTR, authtype: AAAuthSchemes, clientmachineip: &windows_core::BSTR, clientmachinename: &windows_core::BSTR, sohdata: &[u8], cookiedata: &[u8], usertoken: P9, psink: P10) -> windows_core::Result<()> + pub unsafe fn AuthorizeConnection(&self, mainsessionid: windows_core::GUID, username: &windows_core::BSTR, authtype: AAAuthSchemes, clientmachineip: &windows_core::BSTR, clientmachinename: &windows_core::BSTR, sohdata: &[u8], cookiedata: &[u8], usertoken: super::super::Foundation::HANDLE_PTR, psink: P10) -> windows_core::Result<()> where - P9: windows_core::Param, P10: windows_core::Param, { - (windows_core::Interface::vtable(self).AuthorizeConnection)(windows_core::Interface::as_raw(self), core::mem::transmute(mainsessionid), core::mem::transmute_copy(username), core::mem::transmute(authtype), core::mem::transmute_copy(clientmachineip), core::mem::transmute_copy(clientmachinename), core::mem::transmute(sohdata.as_ptr()), sohdata.len().try_into().unwrap(), core::mem::transmute(cookiedata.as_ptr()), cookiedata.len().try_into().unwrap(), usertoken.param().abi(), psink.param().abi()).ok() + (windows_core::Interface::vtable(self).AuthorizeConnection)(windows_core::Interface::as_raw(self), core::mem::transmute(mainsessionid), core::mem::transmute_copy(username), core::mem::transmute(authtype), core::mem::transmute_copy(clientmachineip), core::mem::transmute_copy(clientmachinename), core::mem::transmute(sohdata.as_ptr()), sohdata.len().try_into().unwrap(), core::mem::transmute(cookiedata.as_ptr()), cookiedata.len().try_into().unwrap(), core::mem::transmute(usertoken), psink.param().abi()).ok() } pub unsafe fn AuthorizeResource(&self, mainsessionid: windows_core::GUID, subsessionid: i32, username: &windows_core::BSTR, resourcenames: &[windows_core::BSTR], alternateresourcenames: &[windows_core::BSTR], portnumber: u32, operation: &windows_core::BSTR, cookie: &[u8], psink: P11) -> windows_core::Result<()> where @@ -2494,7 +2383,7 @@ impl ITsSbClientConnection { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn PutContext(&self, contextid: &windows_core::BSTR, context: &super::Variant::VARIANT, existingcontext: Option<*mut super::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).PutContext)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(contextid), core::mem::transmute_copy(context), core::mem::transmute(existingcontext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).PutContext)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(contextid), core::mem::transmute_copy(context), core::mem::transmute(existingcontext.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetContext(&self, contextid: &windows_core::BSTR) -> windows_core::Result { @@ -5670,11 +5559,8 @@ impl IWRdsProtocolConnection { pub unsafe fn AuthenticateClientToSession(&self, sessionid: *mut WTS_SESSION_ID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AuthenticateClientToSession)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid)).ok() } - pub unsafe fn NotifySessionId(&self, sessionid: *const WTS_SESSION_ID, sessionhandle: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).NotifySessionId)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), sessionhandle.param().abi()).ok() + pub unsafe fn NotifySessionId(&self, sessionid: *const WTS_SESSION_ID, sessionhandle: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).NotifySessionId)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), core::mem::transmute(sessionhandle)).ok() } pub unsafe fn GetInputHandles(&self, pkeyboardhandle: *mut super::super::Foundation::HANDLE_PTR, pmousehandle: *mut super::super::Foundation::HANDLE_PTR, pbeephandle: *mut super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetInputHandles)(windows_core::Interface::as_raw(self), core::mem::transmute(pkeyboardhandle), core::mem::transmute(pmousehandle), core::mem::transmute(pbeephandle)).ok() @@ -5686,28 +5572,25 @@ impl IWRdsProtocolConnection { pub unsafe fn ConnectNotify(&self, sessionid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConnectNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid)).ok() } - pub unsafe fn IsUserAllowedToLogon(&self, sessionid: u32, usertoken: P1, pdomainname: P2, pusername: P3) -> windows_core::Result<()> + pub unsafe fn IsUserAllowedToLogon(&self, sessionid: u32, usertoken: super::super::Foundation::HANDLE_PTR, pdomainname: P2, pusername: P3) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).IsUserAllowedToLogon)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), usertoken.param().abi(), pdomainname.param().abi(), pusername.param().abi()).ok() + (windows_core::Interface::vtable(self).IsUserAllowedToLogon)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), core::mem::transmute(usertoken), pdomainname.param().abi(), pusername.param().abi()).ok() } - pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: P0, bsinglesessionperuserenabled: P1, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> + pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: super::super::Foundation::HANDLE_PTR, bsinglesessionperuserenabled: P1, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), husertoken.param().abi(), bsinglesessionperuserenabled.param().abi(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() + (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), core::mem::transmute(husertoken), bsinglesessionperuserenabled.param().abi(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() } - pub unsafe fn LogonNotify(&self, hclienttoken: P0, wszusername: P1, wszdomainname: P2, sessionid: *const WTS_SESSION_ID, pwrdsconnectionsettings: *mut WRDS_CONNECTION_SETTINGS) -> windows_core::Result<()> + pub unsafe fn LogonNotify(&self, hclienttoken: super::super::Foundation::HANDLE_PTR, wszusername: P1, wszdomainname: P2, sessionid: *const WTS_SESSION_ID, pwrdsconnectionsettings: *mut WRDS_CONNECTION_SETTINGS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).LogonNotify)(windows_core::Interface::as_raw(self), hclienttoken.param().abi(), wszusername.param().abi(), wszdomainname.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(pwrdsconnectionsettings)).ok() + (windows_core::Interface::vtable(self).LogonNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(hclienttoken), wszusername.param().abi(), wszdomainname.param().abi(), core::mem::transmute(sessionid), core::mem::transmute(pwrdsconnectionsettings)).ok() } pub unsafe fn PreDisconnect(&self, disconnectreason: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).PreDisconnect)(windows_core::Interface::as_raw(self), core::mem::transmute(disconnectreason)).ok() @@ -6604,11 +6487,8 @@ impl IWRdsWddmIddProps { pub unsafe fn GetHardwareId(&self, pdisplaydriverhardwareid: &[u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetHardwareId)(windows_core::Interface::as_raw(self), core::mem::transmute(pdisplaydriverhardwareid.as_ptr()), pdisplaydriverhardwareid.len().try_into().unwrap()).ok() } - pub unsafe fn OnDriverLoad(&self, sessionid: u32, driverhandle: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnDriverLoad)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), driverhandle.param().abi()).ok() + pub unsafe fn OnDriverLoad(&self, sessionid: u32, driverhandle: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnDriverLoad)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), core::mem::transmute(driverhandle)).ok() } pub unsafe fn OnDriverUnload(&self, sessionid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnDriverUnload)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid)).ok() @@ -7050,28 +6930,25 @@ impl IWTSProtocolConnection { pub unsafe fn ConnectNotify(&self, sessionid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConnectNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid)).ok() } - pub unsafe fn IsUserAllowedToLogon(&self, sessionid: u32, usertoken: P1, pdomainname: P2, pusername: P3) -> windows_core::Result<()> + pub unsafe fn IsUserAllowedToLogon(&self, sessionid: u32, usertoken: super::super::Foundation::HANDLE_PTR, pdomainname: P2, pusername: P3) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).IsUserAllowedToLogon)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), usertoken.param().abi(), pdomainname.param().abi(), pusername.param().abi()).ok() + (windows_core::Interface::vtable(self).IsUserAllowedToLogon)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), core::mem::transmute(usertoken), pdomainname.param().abi(), pusername.param().abi()).ok() } - pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: P0, bsinglesessionperuserenabled: P1, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> + pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: super::super::Foundation::HANDLE_PTR, bsinglesessionperuserenabled: P1, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), husertoken.param().abi(), bsinglesessionperuserenabled.param().abi(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() + (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), core::mem::transmute(husertoken), bsinglesessionperuserenabled.param().abi(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() } - pub unsafe fn LogonNotify(&self, hclienttoken: P0, wszusername: P1, wszdomainname: P2, sessionid: *const WTS_SESSION_ID) -> windows_core::Result<()> + pub unsafe fn LogonNotify(&self, hclienttoken: super::super::Foundation::HANDLE_PTR, wszusername: P1, wszdomainname: P2, sessionid: *const WTS_SESSION_ID) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).LogonNotify)(windows_core::Interface::as_raw(self), hclienttoken.param().abi(), wszusername.param().abi(), wszdomainname.param().abi(), core::mem::transmute(sessionid)).ok() + (windows_core::Interface::vtable(self).LogonNotify)(windows_core::Interface::as_raw(self), core::mem::transmute(hclienttoken), wszusername.param().abi(), wszdomainname.param().abi(), core::mem::transmute(sessionid)).ok() } pub unsafe fn GetUserData(&self, ppolicydata: *const WTS_POLICY_DATA, pclientdata: *mut WTS_USER_DATA) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetUserData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppolicydata), core::mem::transmute(pclientdata)).ok() @@ -8115,11 +7992,8 @@ impl core::ops::Deref for IWorkspace2 { windows_core::imp::interface_hierarchy!(IWorkspace2, windows_core::IUnknown, IWorkspace); impl IWorkspace2 { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn StartRemoteApplicationEx(&self, bstrworkspaceid: &windows_core::BSTR, bstrrequestingappid: &windows_core::BSTR, bstrrequestingappfamilyname: &windows_core::BSTR, blaunchintoimmersiveclient: P3, bstrimmersiveclientactivationcontext: &windows_core::BSTR, psaparams: *const super::Com::SAFEARRAY) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).StartRemoteApplicationEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrworkspaceid), core::mem::transmute_copy(bstrrequestingappid), core::mem::transmute_copy(bstrrequestingappfamilyname), blaunchintoimmersiveclient.param().abi(), core::mem::transmute_copy(bstrimmersiveclientactivationcontext), core::mem::transmute(psaparams)).ok() + pub unsafe fn StartRemoteApplicationEx(&self, bstrworkspaceid: &windows_core::BSTR, bstrrequestingappid: &windows_core::BSTR, bstrrequestingappfamilyname: &windows_core::BSTR, blaunchintoimmersiveclient: super::super::Foundation::VARIANT_BOOL, bstrimmersiveclientactivationcontext: &windows_core::BSTR, psaparams: *const super::Com::SAFEARRAY) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).StartRemoteApplicationEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrworkspaceid), core::mem::transmute_copy(bstrrequestingappid), core::mem::transmute_copy(bstrrequestingappfamilyname), core::mem::transmute(blaunchintoimmersiveclient), core::mem::transmute_copy(bstrimmersiveclientactivationcontext), core::mem::transmute(psaparams)).ok() } } #[repr(C)] @@ -8443,38 +8317,23 @@ impl core::ops::Deref for IWorkspaceResTypeRegistry { windows_core::imp::interface_hierarchy!(IWorkspaceResTypeRegistry, windows_core::IUnknown, super::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl IWorkspaceResTypeRegistry { - pub unsafe fn AddResourceType(&self, fmachinewide: P0, bstrfileextension: &windows_core::BSTR, bstrlauncher: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddResourceType)(windows_core::Interface::as_raw(self), fmachinewide.param().abi(), core::mem::transmute_copy(bstrfileextension), core::mem::transmute_copy(bstrlauncher)).ok() + pub unsafe fn AddResourceType(&self, fmachinewide: super::super::Foundation::VARIANT_BOOL, bstrfileextension: &windows_core::BSTR, bstrlauncher: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddResourceType)(windows_core::Interface::as_raw(self), core::mem::transmute(fmachinewide), core::mem::transmute_copy(bstrfileextension), core::mem::transmute_copy(bstrlauncher)).ok() } - pub unsafe fn DeleteResourceType(&self, fmachinewide: P0, bstrfileextension: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeleteResourceType)(windows_core::Interface::as_raw(self), fmachinewide.param().abi(), core::mem::transmute_copy(bstrfileextension)).ok() + pub unsafe fn DeleteResourceType(&self, fmachinewide: super::super::Foundation::VARIANT_BOOL, bstrfileextension: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeleteResourceType)(windows_core::Interface::as_raw(self), core::mem::transmute(fmachinewide), core::mem::transmute_copy(bstrfileextension)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn GetRegisteredFileExtensions(&self, fmachinewide: P0) -> windows_core::Result<*mut super::Com::SAFEARRAY> - where - P0: windows_core::Param, - { + pub unsafe fn GetRegisteredFileExtensions(&self, fmachinewide: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<*mut super::Com::SAFEARRAY> { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetRegisteredFileExtensions)(windows_core::Interface::as_raw(self), fmachinewide.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetRegisteredFileExtensions)(windows_core::Interface::as_raw(self), core::mem::transmute(fmachinewide), &mut result__).map(|| result__) } - pub unsafe fn GetResourceTypeInfo(&self, fmachinewide: P0, bstrfileextension: &windows_core::BSTR) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetResourceTypeInfo(&self, fmachinewide: super::super::Foundation::VARIANT_BOOL, bstrfileextension: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetResourceTypeInfo)(windows_core::Interface::as_raw(self), fmachinewide.param().abi(), core::mem::transmute_copy(bstrfileextension), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetResourceTypeInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(fmachinewide), core::mem::transmute_copy(bstrfileextension), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn ModifyResourceType(&self, fmachinewide: P0, bstrfileextension: &windows_core::BSTR, bstrlauncher: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ModifyResourceType)(windows_core::Interface::as_raw(self), fmachinewide.param().abi(), core::mem::transmute_copy(bstrfileextension), core::mem::transmute_copy(bstrlauncher)).ok() + pub unsafe fn ModifyResourceType(&self, fmachinewide: super::super::Foundation::VARIANT_BOOL, bstrfileextension: &windows_core::BSTR, bstrlauncher: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ModifyResourceType)(windows_core::Interface::as_raw(self), core::mem::transmute(fmachinewide), core::mem::transmute_copy(bstrfileextension), core::mem::transmute_copy(bstrlauncher)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -8567,12 +8426,9 @@ impl IWorkspaceScriptable { pub unsafe fn StartWorkspace(&self, bstrworkspaceid: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, bstrworkspaceparams: &windows_core::BSTR, ltimeout: i32, lflags: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StartWorkspace)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrworkspaceid), core::mem::transmute_copy(bstrusername), core::mem::transmute_copy(bstrpassword), core::mem::transmute_copy(bstrworkspaceparams), core::mem::transmute(ltimeout), core::mem::transmute(lflags)).ok() } - pub unsafe fn IsWorkspaceCredentialSpecified(&self, bstrworkspaceid: &windows_core::BSTR, bcountunauthenticatedcredentials: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn IsWorkspaceCredentialSpecified(&self, bstrworkspaceid: &windows_core::BSTR, bcountunauthenticatedcredentials: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).IsWorkspaceCredentialSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrworkspaceid), bcountunauthenticatedcredentials.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).IsWorkspaceCredentialSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrworkspaceid), core::mem::transmute(bcountunauthenticatedcredentials), &mut result__).map(|| result__) } pub unsafe fn IsWorkspaceSSOEnabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 114fc011f3..11a961f58e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs @@ -1,130 +1,100 @@ #[inline] -pub unsafe fn WSManCloseCommand(commandhandle: P0, flags: u32, r#async: *const WSMAN_SHELL_ASYNC) -where - P0: windows_core::Param, -{ +pub unsafe fn WSManCloseCommand(commandhandle: Option, flags: u32, r#async: *const WSMAN_SHELL_ASYNC) { windows_targets::link!("wsmsvc.dll" "system" fn WSManCloseCommand(commandhandle : WSMAN_COMMAND_HANDLE, flags : u32, r#async : *const WSMAN_SHELL_ASYNC)); - WSManCloseCommand(commandhandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(r#async)) + WSManCloseCommand(core::mem::transmute(commandhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(r#async)) } #[inline] -pub unsafe fn WSManCloseOperation(operationhandle: P0, flags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSManCloseOperation(operationhandle: Option, flags: u32) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManCloseOperation(operationhandle : WSMAN_OPERATION_HANDLE, flags : u32) -> u32); - WSManCloseOperation(operationhandle.param().abi(), core::mem::transmute(flags)) + WSManCloseOperation(core::mem::transmute(operationhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn WSManCloseSession(session: P0, flags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSManCloseSession(session: Option, flags: u32) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManCloseSession(session : WSMAN_SESSION_HANDLE, flags : u32) -> u32); - WSManCloseSession(session.param().abi(), core::mem::transmute(flags)) + WSManCloseSession(core::mem::transmute(session.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn WSManCloseShell(shellhandle: P0, flags: u32, r#async: *const WSMAN_SHELL_ASYNC) -where - P0: windows_core::Param, -{ +pub unsafe fn WSManCloseShell(shellhandle: Option, flags: u32, r#async: *const WSMAN_SHELL_ASYNC) { windows_targets::link!("wsmsvc.dll" "system" fn WSManCloseShell(shellhandle : WSMAN_SHELL_HANDLE, flags : u32, r#async : *const WSMAN_SHELL_ASYNC)); - WSManCloseShell(shellhandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(r#async)) + WSManCloseShell(core::mem::transmute(shellhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(r#async)) } #[inline] -pub unsafe fn WSManConnectShell(session: P0, flags: u32, resourceuri: P2, shellid: P3, options: Option<*const WSMAN_OPTION_SET>, connectxml: Option<*const WSMAN_DATA>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_SHELL_HANDLE +pub unsafe fn WSManConnectShell(session: WSMAN_SESSION_HANDLE, flags: u32, resourceuri: P2, shellid: P3, options: Option<*const WSMAN_OPTION_SET>, connectxml: Option<*const WSMAN_DATA>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_SHELL_HANDLE where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { 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(), core::mem::transmute(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())), core::mem::transmute(r#async), &mut result__); + WSManConnectShell(core::mem::transmute(session), core::mem::transmute(flags), resourceuri.param().abi(), shellid.param().abi(), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(connectxml.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#async), &mut result__); result__ } #[inline] -pub unsafe fn WSManConnectShellCommand(shell: P0, flags: u32, commandid: P2, options: Option<*const WSMAN_OPTION_SET>, connectxml: Option<*const WSMAN_DATA>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_COMMAND_HANDLE +pub unsafe fn WSManConnectShellCommand(shell: WSMAN_SHELL_HANDLE, flags: u32, commandid: P2, options: Option<*const WSMAN_OPTION_SET>, connectxml: Option<*const WSMAN_DATA>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_COMMAND_HANDLE where - P0: windows_core::Param, P2: windows_core::Param, { 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(), core::mem::transmute(flags), commandid.param().abi(), core::mem::transmute(options.unwrap_or(core::ptr::null())), core::mem::transmute(connectxml.unwrap_or(core::ptr::null())), core::mem::transmute(r#async), &mut result__); + WSManConnectShellCommand(core::mem::transmute(shell), core::mem::transmute(flags), commandid.param().abi(), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(connectxml.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#async), &mut result__); result__ } #[inline] -pub unsafe fn WSManCreateSession(apihandle: P0, connection: P1, flags: u32, serverauthenticationcredentials: Option<*const WSMAN_AUTHENTICATION_CREDENTIALS>, proxyinfo: Option<*const WSMAN_PROXY_INFO>, session: *mut WSMAN_SESSION_HANDLE) -> u32 +pub unsafe fn WSManCreateSession(apihandle: WSMAN_API_HANDLE, connection: P1, flags: u32, serverauthenticationcredentials: Option<*const WSMAN_AUTHENTICATION_CREDENTIALS>, proxyinfo: Option<*const WSMAN_PROXY_INFO>, session: *mut WSMAN_SESSION_HANDLE) -> u32 where - P0: windows_core::Param, 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(), core::mem::transmute(flags), core::mem::transmute(serverauthenticationcredentials.unwrap_or(core::ptr::null())), core::mem::transmute(proxyinfo.unwrap_or(core::ptr::null())), core::mem::transmute(session)) + WSManCreateSession(core::mem::transmute(apihandle), connection.param().abi(), core::mem::transmute(flags), core::mem::transmute(serverauthenticationcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(proxyinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(session)) } #[inline] -pub unsafe fn WSManCreateShell(session: P0, flags: u32, resourceuri: P2, 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 +pub unsafe fn WSManCreateShell(session: WSMAN_SESSION_HANDLE, flags: u32, resourceuri: P2, 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 where - P0: windows_core::Param, P2: windows_core::Param, { 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(), core::mem::transmute(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())), core::mem::transmute(r#async), &mut result__); + WSManCreateShell(core::mem::transmute(session), core::mem::transmute(flags), resourceuri.param().abi(), core::mem::transmute(startupinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(createxml.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#async), &mut result__); result__ } #[inline] -pub unsafe fn WSManCreateShellEx(session: P0, flags: u32, resourceuri: P2, shellid: P3, 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 +pub unsafe fn WSManCreateShellEx(session: WSMAN_SESSION_HANDLE, flags: u32, resourceuri: P2, shellid: P3, 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 where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { 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(), core::mem::transmute(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())), core::mem::transmute(r#async), &mut result__); + WSManCreateShellEx(core::mem::transmute(session), core::mem::transmute(flags), resourceuri.param().abi(), shellid.param().abi(), core::mem::transmute(startupinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(createxml.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#async), &mut result__); result__ } #[inline] -pub unsafe fn WSManDeinitialize(apihandle: P0, flags: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSManDeinitialize(apihandle: Option, flags: u32) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManDeinitialize(apihandle : WSMAN_API_HANDLE, flags : u32) -> u32); - WSManDeinitialize(apihandle.param().abi(), core::mem::transmute(flags)) + WSManDeinitialize(core::mem::transmute(apihandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn WSManDisconnectShell(shell: P0, flags: u32, disconnectinfo: *const WSMAN_SHELL_DISCONNECT_INFO, r#async: *const WSMAN_SHELL_ASYNC) -where - P0: windows_core::Param, -{ +pub unsafe fn WSManDisconnectShell(shell: WSMAN_SHELL_HANDLE, flags: u32, disconnectinfo: *const WSMAN_SHELL_DISCONNECT_INFO, r#async: *const WSMAN_SHELL_ASYNC) { windows_targets::link!("wsmsvc.dll" "system" fn WSManDisconnectShell(shell : WSMAN_SHELL_HANDLE, flags : u32, disconnectinfo : *const WSMAN_SHELL_DISCONNECT_INFO, r#async : *const WSMAN_SHELL_ASYNC)); - WSManDisconnectShell(shell.param().abi(), core::mem::transmute(flags), core::mem::transmute(disconnectinfo), core::mem::transmute(r#async)) + WSManDisconnectShell(core::mem::transmute(shell), core::mem::transmute(flags), core::mem::transmute(disconnectinfo), core::mem::transmute(r#async)) } #[inline] -pub unsafe fn WSManGetErrorMessage(apihandle: P0, flags: u32, languagecode: P2, errorcode: u32, message: Option<&mut [u16]>, messagelengthused: *mut u32) -> u32 +pub unsafe fn WSManGetErrorMessage(apihandle: WSMAN_API_HANDLE, flags: Option, languagecode: P2, errorcode: u32, message: Option<&mut [u16]>, messagelengthused: *mut u32) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManGetErrorMessage(apihandle : WSMAN_API_HANDLE, flags : u32, languagecode : windows_core::PCWSTR, errorcode : u32, messagelength : u32, message : windows_core::PWSTR, messagelengthused : *mut u32) -> u32); - WSManGetErrorMessage(apihandle.param().abi(), core::mem::transmute(flags), languagecode.param().abi(), core::mem::transmute(errorcode), message.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(message.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(messagelengthused)) + WSManGetErrorMessage(core::mem::transmute(apihandle), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), languagecode.param().abi(), core::mem::transmute(errorcode), message.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(message.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(messagelengthused)) } #[inline] -pub unsafe fn WSManGetSessionOptionAsDword(session: P0, option: WSManSessionOption, value: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSManGetSessionOptionAsDword(session: WSMAN_SESSION_HANDLE, option: WSManSessionOption, value: *mut u32) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManGetSessionOptionAsDword(session : WSMAN_SESSION_HANDLE, option : WSManSessionOption, value : *mut u32) -> u32); - WSManGetSessionOptionAsDword(session.param().abi(), core::mem::transmute(option), core::mem::transmute(value)) + WSManGetSessionOptionAsDword(core::mem::transmute(session), core::mem::transmute(option), core::mem::transmute(value)) } #[inline] -pub unsafe fn WSManGetSessionOptionAsString(session: P0, option: WSManSessionOption, string: Option<&mut [u16]>, stringlengthused: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSManGetSessionOptionAsString(session: WSMAN_SESSION_HANDLE, option: WSManSessionOption, string: Option<&mut [u16]>, stringlengthused: *mut u32) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManGetSessionOptionAsString(session : WSMAN_SESSION_HANDLE, option : WSManSessionOption, stringlength : u32, string : windows_core::PWSTR, stringlengthused : *mut u32) -> u32); - WSManGetSessionOptionAsString(session.param().abi(), core::mem::transmute(option), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(stringlengthused)) + WSManGetSessionOptionAsString(core::mem::transmute(session), core::mem::transmute(option), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(stringlengthused)) } #[inline] pub unsafe fn WSManInitialize(flags: u32, apihandle: *mut WSMAN_API_HANDLE) -> u32 { @@ -137,7 +107,7 @@ where P4: 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(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(userauthorizationcontext.unwrap_or(core::ptr::null())), core::mem::transmute(errorcode), extendederrorinformation.param().abi()) + WSManPluginAuthzOperationComplete(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(userauthorizationcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P4) -> u32 @@ -145,17 +115,16 @@ where P4: 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(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(quota.unwrap_or(core::ptr::null())), core::mem::transmute(errorcode), extendederrorinformation.param().abi()) + WSManPluginAuthzQueryQuotaComplete(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(quota.unwrap_or(core::mem::zeroed())), core::mem::transmute(errorcode), extendederrorinformation.param().abi()) } #[inline] -pub unsafe fn WSManPluginAuthzUserComplete(senderdetails: *const WSMAN_SENDER_DETAILS, flags: u32, userauthorizationcontext: Option<*const core::ffi::c_void>, impersonationtoken: P3, userisadministrator: P4, errorcode: u32, extendederrorinformation: P6) -> u32 +pub unsafe fn WSManPluginAuthzUserComplete(senderdetails: *const WSMAN_SENDER_DETAILS, flags: u32, userauthorizationcontext: Option<*const core::ffi::c_void>, impersonationtoken: Option, userisadministrator: P4, errorcode: u32, extendederrorinformation: P6) -> u32 where - P3: windows_core::Param, P4: windows_core::Param, P6: 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(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(userauthorizationcontext.unwrap_or(core::ptr::null())), impersonationtoken.param().abi(), userisadministrator.param().abi(), core::mem::transmute(errorcode), extendederrorinformation.param().abi()) + WSManPluginAuthzUserComplete(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(userauthorizationcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(impersonationtoken.unwrap_or(core::mem::zeroed())), userisadministrator.param().abi(), core::mem::transmute(errorcode), extendederrorinformation.param().abi()) } #[inline] pub unsafe fn WSManPluginFreeRequestDetails(requestdetails: *const WSMAN_PLUGIN_REQUEST) -> u32 { @@ -187,7 +156,7 @@ where P4: 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(core::mem::transmute(requestdetails), core::mem::transmute(flags), stream.param().abi(), core::mem::transmute(streamresult.unwrap_or(core::ptr::null())), commandstate.param().abi(), core::mem::transmute(exitcode)) + WSManPluginReceiveResult(core::mem::transmute(requestdetails), core::mem::transmute(flags), stream.param().abi(), core::mem::transmute(streamresult.unwrap_or(core::mem::zeroed())), commandstate.param().abi(), core::mem::transmute(exitcode)) } #[inline] pub unsafe fn WSManPluginReportCompletion(plugincontext: *const core::ffi::c_void, flags: u32) -> u32 { @@ -200,86 +169,67 @@ pub unsafe fn WSManPluginReportContext(requestdetails: *const WSMAN_PLUGIN_REQUE WSManPluginReportContext(core::mem::transmute(requestdetails), core::mem::transmute(flags), core::mem::transmute(context)) } #[inline] -pub unsafe fn WSManReceiveShellOutput(shell: P0, command: P1, flags: u32, desiredstreamset: Option<*const WSMAN_STREAM_ID_SET>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_OPERATION_HANDLE -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn WSManReceiveShellOutput(shell: WSMAN_SHELL_HANDLE, command: Option, flags: u32, desiredstreamset: Option<*const WSMAN_STREAM_ID_SET>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_OPERATION_HANDLE { 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(), core::mem::transmute(flags), core::mem::transmute(desiredstreamset.unwrap_or(core::ptr::null())), core::mem::transmute(r#async), &mut result__); + WSManReceiveShellOutput(core::mem::transmute(shell), core::mem::transmute(command.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(desiredstreamset.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#async), &mut result__); result__ } #[inline] -pub unsafe fn WSManReconnectShell(shell: P0, flags: u32, r#async: *const WSMAN_SHELL_ASYNC) -where - P0: windows_core::Param, -{ +pub unsafe fn WSManReconnectShell(shell: WSMAN_SHELL_HANDLE, flags: u32, r#async: *const WSMAN_SHELL_ASYNC) { windows_targets::link!("wsmsvc.dll" "system" fn WSManReconnectShell(shell : WSMAN_SHELL_HANDLE, flags : u32, r#async : *const WSMAN_SHELL_ASYNC)); - WSManReconnectShell(shell.param().abi(), core::mem::transmute(flags), core::mem::transmute(r#async)) + WSManReconnectShell(core::mem::transmute(shell), core::mem::transmute(flags), core::mem::transmute(r#async)) } #[inline] -pub unsafe fn WSManReconnectShellCommand(commandhandle: P0, flags: u32, r#async: *const WSMAN_SHELL_ASYNC) -where - P0: windows_core::Param, -{ +pub unsafe fn WSManReconnectShellCommand(commandhandle: WSMAN_COMMAND_HANDLE, flags: u32, r#async: *const WSMAN_SHELL_ASYNC) { windows_targets::link!("wsmsvc.dll" "system" fn WSManReconnectShellCommand(commandhandle : WSMAN_COMMAND_HANDLE, flags : u32, r#async : *const WSMAN_SHELL_ASYNC)); - WSManReconnectShellCommand(commandhandle.param().abi(), core::mem::transmute(flags), core::mem::transmute(r#async)) + WSManReconnectShellCommand(core::mem::transmute(commandhandle), core::mem::transmute(flags), core::mem::transmute(r#async)) } #[inline] -pub unsafe fn WSManRunShellCommand(shell: P0, flags: u32, commandline: P2, args: Option<*const WSMAN_COMMAND_ARG_SET>, options: Option<*const WSMAN_OPTION_SET>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_COMMAND_HANDLE +pub unsafe fn WSManRunShellCommand(shell: WSMAN_SHELL_HANDLE, flags: u32, commandline: P2, args: Option<*const WSMAN_COMMAND_ARG_SET>, options: Option<*const WSMAN_OPTION_SET>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_COMMAND_HANDLE where - P0: windows_core::Param, P2: windows_core::Param, { 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(), core::mem::transmute(flags), commandline.param().abi(), core::mem::transmute(args.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), core::mem::transmute(r#async), &mut result__); + WSManRunShellCommand(core::mem::transmute(shell), core::mem::transmute(flags), commandline.param().abi(), core::mem::transmute(args.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#async), &mut result__); result__ } #[inline] -pub unsafe fn WSManRunShellCommandEx(shell: P0, flags: u32, commandid: P2, commandline: P3, args: Option<*const WSMAN_COMMAND_ARG_SET>, options: Option<*const WSMAN_OPTION_SET>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_COMMAND_HANDLE +pub unsafe fn WSManRunShellCommandEx(shell: WSMAN_SHELL_HANDLE, flags: u32, commandid: P2, commandline: P3, args: Option<*const WSMAN_COMMAND_ARG_SET>, options: Option<*const WSMAN_OPTION_SET>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_COMMAND_HANDLE where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { 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(), core::mem::transmute(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())), core::mem::transmute(r#async), &mut result__); + WSManRunShellCommandEx(core::mem::transmute(shell), core::mem::transmute(flags), commandid.param().abi(), commandline.param().abi(), core::mem::transmute(args.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(r#async), &mut result__); result__ } #[inline] -pub unsafe fn WSManSendShellInput(shell: P0, command: P1, flags: u32, streamid: P3, streamdata: *const WSMAN_DATA, endofstream: P5, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_OPERATION_HANDLE +pub unsafe fn WSManSendShellInput(shell: WSMAN_SHELL_HANDLE, command: Option, flags: u32, streamid: P3, streamdata: *const WSMAN_DATA, endofstream: P5, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_OPERATION_HANDLE where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManSendShellInput(shell : WSMAN_SHELL_HANDLE, command : WSMAN_COMMAND_HANDLE, flags : u32, streamid : windows_core::PCWSTR, streamdata : *const WSMAN_DATA, endofstream : super::super::Foundation:: BOOL, r#async : *const WSMAN_SHELL_ASYNC, sendoperation : *mut WSMAN_OPERATION_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManSendShellInput(shell.param().abi(), command.param().abi(), core::mem::transmute(flags), streamid.param().abi(), core::mem::transmute(streamdata), endofstream.param().abi(), core::mem::transmute(r#async), &mut result__); + WSManSendShellInput(core::mem::transmute(shell), core::mem::transmute(command.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), streamid.param().abi(), core::mem::transmute(streamdata), endofstream.param().abi(), core::mem::transmute(r#async), &mut result__); result__ } #[inline] -pub unsafe fn WSManSetSessionOption(session: P0, option: WSManSessionOption, data: *const WSMAN_DATA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WSManSetSessionOption(session: WSMAN_SESSION_HANDLE, option: WSManSessionOption, data: *const WSMAN_DATA) -> u32 { windows_targets::link!("wsmsvc.dll" "system" fn WSManSetSessionOption(session : WSMAN_SESSION_HANDLE, option : WSManSessionOption, data : *const WSMAN_DATA) -> u32); - WSManSetSessionOption(session.param().abi(), core::mem::transmute(option), core::mem::transmute(data)) + WSManSetSessionOption(core::mem::transmute(session), core::mem::transmute(option), core::mem::transmute(data)) } #[inline] -pub unsafe fn WSManSignalShell(shell: P0, command: P1, flags: u32, code: P3, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_OPERATION_HANDLE +pub unsafe fn WSManSignalShell(shell: WSMAN_SHELL_HANDLE, command: Option, flags: u32, code: P3, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_OPERATION_HANDLE where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManSignalShell(shell : WSMAN_SHELL_HANDLE, command : WSMAN_COMMAND_HANDLE, flags : u32, code : windows_core::PCWSTR, r#async : *const WSMAN_SHELL_ASYNC, signaloperation : *mut WSMAN_OPERATION_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManSignalShell(shell.param().abi(), command.param().abi(), core::mem::transmute(flags), code.param().abi(), core::mem::transmute(r#async), &mut result__); + WSManSignalShell(core::mem::transmute(shell), core::mem::transmute(command.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), code.param().abi(), core::mem::transmute(r#async), &mut result__); result__ } pub const ERROR_REDIRECT_LOCATION_INVALID: u32 = 2150859191u32; 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 c954a971e2..b795f9661b 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 P3: 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(core::mem::transmute(dwsessionhandle), strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(core::ptr::null())), strserviceshortname.param().abi(), core::mem::transmute(filteraction)) + RmAddFilter(core::mem::transmute(dwsessionhandle), strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(core::mem::zeroed())), strserviceshortname.param().abi(), core::mem::transmute(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(core::mem::transmute(dwsessionhandle), core::mem::transmute(pnprocinfoneeded), core::mem::transmute(pnprocinfo), core::mem::transmute(rgaffectedapps.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwrebootreasons)) + RmGetList(core::mem::transmute(dwsessionhandle), core::mem::transmute(pnprocinfoneeded), core::mem::transmute(pnprocinfo), core::mem::transmute(rgaffectedapps.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwrebootreasons)) } #[inline] pub unsafe fn RmJoinSession(psessionhandle: *mut u32, strsessionkey: P1) -> super::super::Foundation::WIN32_ERROR @@ -55,22 +55,22 @@ where P3: 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(core::mem::transmute(dwsessionhandle), strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(core::ptr::null())), strserviceshortname.param().abi()) + RmRemoveFilter(core::mem::transmute(dwsessionhandle), strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(core::mem::zeroed())), strserviceshortname.param().abi()) } #[inline] -pub unsafe fn RmRestart(dwsessionhandle: u32, dwrestartflags: u32, fnstatus: RM_WRITE_STATUS_CALLBACK) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn RmRestart(dwsessionhandle: u32, dwrestartflags: Option, fnstatus: Option) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("rstrtmgr.dll" "system" fn RmRestart(dwsessionhandle : u32, dwrestartflags : u32, fnstatus : RM_WRITE_STATUS_CALLBACK) -> super::super::Foundation:: WIN32_ERROR); - RmRestart(core::mem::transmute(dwsessionhandle), core::mem::transmute(dwrestartflags), core::mem::transmute(fnstatus)) + RmRestart(core::mem::transmute(dwsessionhandle), core::mem::transmute(dwrestartflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(fnstatus.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RmShutdown(dwsessionhandle: u32, lactionflags: u32, fnstatus: RM_WRITE_STATUS_CALLBACK) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn RmShutdown(dwsessionhandle: u32, lactionflags: u32, fnstatus: Option) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("rstrtmgr.dll" "system" fn RmShutdown(dwsessionhandle : u32, lactionflags : u32, fnstatus : RM_WRITE_STATUS_CALLBACK) -> super::super::Foundation:: WIN32_ERROR); - RmShutdown(core::mem::transmute(dwsessionhandle), core::mem::transmute(lactionflags), core::mem::transmute(fnstatus)) + RmShutdown(core::mem::transmute(dwsessionhandle), core::mem::transmute(lactionflags), core::mem::transmute(fnstatus.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RmStartSession(psessionhandle: *mut u32, dwsessionflags: u32, strsessionkey: windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn RmStartSession(psessionhandle: *mut u32, dwsessionflags: Option, strsessionkey: windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("rstrtmgr.dll" "system" fn RmStartSession(psessionhandle : *mut u32, dwsessionflags : u32, strsessionkey : windows_core::PWSTR) -> super::super::Foundation:: WIN32_ERROR); - RmStartSession(core::mem::transmute(psessionhandle), core::mem::transmute(dwsessionflags), core::mem::transmute(strsessionkey)) + RmStartSession(core::mem::transmute(psessionhandle), core::mem::transmute(dwsessionflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(strsessionkey)) } pub const CCH_RM_MAX_APP_NAME: u32 = 255u32; pub const CCH_RM_MAX_SVC_NAME: u32 = 63u32; 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 69eb781ac6..d40d159b58 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(core::mem::transmute(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()))) + I_RpcBindingInqClientTokenAttributes(core::mem::transmute(binding), core::mem::transmute(tokenid.unwrap_or(core::mem::zeroed())), core::mem::transmute(authenticationid.unwrap_or(core::mem::zeroed())), core::mem::transmute(modifiedid.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(keyinfo)) + I_RpcBindingInqSecurityContextKeyInfo(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(desiredaccess), core::mem::transmute(clientprocess)) + I_RpcOpenClientProcess(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(desiredaccess), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(associationid)) + I_RpcServerGetAssociationID(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(hevent.unwrap_or(core::ptr::null()))) + I_RpcServerSubscribeForDisconnectNotification(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(hevent), core::mem::transmute(subscriptionid)) + I_RpcServerSubscribeForDisconnectNotification2(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(hevent), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(subscriptionid)) + I_RpcServerUnsubscribeForDisconnectNotification(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), 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(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + I_RpcServerUseProtseq2A(networkaddress.param().abi(), protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + I_RpcServerUseProtseq2W(networkaddress.param().abi(), protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(policy)) } #[inline] pub unsafe fn I_RpcServerUseProtseqEp2A(networkaddress: P0, protseq: P1, maxcalls: u32, endpoint: P3, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const core::ffi::c_void) -> RPC_STATUS @@ -390,7 +390,7 @@ where P3: 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(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + I_RpcServerUseProtseqEp2A(networkaddress.param().abi(), protseq.param().abi(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(policy)) } #[inline] pub unsafe fn I_RpcServerUseProtseqEp2W(networkaddress: P0, protseq: P1, maxcalls: u32, endpoint: P3, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const core::ffi::c_void) -> RPC_STATUS @@ -400,7 +400,7 @@ where P3: 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(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + I_RpcServerUseProtseqEp2W(networkaddress.param().abi(), protseq.param().abi(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(handle), core::mem::transmute(handlestyle), core::mem::transmute(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()))) + MesBufferHandleReset(core::mem::transmute(handle), core::mem::transmute(handlestyle), core::mem::transmute(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::mem::zeroed()))) } #[inline] pub unsafe fn MesDecodeBufferHandleCreate(buffer: &[u8], phandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -478,14 +478,14 @@ pub unsafe fn NDRCContextBinding(ccontext: isize) -> *mut core::ffi::c_void { NDRCContextBinding(core::mem::transmute(ccontext)) } #[inline] -pub unsafe fn NDRCContextMarshall(ccontext: isize, pbuff: *mut core::ffi::c_void) { +pub unsafe fn NDRCContextMarshall(ccontext: Option, pbuff: *mut core::ffi::c_void) { windows_targets::link!("rpcrt4.dll" "system" fn NDRCContextMarshall(ccontext : isize, pbuff : *mut core::ffi::c_void)); - NDRCContextMarshall(core::mem::transmute(ccontext), core::mem::transmute(pbuff)) + NDRCContextMarshall(core::mem::transmute(ccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbuff)) } #[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(core::ptr::null_mut())), core::mem::transmute(hbinding), core::mem::transmute(pbuff), core::mem::transmute(datarepresentation)) + NDRCContextUnmarshall(core::mem::transmute(pccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(hbinding), core::mem::transmute(pbuff), core::mem::transmute(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(core::mem::transmute(bindinghandle), core::mem::transmute(ccontext), core::mem::transmute(pbuff), core::mem::transmute(userrundownin), core::mem::transmute(ctxguard.unwrap_or(core::ptr::null())), core::mem::transmute(flags)) + NDRSContextMarshall2(core::mem::transmute(bindinghandle), core::mem::transmute(ccontext), core::mem::transmute(pbuff), core::mem::transmute(userrundownin), core::mem::transmute(ctxguard.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(bindinghandle), core::mem::transmute(pbuff.unwrap_or(core::ptr::null())), core::mem::transmute(datarepresentation), core::mem::transmute(ctxguard.unwrap_or(core::ptr::null())), core::mem::transmute(flags)) + NDRSContextUnmarshall2(core::mem::transmute(bindinghandle), core::mem::transmute(pbuff.unwrap_or(core::mem::zeroed())), core::mem::transmute(datarepresentation), core::mem::transmute(ctxguard.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pasync), core::mem::transmute(reply.unwrap_or(core::ptr::null_mut()))) + RpcAsyncCompleteCall(core::mem::transmute(pasync), core::mem::transmute(reply.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(binding), core::mem::transmute(ifspec)) + RpcBindingBind(core::mem::transmute(pasync.unwrap_or(core::mem::zeroed())), core::mem::transmute(binding), core::mem::transmute(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(core::mem::transmute(template), core::mem::transmute(security.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), core::mem::transmute(binding)) + RpcBindingCreateA(core::mem::transmute(template), core::mem::transmute(security.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(template), core::mem::transmute(security.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), core::mem::transmute(binding)) + RpcBindingCreateW(core::mem::transmute(template), core::mem::transmute(security.unwrap_or(core::mem::zeroed())), core::mem::transmute(options.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(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()))) + RpcBindingInqAuthClientA(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(privs), core::mem::transmute(serverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(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())), core::mem::transmute(flags)) + RpcBindingInqAuthClientExA(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(privs), core::mem::transmute(serverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(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())), core::mem::transmute(flags)) + RpcBindingInqAuthClientExW(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(privs), core::mem::transmute(serverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(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()))) + RpcBindingInqAuthClientW(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(privs), core::mem::transmute(serverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(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()))) + RpcBindingInqAuthInfoA(core::mem::transmute(binding), core::mem::transmute(serverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(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())), core::mem::transmute(rpcqosversion), core::mem::transmute(securityqos.unwrap_or(core::ptr::null_mut()))) + RpcBindingInqAuthInfoExA(core::mem::transmute(binding), core::mem::transmute(serverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(rpcqosversion), core::mem::transmute(securityqos.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(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())), core::mem::transmute(rpcqosversion), core::mem::transmute(securityqos.unwrap_or(core::ptr::null_mut()))) + RpcBindingInqAuthInfoExW(core::mem::transmute(binding), core::mem::transmute(serverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(rpcqosversion), core::mem::transmute(securityqos.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(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()))) + RpcBindingInqAuthInfoW(core::mem::transmute(binding), core::mem::transmute(serverprincname.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnlevel.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc.unwrap_or(core::mem::zeroed())), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(serverbinding)) + RpcBindingServerFromClient(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(serverbinding)) } #[inline] pub unsafe fn RpcBindingSetAuthInfoA(binding: *const core::ffi::c_void, serverprincname: P1, authnlevel: u32, authnsvc: u32, authidentity: Option<*const core::ffi::c_void>, authzsvc: u32) -> RPC_STATUS @@ -1703,7 +1703,7 @@ where P1: 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(core::mem::transmute(binding), serverprincname.param().abi(), core::mem::transmute(authnlevel), core::mem::transmute(authnsvc), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), core::mem::transmute(authzsvc)) + RpcBindingSetAuthInfoA(core::mem::transmute(binding), serverprincname.param().abi(), core::mem::transmute(authnlevel), core::mem::transmute(authnsvc), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1712,7 +1712,7 @@ where P1: 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(core::mem::transmute(binding), serverprincname.param().abi(), core::mem::transmute(authnlevel), core::mem::transmute(authnsvc), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), core::mem::transmute(authzsvc), core::mem::transmute(securityqos.unwrap_or(core::ptr::null()))) + RpcBindingSetAuthInfoExA(core::mem::transmute(binding), serverprincname.param().abi(), core::mem::transmute(authnlevel), core::mem::transmute(authnsvc), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc), core::mem::transmute(securityqos.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1721,7 +1721,7 @@ where P1: 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(core::mem::transmute(binding), serverprincname.param().abi(), core::mem::transmute(authnlevel), core::mem::transmute(authnsvc), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), core::mem::transmute(authzsvc), core::mem::transmute(securityqos.unwrap_or(core::ptr::null()))) + RpcBindingSetAuthInfoExW(core::mem::transmute(binding), serverprincname.param().abi(), core::mem::transmute(authnlevel), core::mem::transmute(authnsvc), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc), core::mem::transmute(securityqos.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcBindingSetAuthInfoW(binding: *const core::ffi::c_void, serverprincname: P1, authnlevel: u32, authnsvc: u32, authidentity: Option<*const core::ffi::c_void>, authzsvc: u32) -> RPC_STATUS @@ -1729,7 +1729,7 @@ where P1: 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(core::mem::transmute(binding), serverprincname.param().abi(), core::mem::transmute(authnlevel), core::mem::transmute(authnsvc), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), core::mem::transmute(authzsvc)) + RpcBindingSetAuthInfoW(core::mem::transmute(binding), serverprincname.param().abi(), core::mem::transmute(authnlevel), core::mem::transmute(authnsvc), core::mem::transmute(authidentity.unwrap_or(core::mem::zeroed())), core::mem::transmute(authzsvc)) } #[inline] pub unsafe fn RpcBindingSetObject(binding: *const core::ffi::c_void, objectuuid: *const windows_core::GUID) -> RPC_STATUS { @@ -1789,7 +1789,7 @@ where P3: 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(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::ptr::null())), annotation.param().abi()) + RpcEpRegisterA(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed())), 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: P3) -> RPC_STATUS @@ -1797,7 +1797,7 @@ where P3: 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(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::ptr::null())), annotation.param().abi()) + RpcEpRegisterNoReplaceA(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed())), 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: P3) -> RPC_STATUS @@ -1805,7 +1805,7 @@ where P3: 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(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::ptr::null())), annotation.param().abi()) + RpcEpRegisterNoReplaceW(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed())), 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: P3) -> RPC_STATUS @@ -1813,7 +1813,7 @@ where P3: 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(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::ptr::null())), annotation.param().abi()) + RpcEpRegisterW(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::ptr::null()))) + RpcEpUnregister(core::mem::transmute(ifspec), core::mem::transmute(bindingvector), core::mem::transmute(uuidvector.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcErrorAddRecord(errorinfo: *const RPC_EXTENDED_ERROR_INFO) -> RPC_STATUS { @@ -1889,7 +1889,7 @@ where P1: 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(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), core::mem::transmute(reserved3), core::mem::transmute(reserved4.unwrap_or(core::ptr::null())), core::mem::transmute(pauthzclientcontext)) + RpcGetAuthorizationContextForClient(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), impersonateonreturn.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pexpirationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), core::mem::transmute(reserved3), core::mem::transmute(reserved4.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null()))) + RpcImpersonateClient(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + RpcImpersonateClient2(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + RpcImpersonateClientContainer(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcMgmtEnableIdleCleanup() -> RPC_STATUS { @@ -1922,9 +1922,9 @@ pub unsafe fn RpcMgmtEnableIdleCleanup() -> RPC_STATUS { RpcMgmtEnableIdleCleanup() } #[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 { +pub unsafe fn RpcMgmtEpEltInqBegin(epbinding: Option<*const core::ffi::c_void>, inquirytype: u32, ifid: Option<*const RPC_IF_ID>, versoption: Option, 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(core::ptr::null())), core::mem::transmute(inquirytype), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(versoption), core::mem::transmute(objectuuid.unwrap_or(core::ptr::null())), core::mem::transmute(inquirycontext)) + RpcMgmtEpEltInqBegin(core::mem::transmute(epbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(inquirytype), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(versoption.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(inquirycontext), core::mem::transmute(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()))) + RpcMgmtEpEltInqNextA(core::mem::transmute(inquirycontext), core::mem::transmute(ifid), core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(annotation.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(inquirycontext), core::mem::transmute(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()))) + RpcMgmtEpEltInqNextW(core::mem::transmute(inquirycontext), core::mem::transmute(ifid), core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(annotation.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(ifid), core::mem::transmute(binding), core::mem::transmute(objectuuid.unwrap_or(core::ptr::null()))) + RpcMgmtEpUnregister(core::mem::transmute(epbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(ifid), core::mem::transmute(binding), core::mem::transmute(objectuuid.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(ifidvector)) + RpcMgmtInqIfIds(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(authnsvc), core::mem::transmute(serverprincname)) + RpcMgmtInqServerPrincNameA(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(authnsvc), core::mem::transmute(serverprincname)) + RpcMgmtInqServerPrincNameW(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(authnsvc), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(statistics)) + RpcMgmtInqStats(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null()))) + RpcMgmtIsServerListening(core::mem::transmute(binding.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + RpcMgmtStopServerListening(core::mem::transmute(binding.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcMgmtWaitServerListen() -> RPC_STATUS { @@ -2048,7 +2048,7 @@ where P1: 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(core::mem::transmute(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()))) + RpcNsBindingExportA(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(bindingvec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsBindingExportPnPA(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2056,7 +2056,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectvector.unwrap_or(core::ptr::null()))) + RpcNsBindingExportPnPA(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectvector.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsBindingExportPnPW(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2064,7 +2064,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectvector.unwrap_or(core::ptr::null()))) + RpcNsBindingExportPnPW(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectvector.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsBindingExportW(entrynamesyntax: u32, entryname: P1, 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 P1: 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(core::mem::transmute(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()))) + RpcNsBindingExportW(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(bindingvec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsBindingImportBeginA(entrynamesyntax: u32, entryname: P1, 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 P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objuuid.unwrap_or(core::ptr::null())), core::mem::transmute(importcontext)) + RpcNsBindingImportBeginA(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(importcontext)) } #[inline] pub unsafe fn RpcNsBindingImportBeginW(entrynamesyntax: u32, entryname: P1, 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 P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objuuid.unwrap_or(core::ptr::null())), core::mem::transmute(importcontext)) + RpcNsBindingImportBeginW(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(importcontext)) } #[inline] pub unsafe fn RpcNsBindingImportDone(importcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -2116,7 +2116,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objuuid.unwrap_or(core::ptr::null())), core::mem::transmute(bindingmaxcount), core::mem::transmute(lookupcontext)) + RpcNsBindingLookupBeginA(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(bindingmaxcount), core::mem::transmute(lookupcontext)) } #[inline] pub unsafe fn RpcNsBindingLookupBeginW(entrynamesyntax: u32, entryname: P1, 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 P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objuuid.unwrap_or(core::ptr::null())), core::mem::transmute(bindingmaxcount), core::mem::transmute(lookupcontext)) + RpcNsBindingLookupBeginW(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(bindingmaxcount), core::mem::transmute(lookupcontext)) } #[inline] pub unsafe fn RpcNsBindingLookupDone(lookupcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -2147,7 +2147,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) + RpcNsBindingUnexportA(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsBindingUnexportPnPA(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2155,7 +2155,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectvector.unwrap_or(core::ptr::null()))) + RpcNsBindingUnexportPnPA(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectvector.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsBindingUnexportPnPW(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2163,7 +2163,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectvector.unwrap_or(core::ptr::null()))) + RpcNsBindingUnexportPnPW(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectvector.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsBindingUnexportW(entrynamesyntax: u32, entryname: P1, ifspec: Option<*const core::ffi::c_void>, objectuuidvec: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2171,7 +2171,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) + RpcNsBindingUnexportW(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsEntryExpandNameA(entrynamesyntax: u32, entryname: P1, expandedname: *mut windows_core::PSTR) -> RPC_STATUS @@ -2304,7 +2304,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(versoption), core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) + RpcNsMgmtBindingUnexportA(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(versoption), core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsMgmtBindingUnexportW(entrynamesyntax: u32, entryname: P1, ifid: Option<*const RPC_IF_ID>, versoption: u32, objectuuidvec: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2312,7 +2312,7 @@ where P1: 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(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(versoption), core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) + RpcNsMgmtBindingUnexportW(core::mem::transmute(entrynamesyntax), entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(versoption), core::mem::transmute(objectuuidvec.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcNsMgmtEntryCreateA(entrynamesyntax: u32, entryname: P1) -> RPC_STATUS @@ -2401,7 +2401,7 @@ where P6: 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(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(membernamesyntax), membername.param().abi(), core::mem::transmute(priority), annotation.param().abi()) + RpcNsProfileEltAddA(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(membernamesyntax), membername.param().abi(), core::mem::transmute(priority), annotation.param().abi()) } #[inline] pub unsafe fn RpcNsProfileEltAddW(profilenamesyntax: u32, profilename: P1, ifid: Option<*const RPC_IF_ID>, membernamesyntax: u32, membername: P4, priority: u32, annotation: P6) -> RPC_STATUS @@ -2411,7 +2411,7 @@ where P6: 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(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(membernamesyntax), membername.param().abi(), core::mem::transmute(priority), annotation.param().abi()) + RpcNsProfileEltAddW(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(membernamesyntax), membername.param().abi(), core::mem::transmute(priority), annotation.param().abi()) } #[inline] pub unsafe fn RpcNsProfileEltInqBeginA(profilenamesyntax: u32, profilename: P1, inquirytype: u32, ifid: Option<*const RPC_IF_ID>, versoption: u32, membernamesyntax: u32, membername: P6, inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2420,7 +2420,7 @@ where P6: 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(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(inquirytype), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(versoption), core::mem::transmute(membernamesyntax), membername.param().abi(), core::mem::transmute(inquirycontext)) + RpcNsProfileEltInqBeginA(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(inquirytype), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(versoption), core::mem::transmute(membernamesyntax), membername.param().abi(), core::mem::transmute(inquirycontext)) } #[inline] pub unsafe fn RpcNsProfileEltInqBeginW(profilenamesyntax: u32, profilename: P1, inquirytype: u32, ifid: Option<*const RPC_IF_ID>, versoption: u32, membernamesyntax: u32, membername: P6, inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2429,7 +2429,7 @@ where P6: 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(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(inquirytype), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(versoption), core::mem::transmute(membernamesyntax), membername.param().abi(), core::mem::transmute(inquirycontext)) + RpcNsProfileEltInqBeginW(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(inquirytype), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(versoption), core::mem::transmute(membernamesyntax), membername.param().abi(), core::mem::transmute(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(core::mem::transmute(inquirycontext), core::mem::transmute(ifid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(membername), core::mem::transmute(priority), core::mem::transmute(annotation)) + RpcNsProfileEltInqNextA(core::mem::transmute(inquirycontext), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(membername), core::mem::transmute(priority), core::mem::transmute(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(core::mem::transmute(inquirycontext), core::mem::transmute(ifid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(membername), core::mem::transmute(priority), core::mem::transmute(annotation)) + RpcNsProfileEltInqNextW(core::mem::transmute(inquirycontext), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(membername), core::mem::transmute(priority), core::mem::transmute(annotation)) } #[inline] pub unsafe fn RpcNsProfileEltRemoveA(profilenamesyntax: u32, profilename: P1, ifid: Option<*const RPC_IF_ID>, membernamesyntax: u32, membername: P4) -> RPC_STATUS @@ -2453,7 +2453,7 @@ where P4: 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(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(membernamesyntax), membername.param().abi()) + RpcNsProfileEltRemoveA(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(membernamesyntax), membername.param().abi()) } #[inline] pub unsafe fn RpcNsProfileEltRemoveW(profilenamesyntax: u32, profilename: P1, ifid: Option<*const RPC_IF_ID>, membernamesyntax: u32, membername: P4) -> RPC_STATUS @@ -2462,12 +2462,12 @@ where P4: 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(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), core::mem::transmute(membernamesyntax), membername.param().abi()) + RpcNsProfileEltRemoveW(core::mem::transmute(profilenamesyntax), profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(objuuid), core::mem::transmute(typeuuid.unwrap_or(core::ptr::null_mut()))) + RpcObjectInqType(core::mem::transmute(objuuid), core::mem::transmute(typeuuid.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(objuuid), core::mem::transmute(typeuuid.unwrap_or(core::ptr::null()))) + RpcObjectSetType(core::mem::transmute(objuuid), core::mem::transmute(typeuuid.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + RpcRevertToSelfEx(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(bindingvector)) + RpcServerInqBindingsEx(core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(rpccallattributes)) + RpcServerInqCallAttributesA(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(rpccallattributes)) + RpcServerInqCallAttributesW(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv)) + RpcServerInqIf(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv)) } #[inline] pub unsafe fn RpcServerInterfaceGroupActivate(ifgroup: *const core::ffi::c_void) -> RPC_STATUS { @@ -2590,86 +2590,86 @@ pub unsafe fn RpcServerListen(minimumcallthreads: u32, maxcalls: u32, dontwait: RpcServerListen(core::mem::transmute(minimumcallthreads), core::mem::transmute(maxcalls), core::mem::transmute(dontwait)) } #[inline] -pub unsafe fn RpcServerRegisterAuthInfoA(serverprincname: P0, authnsvc: u32, getkeyfn: RPC_AUTH_KEY_RETRIEVAL_FN, arg: Option<*const core::ffi::c_void>) -> RPC_STATUS +pub unsafe fn RpcServerRegisterAuthInfoA(serverprincname: P0, authnsvc: u32, getkeyfn: Option, arg: Option<*const core::ffi::c_void>) -> RPC_STATUS 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(), core::mem::transmute(authnsvc), core::mem::transmute(getkeyfn), core::mem::transmute(arg.unwrap_or(core::ptr::null()))) + RpcServerRegisterAuthInfoA(serverprincname.param().abi(), core::mem::transmute(authnsvc), core::mem::transmute(getkeyfn.unwrap_or(core::mem::zeroed())), core::mem::transmute(arg.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RpcServerRegisterAuthInfoW(serverprincname: P0, authnsvc: u32, getkeyfn: RPC_AUTH_KEY_RETRIEVAL_FN, arg: Option<*const core::ffi::c_void>) -> RPC_STATUS +pub unsafe fn RpcServerRegisterAuthInfoW(serverprincname: P0, authnsvc: u32, getkeyfn: Option, arg: Option<*const core::ffi::c_void>) -> RPC_STATUS 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(), core::mem::transmute(authnsvc), core::mem::transmute(getkeyfn), core::mem::transmute(arg.unwrap_or(core::ptr::null()))) + RpcServerRegisterAuthInfoW(serverprincname.param().abi(), core::mem::transmute(authnsvc), core::mem::transmute(getkeyfn.unwrap_or(core::mem::zeroed())), core::mem::transmute(arg.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(core::ptr::null()))) + RpcServerRegisterIf(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option) -> 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(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(maxcalls), core::mem::transmute(maxrpcsize), core::mem::transmute(ifcallbackfn)) + RpcServerRegisterIf2(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(maxcalls), core::mem::transmute(maxrpcsize), core::mem::transmute(ifcallbackfn.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option, 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(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(maxcalls), core::mem::transmute(maxrpcsize), core::mem::transmute(ifcallback), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerRegisterIf3(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(maxcalls), core::mem::transmute(maxrpcsize), core::mem::transmute(ifcallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[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 { +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: Option) -> 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(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(maxcalls), core::mem::transmute(ifcallback)) + RpcServerRegisterIfEx(core::mem::transmute(ifspec), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrepv.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(maxcalls), core::mem::transmute(ifcallback.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(notification), core::mem::transmute(notificationtype), core::mem::transmute(notificationinfo)) + RpcServerSubscribeForNotification(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(notification), core::mem::transmute(notificationtype), core::mem::transmute(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(core::ptr::null()))) + RpcServerTestCancel(core::mem::transmute(bindinghandle.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(waitforcallstocomplete)) + RpcServerUnregisterIf(core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(rundowncontexthandles)) + RpcServerUnregisterIfEx(core::mem::transmute(ifspec.unwrap_or(core::mem::zeroed())), core::mem::transmute(mgrtypeuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(notification), core::mem::transmute(notificationsqueued)) + RpcServerUnsubscribeForNotification(core::mem::transmute(binding.unwrap_or(core::mem::zeroed())), core::mem::transmute(notification), core::mem::transmute(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(core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerUseAllProtseqs(core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + RpcServerUseAllProtseqsEx(core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerUseAllProtseqsIf(core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + RpcServerUseAllProtseqsIfEx(core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerUseProtseqA(protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcServerUseProtseqEpA(protseq: P0, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2686,7 +2686,7 @@ where P2: 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(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerUseProtseqEpA(protseq.param().abi(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcServerUseProtseqEpExA(protseq: P0, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2695,7 +2695,7 @@ where P2: 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(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + RpcServerUseProtseqEpExA(protseq.param().abi(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(policy)) } #[inline] pub unsafe fn RpcServerUseProtseqEpExW(protseq: P0, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2704,7 +2704,7 @@ where P2: 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(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + RpcServerUseProtseqEpExW(protseq.param().abi(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(policy)) } #[inline] pub unsafe fn RpcServerUseProtseqEpW(protseq: P0, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2713,7 +2713,7 @@ where P2: 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(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerUseProtseqEpW(protseq.param().abi(), core::mem::transmute(maxcalls), endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + RpcServerUseProtseqExA(protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + RpcServerUseProtseqExW(protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerUseProtseqIfA(protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + RpcServerUseProtseqIfExA(protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), core::mem::transmute(policy)) + RpcServerUseProtseqIfExW(protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(), core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerUseProtseqIfW(protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(ifspec), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[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(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) + RpcServerUseProtseqW(protseq.param().abi(), core::mem::transmute(maxcalls), core::mem::transmute(securitydescriptor.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(usercontext)) + RpcSsContextLockExclusive(core::mem::transmute(serverbindinghandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::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::mem::zeroed()))) } #[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(core::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::mem::zeroed()))) } #[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(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()))) + RpcStringBindingParseA(stringbinding.param().abi(), core::mem::transmute(objuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(protseq.unwrap_or(core::mem::zeroed())), core::mem::transmute(networkaddr.unwrap_or(core::mem::zeroed())), core::mem::transmute(endpoint.unwrap_or(core::mem::zeroed())), core::mem::transmute(networkoptions.unwrap_or(core::mem::zeroed()))) } #[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(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()))) + RpcStringBindingParseW(stringbinding.param().abi(), core::mem::transmute(objuuid.unwrap_or(core::mem::zeroed())), core::mem::transmute(protseq.unwrap_or(core::mem::zeroed())), core::mem::transmute(networkaddr.unwrap_or(core::mem::zeroed())), core::mem::transmute(endpoint.unwrap_or(core::mem::zeroed())), core::mem::transmute(networkoptions.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn RpcStringFreeA(string: *mut windows_core::PSTR) -> RPC_STATUS { 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 054ab0beb4..3876bd2e69 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: 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(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(targettype), core::mem::transmute(targetvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(strlen_or_ind.unwrap_or(core::ptr::null_mut()))) + SQLBindCol(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(targettype), core::mem::transmute(targetvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(strlen_or_ind.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[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(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(targettype), core::mem::transmute(targetvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(strlen_or_ind.unwrap_or(core::ptr::null_mut()))) + SQLBindCol(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(targettype), core::mem::transmute(targetvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(strlen_or_ind.unwrap_or(core::mem::zeroed()))) } #[cfg(target_arch = "x86")] #[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(core::mem::transmute(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()))) + SQLBrowseConnect(core::mem::transmute(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::mem::zeroed()))) } #[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(core::mem::transmute(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()))) + SQLBrowseConnectA(core::mem::transmute(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::mem::zeroed()))) } #[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(core::mem::transmute(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()))) + SQLBrowseConnectW(core::mem::transmute(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::mem::zeroed()))) } #[inline] pub unsafe fn SQLBulkOperations(statementhandle: *mut core::ffi::c_void, operation: i16) -> i16 { @@ -107,48 +107,45 @@ pub unsafe fn SQLCloseCursor(statementhandle: *mut core::ffi::c_void) -> i16 { SQLCloseCursor(core::mem::transmute(statementhandle)) } #[inline] -pub unsafe fn SQLCloseEnumServers(henumhandle: P0) -> i16 -where - P0: windows_core::Param, -{ +pub unsafe fn SQLCloseEnumServers(henumhandle: super::super::Foundation::HANDLE) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn SQLCloseEnumServers(henumhandle : super::super::Foundation:: HANDLE) -> i16); - SQLCloseEnumServers(henumhandle.param().abi()) + SQLCloseEnumServers(core::mem::transmute(henumhandle)) } #[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(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(fieldidentifier), core::mem::transmute(characterattribute.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(numericattribute.unwrap_or(core::ptr::null_mut()))) + SQLColAttribute(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(fieldidentifier), core::mem::transmute(characterattribute.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(numericattribute.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[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(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(fieldidentifier), core::mem::transmute(characterattribute.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(numericattribute.unwrap_or(core::ptr::null_mut()))) + SQLColAttribute(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(fieldidentifier), core::mem::transmute(characterattribute.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(numericattribute.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(ifield), core::mem::transmute(pcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbcharattrmax), core::mem::transmute(pcbcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(core::ptr::null_mut()))) + SQLColAttributeA(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(ifield), core::mem::transmute(pcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbcharattrmax), core::mem::transmute(pcbcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumattr.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(ifield), core::mem::transmute(pcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbcharattrmax), core::mem::transmute(pcbcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(core::ptr::null_mut()))) + SQLColAttributeA(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(ifield), core::mem::transmute(pcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbcharattrmax), core::mem::transmute(pcbcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumattr.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(ifield), core::mem::transmute(pcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(core::ptr::null_mut()))) + SQLColAttributeW(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(ifield), core::mem::transmute(pcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumattr.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(ifield), core::mem::transmute(pcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(core::ptr::null_mut()))) + SQLColAttributeW(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(ifield), core::mem::transmute(pcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbcharattr.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnumattr.unwrap_or(core::mem::zeroed()))) } #[cfg(target_arch = "x86")] #[inline] @@ -166,25 +163,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 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(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(fdesctype), core::mem::transmute(rgbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(core::ptr::null_mut()))) + SQLColAttributesA(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(fdesctype), core::mem::transmute(rgbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfdesc.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[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(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(fdesctype), core::mem::transmute(rgbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(core::ptr::null_mut()))) + SQLColAttributesA(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(fdesctype), core::mem::transmute(rgbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfdesc.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(fdesctype), core::mem::transmute(rgbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(core::ptr::null_mut()))) + SQLColAttributesW(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(fdesctype), core::mem::transmute(rgbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfdesc.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(fdesctype), core::mem::transmute(rgbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(core::ptr::null_mut()))) + SQLColAttributesW(core::mem::transmute(hstmt), core::mem::transmute(icol), core::mem::transmute(fdesctype), core::mem::transmute(rgbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdescmax), core::mem::transmute(pcbdesc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfdesc.unwrap_or(core::mem::zeroed()))) } #[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 +306,10 @@ pub unsafe fn SQLDataSources(environmenthandle: *mut core::ffi::c_void, directio core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(namelength1ptr.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(namelength2ptr.unwrap_or(core::mem::zeroed())), ) } #[inline] @@ -328,10 +325,10 @@ pub unsafe fn SQLDataSourcesW(henv: *mut core::ffi::c_void, fdirection: u16, szd core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(pcchdsn.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(pcchdescription.unwrap_or(core::mem::zeroed())), ) } #[cfg(target_arch = "x86")] @@ -343,11 +340,11 @@ pub unsafe fn SQLDescribeCol(statementhandle: *mut core::ffi::c_void, columnnumb core::mem::transmute(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(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())), + core::mem::transmute(namelength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(datatype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(columnsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(decimaldigits.unwrap_or(core::mem::zeroed())), + core::mem::transmute(nullable.unwrap_or(core::mem::zeroed())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -359,11 +356,11 @@ pub unsafe fn SQLDescribeCol(statementhandle: *mut core::ffi::c_void, columnnumb core::mem::transmute(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(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())), + core::mem::transmute(namelength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(datatype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(columnsize.unwrap_or(core::mem::zeroed())), + core::mem::transmute(decimaldigits.unwrap_or(core::mem::zeroed())), + core::mem::transmute(nullable.unwrap_or(core::mem::zeroed())), ) } #[cfg(target_arch = "x86")] @@ -375,11 +372,11 @@ pub unsafe fn SQLDescribeColA(hstmt: *mut core::ffi::c_void, icol: u16, szcolnam core::mem::transmute(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(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())), + core::mem::transmute(pcbcolname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfsqltype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbcoldef.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pibscale.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfnullable.unwrap_or(core::mem::zeroed())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -391,11 +388,11 @@ pub unsafe fn SQLDescribeColA(hstmt: *mut core::ffi::c_void, icol: u16, szcolnam core::mem::transmute(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(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())), + core::mem::transmute(pcbcolname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfsqltype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbcoldef.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pibscale.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfnullable.unwrap_or(core::mem::zeroed())), ) } #[cfg(target_arch = "x86")] @@ -407,11 +404,11 @@ pub unsafe fn SQLDescribeColW(hstmt: *mut core::ffi::c_void, icol: u16, szcolnam core::mem::transmute(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(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())), + core::mem::transmute(pcchcolname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfsqltype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbcoldef.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pibscale.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfnullable.unwrap_or(core::mem::zeroed())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -423,24 +420,24 @@ pub unsafe fn SQLDescribeColW(hstmt: *mut core::ffi::c_void, icol: u16, szcolnam core::mem::transmute(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(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())), + core::mem::transmute(pcchcolname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfsqltype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcbcoldef.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pibscale.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfnullable.unwrap_or(core::mem::zeroed())), ) } #[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(core::mem::transmute(hstmt), core::mem::transmute(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()))) + SQLDescribeParam(core::mem::transmute(hstmt), core::mem::transmute(ipar), core::mem::transmute(pfsqltype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbparamdef.unwrap_or(core::mem::zeroed())), core::mem::transmute(pibscale.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnullable.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hstmt), core::mem::transmute(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()))) + SQLDescribeParam(core::mem::transmute(hstmt), core::mem::transmute(ipar), core::mem::transmute(pfsqltype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbparamdef.unwrap_or(core::mem::zeroed())), core::mem::transmute(pibscale.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnullable.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SQLDisconnect(connectionhandle: *mut core::ffi::c_void) -> i16 { @@ -450,17 +447,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(core::mem::transmute(hdbc), core::mem::transmute(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())), core::mem::transmute(fdrivercompletion)) + SQLDriverConnect(core::mem::transmute(hdbc), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hdbc), core::mem::transmute(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())), core::mem::transmute(fdrivercompletion)) + SQLDriverConnectA(core::mem::transmute(hdbc), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hdbc), core::mem::transmute(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())), core::mem::transmute(fdrivercompletion)) + SQLDriverConnectW(core::mem::transmute(hdbc), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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 +467,10 @@ pub unsafe fn SQLDrivers(henv: *mut core::ffi::c_void, fdirection: u16, szdriver core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(pcchdriverdesc.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(pcchdrvrattr.unwrap_or(core::mem::zeroed())), ) } #[inline] @@ -484,10 +481,10 @@ pub unsafe fn SQLDriversA(henv: *mut core::ffi::c_void, fdirection: u16, szdrive core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(pcbdriverdesc.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(pcbdrvrattr.unwrap_or(core::mem::zeroed())), ) } #[inline] @@ -498,10 +495,10 @@ pub unsafe fn SQLDriversW(henv: *mut core::ffi::c_void, fdirection: u16, szdrive core::mem::transmute(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(core::ptr::null_mut())), + core::mem::transmute(pcchdriverdesc.unwrap_or(core::mem::zeroed())), 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(core::ptr::null_mut())), + core::mem::transmute(pcchdrvrattr.unwrap_or(core::mem::zeroed())), ) } #[inline] @@ -512,17 +509,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(core::mem::transmute(environmenthandle), core::mem::transmute(connectionhandle), core::mem::transmute(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()))) + SQLError(core::mem::transmute(environmenthandle), core::mem::transmute(connectionhandle), core::mem::transmute(statementhandle), core::mem::transmute(sqlstate.as_ptr()), core::mem::transmute(nativeerror.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))) } #[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(core::mem::transmute(henv), core::mem::transmute(hdbc), core::mem::transmute(hstmt), core::mem::transmute(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()))) + SQLErrorA(core::mem::transmute(henv), core::mem::transmute(hdbc), core::mem::transmute(hstmt), core::mem::transmute(szsqlstate), core::mem::transmute(pfnativeerror.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))) } #[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(core::mem::transmute(henv), core::mem::transmute(hdbc), core::mem::transmute(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()))) + SQLErrorW(core::mem::transmute(henv), core::mem::transmute(hdbc), core::mem::transmute(hstmt), core::mem::transmute(wszsqlstate.as_ptr()), core::mem::transmute(pfnativeerror.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))) } #[inline] pub unsafe fn SQLExecDirect(statementhandle: *mut core::ffi::c_void, statementtext: Option<&[u8]>) -> i16 { @@ -548,13 +545,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: 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(core::mem::transmute(hstmt), core::mem::transmute(ffetchtype), core::mem::transmute(irow), core::mem::transmute(pcrow.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rgfrowstatus.unwrap_or(core::ptr::null_mut()))) + SQLExtendedFetch(core::mem::transmute(hstmt), core::mem::transmute(ffetchtype), core::mem::transmute(irow), core::mem::transmute(pcrow.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgfrowstatus.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[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(core::mem::transmute(hstmt), core::mem::transmute(ffetchtype), core::mem::transmute(irow), core::mem::transmute(pcrow.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rgfrowstatus.unwrap_or(core::ptr::null_mut()))) + SQLExtendedFetch(core::mem::transmute(hstmt), core::mem::transmute(ffetchtype), core::mem::transmute(irow), core::mem::transmute(pcrow.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgfrowstatus.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SQLFetch(statementhandle: *mut core::ffi::c_void) -> i16 { @@ -653,17 +650,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(core::mem::transmute(connectionhandle), core::mem::transmute(attribute), core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(stringlengthptr.unwrap_or(core::ptr::null_mut()))) + SQLGetConnectAttr(core::mem::transmute(connectionhandle), core::mem::transmute(attribute), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(stringlengthptr.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hdbc), core::mem::transmute(fattribute), core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbvaluemax), core::mem::transmute(pcbvalue.unwrap_or(core::ptr::null_mut()))) + SQLGetConnectAttrA(core::mem::transmute(hdbc), core::mem::transmute(fattribute), core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbvaluemax), core::mem::transmute(pcbvalue.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hdbc), core::mem::transmute(fattribute), core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbvaluemax), core::mem::transmute(pcbvalue.unwrap_or(core::ptr::null_mut()))) + SQLGetConnectAttrW(core::mem::transmute(hdbc), core::mem::transmute(fattribute), core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbvaluemax), core::mem::transmute(pcbvalue.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SQLGetConnectOption(connectionhandle: *mut core::ffi::c_void, option: u16, value: *mut core::ffi::c_void) -> i16 { @@ -683,44 +680,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(core::mem::transmute(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()))) + SQLGetCursorName(core::mem::transmute(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::mem::zeroed()))) } #[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(core::mem::transmute(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()))) + SQLGetCursorNameA(core::mem::transmute(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::mem::zeroed()))) } #[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(core::mem::transmute(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()))) + SQLGetCursorNameW(core::mem::transmute(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::mem::zeroed()))) } #[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(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(targettype), core::mem::transmute(targetvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(strlen_or_indptr.unwrap_or(core::ptr::null_mut()))) + SQLGetData(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(targettype), core::mem::transmute(targetvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(strlen_or_indptr.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(targettype), core::mem::transmute(targetvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(strlen_or_indptr.unwrap_or(core::ptr::null_mut()))) + SQLGetData(core::mem::transmute(statementhandle), core::mem::transmute(columnnumber), core::mem::transmute(targettype), core::mem::transmute(targetvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(strlen_or_indptr.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(descriptorhandle), core::mem::transmute(recnumber), core::mem::transmute(fieldidentifier), core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) + SQLGetDescField(core::mem::transmute(descriptorhandle), core::mem::transmute(recnumber), core::mem::transmute(fieldidentifier), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hdesc), core::mem::transmute(irecord), core::mem::transmute(ifield), core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbufferlength), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) + SQLGetDescFieldA(core::mem::transmute(hdesc), core::mem::transmute(irecord), core::mem::transmute(ifield), core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufferlength), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hdesc), core::mem::transmute(irecord), core::mem::transmute(ifield), core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbufferlength), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) + SQLGetDescFieldW(core::mem::transmute(hdesc), core::mem::transmute(irecord), core::mem::transmute(ifield), core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufferlength), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } #[cfg(target_arch = "x86")] #[inline] @@ -731,13 +728,13 @@ pub unsafe fn SQLGetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: core::mem::transmute(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(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())), + core::mem::transmute(stringlengthptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(typeptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(subtypeptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lengthptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(precisionptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(scaleptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(nullableptr.unwrap_or(core::mem::zeroed())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -749,13 +746,13 @@ pub unsafe fn SQLGetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: core::mem::transmute(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(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())), + core::mem::transmute(stringlengthptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(typeptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(subtypeptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lengthptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(precisionptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(scaleptr.unwrap_or(core::mem::zeroed())), + core::mem::transmute(nullableptr.unwrap_or(core::mem::zeroed())), ) } #[cfg(target_arch = "x86")] @@ -767,13 +764,13 @@ pub unsafe fn SQLGetDescRecA(hdesc: *mut core::ffi::c_void, irecord: i16, szname core::mem::transmute(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(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())), + core::mem::transmute(pcbname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pftype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfsubtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pprecision.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pscale.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pnullable.unwrap_or(core::mem::zeroed())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -785,13 +782,13 @@ pub unsafe fn SQLGetDescRecA(hdesc: *mut core::ffi::c_void, irecord: i16, szname core::mem::transmute(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(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())), + core::mem::transmute(pcbname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pftype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfsubtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pprecision.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pscale.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pnullable.unwrap_or(core::mem::zeroed())), ) } #[cfg(target_arch = "x86")] @@ -803,13 +800,13 @@ pub unsafe fn SQLGetDescRecW(hdesc: *mut core::ffi::c_void, irecord: i16, szname core::mem::transmute(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(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())), + core::mem::transmute(pcchname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pftype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfsubtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pprecision.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pscale.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pnullable.unwrap_or(core::mem::zeroed())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -821,34 +818,34 @@ pub unsafe fn SQLGetDescRecW(hdesc: *mut core::ffi::c_void, irecord: i16, szname core::mem::transmute(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(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())), + core::mem::transmute(pcchname.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pftype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pfsubtype.unwrap_or(core::mem::zeroed())), + core::mem::transmute(plength.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pprecision.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pscale.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pnullable.unwrap_or(core::mem::zeroed())), ) } #[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(core::mem::transmute(handletype), core::mem::transmute(handle), core::mem::transmute(recnumber), core::mem::transmute(diagidentifier), core::mem::transmute(diaginfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) + SQLGetDiagField(core::mem::transmute(handletype), core::mem::transmute(handle), core::mem::transmute(recnumber), core::mem::transmute(diagidentifier), core::mem::transmute(diaginfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(fhandletype), core::mem::transmute(handle), core::mem::transmute(irecord), core::mem::transmute(fdiagfield), core::mem::transmute(rgbdiaginfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbdiaginfomax), core::mem::transmute(pcbdiaginfo.unwrap_or(core::ptr::null_mut()))) + SQLGetDiagFieldA(core::mem::transmute(fhandletype), core::mem::transmute(handle), core::mem::transmute(irecord), core::mem::transmute(fdiagfield), core::mem::transmute(rgbdiaginfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdiaginfomax), core::mem::transmute(pcbdiaginfo.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(fhandletype), core::mem::transmute(handle), core::mem::transmute(irecord), core::mem::transmute(fdiagfield), core::mem::transmute(rgbdiaginfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbufferlength), core::mem::transmute(pcbstringlength.unwrap_or(core::ptr::null_mut()))) + SQLGetDiagFieldW(core::mem::transmute(fhandletype), core::mem::transmute(handle), core::mem::transmute(irecord), core::mem::transmute(fdiagfield), core::mem::transmute(rgbdiaginfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufferlength), core::mem::transmute(pcbstringlength.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(handletype), core::mem::transmute(handle), core::mem::transmute(recnumber), core::mem::transmute(sqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(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()))) + SQLGetDiagRec(core::mem::transmute(handletype), core::mem::transmute(handle), core::mem::transmute(recnumber), core::mem::transmute(sqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(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::mem::zeroed()))) } #[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,40 +860,37 @@ 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(core::mem::transmute(environmenthandle), core::mem::transmute(attribute), core::mem::transmute(value), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) + SQLGetEnvAttr(core::mem::transmute(environmenthandle), core::mem::transmute(attribute), core::mem::transmute(value), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(connectionhandle), core::mem::transmute(functionid), core::mem::transmute(supported.unwrap_or(core::ptr::null_mut()))) + SQLGetFunctions(core::mem::transmute(connectionhandle), core::mem::transmute(functionid), core::mem::transmute(supported.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(connectionhandle), core::mem::transmute(infotype), core::mem::transmute(infovalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(stringlengthptr.unwrap_or(core::ptr::null_mut()))) + SQLGetInfo(core::mem::transmute(connectionhandle), core::mem::transmute(infotype), core::mem::transmute(infovalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(stringlengthptr.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hdbc), core::mem::transmute(finfotype), core::mem::transmute(rgbinfovalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbinfovaluemax), core::mem::transmute(pcbinfovalue.unwrap_or(core::ptr::null_mut()))) + SQLGetInfoA(core::mem::transmute(hdbc), core::mem::transmute(finfotype), core::mem::transmute(rgbinfovalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinfovaluemax), core::mem::transmute(pcbinfovalue.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(hdbc), core::mem::transmute(finfotype), core::mem::transmute(rgbinfovalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbinfovaluemax), core::mem::transmute(pcbinfovalue.unwrap_or(core::ptr::null_mut()))) + SQLGetInfoW(core::mem::transmute(hdbc), core::mem::transmute(finfotype), core::mem::transmute(rgbinfovalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbinfovaluemax), core::mem::transmute(pcbinfovalue.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SQLGetNextEnumeration(henumhandle: P0, prgenumdata: *mut u8, pienumlength: *mut i32) -> i16 -where - P0: windows_core::Param, -{ +pub unsafe fn SQLGetNextEnumeration(henumhandle: super::super::Foundation::HANDLE, prgenumdata: *mut u8, pienumlength: *mut i32) -> i16 { windows_targets::link!("odbcbcp.dll" "system" fn SQLGetNextEnumeration(henumhandle : super::super::Foundation:: HANDLE, prgenumdata : *mut u8, pienumlength : *mut i32) -> i16); - SQLGetNextEnumeration(henumhandle.param().abi(), core::mem::transmute(prgenumdata), core::mem::transmute(pienumlength)) + SQLGetNextEnumeration(core::mem::transmute(henumhandle), core::mem::transmute(prgenumdata), core::mem::transmute(pienumlength)) } #[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(core::mem::transmute(statementhandle), core::mem::transmute(attribute), core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) + SQLGetStmtAttr(core::mem::transmute(statementhandle), core::mem::transmute(attribute), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed()))) } #[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 +975,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(core::mem::transmute(hstmt), core::mem::transmute(pcpar.unwrap_or(core::ptr::null_mut()))) + SQLNumParams(core::mem::transmute(hstmt), core::mem::transmute(pcpar.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SQLNumResultCols(statementhandle: *mut core::ffi::c_void, columncount: *mut i16) -> i16 { @@ -991,7 +985,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(core::mem::transmute(statementhandle), core::mem::transmute(value.unwrap_or(core::ptr::null_mut()))) + SQLParamData(core::mem::transmute(statementhandle), core::mem::transmute(value.unwrap_or(core::mem::zeroed()))) } #[cfg(target_arch = "x86")] #[inline] @@ -1170,17 +1164,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(core::mem::transmute(connectionhandle), core::mem::transmute(attribute), core::mem::transmute(value.unwrap_or(core::ptr::null())), core::mem::transmute(stringlength)) + SQLSetConnectAttr(core::mem::transmute(connectionhandle), core::mem::transmute(attribute), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hdbc), core::mem::transmute(fattribute), core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null())), core::mem::transmute(cbvalue)) + SQLSetConnectAttrA(core::mem::transmute(hdbc), core::mem::transmute(fattribute), core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hdbc), core::mem::transmute(fattribute), core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null())), core::mem::transmute(cbvalue)) + SQLSetConnectAttrW(core::mem::transmute(hdbc), core::mem::transmute(fattribute), core::mem::transmute(rgbvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbvalue)) } #[cfg(target_arch = "x86")] #[inline] @@ -1247,18 +1241,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: 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(core::mem::transmute(descriptorhandle), core::mem::transmute(recnumber), core::mem::transmute(r#type), core::mem::transmute(subtype), core::mem::transmute(length), core::mem::transmute(precision), core::mem::transmute(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()))) + SQLSetDescRec(core::mem::transmute(descriptorhandle), core::mem::transmute(recnumber), core::mem::transmute(r#type), core::mem::transmute(subtype), core::mem::transmute(length), core::mem::transmute(precision), core::mem::transmute(scale), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(indicator.unwrap_or(core::mem::zeroed()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[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(core::mem::transmute(descriptorhandle), core::mem::transmute(recnumber), core::mem::transmute(r#type), core::mem::transmute(subtype), core::mem::transmute(length), core::mem::transmute(precision), core::mem::transmute(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()))) + SQLSetDescRec(core::mem::transmute(descriptorhandle), core::mem::transmute(recnumber), core::mem::transmute(r#type), core::mem::transmute(subtype), core::mem::transmute(length), core::mem::transmute(precision), core::mem::transmute(scale), core::mem::transmute(data.unwrap_or(core::mem::zeroed())), core::mem::transmute(stringlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(indicator.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(environmenthandle), core::mem::transmute(attribute), core::mem::transmute(value.unwrap_or(core::ptr::null())), core::mem::transmute(stringlength)) + SQLSetEnvAttr(core::mem::transmute(environmenthandle), core::mem::transmute(attribute), core::mem::transmute(value.unwrap_or(core::mem::zeroed())), core::mem::transmute(stringlength)) } #[cfg(target_arch = "x86")] #[inline] @@ -5390,28 +5384,19 @@ impl windows_core::TypeKind for HITRANGE { windows_core::imp::define_interface!(IAccessor, IAccessor_Vtbl, 0x0c733a8c_2a1c_11ce_ade5_00aa0044773d); windows_core::imp::interface_hierarchy!(IAccessor, windows_core::IUnknown); impl IAccessor { - pub unsafe fn AddRefAccessor(&self, haccessor: P0, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> - 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(core::ptr::null_mut()))).ok() + pub unsafe fn AddRefAccessor(&self, haccessor: HACCESSOR, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddRefAccessor)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(pcrefcount.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dwaccessorflags), core::mem::transmute(cbindings), core::mem::transmute(rgbindings), core::mem::transmute(cbrowsize), core::mem::transmute(phaccessor), core::mem::transmute(rgstatus.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateAccessor)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaccessorflags), core::mem::transmute(cbindings), core::mem::transmute(rgbindings), core::mem::transmute(cbrowsize), core::mem::transmute(phaccessor), core::mem::transmute(rgstatus.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(pdwaccessorflags), core::mem::transmute(pcbindings.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prgbindings)).ok() + pub unsafe fn GetBindings(&self, haccessor: HACCESSOR, pdwaccessorflags: *mut u32, pcbindings: Option<*mut usize>, prgbindings: *mut *mut DBBINDING) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetBindings)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(pdwaccessorflags), core::mem::transmute(pcbindings.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut()))).ok() + pub unsafe fn ReleaseAccessor(&self, haccessor: HACCESSOR, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseAccessor)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(pcrefcount.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5565,7 +5550,7 @@ impl IBindResource { P1: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), core::mem::transmute(dwbindurlflags), core::mem::transmute(rguid), core::mem::transmute(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() + (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), core::mem::transmute(dwbindurlflags), core::mem::transmute(rguid), core::mem::transmute(riid), pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbindstatus.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppunk)).ok() } } #[repr(C)] @@ -5599,10 +5584,10 @@ windows_core::imp::define_interface!(IChapteredRowset, IChapteredRowset_Vtbl, 0x 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), core::mem::transmute(hchapter), core::mem::transmute(pcrefcount.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddRefChapter)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), core::mem::transmute(pcrefcount.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(hchapter), core::mem::transmute(pcrefcount.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReleaseChapter)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), core::mem::transmute(pcrefcount.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5759,11 +5744,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), core::mem::transmute(pccolumns), core::mem::transmute(prginfo), core::mem::transmute(ppstringsbuffer.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pccolumns), core::mem::transmute(prginfo), core::mem::transmute(ppstringsbuffer.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(ccolumnids), core::mem::transmute(rgcolumnids.unwrap_or(core::ptr::null())), core::mem::transmute(rgcolumns.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).MapColumnIDs)(windows_core::Interface::as_raw(self), core::mem::transmute(ccolumnids), core::mem::transmute(rgcolumnids.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgcolumns.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5817,7 +5802,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()), core::mem::transmute(dwflags), core::mem::transmute(pccolumns), core::mem::transmute(prgcolumnids), core::mem::transmute(prgcolumninfo), core::mem::transmute(ppstringsbuffer.unwrap_or(core::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()), core::mem::transmute(dwflags), core::mem::transmute(pccolumns), core::mem::transmute(prgcolumnids), core::mem::transmute(prgcolumninfo), core::mem::transmute(ppstringsbuffer.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -5912,7 +5897,7 @@ impl ICommand { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(riid), core::mem::transmute(pparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcrowsaffected.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetDBSession(&self, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6242,7 +6227,7 @@ windows_core::imp::define_interface!(ICommandStream, ICommandStream_Vtbl, 0x0c73 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(core::ptr::null_mut())), core::mem::transmute(pguiddialect.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pguiddialect.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcommandstream)).ok() } pub unsafe fn SetCommandStream(&self, riid: *const windows_core::GUID, rguiddialect: *const windows_core::GUID, pcommandstream: P2) -> windows_core::Result<()> where @@ -6292,7 +6277,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(core::ptr::null_mut())), core::mem::transmute(ppwszcommand)).ok() + (windows_core::Interface::vtable(self).GetCommandText)(windows_core::Interface::as_raw(self), core::mem::transmute(pguiddialect.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwszcommand)).ok() } pub unsafe fn SetCommandText(&self, rguiddialect: *const windows_core::GUID, pwszcommand: P1) -> windows_core::Result<()> where @@ -6378,14 +6363,14 @@ 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), core::mem::transmute(pcparams), core::mem::transmute(prgparaminfo), core::mem::transmute(ppnamesbuffer.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetParameterInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pcparams), core::mem::transmute(prgparaminfo), core::mem::transmute(ppnamesbuffer.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn MapParameterNames(&self, cparamnames: usize, rgparamnames: *const windows_core::PCWSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MapParameterNames)(windows_core::Interface::as_raw(self), core::mem::transmute(cparamnames), core::mem::transmute(rgparamnames), &mut result__).map(|| result__) } 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), core::mem::transmute(cparams), core::mem::transmute(rgparamordinals.unwrap_or(core::ptr::null())), core::mem::transmute(rgparambindinfo.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetParameterInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(cparams), core::mem::transmute(rgparamordinals.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgparambindinfo.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -6465,7 +6450,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(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() + (windows_core::Interface::vtable(self).GetComparisonInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszpropertyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcop.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppropvar.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetValueType(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6476,7 +6461,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(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() + (windows_core::Interface::vtable(self).GetInputTerms)(windows_core::Interface::as_raw(self), core::mem::transmute(pppropertyterm.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppoperationterm.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppvalueterm.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Clone(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6602,7 +6587,7 @@ impl ICondition2 { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] pub unsafe fn GetLeafConditionInfo(&self, ppropkey: Option<*mut super::super::Foundation::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(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() + (windows_core::Interface::vtable(self).GetLeafConditionInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppropkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcop.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppropvar.unwrap_or(core::mem::zeroed()))).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -6689,7 +6674,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(), core::mem::transmute(sqro), core::mem::transmute(pstreferencetime.unwrap_or(core::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(), core::mem::transmute(sqro), core::mem::transmute(pstreferencetime.unwrap_or(core::mem::zeroed())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -6866,7 +6851,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(), core::mem::transmute(sqro), core::mem::transmute(pstreferencetime.unwrap_or(core::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(), core::mem::transmute(sqro), core::mem::transmute(pstreferencetime.unwrap_or(core::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -7015,7 +7000,7 @@ impl IConditionGenerator { P0: windows_core::Param, P2: 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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -7116,7 +7101,7 @@ impl ICreateRow { P1: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateRow)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), core::mem::transmute(dwbindurlflags), core::mem::transmute(rguid), core::mem::transmute(riid), pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwbindstatus), core::mem::transmute(ppwsznewurl.unwrap_or(core::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(), core::mem::transmute(dwbindurlflags), core::mem::transmute(rguid), core::mem::transmute(riid), pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwbindstatus), core::mem::transmute(ppwsznewurl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppunk)).ok() } } #[repr(C)] @@ -7210,7 +7195,7 @@ impl IDBAsynchStatus { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), core::mem::transmute(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), core::mem::transmute(hchapter), core::mem::transmute(eoperation), core::mem::transmute(pulprogress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pulprogressmax.unwrap_or(core::ptr::null_mut())), core::mem::transmute(peasynchphase), core::mem::transmute(ppwszstatustext.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), core::mem::transmute(eoperation), core::mem::transmute(pulprogress.unwrap_or(core::mem::zeroed())), core::mem::transmute(pulprogressmax.unwrap_or(core::mem::zeroed())), core::mem::transmute(peasynchphase), core::mem::transmute(ppwszstatustext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -7361,14 +7346,14 @@ impl IDBDataSourceAdmin { where P2: 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(), core::mem::transmute(riid), core::mem::transmute(ppdbsession.unwrap_or(core::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(), core::mem::transmute(riid), core::mem::transmute(ppdbsession.unwrap_or(core::mem::zeroed()))).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())), core::mem::transmute(pcpropertyinfosets), core::mem::transmute(prgpropertyinfosets), core::mem::transmute(ppdescbuffer.unwrap_or(core::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())), core::mem::transmute(pcpropertyinfosets), core::mem::transmute(prgpropertyinfosets), core::mem::transmute(ppdescbuffer.unwrap_or(core::mem::zeroed()))).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<()> { @@ -7524,22 +7509,20 @@ impl windows_core::RuntimeName for IDBInitialize {} windows_core::imp::define_interface!(IDBPromptInitialize, IDBPromptInitialize_Vtbl, 0x2206ccb0_19c1_11d1_89e0_00c04fd7a829); windows_core::imp::interface_hierarchy!(IDBPromptInitialize, windows_core::IUnknown); impl IDBPromptInitialize { - pub unsafe fn PromptDataSource(&self, punkouter: P0, hwndparent: P1, dwpromptoptions: u32, rgsourcetypefilter: Option<&[u32]>, pwszszzproviderfilter: P5, riid: *const windows_core::GUID, ppdatasource: *mut Option) -> windows_core::Result<()> + pub unsafe fn PromptDataSource(&self, punkouter: P0, hwndparent: super::super::Foundation::HWND, dwpromptoptions: u32, rgsourcetypefilter: Option<&[u32]>, pwszszzproviderfilter: P5, riid: *const windows_core::GUID, ppdatasource: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).PromptDataSource)(windows_core::Interface::as_raw(self), punkouter.param().abi(), hwndparent.param().abi(), core::mem::transmute(dwpromptoptions), rgsourcetypefilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgsourcetypefilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pwszszzproviderfilter.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppdatasource)).ok() + (windows_core::Interface::vtable(self).PromptDataSource)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(hwndparent), core::mem::transmute(dwpromptoptions), rgsourcetypefilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgsourcetypefilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pwszszzproviderfilter.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppdatasource)).ok() } - pub unsafe fn PromptFileName(&self, hwndparent: P0, dwpromptoptions: u32, pwszinitialdirectory: P2, pwszinitialfile: P3) -> windows_core::Result + pub unsafe fn PromptFileName(&self, hwndparent: super::super::Foundation::HWND, dwpromptoptions: u32, pwszinitialdirectory: P2, pwszinitialfile: P3) -> windows_core::Result where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).PromptFileName)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(dwpromptoptions), pwszinitialdirectory.param().abi(), pwszinitialfile.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).PromptFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(dwpromptoptions), pwszinitialdirectory.param().abi(), pwszinitialfile.param().abi(), &mut result__).map(|| result__) } } #[repr(C)] @@ -7588,7 +7571,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())), core::mem::transmute(pcpropertyinfosets), core::mem::transmute(prgpropertyinfosets), core::mem::transmute(ppdescbuffer.unwrap_or(core::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())), core::mem::transmute(pcpropertyinfosets), core::mem::transmute(prgpropertyinfosets), core::mem::transmute(ppdescbuffer.unwrap_or(core::mem::zeroed()))).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<()> { @@ -7880,12 +7863,12 @@ impl IDataConvert { core::mem::transmute(wsrctype), core::mem::transmute(wdsttype), core::mem::transmute(cbsrclength), - core::mem::transmute(pcbdstlength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbdstlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(psrc), core::mem::transmute(pdst), core::mem::transmute(cbdstmaxlength), core::mem::transmute(dbssrcstatus), - core::mem::transmute(pdbsstatus.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdbsstatus.unwrap_or(core::mem::zeroed())), core::mem::transmute(bprecision), core::mem::transmute(bscale), core::mem::transmute(dwflags), @@ -7896,7 +7879,7 @@ impl IDataConvert { (windows_core::Interface::vtable(self).CanConvert)(windows_core::Interface::as_raw(self), core::mem::transmute(wsrctype), core::mem::transmute(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), core::mem::transmute(wsrctype), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetConversionSize)(windows_core::Interface::as_raw(self), core::mem::transmute(wsrctype), core::mem::transmute(wdsttype), core::mem::transmute(pcbsrclength.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdstlength.unwrap_or(core::mem::zeroed())), core::mem::transmute(psrc.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8085,11 +8068,8 @@ impl IDataSourceLocator { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).hWnd)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SethWnd(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SethWnd)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn SethWnd(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SethWnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } pub unsafe fn PromptNew(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8164,7 +8144,7 @@ windows_core::imp::define_interface!(IEntity, IEntity_Vtbl, 0x24264891_e80b_4fd3 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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszname.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Base(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8206,7 +8186,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8618,7 +8598,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), core::mem::transmute(hrerror), core::mem::transmute(dwlookupid), core::mem::transmute(pdispparams), core::mem::transmute(lcid), core::mem::transmute(pbstrsource.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrdescription.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetErrorDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(hrerror), core::mem::transmute(dwlookupid), core::mem::transmute(pdispparams), core::mem::transmute(lcid), core::mem::transmute(pbstrsource.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbstrdescription.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(hrerror), core::mem::transmute(dwlookupid), core::mem::transmute(lcid), core::mem::transmute(pbstrhelpfile), core::mem::transmute(pdwhelpcontext)).ok() @@ -8679,7 +8659,7 @@ impl IErrorRecords { where P3: windows_core::Param, { - (windows_core::Interface::vtable(self).AddErrorRecord)(windows_core::Interface::as_raw(self), core::mem::transmute(perrorinfo), core::mem::transmute(dwlookupid), core::mem::transmute(pdispparams.unwrap_or(core::ptr::null())), punkcustomerror.param().abi(), core::mem::transmute(dwdynamicerrorid)).ok() + (windows_core::Interface::vtable(self).AddErrorRecord)(windows_core::Interface::as_raw(self), core::mem::transmute(perrorinfo), core::mem::transmute(dwlookupid), core::mem::transmute(pdispparams.unwrap_or(core::mem::zeroed())), punkcustomerror.param().abi(), core::mem::transmute(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), core::mem::transmute(ulrecordnum), core::mem::transmute(perrorinfo)).ok() @@ -8966,11 +8946,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).CreateIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(ptableid), core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed())), 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::mem::zeroed()))).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), core::mem::transmute(ptableid), core::mem::transmute(pindexid.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DropIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(ptableid), core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -9197,11 +9177,8 @@ impl IMDDataset { { (windows_core::Interface::vtable(self).GetAxisRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(iaxis), core::mem::transmute(riid), rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(pprowset)).ok() } - pub unsafe fn GetCellData(&self, haccessor: P0, ulstartcell: usize, ulendcell: usize, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCellData)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(ulstartcell), core::mem::transmute(ulendcell), core::mem::transmute(pdata)).ok() + pub unsafe fn GetCellData(&self, haccessor: HACCESSOR, ulstartcell: usize, ulendcell: usize, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCellData)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(ulstartcell), core::mem::transmute(ulendcell), core::mem::transmute(pdata)).ok() } pub unsafe fn GetSpecification(&self, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9365,7 +9342,7 @@ windows_core::imp::define_interface!(IMetaData, IMetaData_Vtbl, 0x780102b0_c43b_ 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(core::ptr::null_mut())), core::mem::transmute(ppszvalue.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppszvalue.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -9396,7 +9373,7 @@ impl IMultipleResults { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetResult)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(lresultflag), core::mem::transmute(riid), core::mem::transmute(pcrowsaffected.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetResult)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(lresultflag), core::mem::transmute(riid), core::mem::transmute(pcrowsaffected.unwrap_or(core::mem::zeroed())), core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -9455,7 +9432,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -9715,7 +9692,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(core::ptr::null())), core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), core::mem::transmute(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() + (windows_core::Interface::vtable(self).OpenRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(ptableid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).ok() } } #[repr(C)] @@ -10132,7 +10109,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(core::ptr::null_mut())), core::mem::transmute(ppmaintype.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuery)(windows_core::Interface::as_raw(self), core::mem::transmute(ppquerynode.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppmaintype.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetErrors(&self) -> windows_core::Result where @@ -10142,7 +10119,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(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() + (windows_core::Interface::vtable(self).GetLexicalData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszinputstring.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptokens.unwrap_or(core::mem::zeroed())), core::mem::transmute(plcid.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwordbreaker.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -10192,11 +10169,8 @@ impl windows_core::RuntimeName for IQuerySolution {} windows_core::imp::define_interface!(IReadData, IReadData_Vtbl, 0x0c733a6a_2a1c_11ce_ade5_00aa0044773d); windows_core::imp::interface_hierarchy!(IReadData, windows_core::IUnknown); impl IReadData { - pub unsafe fn ReadData(&self, hchapter: usize, pbookmark: &[u8], lrowsoffset: isize, haccessor: P4, crows: isize, pcrowsobtained: *mut usize, ppfixeddata: *mut *mut u8, pcbvariabletotal: *mut usize, ppvariabledata: *mut *mut u8) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), core::mem::transmute(lrowsoffset), haccessor.param().abi(), core::mem::transmute(crows), core::mem::transmute(pcrowsobtained), core::mem::transmute(ppfixeddata), core::mem::transmute(pcbvariabletotal), core::mem::transmute(ppvariabledata)).ok() + pub unsafe fn ReadData(&self, hchapter: usize, pbookmark: &[u8], lrowsoffset: isize, haccessor: HACCESSOR, crows: isize, pcrowsobtained: *mut usize, ppfixeddata: *mut *mut u8, pcbvariabletotal: *mut usize, ppvariabledata: *mut *mut u8) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), core::mem::transmute(lrowsoffset), core::mem::transmute(haccessor), core::mem::transmute(crows), core::mem::transmute(pcrowsobtained), core::mem::transmute(ppfixeddata), core::mem::transmute(pcbvariabletotal), core::mem::transmute(ppvariabledata)).ok() } pub unsafe fn ReleaseChapter(&self, hchapter: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseChapter)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter)).ok() @@ -10304,7 +10278,7 @@ windows_core::imp::define_interface!(IRelationship, IRelationship_Vtbl, 0x276928 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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszname.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn IsReal(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10322,7 +10296,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -10394,7 +10368,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(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() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfirstpos.unwrap_or(core::mem::zeroed())), core::mem::transmute(plength.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsz.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -10432,14 +10406,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), core::mem::transmute(riid), core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phrow.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceRowset)(windows_core::Interface::as_raw(self), core::mem::transmute(riid), core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed())), core::mem::transmute(phrow.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(pcolumnid), core::mem::transmute(rguidcolumntype), core::mem::transmute(dwbindflags), core::mem::transmute(riid), core::mem::transmute(ppunk.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(pcolumnid), core::mem::transmute(rguidcolumntype), core::mem::transmute(dwbindflags), core::mem::transmute(riid), core::mem::transmute(ppunk.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -10531,7 +10505,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(core::ptr::null_mut())), core::mem::transmute(phrow), core::mem::transmute(pdwpositionflags.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRowPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(phchapter.unwrap_or(core::mem::zeroed())), core::mem::transmute(phrow), core::mem::transmute(pdwpositionflags.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetRowset(&self, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10696,11 +10670,8 @@ impl IRowset { pub unsafe fn AddRefRows(&self, crows: usize, rghrows: *const usize, rgrefcounts: *mut u32, rgrowstatus: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddRefRows)(windows_core::Interface::as_raw(self), core::mem::transmute(crows), core::mem::transmute(rghrows), core::mem::transmute(rgrefcounts), core::mem::transmute(rgrowstatus)).ok() } - pub unsafe fn GetData(&self, hrow: usize, haccessor: P1, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), haccessor.param().abi(), core::mem::transmute(pdata)).ok() + pub unsafe fn GetData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), core::mem::transmute(haccessor), core::mem::transmute(pdata)).ok() } pub unsafe fn GetNextRows(&self, hreserved: usize, lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetNextRows)(windows_core::Interface::as_raw(self), core::mem::transmute(hreserved), core::mem::transmute(lrowsoffset), prghrows.len().try_into().unwrap(), core::mem::transmute(pcrowsobtained), core::mem::transmute(prghrows.as_ptr())).ok() @@ -10836,18 +10807,12 @@ impl IRowsetChange { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DeleteRows)(windows_core::Interface::as_raw(self), core::mem::transmute(hreserved), core::mem::transmute(crows), core::mem::transmute(rghrows), &mut result__).map(|| result__) } - pub unsafe fn SetData(&self, hrow: usize, haccessor: P1, pdata: *const core::ffi::c_void) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), haccessor.param().abi(), core::mem::transmute(pdata)).ok() + pub unsafe fn SetData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *const core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), core::mem::transmute(haccessor), core::mem::transmute(pdata)).ok() } - pub unsafe fn InsertRow(&self, hreserved: usize, haccessor: P1, pdata: *const core::ffi::c_void) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn InsertRow(&self, hreserved: usize, haccessor: HACCESSOR, pdata: *const core::ffi::c_void) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).InsertRow)(windows_core::Interface::as_raw(self), core::mem::transmute(hreserved), haccessor.param().abi(), core::mem::transmute(pdata), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).InsertRow)(windows_core::Interface::as_raw(self), core::mem::transmute(hreserved), core::mem::transmute(haccessor), core::mem::transmute(pdata), &mut result__).map(|| result__) } } #[repr(C)] @@ -11225,11 +11190,8 @@ impl windows_core::RuntimeName for IRowsetExactScroll {} windows_core::imp::define_interface!(IRowsetFastLoad, IRowsetFastLoad_Vtbl, 0x5cf4ca13_ef21_11d0_97e7_00c04fc2ad98); windows_core::imp::interface_hierarchy!(IRowsetFastLoad, windows_core::IUnknown); impl IRowsetFastLoad { - pub unsafe fn InsertRow(&self, haccessor: P0, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InsertRow)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(pdata)).ok() + pub unsafe fn InsertRow(&self, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InsertRow)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(pdata)).ok() } pub unsafe fn Commit(&self, fdone: P0) -> windows_core::Result<()> where @@ -11268,11 +11230,8 @@ impl windows_core::RuntimeName for IRowsetFastLoad {} windows_core::imp::define_interface!(IRowsetFind, IRowsetFind_Vtbl, 0x0c733a9d_2a1c_11ce_ade5_00aa0044773d); windows_core::imp::interface_hierarchy!(IRowsetFind, windows_core::IUnknown); impl IRowsetFind { - pub unsafe fn FindNextRow(&self, hchapter: usize, haccessor: P1, pfindvalue: *const core::ffi::c_void, compareop: u32, pbookmark: &[u8], lrowsoffset: isize, crows: isize, pcrowsobtained: *mut usize, prghrows: *mut *mut usize) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).FindNextRow)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), haccessor.param().abi(), core::mem::transmute(pfindvalue), core::mem::transmute(compareop), pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), core::mem::transmute(lrowsoffset), core::mem::transmute(crows), core::mem::transmute(pcrowsobtained), core::mem::transmute(prghrows)).ok() + pub unsafe fn FindNextRow(&self, hchapter: usize, haccessor: HACCESSOR, pfindvalue: *const core::ffi::c_void, compareop: u32, pbookmark: &[u8], lrowsoffset: isize, crows: isize, pcrowsobtained: *mut usize, prghrows: *mut *mut usize) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).FindNextRow)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), core::mem::transmute(haccessor), core::mem::transmute(pfindvalue), core::mem::transmute(compareop), pbookmark.len().try_into().unwrap(), core::mem::transmute(pbookmark.as_ptr()), core::mem::transmute(lrowsoffset), core::mem::transmute(crows), core::mem::transmute(pcrowsobtained), core::mem::transmute(prghrows)).ok() } } #[repr(C)] @@ -11331,17 +11290,11 @@ impl IRowsetIndex { pub unsafe fn GetIndexInfo(&self, pckeycolumns: *mut usize, prgindexcolumndesc: *mut *mut DBINDEXCOLUMNDESC, pcindexpropertysets: *mut u32, prgindexpropertysets: *mut *mut DBPROPSET) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetIndexInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pckeycolumns), core::mem::transmute(prgindexcolumndesc), core::mem::transmute(pcindexpropertysets), core::mem::transmute(prgindexpropertysets)).ok() } - pub unsafe fn Seek(&self, haccessor: P0, ckeyvalues: usize, pdata: *const core::ffi::c_void, dwseekoptions: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(ckeyvalues), core::mem::transmute(pdata), core::mem::transmute(dwseekoptions)).ok() + pub unsafe fn Seek(&self, haccessor: HACCESSOR, ckeyvalues: usize, pdata: *const core::ffi::c_void, dwseekoptions: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(ckeyvalues), core::mem::transmute(pdata), core::mem::transmute(dwseekoptions)).ok() } - pub unsafe fn SetRange(&self, haccessor: P0, cstartkeycolumns: usize, pstartdata: *const core::ffi::c_void, cendkeycolumns: usize, penddata: *const core::ffi::c_void, dwrangeoptions: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRange)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(cstartkeycolumns), core::mem::transmute(pstartdata), core::mem::transmute(cendkeycolumns), core::mem::transmute(penddata), core::mem::transmute(dwrangeoptions)).ok() + pub unsafe fn SetRange(&self, haccessor: HACCESSOR, cstartkeycolumns: usize, pstartdata: *const core::ffi::c_void, cendkeycolumns: usize, penddata: *const core::ffi::c_void, dwrangeoptions: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRange)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(cstartkeycolumns), core::mem::transmute(pstartdata), core::mem::transmute(cendkeycolumns), core::mem::transmute(penddata), core::mem::transmute(dwrangeoptions)).ok() } } #[repr(C)] @@ -11565,12 +11518,9 @@ impl windows_core::RuntimeName for IRowsetLocate {} windows_core::imp::define_interface!(IRowsetNewRowAfter, IRowsetNewRowAfter_Vtbl, 0x0c733a71_2a1c_11ce_ade5_00aa0044773d); windows_core::imp::interface_hierarchy!(IRowsetNewRowAfter, windows_core::IUnknown); impl IRowsetNewRowAfter { - pub unsafe fn SetNewDataAfter(&self, hchapter: usize, pbmprevious: &[u8], haccessor: P3, pdata: *const u8) -> windows_core::Result - where - P3: windows_core::Param, - { + pub unsafe fn SetNewDataAfter(&self, hchapter: usize, pbmprevious: &[u8], haccessor: HACCESSOR, pdata: *const u8) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).SetNewDataAfter)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), pbmprevious.len().try_into().unwrap(), core::mem::transmute(pbmprevious.as_ptr()), haccessor.param().abi(), core::mem::transmute(pdata), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).SetNewDataAfter)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), pbmprevious.len().try_into().unwrap(), core::mem::transmute(pbmprevious.as_ptr()), core::mem::transmute(haccessor), core::mem::transmute(pdata), &mut result__).map(|| result__) } } #[repr(C)] @@ -11802,11 +11752,8 @@ impl IRowsetRefresh { { (windows_core::Interface::vtable(self).RefreshVisibleData)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), core::mem::transmute(crows), core::mem::transmute(rghrows), foverwrite.param().abi(), core::mem::transmute(pcrowsrefreshed), core::mem::transmute(prghrowsrefreshed), core::mem::transmute(prgrowstatus)).ok() } - pub unsafe fn GetLastVisibleData(&self, hrow: usize, haccessor: P1, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetLastVisibleData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), haccessor.param().abi(), core::mem::transmute(pdata)).ok() + pub unsafe fn GetLastVisibleData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetLastVisibleData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), core::mem::transmute(haccessor), core::mem::transmute(pdata)).ok() } } #[repr(C)] @@ -11843,11 +11790,8 @@ impl windows_core::RuntimeName for IRowsetRefresh {} windows_core::imp::define_interface!(IRowsetResynch, IRowsetResynch_Vtbl, 0x0c733a84_2a1c_11ce_ade5_00aa0044773d); windows_core::imp::interface_hierarchy!(IRowsetResynch, windows_core::IUnknown); impl IRowsetResynch { - pub unsafe fn GetVisibleData(&self, hrow: usize, haccessor: P1, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetVisibleData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), haccessor.param().abi(), core::mem::transmute(pdata)).ok() + pub unsafe fn GetVisibleData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetVisibleData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), core::mem::transmute(haccessor), core::mem::transmute(pdata)).ok() } pub unsafe fn ResynchRows(&self, crows: usize, rghrows: *const usize, pcrowsresynched: *mut usize, prghrowsresynched: *mut *mut usize, prgrowstatus: *mut *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResynchRows)(windows_core::Interface::as_raw(self), core::mem::transmute(crows), core::mem::transmute(rghrows), core::mem::transmute(pcrowsresynched), core::mem::transmute(prghrowsresynched), core::mem::transmute(prgrowstatus)).ok() @@ -11940,11 +11884,8 @@ impl core::ops::Deref for IRowsetUpdate { } windows_core::imp::interface_hierarchy!(IRowsetUpdate, windows_core::IUnknown, IRowsetChange); impl IRowsetUpdate { - pub unsafe fn GetOriginalData(&self, hrow: usize, haccessor: P1, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetOriginalData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), haccessor.param().abi(), core::mem::transmute(pdata)).ok() + pub unsafe fn GetOriginalData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetOriginalData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), core::mem::transmute(haccessor), core::mem::transmute(pdata)).ok() } pub unsafe fn GetPendingRows(&self, hreserved: usize, dwrowstatus: u32, pcpendingrows: *mut usize, prgpendingrows: *mut *mut usize, prgpendingstatus: *mut *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPendingRows)(windows_core::Interface::as_raw(self), core::mem::transmute(hreserved), core::mem::transmute(dwrowstatus), core::mem::transmute(pcpendingrows), core::mem::transmute(prgpendingrows), core::mem::transmute(prgpendingstatus)).ok() @@ -12322,7 +12263,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDiagField)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiaginfo.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -12460,11 +12401,8 @@ impl ISchemaLock { pub unsafe fn GetSchemaLock(&self, ptableid: *mut super::super::Storage::IndexServer::DBID, lmmode: u32, phlockhandle: *mut super::super::Foundation::HANDLE, ptableversion: *mut u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSchemaLock)(windows_core::Interface::as_raw(self), core::mem::transmute(ptableid), core::mem::transmute(lmmode), core::mem::transmute(phlockhandle), core::mem::transmute(ptableversion)).ok() } - pub unsafe fn ReleaseSchemaLock(&self, hlockhandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseSchemaLock)(windows_core::Interface::as_raw(self), hlockhandle.param().abi()).ok() + pub unsafe fn ReleaseSchemaLock(&self, hlockhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseSchemaLock)(windows_core::Interface::as_raw(self), core::mem::transmute(hlockhandle)).ok() } } #[repr(C)] @@ -12645,14 +12583,14 @@ impl IScopedOperations { where P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Copy)(windows_core::Interface::as_raw(self), core::mem::transmute(crows), core::mem::transmute(rgpwszsourceurls.unwrap_or(core::ptr::null())), core::mem::transmute(rgpwszdesturls), core::mem::transmute(dwcopyflags), pauthenticate.param().abi(), core::mem::transmute(rgdwstatus), core::mem::transmute(rgpwsznewurls.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppstringsbuffer.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Copy)(windows_core::Interface::as_raw(self), core::mem::transmute(crows), core::mem::transmute(rgpwszsourceurls.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpwszdesturls), core::mem::transmute(dwcopyflags), pauthenticate.param().abi(), core::mem::transmute(rgdwstatus), core::mem::transmute(rgpwsznewurls.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppstringsbuffer.unwrap_or(core::mem::zeroed()))).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: P4, rgdwstatus: *mut u32, rgpwsznewurls: Option<*mut windows_core::PWSTR>, ppstringsbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> where P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Move)(windows_core::Interface::as_raw(self), core::mem::transmute(crows), core::mem::transmute(rgpwszsourceurls.unwrap_or(core::ptr::null())), core::mem::transmute(rgpwszdesturls), core::mem::transmute(dwmoveflags), pauthenticate.param().abi(), core::mem::transmute(rgdwstatus), core::mem::transmute(rgpwsznewurls.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppstringsbuffer.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Move)(windows_core::Interface::as_raw(self), core::mem::transmute(crows), core::mem::transmute(rgpwszsourceurls.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpwszdesturls), core::mem::transmute(dwmoveflags), pauthenticate.param().abi(), core::mem::transmute(rgdwstatus), core::mem::transmute(rgpwsznewurls.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppstringsbuffer.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Delete(&self, crows: usize, rgpwszurls: *const windows_core::PCWSTR, dwdeleteflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -12663,7 +12601,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(core::ptr::null())), core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), core::mem::transmute(riid), rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(pprowset.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pindexid.unwrap_or(core::mem::zeroed())), core::mem::transmute(riid), rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -15535,12 +15473,11 @@ impl windows_core::RuntimeName for ISubscriptionItem {} windows_core::imp::define_interface!(ISubscriptionMgr, ISubscriptionMgr_Vtbl, 0x085fb2c0_0df8_11d1_8f4b_00a0c905413f); windows_core::imp::interface_hierarchy!(ISubscriptionMgr, windows_core::IUnknown); impl ISubscriptionMgr { - pub unsafe fn DeleteSubscription(&self, pwszurl: P0, hwnd: P1) -> windows_core::Result<()> + pub unsafe fn DeleteSubscription(&self, pwszurl: P0, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteSubscription)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).DeleteSubscription)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), core::mem::transmute(hwnd)).ok() } pub unsafe fn UpdateSubscription(&self, pwszurl: P0) -> windows_core::Result<()> where @@ -15567,20 +15504,18 @@ impl ISubscriptionMgr { pub unsafe fn GetDefaultInfo(&self, subtype: SUBSCRIPTIONTYPE, pinfo: *mut SUBSCRIPTIONINFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDefaultInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(subtype), core::mem::transmute(pinfo)).ok() } - pub unsafe fn ShowSubscriptionProperties(&self, pwszurl: P0, hwnd: P1) -> windows_core::Result<()> + pub unsafe fn ShowSubscriptionProperties(&self, pwszurl: P0, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ShowSubscriptionProperties)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).ShowSubscriptionProperties)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), core::mem::transmute(hwnd)).ok() } - pub unsafe fn CreateSubscription(&self, hwnd: P0, pwszurl: P1, pwszfriendlyname: P2, dwflags: u32, substype: SUBSCRIPTIONTYPE, pinfo: *mut SUBSCRIPTIONINFO) -> windows_core::Result<()> + pub unsafe fn CreateSubscription(&self, hwnd: super::super::Foundation::HWND, pwszurl: P1, pwszfriendlyname: P2, dwflags: u32, substype: SUBSCRIPTIONTYPE, pinfo: *mut SUBSCRIPTIONINFO) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateSubscription)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pwszurl.param().abi(), pwszfriendlyname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(substype), core::mem::transmute(pinfo)).ok() + (windows_core::Interface::vtable(self).CreateSubscription)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pwszurl.param().abi(), pwszfriendlyname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(substype), core::mem::transmute(pinfo)).ok() } } #[repr(C)] @@ -15843,13 +15778,13 @@ impl ITableCreation { (windows_core::Interface::vtable(self).GetTableDefinition)( windows_core::Interface::as_raw(self), core::mem::transmute(ptableid), - 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())), + core::mem::transmute(pccolumndescs.unwrap_or(core::mem::zeroed())), + core::mem::transmute(prgcolumndescs.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcpropertysets.unwrap_or(core::mem::zeroed())), + core::mem::transmute(prgpropertysets.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pcconstraintdescs.unwrap_or(core::mem::zeroed())), + core::mem::transmute(prgconstraintdescs.unwrap_or(core::mem::zeroed())), + core::mem::transmute(ppwszstringbuffer.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -15892,14 +15827,14 @@ impl ITableDefinition { (windows_core::Interface::vtable(self).CreateTable)( windows_core::Interface::as_raw(self), punkouter.param().abi(), - core::mem::transmute(ptableid.unwrap_or(core::ptr::null())), + core::mem::transmute(ptableid.unwrap_or(core::mem::zeroed())), 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())), core::mem::transmute(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(core::ptr::null_mut())), - core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pptableid.unwrap_or(core::mem::zeroed())), + core::mem::transmute(pprowset.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -15909,7 +15844,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), core::mem::transmute(ptableid), core::mem::transmute(pcolumndesc), core::mem::transmute(ppcolumnid.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddColumn)(windows_core::Interface::as_raw(self), core::mem::transmute(ptableid), core::mem::transmute(pcolumndesc), core::mem::transmute(ppcolumnid.unwrap_or(core::mem::zeroed()))).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<()> { @@ -16110,7 +16045,7 @@ impl ITokenCollection { (windows_core::Interface::vtable(self).NumberOfTokens)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetToken)(windows_core::Interface::as_raw(self), core::mem::transmute(i), core::mem::transmute(pbegin.unwrap_or(core::mem::zeroed())), core::mem::transmute(plength.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsz.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -16230,7 +16165,7 @@ impl ITransactionLocal { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).StartTransaction)(windows_core::Interface::as_raw(self), core::mem::transmute(isolevel), core::mem::transmute(isoflags), potheroptions.param().abi(), core::mem::transmute(pultransactionlevel.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).StartTransaction)(windows_core::Interface::as_raw(self), core::mem::transmute(isolevel), core::mem::transmute(isoflags), potheroptions.param().abi(), core::mem::transmute(pultransactionlevel.unwrap_or(core::mem::zeroed()))).ok() } } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] @@ -17009,7 +16944,7 @@ impl IViewChapter { (windows_core::Interface::vtable(self).GetSpecification)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(hsource), core::mem::transmute(phviewchapter.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).OpenViewChapter)(windows_core::Interface::as_raw(self), core::mem::transmute(hsource), core::mem::transmute(phviewchapter.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -17052,21 +16987,15 @@ impl windows_core::RuntimeName for IViewChapter {} windows_core::imp::define_interface!(IViewFilter, IViewFilter_Vtbl, 0x0c733a9b_2a1c_11ce_ade5_00aa0044773d); windows_core::imp::interface_hierarchy!(IViewFilter, windows_core::IUnknown); impl IViewFilter { - pub unsafe fn GetFilter(&self, haccessor: P0, pcrows: *mut usize, pcompareops: *mut *mut u32, pcriteriadata: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetFilter)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(pcrows), core::mem::transmute(pcompareops), core::mem::transmute(pcriteriadata)).ok() + pub unsafe fn GetFilter(&self, haccessor: HACCESSOR, pcrows: *mut usize, pcompareops: *mut *mut u32, pcriteriadata: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(pcrows), core::mem::transmute(pcompareops), core::mem::transmute(pcriteriadata)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetFilterBindings(&self, pcbindings: *mut usize, prgbindings: *mut *mut DBBINDING) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFilterBindings)(windows_core::Interface::as_raw(self), core::mem::transmute(pcbindings), core::mem::transmute(prgbindings)).ok() } - pub unsafe fn SetFilter(&self, haccessor: P0, compareops: &[u32], pcriteriadata: *const core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFilter)(windows_core::Interface::as_raw(self), haccessor.param().abi(), compareops.len().try_into().unwrap(), core::mem::transmute(compareops.as_ptr()), core::mem::transmute(pcriteriadata)).ok() + pub unsafe fn SetFilter(&self, haccessor: HACCESSOR, compareops: &[u32], pcriteriadata: *const core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), compareops.len().try_into().unwrap(), core::mem::transmute(compareops.as_ptr()), core::mem::transmute(pcriteriadata)).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/SecurityCenter/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SecurityCenter/mod.rs index ee77dd7859..2f21a7e401 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SecurityCenter/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SecurityCenter/mod.rs @@ -26,12 +26,9 @@ pub unsafe fn WscRegisterForUserNotifications() -> windows_core::Result<()> { WscRegisterForUserNotifications().ok() } #[inline] -pub unsafe fn WscUnRegisterChanges(hregistrationhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WscUnRegisterChanges(hregistrationhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wscapi.dll" "system" fn WscUnRegisterChanges(hregistrationhandle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WscUnRegisterChanges(hregistrationhandle.param().abi()).ok() + WscUnRegisterChanges(core::mem::transmute(hregistrationhandle)).ok() } #[cfg(feature = "Win32_System_Com")] windows_core::imp::define_interface!(IWSCDefaultProduct, IWSCDefaultProduct_Vtbl, 0x0476d69c_f21a_11e5_9ce9_5e5517507c66); 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 63d907d781..bbe7e75b00 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs @@ -1,23 +1,16 @@ #[inline] -pub unsafe fn ChangeServiceConfig2A(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpinfo: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ChangeServiceConfig2A(hservice: SC_HANDLE, dwinfolevel: SERVICE_CONFIG, lpinfo: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwinfolevel), core::mem::transmute(lpinfo.unwrap_or(core::ptr::null()))).ok() + ChangeServiceConfig2A(core::mem::transmute(hservice), core::mem::transmute(dwinfolevel), core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn ChangeServiceConfig2W(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpinfo: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ChangeServiceConfig2W(hservice: SC_HANDLE, dwinfolevel: SERVICE_CONFIG, lpinfo: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwinfolevel), core::mem::transmute(lpinfo.unwrap_or(core::ptr::null()))).ok() + ChangeServiceConfig2W(core::mem::transmute(hservice), core::mem::transmute(dwinfolevel), core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn ChangeServiceConfigA(hservice: P0, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P4, lploadordergroup: P5, lpdwtagid: Option<*mut u32>, lpdependencies: P7, lpservicestartname: P8, lppassword: P9, lpdisplayname: P10) -> windows_core::Result<()> +pub unsafe fn ChangeServiceConfigA(hservice: SC_HANDLE, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P4, lploadordergroup: P5, lpdwtagid: Option<*mut u32>, lpdependencies: P7, lpservicestartname: P8, lppassword: P9, lpdisplayname: P10) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, P7: windows_core::Param, @@ -26,12 +19,11 @@ where P10: 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(), core::mem::transmute(dwservicetype), core::mem::transmute(dwstarttype), core::mem::transmute(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() + ChangeServiceConfigA(core::mem::transmute(hservice), core::mem::transmute(dwservicetype), core::mem::transmute(dwstarttype), core::mem::transmute(dwerrorcontrol), lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(core::mem::zeroed())), 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: P4, lploadordergroup: P5, lpdwtagid: Option<*mut u32>, lpdependencies: P7, lpservicestartname: P8, lppassword: P9, lpdisplayname: P10) -> windows_core::Result<()> +pub unsafe fn ChangeServiceConfigW(hservice: SC_HANDLE, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P4, lploadordergroup: P5, lpdwtagid: Option<*mut u32>, lpdependencies: P7, lpservicestartname: P8, lppassword: P9, lpdisplayname: P10) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, P7: windows_core::Param, @@ -40,44 +32,31 @@ where P10: 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(), core::mem::transmute(dwservicetype), core::mem::transmute(dwstarttype), core::mem::transmute(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() + ChangeServiceConfigW(core::mem::transmute(hservice), core::mem::transmute(dwservicetype), core::mem::transmute(dwstarttype), core::mem::transmute(dwerrorcontrol), lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(core::mem::zeroed())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi(), lpdisplayname.param().abi()).ok() } #[inline] -pub unsafe fn CloseServiceHandle(hscobject: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseServiceHandle(hscobject: SC_HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CloseServiceHandle(hscobject : SC_HANDLE) -> super::super::Foundation:: BOOL); - CloseServiceHandle(hscobject.param().abi()).ok() + CloseServiceHandle(core::mem::transmute(hscobject)).ok() } #[inline] -pub unsafe fn ControlService(hservice: P0, dwcontrol: u32, lpservicestatus: *mut SERVICE_STATUS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ControlService(hservice: SC_HANDLE, dwcontrol: u32, lpservicestatus: *mut SERVICE_STATUS) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ControlService(hservice : SC_HANDLE, dwcontrol : u32, lpservicestatus : *mut SERVICE_STATUS) -> super::super::Foundation:: BOOL); - ControlService(hservice.param().abi(), core::mem::transmute(dwcontrol), core::mem::transmute(lpservicestatus)).ok() + ControlService(core::mem::transmute(hservice), core::mem::transmute(dwcontrol), core::mem::transmute(lpservicestatus)).ok() } #[inline] -pub unsafe fn ControlServiceExA(hservice: P0, dwcontrol: u32, dwinfolevel: u32, pcontrolparams: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ControlServiceExA(hservice: SC_HANDLE, dwcontrol: u32, dwinfolevel: u32, pcontrolparams: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ControlServiceExA(hservice : SC_HANDLE, dwcontrol : u32, dwinfolevel : u32, pcontrolparams : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - ControlServiceExA(hservice.param().abi(), core::mem::transmute(dwcontrol), core::mem::transmute(dwinfolevel), core::mem::transmute(pcontrolparams)).ok() + ControlServiceExA(core::mem::transmute(hservice), core::mem::transmute(dwcontrol), core::mem::transmute(dwinfolevel), core::mem::transmute(pcontrolparams)).ok() } #[inline] -pub unsafe fn ControlServiceExW(hservice: P0, dwcontrol: u32, dwinfolevel: u32, pcontrolparams: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ControlServiceExW(hservice: SC_HANDLE, dwcontrol: u32, dwinfolevel: u32, pcontrolparams: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ControlServiceExW(hservice : SC_HANDLE, dwcontrol : u32, dwinfolevel : u32, pcontrolparams : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - ControlServiceExW(hservice.param().abi(), core::mem::transmute(dwcontrol), core::mem::transmute(dwinfolevel), core::mem::transmute(pcontrolparams)).ok() + ControlServiceExW(core::mem::transmute(hservice), core::mem::transmute(dwcontrol), core::mem::transmute(dwinfolevel), core::mem::transmute(pcontrolparams)).ok() } #[inline] -pub unsafe fn CreateServiceA(hscmanager: P0, lpservicename: P1, lpdisplayname: P2, dwdesiredaccess: u32, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P7, lploadordergroup: P8, lpdwtagid: Option<*mut u32>, lpdependencies: P10, lpservicestartname: P11, lppassword: P12) -> windows_core::Result +pub unsafe fn CreateServiceA(hscmanager: SC_HANDLE, lpservicename: P1, lpdisplayname: P2, dwdesiredaccess: u32, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P7, lploadordergroup: P8, lpdwtagid: Option<*mut u32>, lpdependencies: P10, lpservicestartname: P11, lppassword: P12) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P7: windows_core::Param, @@ -87,13 +66,12 @@ where P12: 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwservicetype), core::mem::transmute(dwstarttype), core::mem::transmute(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()); + let result__ = CreateServiceA(core::mem::transmute(hscmanager), lpservicename.param().abi(), lpdisplayname.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwservicetype), core::mem::transmute(dwstarttype), core::mem::transmute(dwerrorcontrol), lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(core::mem::zeroed())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateServiceW(hscmanager: P0, lpservicename: P1, lpdisplayname: P2, dwdesiredaccess: u32, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P7, lploadordergroup: P8, lpdwtagid: Option<*mut u32>, lpdependencies: P10, lpservicestartname: P11, lppassword: P12) -> windows_core::Result +pub unsafe fn CreateServiceW(hscmanager: SC_HANDLE, lpservicename: P1, lpdisplayname: P2, dwdesiredaccess: u32, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P7, lploadordergroup: P8, lpdwtagid: Option<*mut u32>, lpdependencies: P10, lpservicestartname: P11, lppassword: P12) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P7: windows_core::Param, @@ -103,144 +81,132 @@ where P12: 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(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwservicetype), core::mem::transmute(dwstarttype), core::mem::transmute(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()); + let result__ = CreateServiceW(core::mem::transmute(hscmanager), lpservicename.param().abi(), lpdisplayname.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwservicetype), core::mem::transmute(dwstarttype), core::mem::transmute(dwerrorcontrol), lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(core::mem::zeroed())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn DeleteService(hservice: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteService(hservice: SC_HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn DeleteService(hservice : SC_HANDLE) -> super::super::Foundation:: BOOL); - DeleteService(hservice.param().abi()).ok() + DeleteService(core::mem::transmute(hservice)).ok() } #[inline] -pub unsafe fn EnumDependentServicesA(hservice: P0, dwservicestate: ENUM_SERVICE_STATE, lpservices: Option<*mut ENUM_SERVICE_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumDependentServicesA(hservice: SC_HANDLE, dwservicestate: ENUM_SERVICE_STATE, lpservices: Option<*mut ENUM_SERVICE_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dwservicestate), core::mem::transmute(lpservices.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned)).ok() + EnumDependentServicesA(core::mem::transmute(hservice), core::mem::transmute(dwservicestate), core::mem::transmute(lpservices.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumDependentServicesW(hservice: SC_HANDLE, dwservicestate: ENUM_SERVICE_STATE, lpservices: Option<*mut ENUM_SERVICE_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(dwservicestate), core::mem::transmute(lpservices.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned)).ok() + EnumDependentServicesW(core::mem::transmute(hservice), core::mem::transmute(dwservicestate), core::mem::transmute(lpservices.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumServicesStatusA(hscmanager: SC_HANDLE, 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<()> { 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(), core::mem::transmute(dwservicetype), core::mem::transmute(dwservicestate), core::mem::transmute(lpservices.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::ptr::null_mut()))).ok() + EnumServicesStatusA(core::mem::transmute(hscmanager), core::mem::transmute(dwservicetype), core::mem::transmute(dwservicestate), core::mem::transmute(lpservices.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::mem::zeroed()))).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: P9) -> windows_core::Result<()> +pub unsafe fn EnumServicesStatusExA(hscmanager: SC_HANDLE, 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: P9) -> windows_core::Result<()> where - P0: windows_core::Param, P9: 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(), core::mem::transmute(infolevel), core::mem::transmute(dwservicetype), core::mem::transmute(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()), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::ptr::null_mut())), pszgroupname.param().abi()).ok() + EnumServicesStatusExA( + core::mem::transmute(hscmanager), + core::mem::transmute(infolevel), + core::mem::transmute(dwservicetype), + core::mem::transmute(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()), + core::mem::transmute(pcbbytesneeded), + core::mem::transmute(lpservicesreturned), + core::mem::transmute(lpresumehandle.unwrap_or(core::mem::zeroed())), + 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: P9) -> windows_core::Result<()> +pub unsafe fn EnumServicesStatusExW(hscmanager: SC_HANDLE, 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: P9) -> windows_core::Result<()> where - P0: windows_core::Param, P9: 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(), core::mem::transmute(infolevel), core::mem::transmute(dwservicetype), core::mem::transmute(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()), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::ptr::null_mut())), pszgroupname.param().abi()).ok() + EnumServicesStatusExW( + core::mem::transmute(hscmanager), + core::mem::transmute(infolevel), + core::mem::transmute(dwservicetype), + core::mem::transmute(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()), + core::mem::transmute(pcbbytesneeded), + core::mem::transmute(lpservicesreturned), + core::mem::transmute(lpresumehandle.unwrap_or(core::mem::zeroed())), + 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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnumServicesStatusW(hscmanager: SC_HANDLE, 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<()> { 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(), core::mem::transmute(dwservicetype), core::mem::transmute(dwservicestate), core::mem::transmute(lpservices.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::ptr::null_mut()))).ok() + EnumServicesStatusW(core::mem::transmute(hscmanager), core::mem::transmute(dwservicetype), core::mem::transmute(dwservicestate), core::mem::transmute(lpservices.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded), core::mem::transmute(lpservicesreturned), core::mem::transmute(lpresumehandle.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetServiceDirectory(hservicestatus: P0, edirectorytype: SERVICE_DIRECTORY_TYPE, lppathbuffer: Option<&mut [u16]>, lpcchrequiredbufferlength: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetServiceDirectory(hservicestatus: SERVICE_STATUS_HANDLE, edirectorytype: SERVICE_DIRECTORY_TYPE, lppathbuffer: Option<&mut [u16]>, lpcchrequiredbufferlength: *mut u32) -> u32 { windows_targets::link!("api-ms-win-service-core-l1-1-4.dll" "system" fn GetServiceDirectory(hservicestatus : SERVICE_STATUS_HANDLE, edirectorytype : SERVICE_DIRECTORY_TYPE, lppathbuffer : windows_core::PWSTR, cchpathbufferlength : u32, lpcchrequiredbufferlength : *mut u32) -> u32); - GetServiceDirectory(hservicestatus.param().abi(), core::mem::transmute(edirectorytype), core::mem::transmute(lppathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lppathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpcchrequiredbufferlength)) + GetServiceDirectory(core::mem::transmute(hservicestatus), core::mem::transmute(edirectorytype), core::mem::transmute(lppathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lppathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpcchrequiredbufferlength)) } #[inline] -pub unsafe fn GetServiceDisplayNameA(hscmanager: P0, lpservicename: P1, lpdisplayname: windows_core::PSTR, lpcchbuffer: *mut u32) -> windows_core::Result<()> +pub unsafe fn GetServiceDisplayNameA(hscmanager: SC_HANDLE, lpservicename: P1, lpdisplayname: Option, lpcchbuffer: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetServiceDisplayNameA(hscmanager : SC_HANDLE, lpservicename : windows_core::PCSTR, lpdisplayname : windows_core::PSTR, lpcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetServiceDisplayNameA(hscmanager.param().abi(), lpservicename.param().abi(), core::mem::transmute(lpdisplayname), core::mem::transmute(lpcchbuffer)).ok() + GetServiceDisplayNameA(core::mem::transmute(hscmanager), lpservicename.param().abi(), core::mem::transmute(lpdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchbuffer)).ok() } #[inline] -pub unsafe fn GetServiceDisplayNameW(hscmanager: P0, lpservicename: P1, lpdisplayname: windows_core::PWSTR, lpcchbuffer: *mut u32) -> windows_core::Result<()> +pub unsafe fn GetServiceDisplayNameW(hscmanager: SC_HANDLE, lpservicename: P1, lpdisplayname: Option, lpcchbuffer: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetServiceDisplayNameW(hscmanager : SC_HANDLE, lpservicename : windows_core::PCWSTR, lpdisplayname : windows_core::PWSTR, lpcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetServiceDisplayNameW(hscmanager.param().abi(), lpservicename.param().abi(), core::mem::transmute(lpdisplayname), core::mem::transmute(lpcchbuffer)).ok() + GetServiceDisplayNameW(core::mem::transmute(hscmanager), lpservicename.param().abi(), core::mem::transmute(lpdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchbuffer)).ok() } #[inline] -pub unsafe fn GetServiceKeyNameA(hscmanager: P0, lpdisplayname: P1, lpservicename: windows_core::PSTR, lpcchbuffer: *mut u32) -> windows_core::Result<()> +pub unsafe fn GetServiceKeyNameA(hscmanager: SC_HANDLE, lpdisplayname: P1, lpservicename: Option, lpcchbuffer: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetServiceKeyNameA(hscmanager : SC_HANDLE, lpdisplayname : windows_core::PCSTR, lpservicename : windows_core::PSTR, lpcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetServiceKeyNameA(hscmanager.param().abi(), lpdisplayname.param().abi(), core::mem::transmute(lpservicename), core::mem::transmute(lpcchbuffer)).ok() + GetServiceKeyNameA(core::mem::transmute(hscmanager), lpdisplayname.param().abi(), core::mem::transmute(lpservicename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchbuffer)).ok() } #[inline] -pub unsafe fn GetServiceKeyNameW(hscmanager: P0, lpdisplayname: P1, lpservicename: windows_core::PWSTR, lpcchbuffer: *mut u32) -> windows_core::Result<()> +pub unsafe fn GetServiceKeyNameW(hscmanager: SC_HANDLE, lpdisplayname: P1, lpservicename: Option, lpcchbuffer: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetServiceKeyNameW(hscmanager : SC_HANDLE, lpdisplayname : windows_core::PCWSTR, lpservicename : windows_core::PWSTR, lpcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetServiceKeyNameW(hscmanager.param().abi(), lpdisplayname.param().abi(), core::mem::transmute(lpservicename), core::mem::transmute(lpcchbuffer)).ok() + GetServiceKeyNameW(core::mem::transmute(hscmanager), lpdisplayname.param().abi(), core::mem::transmute(lpservicename.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchbuffer)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetServiceRegistryStateKey(servicestatushandle: P0, statetype: SERVICE_REGISTRY_STATE_TYPE, accessmask: u32, servicestatekey: *mut super::Registry::HKEY) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetServiceRegistryStateKey(servicestatushandle: SERVICE_STATUS_HANDLE, statetype: SERVICE_REGISTRY_STATE_TYPE, accessmask: u32, servicestatekey: *mut super::Registry::HKEY) -> u32 { windows_targets::link!("api-ms-win-service-core-l1-1-3.dll" "system" fn GetServiceRegistryStateKey(servicestatushandle : SERVICE_STATUS_HANDLE, statetype : SERVICE_REGISTRY_STATE_TYPE, accessmask : u32, servicestatekey : *mut super::Registry:: HKEY) -> u32); - GetServiceRegistryStateKey(servicestatushandle.param().abi(), core::mem::transmute(statetype), core::mem::transmute(accessmask), core::mem::transmute(servicestatekey)) + GetServiceRegistryStateKey(core::mem::transmute(servicestatushandle), core::mem::transmute(statetype), core::mem::transmute(accessmask), core::mem::transmute(servicestatekey)) } #[inline] -pub unsafe fn GetSharedServiceDirectory(servicehandle: P0, directorytype: SERVICE_SHARED_DIRECTORY_TYPE, pathbuffer: Option<&mut [u16]>, requiredbufferlength: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSharedServiceDirectory(servicehandle: SC_HANDLE, directorytype: SERVICE_SHARED_DIRECTORY_TYPE, pathbuffer: Option<&mut [u16]>, requiredbufferlength: *mut u32) -> u32 { windows_targets::link!("api-ms-win-service-core-l1-1-5.dll" "system" fn GetSharedServiceDirectory(servicehandle : SC_HANDLE, directorytype : SERVICE_SHARED_DIRECTORY_TYPE, pathbuffer : windows_core::PWSTR, pathbufferlength : u32, requiredbufferlength : *mut u32) -> u32); - GetSharedServiceDirectory(servicehandle.param().abi(), core::mem::transmute(directorytype), 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(requiredbufferlength)) + GetSharedServiceDirectory(core::mem::transmute(servicehandle), core::mem::transmute(directorytype), 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(requiredbufferlength)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn GetSharedServiceRegistryStateKey(servicehandle: P0, statetype: SERVICE_SHARED_REGISTRY_STATE_TYPE, accessmask: u32, servicestatekey: *mut super::Registry::HKEY) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSharedServiceRegistryStateKey(servicehandle: SC_HANDLE, statetype: SERVICE_SHARED_REGISTRY_STATE_TYPE, accessmask: u32, servicestatekey: *mut super::Registry::HKEY) -> u32 { windows_targets::link!("api-ms-win-service-core-l1-1-5.dll" "system" fn GetSharedServiceRegistryStateKey(servicehandle : SC_HANDLE, statetype : SERVICE_SHARED_REGISTRY_STATE_TYPE, accessmask : u32, servicestatekey : *mut super::Registry:: HKEY) -> u32); - GetSharedServiceRegistryStateKey(servicehandle.param().abi(), core::mem::transmute(statetype), core::mem::transmute(accessmask), core::mem::transmute(servicestatekey)) + GetSharedServiceRegistryStateKey(core::mem::transmute(servicehandle), core::mem::transmute(statetype), core::mem::transmute(accessmask), core::mem::transmute(servicestatekey)) } #[inline] -pub unsafe fn LockServiceDatabase(hscmanager: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn LockServiceDatabase(hscmanager: SC_HANDLE) -> *mut core::ffi::c_void { windows_targets::link!("advapi32.dll" "system" fn LockServiceDatabase(hscmanager : SC_HANDLE) -> *mut core::ffi::c_void); - LockServiceDatabase(hscmanager.param().abi()) + LockServiceDatabase(core::mem::transmute(hscmanager)) } #[inline] pub unsafe fn NotifyBootConfigStatus(bootacceptable: P0) -> windows_core::Result<()> @@ -251,20 +217,14 @@ where NotifyBootConfigStatus(bootacceptable.param().abi()).ok() } #[inline] -pub unsafe fn NotifyServiceStatusChangeA(hservice: P0, dwnotifymask: SERVICE_NOTIFY, pnotifybuffer: *const SERVICE_NOTIFY_2A) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn NotifyServiceStatusChangeA(hservice: SC_HANDLE, dwnotifymask: SERVICE_NOTIFY, pnotifybuffer: *const SERVICE_NOTIFY_2A) -> u32 { windows_targets::link!("advapi32.dll" "system" fn NotifyServiceStatusChangeA(hservice : SC_HANDLE, dwnotifymask : SERVICE_NOTIFY, pnotifybuffer : *const SERVICE_NOTIFY_2A) -> u32); - NotifyServiceStatusChangeA(hservice.param().abi(), core::mem::transmute(dwnotifymask), core::mem::transmute(pnotifybuffer)) + NotifyServiceStatusChangeA(core::mem::transmute(hservice), core::mem::transmute(dwnotifymask), core::mem::transmute(pnotifybuffer)) } #[inline] -pub unsafe fn NotifyServiceStatusChangeW(hservice: P0, dwnotifymask: SERVICE_NOTIFY, pnotifybuffer: *const SERVICE_NOTIFY_2W) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn NotifyServiceStatusChangeW(hservice: SC_HANDLE, dwnotifymask: SERVICE_NOTIFY, pnotifybuffer: *const SERVICE_NOTIFY_2W) -> u32 { windows_targets::link!("advapi32.dll" "system" fn NotifyServiceStatusChangeW(hservice : SC_HANDLE, dwnotifymask : SERVICE_NOTIFY, pnotifybuffer : *const SERVICE_NOTIFY_2W) -> u32); - NotifyServiceStatusChangeW(hservice.param().abi(), core::mem::transmute(dwnotifymask), core::mem::transmute(pnotifybuffer)) + NotifyServiceStatusChangeW(core::mem::transmute(hservice), core::mem::transmute(dwnotifymask), core::mem::transmute(pnotifybuffer)) } #[inline] pub unsafe fn OpenSCManagerA(lpmachinename: P0, lpdatabasename: P1, dwdesiredaccess: u32) -> windows_core::Result @@ -287,105 +247,73 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenServiceA(hscmanager: P0, lpservicename: P1, dwdesiredaccess: u32) -> windows_core::Result +pub unsafe fn OpenServiceA(hscmanager: SC_HANDLE, lpservicename: P1, dwdesiredaccess: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenServiceA(hscmanager : SC_HANDLE, lpservicename : windows_core::PCSTR, dwdesiredaccess : u32) -> SC_HANDLE); - let result__ = OpenServiceA(hscmanager.param().abi(), lpservicename.param().abi(), core::mem::transmute(dwdesiredaccess)); + let result__ = OpenServiceA(core::mem::transmute(hscmanager), lpservicename.param().abi(), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenServiceW(hscmanager: P0, lpservicename: P1, dwdesiredaccess: u32) -> windows_core::Result +pub unsafe fn OpenServiceW(hscmanager: SC_HANDLE, lpservicename: P1, dwdesiredaccess: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenServiceW(hscmanager : SC_HANDLE, lpservicename : windows_core::PCWSTR, dwdesiredaccess : u32) -> SC_HANDLE); - let result__ = OpenServiceW(hscmanager.param().abi(), lpservicename.param().abi(), core::mem::transmute(dwdesiredaccess)); + let result__ = OpenServiceW(core::mem::transmute(hscmanager), lpservicename.param().abi(), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn QueryServiceConfig2A(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpbuffer: Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceConfig2A(hservice: SC_HANDLE, dwinfolevel: SERVICE_CONFIG, lpbuffer: Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfig2A(hservice : SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfig2A(hservice.param().abi(), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbbytesneeded)).ok() + QueryServiceConfig2A(core::mem::transmute(hservice), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbbytesneeded)).ok() } #[inline] -pub unsafe fn QueryServiceConfig2W(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpbuffer: Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceConfig2W(hservice: SC_HANDLE, dwinfolevel: SERVICE_CONFIG, lpbuffer: Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfig2W(hservice : SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfig2W(hservice.param().abi(), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbbytesneeded)).ok() + QueryServiceConfig2W(core::mem::transmute(hservice), core::mem::transmute(dwinfolevel), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbbytesneeded)).ok() } #[inline] -pub unsafe fn QueryServiceConfigA(hservice: P0, lpserviceconfig: Option<*mut QUERY_SERVICE_CONFIGA>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceConfigA(hservice: SC_HANDLE, lpserviceconfig: Option<*mut QUERY_SERVICE_CONFIGA>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() + QueryServiceConfigA(core::mem::transmute(hservice), core::mem::transmute(lpserviceconfig.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() } #[inline] -pub unsafe fn QueryServiceConfigW(hservice: P0, lpserviceconfig: Option<*mut QUERY_SERVICE_CONFIGW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceConfigW(hservice: SC_HANDLE, lpserviceconfig: Option<*mut QUERY_SERVICE_CONFIGW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() + QueryServiceConfigW(core::mem::transmute(hservice), core::mem::transmute(lpserviceconfig.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() } #[inline] -pub unsafe fn QueryServiceDynamicInformation(hservicestatus: P0, dwinfolevel: u32, ppdynamicinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceDynamicInformation(hservicestatus: SERVICE_STATUS_HANDLE, dwinfolevel: u32, ppdynamicinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn QueryServiceDynamicInformation(hservicestatus : SERVICE_STATUS_HANDLE, dwinfolevel : u32, ppdynamicinfo : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - QueryServiceDynamicInformation(hservicestatus.param().abi(), core::mem::transmute(dwinfolevel), core::mem::transmute(ppdynamicinfo)).ok() + QueryServiceDynamicInformation(core::mem::transmute(hservicestatus), core::mem::transmute(dwinfolevel), core::mem::transmute(ppdynamicinfo)).ok() } #[inline] -pub unsafe fn QueryServiceLockStatusA(hscmanager: P0, lplockstatus: Option<*mut QUERY_SERVICE_LOCK_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceLockStatusA(hscmanager: SC_HANDLE, lplockstatus: Option<*mut QUERY_SERVICE_LOCK_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() + QueryServiceLockStatusA(core::mem::transmute(hscmanager), core::mem::transmute(lplockstatus.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() } #[inline] -pub unsafe fn QueryServiceLockStatusW(hscmanager: P0, lplockstatus: Option<*mut QUERY_SERVICE_LOCK_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceLockStatusW(hscmanager: SC_HANDLE, lplockstatus: Option<*mut QUERY_SERVICE_LOCK_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { 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(core::ptr::null_mut())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() + QueryServiceLockStatusW(core::mem::transmute(hscmanager), core::mem::transmute(lplockstatus.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn QueryServiceObjectSecurity(hservice: P0, dwsecurityinformation: u32, lpsecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceObjectSecurity(hservice: SC_HANDLE, dwsecurityinformation: u32, lpsecuritydescriptor: Option, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn QueryServiceObjectSecurity(hservice : SC_HANDLE, dwsecurityinformation : u32, lpsecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceObjectSecurity(hservice.param().abi(), core::mem::transmute(dwsecurityinformation), core::mem::transmute(lpsecuritydescriptor), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() + QueryServiceObjectSecurity(core::mem::transmute(hservice), core::mem::transmute(dwsecurityinformation), core::mem::transmute(lpsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbbufsize), core::mem::transmute(pcbbytesneeded)).ok() } #[inline] -pub unsafe fn QueryServiceStatus(hservice: P0, lpservicestatus: *mut SERVICE_STATUS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceStatus(hservice: SC_HANDLE, lpservicestatus: *mut SERVICE_STATUS) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn QueryServiceStatus(hservice : SC_HANDLE, lpservicestatus : *mut SERVICE_STATUS) -> super::super::Foundation:: BOOL); - QueryServiceStatus(hservice.param().abi(), core::mem::transmute(lpservicestatus)).ok() + QueryServiceStatus(core::mem::transmute(hservice), core::mem::transmute(lpservicestatus)).ok() } #[inline] -pub unsafe fn QueryServiceStatusEx(hservice: P0, infolevel: SC_STATUS_TYPE, lpbuffer: Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryServiceStatusEx(hservice: SC_HANDLE, infolevel: SC_STATUS_TYPE, lpbuffer: Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn QueryServiceStatusEx(hservice : SC_HANDLE, infolevel : SC_STATUS_TYPE, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceStatusEx(hservice.param().abi(), core::mem::transmute(infolevel), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbbytesneeded)).ok() + QueryServiceStatusEx(core::mem::transmute(hservice), core::mem::transmute(infolevel), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbbytesneeded)).ok() } #[inline] pub unsafe fn RegisterServiceCtrlHandlerA(lpservicename: P0, lphandlerproc: LPHANDLER_FUNCTION) -> windows_core::Result @@ -402,7 +330,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(), core::mem::transmute(lphandlerproc), core::mem::transmute(lpcontext.unwrap_or(core::ptr::null()))); + let result__ = RegisterServiceCtrlHandlerExA(lpservicename.param().abi(), core::mem::transmute(lphandlerproc), core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -411,7 +339,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(), core::mem::transmute(lphandlerproc), core::mem::transmute(lpcontext.unwrap_or(core::ptr::null()))); + let result__ = RegisterServiceCtrlHandlerExW(lpservicename.param().abi(), core::mem::transmute(lphandlerproc), core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -424,40 +352,29 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetServiceBits(hservicestatus: P0, dwservicebits: u32, bsetbitson: P2, bupdateimmediately: P3) -> windows_core::Result<()> +pub unsafe fn SetServiceBits(hservicestatus: SERVICE_STATUS_HANDLE, dwservicebits: u32, bsetbitson: P2, bupdateimmediately: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetServiceBits(hservicestatus : SERVICE_STATUS_HANDLE, dwservicebits : u32, bsetbitson : super::super::Foundation:: BOOL, bupdateimmediately : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetServiceBits(hservicestatus.param().abi(), core::mem::transmute(dwservicebits), bsetbitson.param().abi(), bupdateimmediately.param().abi()).ok() + SetServiceBits(core::mem::transmute(hservicestatus), core::mem::transmute(dwservicebits), bsetbitson.param().abi(), bupdateimmediately.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SetServiceObjectSecurity(hservice: P0, dwsecurityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, lpsecuritydescriptor: P2) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SetServiceObjectSecurity(hservice: SC_HANDLE, dwsecurityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, lpsecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetServiceObjectSecurity(hservice : SC_HANDLE, dwsecurityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, lpsecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: BOOL); - SetServiceObjectSecurity(hservice.param().abi(), core::mem::transmute(dwsecurityinformation), lpsecuritydescriptor.param().abi()).ok() + SetServiceObjectSecurity(core::mem::transmute(hservice), core::mem::transmute(dwsecurityinformation), core::mem::transmute(lpsecuritydescriptor)).ok() } #[inline] -pub unsafe fn SetServiceStatus(hservicestatus: P0, lpservicestatus: *const SERVICE_STATUS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetServiceStatus(hservicestatus: SERVICE_STATUS_HANDLE, lpservicestatus: *const SERVICE_STATUS) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetServiceStatus(hservicestatus : SERVICE_STATUS_HANDLE, lpservicestatus : *const SERVICE_STATUS) -> super::super::Foundation:: BOOL); - SetServiceStatus(hservicestatus.param().abi(), core::mem::transmute(lpservicestatus)).ok() + SetServiceStatus(core::mem::transmute(hservicestatus), core::mem::transmute(lpservicestatus)).ok() } #[inline] -pub unsafe fn StartServiceA(hservice: P0, lpserviceargvectors: Option<&[windows_core::PCSTR]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn StartServiceA(hservice: SC_HANDLE, lpserviceargvectors: Option<&[windows_core::PCSTR]>) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn StartServiceA(hservice : SC_HANDLE, dwnumserviceargs : u32, lpserviceargvectors : *const windows_core::PCSTR) -> super::super::Foundation:: BOOL); - StartServiceA(hservice.param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpserviceargvectors.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + StartServiceA(core::mem::transmute(hservice), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpserviceargvectors.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[inline] pub unsafe fn StartServiceCtrlDispatcherA(lpservicestarttable: *const SERVICE_TABLE_ENTRYA) -> windows_core::Result<()> { @@ -470,20 +387,14 @@ pub unsafe fn StartServiceCtrlDispatcherW(lpservicestarttable: *const SERVICE_TA StartServiceCtrlDispatcherW(core::mem::transmute(lpservicestarttable)).ok() } #[inline] -pub unsafe fn StartServiceW(hservice: P0, lpserviceargvectors: Option<&[windows_core::PCWSTR]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn StartServiceW(hservice: SC_HANDLE, lpserviceargvectors: Option<&[windows_core::PCWSTR]>) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn StartServiceW(hservice : SC_HANDLE, dwnumserviceargs : u32, lpserviceargvectors : *const windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - StartServiceW(hservice.param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpserviceargvectors.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + StartServiceW(core::mem::transmute(hservice), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpserviceargvectors.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[inline] -pub unsafe fn SubscribeServiceChangeNotifications(hservice: P0, eeventtype: SC_EVENT_TYPE, pcallback: PSC_NOTIFICATION_CALLBACK, pcallbackcontext: Option<*const core::ffi::c_void>, psubscription: *mut PSC_NOTIFICATION_REGISTRATION) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SubscribeServiceChangeNotifications(hservice: SC_HANDLE, eeventtype: SC_EVENT_TYPE, pcallback: PSC_NOTIFICATION_CALLBACK, pcallbackcontext: Option<*const core::ffi::c_void>, psubscription: *mut PSC_NOTIFICATION_REGISTRATION) -> u32 { 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(), core::mem::transmute(eeventtype), core::mem::transmute(pcallback), core::mem::transmute(pcallbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(psubscription)) + SubscribeServiceChangeNotifications(core::mem::transmute(hservice), core::mem::transmute(eeventtype), core::mem::transmute(pcallback), core::mem::transmute(pcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(psubscription)) } #[inline] pub unsafe fn UnlockServiceDatabase(sclock: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -491,21 +402,14 @@ pub unsafe fn UnlockServiceDatabase(sclock: *const core::ffi::c_void) -> windows UnlockServiceDatabase(core::mem::transmute(sclock)).ok() } #[inline] -pub unsafe fn UnsubscribeServiceChangeNotifications(psubscription: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn UnsubscribeServiceChangeNotifications(psubscription: PSC_NOTIFICATION_REGISTRATION) { windows_targets::link!("sechost.dll" "system" fn UnsubscribeServiceChangeNotifications(psubscription : PSC_NOTIFICATION_REGISTRATION)); - UnsubscribeServiceChangeNotifications(psubscription.param().abi()) + UnsubscribeServiceChangeNotifications(core::mem::transmute(psubscription)) } #[inline] -pub unsafe fn WaitServiceState(hservice: P0, dwnotify: u32, dwtimeout: u32, hcancelevent: P3) -> u32 -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn WaitServiceState(hservice: SC_HANDLE, dwnotify: u32, dwtimeout: Option, hcancelevent: Option) -> u32 { windows_targets::link!("advapi32.dll" "system" fn WaitServiceState(hservice : SC_HANDLE, dwnotify : u32, dwtimeout : u32, hcancelevent : super::super::Foundation:: HANDLE) -> u32); - WaitServiceState(hservice.param().abi(), core::mem::transmute(dwnotify), core::mem::transmute(dwtimeout), hcancelevent.param().abi()) + WaitServiceState(core::mem::transmute(hservice), core::mem::transmute(dwnotify), core::mem::transmute(dwtimeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(hcancelevent.unwrap_or(core::mem::zeroed()))) } pub const CUSTOM_SYSTEM_STATE_CHANGE_EVENT_GUID: windows_core::GUID = windows_core::GUID::from_u128(0x2d7a2816_0c5e_45fc_9ce7_570e5ecde9c9); pub const DOMAIN_JOIN_GUID: windows_core::GUID = windows_core::GUID::from_u128(0x1ce20aba_9851_4421_9430_1ddeb766e809); 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 3328ecc47a..35f291f2de 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(core::mem::transmute(oobecompletedcallback), core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(waithandle)).ok() + RegisterWaitUntilOOBECompleted(core::mem::transmute(oobecompletedcallback), core::mem::transmute(callbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(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/Shutdown/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs index 4f28b4724a..70abbfb025 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs @@ -95,29 +95,22 @@ pub unsafe fn LockWorkStation() -> windows_core::Result<()> { LockWorkStation().ok() } #[inline] -pub unsafe fn ShutdownBlockReasonCreate(hwnd: P0, pwszreason: P1) -> windows_core::Result<()> +pub unsafe fn ShutdownBlockReasonCreate(hwnd: super::super::Foundation::HWND, pwszreason: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ShutdownBlockReasonCreate(hwnd : super::super::Foundation:: HWND, pwszreason : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - ShutdownBlockReasonCreate(hwnd.param().abi(), pwszreason.param().abi()).ok() + ShutdownBlockReasonCreate(core::mem::transmute(hwnd), pwszreason.param().abi()).ok() } #[inline] -pub unsafe fn ShutdownBlockReasonDestroy(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ShutdownBlockReasonDestroy(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn ShutdownBlockReasonDestroy(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ShutdownBlockReasonDestroy(hwnd.param().abi()).ok() + ShutdownBlockReasonDestroy(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn ShutdownBlockReasonQuery(hwnd: P0, pwszbuff: windows_core::PWSTR, pcchbuff: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ShutdownBlockReasonQuery(hwnd: super::super::Foundation::HWND, pwszbuff: Option, pcchbuff: *mut u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn ShutdownBlockReasonQuery(hwnd : super::super::Foundation:: HWND, pwszbuff : windows_core::PWSTR, pcchbuff : *mut u32) -> super::super::Foundation:: BOOL); - ShutdownBlockReasonQuery(hwnd.param().abi(), core::mem::transmute(pwszbuff), core::mem::transmute(pcchbuff)).ok() + ShutdownBlockReasonQuery(core::mem::transmute(hwnd), core::mem::transmute(pwszbuff.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuff)).ok() } pub const EWX_ARSO: EXIT_WINDOWS_FLAGS = EXIT_WINDOWS_FLAGS(67108864u32); pub const EWX_BOOTOPTIONS: EXIT_WINDOWS_FLAGS = EXIT_WINDOWS_FLAGS(16777216u32); 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 2f30192962..b029c2d121 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs @@ -527,18 +527,15 @@ impl ISideShowNotification { (windows_core::Interface::vtable(self).Image)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetImage(&self, in_hicon: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetImage)(windows_core::Interface::as_raw(self), in_hicon.param().abi()).ok() + pub unsafe fn SetImage(&self, in_hicon: super::super::UI::WindowsAndMessaging::HICON) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetImage)(windows_core::Interface::as_raw(self), core::mem::transmute(in_hicon)).ok() } pub unsafe fn ExpirationTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetExpirationTime)(windows_core::Interface::as_raw(self), core::mem::transmute(in_ptime.unwrap_or(core::mem::zeroed()))).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 8050ef3693..579fd35067 100644 --- a/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs @@ -1,54 +1,32 @@ #[inline] -pub unsafe fn BroadcastSystemMessageA(flags: u32, lpinfo: Option<*mut u32>, msg: u32, wparam: P3, lparam: P4) -> i32 -where - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn BroadcastSystemMessageA(flags: u32, lpinfo: Option<*mut u32>, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> i32 { 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(core::mem::transmute(flags), core::mem::transmute(lpinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + BroadcastSystemMessageA(core::mem::transmute(flags), core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn BroadcastSystemMessageExA(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: P3, lparam: P4, pbsminfo: Option<*mut BSMINFO>) -> i32 -where - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn BroadcastSystemMessageExA(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, pbsminfo: Option<*mut BSMINFO>) -> i32 { 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(core::mem::transmute(flags), core::mem::transmute(lpinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pbsminfo.unwrap_or(core::ptr::null_mut()))) + BroadcastSystemMessageExA(core::mem::transmute(flags), core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(pbsminfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BroadcastSystemMessageExW(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: P3, lparam: P4, pbsminfo: Option<*mut BSMINFO>) -> i32 -where - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn BroadcastSystemMessageExW(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, pbsminfo: Option<*mut BSMINFO>) -> i32 { 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(core::mem::transmute(flags), core::mem::transmute(lpinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pbsminfo.unwrap_or(core::ptr::null_mut()))) + BroadcastSystemMessageExW(core::mem::transmute(flags), core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(pbsminfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn BroadcastSystemMessageW(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: P3, lparam: P4) -> i32 -where - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn BroadcastSystemMessageW(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> i32 { 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(core::mem::transmute(flags), core::mem::transmute(lpinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + BroadcastSystemMessageW(core::mem::transmute(flags), core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn CloseDesktop(hdesktop: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseDesktop(hdesktop: HDESK) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CloseDesktop(hdesktop : HDESK) -> super::super::Foundation:: BOOL); - CloseDesktop(hdesktop.param().abi()).ok() + CloseDesktop(core::mem::transmute(hdesktop)).ok() } #[inline] -pub unsafe fn CloseWindowStation(hwinsta: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseWindowStation(hwinsta: HWINSTA) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CloseWindowStation(hwinsta : HWINSTA) -> super::super::Foundation:: BOOL); - CloseWindowStation(hwinsta.param().abi()).ok() + CloseWindowStation(core::mem::transmute(hwinsta)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security"))] #[inline] @@ -58,7 +36,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(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::ptr::null()))); + let result__ = CreateDesktopA(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed()))); (!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 +47,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(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::ptr::null())), core::mem::transmute(ulheapsize), core::mem::transmute(pvoid.unwrap_or(core::ptr::null()))); + let result__ = CreateDesktopExA(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulheapsize), core::mem::transmute(pvoid.unwrap_or(core::mem::zeroed()))); (!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 +58,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(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::ptr::null())), core::mem::transmute(ulheapsize), core::mem::transmute(pvoid.unwrap_or(core::ptr::null()))); + let result__ = CreateDesktopExW(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulheapsize), core::mem::transmute(pvoid.unwrap_or(core::mem::zeroed()))); (!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 +69,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(core::ptr::null())), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::ptr::null()))); + let result__ = CreateDesktopW(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -101,7 +79,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(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::ptr::null()))); + let result__ = CreateWindowStationA(lpwinsta.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -111,52 +89,34 @@ 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(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::ptr::null()))); + let result__ = CreateWindowStationW(lpwinsta.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess), core::mem::transmute(lpsa.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn EnumDesktopWindows(hdesktop: P0, lpfn: super::super::UI::WindowsAndMessaging::WNDENUMPROC, lparam: P2) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EnumDesktopWindows(hdesktop: Option, lpfn: super::super::UI::WindowsAndMessaging::WNDENUMPROC, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnumDesktopWindows(hdesktop : HDESK, lpfn : super::super::UI::WindowsAndMessaging:: WNDENUMPROC, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumDesktopWindows(hdesktop.param().abi(), core::mem::transmute(lpfn), lparam.param().abi()).ok() + EnumDesktopWindows(core::mem::transmute(hdesktop.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfn), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn EnumDesktopsA(hwinsta: P0, lpenumfunc: DESKTOPENUMPROCA, lparam: P2) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EnumDesktopsA(hwinsta: Option, lpenumfunc: DESKTOPENUMPROCA, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnumDesktopsA(hwinsta : HWINSTA, lpenumfunc : DESKTOPENUMPROCA, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumDesktopsA(hwinsta.param().abi(), core::mem::transmute(lpenumfunc), lparam.param().abi()).ok() + EnumDesktopsA(core::mem::transmute(hwinsta.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn EnumDesktopsW(hwinsta: P0, lpenumfunc: DESKTOPENUMPROCW, lparam: P2) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EnumDesktopsW(hwinsta: Option, lpenumfunc: DESKTOPENUMPROCW, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnumDesktopsW(hwinsta : HWINSTA, lpenumfunc : DESKTOPENUMPROCW, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumDesktopsW(hwinsta.param().abi(), core::mem::transmute(lpenumfunc), lparam.param().abi()).ok() + EnumDesktopsW(core::mem::transmute(hwinsta.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn EnumWindowStationsA(lpenumfunc: WINSTAENUMPROCA, lparam: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn EnumWindowStationsA(lpenumfunc: WINSTAENUMPROCA, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnumWindowStationsA(lpenumfunc : WINSTAENUMPROCA, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumWindowStationsA(core::mem::transmute(lpenumfunc), lparam.param().abi()).ok() + EnumWindowStationsA(core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn EnumWindowStationsW(lpenumfunc: WINSTAENUMPROCW, lparam: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn EnumWindowStationsW(lpenumfunc: WINSTAENUMPROCW, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnumWindowStationsW(lpenumfunc : WINSTAENUMPROCW, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumWindowStationsW(core::mem::transmute(lpenumfunc), lparam.param().abi()).ok() + EnumWindowStationsW(core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] pub unsafe fn GetProcessWindowStation() -> windows_core::Result { @@ -171,20 +131,14 @@ pub unsafe fn GetThreadDesktop(dwthreadid: u32) -> windows_core::Result { (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetUserObjectInformationA(hobj: P0, nindex: USER_OBJECT_INFORMATION_INDEX, pvinfo: Option<*mut core::ffi::c_void>, nlength: u32, lpnlengthneeded: Option<*mut u32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetUserObjectInformationA(hobj: super::super::Foundation::HANDLE, nindex: USER_OBJECT_INFORMATION_INDEX, pvinfo: Option<*mut core::ffi::c_void>, nlength: u32, lpnlengthneeded: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(nindex), core::mem::transmute(pvinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded.unwrap_or(core::ptr::null_mut()))).ok() + GetUserObjectInformationA(core::mem::transmute(hobj), core::mem::transmute(nindex), core::mem::transmute(pvinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetUserObjectInformationW(hobj: super::super::Foundation::HANDLE, nindex: USER_OBJECT_INFORMATION_INDEX, pvinfo: Option<*mut core::ffi::c_void>, nlength: u32, lpnlengthneeded: Option<*mut u32>) -> windows_core::Result<()> { 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(), core::mem::transmute(nindex), core::mem::transmute(pvinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded.unwrap_or(core::ptr::null_mut()))).ok() + GetUserObjectInformationW(core::mem::transmute(hobj), core::mem::transmute(nindex), core::mem::transmute(pvinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn OpenDesktopA(lpszdesktop: P0, dwflags: DESKTOP_CONTROL_FLAGS, finherit: P2, dwdesiredaccess: u32) -> windows_core::Result @@ -236,44 +190,29 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetProcessWindowStation(hwinsta: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessWindowStation(hwinsta: HWINSTA) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetProcessWindowStation(hwinsta : HWINSTA) -> super::super::Foundation:: BOOL); - SetProcessWindowStation(hwinsta.param().abi()).ok() + SetProcessWindowStation(core::mem::transmute(hwinsta)).ok() } #[inline] -pub unsafe fn SetThreadDesktop(hdesktop: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadDesktop(hdesktop: HDESK) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetThreadDesktop(hdesktop : HDESK) -> super::super::Foundation:: BOOL); - SetThreadDesktop(hdesktop.param().abi()).ok() + SetThreadDesktop(core::mem::transmute(hdesktop)).ok() } #[inline] -pub unsafe fn SetUserObjectInformationA(hobj: P0, nindex: i32, pvinfo: *const core::ffi::c_void, nlength: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetUserObjectInformationA(hobj: super::super::Foundation::HANDLE, nindex: i32, pvinfo: *const core::ffi::c_void, nlength: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetUserObjectInformationA(hobj : super::super::Foundation:: HANDLE, nindex : i32, pvinfo : *const core::ffi::c_void, nlength : u32) -> super::super::Foundation:: BOOL); - SetUserObjectInformationA(hobj.param().abi(), core::mem::transmute(nindex), core::mem::transmute(pvinfo), core::mem::transmute(nlength)).ok() + SetUserObjectInformationA(core::mem::transmute(hobj), core::mem::transmute(nindex), core::mem::transmute(pvinfo), core::mem::transmute(nlength)).ok() } #[inline] -pub unsafe fn SetUserObjectInformationW(hobj: P0, nindex: i32, pvinfo: *const core::ffi::c_void, nlength: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetUserObjectInformationW(hobj: super::super::Foundation::HANDLE, nindex: i32, pvinfo: *const core::ffi::c_void, nlength: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetUserObjectInformationW(hobj : super::super::Foundation:: HANDLE, nindex : i32, pvinfo : *const core::ffi::c_void, nlength : u32) -> super::super::Foundation:: BOOL); - SetUserObjectInformationW(hobj.param().abi(), core::mem::transmute(nindex), core::mem::transmute(pvinfo), core::mem::transmute(nlength)).ok() + SetUserObjectInformationW(core::mem::transmute(hobj), core::mem::transmute(nindex), core::mem::transmute(pvinfo), core::mem::transmute(nlength)).ok() } #[inline] -pub unsafe fn SwitchDesktop(hdesktop: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SwitchDesktop(hdesktop: HDESK) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SwitchDesktop(hdesktop : HDESK) -> super::super::Foundation:: BOOL); - SwitchDesktop(hdesktop.param().abi()).ok() + SwitchDesktop(core::mem::transmute(hdesktop)).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs index 39103bc0f0..c247467e3c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs @@ -23,18 +23,15 @@ where WslIsDistributionRegistered(distributionname.param().abi()) } #[inline] -pub unsafe fn WslLaunch(distributionname: P0, command: P1, usecurrentworkingdirectory: P2, stdin: P3, stdout: P4, stderr: P5) -> windows_core::Result +pub unsafe fn WslLaunch(distributionname: P0, command: P1, usecurrentworkingdirectory: P2, stdin: super::super::Foundation::HANDLE, stdout: super::super::Foundation::HANDLE, stderr: super::super::Foundation::HANDLE) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("api-ms-win-wsl-api-l1-1-0.dll" "system" fn WslLaunch(distributionname : windows_core::PCWSTR, command : windows_core::PCWSTR, usecurrentworkingdirectory : super::super::Foundation:: BOOL, stdin : super::super::Foundation:: HANDLE, stdout : super::super::Foundation:: HANDLE, stderr : super::super::Foundation:: HANDLE, process : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WslLaunch(distributionname.param().abi(), command.param().abi(), usecurrentworkingdirectory.param().abi(), stdin.param().abi(), stdout.param().abi(), stderr.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WslLaunch(distributionname.param().abi(), command.param().abi(), usecurrentworkingdirectory.param().abi(), core::mem::transmute(stdin), core::mem::transmute(stdout), core::mem::transmute(stderr), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn WslLaunchInteractive(distributionname: P0, command: P1, usecurrentworkingdirectory: P2) -> 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 3ec5fd8756..7f073a80d9 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs @@ -1,10 +1,10 @@ #[inline] -pub unsafe fn DnsHostnameToComputerNameExW(hostname: P0, computername: windows_core::PWSTR, nsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn DnsHostnameToComputerNameExW(hostname: P0, computername: Option, nsize: *mut u32) -> super::super::Foundation::BOOL where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn DnsHostnameToComputerNameExW(hostname : windows_core::PCWSTR, computername : windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - DnsHostnameToComputerNameExW(hostname.param().abi(), core::mem::transmute(computername), core::mem::transmute(nsize)) + DnsHostnameToComputerNameExW(hostname.param().abi(), core::mem::transmute(computername.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } #[inline] pub unsafe fn EnumSystemFirmwareTables(firmwaretableprovidersignature: FIRMWARE_TABLE_PROVIDER, pfirmwaretableenumbuffer: Option<&mut [u8]>) -> u32 { @@ -12,14 +12,14 @@ pub unsafe fn EnumSystemFirmwareTables(firmwaretableprovidersignature: FIRMWARE_ EnumSystemFirmwareTables(core::mem::transmute(firmwaretableprovidersignature), core::mem::transmute(pfirmwaretableenumbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfirmwaretableenumbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn GetComputerNameExA(nametype: COMPUTER_NAME_FORMAT, lpbuffer: windows_core::PSTR, nsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetComputerNameExA(nametype: COMPUTER_NAME_FORMAT, lpbuffer: Option, nsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetComputerNameExA(nametype : COMPUTER_NAME_FORMAT, lpbuffer : windows_core::PSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetComputerNameExA(core::mem::transmute(nametype), core::mem::transmute(lpbuffer), core::mem::transmute(nsize)).ok() + GetComputerNameExA(core::mem::transmute(nametype), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } #[inline] -pub unsafe fn GetComputerNameExW(nametype: COMPUTER_NAME_FORMAT, lpbuffer: windows_core::PWSTR, nsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetComputerNameExW(nametype: COMPUTER_NAME_FORMAT, lpbuffer: Option, nsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetComputerNameExW(nametype : COMPUTER_NAME_FORMAT, lpbuffer : windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetComputerNameExW(core::mem::transmute(nametype), core::mem::transmute(lpbuffer), core::mem::transmute(nsize)).ok() + GetComputerNameExW(core::mem::transmute(nametype), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } #[inline] pub unsafe fn GetDeveloperDriveEnablementState() -> DEVELOPER_DRIVE_ENABLEMENT_STATE { @@ -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(core::ptr::null_mut())), core::mem::transmute(returnedlength)).ok() + GetLogicalProcessorInformation(core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(relationshiptype), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnedlength)).ok() + GetLogicalProcessorInformationEx(core::mem::transmute(relationshiptype), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(group), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnedlength)).ok() + GetProcessorSystemCycleTime(core::mem::transmute(group), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnedlength)).ok() } #[inline] pub unsafe fn GetProductInfo(dwosmajorversion: u32, dwosminorversion: u32, dwspmajorversion: u32, dwspminorversion: u32, pdwreturnedproducttype: *mut OS_PRODUCT_TYPE) -> super::super::Foundation::BOOL { @@ -85,12 +85,9 @@ pub unsafe fn GetProductInfo(dwosmajorversion: u32, dwosminorversion: u32, dwspm GetProductInfo(core::mem::transmute(dwosmajorversion), core::mem::transmute(dwosminorversion), core::mem::transmute(dwspmajorversion), core::mem::transmute(dwspminorversion), core::mem::transmute(pdwreturnedproducttype)) } #[inline] -pub unsafe fn GetSystemCpuSetInformation(information: Option<*mut SYSTEM_CPU_SET_INFORMATION>, bufferlength: u32, returnedlength: *mut u32, process: P3, flags: u32) -> super::super::Foundation::BOOL -where - P3: windows_core::Param, -{ +pub unsafe fn GetSystemCpuSetInformation(information: Option<*mut SYSTEM_CPU_SET_INFORMATION>, bufferlength: u32, returnedlength: *mut u32, process: Option, flags: Option) -> super::super::Foundation::BOOL { 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(core::ptr::null_mut())), core::mem::transmute(bufferlength), core::mem::transmute(returnedlength), process.param().abi(), core::mem::transmute(flags)) + GetSystemCpuSetInformation(core::mem::transmute(information.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(returnedlength), core::mem::transmute(process.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetSystemDEPPolicy() -> DEP_SYSTEM_POLICY_TYPE { @@ -247,7 +244,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(core::ptr::null_mut())), core::mem::transmute(puldevicefamily.unwrap_or(core::ptr::null_mut())), core::mem::transmute(puldeviceform.unwrap_or(core::ptr::null_mut()))) + RtlGetDeviceFamilyInfoEnum(core::mem::transmute(pulluapinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(puldevicefamily.unwrap_or(core::mem::zeroed())), core::mem::transmute(puldeviceform.unwrap_or(core::mem::zeroed()))) } #[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/TaskScheduler/mod.rs b/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs index 5ebb622885..670e0f89a8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs @@ -976,11 +976,8 @@ impl IExecAction2 { pub unsafe fn HideAppWindow(&self, phideappwindow: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HideAppWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(phideappwindow)).ok() } - pub unsafe fn SetHideAppWindow(&self, hideappwindow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHideAppWindow)(windows_core::Interface::as_raw(self), hideappwindow.param().abi()).ok() + pub unsafe fn SetHideAppWindow(&self, hideappwindow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHideAppWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hideappwindow)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1046,20 +1043,14 @@ impl IIdleSettings { pub unsafe fn StopOnIdleEnd(&self, pstop: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StopOnIdleEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(pstop)).ok() } - pub unsafe fn SetStopOnIdleEnd(&self, stop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStopOnIdleEnd)(windows_core::Interface::as_raw(self), stop.param().abi()).ok() + pub unsafe fn SetStopOnIdleEnd(&self, stop: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStopOnIdleEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(stop)).ok() } pub unsafe fn RestartOnIdle(&self, prestart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestartOnIdle)(windows_core::Interface::as_raw(self), core::mem::transmute(prestart)).ok() } - pub unsafe fn SetRestartOnIdle(&self, restart: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRestartOnIdle)(windows_core::Interface::as_raw(self), restart.param().abi()).ok() + pub unsafe fn SetRestartOnIdle(&self, restart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRestartOnIdle)(windows_core::Interface::as_raw(self), core::mem::transmute(restart)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1268,11 +1259,8 @@ impl IMaintenanceSettings { pub unsafe fn Deadline(&self, target: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Deadline)(windows_core::Interface::as_raw(self), core::mem::transmute(target)).ok() } - pub unsafe fn SetExclusive(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetExclusive)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetExclusive(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetExclusive)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn Exclusive(&self, target: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Exclusive)(windows_core::Interface::as_raw(self), core::mem::transmute(target)).ok() @@ -1375,11 +1363,8 @@ impl IMonthlyDOWTrigger { pub unsafe fn RunOnLastWeekOfMonth(&self, plastweek: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RunOnLastWeekOfMonth)(windows_core::Interface::as_raw(self), core::mem::transmute(plastweek)).ok() } - pub unsafe fn SetRunOnLastWeekOfMonth(&self, lastweek: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRunOnLastWeekOfMonth)(windows_core::Interface::as_raw(self), lastweek.param().abi()).ok() + pub unsafe fn SetRunOnLastWeekOfMonth(&self, lastweek: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRunOnLastWeekOfMonth)(windows_core::Interface::as_raw(self), core::mem::transmute(lastweek)).ok() } pub unsafe fn RandomDelay(&self, prandomdelay: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RandomDelay)(windows_core::Interface::as_raw(self), core::mem::transmute(prandomdelay)).ok() @@ -1507,11 +1492,8 @@ impl IMonthlyTrigger { pub unsafe fn RunOnLastDayOfMonth(&self, plastday: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RunOnLastDayOfMonth)(windows_core::Interface::as_raw(self), core::mem::transmute(plastday)).ok() } - pub unsafe fn SetRunOnLastDayOfMonth(&self, lastday: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRunOnLastDayOfMonth)(windows_core::Interface::as_raw(self), lastday.param().abi()).ok() + pub unsafe fn SetRunOnLastDayOfMonth(&self, lastday: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRunOnLastDayOfMonth)(windows_core::Interface::as_raw(self), core::mem::transmute(lastday)).ok() } pub unsafe fn RandomDelay(&self, prandomdelay: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RandomDelay)(windows_core::Interface::as_raw(self), core::mem::transmute(prandomdelay)).ok() @@ -1986,11 +1968,8 @@ impl IRegisteredTask { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Run(&self, params: &super::Variant::VARIANT) -> windows_core::Result { @@ -2673,11 +2652,8 @@ impl IRepetitionPattern { pub unsafe fn StopAtDurationEnd(&self, pstop: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StopAtDurationEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(pstop)).ok() } - pub unsafe fn SetStopAtDurationEnd(&self, stop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStopAtDurationEnd)(windows_core::Interface::as_raw(self), stop.param().abi()).ok() + pub unsafe fn SetStopAtDurationEnd(&self, stop: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStopAtDurationEnd)(windows_core::Interface::as_raw(self), core::mem::transmute(stop)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -3029,11 +3005,8 @@ impl IScheduledWorkItem { pub unsafe fn Terminate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Terminate)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn EditWorkItem(&self, hparent: P0, dwreserved: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EditWorkItem)(windows_core::Interface::as_raw(self), hparent.param().abi(), core::mem::transmute(dwreserved)).ok() + pub unsafe fn EditWorkItem(&self, hparent: super::super::Foundation::HWND, dwreserved: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EditWorkItem)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent), core::mem::transmute(dwreserved)).ok() } pub unsafe fn GetMostRecentRunTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4983,11 +4956,8 @@ impl ITaskSettings { pub unsafe fn AllowDemandStart(&self, pallowdemandstart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AllowDemandStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pallowdemandstart)).ok() } - pub unsafe fn SetAllowDemandStart(&self, allowdemandstart: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowDemandStart)(windows_core::Interface::as_raw(self), allowdemandstart.param().abi()).ok() + pub unsafe fn SetAllowDemandStart(&self, allowdemandstart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowDemandStart)(windows_core::Interface::as_raw(self), core::mem::transmute(allowdemandstart)).ok() } pub unsafe fn RestartInterval(&self, prestartinterval: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestartInterval)(windows_core::Interface::as_raw(self), core::mem::transmute(prestartinterval)).ok() @@ -5010,38 +4980,26 @@ impl ITaskSettings { pub unsafe fn StopIfGoingOnBatteries(&self, pstopifonbatteries: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StopIfGoingOnBatteries)(windows_core::Interface::as_raw(self), core::mem::transmute(pstopifonbatteries)).ok() } - pub unsafe fn SetStopIfGoingOnBatteries(&self, stopifonbatteries: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStopIfGoingOnBatteries)(windows_core::Interface::as_raw(self), stopifonbatteries.param().abi()).ok() + pub unsafe fn SetStopIfGoingOnBatteries(&self, stopifonbatteries: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStopIfGoingOnBatteries)(windows_core::Interface::as_raw(self), core::mem::transmute(stopifonbatteries)).ok() } pub unsafe fn DisallowStartIfOnBatteries(&self, pdisallowstart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DisallowStartIfOnBatteries)(windows_core::Interface::as_raw(self), core::mem::transmute(pdisallowstart)).ok() } - pub unsafe fn SetDisallowStartIfOnBatteries(&self, disallowstart: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisallowStartIfOnBatteries)(windows_core::Interface::as_raw(self), disallowstart.param().abi()).ok() + pub unsafe fn SetDisallowStartIfOnBatteries(&self, disallowstart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisallowStartIfOnBatteries)(windows_core::Interface::as_raw(self), core::mem::transmute(disallowstart)).ok() } pub unsafe fn AllowHardTerminate(&self, pallowhardterminate: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AllowHardTerminate)(windows_core::Interface::as_raw(self), core::mem::transmute(pallowhardterminate)).ok() } - pub unsafe fn SetAllowHardTerminate(&self, allowhardterminate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowHardTerminate)(windows_core::Interface::as_raw(self), allowhardterminate.param().abi()).ok() + pub unsafe fn SetAllowHardTerminate(&self, allowhardterminate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowHardTerminate)(windows_core::Interface::as_raw(self), core::mem::transmute(allowhardterminate)).ok() } pub unsafe fn StartWhenAvailable(&self, pstartwhenavailable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StartWhenAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(pstartwhenavailable)).ok() } - pub unsafe fn SetStartWhenAvailable(&self, startwhenavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStartWhenAvailable)(windows_core::Interface::as_raw(self), startwhenavailable.param().abi()).ok() + pub unsafe fn SetStartWhenAvailable(&self, startwhenavailable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStartWhenAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(startwhenavailable)).ok() } pub unsafe fn XmlText(&self, ptext: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).XmlText)(windows_core::Interface::as_raw(self), core::mem::transmute(ptext)).ok() @@ -5052,11 +5010,8 @@ impl ITaskSettings { pub unsafe fn RunOnlyIfNetworkAvailable(&self, prunonlyifnetworkavailable: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RunOnlyIfNetworkAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(prunonlyifnetworkavailable)).ok() } - pub unsafe fn SetRunOnlyIfNetworkAvailable(&self, runonlyifnetworkavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRunOnlyIfNetworkAvailable)(windows_core::Interface::as_raw(self), runonlyifnetworkavailable.param().abi()).ok() + pub unsafe fn SetRunOnlyIfNetworkAvailable(&self, runonlyifnetworkavailable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRunOnlyIfNetworkAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(runonlyifnetworkavailable)).ok() } pub unsafe fn ExecutionTimeLimit(&self, pexecutiontimelimit: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ExecutionTimeLimit)(windows_core::Interface::as_raw(self), core::mem::transmute(pexecutiontimelimit)).ok() @@ -5067,11 +5022,8 @@ impl ITaskSettings { pub unsafe fn Enabled(&self, penabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(penabled)).ok() } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } pub unsafe fn DeleteExpiredTaskAfter(&self, pexpirationdelay: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteExpiredTaskAfter)(windows_core::Interface::as_raw(self), core::mem::transmute(pexpirationdelay)).ok() @@ -5094,11 +5046,8 @@ impl ITaskSettings { pub unsafe fn Hidden(&self, phidden: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Hidden)(windows_core::Interface::as_raw(self), core::mem::transmute(phidden)).ok() } - pub unsafe fn SetHidden(&self, hidden: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHidden)(windows_core::Interface::as_raw(self), hidden.param().abi()).ok() + pub unsafe fn SetHidden(&self, hidden: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHidden)(windows_core::Interface::as_raw(self), core::mem::transmute(hidden)).ok() } pub unsafe fn IdleSettings(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5113,20 +5062,14 @@ impl ITaskSettings { pub unsafe fn RunOnlyIfIdle(&self, prunonlyifidle: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RunOnlyIfIdle)(windows_core::Interface::as_raw(self), core::mem::transmute(prunonlyifidle)).ok() } - pub unsafe fn SetRunOnlyIfIdle(&self, runonlyifidle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRunOnlyIfIdle)(windows_core::Interface::as_raw(self), runonlyifidle.param().abi()).ok() + pub unsafe fn SetRunOnlyIfIdle(&self, runonlyifidle: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRunOnlyIfIdle)(windows_core::Interface::as_raw(self), core::mem::transmute(runonlyifidle)).ok() } pub unsafe fn WakeToRun(&self, pwake: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).WakeToRun)(windows_core::Interface::as_raw(self), core::mem::transmute(pwake)).ok() } - pub unsafe fn SetWakeToRun(&self, wake: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWakeToRun)(windows_core::Interface::as_raw(self), wake.param().abi()).ok() + pub unsafe fn SetWakeToRun(&self, wake: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWakeToRun)(windows_core::Interface::as_raw(self), core::mem::transmute(wake)).ok() } pub unsafe fn NetworkSettings(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5468,20 +5411,14 @@ impl ITaskSettings2 { pub unsafe fn DisallowStartOnRemoteAppSession(&self, pdisallowstart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), core::mem::transmute(pdisallowstart)).ok() } - pub unsafe fn SetDisallowStartOnRemoteAppSession(&self, disallowstart: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), disallowstart.param().abi()).ok() + pub unsafe fn SetDisallowStartOnRemoteAppSession(&self, disallowstart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), core::mem::transmute(disallowstart)).ok() } pub unsafe fn UseUnifiedSchedulingEngine(&self, puseunifiedengine: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), core::mem::transmute(puseunifiedengine)).ok() } - pub unsafe fn SetUseUnifiedSchedulingEngine(&self, useunifiedengine: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), useunifiedengine.param().abi()).ok() + pub unsafe fn SetUseUnifiedSchedulingEngine(&self, useunifiedengine: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), core::mem::transmute(useunifiedengine)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5549,20 +5486,14 @@ impl ITaskSettings3 { pub unsafe fn DisallowStartOnRemoteAppSession(&self, pdisallowstart: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), core::mem::transmute(pdisallowstart)).ok() } - pub unsafe fn SetDisallowStartOnRemoteAppSession(&self, disallowstart: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), disallowstart.param().abi()).ok() + pub unsafe fn SetDisallowStartOnRemoteAppSession(&self, disallowstart: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisallowStartOnRemoteAppSession)(windows_core::Interface::as_raw(self), core::mem::transmute(disallowstart)).ok() } pub unsafe fn UseUnifiedSchedulingEngine(&self, puseunifiedengine: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), core::mem::transmute(puseunifiedengine)).ok() } - pub unsafe fn SetUseUnifiedSchedulingEngine(&self, useunifiedengine: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), useunifiedengine.param().abi()).ok() + pub unsafe fn SetUseUnifiedSchedulingEngine(&self, useunifiedengine: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseUnifiedSchedulingEngine)(windows_core::Interface::as_raw(self), core::mem::transmute(useunifiedengine)).ok() } pub unsafe fn MaintenanceSettings(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5581,11 +5512,8 @@ impl ITaskSettings3 { pub unsafe fn Volatile(&self, pvolatile: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Volatile)(windows_core::Interface::as_raw(self), core::mem::transmute(pvolatile)).ok() } - pub unsafe fn SetVolatile(&self, volatile: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVolatile)(windows_core::Interface::as_raw(self), volatile.param().abi()).ok() + pub unsafe fn SetVolatile(&self, volatile: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVolatile)(windows_core::Interface::as_raw(self), core::mem::transmute(volatile)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5915,11 +5843,8 @@ impl ITrigger { pub unsafe fn Enabled(&self, penabled: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), core::mem::transmute(penabled)).ok() } - pub unsafe fn SetEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } } #[cfg(feature = "Win32_System_Com")] 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 11ebd4faed..248786c1d4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs @@ -10,21 +10,15 @@ pub unsafe fn AcquireSRWLockShared(srwlock: *mut SRWLOCK) { } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor: *mut super::super::Foundation::HANDLE, integritylabel: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor: *mut super::super::Foundation::HANDLE, integritylabel: super::super::Security::PSID) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor : *mut super::super::Foundation:: HANDLE, integritylabel : super::super::Security:: PSID) -> super::super::Foundation:: BOOL); - AddIntegrityLabelToBoundaryDescriptor(core::mem::transmute(boundarydescriptor), integritylabel.param().abi()).ok() + AddIntegrityLabelToBoundaryDescriptor(core::mem::transmute(boundarydescriptor), core::mem::transmute(integritylabel)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn AddSIDToBoundaryDescriptor(boundarydescriptor: *mut super::super::Foundation::HANDLE, requiredsid: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn AddSIDToBoundaryDescriptor(boundarydescriptor: *mut super::super::Foundation::HANDLE, requiredsid: super::super::Security::PSID) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn AddSIDToBoundaryDescriptor(boundarydescriptor : *mut super::super::Foundation:: HANDLE, requiredsid : super::super::Security:: PSID) -> super::super::Foundation:: BOOL); - AddSIDToBoundaryDescriptor(core::mem::transmute(boundarydescriptor), requiredsid.param().abi()).ok() + AddSIDToBoundaryDescriptor(core::mem::transmute(boundarydescriptor), core::mem::transmute(requiredsid)).ok() } #[inline] pub unsafe fn AttachThreadInput(idattach: u32, idattachto: u32, fattach: P2) -> super::super::Foundation::BOOL @@ -35,25 +29,19 @@ where AttachThreadInput(core::mem::transmute(idattach), core::mem::transmute(idattachto), fattach.param().abi()) } #[inline] -pub unsafe fn AvQuerySystemResponsiveness(avrthandle: P0, systemresponsivenessvalue: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AvQuerySystemResponsiveness(avrthandle: super::super::Foundation::HANDLE, systemresponsivenessvalue: *mut u32) -> windows_core::Result<()> { windows_targets::link!("avrt.dll" "system" fn AvQuerySystemResponsiveness(avrthandle : super::super::Foundation:: HANDLE, systemresponsivenessvalue : *mut u32) -> super::super::Foundation:: BOOL); - AvQuerySystemResponsiveness(avrthandle.param().abi(), core::mem::transmute(systemresponsivenessvalue)).ok() + AvQuerySystemResponsiveness(core::mem::transmute(avrthandle), core::mem::transmute(systemresponsivenessvalue)).ok() } #[inline] -pub unsafe fn AvRevertMmThreadCharacteristics(avrthandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AvRevertMmThreadCharacteristics(avrthandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("avrt.dll" "system" fn AvRevertMmThreadCharacteristics(avrthandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AvRevertMmThreadCharacteristics(avrthandle.param().abi()).ok() + AvRevertMmThreadCharacteristics(core::mem::transmute(avrthandle)).ok() } #[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(core::mem::transmute(context), core::mem::transmute(period), core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::ptr::null()))).ok() + AvRtCreateThreadOrderingGroup(core::mem::transmute(context), core::mem::transmute(period), core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))).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: P4) -> windows_core::Result<()> @@ -61,7 +49,7 @@ where P4: 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(core::mem::transmute(context), core::mem::transmute(period), core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), taskname.param().abi()).ok() + AvRtCreateThreadOrderingGroupExA(core::mem::transmute(context), core::mem::transmute(period), core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), 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: P4) -> windows_core::Result<()> @@ -69,15 +57,12 @@ where P4: 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(core::mem::transmute(context), core::mem::transmute(period), core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), taskname.param().abi()).ok() + AvRtCreateThreadOrderingGroupExW(core::mem::transmute(context), core::mem::transmute(period), core::mem::transmute(threadorderingguid), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), taskname.param().abi()).ok() } #[inline] -pub unsafe fn AvRtDeleteThreadOrderingGroup(context: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AvRtDeleteThreadOrderingGroup(context: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("avrt.dll" "system" fn AvRtDeleteThreadOrderingGroup(context : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AvRtDeleteThreadOrderingGroup(context.param().abi()).ok() + AvRtDeleteThreadOrderingGroup(core::mem::transmute(context)).ok() } #[inline] pub unsafe fn AvRtJoinThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, threadorderingguid: *const windows_core::GUID, before: P2) -> windows_core::Result<()> @@ -88,20 +73,14 @@ where AvRtJoinThreadOrderingGroup(core::mem::transmute(context), core::mem::transmute(threadorderingguid), before.param().abi()).ok() } #[inline] -pub unsafe fn AvRtLeaveThreadOrderingGroup(context: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AvRtLeaveThreadOrderingGroup(context: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("avrt.dll" "system" fn AvRtLeaveThreadOrderingGroup(context : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AvRtLeaveThreadOrderingGroup(context.param().abi()).ok() + AvRtLeaveThreadOrderingGroup(core::mem::transmute(context)).ok() } #[inline] -pub unsafe fn AvRtWaitOnThreadOrderingGroup(context: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AvRtWaitOnThreadOrderingGroup(context: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("avrt.dll" "system" fn AvRtWaitOnThreadOrderingGroup(context : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AvRtWaitOnThreadOrderingGroup(context.param().abi()).ok() + AvRtWaitOnThreadOrderingGroup(core::mem::transmute(context)).ok() } #[inline] pub unsafe fn AvSetMmMaxThreadCharacteristicsA(firsttask: P0, secondtask: P1, taskindex: *mut u32) -> windows_core::Result @@ -142,118 +121,77 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn AvSetMmThreadPriority(avrthandle: P0, priority: AVRT_PRIORITY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AvSetMmThreadPriority(avrthandle: super::super::Foundation::HANDLE, priority: AVRT_PRIORITY) -> windows_core::Result<()> { windows_targets::link!("avrt.dll" "system" fn AvSetMmThreadPriority(avrthandle : super::super::Foundation:: HANDLE, priority : AVRT_PRIORITY) -> super::super::Foundation:: BOOL); - AvSetMmThreadPriority(avrthandle.param().abi(), core::mem::transmute(priority)).ok() + AvSetMmThreadPriority(core::mem::transmute(avrthandle), core::mem::transmute(priority)).ok() } #[inline] -pub unsafe fn CallbackMayRunLong(pci: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CallbackMayRunLong(pci: PTP_CALLBACK_INSTANCE) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn CallbackMayRunLong(pci : PTP_CALLBACK_INSTANCE) -> super::super::Foundation:: BOOL); - CallbackMayRunLong(pci.param().abi()) + CallbackMayRunLong(core::mem::transmute(pci)) } #[inline] -pub unsafe fn CancelThreadpoolIo(pio: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CancelThreadpoolIo(pio: PTP_IO) { windows_targets::link!("kernel32.dll" "system" fn CancelThreadpoolIo(pio : PTP_IO)); - CancelThreadpoolIo(pio.param().abi()) + CancelThreadpoolIo(core::mem::transmute(pio)) } #[inline] -pub unsafe fn CancelTimerQueueTimer(timerqueue: P0, timer: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CancelTimerQueueTimer(timerqueue: Option, timer: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn CancelTimerQueueTimer(timerqueue : super::super::Foundation:: HANDLE, timer : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CancelTimerQueueTimer(timerqueue.param().abi(), timer.param().abi()) + CancelTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), core::mem::transmute(timer)) } #[inline] -pub unsafe fn CancelWaitableTimer(htimer: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CancelWaitableTimer(htimer: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn CancelWaitableTimer(htimer : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CancelWaitableTimer(htimer.param().abi()).ok() + CancelWaitableTimer(core::mem::transmute(htimer)).ok() } #[inline] -pub unsafe fn ChangeTimerQueueTimer(timerqueue: P0, timer: super::super::Foundation::HANDLE, duetime: u32, period: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ChangeTimerQueueTimer(timerqueue: Option, timer: super::super::Foundation::HANDLE, duetime: u32, period: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ChangeTimerQueueTimer(timerqueue : super::super::Foundation:: HANDLE, timer : super::super::Foundation:: HANDLE, duetime : u32, period : u32) -> super::super::Foundation:: BOOL); - ChangeTimerQueueTimer(timerqueue.param().abi(), core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period)).ok() + ChangeTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period)).ok() } #[inline] -pub unsafe fn ClosePrivateNamespace(handle: P0, flags: u32) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn ClosePrivateNamespace(handle: super::super::Foundation::HANDLE, flags: u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("kernel32.dll" "system" fn ClosePrivateNamespace(handle : super::super::Foundation:: HANDLE, flags : u32) -> super::super::Foundation:: BOOLEAN); - ClosePrivateNamespace(handle.param().abi(), core::mem::transmute(flags)) + ClosePrivateNamespace(core::mem::transmute(handle), core::mem::transmute(flags)) } #[inline] -pub unsafe fn CloseThreadpool(ptpp: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CloseThreadpool(ptpp: PTP_POOL) { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpool(ptpp : PTP_POOL)); - CloseThreadpool(ptpp.param().abi()) + CloseThreadpool(core::mem::transmute(ptpp)) } #[inline] -pub unsafe fn CloseThreadpoolCleanupGroup(ptpcg: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CloseThreadpoolCleanupGroup(ptpcg: PTP_CLEANUP_GROUP) { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpoolCleanupGroup(ptpcg : PTP_CLEANUP_GROUP)); - CloseThreadpoolCleanupGroup(ptpcg.param().abi()) + CloseThreadpoolCleanupGroup(core::mem::transmute(ptpcg)) } #[inline] -pub unsafe fn CloseThreadpoolCleanupGroupMembers(ptpcg: P0, fcancelpendingcallbacks: P1, pvcleanupcontext: Option<*mut core::ffi::c_void>) +pub unsafe fn CloseThreadpoolCleanupGroupMembers(ptpcg: PTP_CLEANUP_GROUP, fcancelpendingcallbacks: P1, pvcleanupcontext: Option<*mut core::ffi::c_void>) where - P0: windows_core::Param, 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(core::ptr::null_mut()))) + CloseThreadpoolCleanupGroupMembers(core::mem::transmute(ptpcg), fcancelpendingcallbacks.param().abi(), core::mem::transmute(pvcleanupcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CloseThreadpoolIo(pio: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CloseThreadpoolIo(pio: PTP_IO) { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpoolIo(pio : PTP_IO)); - CloseThreadpoolIo(pio.param().abi()) + CloseThreadpoolIo(core::mem::transmute(pio)) } #[inline] -pub unsafe fn CloseThreadpoolTimer(pti: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CloseThreadpoolTimer(pti: PTP_TIMER) { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpoolTimer(pti : PTP_TIMER)); - CloseThreadpoolTimer(pti.param().abi()) + CloseThreadpoolTimer(core::mem::transmute(pti)) } #[inline] -pub unsafe fn CloseThreadpoolWait(pwa: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CloseThreadpoolWait(pwa: PTP_WAIT) { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpoolWait(pwa : PTP_WAIT)); - CloseThreadpoolWait(pwa.param().abi()) + CloseThreadpoolWait(core::mem::transmute(pwa)) } #[inline] -pub unsafe fn CloseThreadpoolWork(pwk: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn CloseThreadpoolWork(pwk: PTP_WORK) { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpoolWork(pwk : PTP_WORK)); - CloseThreadpoolWork(pwk.param().abi()) + CloseThreadpoolWork(core::mem::transmute(pwk)) } #[inline] pub unsafe fn ConvertFiberToThread() -> windows_core::Result<()> { @@ -263,12 +201,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(core::ptr::null()))) + ConvertThreadToFiber(core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null())), core::mem::transmute(dwflags)) + ConvertThreadToFiberEx(core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn CreateBoundaryDescriptorA(name: P0, flags: u32) -> windows_core::Result @@ -296,7 +234,7 @@ where P3: 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(core::ptr::null())), bmanualreset.param().abi(), binitialstate.param().abi(), lpname.param().abi()); + let result__ = CreateEventA(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), 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 +244,7 @@ where P1: 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(core::ptr::null())), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); + let result__ = CreateEventExA(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -316,7 +254,7 @@ where P1: 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(core::ptr::null())), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); + let result__ = CreateEventExW(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -328,18 +266,18 @@ where P3: 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(core::ptr::null())), bmanualreset.param().abi(), binitialstate.param().abi(), lpname.param().abi()); + let result__ = CreateEventW(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(dwstacksize), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::ptr::null()))) + CreateFiber(core::mem::transmute(dwstacksize), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(dwstackcommitsize), core::mem::transmute(dwstackreservesize), core::mem::transmute(dwflags), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::ptr::null()))) + CreateFiberEx(core::mem::transmute(dwstackcommitsize), core::mem::transmute(dwstackreservesize), core::mem::transmute(dwflags), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -349,7 +287,7 @@ where P2: 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(core::ptr::null())), binitialowner.param().abi(), lpname.param().abi()); + let result__ = CreateMutexA(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), 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 +297,7 @@ where P1: 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(core::ptr::null())), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); + let result__ = CreateMutexExA(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -369,7 +307,7 @@ where P1: 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(core::ptr::null())), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); + let result__ = CreateMutexExW(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -380,7 +318,7 @@ where P2: 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(core::ptr::null())), binitialowner.param().abi(), lpname.param().abi()); + let result__ = CreateMutexW(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), 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 +328,7 @@ where P2: 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(core::ptr::null())), core::mem::transmute(lpboundarydescriptor), lpaliasprefix.param().abi()); + let result__ = CreatePrivateNamespaceA(core::mem::transmute(lpprivatenamespaceattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpboundarydescriptor), lpaliasprefix.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -400,38 +338,49 @@ where P2: 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(core::ptr::null())), core::mem::transmute(lpboundarydescriptor), lpaliasprefix.param().abi()) + CreatePrivateNamespaceW(core::mem::transmute(lpprivatenamespaceattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpboundarydescriptor), lpaliasprefix.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateProcessA(lpapplicationname: P0, lpcommandline: windows_core::PSTR, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P4, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P7, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessA(lpapplicationname: P0, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P4, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P7, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where P0: windows_core::Param, P4: windows_core::Param, P7: 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(core::ptr::null())), core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), binherithandles.param().abi(), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), core::mem::transmute(lpstartupinfo), core::mem::transmute(lpprocessinformation)).ok() + CreateProcessA( + lpapplicationname.param().abi(), + core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpprocessattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), + binherithandles.param().abi(), + core::mem::transmute(dwcreationflags), + core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), + lpcurrentdirectory.param().abi(), + core::mem::transmute(lpstartupinfo), + core::mem::transmute(lpprocessinformation), + ) + .ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateProcessAsUserA(htoken: P0, lpapplicationname: P1, lpcommandline: windows_core::PSTR, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P5, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessAsUserA(htoken: Option, lpapplicationname: P1, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P5, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P5: windows_core::Param, P8: 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(), + core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpprocessattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), binherithandles.param().abi(), core::mem::transmute(dwcreationflags), - core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), + core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), core::mem::transmute(lpstartupinfo), core::mem::transmute(lpprocessinformation), @@ -440,23 +389,22 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateProcessAsUserW(htoken: P0, lpapplicationname: P1, lpcommandline: windows_core::PWSTR, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P5, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessAsUserW(htoken: Option, lpapplicationname: P1, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P5, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P5: windows_core::Param, P8: 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(), + core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), 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())), + core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpprocessattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), binherithandles.param().abi(), core::mem::transmute(dwcreationflags), - core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), + core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), core::mem::transmute(lpstartupinfo), core::mem::transmute(lpprocessinformation), @@ -465,17 +413,29 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateProcessW(lpapplicationname: P0, lpcommandline: windows_core::PWSTR, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P4, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P7, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessW(lpapplicationname: P0, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P4, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P7, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where P0: windows_core::Param, P4: windows_core::Param, P7: 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(core::ptr::null())), core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), binherithandles.param().abi(), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), core::mem::transmute(lpstartupinfo), core::mem::transmute(lpprocessinformation)).ok() + CreateProcessW( + lpapplicationname.param().abi(), + core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpprocessattributes.unwrap_or(core::mem::zeroed())), + core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), + binherithandles.param().abi(), + core::mem::transmute(dwcreationflags), + core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), + lpcurrentdirectory.param().abi(), + core::mem::transmute(lpstartupinfo), + core::mem::transmute(lpprocessinformation), + ) + .ok() } #[inline] -pub unsafe fn CreateProcessWithLogonW(lpusername: P0, lpdomain: P1, lppassword: P2, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P4, lpcommandline: windows_core::PWSTR, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessWithLogonW(lpusername: P0, lpdomain: P1, lppassword: P2, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P4, lpcommandline: Option, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, @@ -484,37 +444,29 @@ where P8: 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(), core::mem::transmute(dwlogonflags), lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), core::mem::transmute(lpstartupinfo), core::mem::transmute(lpprocessinformation)).ok() + CreateProcessWithLogonW(lpusername.param().abi(), lpdomain.param().abi(), lppassword.param().abi(), core::mem::transmute(dwlogonflags), lpapplicationname.param().abi(), core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), core::mem::transmute(lpstartupinfo), core::mem::transmute(lpprocessinformation)).ok() } #[inline] -pub unsafe fn CreateProcessWithTokenW(htoken: P0, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P2, lpcommandline: windows_core::PWSTR, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P6, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessWithTokenW(htoken: super::super::Foundation::HANDLE, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P2, lpcommandline: Option, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P6, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P6: 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(), core::mem::transmute(dwlogonflags), lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), core::mem::transmute(lpstartupinfo), core::mem::transmute(lpprocessinformation)).ok() + CreateProcessWithTokenW(core::mem::transmute(htoken), core::mem::transmute(dwlogonflags), lpapplicationname.param().abi(), core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), core::mem::transmute(lpstartupinfo), core::mem::transmute(lpprocessinformation)).ok() } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateRemoteThread(hprocess: P0, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwstacksize: usize, lpstartaddress: LPTHREAD_START_ROUTINE, lpparameter: Option<*const core::ffi::c_void>, dwcreationflags: u32, lpthreadid: Option<*mut u32>) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CreateRemoteThread(hprocess: super::super::Foundation::HANDLE, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwstacksize: usize, lpstartaddress: LPTHREAD_START_ROUTINE, lpparameter: Option<*const core::ffi::c_void>, dwcreationflags: u32, lpthreadid: Option<*mut u32>) -> windows_core::Result { 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(core::ptr::null())), core::mem::transmute(dwstacksize), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::ptr::null())), core::mem::transmute(dwcreationflags), core::mem::transmute(lpthreadid.unwrap_or(core::ptr::null_mut()))); + let result__ = CreateRemoteThread(core::mem::transmute(hprocess), core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwstacksize), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcreationflags), core::mem::transmute(lpthreadid.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateRemoteThreadEx(hprocess: P0, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwstacksize: usize, lpstartaddress: LPTHREAD_START_ROUTINE, lpparameter: Option<*const core::ffi::c_void>, dwcreationflags: u32, lpattributelist: P6, lpthreadid: Option<*mut u32>) -> windows_core::Result -where - P0: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn CreateRemoteThreadEx(hprocess: super::super::Foundation::HANDLE, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwstacksize: usize, lpstartaddress: LPTHREAD_START_ROUTINE, lpparameter: Option<*const core::ffi::c_void>, dwcreationflags: u32, lpattributelist: Option, lpthreadid: Option<*mut u32>) -> windows_core::Result { 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(core::ptr::null())), core::mem::transmute(dwstacksize), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::ptr::null())), core::mem::transmute(dwcreationflags), lpattributelist.param().abi(), core::mem::transmute(lpthreadid.unwrap_or(core::ptr::null_mut()))); + let result__ = CreateRemoteThreadEx(core::mem::transmute(hprocess), core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwstacksize), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcreationflags), core::mem::transmute(lpattributelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpthreadid.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -524,27 +476,27 @@ where P3: 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(core::ptr::null())), core::mem::transmute(linitialcount), core::mem::transmute(lmaximumcount), lpname.param().abi()); + let result__ = CreateSemaphoreA(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(linitialcount), core::mem::transmute(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 CreateSemaphoreExA(lpsemaphoreattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, linitialcount: i32, lmaximumcount: i32, lpname: P3, dwflags: u32, dwdesiredaccess: u32) -> windows_core::Result +pub unsafe fn CreateSemaphoreExA(lpsemaphoreattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, linitialcount: i32, lmaximumcount: i32, lpname: P3, dwflags: Option, dwdesiredaccess: u32) -> windows_core::Result where P3: 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(core::ptr::null())), core::mem::transmute(linitialcount), core::mem::transmute(lmaximumcount), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); + let result__ = CreateSemaphoreExA(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(linitialcount), core::mem::transmute(lmaximumcount), lpname.param().abi(), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateSemaphoreExW(lpsemaphoreattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, linitialcount: i32, lmaximumcount: i32, lpname: P3, dwflags: u32, dwdesiredaccess: u32) -> windows_core::Result +pub unsafe fn CreateSemaphoreExW(lpsemaphoreattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, linitialcount: i32, lmaximumcount: i32, lpname: P3, dwflags: Option, dwdesiredaccess: u32) -> windows_core::Result where P3: 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(core::ptr::null())), core::mem::transmute(linitialcount), core::mem::transmute(lmaximumcount), lpname.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); + let result__ = CreateSemaphoreExW(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(linitialcount), core::mem::transmute(lmaximumcount), lpname.param().abi(), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -554,20 +506,20 @@ where P3: 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(core::ptr::null())), core::mem::transmute(linitialcount), core::mem::transmute(lmaximumcount), lpname.param().abi()); + let result__ = CreateSemaphoreW(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(linitialcount), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(dwstacksize), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::ptr::null())), core::mem::transmute(dwcreationflags), core::mem::transmute(lpthreadid.unwrap_or(core::ptr::null_mut()))); + let result__ = CreateThread(core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwstacksize), core::mem::transmute(lpstartaddress), core::mem::transmute(lpparameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcreationflags), core::mem::transmute(lpthreadid.unwrap_or(core::mem::zeroed()))); (!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(core::ptr::null()))); + let result__ = CreateThreadpool(core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -577,30 +529,27 @@ pub unsafe fn CreateThreadpoolCleanupGroup() -> windows_core::Result(fl: P0, pfnio: PTP_WIN32_IO_CALLBACK, pv: Option<*mut core::ffi::c_void>, pcbe: Option<*const TP_CALLBACK_ENVIRON_V3>) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CreateThreadpoolIo(fl: super::super::Foundation::HANDLE, pfnio: PTP_WIN32_IO_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 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(), core::mem::transmute(pfnio), core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))); + let result__ = CreateThreadpoolIo(core::mem::transmute(fl), core::mem::transmute(pfnio), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))); (!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(core::mem::transmute(pfnti), core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))); + let result__ = CreateThreadpoolTimer(core::mem::transmute(pfnti), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))); (!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(core::mem::transmute(pfnwa), core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))); + let result__ = CreateThreadpoolWait(core::mem::transmute(pfnwa), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))); (!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(core::mem::transmute(pfnwk), core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))); + let result__ = CreateThreadpoolWork(core::mem::transmute(pfnwk), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -610,12 +559,9 @@ pub unsafe fn CreateTimerQueue() -> windows_core::Result(phnewtimer: *mut super::super::Foundation::HANDLE, timerqueue: P1, callback: WAITORTIMERCALLBACK, parameter: Option<*const core::ffi::c_void>, duetime: u32, period: u32, flags: WORKER_THREAD_FLAGS) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn CreateTimerQueueTimer(phnewtimer: *mut super::super::Foundation::HANDLE, timerqueue: Option, callback: WAITORTIMERCALLBACK, parameter: Option<*const core::ffi::c_void>, duetime: u32, period: u32, flags: WORKER_THREAD_FLAGS) -> windows_core::Result<()> { 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(core::mem::transmute(phnewtimer), timerqueue.param().abi(), core::mem::transmute(callback), core::mem::transmute(parameter.unwrap_or(core::ptr::null())), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(flags)).ok() + CreateTimerQueueTimer(core::mem::transmute(phnewtimer), core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(flags)).ok() } #[inline] pub unsafe fn CreateUmsCompletionList(umscompletionlist: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -635,7 +581,7 @@ where P2: 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(core::ptr::null())), bmanualreset.param().abi(), lptimername.param().abi()) + CreateWaitableTimerA(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), bmanualreset.param().abi(), lptimername.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -644,7 +590,7 @@ where P1: 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(core::ptr::null())), lptimername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)) + CreateWaitableTimerExA(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), lptimername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -653,7 +599,7 @@ where P1: 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(core::ptr::null())), lptimername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); + let result__ = CreateWaitableTimerExW(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), lptimername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -664,16 +610,13 @@ where P2: 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(core::ptr::null())), bmanualreset.param().abi(), lptimername.param().abi()); + let result__ = CreateWaitableTimerW(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), bmanualreset.param().abi(), lptimername.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn DeleteBoundaryDescriptor(boundarydescriptor: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteBoundaryDescriptor(boundarydescriptor: super::super::Foundation::HANDLE) { windows_targets::link!("kernel32.dll" "system" fn DeleteBoundaryDescriptor(boundarydescriptor : super::super::Foundation:: HANDLE)); - DeleteBoundaryDescriptor(boundarydescriptor.param().abi()) + DeleteBoundaryDescriptor(core::mem::transmute(boundarydescriptor)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -697,31 +640,19 @@ pub unsafe fn DeleteSynchronizationBarrier(lpbarrier: *mut SYNCHRONIZATION_BARRI DeleteSynchronizationBarrier(core::mem::transmute(lpbarrier)) } #[inline] -pub unsafe fn DeleteTimerQueue(timerqueue: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteTimerQueue(timerqueue: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DeleteTimerQueue(timerqueue : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteTimerQueue(timerqueue.param().abi()).ok() + DeleteTimerQueue(core::mem::transmute(timerqueue)).ok() } #[inline] -pub unsafe fn DeleteTimerQueueEx(timerqueue: P0, completionevent: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DeleteTimerQueueEx(timerqueue: super::super::Foundation::HANDLE, completionevent: Option) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DeleteTimerQueueEx(timerqueue : super::super::Foundation:: HANDLE, completionevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteTimerQueueEx(timerqueue.param().abi(), completionevent.param().abi()).ok() + DeleteTimerQueueEx(core::mem::transmute(timerqueue), core::mem::transmute(completionevent.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DeleteTimerQueueTimer(timerqueue: P0, timer: P1, completionevent: P2) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn DeleteTimerQueueTimer(timerqueue: Option, timer: super::super::Foundation::HANDLE, completionevent: Option) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DeleteTimerQueueTimer(timerqueue : super::super::Foundation:: HANDLE, timer : super::super::Foundation:: HANDLE, completionevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteTimerQueueTimer(timerqueue.param().abi(), timer.param().abi(), completionevent.param().abi()).ok() + DeleteTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), core::mem::transmute(timer), core::mem::transmute(completionevent.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DeleteUmsCompletionList(umscompletionlist: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -739,12 +670,9 @@ pub unsafe fn DequeueUmsCompletionListItems(umscompletionlist: *const core::ffi: DequeueUmsCompletionListItems(core::mem::transmute(umscompletionlist), core::mem::transmute(waittimeout), core::mem::transmute(umsthreadlist)).ok() } #[inline] -pub unsafe fn DisassociateCurrentThreadFromCallback(pci: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn DisassociateCurrentThreadFromCallback(pci: PTP_CALLBACK_INSTANCE) { windows_targets::link!("kernel32.dll" "system" fn DisassociateCurrentThreadFromCallback(pci : PTP_CALLBACK_INSTANCE)); - DisassociateCurrentThreadFromCallback(pci.param().abi()) + DisassociateCurrentThreadFromCallback(core::mem::transmute(pci)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -779,9 +707,9 @@ pub unsafe fn ExitThread(dwexitcode: u32) -> ! { ExitThread(core::mem::transmute(dwexitcode)) } #[inline] -pub unsafe fn FlsAlloc(lpcallback: PFLS_CALLBACK_FUNCTION) -> u32 { +pub unsafe fn FlsAlloc(lpcallback: Option) -> u32 { windows_targets::link!("kernel32.dll" "system" fn FlsAlloc(lpcallback : PFLS_CALLBACK_FUNCTION) -> u32); - FlsAlloc(core::mem::transmute(lpcallback)) + FlsAlloc(core::mem::transmute(lpcallback.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FlsFree(dwflsindex: u32) -> windows_core::Result<()> { @@ -796,7 +724,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(core::mem::transmute(dwflsindex), core::mem::transmute(lpflsdata.unwrap_or(core::ptr::null()))).ok() + FlsSetValue(core::mem::transmute(dwflsindex), core::mem::transmute(lpflsdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn FlushProcessWriteBuffers() { @@ -804,13 +732,9 @@ pub unsafe fn FlushProcessWriteBuffers() { FlushProcessWriteBuffers() } #[inline] -pub unsafe fn FreeLibraryWhenCallbackReturns(pci: P0, r#mod: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn FreeLibraryWhenCallbackReturns(pci: PTP_CALLBACK_INSTANCE, r#mod: super::super::Foundation::HMODULE) { windows_targets::link!("kernel32.dll" "system" fn FreeLibraryWhenCallbackReturns(pci : PTP_CALLBACK_INSTANCE, r#mod : super::super::Foundation:: HMODULE)); - FreeLibraryWhenCallbackReturns(pci.param().abi(), r#mod.param().abi()) + FreeLibraryWhenCallbackReturns(core::mem::transmute(pci), core::mem::transmute(r#mod)) } #[inline] pub unsafe fn GetActiveProcessorCount(groupnumber: u16) -> u32 { @@ -866,28 +790,19 @@ pub unsafe fn GetCurrentUmsThread() -> *mut core::ffi::c_void { GetCurrentUmsThread() } #[inline] -pub unsafe fn GetExitCodeProcess(hprocess: P0, lpexitcode: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetExitCodeProcess(hprocess: super::super::Foundation::HANDLE, lpexitcode: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetExitCodeProcess(hprocess : super::super::Foundation:: HANDLE, lpexitcode : *mut u32) -> super::super::Foundation:: BOOL); - GetExitCodeProcess(hprocess.param().abi(), core::mem::transmute(lpexitcode)).ok() + GetExitCodeProcess(core::mem::transmute(hprocess), core::mem::transmute(lpexitcode)).ok() } #[inline] -pub unsafe fn GetExitCodeThread(hthread: P0, lpexitcode: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetExitCodeThread(hthread: super::super::Foundation::HANDLE, lpexitcode: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetExitCodeThread(hthread : super::super::Foundation:: HANDLE, lpexitcode : *mut u32) -> super::super::Foundation:: BOOL); - GetExitCodeThread(hthread.param().abi(), core::mem::transmute(lpexitcode)).ok() + GetExitCodeThread(core::mem::transmute(hthread), core::mem::transmute(lpexitcode)).ok() } #[inline] -pub unsafe fn GetGuiResources(hprocess: P0, uiflags: GET_GUI_RESOURCES_FLAGS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetGuiResources(hprocess: super::super::Foundation::HANDLE, uiflags: GET_GUI_RESOURCES_FLAGS) -> u32 { windows_targets::link!("user32.dll" "system" fn GetGuiResources(hprocess : super::super::Foundation:: HANDLE, uiflags : GET_GUI_RESOURCES_FLAGS) -> u32); - GetGuiResources(hprocess.param().abi(), core::mem::transmute(uiflags)) + GetGuiResources(core::mem::transmute(hprocess), core::mem::transmute(uiflags)) } #[inline] pub unsafe fn GetMachineTypeAttributes(machine: u16) -> windows_core::Result { @@ -926,12 +841,9 @@ pub unsafe fn GetNumaHighestNodeNumber(highestnodenumber: *mut u32) -> windows_c GetNumaHighestNodeNumber(core::mem::transmute(highestnodenumber)).ok() } #[inline] -pub unsafe fn GetNumaNodeNumberFromHandle(hfile: P0, nodenumber: *mut u16) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetNumaNodeNumberFromHandle(hfile: super::super::Foundation::HANDLE, nodenumber: *mut u16) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetNumaNodeNumberFromHandle(hfile : super::super::Foundation:: HANDLE, nodenumber : *mut u16) -> super::super::Foundation:: BOOL); - GetNumaNodeNumberFromHandle(hfile.param().abi(), core::mem::transmute(nodenumber)).ok() + GetNumaNodeNumberFromHandle(core::mem::transmute(hfile), core::mem::transmute(nodenumber)).ok() } #[inline] pub unsafe fn GetNumaNodeProcessorMask(node: u8, processormask: *mut u64) -> windows_core::Result<()> { @@ -972,117 +884,75 @@ pub unsafe fn GetNumaProximityNodeEx(proximityid: u32, nodenumber: *mut u16) -> GetNumaProximityNodeEx(core::mem::transmute(proximityid), core::mem::transmute(nodenumber)) } #[inline] -pub unsafe fn GetPriorityClass(hprocess: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetPriorityClass(hprocess: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetPriorityClass(hprocess : super::super::Foundation:: HANDLE) -> u32); - GetPriorityClass(hprocess.param().abi()) + GetPriorityClass(core::mem::transmute(hprocess)) } #[inline] -pub unsafe fn GetProcessAffinityMask(hprocess: P0, lpprocessaffinitymask: *mut usize, lpsystemaffinitymask: *mut usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessAffinityMask(hprocess: super::super::Foundation::HANDLE, lpprocessaffinitymask: *mut usize, lpsystemaffinitymask: *mut usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessAffinityMask(hprocess : super::super::Foundation:: HANDLE, lpprocessaffinitymask : *mut usize, lpsystemaffinitymask : *mut usize) -> super::super::Foundation:: BOOL); - GetProcessAffinityMask(hprocess.param().abi(), core::mem::transmute(lpprocessaffinitymask), core::mem::transmute(lpsystemaffinitymask)).ok() + GetProcessAffinityMask(core::mem::transmute(hprocess), core::mem::transmute(lpprocessaffinitymask), core::mem::transmute(lpsystemaffinitymask)).ok() } #[inline] -pub unsafe fn GetProcessDEPPolicy(hprocess: P0, lpflags: *mut u32, lppermanent: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessDEPPolicy(hprocess: super::super::Foundation::HANDLE, lpflags: *mut u32, lppermanent: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessDEPPolicy(hprocess : super::super::Foundation:: HANDLE, lpflags : *mut u32, lppermanent : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetProcessDEPPolicy(hprocess.param().abi(), core::mem::transmute(lpflags), core::mem::transmute(lppermanent)).ok() + GetProcessDEPPolicy(core::mem::transmute(hprocess), core::mem::transmute(lpflags), core::mem::transmute(lppermanent)).ok() } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] -pub unsafe fn GetProcessDefaultCpuSetMasks(process: P0, cpusetmasks: Option<&mut [super::SystemInformation::GROUP_AFFINITY]>, requiredmaskcount: *mut u16) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessDefaultCpuSetMasks(process: super::super::Foundation::HANDLE, cpusetmasks: Option<&mut [super::SystemInformation::GROUP_AFFINITY]>, requiredmaskcount: *mut u16) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetProcessDefaultCpuSetMasks(process : super::super::Foundation:: HANDLE, cpusetmasks : *mut super::SystemInformation:: GROUP_AFFINITY, cpusetmaskcount : u16, requiredmaskcount : *mut u16) -> super::super::Foundation:: BOOL); - GetProcessDefaultCpuSetMasks(process.param().abi(), core::mem::transmute(cpusetmasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredmaskcount)) + GetProcessDefaultCpuSetMasks(core::mem::transmute(process), core::mem::transmute(cpusetmasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredmaskcount)) } #[inline] -pub unsafe fn GetProcessDefaultCpuSets(process: P0, cpusetids: Option<&mut [u32]>, requiredidcount: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessDefaultCpuSets(process: super::super::Foundation::HANDLE, cpusetids: Option<&mut [u32]>, requiredidcount: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetProcessDefaultCpuSets(process : super::super::Foundation:: HANDLE, cpusetids : *mut u32, cpusetidcount : u32, requiredidcount : *mut u32) -> super::super::Foundation:: BOOL); - GetProcessDefaultCpuSets(process.param().abi(), core::mem::transmute(cpusetids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredidcount)) + GetProcessDefaultCpuSets(core::mem::transmute(process), core::mem::transmute(cpusetids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredidcount)) } #[inline] -pub unsafe fn GetProcessGroupAffinity(hprocess: P0, groupcount: *mut u16, grouparray: *mut u16) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessGroupAffinity(hprocess: super::super::Foundation::HANDLE, groupcount: *mut u16, grouparray: *mut u16) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetProcessGroupAffinity(hprocess : super::super::Foundation:: HANDLE, groupcount : *mut u16, grouparray : *mut u16) -> super::super::Foundation:: BOOL); - GetProcessGroupAffinity(hprocess.param().abi(), core::mem::transmute(groupcount), core::mem::transmute(grouparray)) + GetProcessGroupAffinity(core::mem::transmute(hprocess), core::mem::transmute(groupcount), core::mem::transmute(grouparray)) } #[inline] -pub unsafe fn GetProcessHandleCount(hprocess: P0, pdwhandlecount: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessHandleCount(hprocess: super::super::Foundation::HANDLE, pdwhandlecount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessHandleCount(hprocess : super::super::Foundation:: HANDLE, pdwhandlecount : *mut u32) -> super::super::Foundation:: BOOL); - GetProcessHandleCount(hprocess.param().abi(), core::mem::transmute(pdwhandlecount)).ok() + GetProcessHandleCount(core::mem::transmute(hprocess), core::mem::transmute(pdwhandlecount)).ok() } #[inline] -pub unsafe fn GetProcessHandleFromHwnd(hwnd: P0) -> super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessHandleFromHwnd(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::HANDLE { windows_targets::link!("oleacc.dll" "system" fn GetProcessHandleFromHwnd(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: HANDLE); - GetProcessHandleFromHwnd(hwnd.param().abi()) + GetProcessHandleFromHwnd(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetProcessId(process: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessId(process: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetProcessId(process : super::super::Foundation:: HANDLE) -> u32); - GetProcessId(process.param().abi()) + GetProcessId(core::mem::transmute(process)) } #[inline] -pub unsafe fn GetProcessIdOfThread(thread: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessIdOfThread(thread: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetProcessIdOfThread(thread : super::super::Foundation:: HANDLE) -> u32); - GetProcessIdOfThread(thread.param().abi()) + GetProcessIdOfThread(core::mem::transmute(thread)) } #[inline] -pub unsafe fn GetProcessInformation(hprocess: P0, processinformationclass: PROCESS_INFORMATION_CLASS, processinformation: *mut core::ffi::c_void, processinformationsize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessInformation(hprocess: super::super::Foundation::HANDLE, processinformationclass: PROCESS_INFORMATION_CLASS, processinformation: *mut core::ffi::c_void, processinformationsize: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessInformation(hprocess : super::super::Foundation:: HANDLE, processinformationclass : PROCESS_INFORMATION_CLASS, processinformation : *mut core::ffi::c_void, processinformationsize : u32) -> super::super::Foundation:: BOOL); - GetProcessInformation(hprocess.param().abi(), core::mem::transmute(processinformationclass), core::mem::transmute(processinformation), core::mem::transmute(processinformationsize)).ok() + GetProcessInformation(core::mem::transmute(hprocess), core::mem::transmute(processinformationclass), core::mem::transmute(processinformation), core::mem::transmute(processinformationsize)).ok() } #[inline] -pub unsafe fn GetProcessIoCounters(hprocess: P0, lpiocounters: *mut IO_COUNTERS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessIoCounters(hprocess: super::super::Foundation::HANDLE, lpiocounters: *mut IO_COUNTERS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessIoCounters(hprocess : super::super::Foundation:: HANDLE, lpiocounters : *mut IO_COUNTERS) -> super::super::Foundation:: BOOL); - GetProcessIoCounters(hprocess.param().abi(), core::mem::transmute(lpiocounters)).ok() + GetProcessIoCounters(core::mem::transmute(hprocess), core::mem::transmute(lpiocounters)).ok() } #[inline] -pub unsafe fn GetProcessMitigationPolicy(hprocess: P0, mitigationpolicy: PROCESS_MITIGATION_POLICY, lpbuffer: *mut core::ffi::c_void, dwlength: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessMitigationPolicy(hprocess: super::super::Foundation::HANDLE, mitigationpolicy: PROCESS_MITIGATION_POLICY, lpbuffer: *mut core::ffi::c_void, dwlength: usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessMitigationPolicy(hprocess : super::super::Foundation:: HANDLE, mitigationpolicy : PROCESS_MITIGATION_POLICY, lpbuffer : *mut core::ffi::c_void, dwlength : usize) -> super::super::Foundation:: BOOL); - GetProcessMitigationPolicy(hprocess.param().abi(), core::mem::transmute(mitigationpolicy), core::mem::transmute(lpbuffer), core::mem::transmute(dwlength)).ok() + GetProcessMitigationPolicy(core::mem::transmute(hprocess), core::mem::transmute(mitigationpolicy), core::mem::transmute(lpbuffer), core::mem::transmute(dwlength)).ok() } #[inline] -pub unsafe fn GetProcessPriorityBoost(hprocess: P0, pdisablepriorityboost: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessPriorityBoost(hprocess: super::super::Foundation::HANDLE, pdisablepriorityboost: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessPriorityBoost(hprocess : super::super::Foundation:: HANDLE, pdisablepriorityboost : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetProcessPriorityBoost(hprocess.param().abi(), core::mem::transmute(pdisablepriorityboost)).ok() + GetProcessPriorityBoost(core::mem::transmute(hprocess), core::mem::transmute(pdisablepriorityboost)).ok() } #[inline] pub unsafe fn GetProcessShutdownParameters(lpdwlevel: *mut u32, lpdwflags: *mut u32) -> windows_core::Result<()> { @@ -1090,12 +960,9 @@ pub unsafe fn GetProcessShutdownParameters(lpdwlevel: *mut u32, lpdwflags: *mut GetProcessShutdownParameters(core::mem::transmute(lpdwlevel), core::mem::transmute(lpdwflags)).ok() } #[inline] -pub unsafe fn GetProcessTimes(hprocess: P0, lpcreationtime: *mut super::super::Foundation::FILETIME, lpexittime: *mut super::super::Foundation::FILETIME, lpkerneltime: *mut super::super::Foundation::FILETIME, lpusertime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessTimes(hprocess: super::super::Foundation::HANDLE, lpcreationtime: *mut super::super::Foundation::FILETIME, lpexittime: *mut super::super::Foundation::FILETIME, lpkerneltime: *mut super::super::Foundation::FILETIME, lpusertime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessTimes(hprocess : super::super::Foundation:: HANDLE, lpcreationtime : *mut super::super::Foundation:: FILETIME, lpexittime : *mut super::super::Foundation:: FILETIME, lpkerneltime : *mut super::super::Foundation:: FILETIME, lpusertime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - GetProcessTimes(hprocess.param().abi(), core::mem::transmute(lpcreationtime), core::mem::transmute(lpexittime), core::mem::transmute(lpkerneltime), core::mem::transmute(lpusertime)).ok() + GetProcessTimes(core::mem::transmute(hprocess), core::mem::transmute(lpcreationtime), core::mem::transmute(lpexittime), core::mem::transmute(lpkerneltime), core::mem::transmute(lpusertime)).ok() } #[inline] pub unsafe fn GetProcessVersion(processid: u32) -> u32 { @@ -1103,12 +970,9 @@ pub unsafe fn GetProcessVersion(processid: u32) -> u32 { GetProcessVersion(core::mem::transmute(processid)) } #[inline] -pub unsafe fn GetProcessWorkingSetSize(hprocess: P0, lpminimumworkingsetsize: *mut usize, lpmaximumworkingsetsize: *mut usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessWorkingSetSize(hprocess: super::super::Foundation::HANDLE, lpminimumworkingsetsize: *mut usize, lpmaximumworkingsetsize: *mut usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetProcessWorkingSetSize(hprocess : super::super::Foundation:: HANDLE, lpminimumworkingsetsize : *mut usize, lpmaximumworkingsetsize : *mut usize) -> super::super::Foundation:: BOOL); - GetProcessWorkingSetSize(hprocess.param().abi(), core::mem::transmute(lpminimumworkingsetsize), core::mem::transmute(lpmaximumworkingsetsize)).ok() + GetProcessWorkingSetSize(core::mem::transmute(hprocess), core::mem::transmute(lpminimumworkingsetsize), core::mem::transmute(lpmaximumworkingsetsize)).ok() } #[inline] pub unsafe fn GetStartupInfoA(lpstartupinfo: *mut STARTUPINFOA) { @@ -1123,99 +987,66 @@ 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(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() + GetSystemTimes(core::mem::transmute(lpidletime.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpkerneltime.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpusertime.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetThreadDescription(hthread: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadDescription(hthread: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn GetThreadDescription(hthread : super::super::Foundation:: HANDLE, ppszthreaddescription : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThreadDescription(hthread.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + GetThreadDescription(core::mem::transmute(hthread), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] -pub unsafe fn GetThreadGroupAffinity(hthread: P0, groupaffinity: *mut super::SystemInformation::GROUP_AFFINITY) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadGroupAffinity(hthread: super::super::Foundation::HANDLE, groupaffinity: *mut super::SystemInformation::GROUP_AFFINITY) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetThreadGroupAffinity(hthread : super::super::Foundation:: HANDLE, groupaffinity : *mut super::SystemInformation:: GROUP_AFFINITY) -> super::super::Foundation:: BOOL); - GetThreadGroupAffinity(hthread.param().abi(), core::mem::transmute(groupaffinity)) + GetThreadGroupAffinity(core::mem::transmute(hthread), core::mem::transmute(groupaffinity)) } #[inline] -pub unsafe fn GetThreadIOPendingFlag(hthread: P0, lpioispending: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadIOPendingFlag(hthread: super::super::Foundation::HANDLE, lpioispending: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetThreadIOPendingFlag(hthread : super::super::Foundation:: HANDLE, lpioispending : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetThreadIOPendingFlag(hthread.param().abi(), core::mem::transmute(lpioispending)).ok() + GetThreadIOPendingFlag(core::mem::transmute(hthread), core::mem::transmute(lpioispending)).ok() } #[inline] -pub unsafe fn GetThreadId(thread: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadId(thread: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetThreadId(thread : super::super::Foundation:: HANDLE) -> u32); - GetThreadId(thread.param().abi()) + GetThreadId(core::mem::transmute(thread)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn GetThreadIdealProcessorEx(hthread: P0, lpidealprocessor: *mut super::Kernel::PROCESSOR_NUMBER) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadIdealProcessorEx(hthread: super::super::Foundation::HANDLE, lpidealprocessor: *mut super::Kernel::PROCESSOR_NUMBER) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetThreadIdealProcessorEx(hthread : super::super::Foundation:: HANDLE, lpidealprocessor : *mut super::Kernel:: PROCESSOR_NUMBER) -> super::super::Foundation:: BOOL); - GetThreadIdealProcessorEx(hthread.param().abi(), core::mem::transmute(lpidealprocessor)).ok() + GetThreadIdealProcessorEx(core::mem::transmute(hthread), core::mem::transmute(lpidealprocessor)).ok() } #[inline] -pub unsafe fn GetThreadInformation(hthread: P0, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *mut core::ffi::c_void, threadinformationsize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadInformation(hthread: super::super::Foundation::HANDLE, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *mut core::ffi::c_void, threadinformationsize: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetThreadInformation(hthread : super::super::Foundation:: HANDLE, threadinformationclass : THREAD_INFORMATION_CLASS, threadinformation : *mut core::ffi::c_void, threadinformationsize : u32) -> super::super::Foundation:: BOOL); - GetThreadInformation(hthread.param().abi(), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationsize)).ok() + GetThreadInformation(core::mem::transmute(hthread), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationsize)).ok() } #[inline] -pub unsafe fn GetThreadPriority(hthread: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadPriority(hthread: super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("kernel32.dll" "system" fn GetThreadPriority(hthread : super::super::Foundation:: HANDLE) -> i32); - GetThreadPriority(hthread.param().abi()) + GetThreadPriority(core::mem::transmute(hthread)) } #[inline] -pub unsafe fn GetThreadPriorityBoost(hthread: P0, pdisablepriorityboost: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadPriorityBoost(hthread: super::super::Foundation::HANDLE, pdisablepriorityboost: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetThreadPriorityBoost(hthread : super::super::Foundation:: HANDLE, pdisablepriorityboost : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetThreadPriorityBoost(hthread.param().abi(), core::mem::transmute(pdisablepriorityboost)).ok() + GetThreadPriorityBoost(core::mem::transmute(hthread), core::mem::transmute(pdisablepriorityboost)).ok() } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] -pub unsafe fn GetThreadSelectedCpuSetMasks(thread: P0, cpusetmasks: Option<&mut [super::SystemInformation::GROUP_AFFINITY]>, requiredmaskcount: *mut u16) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadSelectedCpuSetMasks(thread: super::super::Foundation::HANDLE, cpusetmasks: Option<&mut [super::SystemInformation::GROUP_AFFINITY]>, requiredmaskcount: *mut u16) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetThreadSelectedCpuSetMasks(thread : super::super::Foundation:: HANDLE, cpusetmasks : *mut super::SystemInformation:: GROUP_AFFINITY, cpusetmaskcount : u16, requiredmaskcount : *mut u16) -> super::super::Foundation:: BOOL); - GetThreadSelectedCpuSetMasks(thread.param().abi(), core::mem::transmute(cpusetmasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredmaskcount)) + GetThreadSelectedCpuSetMasks(core::mem::transmute(thread), core::mem::transmute(cpusetmasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredmaskcount)) } #[inline] -pub unsafe fn GetThreadSelectedCpuSets(thread: P0, cpusetids: Option<&mut [u32]>, requiredidcount: *mut u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadSelectedCpuSets(thread: super::super::Foundation::HANDLE, cpusetids: Option<&mut [u32]>, requiredidcount: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetThreadSelectedCpuSets(thread : super::super::Foundation:: HANDLE, cpusetids : *mut u32, cpusetidcount : u32, requiredidcount : *mut u32) -> super::super::Foundation:: BOOL); - GetThreadSelectedCpuSets(thread.param().abi(), core::mem::transmute(cpusetids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredidcount)) + GetThreadSelectedCpuSets(core::mem::transmute(thread), core::mem::transmute(cpusetids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(requiredidcount)) } #[inline] -pub unsafe fn GetThreadTimes(hthread: P0, lpcreationtime: *mut super::super::Foundation::FILETIME, lpexittime: *mut super::super::Foundation::FILETIME, lpkerneltime: *mut super::super::Foundation::FILETIME, lpusertime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThreadTimes(hthread: super::super::Foundation::HANDLE, lpcreationtime: *mut super::super::Foundation::FILETIME, lpexittime: *mut super::super::Foundation::FILETIME, lpkerneltime: *mut super::super::Foundation::FILETIME, lpusertime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetThreadTimes(hthread : super::super::Foundation:: HANDLE, lpcreationtime : *mut super::super::Foundation:: FILETIME, lpexittime : *mut super::super::Foundation:: FILETIME, lpkerneltime : *mut super::super::Foundation:: FILETIME, lpusertime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - GetThreadTimes(hthread.param().abi(), core::mem::transmute(lpcreationtime), core::mem::transmute(lpexittime), core::mem::transmute(lpkerneltime), core::mem::transmute(lpusertime)).ok() + GetThreadTimes(core::mem::transmute(hthread), core::mem::transmute(lpcreationtime), core::mem::transmute(lpexittime), core::mem::transmute(lpkerneltime), core::mem::transmute(lpusertime)).ok() } #[inline] pub unsafe fn GetUmsCompletionListEvent(umscompletionlist: *const core::ffi::c_void, umscompletionevent: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -1223,27 +1054,24 @@ pub unsafe fn GetUmsCompletionListEvent(umscompletionlist: *const core::ffi::c_v GetUmsCompletionListEvent(core::mem::transmute(umscompletionlist), core::mem::transmute(umscompletionevent)).ok() } #[inline] -pub unsafe fn GetUmsSystemThreadInformation(threadhandle: P0, systemthreadinfo: *mut UMS_SYSTEM_THREAD_INFORMATION) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetUmsSystemThreadInformation(threadhandle: super::super::Foundation::HANDLE, systemthreadinfo: *mut UMS_SYSTEM_THREAD_INFORMATION) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetUmsSystemThreadInformation(threadhandle : super::super::Foundation:: HANDLE, systemthreadinfo : *mut UMS_SYSTEM_THREAD_INFORMATION) -> super::super::Foundation:: BOOL); - GetUmsSystemThreadInformation(threadhandle.param().abi(), core::mem::transmute(systemthreadinfo)) + GetUmsSystemThreadInformation(core::mem::transmute(threadhandle), core::mem::transmute(systemthreadinfo)) } #[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(core::mem::transmute(lpinitonce), core::mem::transmute(dwflags), core::mem::transmute(fpending), core::mem::transmute(lpcontext.unwrap_or(core::ptr::null_mut()))).ok() + InitOnceBeginInitialize(core::mem::transmute(lpinitonce), core::mem::transmute(dwflags), core::mem::transmute(fpending), core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(lpinitonce), core::mem::transmute(dwflags), core::mem::transmute(lpcontext.unwrap_or(core::ptr::null()))).ok() + InitOnceComplete(core::mem::transmute(lpinitonce), core::mem::transmute(dwflags), core::mem::transmute(lpcontext.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(initonce), core::mem::transmute(initfn), core::mem::transmute(parameter.unwrap_or(core::ptr::null_mut())), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))).ok() + InitOnceExecuteOnce(core::mem::transmute(initonce), core::mem::transmute(initfn), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn InitOnceInitialize() -> INIT_ONCE { @@ -1278,9 +1106,9 @@ pub unsafe fn InitializeCriticalSectionEx(lpcriticalsection: *mut CRITICAL_SECTI InitializeCriticalSectionEx(core::mem::transmute(lpcriticalsection), core::mem::transmute(dwspincount), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn InitializeProcThreadAttributeList(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST, dwattributecount: u32, dwflags: u32, lpsize: *mut usize) -> windows_core::Result<()> { +pub unsafe fn InitializeProcThreadAttributeList(lpattributelist: Option, dwattributecount: u32, dwflags: Option, lpsize: *mut usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn InitializeProcThreadAttributeList(lpattributelist : LPPROC_THREAD_ATTRIBUTE_LIST, dwattributecount : u32, dwflags : u32, lpsize : *mut usize) -> super::super::Foundation:: BOOL); - InitializeProcThreadAttributeList(core::mem::transmute(lpattributelist), core::mem::transmute(dwattributecount), core::mem::transmute(dwflags), core::mem::transmute(lpsize)).ok() + InitializeProcThreadAttributeList(core::mem::transmute(lpattributelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwattributecount), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpsize)).ok() } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1327,20 +1155,14 @@ pub unsafe fn InterlockedPushListSListEx(listhead: *mut super::Kernel::SLIST_HEA InterlockedPushListSListEx(core::mem::transmute(listhead), core::mem::transmute(list), core::mem::transmute(listend), core::mem::transmute(count)) } #[inline] -pub unsafe fn IsImmersiveProcess(hprocess: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn IsImmersiveProcess(hprocess: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn IsImmersiveProcess(hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - IsImmersiveProcess(hprocess.param().abi()).ok() + IsImmersiveProcess(core::mem::transmute(hprocess)).ok() } #[inline] -pub unsafe fn IsProcessCritical(hprocess: P0, critical: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn IsProcessCritical(hprocess: super::super::Foundation::HANDLE, critical: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn IsProcessCritical(hprocess : super::super::Foundation:: HANDLE, critical : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - IsProcessCritical(hprocess.param().abi(), core::mem::transmute(critical)).ok() + IsProcessCritical(core::mem::transmute(hprocess), core::mem::transmute(critical)).ok() } #[inline] pub unsafe fn IsProcessorFeaturePresent(processorfeature: PROCESSOR_FEATURE_ID) -> super::super::Foundation::BOOL { @@ -1353,29 +1175,20 @@ pub unsafe fn IsThreadAFiber() -> super::super::Foundation::BOOL { IsThreadAFiber() } #[inline] -pub unsafe fn IsThreadpoolTimerSet(pti: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsThreadpoolTimerSet(pti: PTP_TIMER) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn IsThreadpoolTimerSet(pti : PTP_TIMER) -> super::super::Foundation:: BOOL); - IsThreadpoolTimerSet(pti.param().abi()) + IsThreadpoolTimerSet(core::mem::transmute(pti)) } #[inline] -pub unsafe fn IsWow64Process(hprocess: P0, wow64process: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn IsWow64Process(hprocess: super::super::Foundation::HANDLE, wow64process: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn IsWow64Process(hprocess : super::super::Foundation:: HANDLE, wow64process : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - IsWow64Process(hprocess.param().abi(), core::mem::transmute(wow64process)).ok() + IsWow64Process(core::mem::transmute(hprocess), core::mem::transmute(wow64process)).ok() } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] -pub unsafe fn IsWow64Process2(hprocess: P0, pprocessmachine: *mut super::SystemInformation::IMAGE_FILE_MACHINE, pnativemachine: Option<*mut super::SystemInformation::IMAGE_FILE_MACHINE>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn IsWow64Process2(hprocess: super::super::Foundation::HANDLE, pprocessmachine: *mut super::SystemInformation::IMAGE_FILE_MACHINE, pnativemachine: Option<*mut super::SystemInformation::IMAGE_FILE_MACHINE>) -> windows_core::Result<()> { 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(), core::mem::transmute(pprocessmachine), core::mem::transmute(pnativemachine.unwrap_or(core::ptr::null_mut()))).ok() + IsWow64Process2(core::mem::transmute(hprocess), core::mem::transmute(pprocessmachine), core::mem::transmute(pnativemachine.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1385,12 +1198,9 @@ pub unsafe fn LeaveCriticalSection(lpcriticalsection: *mut CRITICAL_SECTION) { } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn LeaveCriticalSectionWhenCallbackReturns(pci: P0, pcs: *mut CRITICAL_SECTION) -where - P0: windows_core::Param, -{ +pub unsafe fn LeaveCriticalSectionWhenCallbackReturns(pci: PTP_CALLBACK_INSTANCE, pcs: *mut CRITICAL_SECTION) { windows_targets::link!("kernel32.dll" "system" fn LeaveCriticalSectionWhenCallbackReturns(pci : PTP_CALLBACK_INSTANCE, pcs : *mut CRITICAL_SECTION)); - LeaveCriticalSectionWhenCallbackReturns(pci.param().abi(), core::mem::transmute(pcs)) + LeaveCriticalSectionWhenCallbackReturns(core::mem::transmute(pci), core::mem::transmute(pcs)) } #[inline] pub unsafe fn OpenEventA(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: P1, lpname: P2) -> windows_core::Result @@ -1449,12 +1259,9 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn OpenProcessToken(processhandle: P0, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, tokenhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn OpenProcessToken(processhandle: super::super::Foundation::HANDLE, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, tokenhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn OpenProcessToken(processhandle : super::super::Foundation:: HANDLE, desiredaccess : super::super::Security:: TOKEN_ACCESS_MASK, tokenhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - OpenProcessToken(processhandle.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(tokenhandle)).ok() + OpenProcessToken(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(tokenhandle)).ok() } #[inline] pub unsafe fn OpenSemaphoreW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: P1, lpname: P2) -> windows_core::Result @@ -1477,13 +1284,12 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn OpenThreadToken(threadhandle: P0, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, openasself: P2, tokenhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> +pub unsafe fn OpenThreadToken(threadhandle: super::super::Foundation::HANDLE, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, openasself: P2, tokenhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenThreadToken(threadhandle : super::super::Foundation:: HANDLE, desiredaccess : super::super::Security:: TOKEN_ACCESS_MASK, openasself : super::super::Foundation:: BOOL, tokenhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - OpenThreadToken(threadhandle.param().abi(), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)).ok() + OpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)).ok() } #[inline] pub unsafe fn OpenWaitableTimerA(dwdesiredaccess: u32, binherithandle: P1, lptimername: P2) -> super::super::Foundation::HANDLE @@ -1505,12 +1311,9 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn PulseEvent(hevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn PulseEvent(hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn PulseEvent(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - PulseEvent(hevent.param().abi()).ok() + PulseEvent(core::mem::transmute(hevent)).ok() } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1519,28 +1322,19 @@ pub unsafe fn QueryDepthSList(listhead: *const super::Kernel::SLIST_HEADER) -> u QueryDepthSList(core::mem::transmute(listhead)) } #[inline] -pub unsafe fn QueryFullProcessImageNameA(hprocess: P0, dwflags: PROCESS_NAME_FORMAT, lpexename: windows_core::PSTR, lpdwsize: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryFullProcessImageNameA(hprocess: super::super::Foundation::HANDLE, dwflags: PROCESS_NAME_FORMAT, lpexename: windows_core::PSTR, lpdwsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryFullProcessImageNameA(hprocess : super::super::Foundation:: HANDLE, dwflags : PROCESS_NAME_FORMAT, lpexename : windows_core::PSTR, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - QueryFullProcessImageNameA(hprocess.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpexename), core::mem::transmute(lpdwsize)).ok() + QueryFullProcessImageNameA(core::mem::transmute(hprocess), core::mem::transmute(dwflags), core::mem::transmute(lpexename), core::mem::transmute(lpdwsize)).ok() } #[inline] -pub unsafe fn QueryFullProcessImageNameW(hprocess: P0, dwflags: PROCESS_NAME_FORMAT, lpexename: windows_core::PWSTR, lpdwsize: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryFullProcessImageNameW(hprocess: super::super::Foundation::HANDLE, dwflags: PROCESS_NAME_FORMAT, lpexename: windows_core::PWSTR, lpdwsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryFullProcessImageNameW(hprocess : super::super::Foundation:: HANDLE, dwflags : PROCESS_NAME_FORMAT, lpexename : windows_core::PWSTR, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - QueryFullProcessImageNameW(hprocess.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(lpexename), core::mem::transmute(lpdwsize)).ok() + QueryFullProcessImageNameW(core::mem::transmute(hprocess), core::mem::transmute(dwflags), core::mem::transmute(lpexename), core::mem::transmute(lpdwsize)).ok() } #[inline] -pub unsafe fn QueryProcessAffinityUpdateMode(hprocess: P0, lpdwflags: Option<*mut PROCESS_AFFINITY_AUTO_UPDATE_FLAGS>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryProcessAffinityUpdateMode(hprocess: super::super::Foundation::HANDLE, lpdwflags: Option<*mut PROCESS_AFFINITY_AUTO_UPDATE_FLAGS>) -> windows_core::Result<()> { 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(core::ptr::null_mut()))).ok() + QueryProcessAffinityUpdateMode(core::mem::transmute(hprocess), core::mem::transmute(lpdwflags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn QueryProtectedPolicy(policyguid: *const windows_core::GUID, policyvalue: *mut usize) -> super::super::Foundation::BOOL { @@ -1548,63 +1342,44 @@ pub unsafe fn QueryProtectedPolicy(policyguid: *const windows_core::GUID, policy QueryProtectedPolicy(core::mem::transmute(policyguid), core::mem::transmute(policyvalue)) } #[inline] -pub unsafe fn QueryThreadpoolStackInformation(ptpp: P0, ptpsi: *mut TP_POOL_STACK_INFORMATION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryThreadpoolStackInformation(ptpp: PTP_POOL, ptpsi: *mut TP_POOL_STACK_INFORMATION) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryThreadpoolStackInformation(ptpp : PTP_POOL, ptpsi : *mut TP_POOL_STACK_INFORMATION) -> super::super::Foundation:: BOOL); - QueryThreadpoolStackInformation(ptpp.param().abi(), core::mem::transmute(ptpsi)).ok() + QueryThreadpoolStackInformation(core::mem::transmute(ptpp), core::mem::transmute(ptpsi)).ok() } #[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(core::mem::transmute(umsthread), core::mem::transmute(umsthreadinfoclass), core::mem::transmute(umsthreadinformation), core::mem::transmute(umsthreadinformationlength), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))).ok() + QueryUmsThreadInformation(core::mem::transmute(umsthread), core::mem::transmute(umsthreadinfoclass), core::mem::transmute(umsthreadinformation), core::mem::transmute(umsthreadinformationlength), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn QueueUserAPC(pfnapc: super::super::Foundation::PAPCFUNC, hthread: P1, dwdata: usize) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn QueueUserAPC(pfnapc: super::super::Foundation::PAPCFUNC, hthread: super::super::Foundation::HANDLE, dwdata: usize) -> u32 { windows_targets::link!("kernel32.dll" "system" fn QueueUserAPC(pfnapc : super::super::Foundation:: PAPCFUNC, hthread : super::super::Foundation:: HANDLE, dwdata : usize) -> u32); - QueueUserAPC(core::mem::transmute(pfnapc), hthread.param().abi(), core::mem::transmute(dwdata)) + QueueUserAPC(core::mem::transmute(pfnapc), core::mem::transmute(hthread), core::mem::transmute(dwdata)) } #[inline] -pub unsafe fn QueueUserAPC2(apcroutine: super::super::Foundation::PAPCFUNC, thread: P1, data: usize, flags: QUEUE_USER_APC_FLAGS) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn QueueUserAPC2(apcroutine: super::super::Foundation::PAPCFUNC, thread: super::super::Foundation::HANDLE, data: usize, flags: QUEUE_USER_APC_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn QueueUserAPC2(apcroutine : super::super::Foundation:: PAPCFUNC, thread : super::super::Foundation:: HANDLE, data : usize, flags : QUEUE_USER_APC_FLAGS) -> super::super::Foundation:: BOOL); - QueueUserAPC2(core::mem::transmute(apcroutine), thread.param().abi(), core::mem::transmute(data), core::mem::transmute(flags)) + QueueUserAPC2(core::mem::transmute(apcroutine), core::mem::transmute(thread), core::mem::transmute(data), core::mem::transmute(flags)) } #[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(core::mem::transmute(function), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(flags)).ok() + QueueUserWorkItem(core::mem::transmute(function), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn RegisterWaitForSingleObject(phnewwaitobject: *mut super::super::Foundation::HANDLE, hobject: P1, callback: WAITORTIMERCALLBACK, context: Option<*const core::ffi::c_void>, dwmilliseconds: u32, dwflags: WORKER_THREAD_FLAGS) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn RegisterWaitForSingleObject(phnewwaitobject: *mut super::super::Foundation::HANDLE, hobject: super::super::Foundation::HANDLE, callback: WAITORTIMERCALLBACK, context: Option<*const core::ffi::c_void>, dwmilliseconds: u32, dwflags: WORKER_THREAD_FLAGS) -> windows_core::Result<()> { 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(core::mem::transmute(phnewwaitobject), hobject.param().abi(), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(dwmilliseconds), core::mem::transmute(dwflags)).ok() + RegisterWaitForSingleObject(core::mem::transmute(phnewwaitobject), core::mem::transmute(hobject), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmilliseconds), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn ReleaseMutex(hmutex: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReleaseMutex(hmutex: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReleaseMutex(hmutex : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ReleaseMutex(hmutex.param().abi()).ok() + ReleaseMutex(core::mem::transmute(hmutex)).ok() } #[inline] -pub unsafe fn ReleaseMutexWhenCallbackReturns(pci: P0, r#mut: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ReleaseMutexWhenCallbackReturns(pci: PTP_CALLBACK_INSTANCE, r#mut: super::super::Foundation::HANDLE) { windows_targets::link!("kernel32.dll" "system" fn ReleaseMutexWhenCallbackReturns(pci : PTP_CALLBACK_INSTANCE, r#mut : super::super::Foundation:: HANDLE)); - ReleaseMutexWhenCallbackReturns(pci.param().abi(), r#mut.param().abi()) + ReleaseMutexWhenCallbackReturns(core::mem::transmute(pci), core::mem::transmute(r#mut)) } #[inline] pub unsafe fn ReleaseSRWLockExclusive(srwlock: *mut SRWLOCK) { @@ -1617,37 +1392,24 @@ pub unsafe fn ReleaseSRWLockShared(srwlock: *mut SRWLOCK) { ReleaseSRWLockShared(core::mem::transmute(srwlock)) } #[inline] -pub unsafe fn ReleaseSemaphore(hsemaphore: P0, lreleasecount: i32, lppreviouscount: Option<*mut i32>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ReleaseSemaphore(hsemaphore: super::super::Foundation::HANDLE, lreleasecount: i32, lppreviouscount: Option<*mut i32>) -> windows_core::Result<()> { 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(), core::mem::transmute(lreleasecount), core::mem::transmute(lppreviouscount.unwrap_or(core::ptr::null_mut()))).ok() + ReleaseSemaphore(core::mem::transmute(hsemaphore), core::mem::transmute(lreleasecount), core::mem::transmute(lppreviouscount.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn ReleaseSemaphoreWhenCallbackReturns(pci: P0, sem: P1, crel: u32) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ReleaseSemaphoreWhenCallbackReturns(pci: PTP_CALLBACK_INSTANCE, sem: super::super::Foundation::HANDLE, crel: u32) { windows_targets::link!("kernel32.dll" "system" fn ReleaseSemaphoreWhenCallbackReturns(pci : PTP_CALLBACK_INSTANCE, sem : super::super::Foundation:: HANDLE, crel : u32)); - ReleaseSemaphoreWhenCallbackReturns(pci.param().abi(), sem.param().abi(), core::mem::transmute(crel)) + ReleaseSemaphoreWhenCallbackReturns(core::mem::transmute(pci), core::mem::transmute(sem), core::mem::transmute(crel)) } #[inline] -pub unsafe fn ResetEvent(hevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ResetEvent(hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ResetEvent(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ResetEvent(hevent.param().abi()).ok() + ResetEvent(core::mem::transmute(hevent)).ok() } #[inline] -pub unsafe fn ResumeThread(hthread: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ResumeThread(hthread: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn ResumeThread(hthread : super::super::Foundation:: HANDLE) -> u32); - ResumeThread(hthread.param().abi()) + ResumeThread(core::mem::transmute(hthread)) } #[inline] pub unsafe fn RtwqAddPeriodicCallback(callback: RTWQPERIODICCALLBACK, context: P1, key: Option<*mut u32>) -> windows_core::Result<()> @@ -1655,7 +1417,7 @@ where P1: 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(core::mem::transmute(callback), context.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null_mut()))).ok() + RtwqAddPeriodicCallback(core::mem::transmute(callback), context.param().abi(), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RtwqAllocateSerialWorkQueue(workqueueidin: u32) -> windows_core::Result { @@ -1689,12 +1451,9 @@ where RtwqBeginUnregisterWorkQueueWithMMCSS(core::mem::transmute(workqueueid), donecallback.param().abi(), donestate.param().abi()).ok() } #[inline] -pub unsafe fn RtwqCancelDeadline(prequest: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RtwqCancelDeadline(prequest: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("rtworkq.dll" "system" fn RtwqCancelDeadline(prequest : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - RtwqCancelDeadline(prequest.param().abi()).ok() + RtwqCancelDeadline(core::mem::transmute(prequest)).ok() } #[inline] pub unsafe fn RtwqCancelWorkItem(key: u64) -> windows_core::Result<()> { @@ -1722,9 +1481,9 @@ where RtwqEndRegisterWorkQueueWithMMCSS(result.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn RtwqGetWorkQueueMMCSSClass(workqueueid: u32, usageclass: windows_core::PWSTR, usageclasslength: *mut u32) -> windows_core::Result<()> { +pub unsafe fn RtwqGetWorkQueueMMCSSClass(workqueueid: u32, usageclass: Option, usageclasslength: *mut u32) -> windows_core::Result<()> { windows_targets::link!("rtworkq.dll" "system" fn RtwqGetWorkQueueMMCSSClass(workqueueid : u32, usageclass : windows_core::PWSTR, usageclasslength : *mut u32) -> windows_core::HRESULT); - RtwqGetWorkQueueMMCSSClass(core::mem::transmute(workqueueid), core::mem::transmute(usageclass), core::mem::transmute(usageclasslength)).ok() + RtwqGetWorkQueueMMCSSClass(core::mem::transmute(workqueueid), core::mem::transmute(usageclass.unwrap_or(core::mem::zeroed())), core::mem::transmute(usageclasslength)).ok() } #[inline] pub unsafe fn RtwqGetWorkQueueMMCSSPriority(workqueueid: u32) -> windows_core::Result { @@ -1747,13 +1506,10 @@ where RtwqInvokeCallback(result.param().abi()).ok() } #[inline] -pub unsafe fn RtwqJoinWorkQueue(workqueueid: u32, hfile: P1) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn RtwqJoinWorkQueue(workqueueid: u32, hfile: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("rtworkq.dll" "system" fn RtwqJoinWorkQueue(workqueueid : u32, hfile : super::super::Foundation:: HANDLE, out : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - RtwqJoinWorkQueue(core::mem::transmute(workqueueid), hfile.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + RtwqJoinWorkQueue(core::mem::transmute(workqueueid), core::mem::transmute(hfile), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn RtwqLockPlatform() -> windows_core::Result<()> { @@ -1774,13 +1530,12 @@ pub unsafe fn RtwqLockWorkQueue(workqueueid: u32) -> windows_core::Result<()> { RtwqLockWorkQueue(core::mem::transmute(workqueueid)).ok() } #[inline] -pub unsafe fn RtwqPutWaitingWorkItem(hevent: P0, lpriority: i32, result: P2, key: Option<*mut u64>) -> windows_core::Result<()> +pub unsafe fn RtwqPutWaitingWorkItem(hevent: super::super::Foundation::HANDLE, lpriority: i32, result: P2, key: Option<*mut u64>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(lpriority), result.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null_mut()))).ok() + RtwqPutWaitingWorkItem(core::mem::transmute(hevent), core::mem::transmute(lpriority), result.param().abi(), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RtwqPutWorkItem(dwqueue: u32, lpriority: i32, result: P2) -> windows_core::Result<()> @@ -1817,7 +1572,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(), core::mem::transmute(timeout), core::mem::transmute(key.unwrap_or(core::ptr::null_mut()))).ok() + RtwqScheduleWorkItem(result.param().abi(), core::mem::transmute(timeout), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RtwqSetDeadline(workqueueid: u32, deadlineinhns: i64) -> windows_core::Result { @@ -1850,12 +1605,9 @@ pub unsafe fn RtwqStartup() -> windows_core::Result<()> { RtwqStartup().ok() } #[inline] -pub unsafe fn RtwqUnjoinWorkQueue(workqueueid: u32, hfile: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn RtwqUnjoinWorkQueue(workqueueid: u32, hfile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("rtworkq.dll" "system" fn RtwqUnjoinWorkQueue(workqueueid : u32, hfile : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - RtwqUnjoinWorkQueue(core::mem::transmute(workqueueid), hfile.param().abi()).ok() + RtwqUnjoinWorkQueue(core::mem::transmute(workqueueid), core::mem::transmute(hfile)).ok() } #[inline] pub unsafe fn RtwqUnlockPlatform() -> windows_core::Result<()> { @@ -1887,45 +1639,29 @@ pub unsafe fn SetCriticalSectionSpinCount(lpcriticalsection: *mut CRITICAL_SECTI SetCriticalSectionSpinCount(core::mem::transmute(lpcriticalsection), core::mem::transmute(dwspincount)) } #[inline] -pub unsafe fn SetEvent(hevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetEvent(hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetEvent(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetEvent(hevent.param().abi()).ok() + SetEvent(core::mem::transmute(hevent)).ok() } #[inline] -pub unsafe fn SetEventWhenCallbackReturns(pci: P0, evt: P1) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetEventWhenCallbackReturns(pci: PTP_CALLBACK_INSTANCE, evt: super::super::Foundation::HANDLE) { windows_targets::link!("kernel32.dll" "system" fn SetEventWhenCallbackReturns(pci : PTP_CALLBACK_INSTANCE, evt : super::super::Foundation:: HANDLE)); - SetEventWhenCallbackReturns(pci.param().abi(), evt.param().abi()) + SetEventWhenCallbackReturns(core::mem::transmute(pci), core::mem::transmute(evt)) } #[inline] -pub unsafe fn SetPriorityClass(hprocess: P0, dwpriorityclass: PROCESS_CREATION_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetPriorityClass(hprocess: super::super::Foundation::HANDLE, dwpriorityclass: PROCESS_CREATION_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetPriorityClass(hprocess : super::super::Foundation:: HANDLE, dwpriorityclass : PROCESS_CREATION_FLAGS) -> super::super::Foundation:: BOOL); - SetPriorityClass(hprocess.param().abi(), core::mem::transmute(dwpriorityclass)).ok() + SetPriorityClass(core::mem::transmute(hprocess), core::mem::transmute(dwpriorityclass)).ok() } #[inline] -pub unsafe fn SetProcessAffinityMask(hprocess: P0, dwprocessaffinitymask: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessAffinityMask(hprocess: super::super::Foundation::HANDLE, dwprocessaffinitymask: usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetProcessAffinityMask(hprocess : super::super::Foundation:: HANDLE, dwprocessaffinitymask : usize) -> super::super::Foundation:: BOOL); - SetProcessAffinityMask(hprocess.param().abi(), core::mem::transmute(dwprocessaffinitymask)).ok() + SetProcessAffinityMask(core::mem::transmute(hprocess), core::mem::transmute(dwprocessaffinitymask)).ok() } #[inline] -pub unsafe fn SetProcessAffinityUpdateMode(hprocess: P0, dwflags: PROCESS_AFFINITY_AUTO_UPDATE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessAffinityUpdateMode(hprocess: super::super::Foundation::HANDLE, dwflags: PROCESS_AFFINITY_AUTO_UPDATE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetProcessAffinityUpdateMode(hprocess : super::super::Foundation:: HANDLE, dwflags : PROCESS_AFFINITY_AUTO_UPDATE_FLAGS) -> super::super::Foundation:: BOOL); - SetProcessAffinityUpdateMode(hprocess.param().abi(), core::mem::transmute(dwflags)).ok() + SetProcessAffinityUpdateMode(core::mem::transmute(hprocess), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn SetProcessDEPPolicy(dwflags: PROCESS_DEP_FLAGS) -> windows_core::Result<()> { @@ -1934,44 +1670,29 @@ pub unsafe fn SetProcessDEPPolicy(dwflags: PROCESS_DEP_FLAGS) -> windows_core::R } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] -pub unsafe fn SetProcessDefaultCpuSetMasks(process: P0, cpusetmasks: Option<&[super::SystemInformation::GROUP_AFFINITY]>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessDefaultCpuSetMasks(process: super::super::Foundation::HANDLE, cpusetmasks: Option<&[super::SystemInformation::GROUP_AFFINITY]>) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn SetProcessDefaultCpuSetMasks(process : super::super::Foundation:: HANDLE, cpusetmasks : *const super::SystemInformation:: GROUP_AFFINITY, cpusetmaskcount : u16) -> super::super::Foundation:: BOOL); - SetProcessDefaultCpuSetMasks(process.param().abi(), core::mem::transmute(cpusetmasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + SetProcessDefaultCpuSetMasks(core::mem::transmute(process), core::mem::transmute(cpusetmasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn SetProcessDefaultCpuSets(process: P0, cpusetids: Option<&[u32]>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessDefaultCpuSets(process: super::super::Foundation::HANDLE, cpusetids: Option<&[u32]>) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn SetProcessDefaultCpuSets(process : super::super::Foundation:: HANDLE, cpusetids : *const u32, cpusetidcount : u32) -> super::super::Foundation:: BOOL); - SetProcessDefaultCpuSets(process.param().abi(), core::mem::transmute(cpusetids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + SetProcessDefaultCpuSets(core::mem::transmute(process), core::mem::transmute(cpusetids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn SetProcessDynamicEHContinuationTargets(process: P0, targets: &mut [PROCESS_DYNAMIC_EH_CONTINUATION_TARGET]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessDynamicEHContinuationTargets(process: super::super::Foundation::HANDLE, targets: &mut [PROCESS_DYNAMIC_EH_CONTINUATION_TARGET]) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetProcessDynamicEHContinuationTargets(process : super::super::Foundation:: HANDLE, numberoftargets : u16, targets : *mut PROCESS_DYNAMIC_EH_CONTINUATION_TARGET) -> super::super::Foundation:: BOOL); - SetProcessDynamicEHContinuationTargets(process.param().abi(), targets.len().try_into().unwrap(), core::mem::transmute(targets.as_ptr())).ok() + SetProcessDynamicEHContinuationTargets(core::mem::transmute(process), targets.len().try_into().unwrap(), core::mem::transmute(targets.as_ptr())).ok() } #[inline] -pub unsafe fn SetProcessDynamicEnforcedCetCompatibleRanges(process: P0, ranges: &mut [PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessDynamicEnforcedCetCompatibleRanges(process: super::super::Foundation::HANDLE, ranges: &mut [PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE]) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn SetProcessDynamicEnforcedCetCompatibleRanges(process : super::super::Foundation:: HANDLE, numberofranges : u16, ranges : *mut PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE) -> super::super::Foundation:: BOOL); - SetProcessDynamicEnforcedCetCompatibleRanges(process.param().abi(), ranges.len().try_into().unwrap(), core::mem::transmute(ranges.as_ptr())) + SetProcessDynamicEnforcedCetCompatibleRanges(core::mem::transmute(process), ranges.len().try_into().unwrap(), core::mem::transmute(ranges.as_ptr())) } #[inline] -pub unsafe fn SetProcessInformation(hprocess: P0, processinformationclass: PROCESS_INFORMATION_CLASS, processinformation: *const core::ffi::c_void, processinformationsize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessInformation(hprocess: super::super::Foundation::HANDLE, processinformationclass: PROCESS_INFORMATION_CLASS, processinformation: *const core::ffi::c_void, processinformationsize: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetProcessInformation(hprocess : super::super::Foundation:: HANDLE, processinformationclass : PROCESS_INFORMATION_CLASS, processinformation : *const core::ffi::c_void, processinformationsize : u32) -> super::super::Foundation:: BOOL); - SetProcessInformation(hprocess.param().abi(), core::mem::transmute(processinformationclass), core::mem::transmute(processinformation), core::mem::transmute(processinformationsize)).ok() + SetProcessInformation(core::mem::transmute(hprocess), core::mem::transmute(processinformationclass), core::mem::transmute(processinformation), core::mem::transmute(processinformationsize)).ok() } #[inline] pub unsafe fn SetProcessMitigationPolicy(mitigationpolicy: PROCESS_MITIGATION_POLICY, lpbuffer: *const core::ffi::c_void, dwlength: usize) -> windows_core::Result<()> { @@ -1979,13 +1700,12 @@ pub unsafe fn SetProcessMitigationPolicy(mitigationpolicy: PROCESS_MITIGATION_PO SetProcessMitigationPolicy(core::mem::transmute(mitigationpolicy), core::mem::transmute(lpbuffer), core::mem::transmute(dwlength)).ok() } #[inline] -pub unsafe fn SetProcessPriorityBoost(hprocess: P0, bdisablepriorityboost: P1) -> windows_core::Result<()> +pub unsafe fn SetProcessPriorityBoost(hprocess: super::super::Foundation::HANDLE, bdisablepriorityboost: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetProcessPriorityBoost(hprocess : super::super::Foundation:: HANDLE, bdisablepriorityboost : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetProcessPriorityBoost(hprocess.param().abi(), bdisablepriorityboost.param().abi()).ok() + SetProcessPriorityBoost(core::mem::transmute(hprocess), bdisablepriorityboost.param().abi()).ok() } #[inline] pub unsafe fn SetProcessRestrictionExemption(fenableexemption: P0) -> windows_core::Result<()> @@ -2001,102 +1721,73 @@ pub unsafe fn SetProcessShutdownParameters(dwlevel: u32, dwflags: u32) -> window SetProcessShutdownParameters(core::mem::transmute(dwlevel), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SetProcessWorkingSetSize(hprocess: P0, dwminimumworkingsetsize: usize, dwmaximumworkingsetsize: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessWorkingSetSize(hprocess: super::super::Foundation::HANDLE, dwminimumworkingsetsize: usize, dwmaximumworkingsetsize: usize) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetProcessWorkingSetSize(hprocess : super::super::Foundation:: HANDLE, dwminimumworkingsetsize : usize, dwmaximumworkingsetsize : usize) -> super::super::Foundation:: BOOL); - SetProcessWorkingSetSize(hprocess.param().abi(), core::mem::transmute(dwminimumworkingsetsize), core::mem::transmute(dwmaximumworkingsetsize)).ok() + SetProcessWorkingSetSize(core::mem::transmute(hprocess), core::mem::transmute(dwminimumworkingsetsize), core::mem::transmute(dwmaximumworkingsetsize)).ok() } #[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(core::mem::transmute(policyguid), core::mem::transmute(policyvalue), core::mem::transmute(oldpolicyvalue.unwrap_or(core::ptr::null_mut()))).ok() + SetProtectedPolicy(core::mem::transmute(policyguid), core::mem::transmute(policyvalue), core::mem::transmute(oldpolicyvalue.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetThreadAffinityMask(hthread: P0, dwthreadaffinitymask: usize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadAffinityMask(hthread: super::super::Foundation::HANDLE, dwthreadaffinitymask: usize) -> usize { windows_targets::link!("kernel32.dll" "system" fn SetThreadAffinityMask(hthread : super::super::Foundation:: HANDLE, dwthreadaffinitymask : usize) -> usize); - SetThreadAffinityMask(hthread.param().abi(), core::mem::transmute(dwthreadaffinitymask)) + SetThreadAffinityMask(core::mem::transmute(hthread), core::mem::transmute(dwthreadaffinitymask)) } #[inline] -pub unsafe fn SetThreadDescription(hthread: P0, lpthreaddescription: P1) -> windows_core::Result<()> +pub unsafe fn SetThreadDescription(hthread: super::super::Foundation::HANDLE, lpthreaddescription: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadDescription(hthread : super::super::Foundation:: HANDLE, lpthreaddescription : windows_core::PCWSTR) -> windows_core::HRESULT); - SetThreadDescription(hthread.param().abi(), lpthreaddescription.param().abi()).ok() + SetThreadDescription(core::mem::transmute(hthread), lpthreaddescription.param().abi()).ok() } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] -pub unsafe fn SetThreadGroupAffinity(hthread: P0, groupaffinity: *const super::SystemInformation::GROUP_AFFINITY, previousgroupaffinity: Option<*mut super::SystemInformation::GROUP_AFFINITY>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadGroupAffinity(hthread: super::super::Foundation::HANDLE, groupaffinity: *const super::SystemInformation::GROUP_AFFINITY, previousgroupaffinity: Option<*mut super::SystemInformation::GROUP_AFFINITY>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(groupaffinity), core::mem::transmute(previousgroupaffinity.unwrap_or(core::ptr::null_mut()))) + SetThreadGroupAffinity(core::mem::transmute(hthread), core::mem::transmute(groupaffinity), core::mem::transmute(previousgroupaffinity.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetThreadIdealProcessor(hthread: P0, dwidealprocessor: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadIdealProcessor(hthread: super::super::Foundation::HANDLE, dwidealprocessor: u32) -> u32 { windows_targets::link!("kernel32.dll" "system" fn SetThreadIdealProcessor(hthread : super::super::Foundation:: HANDLE, dwidealprocessor : u32) -> u32); - SetThreadIdealProcessor(hthread.param().abi(), core::mem::transmute(dwidealprocessor)) + SetThreadIdealProcessor(core::mem::transmute(hthread), core::mem::transmute(dwidealprocessor)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn SetThreadIdealProcessorEx(hthread: P0, lpidealprocessor: *const super::Kernel::PROCESSOR_NUMBER, lppreviousidealprocessor: Option<*mut super::Kernel::PROCESSOR_NUMBER>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadIdealProcessorEx(hthread: super::super::Foundation::HANDLE, lpidealprocessor: *const super::Kernel::PROCESSOR_NUMBER, lppreviousidealprocessor: Option<*mut super::Kernel::PROCESSOR_NUMBER>) -> windows_core::Result<()> { 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(), core::mem::transmute(lpidealprocessor), core::mem::transmute(lppreviousidealprocessor.unwrap_or(core::ptr::null_mut()))).ok() + SetThreadIdealProcessorEx(core::mem::transmute(hthread), core::mem::transmute(lpidealprocessor), core::mem::transmute(lppreviousidealprocessor.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetThreadInformation(hthread: P0, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *const core::ffi::c_void, threadinformationsize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadInformation(hthread: super::super::Foundation::HANDLE, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *const core::ffi::c_void, threadinformationsize: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetThreadInformation(hthread : super::super::Foundation:: HANDLE, threadinformationclass : THREAD_INFORMATION_CLASS, threadinformation : *const core::ffi::c_void, threadinformationsize : u32) -> super::super::Foundation:: BOOL); - SetThreadInformation(hthread.param().abi(), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationsize)).ok() + SetThreadInformation(core::mem::transmute(hthread), core::mem::transmute(threadinformationclass), core::mem::transmute(threadinformation), core::mem::transmute(threadinformationsize)).ok() } #[inline] -pub unsafe fn SetThreadPriority(hthread: P0, npriority: THREAD_PRIORITY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadPriority(hthread: super::super::Foundation::HANDLE, npriority: THREAD_PRIORITY) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetThreadPriority(hthread : super::super::Foundation:: HANDLE, npriority : THREAD_PRIORITY) -> super::super::Foundation:: BOOL); - SetThreadPriority(hthread.param().abi(), core::mem::transmute(npriority)).ok() + SetThreadPriority(core::mem::transmute(hthread), core::mem::transmute(npriority)).ok() } #[inline] -pub unsafe fn SetThreadPriorityBoost(hthread: P0, bdisablepriorityboost: P1) -> windows_core::Result<()> +pub unsafe fn SetThreadPriorityBoost(hthread: super::super::Foundation::HANDLE, bdisablepriorityboost: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadPriorityBoost(hthread : super::super::Foundation:: HANDLE, bdisablepriorityboost : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetThreadPriorityBoost(hthread.param().abi(), bdisablepriorityboost.param().abi()).ok() + SetThreadPriorityBoost(core::mem::transmute(hthread), bdisablepriorityboost.param().abi()).ok() } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] -pub unsafe fn SetThreadSelectedCpuSetMasks(thread: P0, cpusetmasks: Option<&[super::SystemInformation::GROUP_AFFINITY]>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadSelectedCpuSetMasks(thread: super::super::Foundation::HANDLE, cpusetmasks: Option<&[super::SystemInformation::GROUP_AFFINITY]>) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn SetThreadSelectedCpuSetMasks(thread : super::super::Foundation:: HANDLE, cpusetmasks : *const super::SystemInformation:: GROUP_AFFINITY, cpusetmaskcount : u16) -> super::super::Foundation:: BOOL); - SetThreadSelectedCpuSetMasks(thread.param().abi(), core::mem::transmute(cpusetmasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + SetThreadSelectedCpuSetMasks(core::mem::transmute(thread), core::mem::transmute(cpusetmasks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn SetThreadSelectedCpuSets(thread: P0, cpusetids: &[u32]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadSelectedCpuSets(thread: super::super::Foundation::HANDLE, cpusetids: &[u32]) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn SetThreadSelectedCpuSets(thread : super::super::Foundation:: HANDLE, cpusetids : *const u32, cpusetidcount : u32) -> super::super::Foundation:: BOOL); - SetThreadSelectedCpuSets(thread.param().abi(), core::mem::transmute(cpusetids.as_ptr()), cpusetids.len().try_into().unwrap()) + SetThreadSelectedCpuSets(core::mem::transmute(thread), core::mem::transmute(cpusetids.as_ptr()), cpusetids.len().try_into().unwrap()) } #[inline] pub unsafe fn SetThreadStackGuarantee(stacksizeinbytes: *mut u32) -> windows_core::Result<()> { @@ -2104,79 +1795,52 @@ pub unsafe fn SetThreadStackGuarantee(stacksizeinbytes: *mut u32) -> windows_cor SetThreadStackGuarantee(core::mem::transmute(stacksizeinbytes)).ok() } #[inline] -pub unsafe fn SetThreadToken(thread: Option<*const super::super::Foundation::HANDLE>, token: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetThreadToken(thread: Option<*const super::super::Foundation::HANDLE>, token: Option) -> windows_core::Result<()> { 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(core::ptr::null())), token.param().abi()).ok() + SetThreadToken(core::mem::transmute(thread.unwrap_or(core::mem::zeroed())), core::mem::transmute(token.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetThreadpoolStackInformation(ptpp: P0, ptpsi: *const TP_POOL_STACK_INFORMATION) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadpoolStackInformation(ptpp: PTP_POOL, ptpsi: *const TP_POOL_STACK_INFORMATION) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolStackInformation(ptpp : PTP_POOL, ptpsi : *const TP_POOL_STACK_INFORMATION) -> super::super::Foundation:: BOOL); - SetThreadpoolStackInformation(ptpp.param().abi(), core::mem::transmute(ptpsi)).ok() + SetThreadpoolStackInformation(core::mem::transmute(ptpp), core::mem::transmute(ptpsi)).ok() } #[inline] -pub unsafe fn SetThreadpoolThreadMaximum(ptpp: P0, cthrdmost: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadpoolThreadMaximum(ptpp: PTP_POOL, cthrdmost: u32) { windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolThreadMaximum(ptpp : PTP_POOL, cthrdmost : u32)); - SetThreadpoolThreadMaximum(ptpp.param().abi(), core::mem::transmute(cthrdmost)) + SetThreadpoolThreadMaximum(core::mem::transmute(ptpp), core::mem::transmute(cthrdmost)) } #[inline] -pub unsafe fn SetThreadpoolThreadMinimum(ptpp: P0, cthrdmic: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadpoolThreadMinimum(ptpp: PTP_POOL, cthrdmic: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolThreadMinimum(ptpp : PTP_POOL, cthrdmic : u32) -> super::super::Foundation:: BOOL); - SetThreadpoolThreadMinimum(ptpp.param().abi(), core::mem::transmute(cthrdmic)).ok() + SetThreadpoolThreadMinimum(core::mem::transmute(ptpp), core::mem::transmute(cthrdmic)).ok() } #[inline] -pub unsafe fn SetThreadpoolTimer(pti: P0, pftduetime: Option<*const super::super::Foundation::FILETIME>, msperiod: u32, mswindowlength: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadpoolTimer(pti: PTP_TIMER, pftduetime: Option<*const super::super::Foundation::FILETIME>, msperiod: u32, mswindowlength: Option) { 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(core::ptr::null())), core::mem::transmute(msperiod), core::mem::transmute(mswindowlength)) + SetThreadpoolTimer(core::mem::transmute(pti), core::mem::transmute(pftduetime.unwrap_or(core::mem::zeroed())), core::mem::transmute(msperiod), core::mem::transmute(mswindowlength.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetThreadpoolTimerEx(pti: P0, pftduetime: Option<*const super::super::Foundation::FILETIME>, msperiod: u32, mswindowlength: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadpoolTimerEx(pti: PTP_TIMER, pftduetime: Option<*const super::super::Foundation::FILETIME>, msperiod: u32, mswindowlength: Option) -> super::super::Foundation::BOOL { 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(core::ptr::null())), core::mem::transmute(msperiod), core::mem::transmute(mswindowlength)) + SetThreadpoolTimerEx(core::mem::transmute(pti), core::mem::transmute(pftduetime.unwrap_or(core::mem::zeroed())), core::mem::transmute(msperiod), core::mem::transmute(mswindowlength.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetThreadpoolWait(pwa: P0, h: P1, pfttimeout: Option<*const super::super::Foundation::FILETIME>) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetThreadpoolWait(pwa: PTP_WAIT, h: Option, pfttimeout: Option<*const super::super::Foundation::FILETIME>) { 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(core::ptr::null()))) + SetThreadpoolWait(core::mem::transmute(pwa), core::mem::transmute(h.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfttimeout.unwrap_or(core::mem::zeroed()))) } #[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 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetThreadpoolWaitEx(pwa: PTP_WAIT, h: Option, pfttimeout: Option<*const super::super::Foundation::FILETIME>, reserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(core::ptr::null())), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) + SetThreadpoolWaitEx(core::mem::transmute(pwa), core::mem::transmute(h.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfttimeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetTimerQueueTimer(timerqueue: P0, callback: WAITORTIMERCALLBACK, parameter: Option<*const core::ffi::c_void>, duetime: u32, period: u32, preferio: P5) -> super::super::Foundation::HANDLE +pub unsafe fn SetTimerQueueTimer(timerqueue: Option, callback: WAITORTIMERCALLBACK, parameter: Option<*const core::ffi::c_void>, duetime: u32, period: u32, preferio: P5) -> super::super::Foundation::HANDLE where - P0: windows_core::Param, P5: 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(), core::mem::transmute(callback), core::mem::transmute(parameter.unwrap_or(core::ptr::null())), core::mem::transmute(duetime), core::mem::transmute(period), preferio.param().abi()) + SetTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(duetime), core::mem::transmute(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<()> { @@ -2184,31 +1848,25 @@ pub unsafe fn SetUmsThreadInformation(umsthread: *const core::ffi::c_void, umsth SetUmsThreadInformation(core::mem::transmute(umsthread), core::mem::transmute(umsthreadinfoclass), core::mem::transmute(umsthreadinformation), core::mem::transmute(umsthreadinformationlength)).ok() } #[inline] -pub unsafe fn SetWaitableTimer(htimer: P0, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: PTIMERAPCROUTINE, lpargtocompletionroutine: Option<*const core::ffi::c_void>, fresume: P5) -> windows_core::Result<()> +pub unsafe fn SetWaitableTimer(htimer: super::super::Foundation::HANDLE, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: Option, lpargtocompletionroutine: Option<*const core::ffi::c_void>, fresume: P5) -> windows_core::Result<()> where - P0: windows_core::Param, P5: 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(), core::mem::transmute(lpduetime), core::mem::transmute(lperiod), core::mem::transmute(pfncompletionroutine), core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::ptr::null())), fresume.param().abi()).ok() + SetWaitableTimer(core::mem::transmute(htimer), core::mem::transmute(lpduetime), core::mem::transmute(lperiod), core::mem::transmute(pfncompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::mem::zeroed())), 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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetWaitableTimerEx(htimer: super::super::Foundation::HANDLE, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: Option, lpargtocompletionroutine: Option<*const core::ffi::c_void>, wakecontext: Option<*const REASON_CONTEXT>, tolerabledelay: u32) -> windows_core::Result<()> { 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(), core::mem::transmute(lpduetime), core::mem::transmute(lperiod), core::mem::transmute(pfncompletionroutine), core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::ptr::null())), core::mem::transmute(wakecontext.unwrap_or(core::ptr::null())), core::mem::transmute(tolerabledelay)).ok() + SetWaitableTimerEx(core::mem::transmute(htimer), core::mem::transmute(lpduetime), core::mem::transmute(lperiod), core::mem::transmute(pfncompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(wakecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(tolerabledelay)).ok() } #[inline] -pub unsafe fn SignalObjectAndWait(hobjecttosignal: P0, hobjecttowaiton: P1, dwmilliseconds: u32, balertable: P3) -> super::super::Foundation::WAIT_EVENT +pub unsafe fn SignalObjectAndWait(hobjecttosignal: super::super::Foundation::HANDLE, hobjecttowaiton: super::super::Foundation::HANDLE, dwmilliseconds: u32, balertable: P3) -> super::super::Foundation::WAIT_EVENT where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SignalObjectAndWait(hobjecttosignal : super::super::Foundation:: HANDLE, hobjecttowaiton : super::super::Foundation:: HANDLE, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WAIT_EVENT); - SignalObjectAndWait(hobjecttosignal.param().abi(), hobjecttowaiton.param().abi(), core::mem::transmute(dwmilliseconds), balertable.param().abi()) + SignalObjectAndWait(core::mem::transmute(hobjecttosignal), core::mem::transmute(hobjecttowaiton), core::mem::transmute(dwmilliseconds), balertable.param().abi()) } #[inline] pub unsafe fn Sleep(dwmilliseconds: u32) { @@ -2235,28 +1893,19 @@ where SleepEx(core::mem::transmute(dwmilliseconds), balertable.param().abi()) } #[inline] -pub unsafe fn StartThreadpoolIo(pio: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn StartThreadpoolIo(pio: PTP_IO) { windows_targets::link!("kernel32.dll" "system" fn StartThreadpoolIo(pio : PTP_IO)); - StartThreadpoolIo(pio.param().abi()) + StartThreadpoolIo(core::mem::transmute(pio)) } #[inline] -pub unsafe fn SubmitThreadpoolWork(pwk: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn SubmitThreadpoolWork(pwk: PTP_WORK) { windows_targets::link!("kernel32.dll" "system" fn SubmitThreadpoolWork(pwk : PTP_WORK)); - SubmitThreadpoolWork(pwk.param().abi()) + SubmitThreadpoolWork(core::mem::transmute(pwk)) } #[inline] -pub unsafe fn SuspendThread(hthread: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SuspendThread(hthread: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn SuspendThread(hthread : super::super::Foundation:: HANDLE) -> u32); - SuspendThread(hthread.param().abi()) + SuspendThread(core::mem::transmute(hthread)) } #[inline] pub unsafe fn SwitchToFiber(lpfiber: *const core::ffi::c_void) { @@ -2269,20 +1918,14 @@ pub unsafe fn SwitchToThread() -> super::super::Foundation::BOOL { SwitchToThread() } #[inline] -pub unsafe fn TerminateProcess(hprocess: P0, uexitcode: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TerminateProcess(hprocess: super::super::Foundation::HANDLE, uexitcode: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn TerminateProcess(hprocess : super::super::Foundation:: HANDLE, uexitcode : u32) -> super::super::Foundation:: BOOL); - TerminateProcess(hprocess.param().abi(), core::mem::transmute(uexitcode)).ok() + TerminateProcess(core::mem::transmute(hprocess), core::mem::transmute(uexitcode)).ok() } #[inline] -pub unsafe fn TerminateThread(hthread: P0, dwexitcode: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TerminateThread(hthread: super::super::Foundation::HANDLE, dwexitcode: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn TerminateThread(hthread : super::super::Foundation:: HANDLE, dwexitcode : u32) -> super::super::Foundation:: BOOL); - TerminateThread(hthread.param().abi(), core::mem::transmute(dwexitcode)).ok() + TerminateThread(core::mem::transmute(hthread), core::mem::transmute(dwexitcode)).ok() } #[inline] pub unsafe fn TlsAlloc() -> u32 { @@ -2302,7 +1945,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(core::mem::transmute(dwtlsindex), core::mem::transmute(lptlsvalue.unwrap_or(core::ptr::null()))).ok() + TlsSetValue(core::mem::transmute(dwtlsindex), core::mem::transmute(lptlsvalue.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn TryAcquireSRWLockExclusive(srwlock: *mut SRWLOCK) -> super::super::Foundation::BOOLEAN { @@ -2323,7 +1966,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(core::mem::transmute(pfns), core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))).ok() + TrySubmitThreadpoolCallback(core::mem::transmute(pfns), core::mem::transmute(pv.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbe.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn UmsThreadYield(schedulerparam: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -2331,34 +1974,24 @@ pub unsafe fn UmsThreadYield(schedulerparam: *const core::ffi::c_void) -> window UmsThreadYield(core::mem::transmute(schedulerparam)).ok() } #[inline] -pub unsafe fn UnregisterWait(waithandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterWait(waithandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn UnregisterWait(waithandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - UnregisterWait(waithandle.param().abi()).ok() + UnregisterWait(core::mem::transmute(waithandle)).ok() } #[inline] -pub unsafe fn UnregisterWaitEx(waithandle: P0, completionevent: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn UnregisterWaitEx(waithandle: super::super::Foundation::HANDLE, completionevent: Option) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn UnregisterWaitEx(waithandle : super::super::Foundation:: HANDLE, completionevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - UnregisterWaitEx(waithandle.param().abi(), completionevent.param().abi()).ok() + UnregisterWaitEx(core::mem::transmute(waithandle), core::mem::transmute(completionevent.unwrap_or(core::mem::zeroed()))).ok() } #[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(core::mem::transmute(lpattributelist), core::mem::transmute(dwflags), core::mem::transmute(attribute), core::mem::transmute(lpvalue.unwrap_or(core::ptr::null())), core::mem::transmute(cbsize), core::mem::transmute(lppreviousvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpreturnsize.unwrap_or(core::ptr::null()))).ok() + UpdateProcThreadAttribute(core::mem::transmute(lpattributelist), core::mem::transmute(dwflags), core::mem::transmute(attribute), core::mem::transmute(lpvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), core::mem::transmute(lppreviousvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreturnsize.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WaitForInputIdle(hprocess: P0, dwmilliseconds: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WaitForInputIdle(hprocess: super::super::Foundation::HANDLE, dwmilliseconds: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn WaitForInputIdle(hprocess : super::super::Foundation:: HANDLE, dwmilliseconds : u32) -> u32); - WaitForInputIdle(hprocess.param().abi(), core::mem::transmute(dwmilliseconds)) + WaitForInputIdle(core::mem::transmute(hprocess), core::mem::transmute(dwmilliseconds)) } #[inline] pub unsafe fn WaitForMultipleObjects(lphandles: &[super::super::Foundation::HANDLE], bwaitall: P2, dwmilliseconds: u32) -> super::super::Foundation::WAIT_EVENT @@ -2378,62 +2011,54 @@ where WaitForMultipleObjectsEx(lphandles.len().try_into().unwrap(), core::mem::transmute(lphandles.as_ptr()), bwaitall.param().abi(), core::mem::transmute(dwmilliseconds), balertable.param().abi()) } #[inline] -pub unsafe fn WaitForSingleObject(hhandle: P0, dwmilliseconds: u32) -> super::super::Foundation::WAIT_EVENT -where - P0: windows_core::Param, -{ +pub unsafe fn WaitForSingleObject(hhandle: super::super::Foundation::HANDLE, dwmilliseconds: u32) -> super::super::Foundation::WAIT_EVENT { windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObject(hhandle : super::super::Foundation:: HANDLE, dwmilliseconds : u32) -> super::super::Foundation:: WAIT_EVENT); - WaitForSingleObject(hhandle.param().abi(), core::mem::transmute(dwmilliseconds)) + WaitForSingleObject(core::mem::transmute(hhandle), core::mem::transmute(dwmilliseconds)) } #[inline] -pub unsafe fn WaitForSingleObjectEx(hhandle: P0, dwmilliseconds: u32, balertable: P2) -> super::super::Foundation::WAIT_EVENT +pub unsafe fn WaitForSingleObjectEx(hhandle: super::super::Foundation::HANDLE, dwmilliseconds: u32, balertable: P2) -> super::super::Foundation::WAIT_EVENT where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObjectEx(hhandle : super::super::Foundation:: HANDLE, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WAIT_EVENT); - WaitForSingleObjectEx(hhandle.param().abi(), core::mem::transmute(dwmilliseconds), balertable.param().abi()) + WaitForSingleObjectEx(core::mem::transmute(hhandle), core::mem::transmute(dwmilliseconds), balertable.param().abi()) } #[inline] -pub unsafe fn WaitForThreadpoolIoCallbacks(pio: P0, fcancelpendingcallbacks: P1) +pub unsafe fn WaitForThreadpoolIoCallbacks(pio: PTP_IO, fcancelpendingcallbacks: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WaitForThreadpoolIoCallbacks(pio : PTP_IO, fcancelpendingcallbacks : super::super::Foundation:: BOOL)); - WaitForThreadpoolIoCallbacks(pio.param().abi(), fcancelpendingcallbacks.param().abi()) + WaitForThreadpoolIoCallbacks(core::mem::transmute(pio), fcancelpendingcallbacks.param().abi()) } #[inline] -pub unsafe fn WaitForThreadpoolTimerCallbacks(pti: P0, fcancelpendingcallbacks: P1) +pub unsafe fn WaitForThreadpoolTimerCallbacks(pti: PTP_TIMER, fcancelpendingcallbacks: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WaitForThreadpoolTimerCallbacks(pti : PTP_TIMER, fcancelpendingcallbacks : super::super::Foundation:: BOOL)); - WaitForThreadpoolTimerCallbacks(pti.param().abi(), fcancelpendingcallbacks.param().abi()) + WaitForThreadpoolTimerCallbacks(core::mem::transmute(pti), fcancelpendingcallbacks.param().abi()) } #[inline] -pub unsafe fn WaitForThreadpoolWaitCallbacks(pwa: P0, fcancelpendingcallbacks: P1) +pub unsafe fn WaitForThreadpoolWaitCallbacks(pwa: PTP_WAIT, fcancelpendingcallbacks: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WaitForThreadpoolWaitCallbacks(pwa : PTP_WAIT, fcancelpendingcallbacks : super::super::Foundation:: BOOL)); - WaitForThreadpoolWaitCallbacks(pwa.param().abi(), fcancelpendingcallbacks.param().abi()) + WaitForThreadpoolWaitCallbacks(core::mem::transmute(pwa), fcancelpendingcallbacks.param().abi()) } #[inline] -pub unsafe fn WaitForThreadpoolWorkCallbacks(pwk: P0, fcancelpendingcallbacks: P1) +pub unsafe fn WaitForThreadpoolWorkCallbacks(pwk: PTP_WORK, fcancelpendingcallbacks: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WaitForThreadpoolWorkCallbacks(pwk : PTP_WORK, fcancelpendingcallbacks : super::super::Foundation:: BOOL)); - WaitForThreadpoolWorkCallbacks(pwk.param().abi(), fcancelpendingcallbacks.param().abi()) + WaitForThreadpoolWorkCallbacks(core::mem::transmute(pwk), fcancelpendingcallbacks.param().abi()) } #[inline] -pub unsafe fn WaitOnAddress(address: *const core::ffi::c_void, compareaddress: *const core::ffi::c_void, addresssize: usize, dwmilliseconds: u32) -> windows_core::Result<()> { +pub unsafe fn WaitOnAddress(address: *const core::ffi::c_void, compareaddress: *const core::ffi::c_void, addresssize: usize, dwmilliseconds: Option) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-synch-l1-2-0.dll" "system" fn WaitOnAddress(address : *const core::ffi::c_void, compareaddress : *const core::ffi::c_void, addresssize : usize, dwmilliseconds : u32) -> super::super::Foundation:: BOOL); - WaitOnAddress(core::mem::transmute(address), core::mem::transmute(compareaddress), core::mem::transmute(addresssize), core::mem::transmute(dwmilliseconds)).ok() + WaitOnAddress(core::mem::transmute(address), core::mem::transmute(compareaddress), core::mem::transmute(addresssize), core::mem::transmute(dwmilliseconds.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WakeAllConditionVariable(conditionvariable: *mut CONDITION_VARIABLE) { @@ -2469,12 +2094,9 @@ pub unsafe fn Wow64SetThreadDefaultGuestMachine(machine: u16) -> u16 { Wow64SetThreadDefaultGuestMachine(core::mem::transmute(machine)) } #[inline] -pub unsafe fn Wow64SuspendThread(hthread: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn Wow64SuspendThread(hthread: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("kernel32.dll" "system" fn Wow64SuspendThread(hthread : super::super::Foundation:: HANDLE) -> u32); - Wow64SuspendThread(hthread.param().abi()) + Wow64SuspendThread(core::mem::transmute(hthread)) } pub const ABOVE_NORMAL_PRIORITY_CLASS: PROCESS_CREATION_FLAGS = PROCESS_CREATION_FLAGS(32768u32); pub const ALL_PROCESSOR_GROUPS: u16 = 65535u16; 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 9949122026..095f055cd7 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(core::mem::transmute(wyear), core::mem::transmute(pdtzi.unwrap_or(core::ptr::null())), core::mem::transmute(ptzi)).ok() + GetTimeZoneInformationForYear(core::mem::transmute(wyear), core::mem::transmute(pdtzi.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(localfiletime), core::mem::transmute(localsystemtime)) + LocalFileTimeToLocalSystemTime(core::mem::transmute(timezoneinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(localfiletime), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(localsystemtime), core::mem::transmute(localfiletime)) + LocalSystemTimeToLocalFileTime(core::mem::transmute(timezoneinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(localsystemtime), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(lpuniversaltime), core::mem::transmute(lplocaltime)).ok() + SystemTimeToTzSpecificLocalTime(core::mem::transmute(lptimezoneinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpuniversaltime), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(lpuniversaltime), core::mem::transmute(lplocaltime)).ok() + SystemTimeToTzSpecificLocalTimeEx(core::mem::transmute(lptimezoneinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpuniversaltime), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(lplocaltime), core::mem::transmute(lpuniversaltime)).ok() + TzSpecificLocalTimeToSystemTime(core::mem::transmute(lptimezoneinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplocaltime), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(lplocaltime), core::mem::transmute(lpuniversaltime)).ok() + TzSpecificLocalTimeToSystemTimeEx(core::mem::transmute(lptimezoneinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplocaltime), core::mem::transmute(lpuniversaltime)).ok() } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 cdc99a7b41..bbc777925b 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()), core::mem::transmute(pcbresult), core::mem::transmute(pfprotectedbytpm.unwrap_or(core::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()), core::mem::transmute(pcbresult), core::mem::transmute(pfprotectedbytpm.unwrap_or(core::mem::zeroed()))).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()), core::mem::transmute(pcchresult), core::mem::transmute(pfprotectedbytpm.unwrap_or(core::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()), core::mem::transmute(pcchresult), core::mem::transmute(pfprotectedbytpm.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(hcontext), core::mem::transmute(ownerauthtype), core::mem::transmute(poutputbuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutputbuflen)) + Tbsi_Get_OwnerAuth(core::mem::transmute(hcontext), core::mem::transmute(ownerauthtype), core::mem::transmute(poutputbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hcontext), core::mem::transmute(poutputbuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutputbuflen)) + Tbsi_Get_TCG_Log(core::mem::transmute(hcontext), core::mem::transmute(poutputbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(logtype), core::mem::transmute(pboutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcboutput)) + Tbsi_Get_TCG_Log_Ex(core::mem::transmute(logtype), core::mem::transmute(pboutput.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcboutput)) } #[inline] pub unsafe fn Tbsi_Is_Tpm_Present() -> super::super::Foundation::BOOL { diff --git a/crates/libs/windows/src/Windows/Win32/System/UpdateAgent/mod.rs b/crates/libs/windows/src/Windows/Win32/System/UpdateAgent/mod.rs index 116d91d65c..08575dd417 100644 --- a/crates/libs/windows/src/Windows/Win32/System/UpdateAgent/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/UpdateAgent/mod.rs @@ -461,11 +461,8 @@ impl IAutomaticUpdatesSettings2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IncludeRecommendedUpdates)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIncludeRecommendedUpdates(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIncludeRecommendedUpdates)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetIncludeRecommendedUpdates(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIncludeRecommendedUpdates)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn CheckPermission(&self, usertype: AutomaticUpdatesUserType, permissiontype: AutomaticUpdatesPermissionType) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -543,21 +540,15 @@ impl IAutomaticUpdatesSettings3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).NonAdministratorsElevated)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNonAdministratorsElevated(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNonAdministratorsElevated)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetNonAdministratorsElevated(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNonAdministratorsElevated)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn FeaturedUpdatesEnabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FeaturedUpdatesEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFeaturedUpdatesEnabled(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFeaturedUpdatesEnabled)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetFeaturedUpdatesEnabled(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFeaturedUpdatesEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -2837,11 +2828,8 @@ impl IUpdate { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsHidden)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsHidden(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsHidden)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetIsHidden(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsHidden)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn IsInstalled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2934,11 +2922,8 @@ impl IUpdate { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DeploymentAction)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn CopyFromCache(&self, path: &windows_core::BSTR, toextractcabfiles: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).CopyFromCache)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(path), toextractcabfiles.param().abi()).ok() + pub unsafe fn CopyFromCache(&self, path: &windows_core::BSTR, toextractcabfiles: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CopyFromCache)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(path), core::mem::transmute(toextractcabfiles)).ok() } pub unsafe fn DownloadPriority(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4265,11 +4250,8 @@ impl IUpdateDownloader { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsForced)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsForced(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsForced)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetIsForced(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsForced)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn Priority(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5211,21 +5193,15 @@ impl IUpdateInstaller { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsForced)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsForced(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsForced)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetIsForced(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsForced)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ParentHwnd(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ParentHwnd)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetParentHwnd(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetParentHwnd)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetParentHwnd(&self, value: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetParentHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn SetParentWindow(&self, value: P0) -> windows_core::Result<()> where @@ -5299,11 +5275,8 @@ impl IUpdateInstaller { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowSourcePrompts)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowSourcePrompts(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowSourcePrompts)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAllowSourcePrompts(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowSourcePrompts)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn RebootRequiredBeforeInstallation(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5591,11 +5564,8 @@ impl IUpdateInstaller2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ForceQuiet)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetForceQuiet(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetForceQuiet)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetForceQuiet(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetForceQuiet)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5656,11 +5626,8 @@ impl IUpdateInstaller3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AttemptCloseAppsIfNecessary)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAttemptCloseAppsIfNecessary(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAttemptCloseAppsIfNecessary)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAttemptCloseAppsIfNecessary(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAttemptCloseAppsIfNecessary)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5791,11 +5758,8 @@ impl IUpdateSearcher { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CanAutomaticallyUpgradeService)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetCanAutomaticallyUpgradeService(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCanAutomaticallyUpgradeService)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetCanAutomaticallyUpgradeService(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCanAutomaticallyUpgradeService)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ClientApplicationID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5808,11 +5772,8 @@ impl IUpdateSearcher { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IncludePotentiallySupersededUpdates)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIncludePotentiallySupersededUpdates(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIncludePotentiallySupersededUpdates)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetIncludePotentiallySupersededUpdates(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIncludePotentiallySupersededUpdates)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ServerSelection(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5852,11 +5813,8 @@ impl IUpdateSearcher { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Online)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOnline(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOnline)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetOnline(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOnline)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn GetTotalHistoryCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6109,11 +6067,8 @@ impl IUpdateSearcher2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IgnoreDownloadPriority)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIgnoreDownloadPriority(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIgnoreDownloadPriority)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetIgnoreDownloadPriority(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIgnoreDownloadPriority)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -7268,11 +7223,8 @@ impl IWebProxy { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).BypassProxyOnLocal)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBypassProxyOnLocal(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBypassProxyOnLocal)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetBypassProxyOnLocal(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBypassProxyOnLocal)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn ReadOnly(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7294,21 +7246,15 @@ impl IWebProxy { { (windows_core::Interface::vtable(self).PromptForCredentials)(windows_core::Interface::as_raw(self), parentwindow.param().abi(), core::mem::transmute_copy(title)).ok() } - pub unsafe fn PromptForCredentialsFromHwnd(&self, parentwindow: P0, title: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PromptForCredentialsFromHwnd)(windows_core::Interface::as_raw(self), parentwindow.param().abi(), core::mem::transmute_copy(title)).ok() + pub unsafe fn PromptForCredentialsFromHwnd(&self, parentwindow: super::super::Foundation::HWND, title: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PromptForCredentialsFromHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(parentwindow), core::mem::transmute_copy(title)).ok() } pub unsafe fn AutoDetect(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoDetect)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoDetect(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoDetect)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAutoDetect(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoDetect)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } } #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs index 2d28463aa0..5d9dd06741 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs @@ -74,13 +74,10 @@ pub unsafe fn InitVariantFromInt64Array(prgn: &[i64]) -> windows_core::Result(hinst: P0, id: u32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn InitVariantFromResource(hinst: super::super::Foundation::HINSTANCE, id: u32) -> windows_core::Result { windows_targets::link!("propsys.dll" "system" fn InitVariantFromResource(hinst : super::super::Foundation:: HINSTANCE, id : u32, pvar : *mut VARIANT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - InitVariantFromResource(hinst.param().abi(), core::mem::transmute(id), &mut result__).map(|| core::mem::transmute(result__)) + InitVariantFromResource(core::mem::transmute(hinst), core::mem::transmute(id), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] 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 0f0172f29b..148ba2fc29 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 @@ -2,12 +2,9 @@ windows_core::imp::define_interface!(ICompositionCapabilitiesInteropFactory, ICo windows_core::imp::interface_hierarchy!(ICompositionCapabilitiesInteropFactory, windows_core::IUnknown, windows_core::IInspectable); impl ICompositionCapabilitiesInteropFactory { #[cfg(feature = "UI_Composition")] - pub unsafe fn GetForWindow(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetForWindow(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -54,7 +51,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(core::ptr::null())), &T::IID, &mut result__, core::mem::transmute(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::mem::zeroed())), &T::IID, &mut result__, core::mem::transmute(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() @@ -63,7 +60,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(core::ptr::null())), core::mem::transmute(cliprect.unwrap_or(core::ptr::null())), core::mem::transmute(offsetx), core::mem::transmute(offsety)).ok() + (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), core::mem::transmute(scrollrect.unwrap_or(core::mem::zeroed())), core::mem::transmute(cliprect.unwrap_or(core::mem::zeroed())), core::mem::transmute(offsetx), core::mem::transmute(offsety)).ok() } pub unsafe fn ResumeDraw(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResumeDraw)(windows_core::Interface::as_raw(self)).ok() @@ -144,7 +141,7 @@ impl ICompositionDrawingSurfaceInterop2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopySurface)(windows_core::Interface::as_raw(self), destinationresource.param().abi(), core::mem::transmute(destinationoffsetx), core::mem::transmute(destinationoffsety), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).CopySurface)(windows_core::Interface::as_raw(self), destinationresource.param().abi(), core::mem::transmute(destinationoffsetx), core::mem::transmute(destinationoffsety), core::mem::transmute(sourcerectangle.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -251,13 +248,12 @@ windows_core::imp::define_interface!(ICompositorDesktopInterop, ICompositorDeskt windows_core::imp::interface_hierarchy!(ICompositorDesktopInterop, windows_core::IUnknown); impl ICompositorDesktopInterop { #[cfg(feature = "UI_Composition_Desktop")] - pub unsafe fn CreateDesktopWindowTarget(&self, hwndtarget: P0, istopmost: P1) -> windows_core::Result + pub unsafe fn CreateDesktopWindowTarget(&self, hwndtarget: super::super::super::Foundation::HWND, istopmost: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateDesktopWindowTarget)(windows_core::Interface::as_raw(self), hwndtarget.param().abi(), istopmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateDesktopWindowTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtarget), istopmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EnsureOnThread(&self, threadid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnsureOnThread)(windows_core::Interface::as_raw(self), core::mem::transmute(threadid)).ok() @@ -310,12 +306,9 @@ windows_core::imp::define_interface!(ICompositorInterop, ICompositorInterop_Vtbl windows_core::imp::interface_hierarchy!(ICompositorInterop, windows_core::IUnknown); impl ICompositorInterop { #[cfg(feature = "UI_Composition")] - pub unsafe fn CreateCompositionSurfaceForHandle(&self, swapchain: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateCompositionSurfaceForHandle(&self, swapchain: super::super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateCompositionSurfaceForHandle)(windows_core::Interface::as_raw(self), swapchain.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateCompositionSurfaceForHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(swapchain), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "UI_Composition")] pub unsafe fn CreateCompositionSurfaceForSwapChain(&self, swapchain: P0) -> windows_core::Result diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/CoreInputView/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/CoreInputView/mod.rs index 25930ad70a..56fe9ff068 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/CoreInputView/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/CoreInputView/mod.rs @@ -1,13 +1,12 @@ windows_core::imp::define_interface!(ICoreFrameworkInputViewInterop, ICoreFrameworkInputViewInterop_Vtbl, 0x0e3da342_b11c_484b_9c1c_be0d61c2f6c5); windows_core::imp::interface_hierarchy!(ICoreFrameworkInputViewInterop, windows_core::IUnknown, windows_core::IInspectable); impl ICoreFrameworkInputViewInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &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/Display/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Display/mod.rs index 958fc50686..acda5b575a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Display/mod.rs @@ -9,12 +9,9 @@ impl IDisplayDeviceInterop { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), pobject.param().abi(), core::mem::transmute(psecurityattributes), core::mem::transmute(access), core::mem::transmute_copy(name), &mut result__).map(|| result__) } - pub unsafe fn OpenSharedHandle(&self, nthandle: P0, riid: windows_core::GUID) -> windows_core::Result<*mut core::ffi::c_void> - where - P0: windows_core::Param, - { + pub unsafe fn OpenSharedHandle(&self, nthandle: super::super::super::Foundation::HANDLE, riid: windows_core::GUID) -> windows_core::Result<*mut core::ffi::c_void> { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OpenSharedHandle)(windows_core::Interface::as_raw(self), nthandle.param().abi(), core::mem::transmute(riid), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OpenSharedHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(nthandle), core::mem::transmute(riid), &mut result__).map(|| result__) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Capture/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Capture/mod.rs index 5569c5c2ca..51a5003de4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Capture/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Capture/mod.rs @@ -1,22 +1,20 @@ windows_core::imp::define_interface!(IGraphicsCaptureItemInterop, IGraphicsCaptureItemInterop_Vtbl, 0x3628e81b_3cac_4c60_b7f4_23ce0e0c3356); windows_core::imp::interface_hierarchy!(IGraphicsCaptureItemInterop, windows_core::IUnknown); impl IGraphicsCaptureItemInterop { - pub unsafe fn CreateForWindow(&self, window: P0) -> windows_core::Result + pub unsafe fn CreateForWindow(&self, window: super::super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateForWindow)(windows_core::Interface::as_raw(self), window.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(window), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn CreateForMonitor(&self, monitor: P0) -> windows_core::Result + pub unsafe fn CreateForMonitor(&self, monitor: super::super::super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateForMonitor)(windows_core::Interface::as_raw(self), monitor.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateForMonitor)(windows_core::Interface::as_raw(self), core::mem::transmute(monitor), &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/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs index 2143809010..f204f2e275 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 @@ -52,7 +52,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(), core::mem::transmute(subtype), core::mem::transmute(width), core::mem::transmute(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__)) + (windows_core::Interface::vtable(self).CreateFromMF2DBuffer2)(windows_core::Interface::as_raw(self), data.param().abi(), core::mem::transmute(subtype), core::mem::transmute(width), core::mem::transmute(height), forcereadonly.param().abi(), core::mem::transmute(mindisplayaperture.unwrap_or(core::mem::zeroed())), &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/Isolation/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Isolation/mod.rs index 533b41e4bc..29cf10a6b5 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Isolation/mod.rs @@ -1,12 +1,9 @@ windows_core::imp::define_interface!(IIsolatedEnvironmentInterop, IIsolatedEnvironmentInterop_Vtbl, 0x85713c2e_8e62_46c5_8de2_c647e1d54636); windows_core::imp::interface_hierarchy!(IIsolatedEnvironmentInterop, windows_core::IUnknown); impl IIsolatedEnvironmentInterop { - pub unsafe fn GetHostHwndInterop(&self, containerhwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetHostHwndInterop(&self, containerhwnd: super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetHostHwndInterop)(windows_core::Interface::as_raw(self), containerhwnd.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetHostHwndInterop)(windows_core::Interface::as_raw(self), core::mem::transmute(containerhwnd), &mut result__).map(|| 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 b43026e58d..57994ff9a6 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 @@ -137,7 +137,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(), core::mem::transmute(subtype), core::mem::transmute(width), core::mem::transmute(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__)) + (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), core::mem::transmute(subtype), core::mem::transmute(width), core::mem::transmute(height), forcereadonly.param().abi(), core::mem::transmute(mindisplayaperture.unwrap_or(core::mem::zeroed())), 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/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs index b0723dd7ad..227b663b1a 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 @@ -18,12 +18,9 @@ pub unsafe fn RoCreatePropertySetSerializer() -> windows_core::Result(extra: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn RoFreeParameterizedTypeExtra(extra: ROPARAMIIDHANDLE) { windows_targets::link!("api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll" "system" fn RoFreeParameterizedTypeExtra(extra : ROPARAMIIDHANDLE)); - RoFreeParameterizedTypeExtra(extra.param().abi()) + RoFreeParameterizedTypeExtra(core::mem::transmute(extra)) } #[inline] pub unsafe fn RoGetMetaDataFile(name: &windows_core::HSTRING, metadatadispenser: P1, metadatafilepath: Option<*mut windows_core::HSTRING>, metadataimport: Option<*mut Option>, typedeftoken: Option<*mut u32>) -> windows_core::Result<()> @@ -31,7 +28,7 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-ro-typeresolution-l1-1-0.dll" "system" fn RoGetMetaDataFile(name : * mut core::ffi::c_void, metadatadispenser : * mut core::ffi::c_void, metadatafilepath : *mut * mut core::ffi::c_void, 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(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() + RoGetMetaDataFile(core::mem::transmute_copy(name), metadatadispenser.param().abi(), core::mem::transmute(metadatafilepath.unwrap_or(core::mem::zeroed())), core::mem::transmute(metadataimport.unwrap_or(core::mem::zeroed())), core::mem::transmute(typedeftoken.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RoGetParameterizedTypeInstanceIID(nameelements: &[windows_core::PCWSTR], metadatalocator: P2, iid: *mut windows_core::GUID, pextra: Option<*mut ROPARAMIIDHANDLE>) -> windows_core::Result<()> @@ -39,7 +36,7 @@ where P2: 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(), core::mem::transmute(iid), core::mem::transmute(pextra.unwrap_or(core::ptr::null_mut()))).ok() + RoGetParameterizedTypeInstanceIID(nameelements.len().try_into().unwrap(), core::mem::transmute(nameelements.as_ptr()), metadatalocator.param().abi(), core::mem::transmute(iid), core::mem::transmute(pextra.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RoIsApiContractMajorVersionPresent(name: P0, majorversion: u16) -> windows_core::Result @@ -60,12 +57,9 @@ where RoIsApiContractPresent(name.param().abi(), core::mem::transmute(majorversion), core::mem::transmute(minorversion), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn RoParameterizedTypeExtraGetTypeSignature(extra: P0) -> windows_core::PCSTR -where - P0: windows_core::Param, -{ +pub unsafe fn RoParameterizedTypeExtraGetTypeSignature(extra: ROPARAMIIDHANDLE) -> windows_core::PCSTR { windows_targets::link!("api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll" "system" fn RoParameterizedTypeExtraGetTypeSignature(extra : ROPARAMIIDHANDLE) -> windows_core::PCSTR); - RoParameterizedTypeExtraGetTypeSignature(extra.param().abi()) + RoParameterizedTypeExtraGetTypeSignature(core::mem::transmute(extra)) } #[inline] pub unsafe fn RoParseTypeName(typename: &windows_core::HSTRING, partscount: *mut u32, typenameparts: *mut *mut windows_core::HSTRING) -> windows_core::Result<()> { @@ -80,10 +74,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(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())), + core::mem::transmute(metadatafilepathscount.unwrap_or(core::mem::zeroed())), + core::mem::transmute(metadatafilepaths.unwrap_or(core::mem::zeroed())), + core::mem::transmute(subnamespacescount.unwrap_or(core::mem::zeroed())), + core::mem::transmute(subnamespaces.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -480,7 +474,7 @@ impl ICeeGen { (windows_core::Interface::vtable(self).EmitString)(windows_core::Interface::as_raw(self), lpstring.param().abi(), core::mem::transmute(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), core::mem::transmute(rva), core::mem::transmute(lpstring.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), core::mem::transmute(rva), core::mem::transmute(lpstring.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(cchbuffer), core::mem::transmute(lpbuffer), core::mem::transmute(rva)).ok() @@ -3676,7 +3670,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(core::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::mem::zeroed()))).ok() } pub unsafe fn SetInterfaceGroupParameterizedDefault(&self, name: P0, defaultinterfacenameelements: &[windows_core::PCWSTR]) -> windows_core::Result<()> where @@ -3689,7 +3683,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(core::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::mem::zeroed()))).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 980b96d760..3690d3a300 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 @@ -17,7 +17,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(core::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::mem::zeroed()))).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<()> @@ -25,7 +25,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(core::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::mem::zeroed()))).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Printing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Printing/mod.rs index a53dafb273..d597a4b2cf 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Printing/mod.rs @@ -67,21 +67,19 @@ impl windows_core::RuntimeName for IPrintDocumentPageSource {} windows_core::imp::define_interface!(IPrintManagerInterop, IPrintManagerInterop_Vtbl, 0xc5435a42_8d43_4e7b_a68a_ef311e392087); windows_core::imp::interface_hierarchy!(IPrintManagerInterop, windows_core::IUnknown, windows_core::IInspectable); impl IPrintManagerInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ShowPrintUIForWindowAsync(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn ShowPrintUIForWindowAsync(&self, appwindow: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).ShowPrintUIForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ShowPrintUIForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -482,21 +480,19 @@ impl windows_core::RuntimeName for IPrintWorkflowXpsReceiver2 {} windows_core::imp::define_interface!(IPrinting3DManagerInterop, IPrinting3DManagerInterop_Vtbl, 0x9ca31010_1484_4587_b26b_dddf9f9caecd); windows_core::imp::interface_hierarchy!(IPrinting3DManagerInterop, windows_core::IUnknown, windows_core::IInspectable); impl IPrinting3DManagerInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ShowPrintUIForWindowAsync(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn ShowPrintUIForWindowAsync(&self, appwindow: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).ShowPrintUIForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ShowPrintUIForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &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/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs index f088661c77..ab49d110d7 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(core::mem::transmute(targeterrorinfoaddress), core::mem::transmute(machine), core::mem::transmute(readmemorycallback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(framecount), core::mem::transmute(targetbacktraceaddress)).ok() + RoInspectCapturedStackBackTrace(core::mem::transmute(targeterrorinfoaddress), core::mem::transmute(machine), core::mem::transmute(readmemorycallback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(framecount), core::mem::transmute(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(core::mem::transmute(targettebaddress), core::mem::transmute(machine), core::mem::transmute(readmemorycallback), core::mem::transmute(context.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + RoInspectThreadErrorInfo(core::mem::transmute(targettebaddress), core::mem::transmute(machine), core::mem::transmute(readmemorycallback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn RoOriginateError(error: windows_core::HRESULT, message: &windows_core::HSTRING) -> super::super::Foundation::BOOL { @@ -286,12 +286,9 @@ where RoResolveRestrictedErrorInfoReference(reference.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn RoRevokeActivationFactories(cookie: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn RoRevokeActivationFactories(cookie: RO_REGISTRATION_COOKIE) { windows_targets::link!("api-ms-win-core-winrt-l1-1-0.dll" "system" fn RoRevokeActivationFactories(cookie : RO_REGISTRATION_COOKIE)); - RoRevokeActivationFactories(cookie.param().abi()) + RoRevokeActivationFactories(core::mem::transmute(cookie)) } #[inline] pub unsafe fn RoSetErrorReportingFlags(flags: u32) -> windows_core::Result<()> { @@ -314,12 +311,9 @@ pub unsafe fn RoUninitialize() { RoUninitialize() } #[inline] -pub unsafe fn RoUnregisterForApartmentShutdown(regcookie: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RoUnregisterForApartmentShutdown(regcookie: APARTMENT_SHUTDOWN_REGISTRATION_COOKIE) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-winrt-l1-1-0.dll" "system" fn RoUnregisterForApartmentShutdown(regcookie : APARTMENT_SHUTDOWN_REGISTRATION_COOKIE) -> windows_core::HRESULT); - RoUnregisterForApartmentShutdown(regcookie.param().abi()).ok() + RoUnregisterForApartmentShutdown(core::mem::transmute(regcookie)).ok() } #[inline] pub unsafe fn SetRestrictedErrorInfo(prestrictederrorinfo: P0) -> windows_core::Result<()> @@ -361,12 +355,9 @@ pub unsafe fn WindowsDeleteString(string: &windows_core::HSTRING) -> windows_cor WindowsDeleteString(core::mem::transmute_copy(string)).ok() } #[inline] -pub unsafe fn WindowsDeleteStringBuffer(bufferhandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WindowsDeleteStringBuffer(bufferhandle: Option) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn WindowsDeleteStringBuffer(bufferhandle : HSTRING_BUFFER) -> windows_core::HRESULT); - WindowsDeleteStringBuffer(bufferhandle.param().abi()).ok() + WindowsDeleteStringBuffer(core::mem::transmute(bufferhandle.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WindowsDuplicateString(string: &windows_core::HSTRING) -> windows_core::Result { @@ -382,17 +373,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 : * mut core::ffi::c_void, length : *mut u32) -> windows_core::PCWSTR); - WindowsGetStringRawBuffer(core::mem::transmute_copy(string), core::mem::transmute(length.unwrap_or(core::ptr::null_mut()))) + WindowsGetStringRawBuffer(core::mem::transmute_copy(string), core::mem::transmute(length.unwrap_or(core::mem::zeroed()))) } #[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(core::mem::transmute(targethstring), core::mem::transmute(machine), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(length), core::mem::transmute(targetstringaddress)).ok() + WindowsInspectString(core::mem::transmute(targethstring), core::mem::transmute(machine), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(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(core::mem::transmute(targethstring), core::mem::transmute(machine), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(length), core::mem::transmute(targetstringaddress)).ok() + WindowsInspectString2(core::mem::transmute(targethstring), core::mem::transmute(machine), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), core::mem::transmute(targetstringaddress)).ok() } #[inline] pub unsafe fn WindowsIsStringEmpty(string: &windows_core::HSTRING) -> super::super::Foundation::BOOL { @@ -405,13 +396,10 @@ pub unsafe fn WindowsPreallocateStringBuffer(length: u32, charbuffer: *mut *mut WindowsPreallocateStringBuffer(core::mem::transmute(length), core::mem::transmute(charbuffer), core::mem::transmute(bufferhandle)).ok() } #[inline] -pub unsafe fn WindowsPromoteStringBuffer(bufferhandle: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn WindowsPromoteStringBuffer(bufferhandle: HSTRING_BUFFER) -> windows_core::Result { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn WindowsPromoteStringBuffer(bufferhandle : HSTRING_BUFFER, string : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WindowsPromoteStringBuffer(bufferhandle.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WindowsPromoteStringBuffer(core::mem::transmute(bufferhandle), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn WindowsReplaceString(string: &windows_core::HSTRING, stringreplaced: &windows_core::HSTRING, stringreplacewith: &windows_core::HSTRING) -> windows_core::Result { @@ -591,29 +579,26 @@ impl windows_core::TypeKind for HSTRING_HEADER { windows_core::imp::define_interface!(IAccountsSettingsPaneInterop, IAccountsSettingsPaneInterop_Vtbl, 0xd3ee12ad_3865_4362_9746_b75a682df0e6); windows_core::imp::interface_hierarchy!(IAccountsSettingsPaneInterop, windows_core::IUnknown, windows_core::IInspectable); impl IAccountsSettingsPaneInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ShowManageAccountsForWindowAsync(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn ShowManageAccountsForWindowAsync(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).ShowManageAccountsForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ShowManageAccountsForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ShowAddAccountForWindowAsync(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn ShowAddAccountForWindowAsync(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).ShowAddAccountForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ShowAddAccountForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1058,11 +1043,8 @@ impl ICoreInputInterop2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).WindowHandle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn ChangeHostingContext(&self, newparentwindow: P0, newviewinstanceid: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangeHostingContext)(windows_core::Interface::as_raw(self), newparentwindow.param().abi(), core::mem::transmute(newviewinstanceid)).ok() + pub unsafe fn ChangeHostingContext(&self, newparentwindow: super::super::Foundation::HWND, newviewinstanceid: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangeHostingContext)(windows_core::Interface::as_raw(self), core::mem::transmute(newparentwindow), core::mem::transmute(newviewinstanceid)).ok() } } #[repr(C)] @@ -1258,12 +1240,11 @@ impl windows_core::RuntimeName for ICoreWindowAdapterInterop {} windows_core::imp::define_interface!(ICoreWindowComponentInterop, ICoreWindowComponentInterop_Vtbl, 0x0576ab31_a310_4c40_ba31_fd37e0298dfa); windows_core::imp::interface_hierarchy!(ICoreWindowComponentInterop, windows_core::IUnknown); impl ICoreWindowComponentInterop { - pub unsafe fn ConfigureComponentInput(&self, hostviewinstanceid: u32, hwndhost: P1, inputsourcevisual: P2) -> windows_core::Result<()> + pub unsafe fn ConfigureComponentInput(&self, hostviewinstanceid: u32, hwndhost: super::super::Foundation::HWND, inputsourcevisual: P2) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ConfigureComponentInput)(windows_core::Interface::as_raw(self), core::mem::transmute(hostviewinstanceid), hwndhost.param().abi(), inputsourcevisual.param().abi()).ok() + (windows_core::Interface::vtable(self).ConfigureComponentInput)(windows_core::Interface::as_raw(self), core::mem::transmute(hostviewinstanceid), core::mem::transmute(hwndhost), inputsourcevisual.param().abi()).ok() } pub unsafe fn GetViewInstanceId(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1458,13 +1439,12 @@ impl windows_core::RuntimeName for ICorrelationVectorSource {} windows_core::imp::define_interface!(IDragDropManagerInterop, IDragDropManagerInterop_Vtbl, 0x5ad8cba7_4c01_4dac_9074_827894292d63); windows_core::imp::interface_hierarchy!(IDragDropManagerInterop, windows_core::IUnknown, windows_core::IInspectable); impl IDragDropManagerInterop { - pub unsafe fn GetForWindow(&self, hwnd: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1491,13 +1471,12 @@ impl windows_core::RuntimeName for IDragDropManagerInterop {} windows_core::imp::define_interface!(IHolographicSpaceInterop, IHolographicSpaceInterop_Vtbl, 0x5c4ee536_6a98_4b86_a170_587013d6fd4b); windows_core::imp::interface_hierarchy!(IHolographicSpaceInterop, windows_core::IUnknown, windows_core::IInspectable); impl IHolographicSpaceInterop { - pub unsafe fn CreateForWindow(&self, window: P0) -> windows_core::Result + pub unsafe fn CreateForWindow(&self, window: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateForWindow)(windows_core::Interface::as_raw(self), window.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(window), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1527,13 +1506,12 @@ impl windows_core::RuntimeName for IHolographicSpaceInterop {} windows_core::imp::define_interface!(IInputPaneInterop, IInputPaneInterop_Vtbl, 0x75cf2c57_9195_4931_8332_f0b409e916af); windows_core::imp::interface_hierarchy!(IInputPaneInterop, windows_core::IUnknown, windows_core::IInspectable); impl IInputPaneInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1791,19 +1769,15 @@ impl windows_core::RuntimeName for IMessageDispatcher {} windows_core::imp::define_interface!(IPlayToManagerInterop, IPlayToManagerInterop_Vtbl, 0x24394699_1f2c_4eb3_8cd7_0ec1da42a540); windows_core::imp::interface_hierarchy!(IPlayToManagerInterop, windows_core::IUnknown, windows_core::IInspectable); impl IPlayToManagerInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ShowPlayToUIForWindow(&self, appwindow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowPlayToUIForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi()).ok() + pub unsafe fn ShowPlayToUIForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowPlayToUIForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow)).ok() } } #[repr(C)] @@ -1925,13 +1899,12 @@ impl windows_core::RuntimeName for IShareWindowCommandEventArgsInterop {} windows_core::imp::define_interface!(IShareWindowCommandSourceInterop, IShareWindowCommandSourceInterop_Vtbl, 0x461a191f_8424_43a6_a0fa_3451a22f56ab); windows_core::imp::interface_hierarchy!(IShareWindowCommandSourceInterop, windows_core::IUnknown); impl IShareWindowCommandSourceInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1958,13 +1931,12 @@ impl windows_core::RuntimeName for IShareWindowCommandSourceInterop {} windows_core::imp::define_interface!(ISpatialInteractionManagerInterop, ISpatialInteractionManagerInterop_Vtbl, 0x5c4ee536_6a98_4b86_a170_587013d6fd4b); windows_core::imp::interface_hierarchy!(ISpatialInteractionManagerInterop, windows_core::IUnknown, windows_core::IInspectable); impl ISpatialInteractionManagerInterop { - pub unsafe fn GetForWindow(&self, window: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, window: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), window.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(window), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1994,13 +1966,12 @@ impl windows_core::RuntimeName for ISpatialInteractionManagerInterop {} windows_core::imp::define_interface!(ISystemMediaTransportControlsInterop, ISystemMediaTransportControlsInterop_Vtbl, 0xddb0472d_c911_4a1f_86d9_dc3d71a95f5a); windows_core::imp::interface_hierarchy!(ISystemMediaTransportControlsInterop, windows_core::IUnknown, windows_core::IInspectable); impl ISystemMediaTransportControlsInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2030,13 +2001,12 @@ impl windows_core::RuntimeName for ISystemMediaTransportControlsInterop {} windows_core::imp::define_interface!(IUIViewSettingsInterop, IUIViewSettingsInterop_Vtbl, 0x3694dbf9_8f68_44be_8ff5_195c98ede8a6); windows_core::imp::interface_hierarchy!(IUIViewSettingsInterop, windows_core::IUnknown, windows_core::IInspectable); impl IUIViewSettingsInterop { - pub unsafe fn GetForWindow(&self, hwnd: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2063,13 +2033,12 @@ impl windows_core::RuntimeName for IUIViewSettingsInterop {} windows_core::imp::define_interface!(IUserActivityInterop, IUserActivityInterop_Vtbl, 0x1ade314d_0e0a_40d9_824c_9a088a50059f); windows_core::imp::interface_hierarchy!(IUserActivityInterop, windows_core::IUnknown, windows_core::IInspectable); impl IUserActivityInterop { - pub unsafe fn CreateSessionForWindow(&self, window: P0) -> windows_core::Result + pub unsafe fn CreateSessionForWindow(&self, window: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateSessionForWindow)(windows_core::Interface::as_raw(self), window.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSessionForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(window), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2099,13 +2068,12 @@ impl windows_core::RuntimeName for IUserActivityInterop {} windows_core::imp::define_interface!(IUserActivityRequestManagerInterop, IUserActivityRequestManagerInterop_Vtbl, 0xdd69f876_9699_4715_9095_e37ea30dfa1b); windows_core::imp::interface_hierarchy!(IUserActivityRequestManagerInterop, windows_core::IUnknown, windows_core::IInspectable); impl IUserActivityRequestManagerInterop { - pub unsafe fn GetForWindow(&self, window: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, window: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), window.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(window), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2166,13 +2134,12 @@ impl windows_core::RuntimeName for IUserActivitySourceHostInterop {} windows_core::imp::define_interface!(IUserConsentVerifierInterop, IUserConsentVerifierInterop_Vtbl, 0x39e050c3_4e74_441a_8dc0_b81104df949c); windows_core::imp::interface_hierarchy!(IUserConsentVerifierInterop, windows_core::IUnknown, windows_core::IInspectable); impl IUserConsentVerifierInterop { - pub unsafe fn RequestVerificationForWindowAsync(&self, appwindow: P0, message: &windows_core::HSTRING) -> windows_core::Result + pub unsafe fn RequestVerificationForWindowAsync(&self, appwindow: super::super::Foundation::HWND, message: &windows_core::HSTRING) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestVerificationForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), core::mem::transmute_copy(message), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestVerificationForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), core::mem::transmute_copy(message), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2269,24 +2236,22 @@ impl windows_core::RuntimeName for IWeakReferenceSource {} windows_core::imp::define_interface!(IWebAuthenticationCoreManagerInterop, IWebAuthenticationCoreManagerInterop_Vtbl, 0xf4b8e804_811e_4436_b69c_44cb67b72084); windows_core::imp::interface_hierarchy!(IWebAuthenticationCoreManagerInterop, windows_core::IUnknown, windows_core::IInspectable); impl IWebAuthenticationCoreManagerInterop { - pub unsafe fn RequestTokenForWindowAsync(&self, appwindow: P0, request: P1) -> windows_core::Result + pub unsafe fn RequestTokenForWindowAsync(&self, appwindow: super::super::Foundation::HWND, request: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestTokenForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), request.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestTokenForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), request.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestTokenWithWebAccountForWindowAsync(&self, appwindow: P0, request: P1, webaccount: P2) -> windows_core::Result + pub unsafe fn RequestTokenWithWebAccountForWindowAsync(&self, appwindow: super::super::Foundation::HWND, request: P1, webaccount: P2) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).RequestTokenWithWebAccountForWindowAsync)(windows_core::Interface::as_raw(self), appwindow.param().abi(), request.param().abi(), webaccount.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).RequestTokenWithWebAccountForWindowAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), request.param().abi(), webaccount.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/WindowsProgramming/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs index d67ad5a3b0..5368e133ea 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs @@ -19,28 +19,26 @@ where AddDelBackupEntryW(lpcszfilelist.param().abi(), lpcszbackupdir.param().abi(), lpcszbasename.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn AdvInstallFileA(hwnd: P0, lpszsourcedir: P1, lpszsourcefile: P2, lpszdestdir: P3, lpszdestfile: P4, dwflags: u32, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn AdvInstallFileA(hwnd: super::super::Foundation::HWND, lpszsourcedir: P1, lpszsourcefile: P2, lpszdestdir: P3, lpszdestfile: P4, dwflags: u32, dwreserved: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn AdvInstallFileA(hwnd : super::super::Foundation:: HWND, lpszsourcedir : windows_core::PCSTR, lpszsourcefile : windows_core::PCSTR, lpszdestdir : windows_core::PCSTR, lpszdestfile : windows_core::PCSTR, dwflags : u32, dwreserved : u32) -> windows_core::HRESULT); - AdvInstallFileA(hwnd.param().abi(), lpszsourcedir.param().abi(), lpszsourcefile.param().abi(), lpszdestdir.param().abi(), lpszdestfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved)).ok() + AdvInstallFileA(core::mem::transmute(hwnd), lpszsourcedir.param().abi(), lpszsourcefile.param().abi(), lpszdestdir.param().abi(), lpszdestfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved)).ok() } #[inline] -pub unsafe fn AdvInstallFileW(hwnd: P0, lpszsourcedir: P1, lpszsourcefile: P2, lpszdestdir: P3, lpszdestfile: P4, dwflags: u32, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn AdvInstallFileW(hwnd: super::super::Foundation::HWND, lpszsourcedir: P1, lpszsourcefile: P2, lpszdestdir: P3, lpszdestfile: P4, dwflags: u32, dwreserved: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn AdvInstallFileW(hwnd : super::super::Foundation:: HWND, lpszsourcedir : windows_core::PCWSTR, lpszsourcefile : windows_core::PCWSTR, lpszdestdir : windows_core::PCWSTR, lpszdestfile : windows_core::PCWSTR, dwflags : u32, dwreserved : u32) -> windows_core::HRESULT); - AdvInstallFileW(hwnd.param().abi(), lpszsourcedir.param().abi(), lpszsourcefile.param().abi(), lpszdestdir.param().abi(), lpszdestfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved)).ok() + AdvInstallFileW(core::mem::transmute(hwnd), lpszsourcedir.param().abi(), lpszsourcefile.param().abi(), lpszdestdir.param().abi(), lpszdestfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved)).ok() } #[inline] pub unsafe fn ApphelpCheckShellObject(objectclsid: *const windows_core::GUID, bshimifnecessary: P1, pullflags: *mut u64) -> super::super::Foundation::BOOL @@ -51,12 +49,9 @@ where ApphelpCheckShellObject(core::mem::transmute(objectclsid), bshimifnecessary.param().abi(), core::mem::transmute(pullflags)) } #[inline] -pub unsafe fn CancelDeviceWakeupRequest(hdevice: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CancelDeviceWakeupRequest(hdevice: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn CancelDeviceWakeupRequest(hdevice : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CancelDeviceWakeupRequest(hdevice.param().abi()) + CancelDeviceWakeupRequest(core::mem::transmute(hdevice)) } #[inline] pub unsafe fn CloseINFEngine(hinf: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -66,12 +61,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(core::mem::transmute(ullauxiliarycountervalue), core::mem::transmute(lpperformancecountervalue), core::mem::transmute(lpconversionerror.unwrap_or(core::ptr::null_mut()))).ok() + ConvertAuxiliaryCounterToPerformanceCounter(core::mem::transmute(ullauxiliarycountervalue), core::mem::transmute(lpperformancecountervalue), core::mem::transmute(lpconversionerror.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(ullperformancecountervalue), core::mem::transmute(lpauxiliarycountervalue), core::mem::transmute(lpconversionerror.unwrap_or(core::ptr::null_mut()))).ok() + ConvertPerformanceCounterToAuxiliaryCounter(core::mem::transmute(ullperformancecountervalue), core::mem::transmute(lpauxiliarycountervalue), core::mem::transmute(lpconversionerror.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn DCIBeginAccess(pdci: *mut DCISURFACEINFO, x: i32, y: i32, dx: i32, dy: i32) -> i32 { @@ -80,39 +75,27 @@ pub unsafe fn DCIBeginAccess(pdci: *mut DCISURFACEINFO, x: i32, y: i32, dx: i32, } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DCICloseProvider(hdc: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn DCICloseProvider(hdc: super::super::Graphics::Gdi::HDC) { windows_targets::link!("dciman32.dll" "system" fn DCICloseProvider(hdc : super::super::Graphics::Gdi:: HDC)); - DCICloseProvider(hdc.param().abi()) + DCICloseProvider(core::mem::transmute(hdc)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DCICreateOffscreen(hdc: P0, dwcompression: u32, dwredmask: u32, dwgreenmask: u32, dwbluemask: u32, dwwidth: u32, dwheight: u32, dwdcicaps: u32, dwbitcount: u32, lplpsurface: *mut *mut DCIOFFSCREEN) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DCICreateOffscreen(hdc: super::super::Graphics::Gdi::HDC, dwcompression: u32, dwredmask: u32, dwgreenmask: u32, dwbluemask: u32, dwwidth: u32, dwheight: u32, dwdcicaps: u32, dwbitcount: u32, lplpsurface: *mut *mut DCIOFFSCREEN) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCICreateOffscreen(hdc : super::super::Graphics::Gdi:: HDC, dwcompression : u32, dwredmask : u32, dwgreenmask : u32, dwbluemask : u32, dwwidth : u32, dwheight : u32, dwdcicaps : u32, dwbitcount : u32, lplpsurface : *mut *mut DCIOFFSCREEN) -> i32); - DCICreateOffscreen(hdc.param().abi(), core::mem::transmute(dwcompression), core::mem::transmute(dwredmask), core::mem::transmute(dwgreenmask), core::mem::transmute(dwbluemask), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwdcicaps), core::mem::transmute(dwbitcount), core::mem::transmute(lplpsurface)) + DCICreateOffscreen(core::mem::transmute(hdc), core::mem::transmute(dwcompression), core::mem::transmute(dwredmask), core::mem::transmute(dwgreenmask), core::mem::transmute(dwbluemask), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwdcicaps), core::mem::transmute(dwbitcount), core::mem::transmute(lplpsurface)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DCICreateOverlay(hdc: P0, lpoffscreensurf: *mut core::ffi::c_void, lplpsurface: *mut *mut DCIOVERLAY) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DCICreateOverlay(hdc: super::super::Graphics::Gdi::HDC, lpoffscreensurf: *mut core::ffi::c_void, lplpsurface: *mut *mut DCIOVERLAY) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCICreateOverlay(hdc : super::super::Graphics::Gdi:: HDC, lpoffscreensurf : *mut core::ffi::c_void, lplpsurface : *mut *mut DCIOVERLAY) -> i32); - DCICreateOverlay(hdc.param().abi(), core::mem::transmute(lpoffscreensurf), core::mem::transmute(lplpsurface)) + DCICreateOverlay(core::mem::transmute(hdc), core::mem::transmute(lpoffscreensurf), core::mem::transmute(lplpsurface)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DCICreatePrimary(hdc: P0, lplpsurface: *mut *mut DCISURFACEINFO) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DCICreatePrimary(hdc: super::super::Graphics::Gdi::HDC, lplpsurface: *mut *mut DCISURFACEINFO) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCICreatePrimary(hdc : super::super::Graphics::Gdi:: HDC, lplpsurface : *mut *mut DCISURFACEINFO) -> i32); - DCICreatePrimary(hdc.param().abi(), core::mem::transmute(lplpsurface)) + DCICreatePrimary(core::mem::transmute(hdc), core::mem::transmute(lplpsurface)) } #[inline] pub unsafe fn DCIDestroy(pdci: *mut DCISURFACEINFO) { @@ -131,12 +114,9 @@ pub unsafe fn DCIEndAccess(pdci: *mut DCISURFACEINFO) { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DCIEnum(hdc: P0, lprdst: *mut super::super::Foundation::RECT, lprsrc: *mut super::super::Foundation::RECT, lpfncallback: *mut core::ffi::c_void, lpcontext: *mut core::ffi::c_void) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DCIEnum(hdc: super::super::Graphics::Gdi::HDC, lprdst: *mut super::super::Foundation::RECT, lprsrc: *mut super::super::Foundation::RECT, lpfncallback: *mut core::ffi::c_void, lpcontext: *mut core::ffi::c_void) -> i32 { windows_targets::link!("dciman32.dll" "system" fn DCIEnum(hdc : super::super::Graphics::Gdi:: HDC, lprdst : *mut super::super::Foundation:: RECT, lprsrc : *mut super::super::Foundation:: RECT, lpfncallback : *mut core::ffi::c_void, lpcontext : *mut core::ffi::c_void) -> i32); - DCIEnum(hdc.param().abi(), core::mem::transmute(lprdst), core::mem::transmute(lprsrc), core::mem::transmute(lpfncallback), core::mem::transmute(lpcontext)) + DCIEnum(core::mem::transmute(hdc), core::mem::transmute(lprdst), core::mem::transmute(lprsrc), core::mem::transmute(lpfncallback), core::mem::transmute(lpcontext)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -170,13 +150,9 @@ where DelNodeA(pszfileordirname.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn DelNodeRunDLL32W(hwnd: P0, hinstance: P1, pszparms: windows_core::PWSTR, nshow: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DelNodeRunDLL32W(hwnd: super::super::Foundation::HWND, hinstance: super::super::Foundation::HINSTANCE, pszparms: windows_core::PWSTR, nshow: i32) -> windows_core::Result<()> { windows_targets::link!("advpack.dll" "system" fn DelNodeRunDLL32W(hwnd : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszparms : windows_core::PWSTR, nshow : i32) -> windows_core::HRESULT); - DelNodeRunDLL32W(hwnd.param().abi(), hinstance.param().abi(), core::mem::transmute(pszparms), core::mem::transmute(nshow)).ok() + DelNodeRunDLL32W(core::mem::transmute(hwnd), core::mem::transmute(hinstance), core::mem::transmute(pszparms), core::mem::transmute(nshow)).ok() } #[inline] pub unsafe fn DelNodeW(pszfileordirname: P0, dwflags: u32) -> windows_core::Result<()> @@ -187,20 +163,20 @@ where DelNodeW(pszfileordirname.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn DnsHostnameToComputerNameA(hostname: P0, computername: windows_core::PSTR, nsize: *mut u32) -> windows_core::Result<()> +pub unsafe fn DnsHostnameToComputerNameA(hostname: P0, computername: Option, nsize: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn DnsHostnameToComputerNameA(hostname : windows_core::PCSTR, computername : windows_core::PSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - DnsHostnameToComputerNameA(hostname.param().abi(), core::mem::transmute(computername), core::mem::transmute(nsize)).ok() + DnsHostnameToComputerNameA(hostname.param().abi(), core::mem::transmute(computername.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } #[inline] -pub unsafe fn DnsHostnameToComputerNameW(hostname: P0, computername: windows_core::PWSTR, nsize: *mut u32) -> windows_core::Result<()> +pub unsafe fn DnsHostnameToComputerNameW(hostname: P0, computername: Option, nsize: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn DnsHostnameToComputerNameW(hostname : windows_core::PCWSTR, computername : windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - DnsHostnameToComputerNameW(hostname.param().abi(), core::mem::transmute(computername), core::mem::transmute(nsize)).ok() + DnsHostnameToComputerNameW(hostname.param().abi(), core::mem::transmute(computername.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } #[inline] pub unsafe fn DosDateTimeToFileTime(wfatdate: u16, wfattime: u16, lpfiletime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()> { @@ -214,20 +190,14 @@ pub unsafe fn EnableProcessOptionalXStateFeatures(features: u64) -> super::super EnableProcessOptionalXStateFeatures(core::mem::transmute(features)) } #[inline] -pub unsafe fn ExecuteCabA(hwnd: P0, pcab: *mut CABINFOA, preserved: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ExecuteCabA(hwnd: super::super::Foundation::HWND, pcab: *mut CABINFOA, preserved: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("advpack.dll" "system" fn ExecuteCabA(hwnd : super::super::Foundation:: HWND, pcab : *mut CABINFOA, preserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - ExecuteCabA(hwnd.param().abi(), core::mem::transmute(pcab), core::mem::transmute(preserved)).ok() + ExecuteCabA(core::mem::transmute(hwnd), core::mem::transmute(pcab), core::mem::transmute(preserved)).ok() } #[inline] -pub unsafe fn ExecuteCabW(hwnd: P0, pcab: *mut CABINFOW, preserved: *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ExecuteCabW(hwnd: super::super::Foundation::HWND, pcab: *mut CABINFOW, preserved: *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("advpack.dll" "system" fn ExecuteCabW(hwnd : super::super::Foundation:: HWND, pcab : *mut CABINFOW, preserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - ExecuteCabW(hwnd.param().abi(), core::mem::transmute(pcab), core::mem::transmute(preserved)).ok() + ExecuteCabW(core::mem::transmute(hwnd), core::mem::transmute(pcab), core::mem::transmute(preserved)).ok() } #[inline] pub unsafe fn ExtractFilesA(pszcabname: P0, pszexpanddir: P1, dwflags: u32, pszfilelist: P3, lpreserved: *mut core::ffi::c_void, dwreserved: u32) -> windows_core::Result<()> @@ -270,9 +240,8 @@ where FileSaveMarkNotExistW(lpfilelist.param().abi(), lpdir.param().abi(), lpbasename.param().abi()).ok() } #[inline] -pub unsafe fn FileSaveRestoreOnINFA(hwnd: P0, psztitle: P1, pszinf: P2, pszsection: P3, pszbackupdir: P4, pszbasebackupfile: P5, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn FileSaveRestoreOnINFA(hwnd: super::super::Foundation::HWND, psztitle: P1, pszinf: P2, pszsection: P3, pszbackupdir: P4, pszbasebackupfile: P5, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, @@ -280,12 +249,11 @@ where P5: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn FileSaveRestoreOnINFA(hwnd : super::super::Foundation:: HWND, psztitle : windows_core::PCSTR, pszinf : windows_core::PCSTR, pszsection : windows_core::PCSTR, pszbackupdir : windows_core::PCSTR, pszbasebackupfile : windows_core::PCSTR, dwflags : u32) -> windows_core::HRESULT); - FileSaveRestoreOnINFA(hwnd.param().abi(), psztitle.param().abi(), pszinf.param().abi(), pszsection.param().abi(), pszbackupdir.param().abi(), pszbasebackupfile.param().abi(), core::mem::transmute(dwflags)).ok() + FileSaveRestoreOnINFA(core::mem::transmute(hwnd), psztitle.param().abi(), pszinf.param().abi(), pszsection.param().abi(), pszbackupdir.param().abi(), pszbasebackupfile.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn FileSaveRestoreOnINFW(hwnd: P0, psztitle: P1, pszinf: P2, pszsection: P3, pszbackupdir: P4, pszbasebackupfile: P5, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn FileSaveRestoreOnINFW(hwnd: super::super::Foundation::HWND, psztitle: P1, pszinf: P2, pszsection: P3, pszbackupdir: P4, pszbasebackupfile: P5, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, @@ -293,18 +261,17 @@ where P5: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn FileSaveRestoreOnINFW(hwnd : super::super::Foundation:: HWND, psztitle : windows_core::PCWSTR, pszinf : windows_core::PCWSTR, pszsection : windows_core::PCWSTR, pszbackupdir : windows_core::PCWSTR, pszbasebackupfile : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - FileSaveRestoreOnINFW(hwnd.param().abi(), psztitle.param().abi(), pszinf.param().abi(), pszsection.param().abi(), pszbackupdir.param().abi(), pszbasebackupfile.param().abi(), core::mem::transmute(dwflags)).ok() + FileSaveRestoreOnINFW(core::mem::transmute(hwnd), psztitle.param().abi(), pszinf.param().abi(), pszsection.param().abi(), pszbackupdir.param().abi(), pszbasebackupfile.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn FileSaveRestoreW(hdlg: P0, lpfilelist: P1, lpdir: P2, lpbasename: P3, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn FileSaveRestoreW(hdlg: super::super::Foundation::HWND, lpfilelist: P1, lpdir: P2, lpbasename: P3, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn FileSaveRestoreW(hdlg : super::super::Foundation:: HWND, lpfilelist : windows_core::PCWSTR, lpdir : windows_core::PCWSTR, lpbasename : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - FileSaveRestoreW(hdlg.param().abi(), lpfilelist.param().abi(), lpdir.param().abi(), lpbasename.param().abi(), core::mem::transmute(dwflags)).ok() + FileSaveRestoreW(core::mem::transmute(hdlg), lpfilelist.param().abi(), lpdir.param().abi(), lpbasename.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn FileTimeToDosDateTime(lpfiletime: *const super::super::Foundation::FILETIME, lpfatdate: *mut u16, lpfattime: *mut u16) -> windows_core::Result<()> { @@ -317,14 +284,14 @@ pub unsafe fn GdiEntry13() -> u32 { GdiEntry13() } #[inline] -pub unsafe fn GetComputerNameA(lpbuffer: windows_core::PSTR, nsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetComputerNameA(lpbuffer: Option, nsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetComputerNameA(lpbuffer : windows_core::PSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetComputerNameA(core::mem::transmute(lpbuffer), core::mem::transmute(nsize)).ok() + GetComputerNameA(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } #[inline] -pub unsafe fn GetComputerNameW(lpbuffer: windows_core::PWSTR, nsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetComputerNameW(lpbuffer: Option, nsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetComputerNameW(lpbuffer : windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetComputerNameW(core::mem::transmute(lpbuffer), core::mem::transmute(nsize)).ok() + GetComputerNameW(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } #[inline] pub unsafe fn GetCurrentHwProfileA(lphwprofileinfo: *mut HW_PROFILE_INFOA) -> windows_core::Result<()> { @@ -338,12 +305,9 @@ pub unsafe fn GetCurrentHwProfileW(lphwprofileinfo: *mut HW_PROFILE_INFOW) -> wi } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetDCRegionData(hdc: P0, size: u32, prd: *mut super::super::Graphics::Gdi::RGNDATA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetDCRegionData(hdc: super::super::Graphics::Gdi::HDC, size: u32, prd: *mut super::super::Graphics::Gdi::RGNDATA) -> u32 { windows_targets::link!("dciman32.dll" "system" fn GetDCRegionData(hdc : super::super::Graphics::Gdi:: HDC, size : u32, prd : *mut super::super::Graphics::Gdi:: RGNDATA) -> u32); - GetDCRegionData(hdc.param().abi(), core::mem::transmute(size), core::mem::transmute(prd)) + GetDCRegionData(core::mem::transmute(hdc), core::mem::transmute(size), core::mem::transmute(prd)) } #[inline] pub unsafe fn GetFeatureEnabledState(featureid: u32, changetime: FEATURE_CHANGE_TIME) -> FEATURE_ENABLED_STATE { @@ -362,7 +326,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(core::ptr::null_mut())), core::mem::transmute(nsize)) + GetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +335,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(core::ptr::null_mut())), core::mem::transmute(nsize), core::mem::transmute(pdwattribubutes.unwrap_or(core::ptr::null_mut()))) + GetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize), core::mem::transmute(pdwattribubutes.unwrap_or(core::mem::zeroed()))) } #[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 +344,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(core::ptr::null_mut())), core::mem::transmute(nsize), core::mem::transmute(pdwattribubutes.unwrap_or(core::ptr::null_mut()))) + GetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize), core::mem::transmute(pdwattribubutes.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetFirmwareEnvironmentVariableW(lpname: P0, lpguid: P1, pbuffer: Option<*mut core::ffi::c_void>, nsize: u32) -> u32 @@ -389,7 +353,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(core::ptr::null_mut())), core::mem::transmute(nsize)) + GetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)) } #[inline] pub unsafe fn GetPrivateProfileIntA(lpappname: P0, lpkeyname: P1, ndefault: i32, lpfilename: P3) -> u32 @@ -475,7 +439,7 @@ where P4: 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(core::ptr::null_mut())), core::mem::transmute(usizestruct), szfile.param().abi()) + GetPrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::mem::zeroed())), core::mem::transmute(usizestruct), szfile.param().abi()) } #[inline] pub unsafe fn GetPrivateProfileStructW(lpszsection: P0, lpszkey: P1, lpstruct: Option<*mut core::ffi::c_void>, usizestruct: u32, szfile: P4) -> super::super::Foundation::BOOL @@ -485,7 +449,7 @@ where P4: 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(core::ptr::null_mut())), core::mem::transmute(usizestruct), szfile.param().abi()) + GetPrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::mem::zeroed())), core::mem::transmute(usizestruct), szfile.param().abi()) } #[inline] pub unsafe fn GetProfileIntA(lpappname: P0, lpkeyname: P1, ndefault: i32) -> u32 @@ -544,7 +508,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(core::ptr::null_mut())), core::mem::transmute(pdwquotaused.unwrap_or(core::ptr::null_mut()))).ok() + GetSystemRegistryQuota(core::mem::transmute(pdwquotaallowed.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwquotaused.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[inline] @@ -553,14 +517,14 @@ pub unsafe fn GetThreadEnabledXStateFeatures() -> u64 { GetThreadEnabledXStateFeatures() } #[inline] -pub unsafe fn GetUserNameA(lpbuffer: windows_core::PSTR, pcbbuffer: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetUserNameA(lpbuffer: Option, pcbbuffer: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetUserNameA(lpbuffer : windows_core::PSTR, pcbbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetUserNameA(core::mem::transmute(lpbuffer), core::mem::transmute(pcbbuffer)).ok() + GetUserNameA(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbbuffer)).ok() } #[inline] -pub unsafe fn GetUserNameW(lpbuffer: windows_core::PWSTR, pcbbuffer: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetUserNameW(lpbuffer: Option, pcbbuffer: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn GetUserNameW(lpbuffer : windows_core::PWSTR, pcbbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetUserNameW(core::mem::transmute(lpbuffer), core::mem::transmute(pcbbuffer)).ok() + GetUserNameW(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbbuffer)).ok() } #[inline] pub unsafe fn GetVersionFromFileA(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: P3) -> windows_core::Result<()> @@ -600,12 +564,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetWindowRegionData(hwnd: P0, size: u32, prd: *mut super::super::Graphics::Gdi::RGNDATA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowRegionData(hwnd: super::super::Foundation::HWND, size: u32, prd: *mut super::super::Graphics::Gdi::RGNDATA) -> u32 { windows_targets::link!("dciman32.dll" "system" fn GetWindowRegionData(hwnd : super::super::Foundation:: HWND, size : u32, prd : *mut super::super::Graphics::Gdi:: RGNDATA) -> u32); - GetWindowRegionData(hwnd.param().abi(), core::mem::transmute(size), core::mem::transmute(prd)) + GetWindowRegionData(core::mem::transmute(hwnd), core::mem::transmute(size), core::mem::transmute(prd)) } #[inline] pub unsafe fn GlobalCompact(dwminfree: u32) -> usize { @@ -613,52 +574,34 @@ pub unsafe fn GlobalCompact(dwminfree: u32) -> usize { GlobalCompact(core::mem::transmute(dwminfree)) } #[inline] -pub unsafe fn GlobalFix(hmem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalFix(hmem: super::super::Foundation::HGLOBAL) { windows_targets::link!("kernel32.dll" "system" fn GlobalFix(hmem : super::super::Foundation:: HGLOBAL)); - GlobalFix(hmem.param().abi()) + GlobalFix(core::mem::transmute(hmem)) } #[inline] -pub unsafe fn GlobalUnWire(hmem: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalUnWire(hmem: super::super::Foundation::HGLOBAL) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GlobalUnWire(hmem : super::super::Foundation:: HGLOBAL) -> super::super::Foundation:: BOOL); - GlobalUnWire(hmem.param().abi()) + GlobalUnWire(core::mem::transmute(hmem)) } #[inline] -pub unsafe fn GlobalUnfix(hmem: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalUnfix(hmem: super::super::Foundation::HGLOBAL) { windows_targets::link!("kernel32.dll" "system" fn GlobalUnfix(hmem : super::super::Foundation:: HGLOBAL)); - GlobalUnfix(hmem.param().abi()) + GlobalUnfix(core::mem::transmute(hmem)) } #[inline] -pub unsafe fn GlobalWire(hmem: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn GlobalWire(hmem: super::super::Foundation::HGLOBAL) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn GlobalWire(hmem : super::super::Foundation:: HGLOBAL) -> *mut core::ffi::c_void); - GlobalWire(hmem.param().abi()) + GlobalWire(core::mem::transmute(hmem)) } #[inline] -pub unsafe fn IMPGetIMEA(param0: P0, param1: *mut IMEPROA) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IMPGetIMEA(param0: super::super::Foundation::HWND, param1: *mut IMEPROA) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IMPGetIMEA(param0 : super::super::Foundation:: HWND, param1 : *mut IMEPROA) -> super::super::Foundation:: BOOL); - IMPGetIMEA(param0.param().abi(), core::mem::transmute(param1)) + IMPGetIMEA(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] -pub unsafe fn IMPGetIMEW(param0: P0, param1: *mut IMEPROW) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IMPGetIMEW(param0: super::super::Foundation::HWND, param1: *mut IMEPROW) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IMPGetIMEW(param0 : super::super::Foundation:: HWND, param1 : *mut IMEPROW) -> super::super::Foundation:: BOOL); - IMPGetIMEW(param0.param().abi(), core::mem::transmute(param1)) + IMPGetIMEW(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] pub unsafe fn IMPQueryIMEA(param0: *mut IMEPROA) -> super::super::Foundation::BOOL { @@ -671,20 +614,14 @@ pub unsafe fn IMPQueryIMEW(param0: *mut IMEPROW) -> super::super::Foundation::BO IMPQueryIMEW(core::mem::transmute(param0)) } #[inline] -pub unsafe fn IMPSetIMEA(param0: P0, param1: *mut IMEPROA) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IMPSetIMEA(param0: super::super::Foundation::HWND, param1: *mut IMEPROA) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IMPSetIMEA(param0 : super::super::Foundation:: HWND, param1 : *mut IMEPROA) -> super::super::Foundation:: BOOL); - IMPSetIMEA(param0.param().abi(), core::mem::transmute(param1)) + IMPSetIMEA(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] -pub unsafe fn IMPSetIMEW(param0: P0, param1: *mut IMEPROW) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IMPSetIMEW(param0: super::super::Foundation::HWND, param1: *mut IMEPROW) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IMPSetIMEW(param0 : super::super::Foundation:: HWND, param1 : *mut IMEPROW) -> super::super::Foundation:: BOOL); - IMPSetIMEW(param0.param().abi(), core::mem::transmute(param1)) + IMPSetIMEW(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] pub unsafe fn IsApiSetImplemented(contract: P0) -> super::super::Foundation::BOOL @@ -697,12 +634,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(core::ptr::null())), core::mem::transmute(ucb)) + IsBadHugeReadPtr(core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null())), core::mem::transmute(ucb)) + IsBadHugeWritePtr(core::mem::transmute(lp.unwrap_or(core::mem::zeroed())), core::mem::transmute(ucb)) } #[inline] pub unsafe fn IsNTAdmin(dwreserved: u32, lpdwreserved: *mut u32) -> super::super::Foundation::BOOL { @@ -715,31 +652,22 @@ pub unsafe fn IsNativeVhdBoot(nativevhdboot: *mut super::super::Foundation::BOOL IsNativeVhdBoot(core::mem::transmute(nativevhdboot)).ok() } #[inline] -pub unsafe fn IsTokenUntrusted(tokenhandle: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsTokenUntrusted(tokenhandle: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("advapi32.dll" "system" fn IsTokenUntrusted(tokenhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - IsTokenUntrusted(tokenhandle.param().abi()) + IsTokenUntrusted(core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn LaunchINFSectionExW(hwnd: P0, hinstance: P1, pszparms: P2, nshow: i32) -> windows_core::Result<()> +pub unsafe fn LaunchINFSectionExW(hwnd: Option, hinstance: Option, pszparms: P2, nshow: i32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn LaunchINFSectionExW(hwnd : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszparms : windows_core::PCWSTR, nshow : i32) -> windows_core::HRESULT); - LaunchINFSectionExW(hwnd.param().abi(), hinstance.param().abi(), pszparms.param().abi(), core::mem::transmute(nshow)).ok() + LaunchINFSectionExW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), pszparms.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn LaunchINFSectionW(hwndowner: P0, hinstance: P1, pszparams: windows_core::PWSTR, nshow: i32) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn LaunchINFSectionW(hwndowner: super::super::Foundation::HWND, hinstance: super::super::Foundation::HINSTANCE, pszparams: windows_core::PWSTR, nshow: i32) -> i32 { windows_targets::link!("advpack.dll" "system" fn LaunchINFSectionW(hwndowner : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszparams : windows_core::PWSTR, nshow : i32) -> i32); - LaunchINFSectionW(hwndowner.param().abi(), hinstance.param().abi(), core::mem::transmute(pszparams), core::mem::transmute(nshow)) + LaunchINFSectionW(core::mem::transmute(hwndowner), core::mem::transmute(hinstance), core::mem::transmute(pszparams), core::mem::transmute(nshow)) } #[inline] pub unsafe fn LocalCompact(uminfree: u32) -> usize { @@ -747,12 +675,9 @@ pub unsafe fn LocalCompact(uminfree: u32) -> usize { LocalCompact(core::mem::transmute(uminfree)) } #[inline] -pub unsafe fn LocalShrink(hmem: P0, cbnewsize: u32) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn LocalShrink(hmem: super::super::Foundation::HLOCAL, cbnewsize: u32) -> usize { windows_targets::link!("kernel32.dll" "system" fn LocalShrink(hmem : super::super::Foundation:: HLOCAL, cbnewsize : u32) -> usize); - LocalShrink(hmem.param().abi(), core::mem::transmute(cbnewsize)) + LocalShrink(core::mem::transmute(hmem), core::mem::transmute(cbnewsize)) } #[inline] pub unsafe fn MulDiv(nnumber: i32, nnumerator: i32, ndenominator: i32) -> i32 { @@ -814,12 +739,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(core::mem::transmute(bufferlength), core::mem::transmute(processoridlecycletime.unwrap_or(core::ptr::null_mut()))).ok() + QueryIdleProcessorCycleTime(core::mem::transmute(bufferlength), core::mem::transmute(processoridlecycletime.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(group), core::mem::transmute(bufferlength), core::mem::transmute(processoridlecycletime.unwrap_or(core::ptr::null_mut()))) + QueryIdleProcessorCycleTimeEx(core::mem::transmute(group), core::mem::transmute(bufferlength), core::mem::transmute(processoridlecycletime.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn QueryInterruptTime() -> u64 { @@ -836,20 +761,14 @@ pub unsafe fn QueryInterruptTimePrecise() -> u64 { result__ } #[inline] -pub unsafe fn QueryProcessCycleTime(processhandle: P0, cycletime: *mut u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryProcessCycleTime(processhandle: super::super::Foundation::HANDLE, cycletime: *mut u64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryProcessCycleTime(processhandle : super::super::Foundation:: HANDLE, cycletime : *mut u64) -> super::super::Foundation:: BOOL); - QueryProcessCycleTime(processhandle.param().abi(), core::mem::transmute(cycletime)).ok() + QueryProcessCycleTime(core::mem::transmute(processhandle), core::mem::transmute(cycletime)).ok() } #[inline] -pub unsafe fn QueryThreadCycleTime(threadhandle: P0, cycletime: *mut u64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn QueryThreadCycleTime(threadhandle: super::super::Foundation::HANDLE, cycletime: *mut u64) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryThreadCycleTime(threadhandle : super::super::Foundation:: HANDLE, cycletime : *mut u64) -> super::super::Foundation:: BOOL); - QueryThreadCycleTime(threadhandle.param().abi(), core::mem::transmute(cycletime)).ok() + QueryThreadCycleTime(core::mem::transmute(threadhandle), core::mem::transmute(cycletime)).ok() } #[inline] pub unsafe fn QueryUnbiasedInterruptTime(unbiasedtime: *mut u64) -> super::super::Foundation::BOOL { @@ -869,24 +788,22 @@ pub unsafe fn RaiseCustomSystemEventTrigger(customsystemeventtriggerconfig: *con RaiseCustomSystemEventTrigger(core::mem::transmute(customsystemeventtriggerconfig)) } #[inline] -pub unsafe fn RebootCheckOnInstallA(hwnd: P0, pszinf: P1, pszsec: P2, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn RebootCheckOnInstallA(hwnd: super::super::Foundation::HWND, pszinf: P1, pszsec: P2, dwreserved: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RebootCheckOnInstallA(hwnd : super::super::Foundation:: HWND, pszinf : windows_core::PCSTR, pszsec : windows_core::PCSTR, dwreserved : u32) -> windows_core::HRESULT); - RebootCheckOnInstallA(hwnd.param().abi(), pszinf.param().abi(), pszsec.param().abi(), core::mem::transmute(dwreserved)).ok() + RebootCheckOnInstallA(core::mem::transmute(hwnd), pszinf.param().abi(), pszsec.param().abi(), core::mem::transmute(dwreserved)).ok() } #[inline] -pub unsafe fn RebootCheckOnInstallW(hwnd: P0, pszinf: P1, pszsec: P2, dwreserved: u32) -> windows_core::Result<()> +pub unsafe fn RebootCheckOnInstallW(hwnd: super::super::Foundation::HWND, pszinf: P1, pszsec: P2, dwreserved: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RebootCheckOnInstallW(hwnd : super::super::Foundation:: HWND, pszinf : windows_core::PCWSTR, pszsec : windows_core::PCWSTR, dwreserved : u32) -> windows_core::HRESULT); - RebootCheckOnInstallW(hwnd.param().abi(), pszinf.param().abi(), pszsec.param().abi(), core::mem::transmute(dwreserved)).ok() + RebootCheckOnInstallW(core::mem::transmute(hwnd), pszinf.param().abi(), pszsec.param().abi(), core::mem::transmute(dwreserved)).ok() } #[inline] pub unsafe fn RecordFeatureError(featureid: u32, error: *const FEATURE_ERROR) { @@ -902,100 +819,84 @@ where RecordFeatureUsage(core::mem::transmute(featureid), core::mem::transmute(kind), core::mem::transmute(addend), originname.param().abi()) } #[inline] -pub unsafe fn RegInstallA(hmod: P0, pszsection: P1, psttable: *const STRTABLEA) -> windows_core::Result<()> +pub unsafe fn RegInstallA(hmod: super::super::Foundation::HMODULE, pszsection: P1, psttable: *const STRTABLEA) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RegInstallA(hmod : super::super::Foundation:: HMODULE, pszsection : windows_core::PCSTR, psttable : *const STRTABLEA) -> windows_core::HRESULT); - RegInstallA(hmod.param().abi(), pszsection.param().abi(), core::mem::transmute(psttable)).ok() + RegInstallA(core::mem::transmute(hmod), pszsection.param().abi(), core::mem::transmute(psttable)).ok() } #[inline] -pub unsafe fn RegInstallW(hmod: P0, pszsection: P1, psttable: *const STRTABLEW) -> windows_core::Result<()> +pub unsafe fn RegInstallW(hmod: super::super::Foundation::HMODULE, pszsection: P1, psttable: *const STRTABLEW) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RegInstallW(hmod : super::super::Foundation:: HMODULE, pszsection : windows_core::PCWSTR, psttable : *const STRTABLEW) -> windows_core::HRESULT); - RegInstallW(hmod.param().abi(), pszsection.param().abi(), core::mem::transmute(psttable)).ok() + RegInstallW(core::mem::transmute(hmod), pszsection.param().abi(), core::mem::transmute(psttable)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn RegRestoreAllA(hwnd: P0, psztitlestring: P1, hkbckupkey: P2) -> windows_core::Result<()> +pub unsafe fn RegRestoreAllA(hwnd: Option, psztitlestring: P1, hkbckupkey: super::Registry::HKEY) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RegRestoreAllA(hwnd : super::super::Foundation:: HWND, psztitlestring : windows_core::PCSTR, hkbckupkey : super::Registry:: HKEY) -> windows_core::HRESULT); - RegRestoreAllA(hwnd.param().abi(), psztitlestring.param().abi(), hkbckupkey.param().abi()).ok() + RegRestoreAllA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psztitlestring.param().abi(), core::mem::transmute(hkbckupkey)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn RegRestoreAllW(hwnd: P0, psztitlestring: P1, hkbckupkey: P2) -> windows_core::Result<()> +pub unsafe fn RegRestoreAllW(hwnd: Option, psztitlestring: P1, hkbckupkey: super::Registry::HKEY) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RegRestoreAllW(hwnd : super::super::Foundation:: HWND, psztitlestring : windows_core::PCWSTR, hkbckupkey : super::Registry:: HKEY) -> windows_core::HRESULT); - RegRestoreAllW(hwnd.param().abi(), psztitlestring.param().abi(), hkbckupkey.param().abi()).ok() + RegRestoreAllW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psztitlestring.param().abi(), core::mem::transmute(hkbckupkey)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn RegSaveRestoreA(hwnd: P0, psztitlestring: P1, hkbckupkey: P2, pcszrootkey: P3, pcszsubkey: P4, pcszvaluename: P5, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn RegSaveRestoreA(hwnd: super::super::Foundation::HWND, psztitlestring: P1, hkbckupkey: super::Registry::HKEY, pcszrootkey: P3, pcszsubkey: P4, pcszvaluename: P5, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RegSaveRestoreA(hwnd : super::super::Foundation:: HWND, psztitlestring : windows_core::PCSTR, hkbckupkey : super::Registry:: HKEY, pcszrootkey : windows_core::PCSTR, pcszsubkey : windows_core::PCSTR, pcszvaluename : windows_core::PCSTR, dwflags : u32) -> windows_core::HRESULT); - RegSaveRestoreA(hwnd.param().abi(), psztitlestring.param().abi(), hkbckupkey.param().abi(), pcszrootkey.param().abi(), pcszsubkey.param().abi(), pcszvaluename.param().abi(), core::mem::transmute(dwflags)).ok() + RegSaveRestoreA(core::mem::transmute(hwnd), psztitlestring.param().abi(), core::mem::transmute(hkbckupkey), pcszrootkey.param().abi(), pcszsubkey.param().abi(), pcszvaluename.param().abi(), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn RegSaveRestoreOnINFA(hwnd: P0, psztitle: P1, pszinf: P2, pszsection: P3, hhklmbackkey: P4, hhkcubackkey: P5, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn RegSaveRestoreOnINFA(hwnd: super::super::Foundation::HWND, psztitle: P1, pszinf: P2, pszsection: P3, hhklmbackkey: super::Registry::HKEY, hhkcubackkey: super::Registry::HKEY, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RegSaveRestoreOnINFA(hwnd : super::super::Foundation:: HWND, psztitle : windows_core::PCSTR, pszinf : windows_core::PCSTR, pszsection : windows_core::PCSTR, hhklmbackkey : super::Registry:: HKEY, hhkcubackkey : super::Registry:: HKEY, dwflags : u32) -> windows_core::HRESULT); - RegSaveRestoreOnINFA(hwnd.param().abi(), psztitle.param().abi(), pszinf.param().abi(), pszsection.param().abi(), hhklmbackkey.param().abi(), hhkcubackkey.param().abi(), core::mem::transmute(dwflags)).ok() + RegSaveRestoreOnINFA(core::mem::transmute(hwnd), psztitle.param().abi(), pszinf.param().abi(), pszsection.param().abi(), core::mem::transmute(hhklmbackkey), core::mem::transmute(hhkcubackkey), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn RegSaveRestoreOnINFW(hwnd: P0, psztitle: P1, pszinf: P2, pszsection: P3, hhklmbackkey: P4, hhkcubackkey: P5, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn RegSaveRestoreOnINFW(hwnd: super::super::Foundation::HWND, psztitle: P1, pszinf: P2, pszsection: P3, hhklmbackkey: super::Registry::HKEY, hhkcubackkey: super::Registry::HKEY, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RegSaveRestoreOnINFW(hwnd : super::super::Foundation:: HWND, psztitle : windows_core::PCWSTR, pszinf : windows_core::PCWSTR, pszsection : windows_core::PCWSTR, hhklmbackkey : super::Registry:: HKEY, hhkcubackkey : super::Registry:: HKEY, dwflags : u32) -> windows_core::HRESULT); - RegSaveRestoreOnINFW(hwnd.param().abi(), psztitle.param().abi(), pszinf.param().abi(), pszsection.param().abi(), hhklmbackkey.param().abi(), hhkcubackkey.param().abi(), core::mem::transmute(dwflags)).ok() + RegSaveRestoreOnINFW(core::mem::transmute(hwnd), psztitle.param().abi(), pszinf.param().abi(), pszsection.param().abi(), core::mem::transmute(hhklmbackkey), core::mem::transmute(hhkcubackkey), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn RegSaveRestoreW(hwnd: P0, psztitlestring: P1, hkbckupkey: P2, pcszrootkey: P3, pcszsubkey: P4, pcszvaluename: P5, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn RegSaveRestoreW(hwnd: super::super::Foundation::HWND, psztitlestring: P1, hkbckupkey: super::Registry::HKEY, pcszrootkey: P3, pcszsubkey: P4, pcszvaluename: P5, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RegSaveRestoreW(hwnd : super::super::Foundation:: HWND, psztitlestring : windows_core::PCWSTR, hkbckupkey : super::Registry:: HKEY, pcszrootkey : windows_core::PCWSTR, pcszsubkey : windows_core::PCWSTR, pcszvaluename : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - RegSaveRestoreW(hwnd.param().abi(), psztitlestring.param().abi(), hkbckupkey.param().abi(), pcszrootkey.param().abi(), pcszsubkey.param().abi(), pcszvaluename.param().abi(), core::mem::transmute(dwflags)).ok() + RegSaveRestoreW(core::mem::transmute(hwnd), psztitlestring.param().abi(), core::mem::transmute(hkbckupkey), pcszrootkey.param().abi(), pcszsubkey.param().abi(), pcszvaluename.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn ReplacePartitionUnit(targetpartition: P0, sparepartition: P1, flags: u32) -> super::super::Foundation::BOOL @@ -1007,12 +908,9 @@ where ReplacePartitionUnit(targetpartition.param().abi(), sparepartition.param().abi(), core::mem::transmute(flags)) } #[inline] -pub unsafe fn RequestDeviceWakeup(hdevice: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RequestDeviceWakeup(hdevice: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn RequestDeviceWakeup(hdevice : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RequestDeviceWakeup(hdevice.param().abi()) + RequestDeviceWakeup(core::mem::transmute(hdevice)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1135,46 +1033,36 @@ pub unsafe fn RtlUniform(seed: *mut u32) -> u32 { RtlUniform(core::mem::transmute(seed)) } #[inline] -pub unsafe fn RunSetupCommandA(hwnd: P0, szcmdname: P1, szinfsection: P2, szdir: P3, lpsztitle: P4, phexe: *mut super::super::Foundation::HANDLE, dwflags: u32, pvreserved: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn RunSetupCommandA(hwnd: super::super::Foundation::HWND, szcmdname: P1, szinfsection: P2, szdir: P3, lpsztitle: P4, phexe: *mut super::super::Foundation::HANDLE, dwflags: u32, pvreserved: *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RunSetupCommandA(hwnd : super::super::Foundation:: HWND, szcmdname : windows_core::PCSTR, szinfsection : windows_core::PCSTR, szdir : windows_core::PCSTR, lpsztitle : windows_core::PCSTR, phexe : *mut super::super::Foundation:: HANDLE, dwflags : u32, pvreserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - RunSetupCommandA(hwnd.param().abi(), szcmdname.param().abi(), szinfsection.param().abi(), szdir.param().abi(), lpsztitle.param().abi(), core::mem::transmute(phexe), core::mem::transmute(dwflags), core::mem::transmute(pvreserved)).ok() + RunSetupCommandA(core::mem::transmute(hwnd), szcmdname.param().abi(), szinfsection.param().abi(), szdir.param().abi(), lpsztitle.param().abi(), core::mem::transmute(phexe), core::mem::transmute(dwflags), core::mem::transmute(pvreserved)).ok() } #[inline] -pub unsafe fn RunSetupCommandW(hwnd: P0, szcmdname: P1, szinfsection: P2, szdir: P3, lpsztitle: P4, phexe: *mut super::super::Foundation::HANDLE, dwflags: u32, pvreserved: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn RunSetupCommandW(hwnd: super::super::Foundation::HWND, szcmdname: P1, szinfsection: P2, szdir: P3, lpsztitle: P4, phexe: *mut super::super::Foundation::HANDLE, dwflags: u32, pvreserved: *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn RunSetupCommandW(hwnd : super::super::Foundation:: HWND, szcmdname : windows_core::PCWSTR, szinfsection : windows_core::PCWSTR, szdir : windows_core::PCWSTR, lpsztitle : windows_core::PCWSTR, phexe : *mut super::super::Foundation:: HANDLE, dwflags : u32, pvreserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - RunSetupCommandW(hwnd.param().abi(), szcmdname.param().abi(), szinfsection.param().abi(), szdir.param().abi(), lpsztitle.param().abi(), core::mem::transmute(phexe), core::mem::transmute(dwflags), core::mem::transmute(pvreserved)).ok() + RunSetupCommandW(core::mem::transmute(hwnd), szcmdname.param().abi(), szinfsection.param().abi(), szdir.param().abi(), lpsztitle.param().abi(), core::mem::transmute(phexe), core::mem::transmute(dwflags), core::mem::transmute(pvreserved)).ok() } #[inline] -pub unsafe fn SendIMEMessageExA(param0: P0, param1: P1) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SendIMEMessageExA(param0: super::super::Foundation::HWND, param1: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn SendIMEMessageExA(param0 : super::super::Foundation:: HWND, param1 : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SendIMEMessageExA(param0.param().abi(), param1.param().abi()) + SendIMEMessageExA(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] -pub unsafe fn SendIMEMessageExW(param0: P0, param1: P1) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SendIMEMessageExW(param0: super::super::Foundation::HWND, param1: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn SendIMEMessageExW(param0 : super::super::Foundation:: HWND, param1 : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SendIMEMessageExW(param0.param().abi(), param1.param().abi()) + SendIMEMessageExW(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] pub unsafe fn SetEnvironmentStringsA(newenvironment: P0) -> super::super::Foundation::BOOL @@ -1191,7 +1079,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(core::ptr::null())), core::mem::transmute(nsize)).ok() + SetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 +1088,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(core::ptr::null())), core::mem::transmute(nsize), core::mem::transmute(dwattributes)).ok() + SetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize), core::mem::transmute(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 +1097,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(core::ptr::null())), core::mem::transmute(nsize), core::mem::transmute(dwattributes)).ok() + SetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize), core::mem::transmute(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 +1106,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(core::ptr::null())), core::mem::transmute(nsize)).ok() + SetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed())), core::mem::transmute(nsize)).ok() } #[inline] pub unsafe fn SetHandleCount(unumber: u32) -> u32 { @@ -1226,12 +1114,9 @@ pub unsafe fn SetHandleCount(unumber: u32) -> u32 { SetHandleCount(core::mem::transmute(unumber)) } #[inline] -pub unsafe fn SetMessageWaitingIndicator(hmsgindicator: P0, ulmsgcount: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetMessageWaitingIndicator(hmsgindicator: super::super::Foundation::HANDLE, ulmsgcount: u32) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn SetMessageWaitingIndicator(hmsgindicator : super::super::Foundation:: HANDLE, ulmsgcount : u32) -> super::super::Foundation:: BOOL); - SetMessageWaitingIndicator(hmsgindicator.param().abi(), core::mem::transmute(ulmsgcount)) + SetMessageWaitingIndicator(core::mem::transmute(hmsgindicator), core::mem::transmute(ulmsgcount)) } #[inline] pub unsafe fn SetPerUserSecValuesA(pperuser: *mut PERUSERSECTIONA) -> windows_core::Result<()> { @@ -1246,7 +1131,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(core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::ptr::null()))) + SubscribeFeatureStateChangeNotification(core::mem::transmute(subscription), core::mem::transmute(callback), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[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 +1142,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()), core::mem::transmute(pdwrequiredsize), core::mem::transmute(pvreserved.unwrap_or(core::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()), core::mem::transmute(pdwrequiredsize), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn TranslateInfStringExA(hinf: *mut core::ffi::c_void, pszinffilename: P1, psztranslatesection: P2, psztranslatekey: P3, pszbuffer: &mut [u8], pdwrequiredsize: *mut u32, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1267,7 +1152,7 @@ where P3: 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(core::mem::transmute(hinf), pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), core::mem::transmute(pdwrequiredsize), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() + TranslateInfStringExA(core::mem::transmute(hinf), pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), core::mem::transmute(pdwrequiredsize), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn TranslateInfStringExW(hinf: *mut core::ffi::c_void, pszinffilename: P1, psztranslatesection: P2, psztranslatekey: P3, pszbuffer: &mut [u16], pdwrequiredsize: *mut u32, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1277,7 +1162,7 @@ where P3: 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(core::mem::transmute(hinf), pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), core::mem::transmute(pdwrequiredsize), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() + TranslateInfStringExW(core::mem::transmute(hinf), pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), core::mem::transmute(pdwrequiredsize), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).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,122 +1173,88 @@ 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()), core::mem::transmute(pdwrequiredsize), core::mem::transmute(pvreserved.unwrap_or(core::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()), core::mem::transmute(pdwrequiredsize), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn UnsubscribeFeatureStateChangeNotification(subscription: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn UnsubscribeFeatureStateChangeNotification(subscription: FEATURE_STATE_CHANGE_SUBSCRIPTION) { windows_targets::link!("api-ms-win-core-featurestaging-l1-1-0.dll" "system" fn UnsubscribeFeatureStateChangeNotification(subscription : FEATURE_STATE_CHANGE_SUBSCRIPTION)); - UnsubscribeFeatureStateChangeNotification(subscription.param().abi()) + UnsubscribeFeatureStateChangeNotification(core::mem::transmute(subscription)) } #[inline] -pub unsafe fn UserInstStubWrapperA(hwnd: P0, hinstance: P1, pszparms: P2, nshow: i32) -> windows_core::Result<()> +pub unsafe fn UserInstStubWrapperA(hwnd: super::super::Foundation::HWND, hinstance: super::super::Foundation::HINSTANCE, pszparms: P2, nshow: i32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn UserInstStubWrapperA(hwnd : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszparms : windows_core::PCSTR, nshow : i32) -> windows_core::HRESULT); - UserInstStubWrapperA(hwnd.param().abi(), hinstance.param().abi(), pszparms.param().abi(), core::mem::transmute(nshow)).ok() + UserInstStubWrapperA(core::mem::transmute(hwnd), core::mem::transmute(hinstance), pszparms.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn UserInstStubWrapperW(hwnd: P0, hinstance: P1, pszparms: P2, nshow: i32) -> windows_core::Result<()> +pub unsafe fn UserInstStubWrapperW(hwnd: super::super::Foundation::HWND, hinstance: super::super::Foundation::HINSTANCE, pszparms: P2, nshow: i32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn UserInstStubWrapperW(hwnd : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszparms : windows_core::PCWSTR, nshow : i32) -> windows_core::HRESULT); - UserInstStubWrapperW(hwnd.param().abi(), hinstance.param().abi(), pszparms.param().abi(), core::mem::transmute(nshow)).ok() + UserInstStubWrapperW(core::mem::transmute(hwnd), core::mem::transmute(hinstance), pszparms.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn UserUnInstStubWrapperA(hwnd: P0, hinstance: P1, pszparms: P2, nshow: i32) -> windows_core::Result<()> +pub unsafe fn UserUnInstStubWrapperA(hwnd: super::super::Foundation::HWND, hinstance: super::super::Foundation::HINSTANCE, pszparms: P2, nshow: i32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn UserUnInstStubWrapperA(hwnd : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszparms : windows_core::PCSTR, nshow : i32) -> windows_core::HRESULT); - UserUnInstStubWrapperA(hwnd.param().abi(), hinstance.param().abi(), pszparms.param().abi(), core::mem::transmute(nshow)).ok() + UserUnInstStubWrapperA(core::mem::transmute(hwnd), core::mem::transmute(hinstance), pszparms.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn UserUnInstStubWrapperW(hwnd: P0, hinstance: P1, pszparms: P2, nshow: i32) -> windows_core::Result<()> +pub unsafe fn UserUnInstStubWrapperW(hwnd: super::super::Foundation::HWND, hinstance: super::super::Foundation::HINSTANCE, pszparms: P2, nshow: i32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn UserUnInstStubWrapperW(hwnd : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszparms : windows_core::PCWSTR, nshow : i32) -> windows_core::HRESULT); - UserUnInstStubWrapperW(hwnd.param().abi(), hinstance.param().abi(), pszparms.param().abi(), core::mem::transmute(nshow)).ok() + UserUnInstStubWrapperW(core::mem::transmute(hwnd), core::mem::transmute(hinstance), pszparms.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn WINNLSEnableIME(param0: P0, param1: P1) -> super::super::Foundation::BOOL +pub unsafe fn WINNLSEnableIME(param0: super::super::Foundation::HWND, param1: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn WINNLSEnableIME(param0 : super::super::Foundation:: HWND, param1 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WINNLSEnableIME(param0.param().abi(), param1.param().abi()) + WINNLSEnableIME(core::mem::transmute(param0), param1.param().abi()) } #[inline] -pub unsafe fn WINNLSGetEnableStatus(param0: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn WINNLSGetEnableStatus(param0: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn WINNLSGetEnableStatus(param0 : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - WINNLSGetEnableStatus(param0.param().abi()) + WINNLSGetEnableStatus(core::mem::transmute(param0)) } #[inline] -pub unsafe fn WINNLSGetIMEHotkey(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WINNLSGetIMEHotkey(param0: super::super::Foundation::HWND) -> u32 { windows_targets::link!("user32.dll" "system" fn WINNLSGetIMEHotkey(param0 : super::super::Foundation:: HWND) -> u32); - WINNLSGetIMEHotkey(param0.param().abi()) + WINNLSGetIMEHotkey(core::mem::transmute(param0)) } #[inline] -pub unsafe fn WinWatchClose(hww: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn WinWatchClose(hww: HWINWATCH) { windows_targets::link!("dciman32.dll" "system" fn WinWatchClose(hww : HWINWATCH)); - WinWatchClose(hww.param().abi()) + WinWatchClose(core::mem::transmute(hww)) } #[inline] -pub unsafe fn WinWatchDidStatusChange(hww: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn WinWatchDidStatusChange(hww: HWINWATCH) -> super::super::Foundation::BOOL { windows_targets::link!("dciman32.dll" "system" fn WinWatchDidStatusChange(hww : HWINWATCH) -> super::super::Foundation:: BOOL); - WinWatchDidStatusChange(hww.param().abi()) + WinWatchDidStatusChange(core::mem::transmute(hww)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn WinWatchGetClipList(hww: P0, prc: *mut super::super::Foundation::RECT, size: u32, prd: *mut super::super::Graphics::Gdi::RGNDATA) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WinWatchGetClipList(hww: HWINWATCH, prc: *mut super::super::Foundation::RECT, size: u32, prd: *mut super::super::Graphics::Gdi::RGNDATA) -> u32 { windows_targets::link!("dciman32.dll" "system" fn WinWatchGetClipList(hww : HWINWATCH, prc : *mut super::super::Foundation:: RECT, size : u32, prd : *mut super::super::Graphics::Gdi:: RGNDATA) -> u32); - WinWatchGetClipList(hww.param().abi(), core::mem::transmute(prc), core::mem::transmute(size), core::mem::transmute(prd)) + WinWatchGetClipList(core::mem::transmute(hww), core::mem::transmute(prc), core::mem::transmute(size), core::mem::transmute(prd)) } #[inline] -pub unsafe fn WinWatchNotify(hww: P0, notifycallback: WINWATCHNOTIFYPROC, notifyparam: P2) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn WinWatchNotify(hww: HWINWATCH, notifycallback: WINWATCHNOTIFYPROC, notifyparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("dciman32.dll" "system" fn WinWatchNotify(hww : HWINWATCH, notifycallback : WINWATCHNOTIFYPROC, notifyparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - WinWatchNotify(hww.param().abi(), core::mem::transmute(notifycallback), notifyparam.param().abi()) + WinWatchNotify(core::mem::transmute(hww), core::mem::transmute(notifycallback), core::mem::transmute(notifyparam)) } #[inline] -pub unsafe fn WinWatchOpen(hwnd: P0) -> HWINWATCH -where - P0: windows_core::Param, -{ +pub unsafe fn WinWatchOpen(hwnd: super::super::Foundation::HWND) -> HWINWATCH { windows_targets::link!("dciman32.dll" "system" fn WinWatchOpen(hwnd : super::super::Foundation:: HWND) -> HWINWATCH); - WinWatchOpen(hwnd.param().abi()) + WinWatchOpen(core::mem::transmute(hwnd)) } #[inline] pub unsafe fn WldpCanExecuteBuffer(host: *const windows_core::GUID, options: WLDP_EXECUTION_EVALUATION_OPTIONS, buffer: &[u8], auditinfo: P4) -> windows_core::Result @@ -1415,14 +1266,13 @@ where WldpCanExecuteBuffer(core::mem::transmute(host), core::mem::transmute(options), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), auditinfo.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WldpCanExecuteFile(host: *const windows_core::GUID, options: WLDP_EXECUTION_EVALUATION_OPTIONS, filehandle: P2, auditinfo: P3) -> windows_core::Result +pub unsafe fn WldpCanExecuteFile(host: *const windows_core::GUID, options: WLDP_EXECUTION_EVALUATION_OPTIONS, filehandle: super::super::Foundation::HANDLE, auditinfo: P3) -> windows_core::Result where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wldp.dll" "system" fn WldpCanExecuteFile(host : *const windows_core::GUID, options : WLDP_EXECUTION_EVALUATION_OPTIONS, filehandle : super::super::Foundation:: HANDLE, auditinfo : windows_core::PCWSTR, result : *mut WLDP_EXECUTION_POLICY) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WldpCanExecuteFile(core::mem::transmute(host), core::mem::transmute(options), filehandle.param().abi(), auditinfo.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WldpCanExecuteFile(core::mem::transmute(host), core::mem::transmute(options), core::mem::transmute(filehandle), auditinfo.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1438,7 +1288,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(core::ptr::null())), core::mem::transmute(lockdownstate), core::mem::transmute(lockdownflags)).ok() + WldpGetLockdownPolicy(core::mem::transmute(hostinformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lockdownstate), core::mem::transmute(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<()> { @@ -1457,20 +1307,14 @@ pub unsafe fn WldpQueryDeviceSecurityInformation(information: Option<&mut [WLDP_ WldpQueryDeviceSecurityInformation(core::mem::transmute(information.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), information.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(returnlength)).ok() } #[inline] -pub unsafe fn WldpQueryDynamicCodeTrust(filehandle: P0, baseimage: Option<*const core::ffi::c_void>, imagesize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WldpQueryDynamicCodeTrust(filehandle: Option, baseimage: Option<*const core::ffi::c_void>, imagesize: u32) -> windows_core::Result<()> { 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(core::ptr::null())), core::mem::transmute(imagesize)).ok() + WldpQueryDynamicCodeTrust(core::mem::transmute(filehandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(baseimage.unwrap_or(core::mem::zeroed())), core::mem::transmute(imagesize)).ok() } #[inline] -pub unsafe fn WldpSetDynamicCodeTrust(filehandle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WldpSetDynamicCodeTrust(filehandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("wldp.dll" "system" fn WldpSetDynamicCodeTrust(filehandle : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - WldpSetDynamicCodeTrust(filehandle.param().abi()).ok() + WldpSetDynamicCodeTrust(core::mem::transmute(filehandle)).ok() } #[inline] pub unsafe fn WritePrivateProfileSectionA(lpappname: P0, lpstring: P1, lpfilename: P2) -> windows_core::Result<()> @@ -1522,7 +1366,7 @@ where P4: 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(core::ptr::null())), core::mem::transmute(usizestruct), szfile.param().abi()).ok() + WritePrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::mem::zeroed())), core::mem::transmute(usizestruct), szfile.param().abi()).ok() } #[inline] pub unsafe fn WritePrivateProfileStructW(lpszsection: P0, lpszkey: P1, lpstruct: Option<*const core::ffi::c_void>, usizestruct: u32, szfile: P4) -> windows_core::Result<()> @@ -1532,7 +1376,7 @@ where P4: 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(core::ptr::null())), core::mem::transmute(usizestruct), szfile.param().abi()).ok() + WritePrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::mem::zeroed())), core::mem::transmute(usizestruct), szfile.param().abi()).ok() } #[inline] pub unsafe fn WriteProfileSectionA(lpappname: P0, lpstring: P1) -> windows_core::Result<()> @@ -2481,7 +2325,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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetActiveItem)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstractiveitempath.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetSelectedItems(&self) -> windows_core::Result<*mut super::Com::SAFEARRAY> { @@ -2813,11 +2657,8 @@ windows_core::imp::define_interface!(IEditionUpgradeBroker, IEditionUpgradeBroke windows_core::imp::interface_hierarchy!(IEditionUpgradeBroker, windows_core::IUnknown); impl IEditionUpgradeBroker { #[cfg(feature = "Win32_System_Ole")] - pub unsafe fn InitializeParentWindow(&self, parenthandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeParentWindow)(windows_core::Interface::as_raw(self), parenthandle.param().abi()).ok() + pub unsafe fn InitializeParentWindow(&self, parenthandle: super::Ole::OLE_HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeParentWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(parenthandle)).ok() } pub unsafe fn UpdateOperatingSystem(&self, parameter: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpdateOperatingSystem)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(parameter)).ok() 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 6d6f57913a..f577262c75 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs @@ -4923,22 +4923,20 @@ impl ISyncProviderConfigUI { (windows_core::Interface::vtable(self).GetRegisteredProperties)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] - pub unsafe fn CreateAndRegisterNewSyncProvider(&self, hwndparent: P0, punkcontext: P1) -> windows_core::Result + pub unsafe fn CreateAndRegisterNewSyncProvider(&self, hwndparent: Option, punkcontext: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateAndRegisterNewSyncProvider)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), punkcontext.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateAndRegisterNewSyncProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), punkcontext.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] - pub unsafe fn ModifySyncProvider(&self, hwndparent: P0, punkcontext: P1, pproviderinfo: P2) -> windows_core::Result<()> + pub unsafe fn ModifySyncProvider(&self, hwndparent: Option, punkcontext: P1, pproviderinfo: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ModifySyncProvider)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), punkcontext.param().abi(), pproviderinfo.param().abi()).ok() + (windows_core::Interface::vtable(self).ModifySyncProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), punkcontext.param().abi(), pproviderinfo.param().abi()).ok() } } #[repr(C)] @@ -5130,7 +5128,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(core::ptr::null())), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(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 { @@ -5147,7 +5145,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(core::ptr::null())), core::mem::transmute(dwstateflagstofiltermask), core::mem::transmute(dwstateflagstofilter), core::mem::transmute(refproviderclsid), core::mem::transmute(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::mem::zeroed())), core::mem::transmute(dwstateflagstofiltermask), core::mem::transmute(dwstateflagstofilter), core::mem::transmute(refproviderclsid), core::mem::transmute(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 { @@ -5177,18 +5175,12 @@ impl ISyncProviderRegistration { pub unsafe fn RegisterForEvent(&self, phevent: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RegisterForEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(phevent)).ok() } - pub unsafe fn RevokeEvent(&self, hevent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RevokeEvent)(windows_core::Interface::as_raw(self), hevent.param().abi()).ok() + pub unsafe fn RevokeEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RevokeEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent)).ok() } - pub unsafe fn GetChange(&self, hevent: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetChange(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetChange)(windows_core::Interface::as_raw(self), hevent.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetChange)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] 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 63614fd20d..fae2b3d9f2 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(core::mem::transmute(flags), core::mem::transmute(applicationid.unwrap_or(core::ptr::null())), core::mem::transmute(extendederror.unwrap_or(core::ptr::null_mut())), core::mem::transmute(application)) + MI_Application_InitializeV1(core::mem::transmute(flags), core::mem::transmute(applicationid.unwrap_or(core::mem::zeroed())), core::mem::transmute(extendederror.unwrap_or(core::mem::zeroed())), core::mem::transmute(application)) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -206,11 +206,8 @@ impl ISWbemDateTime { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).YearSpecified)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetYearSpecified(&self, byearspecified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetYearSpecified)(windows_core::Interface::as_raw(self), byearspecified.param().abi()).ok() + pub unsafe fn SetYearSpecified(&self, byearspecified: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetYearSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(byearspecified)).ok() } pub unsafe fn Month(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -223,11 +220,8 @@ impl ISWbemDateTime { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MonthSpecified)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMonthSpecified(&self, bmonthspecified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMonthSpecified)(windows_core::Interface::as_raw(self), bmonthspecified.param().abi()).ok() + pub unsafe fn SetMonthSpecified(&self, bmonthspecified: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMonthSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(bmonthspecified)).ok() } pub unsafe fn Day(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -240,11 +234,8 @@ impl ISWbemDateTime { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DaySpecified)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDaySpecified(&self, bdayspecified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDaySpecified)(windows_core::Interface::as_raw(self), bdayspecified.param().abi()).ok() + pub unsafe fn SetDaySpecified(&self, bdayspecified: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDaySpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(bdayspecified)).ok() } pub unsafe fn Hours(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -257,11 +248,8 @@ impl ISWbemDateTime { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HoursSpecified)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetHoursSpecified(&self, bhoursspecified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHoursSpecified)(windows_core::Interface::as_raw(self), bhoursspecified.param().abi()).ok() + pub unsafe fn SetHoursSpecified(&self, bhoursspecified: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHoursSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(bhoursspecified)).ok() } pub unsafe fn Minutes(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -274,11 +262,8 @@ impl ISWbemDateTime { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MinutesSpecified)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMinutesSpecified(&self, bminutesspecified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMinutesSpecified)(windows_core::Interface::as_raw(self), bminutesspecified.param().abi()).ok() + pub unsafe fn SetMinutesSpecified(&self, bminutesspecified: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMinutesSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(bminutesspecified)).ok() } pub unsafe fn Seconds(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -291,11 +276,8 @@ impl ISWbemDateTime { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SecondsSpecified)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSecondsSpecified(&self, bsecondsspecified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSecondsSpecified)(windows_core::Interface::as_raw(self), bsecondsspecified.param().abi()).ok() + pub unsafe fn SetSecondsSpecified(&self, bsecondsspecified: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSecondsSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(bsecondsspecified)).ok() } pub unsafe fn Microseconds(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -308,11 +290,8 @@ impl ISWbemDateTime { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MicrosecondsSpecified)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMicrosecondsSpecified(&self, bmicrosecondsspecified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMicrosecondsSpecified)(windows_core::Interface::as_raw(self), bmicrosecondsspecified.param().abi()).ok() + pub unsafe fn SetMicrosecondsSpecified(&self, bmicrosecondsspecified: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMicrosecondsSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(bmicrosecondsspecified)).ok() } pub unsafe fn UTC(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -325,47 +304,29 @@ impl ISWbemDateTime { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UTCSpecified)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUTCSpecified(&self, butcspecified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUTCSpecified)(windows_core::Interface::as_raw(self), butcspecified.param().abi()).ok() + pub unsafe fn SetUTCSpecified(&self, butcspecified: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUTCSpecified)(windows_core::Interface::as_raw(self), core::mem::transmute(butcspecified)).ok() } pub unsafe fn IsInterval(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsInterval)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsInterval(&self, bisinterval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsInterval)(windows_core::Interface::as_raw(self), bisinterval.param().abi()).ok() + pub unsafe fn SetIsInterval(&self, bisinterval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsInterval)(windows_core::Interface::as_raw(self), core::mem::transmute(bisinterval)).ok() } - pub unsafe fn GetVarDate(&self, bislocal: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetVarDate(&self, bislocal: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVarDate)(windows_core::Interface::as_raw(self), bislocal.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVarDate)(windows_core::Interface::as_raw(self), core::mem::transmute(bislocal), &mut result__).map(|| result__) } - pub unsafe fn SetVarDate(&self, dvardate: f64, bislocal: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVarDate)(windows_core::Interface::as_raw(self), core::mem::transmute(dvardate), bislocal.param().abi()).ok() + pub unsafe fn SetVarDate(&self, dvardate: f64, bislocal: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVarDate)(windows_core::Interface::as_raw(self), core::mem::transmute(dvardate), core::mem::transmute(bislocal)).ok() } - pub unsafe fn GetFileTime(&self, bislocal: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetFileTime(&self, bislocal: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetFileTime)(windows_core::Interface::as_raw(self), bislocal.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetFileTime)(windows_core::Interface::as_raw(self), core::mem::transmute(bislocal), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetFileTime(&self, strfiletime: &windows_core::BSTR, bislocal: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFileTime)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strfiletime), bislocal.param().abi()).ok() + pub unsafe fn SetFileTime(&self, strfiletime: &windows_core::BSTR, bislocal: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFileTime)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strfiletime), core::mem::transmute(bislocal)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1468,20 +1429,16 @@ impl ISWbemObject { { (windows_core::Interface::vtable(self).SubclassesAsync_)(windows_core::Interface::as_raw(self), objwbemsink.param().abi(), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), objwbemasynccontext.param().abi()).ok() } - pub unsafe fn Associators_(&self, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: P4, bschemaonly: P5, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P9) -> windows_core::Result + pub unsafe fn Associators_(&self, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P9) -> windows_core::Result where - P4: windows_core::Param, - P5: windows_core::Param, P9: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Associators_)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strassocclass), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strresultrole), core::mem::transmute_copy(strrole), bclassesonly.param().abi(), bschemaonly.param().abi(), core::mem::transmute_copy(strrequiredassocqualifier), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Associators_)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strassocclass), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strresultrole), core::mem::transmute_copy(strrole), core::mem::transmute(bclassesonly), core::mem::transmute(bschemaonly), core::mem::transmute_copy(strrequiredassocqualifier), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn AssociatorsAsync_(&self, objwbemsink: P0, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: P5, bschemaonly: P6, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P10, objwbemasynccontext: P11) -> windows_core::Result<()> + pub unsafe fn AssociatorsAsync_(&self, objwbemsink: P0, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P10, objwbemasynccontext: P11) -> windows_core::Result<()> where P0: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, P10: windows_core::Param, P11: windows_core::Param, { @@ -1492,8 +1449,8 @@ impl ISWbemObject { core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strresultrole), core::mem::transmute_copy(strrole), - bclassesonly.param().abi(), - bschemaonly.param().abi(), + core::mem::transmute(bclassesonly), + core::mem::transmute(bschemaonly), core::mem::transmute_copy(strrequiredassocqualifier), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), @@ -1502,24 +1459,20 @@ impl ISWbemObject { ) .ok() } - pub unsafe fn References_(&self, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: P2, bschemaonly: P3, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P6) -> windows_core::Result + pub unsafe fn References_(&self, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P6) -> windows_core::Result where - P2: windows_core::Param, - P3: windows_core::Param, P6: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).References_)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strrole), bclassesonly.param().abi(), bschemaonly.param().abi(), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).References_)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strrole), core::mem::transmute(bclassesonly), core::mem::transmute(bschemaonly), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ReferencesAsync_(&self, objwbemsink: P0, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: P3, bschemaonly: P4, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P7, objwbemasynccontext: P8) -> windows_core::Result<()> + pub unsafe fn ReferencesAsync_(&self, objwbemsink: P0, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P7, objwbemasynccontext: P8) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, P7: windows_core::Param, P8: windows_core::Param, { - (windows_core::Interface::vtable(self).ReferencesAsync_)(windows_core::Interface::as_raw(self), objwbemsink.param().abi(), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strrole), bclassesonly.param().abi(), bschemaonly.param().abi(), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), objwbemasynccontext.param().abi()).ok() + (windows_core::Interface::vtable(self).ReferencesAsync_)(windows_core::Interface::as_raw(self), objwbemsink.param().abi(), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strrole), core::mem::transmute(bclassesonly), core::mem::transmute(bschemaonly), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), objwbemasynccontext.param().abi()).ok() } pub unsafe fn ExecMethod_(&self, strmethodname: &windows_core::BSTR, objwbeminparameters: P1, iflags: i32, objwbemnamedvalueset: P3) -> windows_core::Result where @@ -2494,11 +2447,8 @@ impl ISWbemPrivilege { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsEnabled(&self, bisenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsEnabled)(windows_core::Interface::as_raw(self), bisenabled.param().abi()).ok() + pub unsafe fn SetIsEnabled(&self, bisenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(bisenabled)).ok() } pub unsafe fn Name(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2618,12 +2568,9 @@ impl ISWbemPrivilegeSet { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Add(&self, iprivilege: WbemPrivilegeEnum, bisenabled: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn Add(&self, iprivilege: WbemPrivilegeEnum, bisenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute(iprivilege), bisenabled.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute(iprivilege), core::mem::transmute(bisenabled), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Remove(&self, iprivilege: WbemPrivilegeEnum) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute(iprivilege)).ok() @@ -2631,12 +2578,9 @@ impl ISWbemPrivilegeSet { pub unsafe fn DeleteAll(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteAll)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn AddAsString(&self, strprivilege: &windows_core::BSTR, bisenabled: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn AddAsString(&self, strprivilege: &windows_core::BSTR, bisenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddAsString)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strprivilege), bisenabled.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).AddAsString)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strprivilege), core::mem::transmute(bisenabled), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[cfg(feature = "Win32_System_Com")] @@ -2936,12 +2880,9 @@ impl ISWbemPropertySet { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Add(&self, strname: &windows_core::BSTR, icimtype: WbemCimtypeEnum, bisarray: P2, iflags: i32) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn Add(&self, strname: &windows_core::BSTR, icimtype: WbemCimtypeEnum, bisarray: super::super::Foundation::VARIANT_BOOL, iflags: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), core::mem::transmute(icimtype), bisarray.param().abi(), core::mem::transmute(iflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), core::mem::transmute(icimtype), core::mem::transmute(bisarray), core::mem::transmute(iflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Remove(&self, strname: &windows_core::BSTR, iflags: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), core::mem::transmute(iflags)).ok() @@ -3061,31 +3002,22 @@ impl ISWbemQualifier { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).PropagatesToSubclass)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPropagatesToSubclass(&self, bpropagatestosubclass: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPropagatesToSubclass)(windows_core::Interface::as_raw(self), bpropagatestosubclass.param().abi()).ok() + pub unsafe fn SetPropagatesToSubclass(&self, bpropagatestosubclass: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPropagatesToSubclass)(windows_core::Interface::as_raw(self), core::mem::transmute(bpropagatestosubclass)).ok() } pub unsafe fn PropagatesToInstance(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).PropagatesToInstance)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPropagatesToInstance(&self, bpropagatestoinstance: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPropagatesToInstance)(windows_core::Interface::as_raw(self), bpropagatestoinstance.param().abi()).ok() + pub unsafe fn SetPropagatesToInstance(&self, bpropagatestoinstance: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPropagatesToInstance)(windows_core::Interface::as_raw(self), core::mem::transmute(bpropagatestoinstance)).ok() } pub unsafe fn IsOverridable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsOverridable)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsOverridable(&self, bisoverridable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsOverridable)(windows_core::Interface::as_raw(self), bisoverridable.param().abi()).ok() + pub unsafe fn SetIsOverridable(&self, bisoverridable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsOverridable)(windows_core::Interface::as_raw(self), core::mem::transmute(bisoverridable)).ok() } pub unsafe fn IsAmended(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3264,14 +3196,9 @@ impl ISWbemQualifierSet { (windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn Add(&self, strname: &windows_core::BSTR, varval: *const super::Variant::VARIANT, bpropagatestosubclass: P2, bpropagatestoinstance: P3, bisoverridable: P4, iflags: i32) -> windows_core::Result - where - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, - { + pub unsafe fn Add(&self, strname: &windows_core::BSTR, varval: *const super::Variant::VARIANT, bpropagatestosubclass: super::super::Foundation::VARIANT_BOOL, bpropagatestoinstance: super::super::Foundation::VARIANT_BOOL, bisoverridable: super::super::Foundation::VARIANT_BOOL, iflags: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), core::mem::transmute(varval), bpropagatestosubclass.param().abi(), bpropagatestoinstance.param().abi(), bisoverridable.param().abi(), core::mem::transmute(iflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), core::mem::transmute(varval), core::mem::transmute(bpropagatestosubclass), core::mem::transmute(bpropagatestoinstance), core::mem::transmute(bisoverridable), core::mem::transmute(iflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Remove(&self, strname: &windows_core::BSTR, iflags: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strname), core::mem::transmute(iflags)).ok() @@ -3541,11 +3468,8 @@ impl ISWbemRefresher { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoReconnect)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoReconnect(&self, bcount: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoReconnect)(windows_core::Interface::as_raw(self), bcount.param().abi()).ok() + pub unsafe fn SetAutoReconnect(&self, bcount: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoReconnect)(windows_core::Interface::as_raw(self), core::mem::transmute(bcount)).ok() } pub unsafe fn DeleteAll(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteAll)(windows_core::Interface::as_raw(self)).ok() @@ -3871,10 +3795,8 @@ impl ISWbemServices { { (windows_core::Interface::vtable(self).ExecQueryAsync)(windows_core::Interface::as_raw(self), objwbemsink.param().abi(), core::mem::transmute_copy(strquery), core::mem::transmute_copy(strquerylanguage), core::mem::transmute(lflags), objwbemnamedvalueset.param().abi(), objwbemasynccontext.param().abi()).ok() } - pub unsafe fn AssociatorsOf(&self, strobjectpath: &windows_core::BSTR, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: P5, bschemaonly: P6, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P10) -> windows_core::Result + pub unsafe fn AssociatorsOf(&self, strobjectpath: &windows_core::BSTR, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P10) -> windows_core::Result where - P5: windows_core::Param, - P6: windows_core::Param, P10: windows_core::Param, { let mut result__ = core::mem::zeroed(); @@ -3885,8 +3807,8 @@ impl ISWbemServices { core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strresultrole), core::mem::transmute_copy(strrole), - bclassesonly.param().abi(), - bschemaonly.param().abi(), + core::mem::transmute(bclassesonly), + core::mem::transmute(bschemaonly), core::mem::transmute_copy(strrequiredassocqualifier), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), @@ -3895,11 +3817,9 @@ impl ISWbemServices { ) .and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn AssociatorsOfAsync(&self, objwbemsink: P0, strobjectpath: &windows_core::BSTR, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: P6, bschemaonly: P7, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P11, objwbemasynccontext: P12) -> windows_core::Result<()> + pub unsafe fn AssociatorsOfAsync(&self, objwbemsink: P0, strobjectpath: &windows_core::BSTR, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P11, objwbemasynccontext: P12) -> windows_core::Result<()> where P0: windows_core::Param, - P6: windows_core::Param, - P7: windows_core::Param, P11: windows_core::Param, P12: windows_core::Param, { @@ -3911,8 +3831,8 @@ impl ISWbemServices { core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strresultrole), core::mem::transmute_copy(strrole), - bclassesonly.param().abi(), - bschemaonly.param().abi(), + core::mem::transmute(bclassesonly), + core::mem::transmute(bschemaonly), core::mem::transmute_copy(strrequiredassocqualifier), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), @@ -3921,24 +3841,20 @@ impl ISWbemServices { ) .ok() } - pub unsafe fn ReferencesTo(&self, strobjectpath: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: P3, bschemaonly: P4, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P7) -> windows_core::Result + pub unsafe fn ReferencesTo(&self, strobjectpath: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P7) -> windows_core::Result where - P3: windows_core::Param, - P4: windows_core::Param, P7: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ReferencesTo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strrole), bclassesonly.param().abi(), bschemaonly.param().abi(), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ReferencesTo)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strrole), core::mem::transmute(bclassesonly), core::mem::transmute(bschemaonly), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ReferencesToAsync(&self, objwbemsink: P0, strobjectpath: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: P4, bschemaonly: P5, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P8, objwbemasynccontext: P9) -> windows_core::Result<()> + pub unsafe fn ReferencesToAsync(&self, objwbemsink: P0, strobjectpath: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P8, objwbemasynccontext: P9) -> windows_core::Result<()> where P0: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P8: windows_core::Param, P9: windows_core::Param, { - (windows_core::Interface::vtable(self).ReferencesToAsync)(windows_core::Interface::as_raw(self), objwbemsink.param().abi(), core::mem::transmute_copy(strobjectpath), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strrole), bclassesonly.param().abi(), bschemaonly.param().abi(), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), objwbemasynccontext.param().abi()).ok() + (windows_core::Interface::vtable(self).ReferencesToAsync)(windows_core::Interface::as_raw(self), objwbemsink.param().abi(), core::mem::transmute_copy(strobjectpath), core::mem::transmute_copy(strresultclass), core::mem::transmute_copy(strrole), core::mem::transmute(bclassesonly), core::mem::transmute(bschemaonly), core::mem::transmute_copy(strrequiredqualifier), core::mem::transmute(iflags), objwbemnamedvalueset.param().abi(), objwbemasynccontext.param().abi()).ok() } pub unsafe fn ExecNotificationQuery(&self, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: P3) -> windows_core::Result where @@ -4682,7 +4598,7 @@ impl IWbemClassObject { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), wszname.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), wszname.param().abi(), core::mem::transmute(lflags), core::mem::transmute(pval), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), core::mem::transmute(plflavor.unwrap_or(core::mem::zeroed()))).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<()> @@ -6604,8 +6520,8 @@ impl IWbemPath { { (windows_core::Interface::vtable(self).SetClassName)(windows_core::Interface::as_raw(self), name.param().abi()).ok() } - pub unsafe fn GetClassName(&self, pubufflength: *mut u32, pszname: windows_core::PWSTR) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetClassName)(windows_core::Interface::as_raw(self), core::mem::transmute(pubufflength), core::mem::transmute(pszname)).ok() + pub unsafe fn GetClassName(&self, pubufflength: *mut u32, pszname: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetClassName)(windows_core::Interface::as_raw(self), core::mem::transmute(pubufflength), core::mem::transmute(pszname.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetKeyList(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6890,12 +6806,12 @@ impl IWbemPathKeyList { { (windows_core::Interface::vtable(self).SetKey2)(windows_core::Interface::as_raw(self), wszname.param().abi(), core::mem::transmute(uflags), core::mem::transmute(ucimtype), core::mem::transmute(pkeyval)).ok() } - pub unsafe fn GetKey(&self, ukeyix: u32, uflags: u32, punamebufsize: *mut u32, pszkeyname: windows_core::PWSTR, pukeyvalbufsize: *mut u32, pkeyval: *mut core::ffi::c_void, puapparentcimtype: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(ukeyix), core::mem::transmute(uflags), core::mem::transmute(punamebufsize), core::mem::transmute(pszkeyname), core::mem::transmute(pukeyvalbufsize), core::mem::transmute(pkeyval), core::mem::transmute(puapparentcimtype)).ok() + pub unsafe fn GetKey(&self, ukeyix: u32, uflags: u32, punamebufsize: *mut u32, pszkeyname: Option, pukeyvalbufsize: *mut u32, pkeyval: *mut core::ffi::c_void, puapparentcimtype: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(ukeyix), core::mem::transmute(uflags), core::mem::transmute(punamebufsize), core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pukeyvalbufsize), core::mem::transmute(pkeyval), core::mem::transmute(puapparentcimtype)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn GetKey2(&self, ukeyix: u32, uflags: u32, punamebufsize: *mut u32, pszkeyname: windows_core::PWSTR, pkeyvalue: *mut super::Variant::VARIANT, puapparentcimtype: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKey2)(windows_core::Interface::as_raw(self), core::mem::transmute(ukeyix), core::mem::transmute(uflags), core::mem::transmute(punamebufsize), core::mem::transmute(pszkeyname), core::mem::transmute(pkeyvalue), core::mem::transmute(puapparentcimtype)).ok() + pub unsafe fn GetKey2(&self, ukeyix: u32, uflags: u32, punamebufsize: *mut u32, pszkeyname: Option, pkeyvalue: *mut super::Variant::VARIANT, puapparentcimtype: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetKey2)(windows_core::Interface::as_raw(self), core::mem::transmute(ukeyix), core::mem::transmute(uflags), core::mem::transmute(punamebufsize), core::mem::transmute(pszkeyname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pkeyvalue), core::mem::transmute(puapparentcimtype)).ok() } pub unsafe fn RemoveKey(&self, wszname: P0, uflags: u32) -> windows_core::Result<()> where @@ -7435,7 +7351,7 @@ impl IWbemServices { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenNamespace)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strnamespace), core::mem::transmute(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() + (windows_core::Interface::vtable(self).OpenNamespace)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strnamespace), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppworkingnamespace.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn CancelAsyncCall(&self, psink: P0) -> windows_core::Result<()> where @@ -7451,7 +7367,7 @@ impl IWbemServices { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetObjectAsync(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -7465,7 +7381,7 @@ impl IWbemServices { P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).PutClass)(windows_core::Interface::as_raw(self), pobject.param().abi(), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).PutClass)(windows_core::Interface::as_raw(self), pobject.param().abi(), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn PutClassAsync(&self, pobject: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -7479,7 +7395,7 @@ impl IWbemServices { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteClass)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strclass), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DeleteClass)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strclass), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn DeleteClassAsync(&self, strclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -7507,7 +7423,7 @@ impl IWbemServices { P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).PutInstance)(windows_core::Interface::as_raw(self), pinst.param().abi(), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).PutInstance)(windows_core::Interface::as_raw(self), pinst.param().abi(), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn PutInstanceAsync(&self, pinst: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -7521,7 +7437,7 @@ impl IWbemServices { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteInstance)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DeleteInstance)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute(lflags), pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn DeleteInstanceAsync(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, presponsehandler: P3) -> windows_core::Result<()> where @@ -7577,7 +7493,7 @@ impl IWbemServices { P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).ExecMethod)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute_copy(strmethodname), core::mem::transmute(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() + (windows_core::Interface::vtable(self).ExecMethod)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strobjectpath), core::mem::transmute_copy(strmethodname), core::mem::transmute(lflags), pctx.param().abi(), pinparams.param().abi(), core::mem::transmute(ppoutparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcallresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn ExecMethodAsync(&self, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P3, pinparams: P4, presponsehandler: P5) -> 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 5e1b431253..89bb8fdbe9 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs @@ -1,19 +1,12 @@ #[inline] -pub unsafe fn AccNotifyTouchInteraction(hwndapp: P0, hwndtarget: P1, pttarget: super::super::Foundation::POINT) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AccNotifyTouchInteraction(hwndapp: super::super::Foundation::HWND, hwndtarget: super::super::Foundation::HWND, pttarget: super::super::Foundation::POINT) -> windows_core::Result<()> { windows_targets::link!("oleacc.dll" "system" fn AccNotifyTouchInteraction(hwndapp : super::super::Foundation:: HWND, hwndtarget : super::super::Foundation:: HWND, pttarget : super::super::Foundation:: POINT) -> windows_core::HRESULT); - AccNotifyTouchInteraction(hwndapp.param().abi(), hwndtarget.param().abi(), core::mem::transmute(pttarget)).ok() + AccNotifyTouchInteraction(core::mem::transmute(hwndapp), core::mem::transmute(hwndtarget), core::mem::transmute(pttarget)).ok() } #[inline] -pub unsafe fn AccSetRunningUtilityState(hwndapp: P0, dwutilitystatemask: u32, dwutilitystate: ACC_UTILITY_STATE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AccSetRunningUtilityState(hwndapp: super::super::Foundation::HWND, dwutilitystatemask: u32, dwutilitystate: ACC_UTILITY_STATE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("oleacc.dll" "system" fn AccSetRunningUtilityState(hwndapp : super::super::Foundation:: HWND, dwutilitystatemask : u32, dwutilitystate : ACC_UTILITY_STATE_FLAGS) -> windows_core::HRESULT); - AccSetRunningUtilityState(hwndapp.param().abi(), core::mem::transmute(dwutilitystatemask), core::mem::transmute(dwutilitystate)).ok() + AccSetRunningUtilityState(core::mem::transmute(hwndapp), core::mem::transmute(dwutilitystatemask), core::mem::transmute(dwutilitystate)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -26,12 +19,9 @@ where } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn AccessibleObjectFromEvent(hwnd: P0, dwid: u32, dwchildid: u32, ppacc: *mut Option, pvarchild: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AccessibleObjectFromEvent(hwnd: super::super::Foundation::HWND, dwid: u32, dwchildid: u32, ppacc: *mut Option, pvarchild: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { windows_targets::link!("oleacc.dll" "system" fn AccessibleObjectFromEvent(hwnd : super::super::Foundation:: HWND, dwid : u32, dwchildid : u32, ppacc : *mut * mut core::ffi::c_void, pvarchild : *mut super::super::System::Variant:: VARIANT) -> windows_core::HRESULT); - AccessibleObjectFromEvent(hwnd.param().abi(), core::mem::transmute(dwid), core::mem::transmute(dwchildid), core::mem::transmute(ppacc), core::mem::transmute(pvarchild)).ok() + AccessibleObjectFromEvent(core::mem::transmute(hwnd), core::mem::transmute(dwid), core::mem::transmute(dwchildid), core::mem::transmute(ppacc), core::mem::transmute(pvarchild)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -40,62 +30,45 @@ pub unsafe fn AccessibleObjectFromPoint(ptscreen: super::super::Foundation::POIN AccessibleObjectFromPoint(core::mem::transmute(ptscreen), core::mem::transmute(ppacc), core::mem::transmute(pvarchild)).ok() } #[inline] -pub unsafe fn AccessibleObjectFromWindow(hwnd: P0, dwid: u32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AccessibleObjectFromWindow(hwnd: super::super::Foundation::HWND, dwid: u32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("oleacc.dll" "system" fn AccessibleObjectFromWindow(hwnd : super::super::Foundation:: HWND, dwid : u32, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - AccessibleObjectFromWindow(hwnd.param().abi(), core::mem::transmute(dwid), core::mem::transmute(riid), core::mem::transmute(ppvobject)).ok() + AccessibleObjectFromWindow(core::mem::transmute(hwnd), core::mem::transmute(dwid), core::mem::transmute(riid), core::mem::transmute(ppvobject)).ok() } #[inline] -pub unsafe fn CreateStdAccessibleObject(hwnd: P0, idobject: i32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CreateStdAccessibleObject(hwnd: super::super::Foundation::HWND, idobject: i32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("oleacc.dll" "system" fn CreateStdAccessibleObject(hwnd : super::super::Foundation:: HWND, idobject : i32, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - CreateStdAccessibleObject(hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(riid), core::mem::transmute(ppvobject)).ok() + CreateStdAccessibleObject(core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(riid), core::mem::transmute(ppvobject)).ok() } #[inline] -pub unsafe fn CreateStdAccessibleProxyA(hwnd: P0, pclassname: P1, idobject: i32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn CreateStdAccessibleProxyA(hwnd: super::super::Foundation::HWND, pclassname: P1, idobject: i32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("oleacc.dll" "system" fn CreateStdAccessibleProxyA(hwnd : super::super::Foundation:: HWND, pclassname : windows_core::PCSTR, idobject : i32, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - CreateStdAccessibleProxyA(hwnd.param().abi(), pclassname.param().abi(), core::mem::transmute(idobject), core::mem::transmute(riid), core::mem::transmute(ppvobject)).ok() + CreateStdAccessibleProxyA(core::mem::transmute(hwnd), pclassname.param().abi(), core::mem::transmute(idobject), core::mem::transmute(riid), core::mem::transmute(ppvobject)).ok() } #[inline] -pub unsafe fn CreateStdAccessibleProxyW(hwnd: P0, pclassname: P1, idobject: i32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn CreateStdAccessibleProxyW(hwnd: super::super::Foundation::HWND, pclassname: P1, idobject: i32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("oleacc.dll" "system" fn CreateStdAccessibleProxyW(hwnd : super::super::Foundation:: HWND, pclassname : windows_core::PCWSTR, idobject : i32, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - CreateStdAccessibleProxyW(hwnd.param().abi(), pclassname.param().abi(), core::mem::transmute(idobject), core::mem::transmute(riid), core::mem::transmute(ppvobject)).ok() + CreateStdAccessibleProxyW(core::mem::transmute(hwnd), pclassname.param().abi(), core::mem::transmute(idobject), core::mem::transmute(riid), core::mem::transmute(ppvobject)).ok() } #[inline] -pub unsafe fn DockPattern_SetDockPosition(hobj: P0, dockposition: DockPosition) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DockPattern_SetDockPosition(hobj: HUIAPATTERNOBJECT, dockposition: DockPosition) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn DockPattern_SetDockPosition(hobj : HUIAPATTERNOBJECT, dockposition : DockPosition) -> windows_core::HRESULT); - DockPattern_SetDockPosition(hobj.param().abi(), core::mem::transmute(dockposition)).ok() + DockPattern_SetDockPosition(core::mem::transmute(hobj), core::mem::transmute(dockposition)).ok() } #[inline] -pub unsafe fn ExpandCollapsePattern_Collapse(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ExpandCollapsePattern_Collapse(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn ExpandCollapsePattern_Collapse(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - ExpandCollapsePattern_Collapse(hobj.param().abi()).ok() + ExpandCollapsePattern_Collapse(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn ExpandCollapsePattern_Expand(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ExpandCollapsePattern_Expand(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn ExpandCollapsePattern_Expand(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - ExpandCollapsePattern_Expand(hobj.param().abi()).ok() + ExpandCollapsePattern_Expand(core::mem::transmute(hobj)).ok() } #[inline] pub unsafe fn GetOleaccVersionInfo(pver: *mut u32, pbuild: *mut u32) { @@ -123,20 +96,14 @@ pub unsafe fn GetStateTextW(lstatebit: u32, lpszstate: Option<&mut [u16]>) -> u3 GetStateTextW(core::mem::transmute(lstatebit), core::mem::transmute(lpszstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszstate.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn GridPattern_GetItem(hobj: P0, row: i32, column: i32, presult: *mut HUIANODE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GridPattern_GetItem(hobj: HUIAPATTERNOBJECT, row: i32, column: i32, presult: *mut HUIANODE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn GridPattern_GetItem(hobj : HUIAPATTERNOBJECT, row : i32, column : i32, presult : *mut HUIANODE) -> windows_core::HRESULT); - GridPattern_GetItem(hobj.param().abi(), core::mem::transmute(row), core::mem::transmute(column), core::mem::transmute(presult)).ok() + GridPattern_GetItem(core::mem::transmute(hobj), core::mem::transmute(row), core::mem::transmute(column), core::mem::transmute(presult)).ok() } #[inline] -pub unsafe fn InvokePattern_Invoke(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn InvokePattern_Invoke(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn InvokePattern_Invoke(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - InvokePattern_Invoke(hobj.param().abi()).ok() + InvokePattern_Invoke(core::mem::transmute(hobj)).ok() } #[inline] pub unsafe fn IsWinEventHookInstalled(event: u32) -> super::super::Foundation::BOOL { @@ -145,436 +112,289 @@ pub unsafe fn IsWinEventHookInstalled(event: u32) -> super::super::Foundation::B } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn ItemContainerPattern_FindItemByProperty(hobj: P0, hnodestartafter: P1, propertyid: i32, value: &super::super::System::Variant::VARIANT, pfound: *mut HUIANODE) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ItemContainerPattern_FindItemByProperty(hobj: HUIAPATTERNOBJECT, hnodestartafter: HUIANODE, propertyid: i32, value: &super::super::System::Variant::VARIANT, pfound: *mut HUIANODE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn ItemContainerPattern_FindItemByProperty(hobj : HUIAPATTERNOBJECT, hnodestartafter : HUIANODE, propertyid : i32, value : super::super::System::Variant:: VARIANT, pfound : *mut HUIANODE) -> windows_core::HRESULT); - ItemContainerPattern_FindItemByProperty(hobj.param().abi(), hnodestartafter.param().abi(), core::mem::transmute(propertyid), core::mem::transmute_copy(value), core::mem::transmute(pfound)).ok() + ItemContainerPattern_FindItemByProperty(core::mem::transmute(hobj), core::mem::transmute(hnodestartafter), core::mem::transmute(propertyid), core::mem::transmute_copy(value), core::mem::transmute(pfound)).ok() } #[inline] -pub unsafe fn LegacyIAccessiblePattern_DoDefaultAction(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LegacyIAccessiblePattern_DoDefaultAction(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn LegacyIAccessiblePattern_DoDefaultAction(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - LegacyIAccessiblePattern_DoDefaultAction(hobj.param().abi()).ok() + LegacyIAccessiblePattern_DoDefaultAction(core::mem::transmute(hobj)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn LegacyIAccessiblePattern_GetIAccessible(hobj: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn LegacyIAccessiblePattern_GetIAccessible(hobj: HUIAPATTERNOBJECT) -> windows_core::Result { windows_targets::link!("uiautomationcore.dll" "system" fn LegacyIAccessiblePattern_GetIAccessible(hobj : HUIAPATTERNOBJECT, paccessible : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - LegacyIAccessiblePattern_GetIAccessible(hobj.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + LegacyIAccessiblePattern_GetIAccessible(core::mem::transmute(hobj), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn LegacyIAccessiblePattern_Select(hobj: P0, flagsselect: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LegacyIAccessiblePattern_Select(hobj: HUIAPATTERNOBJECT, flagsselect: i32) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn LegacyIAccessiblePattern_Select(hobj : HUIAPATTERNOBJECT, flagsselect : i32) -> windows_core::HRESULT); - LegacyIAccessiblePattern_Select(hobj.param().abi(), core::mem::transmute(flagsselect)).ok() + LegacyIAccessiblePattern_Select(core::mem::transmute(hobj), core::mem::transmute(flagsselect)).ok() } #[inline] -pub unsafe fn LegacyIAccessiblePattern_SetValue(hobj: P0, szvalue: P1) -> windows_core::Result<()> +pub unsafe fn LegacyIAccessiblePattern_SetValue(hobj: HUIAPATTERNOBJECT, szvalue: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn LegacyIAccessiblePattern_SetValue(hobj : HUIAPATTERNOBJECT, szvalue : windows_core::PCWSTR) -> windows_core::HRESULT); - LegacyIAccessiblePattern_SetValue(hobj.param().abi(), szvalue.param().abi()).ok() + LegacyIAccessiblePattern_SetValue(core::mem::transmute(hobj), szvalue.param().abi()).ok() } #[inline] -pub unsafe fn LresultFromObject(riid: *const windows_core::GUID, wparam: P1, punk: P2) -> super::super::Foundation::LRESULT +pub unsafe fn LresultFromObject(riid: *const windows_core::GUID, wparam: super::super::Foundation::WPARAM, punk: P2) -> super::super::Foundation::LRESULT where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("oleacc.dll" "system" fn LresultFromObject(riid : *const windows_core::GUID, wparam : super::super::Foundation:: WPARAM, punk : * mut core::ffi::c_void) -> super::super::Foundation:: LRESULT); - LresultFromObject(core::mem::transmute(riid), wparam.param().abi(), punk.param().abi()) + LresultFromObject(core::mem::transmute(riid), core::mem::transmute(wparam), punk.param().abi()) } #[inline] -pub unsafe fn MultipleViewPattern_GetViewName(hobj: P0, viewid: i32, ppstr: *mut windows_core::BSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MultipleViewPattern_GetViewName(hobj: HUIAPATTERNOBJECT, viewid: i32, ppstr: *mut windows_core::BSTR) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn MultipleViewPattern_GetViewName(hobj : HUIAPATTERNOBJECT, viewid : i32, ppstr : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - MultipleViewPattern_GetViewName(hobj.param().abi(), core::mem::transmute(viewid), core::mem::transmute(ppstr)).ok() + MultipleViewPattern_GetViewName(core::mem::transmute(hobj), core::mem::transmute(viewid), core::mem::transmute(ppstr)).ok() } #[inline] -pub unsafe fn MultipleViewPattern_SetCurrentView(hobj: P0, viewid: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MultipleViewPattern_SetCurrentView(hobj: HUIAPATTERNOBJECT, viewid: i32) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn MultipleViewPattern_SetCurrentView(hobj : HUIAPATTERNOBJECT, viewid : i32) -> windows_core::HRESULT); - MultipleViewPattern_SetCurrentView(hobj.param().abi(), core::mem::transmute(viewid)).ok() + MultipleViewPattern_SetCurrentView(core::mem::transmute(hobj), core::mem::transmute(viewid)).ok() } #[inline] -pub unsafe fn NotifyWinEvent(event: u32, hwnd: P1, idobject: i32, idchild: i32) -where - P1: windows_core::Param, -{ +pub unsafe fn NotifyWinEvent(event: u32, hwnd: super::super::Foundation::HWND, idobject: i32, idchild: i32) { windows_targets::link!("user32.dll" "system" fn NotifyWinEvent(event : u32, hwnd : super::super::Foundation:: HWND, idobject : i32, idchild : i32)); - NotifyWinEvent(core::mem::transmute(event), hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild)) + NotifyWinEvent(core::mem::transmute(event), core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild)) } #[inline] -pub unsafe fn ObjectFromLresult(lresult: P0, riid: *const windows_core::GUID, wparam: P2, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ObjectFromLresult(lresult: super::super::Foundation::LRESULT, riid: *const windows_core::GUID, wparam: super::super::Foundation::WPARAM, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("oleacc.dll" "system" fn ObjectFromLresult(lresult : super::super::Foundation:: LRESULT, riid : *const windows_core::GUID, wparam : super::super::Foundation:: WPARAM, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - ObjectFromLresult(lresult.param().abi(), core::mem::transmute(riid), wparam.param().abi(), core::mem::transmute(ppvobject)).ok() + ObjectFromLresult(core::mem::transmute(lresult), core::mem::transmute(riid), core::mem::transmute(wparam), core::mem::transmute(ppvobject)).ok() } #[inline] -pub unsafe fn RangeValuePattern_SetValue(hobj: P0, val: f64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RangeValuePattern_SetValue(hobj: HUIAPATTERNOBJECT, val: f64) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn RangeValuePattern_SetValue(hobj : HUIAPATTERNOBJECT, val : f64) -> windows_core::HRESULT); - RangeValuePattern_SetValue(hobj.param().abi(), core::mem::transmute(val)).ok() + RangeValuePattern_SetValue(core::mem::transmute(hobj), core::mem::transmute(val)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn RegisterPointerInputTarget(hwnd: P0, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterPointerInputTarget(hwnd: super::super::Foundation::HWND, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn RegisterPointerInputTarget(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> super::super::Foundation:: BOOL); - RegisterPointerInputTarget(hwnd.param().abi(), core::mem::transmute(pointertype)).ok() + RegisterPointerInputTarget(core::mem::transmute(hwnd), core::mem::transmute(pointertype)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn RegisterPointerInputTargetEx(hwnd: P0, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE, fobserve: P2) -> super::super::Foundation::BOOL +pub unsafe fn RegisterPointerInputTargetEx(hwnd: super::super::Foundation::HWND, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE, fobserve: P2) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn RegisterPointerInputTargetEx(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE, fobserve : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterPointerInputTargetEx(hwnd.param().abi(), core::mem::transmute(pointertype), fobserve.param().abi()) + RegisterPointerInputTargetEx(core::mem::transmute(hwnd), core::mem::transmute(pointertype), fobserve.param().abi()) } #[inline] -pub unsafe fn ScrollItemPattern_ScrollIntoView(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScrollItemPattern_ScrollIntoView(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn ScrollItemPattern_ScrollIntoView(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - ScrollItemPattern_ScrollIntoView(hobj.param().abi()).ok() + ScrollItemPattern_ScrollIntoView(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn ScrollPattern_Scroll(hobj: P0, horizontalamount: ScrollAmount, verticalamount: ScrollAmount) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScrollPattern_Scroll(hobj: HUIAPATTERNOBJECT, horizontalamount: ScrollAmount, verticalamount: ScrollAmount) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn ScrollPattern_Scroll(hobj : HUIAPATTERNOBJECT, horizontalamount : ScrollAmount, verticalamount : ScrollAmount) -> windows_core::HRESULT); - ScrollPattern_Scroll(hobj.param().abi(), core::mem::transmute(horizontalamount), core::mem::transmute(verticalamount)).ok() + ScrollPattern_Scroll(core::mem::transmute(hobj), core::mem::transmute(horizontalamount), core::mem::transmute(verticalamount)).ok() } #[inline] -pub unsafe fn ScrollPattern_SetScrollPercent(hobj: P0, horizontalpercent: f64, verticalpercent: f64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScrollPattern_SetScrollPercent(hobj: HUIAPATTERNOBJECT, horizontalpercent: f64, verticalpercent: f64) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn ScrollPattern_SetScrollPercent(hobj : HUIAPATTERNOBJECT, horizontalpercent : f64, verticalpercent : f64) -> windows_core::HRESULT); - ScrollPattern_SetScrollPercent(hobj.param().abi(), core::mem::transmute(horizontalpercent), core::mem::transmute(verticalpercent)).ok() + ScrollPattern_SetScrollPercent(core::mem::transmute(hobj), core::mem::transmute(horizontalpercent), core::mem::transmute(verticalpercent)).ok() } #[inline] -pub unsafe fn SelectionItemPattern_AddToSelection(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SelectionItemPattern_AddToSelection(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn SelectionItemPattern_AddToSelection(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - SelectionItemPattern_AddToSelection(hobj.param().abi()).ok() + SelectionItemPattern_AddToSelection(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn SelectionItemPattern_RemoveFromSelection(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SelectionItemPattern_RemoveFromSelection(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn SelectionItemPattern_RemoveFromSelection(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - SelectionItemPattern_RemoveFromSelection(hobj.param().abi()).ok() + SelectionItemPattern_RemoveFromSelection(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn SelectionItemPattern_Select(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SelectionItemPattern_Select(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn SelectionItemPattern_Select(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - SelectionItemPattern_Select(hobj.param().abi()).ok() + SelectionItemPattern_Select(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn SetWinEventHook(eventmin: u32, eventmax: u32, hmodwineventproc: P2, pfnwineventproc: WINEVENTPROC, idprocess: u32, idthread: u32, dwflags: u32) -> HWINEVENTHOOK -where - P2: windows_core::Param, -{ +pub unsafe fn SetWinEventHook(eventmin: u32, eventmax: u32, hmodwineventproc: Option, pfnwineventproc: WINEVENTPROC, idprocess: u32, idthread: u32, dwflags: u32) -> HWINEVENTHOOK { windows_targets::link!("user32.dll" "system" fn SetWinEventHook(eventmin : u32, eventmax : u32, hmodwineventproc : super::super::Foundation:: HMODULE, pfnwineventproc : WINEVENTPROC, idprocess : u32, idthread : u32, dwflags : u32) -> HWINEVENTHOOK); - SetWinEventHook(core::mem::transmute(eventmin), core::mem::transmute(eventmax), hmodwineventproc.param().abi(), core::mem::transmute(pfnwineventproc), core::mem::transmute(idprocess), core::mem::transmute(idthread), core::mem::transmute(dwflags)) + SetWinEventHook(core::mem::transmute(eventmin), core::mem::transmute(eventmax), core::mem::transmute(hmodwineventproc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfnwineventproc), core::mem::transmute(idprocess), core::mem::transmute(idthread), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn SynchronizedInputPattern_Cancel(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SynchronizedInputPattern_Cancel(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn SynchronizedInputPattern_Cancel(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - SynchronizedInputPattern_Cancel(hobj.param().abi()).ok() + SynchronizedInputPattern_Cancel(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn SynchronizedInputPattern_StartListening(hobj: P0, inputtype: SynchronizedInputType) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SynchronizedInputPattern_StartListening(hobj: HUIAPATTERNOBJECT, inputtype: SynchronizedInputType) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn SynchronizedInputPattern_StartListening(hobj : HUIAPATTERNOBJECT, inputtype : SynchronizedInputType) -> windows_core::HRESULT); - SynchronizedInputPattern_StartListening(hobj.param().abi(), core::mem::transmute(inputtype)).ok() + SynchronizedInputPattern_StartListening(core::mem::transmute(hobj), core::mem::transmute(inputtype)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn TextPattern_GetSelection(hobj: P0, pretval: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextPattern_GetSelection(hobj: HUIAPATTERNOBJECT, pretval: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextPattern_GetSelection(hobj : HUIAPATTERNOBJECT, pretval : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_core::HRESULT); - TextPattern_GetSelection(hobj.param().abi(), core::mem::transmute(pretval)).ok() + TextPattern_GetSelection(core::mem::transmute(hobj), core::mem::transmute(pretval)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn TextPattern_GetVisibleRanges(hobj: P0, pretval: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextPattern_GetVisibleRanges(hobj: HUIAPATTERNOBJECT, pretval: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextPattern_GetVisibleRanges(hobj : HUIAPATTERNOBJECT, pretval : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_core::HRESULT); - TextPattern_GetVisibleRanges(hobj.param().abi(), core::mem::transmute(pretval)).ok() + TextPattern_GetVisibleRanges(core::mem::transmute(hobj), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextPattern_RangeFromChild(hobj: P0, hnodechild: P1, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn TextPattern_RangeFromChild(hobj: HUIAPATTERNOBJECT, hnodechild: HUIANODE, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextPattern_RangeFromChild(hobj : HUIAPATTERNOBJECT, hnodechild : HUIANODE, pretval : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - TextPattern_RangeFromChild(hobj.param().abi(), hnodechild.param().abi(), core::mem::transmute(pretval)).ok() + TextPattern_RangeFromChild(core::mem::transmute(hobj), core::mem::transmute(hnodechild), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextPattern_RangeFromPoint(hobj: P0, point: UiaPoint, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextPattern_RangeFromPoint(hobj: HUIAPATTERNOBJECT, point: UiaPoint, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextPattern_RangeFromPoint(hobj : HUIAPATTERNOBJECT, point : UiaPoint, pretval : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - TextPattern_RangeFromPoint(hobj.param().abi(), core::mem::transmute(point), core::mem::transmute(pretval)).ok() + TextPattern_RangeFromPoint(core::mem::transmute(hobj), core::mem::transmute(point), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextPattern_get_DocumentRange(hobj: P0, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextPattern_get_DocumentRange(hobj: HUIAPATTERNOBJECT, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextPattern_get_DocumentRange(hobj : HUIAPATTERNOBJECT, pretval : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - TextPattern_get_DocumentRange(hobj.param().abi(), core::mem::transmute(pretval)).ok() + TextPattern_get_DocumentRange(core::mem::transmute(hobj), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextPattern_get_SupportedTextSelection(hobj: P0, pretval: *mut SupportedTextSelection) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextPattern_get_SupportedTextSelection(hobj: HUIAPATTERNOBJECT, pretval: *mut SupportedTextSelection) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextPattern_get_SupportedTextSelection(hobj : HUIAPATTERNOBJECT, pretval : *mut SupportedTextSelection) -> windows_core::HRESULT); - TextPattern_get_SupportedTextSelection(hobj.param().abi(), core::mem::transmute(pretval)).ok() + TextPattern_get_SupportedTextSelection(core::mem::transmute(hobj), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_AddToSelection(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_AddToSelection(hobj: HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_AddToSelection(hobj : HUIATEXTRANGE) -> windows_core::HRESULT); - TextRange_AddToSelection(hobj.param().abi()).ok() + TextRange_AddToSelection(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn TextRange_Clone(hobj: P0, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_Clone(hobj: HUIATEXTRANGE, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_Clone(hobj : HUIATEXTRANGE, pretval : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - TextRange_Clone(hobj.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_Clone(core::mem::transmute(hobj), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_Compare(hobj: P0, range: P1, pretval: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn TextRange_Compare(hobj: HUIATEXTRANGE, range: HUIATEXTRANGE, pretval: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_Compare(hobj : HUIATEXTRANGE, range : HUIATEXTRANGE, pretval : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - TextRange_Compare(hobj.param().abi(), range.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_Compare(core::mem::transmute(hobj), core::mem::transmute(range), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_CompareEndpoints(hobj: P0, endpoint: TextPatternRangeEndpoint, targetrange: P2, targetendpoint: TextPatternRangeEndpoint, pretval: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn TextRange_CompareEndpoints(hobj: HUIATEXTRANGE, endpoint: TextPatternRangeEndpoint, targetrange: HUIATEXTRANGE, targetendpoint: TextPatternRangeEndpoint, pretval: *mut i32) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_CompareEndpoints(hobj : HUIATEXTRANGE, endpoint : TextPatternRangeEndpoint, targetrange : HUIATEXTRANGE, targetendpoint : TextPatternRangeEndpoint, pretval : *mut i32) -> windows_core::HRESULT); - TextRange_CompareEndpoints(hobj.param().abi(), core::mem::transmute(endpoint), targetrange.param().abi(), core::mem::transmute(targetendpoint), core::mem::transmute(pretval)).ok() + TextRange_CompareEndpoints(core::mem::transmute(hobj), core::mem::transmute(endpoint), core::mem::transmute(targetrange), core::mem::transmute(targetendpoint), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_ExpandToEnclosingUnit(hobj: P0, unit: TextUnit) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_ExpandToEnclosingUnit(hobj: HUIATEXTRANGE, unit: TextUnit) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_ExpandToEnclosingUnit(hobj : HUIATEXTRANGE, unit : TextUnit) -> windows_core::HRESULT); - TextRange_ExpandToEnclosingUnit(hobj.param().abi(), core::mem::transmute(unit)).ok() + TextRange_ExpandToEnclosingUnit(core::mem::transmute(hobj), core::mem::transmute(unit)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn TextRange_FindAttribute(hobj: P0, attributeid: i32, val: &super::super::System::Variant::VARIANT, backward: P3, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> +pub unsafe fn TextRange_FindAttribute(hobj: HUIATEXTRANGE, attributeid: i32, val: &super::super::System::Variant::VARIANT, backward: P3, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_FindAttribute(hobj : HUIATEXTRANGE, attributeid : i32, val : super::super::System::Variant:: VARIANT, backward : super::super::Foundation:: BOOL, pretval : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - TextRange_FindAttribute(hobj.param().abi(), core::mem::transmute(attributeid), core::mem::transmute_copy(val), backward.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_FindAttribute(core::mem::transmute(hobj), core::mem::transmute(attributeid), core::mem::transmute_copy(val), backward.param().abi(), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_FindText(hobj: P0, text: &windows_core::BSTR, backward: P2, ignorecase: P3, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> +pub unsafe fn TextRange_FindText(hobj: HUIATEXTRANGE, text: &windows_core::BSTR, backward: P2, ignorecase: P3, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_FindText(hobj : HUIATEXTRANGE, text : * mut core::ffi::c_void, backward : super::super::Foundation:: BOOL, ignorecase : super::super::Foundation:: BOOL, pretval : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - TextRange_FindText(hobj.param().abi(), core::mem::transmute_copy(text), backward.param().abi(), ignorecase.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_FindText(core::mem::transmute(hobj), core::mem::transmute_copy(text), backward.param().abi(), ignorecase.param().abi(), core::mem::transmute(pretval)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn TextRange_GetAttributeValue(hobj: P0, attributeid: i32, pretval: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_GetAttributeValue(hobj: HUIATEXTRANGE, attributeid: i32, pretval: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_GetAttributeValue(hobj : HUIATEXTRANGE, attributeid : i32, pretval : *mut super::super::System::Variant:: VARIANT) -> windows_core::HRESULT); - TextRange_GetAttributeValue(hobj.param().abi(), core::mem::transmute(attributeid), core::mem::transmute(pretval)).ok() + TextRange_GetAttributeValue(core::mem::transmute(hobj), core::mem::transmute(attributeid), core::mem::transmute(pretval)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn TextRange_GetBoundingRectangles(hobj: P0, pretval: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_GetBoundingRectangles(hobj: HUIATEXTRANGE, pretval: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_GetBoundingRectangles(hobj : HUIATEXTRANGE, pretval : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_core::HRESULT); - TextRange_GetBoundingRectangles(hobj.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_GetBoundingRectangles(core::mem::transmute(hobj), core::mem::transmute(pretval)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn TextRange_GetChildren(hobj: P0, pretval: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_GetChildren(hobj: HUIATEXTRANGE, pretval: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_GetChildren(hobj : HUIATEXTRANGE, pretval : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_core::HRESULT); - TextRange_GetChildren(hobj.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_GetChildren(core::mem::transmute(hobj), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_GetEnclosingElement(hobj: P0, pretval: *mut HUIANODE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_GetEnclosingElement(hobj: HUIATEXTRANGE, pretval: *mut HUIANODE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_GetEnclosingElement(hobj : HUIATEXTRANGE, pretval : *mut HUIANODE) -> windows_core::HRESULT); - TextRange_GetEnclosingElement(hobj.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_GetEnclosingElement(core::mem::transmute(hobj), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_GetText(hobj: P0, maxlength: i32, pretval: *mut windows_core::BSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_GetText(hobj: HUIATEXTRANGE, maxlength: i32, pretval: *mut windows_core::BSTR) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_GetText(hobj : HUIATEXTRANGE, maxlength : i32, pretval : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - TextRange_GetText(hobj.param().abi(), core::mem::transmute(maxlength), core::mem::transmute(pretval)).ok() + TextRange_GetText(core::mem::transmute(hobj), core::mem::transmute(maxlength), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_Move(hobj: P0, unit: TextUnit, count: i32, pretval: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_Move(hobj: HUIATEXTRANGE, unit: TextUnit, count: i32, pretval: *mut i32) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_Move(hobj : HUIATEXTRANGE, unit : TextUnit, count : i32, pretval : *mut i32) -> windows_core::HRESULT); - TextRange_Move(hobj.param().abi(), core::mem::transmute(unit), core::mem::transmute(count), core::mem::transmute(pretval)).ok() + TextRange_Move(core::mem::transmute(hobj), core::mem::transmute(unit), core::mem::transmute(count), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_MoveEndpointByRange(hobj: P0, endpoint: TextPatternRangeEndpoint, targetrange: P2, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn TextRange_MoveEndpointByRange(hobj: HUIATEXTRANGE, endpoint: TextPatternRangeEndpoint, targetrange: HUIATEXTRANGE, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_MoveEndpointByRange(hobj : HUIATEXTRANGE, endpoint : TextPatternRangeEndpoint, targetrange : HUIATEXTRANGE, targetendpoint : TextPatternRangeEndpoint) -> windows_core::HRESULT); - TextRange_MoveEndpointByRange(hobj.param().abi(), core::mem::transmute(endpoint), targetrange.param().abi(), core::mem::transmute(targetendpoint)).ok() + TextRange_MoveEndpointByRange(core::mem::transmute(hobj), core::mem::transmute(endpoint), core::mem::transmute(targetrange), core::mem::transmute(targetendpoint)).ok() } #[inline] -pub unsafe fn TextRange_MoveEndpointByUnit(hobj: P0, endpoint: TextPatternRangeEndpoint, unit: TextUnit, count: i32, pretval: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_MoveEndpointByUnit(hobj: HUIATEXTRANGE, endpoint: TextPatternRangeEndpoint, unit: TextUnit, count: i32, pretval: *mut i32) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_MoveEndpointByUnit(hobj : HUIATEXTRANGE, endpoint : TextPatternRangeEndpoint, unit : TextUnit, count : i32, pretval : *mut i32) -> windows_core::HRESULT); - TextRange_MoveEndpointByUnit(hobj.param().abi(), core::mem::transmute(endpoint), core::mem::transmute(unit), core::mem::transmute(count), core::mem::transmute(pretval)).ok() + TextRange_MoveEndpointByUnit(core::mem::transmute(hobj), core::mem::transmute(endpoint), core::mem::transmute(unit), core::mem::transmute(count), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_RemoveFromSelection(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_RemoveFromSelection(hobj: HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_RemoveFromSelection(hobj : HUIATEXTRANGE) -> windows_core::HRESULT); - TextRange_RemoveFromSelection(hobj.param().abi()).ok() + TextRange_RemoveFromSelection(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn TextRange_ScrollIntoView(hobj: P0, aligntotop: P1) -> windows_core::Result<()> +pub unsafe fn TextRange_ScrollIntoView(hobj: HUIATEXTRANGE, aligntotop: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_ScrollIntoView(hobj : HUIATEXTRANGE, aligntotop : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - TextRange_ScrollIntoView(hobj.param().abi(), aligntotop.param().abi()).ok() + TextRange_ScrollIntoView(core::mem::transmute(hobj), aligntotop.param().abi()).ok() } #[inline] -pub unsafe fn TextRange_Select(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TextRange_Select(hobj: HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_Select(hobj : HUIATEXTRANGE) -> windows_core::HRESULT); - TextRange_Select(hobj.param().abi()).ok() + TextRange_Select(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn TogglePattern_Toggle(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TogglePattern_Toggle(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TogglePattern_Toggle(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - TogglePattern_Toggle(hobj.param().abi()).ok() + TogglePattern_Toggle(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn TransformPattern_Move(hobj: P0, x: f64, y: f64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TransformPattern_Move(hobj: HUIAPATTERNOBJECT, x: f64, y: f64) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TransformPattern_Move(hobj : HUIAPATTERNOBJECT, x : f64, y : f64) -> windows_core::HRESULT); - TransformPattern_Move(hobj.param().abi(), core::mem::transmute(x), core::mem::transmute(y)).ok() + TransformPattern_Move(core::mem::transmute(hobj), core::mem::transmute(x), core::mem::transmute(y)).ok() } #[inline] -pub unsafe fn TransformPattern_Resize(hobj: P0, width: f64, height: f64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TransformPattern_Resize(hobj: HUIAPATTERNOBJECT, width: f64, height: f64) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TransformPattern_Resize(hobj : HUIAPATTERNOBJECT, width : f64, height : f64) -> windows_core::HRESULT); - TransformPattern_Resize(hobj.param().abi(), core::mem::transmute(width), core::mem::transmute(height)).ok() + TransformPattern_Resize(core::mem::transmute(hobj), core::mem::transmute(width), core::mem::transmute(height)).ok() } #[inline] -pub unsafe fn TransformPattern_Rotate(hobj: P0, degrees: f64) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn TransformPattern_Rotate(hobj: HUIAPATTERNOBJECT, degrees: f64) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TransformPattern_Rotate(hobj : HUIAPATTERNOBJECT, degrees : f64) -> windows_core::HRESULT); - TransformPattern_Rotate(hobj.param().abi(), core::mem::transmute(degrees)).ok() + TransformPattern_Rotate(core::mem::transmute(hobj), core::mem::transmute(degrees)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn UiaAddEvent(hnode: P0, eventid: i32, pcallback: *mut UiaEventCallback, scope: TreeScope, pproperties: *mut i32, cproperties: i32, prequest: *mut UiaCacheRequest, phevent: *mut HUIAEVENT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaAddEvent(hnode: HUIANODE, eventid: i32, pcallback: *mut UiaEventCallback, scope: TreeScope, pproperties: *mut i32, cproperties: i32, prequest: *mut UiaCacheRequest, phevent: *mut HUIAEVENT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaAddEvent(hnode : HUIANODE, eventid : i32, pcallback : *mut UiaEventCallback, scope : TreeScope, pproperties : *mut i32, cproperties : i32, prequest : *mut UiaCacheRequest, phevent : *mut HUIAEVENT) -> windows_core::HRESULT); - UiaAddEvent(hnode.param().abi(), core::mem::transmute(eventid), core::mem::transmute(pcallback), core::mem::transmute(scope), core::mem::transmute(pproperties), core::mem::transmute(cproperties), core::mem::transmute(prequest), core::mem::transmute(phevent)).ok() + UiaAddEvent(core::mem::transmute(hnode), core::mem::transmute(eventid), core::mem::transmute(pcallback), core::mem::transmute(scope), core::mem::transmute(pproperties), core::mem::transmute(cproperties), core::mem::transmute(prequest), core::mem::transmute(phevent)).ok() } #[inline] pub unsafe fn UiaClientsAreListening() -> super::super::Foundation::BOOL { @@ -595,31 +415,20 @@ where UiaDisconnectProvider(pprovider.param().abi()).ok() } #[inline] -pub unsafe fn UiaEventAddWindow(hevent: P0, hwnd: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn UiaEventAddWindow(hevent: HUIAEVENT, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaEventAddWindow(hevent : HUIAEVENT, hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - UiaEventAddWindow(hevent.param().abi(), hwnd.param().abi()).ok() + UiaEventAddWindow(core::mem::transmute(hevent), core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn UiaEventRemoveWindow(hevent: P0, hwnd: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn UiaEventRemoveWindow(hevent: HUIAEVENT, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaEventRemoveWindow(hevent : HUIAEVENT, hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - UiaEventRemoveWindow(hevent.param().abi(), hwnd.param().abi()).ok() + UiaEventRemoveWindow(core::mem::transmute(hevent), core::mem::transmute(hwnd)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn UiaFind(hnode: P0, pparams: *mut UiaFindParams, prequest: *mut UiaCacheRequest, pprequesteddata: *mut *mut super::super::System::Com::SAFEARRAY, ppoffsets: *mut *mut super::super::System::Com::SAFEARRAY, pptreestructures: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaFind(hnode: HUIANODE, pparams: *mut UiaFindParams, prequest: *mut UiaCacheRequest, pprequesteddata: *mut *mut super::super::System::Com::SAFEARRAY, ppoffsets: *mut *mut super::super::System::Com::SAFEARRAY, pptreestructures: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaFind(hnode : HUIANODE, pparams : *mut UiaFindParams, prequest : *mut UiaCacheRequest, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, ppoffsets : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructures : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_core::HRESULT); - UiaFind(hnode.param().abi(), core::mem::transmute(pparams), core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(ppoffsets), core::mem::transmute(pptreestructures)).ok() + UiaFind(core::mem::transmute(hnode), core::mem::transmute(pparams), core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(ppoffsets), core::mem::transmute(pptreestructures)).ok() } #[inline] pub unsafe fn UiaGetErrorDescription(pdescription: *mut windows_core::BSTR) -> super::super::Foundation::BOOL { @@ -627,21 +436,15 @@ pub unsafe fn UiaGetErrorDescription(pdescription: *mut windows_core::BSTR) -> s UiaGetErrorDescription(core::mem::transmute(pdescription)) } #[inline] -pub unsafe fn UiaGetPatternProvider(hnode: P0, patternid: i32, phobj: *mut HUIAPATTERNOBJECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaGetPatternProvider(hnode: HUIANODE, patternid: i32, phobj: *mut HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaGetPatternProvider(hnode : HUIANODE, patternid : i32, phobj : *mut HUIAPATTERNOBJECT) -> windows_core::HRESULT); - UiaGetPatternProvider(hnode.param().abi(), core::mem::transmute(patternid), core::mem::transmute(phobj)).ok() + UiaGetPatternProvider(core::mem::transmute(hnode), core::mem::transmute(patternid), core::mem::transmute(phobj)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn UiaGetPropertyValue(hnode: P0, propertyid: i32, pvalue: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaGetPropertyValue(hnode: HUIANODE, propertyid: i32, pvalue: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaGetPropertyValue(hnode : HUIANODE, propertyid : i32, pvalue : *mut super::super::System::Variant:: VARIANT) -> windows_core::HRESULT); - UiaGetPropertyValue(hnode.param().abi(), core::mem::transmute(propertyid), core::mem::transmute(pvalue)).ok() + UiaGetPropertyValue(core::mem::transmute(hnode), core::mem::transmute(propertyid), core::mem::transmute(pvalue)).ok() } #[inline] pub unsafe fn UiaGetReservedMixedAttributeValue() -> windows_core::Result { @@ -662,21 +465,15 @@ pub unsafe fn UiaGetRootNode(phnode: *mut HUIANODE) -> windows_core::Result<()> } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn UiaGetRuntimeId(hnode: P0, pruntimeid: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaGetRuntimeId(hnode: HUIANODE, pruntimeid: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaGetRuntimeId(hnode : HUIANODE, pruntimeid : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_core::HRESULT); - UiaGetRuntimeId(hnode.param().abi(), core::mem::transmute(pruntimeid)).ok() + UiaGetRuntimeId(core::mem::transmute(hnode), core::mem::transmute(pruntimeid)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn UiaGetUpdatedCache(hnode: P0, prequest: *mut UiaCacheRequest, normalizestate: NormalizeState, pnormalizecondition: *mut UiaCondition, pprequesteddata: *mut *mut super::super::System::Com::SAFEARRAY, pptreestructure: *mut windows_core::BSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaGetUpdatedCache(hnode: HUIANODE, prequest: *mut UiaCacheRequest, normalizestate: NormalizeState, pnormalizecondition: *mut UiaCondition, pprequesteddata: *mut *mut super::super::System::Com::SAFEARRAY, pptreestructure: *mut windows_core::BSTR) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaGetUpdatedCache(hnode : HUIANODE, prequest : *mut UiaCacheRequest, normalizestate : NormalizeState, pnormalizecondition : *mut UiaCondition, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructure : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - UiaGetUpdatedCache(hnode.param().abi(), core::mem::transmute(prequest), core::mem::transmute(normalizestate), core::mem::transmute(pnormalizecondition), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() + UiaGetUpdatedCache(core::mem::transmute(hnode), core::mem::transmute(prequest), core::mem::transmute(normalizestate), core::mem::transmute(pnormalizecondition), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -697,21 +494,15 @@ pub unsafe fn UiaHUiaNodeFromVariant(pvar: *mut super::super::System::Variant::V UiaHUiaNodeFromVariant(core::mem::transmute(pvar), core::mem::transmute(phnode)).ok() } #[inline] -pub unsafe fn UiaHasServerSideProvider(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UiaHasServerSideProvider(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("uiautomationcore.dll" "system" fn UiaHasServerSideProvider(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - UiaHasServerSideProvider(hwnd.param().abi()) + UiaHasServerSideProvider(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn UiaHostProviderFromHwnd(hwnd: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn UiaHostProviderFromHwnd(hwnd: super::super::Foundation::HWND) -> windows_core::Result { windows_targets::link!("uiautomationcore.dll" "system" fn UiaHostProviderFromHwnd(hwnd : super::super::Foundation:: HWND, ppprovider : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - UiaHostProviderFromHwnd(hwnd.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + UiaHostProviderFromHwnd(core::mem::transmute(hwnd), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -729,12 +520,9 @@ pub unsafe fn UiaLookupId(r#type: AutomationIdentifierType, pguid: *const window } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn UiaNavigate(hnode: P0, direction: NavigateDirection, pcondition: *mut UiaCondition, prequest: *mut UiaCacheRequest, pprequesteddata: *mut *mut super::super::System::Com::SAFEARRAY, pptreestructure: *mut windows_core::BSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaNavigate(hnode: HUIANODE, direction: NavigateDirection, pcondition: *mut UiaCondition, prequest: *mut UiaCacheRequest, pprequesteddata: *mut *mut super::super::System::Com::SAFEARRAY, pptreestructure: *mut windows_core::BSTR) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaNavigate(hnode : HUIANODE, direction : NavigateDirection, pcondition : *mut UiaCondition, prequest : *mut UiaCacheRequest, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructure : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - UiaNavigate(hnode.param().abi(), core::mem::transmute(direction), core::mem::transmute(pcondition), core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() + UiaNavigate(core::mem::transmute(hnode), core::mem::transmute(direction), core::mem::transmute(pcondition), core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -743,12 +531,9 @@ pub unsafe fn UiaNodeFromFocus(prequest: *mut UiaCacheRequest, pprequesteddata: UiaNodeFromFocus(core::mem::transmute(prequest), core::mem::transmute(pprequesteddata), core::mem::transmute(pptreestructure)).ok() } #[inline] -pub unsafe fn UiaNodeFromHandle(hwnd: P0, phnode: *mut HUIANODE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaNodeFromHandle(hwnd: super::super::Foundation::HWND, phnode: *mut HUIANODE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaNodeFromHandle(hwnd : super::super::Foundation:: HWND, phnode : *mut HUIANODE) -> windows_core::HRESULT); - UiaNodeFromHandle(hwnd.param().abi(), core::mem::transmute(phnode)).ok() + UiaNodeFromHandle(core::mem::transmute(hwnd), core::mem::transmute(phnode)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -765,29 +550,20 @@ where UiaNodeFromProvider(pprovider.param().abi(), core::mem::transmute(phnode)).ok() } #[inline] -pub unsafe fn UiaNodeRelease(hnode: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UiaNodeRelease(hnode: HUIANODE) -> super::super::Foundation::BOOL { windows_targets::link!("uiautomationcore.dll" "system" fn UiaNodeRelease(hnode : HUIANODE) -> super::super::Foundation:: BOOL); - UiaNodeRelease(hnode.param().abi()) + UiaNodeRelease(core::mem::transmute(hnode)) } #[inline] -pub unsafe fn UiaPatternRelease(hobj: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UiaPatternRelease(hobj: HUIAPATTERNOBJECT) -> super::super::Foundation::BOOL { windows_targets::link!("uiautomationcore.dll" "system" fn UiaPatternRelease(hobj : HUIAPATTERNOBJECT) -> super::super::Foundation:: BOOL); - UiaPatternRelease(hobj.param().abi()) + UiaPatternRelease(core::mem::transmute(hobj)) } #[inline] -pub unsafe fn UiaProviderForNonClient(hwnd: P0, idobject: i32, idchild: i32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn UiaProviderForNonClient(hwnd: super::super::Foundation::HWND, idobject: i32, idchild: i32) -> windows_core::Result { windows_targets::link!("uiautomationcore.dll" "system" fn UiaProviderForNonClient(hwnd : super::super::Foundation:: HWND, idobject : i32, idchild : i32, ppprovider : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - UiaProviderForNonClient(hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + UiaProviderForNonClient(core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -874,82 +650,57 @@ pub unsafe fn UiaRegisterProviderCallback(pcallback: *mut UiaProviderCallback) { UiaRegisterProviderCallback(core::mem::transmute(pcallback)) } #[inline] -pub unsafe fn UiaRemoveEvent(hevent: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaRemoveEvent(hevent: HUIAEVENT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaRemoveEvent(hevent : HUIAEVENT) -> windows_core::HRESULT); - UiaRemoveEvent(hevent.param().abi()).ok() + UiaRemoveEvent(core::mem::transmute(hevent)).ok() } #[inline] -pub unsafe fn UiaReturnRawElementProvider(hwnd: P0, wparam: P1, lparam: P2, el: P3) -> super::super::Foundation::LRESULT +pub unsafe fn UiaReturnRawElementProvider(hwnd: super::super::Foundation::HWND, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, el: P3) -> super::super::Foundation::LRESULT where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn UiaReturnRawElementProvider(hwnd : super::super::Foundation:: HWND, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, el : * mut core::ffi::c_void) -> super::super::Foundation:: LRESULT); - UiaReturnRawElementProvider(hwnd.param().abi(), wparam.param().abi(), lparam.param().abi(), el.param().abi()) + UiaReturnRawElementProvider(core::mem::transmute(hwnd), core::mem::transmute(wparam), core::mem::transmute(lparam), el.param().abi()) } #[inline] -pub unsafe fn UiaSetFocus(hnode: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UiaSetFocus(hnode: HUIANODE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn UiaSetFocus(hnode : HUIANODE) -> windows_core::HRESULT); - UiaSetFocus(hnode.param().abi()).ok() + UiaSetFocus(core::mem::transmute(hnode)).ok() } #[inline] -pub unsafe fn UiaTextRangeRelease(hobj: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UiaTextRangeRelease(hobj: HUIATEXTRANGE) -> super::super::Foundation::BOOL { windows_targets::link!("uiautomationcore.dll" "system" fn UiaTextRangeRelease(hobj : HUIATEXTRANGE) -> super::super::Foundation:: BOOL); - UiaTextRangeRelease(hobj.param().abi()) + UiaTextRangeRelease(core::mem::transmute(hobj)) } #[inline] -pub unsafe fn UnhookWinEvent(hwineventhook: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UnhookWinEvent(hwineventhook: HWINEVENTHOOK) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn UnhookWinEvent(hwineventhook : HWINEVENTHOOK) -> super::super::Foundation:: BOOL); - UnhookWinEvent(hwineventhook.param().abi()) + UnhookWinEvent(core::mem::transmute(hwineventhook)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn UnregisterPointerInputTarget(hwnd: P0, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterPointerInputTarget(hwnd: super::super::Foundation::HWND, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UnregisterPointerInputTarget(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> super::super::Foundation:: BOOL); - UnregisterPointerInputTarget(hwnd.param().abi(), core::mem::transmute(pointertype)).ok() + UnregisterPointerInputTarget(core::mem::transmute(hwnd), core::mem::transmute(pointertype)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn UnregisterPointerInputTargetEx(hwnd: P0, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterPointerInputTargetEx(hwnd: super::super::Foundation::HWND, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn UnregisterPointerInputTargetEx(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> super::super::Foundation:: BOOL); - UnregisterPointerInputTargetEx(hwnd.param().abi(), core::mem::transmute(pointertype)) + UnregisterPointerInputTargetEx(core::mem::transmute(hwnd), core::mem::transmute(pointertype)) } #[inline] -pub unsafe fn ValuePattern_SetValue(hobj: P0, pval: P1) -> windows_core::Result<()> +pub unsafe fn ValuePattern_SetValue(hobj: HUIAPATTERNOBJECT, pval: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("uiautomationcore.dll" "system" fn ValuePattern_SetValue(hobj : HUIAPATTERNOBJECT, pval : windows_core::PCWSTR) -> windows_core::HRESULT); - ValuePattern_SetValue(hobj.param().abi(), pval.param().abi()).ok() + ValuePattern_SetValue(core::mem::transmute(hobj), pval.param().abi()).ok() } #[inline] -pub unsafe fn VirtualizedItemPattern_Realize(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn VirtualizedItemPattern_Realize(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn VirtualizedItemPattern_Realize(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - VirtualizedItemPattern_Realize(hobj.param().abi()).ok() + VirtualizedItemPattern_Realize(core::mem::transmute(hobj)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -958,31 +709,22 @@ 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(core::ptr::null_mut()))).ok() + WindowFromAccessibleObject(param0.param().abi(), core::mem::transmute(phwnd.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WindowPattern_Close(hobj: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WindowPattern_Close(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn WindowPattern_Close(hobj : HUIAPATTERNOBJECT) -> windows_core::HRESULT); - WindowPattern_Close(hobj.param().abi()).ok() + WindowPattern_Close(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn WindowPattern_SetWindowVisualState(hobj: P0, state: WindowVisualState) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WindowPattern_SetWindowVisualState(hobj: HUIAPATTERNOBJECT, state: WindowVisualState) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn WindowPattern_SetWindowVisualState(hobj : HUIAPATTERNOBJECT, state : WindowVisualState) -> windows_core::HRESULT); - WindowPattern_SetWindowVisualState(hobj.param().abi(), core::mem::transmute(state)).ok() + WindowPattern_SetWindowVisualState(core::mem::transmute(hobj), core::mem::transmute(state)).ok() } #[inline] -pub unsafe fn WindowPattern_WaitForInputIdle(hobj: P0, milliseconds: i32, presult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn WindowPattern_WaitForInputIdle(hobj: HUIAPATTERNOBJECT, milliseconds: i32, presult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn WindowPattern_WaitForInputIdle(hobj : HUIAPATTERNOBJECT, milliseconds : i32, presult : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - WindowPattern_WaitForInputIdle(hobj.param().abi(), core::mem::transmute(milliseconds), core::mem::transmute(presult)).ok() + WindowPattern_WaitForInputIdle(core::mem::transmute(hobj), core::mem::transmute(milliseconds), core::mem::transmute(presult)).ok() } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -1662,77 +1404,55 @@ impl IAccPropServices { (windows_core::Interface::vtable(self).ClearProps)(windows_core::Interface::as_raw(self), core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn SetHwndProp(&self, hwnd: P0, idobject: u32, idchild: u32, idprop: windows_core::GUID, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHwndProp)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(idprop), core::mem::transmute_copy(var)).ok() + pub unsafe fn SetHwndProp(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, idprop: windows_core::GUID, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHwndProp)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(idprop), core::mem::transmute_copy(var)).ok() } - pub unsafe fn SetHwndPropStr(&self, hwnd: P0, idobject: u32, idchild: u32, idprop: windows_core::GUID, str: P4) -> windows_core::Result<()> + pub unsafe fn SetHwndPropStr(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, idprop: windows_core::GUID, str: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).SetHwndPropStr)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(idprop), str.param().abi()).ok() + (windows_core::Interface::vtable(self).SetHwndPropStr)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(idprop), str.param().abi()).ok() } - pub unsafe fn SetHwndPropServer(&self, hwnd: P0, idobject: u32, idchild: u32, paprops: &[windows_core::GUID], pserver: P5, annoscope: AnnoScope) -> windows_core::Result<()> + pub unsafe fn SetHwndPropServer(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, paprops: &[windows_core::GUID], pserver: P5, annoscope: AnnoScope) -> windows_core::Result<()> where - P0: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).SetHwndPropServer)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap(), pserver.param().abi(), core::mem::transmute(annoscope)).ok() + (windows_core::Interface::vtable(self).SetHwndPropServer)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap(), pserver.param().abi(), core::mem::transmute(annoscope)).ok() } - pub unsafe fn ClearHwndProps(&self, hwnd: P0, idobject: u32, idchild: u32, paprops: &[windows_core::GUID]) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ClearHwndProps)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).ok() + pub unsafe fn ClearHwndProps(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, paprops: &[windows_core::GUID]) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ClearHwndProps)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).ok() } - pub unsafe fn ComposeHwndIdentityString(&self, hwnd: P0, idobject: u32, idchild: u32, ppidstring: *mut *mut u8, pdwidstringlen: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ComposeHwndIdentityString)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(ppidstring), core::mem::transmute(pdwidstringlen)).ok() + pub unsafe fn ComposeHwndIdentityString(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, ppidstring: *mut *mut u8, pdwidstringlen: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ComposeHwndIdentityString)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild), core::mem::transmute(ppidstring), core::mem::transmute(pdwidstringlen)).ok() } pub unsafe fn DecomposeHwndIdentityString(&self, pidstring: &[u8], phwnd: *mut super::super::Foundation::HWND, pidobject: *mut u32, pidchild: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DecomposeHwndIdentityString)(windows_core::Interface::as_raw(self), core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), core::mem::transmute(phwnd), core::mem::transmute(pidobject), core::mem::transmute(pidchild)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_WindowsAndMessaging"))] - pub unsafe fn SetHmenuProp(&self, hmenu: P0, idchild: u32, idprop: windows_core::GUID, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHmenuProp)(windows_core::Interface::as_raw(self), hmenu.param().abi(), core::mem::transmute(idchild), core::mem::transmute(idprop), core::mem::transmute_copy(var)).ok() + pub unsafe fn SetHmenuProp(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, idprop: windows_core::GUID, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHmenuProp)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenu), core::mem::transmute(idchild), core::mem::transmute(idprop), core::mem::transmute_copy(var)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetHmenuPropStr(&self, hmenu: P0, idchild: u32, idprop: windows_core::GUID, str: P3) -> windows_core::Result<()> + pub unsafe fn SetHmenuPropStr(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, idprop: windows_core::GUID, str: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).SetHmenuPropStr)(windows_core::Interface::as_raw(self), hmenu.param().abi(), core::mem::transmute(idchild), core::mem::transmute(idprop), str.param().abi()).ok() + (windows_core::Interface::vtable(self).SetHmenuPropStr)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenu), core::mem::transmute(idchild), core::mem::transmute(idprop), str.param().abi()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetHmenuPropServer(&self, hmenu: P0, idchild: u32, paprops: &[windows_core::GUID], pserver: P4, annoscope: AnnoScope) -> windows_core::Result<()> + pub unsafe fn SetHmenuPropServer(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, paprops: &[windows_core::GUID], pserver: P4, annoscope: AnnoScope) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).SetHmenuPropServer)(windows_core::Interface::as_raw(self), hmenu.param().abi(), core::mem::transmute(idchild), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap(), pserver.param().abi(), core::mem::transmute(annoscope)).ok() + (windows_core::Interface::vtable(self).SetHmenuPropServer)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenu), core::mem::transmute(idchild), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap(), pserver.param().abi(), core::mem::transmute(annoscope)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn ClearHmenuProps(&self, hmenu: P0, idchild: u32, paprops: &[windows_core::GUID]) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ClearHmenuProps)(windows_core::Interface::as_raw(self), hmenu.param().abi(), core::mem::transmute(idchild), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).ok() + pub unsafe fn ClearHmenuProps(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, paprops: &[windows_core::GUID]) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ClearHmenuProps)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenu), core::mem::transmute(idchild), core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn ComposeHmenuIdentityString(&self, hmenu: P0, idchild: u32, ppidstring: *mut *mut u8, pdwidstringlen: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ComposeHmenuIdentityString)(windows_core::Interface::as_raw(self), hmenu.param().abi(), core::mem::transmute(idchild), core::mem::transmute(ppidstring), core::mem::transmute(pdwidstringlen)).ok() + pub unsafe fn ComposeHmenuIdentityString(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, ppidstring: *mut *mut u8, pdwidstringlen: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ComposeHmenuIdentityString)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenu), core::mem::transmute(idchild), core::mem::transmute(ppidstring), core::mem::transmute(pdwidstringlen)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn DecomposeHmenuIdentityString(&self, pidstring: &[u8], phmenu: *mut super::WindowsAndMessaging::HMENU, pidchild: *mut u32) -> windows_core::Result<()> { @@ -3667,12 +3387,11 @@ impl windows_core::RuntimeName for IObjectModelProvider {} windows_core::imp::define_interface!(IProxyProviderWinEventHandler, IProxyProviderWinEventHandler_Vtbl, 0x89592ad4_f4e0_43d5_a3b6_bad7e111b435); windows_core::imp::interface_hierarchy!(IProxyProviderWinEventHandler, windows_core::IUnknown); impl IProxyProviderWinEventHandler { - pub unsafe fn RespondToWinEvent(&self, idwinevent: u32, hwnd: P1, idobject: i32, idchild: i32, psink: P4) -> windows_core::Result<()> + pub unsafe fn RespondToWinEvent(&self, idwinevent: u32, hwnd: super::super::Foundation::HWND, idobject: i32, idchild: i32, psink: P4) -> windows_core::Result<()> where - P1: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).RespondToWinEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(idwinevent), hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild), psink.param().abi()).ok() + (windows_core::Interface::vtable(self).RespondToWinEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(idwinevent), core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild), psink.param().abi()).ok() } } #[repr(C)] @@ -4179,12 +3898,9 @@ impl windows_core::RuntimeName for IRawElementProviderHostingAccessibles {} windows_core::imp::define_interface!(IRawElementProviderHwndOverride, IRawElementProviderHwndOverride_Vtbl, 0x1d5df27c_8947_4425_b8d9_79787bb460b8); windows_core::imp::interface_hierarchy!(IRawElementProviderHwndOverride, windows_core::IUnknown); impl IRawElementProviderHwndOverride { - pub unsafe fn GetOverrideProviderForHwnd(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetOverrideProviderForHwnd(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetOverrideProviderForHwnd)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetOverrideProviderForHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -6384,12 +6100,9 @@ impl IUIAutomation { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetRootElement)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ElementFromHandle(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn ElementFromHandle(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ElementFromHandle)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ElementFromHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn ElementFromPoint(&self, pt: super::super::Foundation::POINT) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6406,13 +6119,12 @@ impl IUIAutomation { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetRootElementBuildCache)(windows_core::Interface::as_raw(self), cacherequest.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ElementFromHandleBuildCache(&self, hwnd: P0, cacherequest: P1) -> windows_core::Result + pub unsafe fn ElementFromHandleBuildCache(&self, hwnd: super::super::Foundation::HWND, cacherequest: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ElementFromHandleBuildCache)(windows_core::Interface::as_raw(self), hwnd.param().abi(), cacherequest.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ElementFromHandleBuildCache)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), cacherequest.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn ElementFromPointBuildCache(&self, pt: super::super::Foundation::POINT, cacherequest: P1) -> windows_core::Result where @@ -12670,12 +12382,9 @@ impl windows_core::RuntimeName for IUIAutomationPropertyCondition {} windows_core::imp::define_interface!(IUIAutomationProxyFactory, IUIAutomationProxyFactory_Vtbl, 0x85b94ecd_849d_42b6_b94d_d6db23fdf5a4); windows_core::imp::interface_hierarchy!(IUIAutomationProxyFactory, windows_core::IUnknown); impl IUIAutomationProxyFactory { - pub unsafe fn CreateProvider(&self, hwnd: P0, idobject: i32, idchild: i32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateProvider(&self, hwnd: super::super::Foundation::HWND, idobject: i32, idchild: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateProvider)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(idchild), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(idchild), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn ProxyFactoryId(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 5ebe614283..b6718b9eab 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs @@ -301,7 +301,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), core::mem::transmute(timenow), core::mem::transmute(updateresult.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), core::mem::transmute(timenow), core::mem::transmute(updateresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetVariableFromTag(&self, object: P0, id: u32) -> windows_core::Result where @@ -576,7 +576,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), core::mem::transmute(timenow), core::mem::transmute(updateresult.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), core::mem::transmute(timenow), core::mem::transmute(updateresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetVariableFromTag(&self, object: P0, id: u32) -> windows_core::Result where @@ -1024,12 +1024,9 @@ impl IUIAnimationStoryboard { { (windows_core::Interface::vtable(self).AddTransition)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi()).ok() } - pub unsafe fn AddKeyframeAtOffset(&self, existingkeyframe: P0, offset: f64) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn AddKeyframeAtOffset(&self, existingkeyframe: UI_ANIMATION_KEYFRAME, offset: f64) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddKeyframeAtOffset)(windows_core::Interface::as_raw(self), existingkeyframe.param().abi(), core::mem::transmute(offset), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AddKeyframeAtOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(existingkeyframe), core::mem::transmute(offset), &mut result__).map(|| result__) } pub unsafe fn AddKeyframeAfterTransition(&self, transition: P0) -> windows_core::Result where @@ -1038,29 +1035,22 @@ impl IUIAnimationStoryboard { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AddKeyframeAfterTransition)(windows_core::Interface::as_raw(self), transition.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn AddTransitionAtKeyframe(&self, variable: P0, transition: P1, startkeyframe: P2) -> windows_core::Result<()> + pub unsafe fn AddTransitionAtKeyframe(&self, variable: P0, transition: P1, startkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddTransitionAtKeyframe)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), startkeyframe.param().abi()).ok() + (windows_core::Interface::vtable(self).AddTransitionAtKeyframe)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), core::mem::transmute(startkeyframe)).ok() } - pub unsafe fn AddTransitionBetweenKeyframes(&self, variable: P0, transition: P1, startkeyframe: P2, endkeyframe: P3) -> windows_core::Result<()> + pub unsafe fn AddTransitionBetweenKeyframes(&self, variable: P0, transition: P1, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).AddTransitionBetweenKeyframes)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), startkeyframe.param().abi(), endkeyframe.param().abi()).ok() + (windows_core::Interface::vtable(self).AddTransitionBetweenKeyframes)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), core::mem::transmute(startkeyframe), core::mem::transmute(endkeyframe)).ok() } - pub unsafe fn RepeatBetweenKeyframes(&self, startkeyframe: P0, endkeyframe: P1, repetitioncount: i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RepeatBetweenKeyframes)(windows_core::Interface::as_raw(self), startkeyframe.param().abi(), endkeyframe.param().abi(), core::mem::transmute(repetitioncount)).ok() + pub unsafe fn RepeatBetweenKeyframes(&self, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, repetitioncount: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RepeatBetweenKeyframes)(windows_core::Interface::as_raw(self), core::mem::transmute(startkeyframe), core::mem::transmute(endkeyframe), core::mem::transmute(repetitioncount)).ok() } pub unsafe fn HoldVariable(&self, variable: P0) -> windows_core::Result<()> where @@ -1072,7 +1062,7 @@ impl IUIAnimationStoryboard { (windows_core::Interface::vtable(self).SetLongestAcceptableDelay)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(timenow), core::mem::transmute(schedulingresult.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), core::mem::transmute(timenow), core::mem::transmute(schedulingresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Conclude(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Conclude)(windows_core::Interface::as_raw(self)).ok() @@ -1090,7 +1080,7 @@ impl IUIAnimationStoryboard { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1277,12 +1267,9 @@ impl IUIAnimationStoryboard2 { { (windows_core::Interface::vtable(self).AddTransition)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi()).ok() } - pub unsafe fn AddKeyframeAtOffset(&self, existingkeyframe: P0, offset: f64) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn AddKeyframeAtOffset(&self, existingkeyframe: UI_ANIMATION_KEYFRAME, offset: f64) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddKeyframeAtOffset)(windows_core::Interface::as_raw(self), existingkeyframe.param().abi(), core::mem::transmute(offset), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AddKeyframeAtOffset)(windows_core::Interface::as_raw(self), core::mem::transmute(existingkeyframe), core::mem::transmute(offset), &mut result__).map(|| result__) } pub unsafe fn AddKeyframeAfterTransition(&self, transition: P0) -> windows_core::Result where @@ -1291,31 +1278,26 @@ impl IUIAnimationStoryboard2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AddKeyframeAfterTransition)(windows_core::Interface::as_raw(self), transition.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn AddTransitionAtKeyframe(&self, variable: P0, transition: P1, startkeyframe: P2) -> windows_core::Result<()> + pub unsafe fn AddTransitionAtKeyframe(&self, variable: P0, transition: P1, startkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddTransitionAtKeyframe)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), startkeyframe.param().abi()).ok() + (windows_core::Interface::vtable(self).AddTransitionAtKeyframe)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), core::mem::transmute(startkeyframe)).ok() } - pub unsafe fn AddTransitionBetweenKeyframes(&self, variable: P0, transition: P1, startkeyframe: P2, endkeyframe: P3) -> windows_core::Result<()> + pub unsafe fn AddTransitionBetweenKeyframes(&self, variable: P0, transition: P1, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).AddTransitionBetweenKeyframes)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), startkeyframe.param().abi(), endkeyframe.param().abi()).ok() + (windows_core::Interface::vtable(self).AddTransitionBetweenKeyframes)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), core::mem::transmute(startkeyframe), core::mem::transmute(endkeyframe)).ok() } - pub unsafe fn RepeatBetweenKeyframes(&self, startkeyframe: P0, endkeyframe: P1, crepetition: f64, repeatmode: UI_ANIMATION_REPEAT_MODE, piterationchangehandler: P4, id: usize, fregisterfornextanimationevent: P6) -> windows_core::Result<()> + pub unsafe fn RepeatBetweenKeyframes(&self, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, crepetition: f64, repeatmode: UI_ANIMATION_REPEAT_MODE, piterationchangehandler: P4, id: usize, fregisterfornextanimationevent: P6) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P4: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).RepeatBetweenKeyframes)(windows_core::Interface::as_raw(self), startkeyframe.param().abi(), endkeyframe.param().abi(), core::mem::transmute(crepetition), core::mem::transmute(repeatmode), piterationchangehandler.param().abi(), core::mem::transmute(id), fregisterfornextanimationevent.param().abi()).ok() + (windows_core::Interface::vtable(self).RepeatBetweenKeyframes)(windows_core::Interface::as_raw(self), core::mem::transmute(startkeyframe), core::mem::transmute(endkeyframe), core::mem::transmute(crepetition), core::mem::transmute(repeatmode), piterationchangehandler.param().abi(), core::mem::transmute(id), fregisterfornextanimationevent.param().abi()).ok() } pub unsafe fn HoldVariable(&self, variable: P0) -> windows_core::Result<()> where @@ -1330,7 +1312,7 @@ impl IUIAnimationStoryboard2 { (windows_core::Interface::vtable(self).SetSkipDuration)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(timenow), core::mem::transmute(schedulingresult.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), core::mem::transmute(timenow), core::mem::transmute(schedulingresult.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Conclude(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Conclude)(windows_core::Interface::as_raw(self)).ok() @@ -1348,7 +1330,7 @@ impl IUIAnimationStoryboard2 { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2737,7 +2719,7 @@ impl IUIAnimationVariable { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetVariableChangeHandler(&self, handler: P0) -> windows_core::Result<()> where @@ -2995,7 +2977,7 @@ impl IUIAnimationVariable2 { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).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 d894f22258..2c13af45e5 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs @@ -30,12 +30,9 @@ pub unsafe fn CMCheckColorsInGamut(hcmtransform: isize, lpargbtriple: *const sup CMCheckColorsInGamut(core::mem::transmute(hcmtransform), core::mem::transmute(lpargbtriple), core::mem::transmute(lparesult), core::mem::transmute(ncount)) } #[inline] -pub unsafe fn CMCheckRGBs(hcmtransform: isize, lpsrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwstride: u32, lparesult: *mut u8, pfncallback: LPBMCALLBACKFN, ulcallbackdata: P8) -> super::super::Foundation::BOOL -where - P8: windows_core::Param, -{ +pub unsafe fn CMCheckRGBs(hcmtransform: isize, lpsrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwstride: u32, lparesult: *mut u8, pfncallback: LPBMCALLBACKFN, ulcallbackdata: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMCheckRGBs(hcmtransform : isize, lpsrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwstride : u32, lparesult : *mut u8, pfncallback : LPBMCALLBACKFN, ulcallbackdata : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - CMCheckRGBs(core::mem::transmute(hcmtransform), core::mem::transmute(lpsrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwstride), core::mem::transmute(lparesult), core::mem::transmute(pfncallback), ulcallbackdata.param().abi()) + CMCheckRGBs(core::mem::transmute(hcmtransform), core::mem::transmute(lpsrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwstride), core::mem::transmute(lparesult), core::mem::transmute(pfncallback), core::mem::transmute(ulcallbackdata)) } #[inline] pub unsafe fn CMConvertColorNameToIndex(hprofile: isize, pacolorname: *const *const i8, paindex: *mut u32, dwcount: u32) -> super::super::Foundation::BOOL { @@ -119,12 +116,9 @@ pub unsafe fn CMTranslateColors(hcmtransform: isize, lpainputcolors: *const COLO CMTranslateColors(core::mem::transmute(hcmtransform), core::mem::transmute(lpainputcolors), core::mem::transmute(ncolors), core::mem::transmute(ctinput), core::mem::transmute(lpaoutputcolors), core::mem::transmute(ctoutput)) } #[inline] -pub unsafe fn CMTranslateRGB(hcmtransform: isize, colorref: P1, lpcolorref: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn CMTranslateRGB(hcmtransform: isize, colorref: super::super::Foundation::COLORREF, lpcolorref: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMTranslateRGB(hcmtransform : isize, colorref : super::super::Foundation:: COLORREF, lpcolorref : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CMTranslateRGB(core::mem::transmute(hcmtransform), colorref.param().abi(), core::mem::transmute(lpcolorref), core::mem::transmute(dwflags)) + CMTranslateRGB(core::mem::transmute(hcmtransform), core::mem::transmute(colorref), core::mem::transmute(lpcolorref), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn CMTranslateRGBs(hcmtransform: isize, lpsrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwstride: u32, lpdestbits: *mut core::ffi::c_void, bmoutput: BMFORMAT, dwtranslatedirection: u32) -> super::super::Foundation::BOOL { @@ -132,20 +126,14 @@ pub unsafe fn CMTranslateRGBs(hcmtransform: isize, lpsrcbits: *const core::ffi:: CMTranslateRGBs(core::mem::transmute(hcmtransform), core::mem::transmute(lpsrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwstride), core::mem::transmute(lpdestbits), core::mem::transmute(bmoutput), core::mem::transmute(dwtranslatedirection)) } #[inline] -pub unsafe fn CMTranslateRGBsExt(hcmtransform: isize, lpsrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwinputstride: u32, lpdestbits: *mut core::ffi::c_void, bmoutput: BMFORMAT, dwoutputstride: u32, lpfncallback: LPBMCALLBACKFN, ulcallbackdata: P10) -> super::super::Foundation::BOOL -where - P10: windows_core::Param, -{ +pub unsafe fn CMTranslateRGBsExt(hcmtransform: isize, lpsrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwinputstride: u32, lpdestbits: *mut core::ffi::c_void, bmoutput: BMFORMAT, dwoutputstride: u32, lpfncallback: LPBMCALLBACKFN, ulcallbackdata: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("icm32.dll" "system" fn CMTranslateRGBsExt(hcmtransform : isize, lpsrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwinputstride : u32, lpdestbits : *mut core::ffi::c_void, bmoutput : BMFORMAT, dwoutputstride : u32, lpfncallback : LPBMCALLBACKFN, ulcallbackdata : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - CMTranslateRGBsExt(core::mem::transmute(hcmtransform), core::mem::transmute(lpsrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwinputstride), core::mem::transmute(lpdestbits), core::mem::transmute(bmoutput), core::mem::transmute(dwoutputstride), core::mem::transmute(lpfncallback), ulcallbackdata.param().abi()) + CMTranslateRGBsExt(core::mem::transmute(hcmtransform), core::mem::transmute(lpsrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwinputstride), core::mem::transmute(lpdestbits), core::mem::transmute(bmoutput), core::mem::transmute(dwoutputstride), core::mem::transmute(lpfncallback), core::mem::transmute(ulcallbackdata)) } #[inline] -pub unsafe fn CheckBitmapBits(hcolortransform: isize, psrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwstride: u32, paresult: *mut u8, pfncallback: LPBMCALLBACKFN, lpcallbackdata: P8) -> super::super::Foundation::BOOL -where - P8: windows_core::Param, -{ +pub unsafe fn CheckBitmapBits(hcolortransform: isize, psrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwstride: u32, paresult: *mut u8, pfncallback: Option, lpcallbackdata: Option) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn CheckBitmapBits(hcolortransform : isize, psrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwstride : u32, paresult : *mut u8, pfncallback : LPBMCALLBACKFN, lpcallbackdata : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - CheckBitmapBits(core::mem::transmute(hcolortransform), core::mem::transmute(psrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwstride), core::mem::transmute(paresult), core::mem::transmute(pfncallback), lpcallbackdata.param().abi()) + CheckBitmapBits(core::mem::transmute(hcolortransform), core::mem::transmute(psrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwstride), core::mem::transmute(paresult), core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcallbackdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CheckColors(hcolortransform: isize, painputcolors: *const COLOR, ncolors: u32, ctinput: COLORTYPE, paresult: *mut u8) -> super::super::Foundation::BOOL { @@ -154,37 +142,26 @@ pub unsafe fn CheckColors(hcolortransform: isize, painputcolors: *const COLOR, n } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn CheckColorsInGamut(hdc: P0, lprgbtriple: *const super::super::Graphics::Gdi::RGBTRIPLE, dlpbuffer: *mut core::ffi::c_void, ncount: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn CheckColorsInGamut(hdc: super::super::Graphics::Gdi::HDC, lprgbtriple: *const super::super::Graphics::Gdi::RGBTRIPLE, dlpbuffer: *mut core::ffi::c_void, ncount: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn CheckColorsInGamut(hdc : super::super::Graphics::Gdi:: HDC, lprgbtriple : *const super::super::Graphics::Gdi:: RGBTRIPLE, dlpbuffer : *mut core::ffi::c_void, ncount : u32) -> super::super::Foundation:: BOOL); - CheckColorsInGamut(hdc.param().abi(), core::mem::transmute(lprgbtriple), core::mem::transmute(dlpbuffer), core::mem::transmute(ncount)) + CheckColorsInGamut(core::mem::transmute(hdc), core::mem::transmute(lprgbtriple), core::mem::transmute(dlpbuffer), core::mem::transmute(ncount)) } #[inline] -pub unsafe fn CloseColorProfile(hprofile: isize) -> super::super::Foundation::BOOL { +pub unsafe fn CloseColorProfile(hprofile: Option) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn CloseColorProfile(hprofile : isize) -> super::super::Foundation:: BOOL); - CloseColorProfile(core::mem::transmute(hprofile)) + CloseColorProfile(core::mem::transmute(hprofile.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ColorCorrectPalette(hdc: P0, hpal: P1, defirst: u32, num: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ColorCorrectPalette(hdc: super::super::Graphics::Gdi::HDC, hpal: super::super::Graphics::Gdi::HPALETTE, defirst: u32, num: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn ColorCorrectPalette(hdc : super::super::Graphics::Gdi:: HDC, hpal : super::super::Graphics::Gdi:: HPALETTE, defirst : u32, num : u32) -> super::super::Foundation:: BOOL); - ColorCorrectPalette(hdc.param().abi(), hpal.param().abi(), core::mem::transmute(defirst), core::mem::transmute(num)) + ColorCorrectPalette(core::mem::transmute(hdc), core::mem::transmute(hpal), core::mem::transmute(defirst), core::mem::transmute(num)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ColorMatchToTarget(hdc: P0, hdctarget: P1, action: COLOR_MATCH_TO_TARGET_ACTION) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ColorMatchToTarget(hdc: super::super::Graphics::Gdi::HDC, hdctarget: super::super::Graphics::Gdi::HDC, action: COLOR_MATCH_TO_TARGET_ACTION) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn ColorMatchToTarget(hdc : super::super::Graphics::Gdi:: HDC, hdctarget : super::super::Graphics::Gdi:: HDC, action : COLOR_MATCH_TO_TARGET_ACTION) -> super::super::Foundation:: BOOL); - ColorMatchToTarget(hdc.param().abi(), hdctarget.param().abi(), core::mem::transmute(action)) + ColorMatchToTarget(core::mem::transmute(hdc), core::mem::transmute(hdctarget), core::mem::transmute(action)) } #[inline] pub unsafe fn ColorProfileAddDisplayAssociation(scope: WCS_PROFILE_MANAGEMENT_SCOPE, profilename: P1, targetadapterid: super::super::Foundation::LUID, sourceid: u32, setasdefault: P4, associateasadvancedcolor: P5) -> windows_core::Result<()> @@ -287,12 +264,9 @@ pub unsafe fn CreateProfileFromLogColorSpaceW(plogcolorspace: *const LOGCOLORSPA CreateProfileFromLogColorSpaceW(core::mem::transmute(plogcolorspace), core::mem::transmute(pprofile)) } #[inline] -pub unsafe fn DeleteColorSpace(hcs: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteColorSpace(hcs: HCOLORSPACE) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn DeleteColorSpace(hcs : HCOLORSPACE) -> super::super::Foundation:: BOOL); - DeleteColorSpace(hcs.param().abi()) + DeleteColorSpace(core::mem::transmute(hcs)) } #[inline] pub unsafe fn DeleteColorTransform(hxform: isize) -> super::super::Foundation::BOOL { @@ -325,7 +299,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(), core::mem::transmute(penumrecord), core::mem::transmute(penumerationbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwsizeofenumerationbuffer), core::mem::transmute(pnprofiles.unwrap_or(core::ptr::null_mut()))) + EnumColorProfilesA(pmachinename.param().abi(), core::mem::transmute(penumrecord), core::mem::transmute(penumerationbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofenumerationbuffer), core::mem::transmute(pnprofiles.unwrap_or(core::mem::zeroed()))) } #[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,27 +307,19 @@ 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(), core::mem::transmute(penumrecord), core::mem::transmute(penumerationbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwsizeofenumerationbuffer), core::mem::transmute(pnprofiles.unwrap_or(core::ptr::null_mut()))) + EnumColorProfilesW(pmachinename.param().abi(), core::mem::transmute(penumrecord), core::mem::transmute(penumerationbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsizeofenumerationbuffer), core::mem::transmute(pnprofiles.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn EnumICMProfilesA(hdc: P0, proc: ICMENUMPROCA, param2: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EnumICMProfilesA(hdc: super::super::Graphics::Gdi::HDC, proc: ICMENUMPROCA, param2: Option) -> i32 { windows_targets::link!("gdi32.dll" "system" fn EnumICMProfilesA(hdc : super::super::Graphics::Gdi:: HDC, proc : ICMENUMPROCA, param2 : super::super::Foundation:: LPARAM) -> i32); - EnumICMProfilesA(hdc.param().abi(), core::mem::transmute(proc), param2.param().abi()) + EnumICMProfilesA(core::mem::transmute(hdc), core::mem::transmute(proc), core::mem::transmute(param2.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn EnumICMProfilesW(hdc: P0, proc: ICMENUMPROCW, param2: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EnumICMProfilesW(hdc: super::super::Graphics::Gdi::HDC, proc: ICMENUMPROCW, param2: Option) -> i32 { windows_targets::link!("gdi32.dll" "system" fn EnumICMProfilesW(hdc : super::super::Graphics::Gdi:: HDC, proc : ICMENUMPROCW, param2 : super::super::Foundation:: LPARAM) -> i32); - EnumICMProfilesW(hdc.param().abi(), core::mem::transmute(proc), param2.param().abi()) + EnumICMProfilesW(core::mem::transmute(hdc), core::mem::transmute(proc), core::mem::transmute(param2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn GetCMMInfo(hcolortransform: isize, param1: u32) -> u32 { @@ -361,25 +327,25 @@ pub unsafe fn GetCMMInfo(hcolortransform: isize, param1: u32) -> u32 { GetCMMInfo(core::mem::transmute(hcolortransform), core::mem::transmute(param1)) } #[inline] -pub unsafe fn GetColorDirectoryA(pmachinename: P0, pbuffer: windows_core::PSTR, pdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetColorDirectoryA(pmachinename: P0, pbuffer: Option, pdwsize: *mut u32) -> super::super::Foundation::BOOL where P0: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn GetColorDirectoryA(pmachinename : windows_core::PCSTR, pbuffer : windows_core::PSTR, pdwsize : *mut u32) -> super::super::Foundation:: BOOL); - GetColorDirectoryA(pmachinename.param().abi(), core::mem::transmute(pbuffer), core::mem::transmute(pdwsize)) + GetColorDirectoryA(pmachinename.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize)) } #[inline] -pub unsafe fn GetColorDirectoryW(pmachinename: P0, pbuffer: windows_core::PWSTR, pdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetColorDirectoryW(pmachinename: P0, pbuffer: Option, pdwsize: *mut u32) -> super::super::Foundation::BOOL where P0: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn GetColorDirectoryW(pmachinename : windows_core::PCWSTR, pbuffer : windows_core::PWSTR, pdwsize : *mut u32) -> super::super::Foundation:: BOOL); - GetColorDirectoryW(pmachinename.param().abi(), core::mem::transmute(pbuffer), core::mem::transmute(pdwsize)) + GetColorDirectoryW(pmachinename.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize)) } #[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(core::mem::transmute(hprofile), core::mem::transmute(tag), core::mem::transmute(dwoffset), core::mem::transmute(pcbelement), core::mem::transmute(pelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbreference)) + GetColorProfileElement(core::mem::transmute(hprofile), core::mem::transmute(tag), core::mem::transmute(dwoffset), core::mem::transmute(pcbelement), core::mem::transmute(pelement.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbreference)) } #[inline] pub unsafe fn GetColorProfileElementTag(hprofile: isize, dwindex: u32, ptag: *mut u32) -> super::super::Foundation::BOOL { @@ -389,7 +355,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(core::mem::transmute(hprofile), core::mem::transmute(pprofile.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbprofile)) + GetColorProfileFromHandle(core::mem::transmute(hprofile), core::mem::transmute(pprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbprofile)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -399,12 +365,9 @@ pub unsafe fn GetColorProfileHeader(hprofile: isize, pheader: *mut PROFILEHEADER } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetColorSpace(hdc: P0) -> HCOLORSPACE -where - P0: windows_core::Param, -{ +pub unsafe fn GetColorSpace(hdc: super::super::Graphics::Gdi::HDC) -> HCOLORSPACE { windows_targets::link!("gdi32.dll" "system" fn GetColorSpace(hdc : super::super::Graphics::Gdi:: HDC) -> HCOLORSPACE); - GetColorSpace(hdc.param().abi()) + GetColorSpace(core::mem::transmute(hdc)) } #[inline] pub unsafe fn GetCountColorProfileElements(hprofile: isize, pnelementcount: *mut u32) -> super::super::Foundation::BOOL { @@ -413,48 +376,33 @@ pub unsafe fn GetCountColorProfileElements(hprofile: isize, pnelementcount: *mut } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetDeviceGammaRamp(hdc: P0, lpramp: *mut core::ffi::c_void) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetDeviceGammaRamp(hdc: super::super::Graphics::Gdi::HDC, lpramp: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetDeviceGammaRamp(hdc : super::super::Graphics::Gdi:: HDC, lpramp : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetDeviceGammaRamp(hdc.param().abi(), core::mem::transmute(lpramp)) + GetDeviceGammaRamp(core::mem::transmute(hdc), core::mem::transmute(lpramp)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetICMProfileA(hdc: P0, pbufsize: *mut u32, pszfilename: windows_core::PSTR) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetICMProfileA(hdc: super::super::Graphics::Gdi::HDC, pbufsize: *mut u32, pszfilename: Option) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetICMProfileA(hdc : super::super::Graphics::Gdi:: HDC, pbufsize : *mut u32, pszfilename : windows_core::PSTR) -> super::super::Foundation:: BOOL); - GetICMProfileA(hdc.param().abi(), core::mem::transmute(pbufsize), core::mem::transmute(pszfilename)) + GetICMProfileA(core::mem::transmute(hdc), core::mem::transmute(pbufsize), core::mem::transmute(pszfilename.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetICMProfileW(hdc: P0, pbufsize: *mut u32, pszfilename: windows_core::PWSTR) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetICMProfileW(hdc: super::super::Graphics::Gdi::HDC, pbufsize: *mut u32, pszfilename: Option) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetICMProfileW(hdc : super::super::Graphics::Gdi:: HDC, pbufsize : *mut u32, pszfilename : windows_core::PWSTR) -> super::super::Foundation:: BOOL); - GetICMProfileW(hdc.param().abi(), core::mem::transmute(pbufsize), core::mem::transmute(pszfilename)) + GetICMProfileW(core::mem::transmute(hdc), core::mem::transmute(pbufsize), core::mem::transmute(pszfilename.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetLogColorSpaceA(hcolorspace: P0, lpbuffer: *mut LOGCOLORSPACEA, nsize: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetLogColorSpaceA(hcolorspace: HCOLORSPACE, lpbuffer: *mut LOGCOLORSPACEA, nsize: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetLogColorSpaceA(hcolorspace : HCOLORSPACE, lpbuffer : *mut LOGCOLORSPACEA, nsize : u32) -> super::super::Foundation:: BOOL); - GetLogColorSpaceA(hcolorspace.param().abi(), core::mem::transmute(lpbuffer), core::mem::transmute(nsize)) + GetLogColorSpaceA(core::mem::transmute(hcolorspace), core::mem::transmute(lpbuffer), core::mem::transmute(nsize)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetLogColorSpaceW(hcolorspace: P0, lpbuffer: *mut LOGCOLORSPACEW, nsize: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetLogColorSpaceW(hcolorspace: HCOLORSPACE, lpbuffer: *mut LOGCOLORSPACEW, nsize: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn GetLogColorSpaceW(hcolorspace : HCOLORSPACE, lpbuffer : *mut LOGCOLORSPACEW, nsize : u32) -> super::super::Foundation:: BOOL); - GetLogColorSpaceW(hcolorspace.param().abi(), core::mem::transmute(lpbuffer), core::mem::transmute(nsize)) + GetLogColorSpaceW(core::mem::transmute(hcolorspace), core::mem::transmute(lpbuffer), core::mem::transmute(nsize)) } #[inline] pub unsafe fn GetNamedProfileInfo(hprofile: isize, pnamedprofileinfo: *mut NAMED_PROFILE_INFO) -> super::super::Foundation::BOOL { @@ -464,33 +412,33 @@ 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(core::mem::transmute(hprofile), core::mem::transmute(dwintent), core::mem::transmute(pps2colorrenderingdictionary.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbps2colorrenderingdictionary), core::mem::transmute(pbbinary)) + GetPS2ColorRenderingDictionary(core::mem::transmute(hprofile), core::mem::transmute(dwintent), core::mem::transmute(pps2colorrenderingdictionary.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbps2colorrenderingdictionary), core::mem::transmute(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(core::mem::transmute(hprofile), core::mem::transmute(dwintent), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbps2colorrenderingintent)) + GetPS2ColorRenderingIntent(core::mem::transmute(hprofile), core::mem::transmute(dwintent), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(hprofile), core::mem::transmute(dwintent), core::mem::transmute(dwcsatype), core::mem::transmute(pps2colorspacearray.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbps2colorspacearray), core::mem::transmute(pbbinary)) + GetPS2ColorSpaceArray(core::mem::transmute(hprofile), core::mem::transmute(dwintent), core::mem::transmute(dwcsatype), core::mem::transmute(pps2colorspacearray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbps2colorspacearray), core::mem::transmute(pbbinary)) } #[inline] -pub unsafe fn GetStandardColorSpaceProfileA(pmachinename: P0, dwscs: u32, pbuffer: windows_core::PSTR, pcbsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetStandardColorSpaceProfileA(pmachinename: P0, dwscs: u32, pbuffer: Option, pcbsize: *mut u32) -> super::super::Foundation::BOOL where P0: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn GetStandardColorSpaceProfileA(pmachinename : windows_core::PCSTR, dwscs : u32, pbuffer : windows_core::PSTR, pcbsize : *mut u32) -> super::super::Foundation:: BOOL); - GetStandardColorSpaceProfileA(pmachinename.param().abi(), core::mem::transmute(dwscs), core::mem::transmute(pbuffer), core::mem::transmute(pcbsize)) + GetStandardColorSpaceProfileA(pmachinename.param().abi(), core::mem::transmute(dwscs), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize)) } #[inline] -pub unsafe fn GetStandardColorSpaceProfileW(pmachinename: P0, dwscs: u32, pbuffer: windows_core::PWSTR, pcbsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetStandardColorSpaceProfileW(pmachinename: P0, dwscs: u32, pbuffer: Option, pcbsize: *mut u32) -> super::super::Foundation::BOOL where P0: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn GetStandardColorSpaceProfileW(pmachinename : windows_core::PCWSTR, dwscs : u32, pbuffer : windows_core::PWSTR, pcbsize : *mut u32) -> super::super::Foundation:: BOOL); - GetStandardColorSpaceProfileW(pmachinename.param().abi(), core::mem::transmute(dwscs), core::mem::transmute(pbuffer), core::mem::transmute(pcbsize)) + GetStandardColorSpaceProfileW(pmachinename.param().abi(), core::mem::transmute(dwscs), core::mem::transmute(pbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize)) } #[inline] pub unsafe fn InstallColorProfileA(pmachinename: P0, pprofilename: P1) -> super::super::Foundation::BOOL @@ -576,51 +524,39 @@ pub unsafe fn SetColorProfileHeader(hprofile: isize, pheader: *const PROFILEHEAD } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetColorSpace(hdc: P0, hcs: P1) -> HCOLORSPACE -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetColorSpace(hdc: super::super::Graphics::Gdi::HDC, hcs: HCOLORSPACE) -> HCOLORSPACE { windows_targets::link!("gdi32.dll" "system" fn SetColorSpace(hdc : super::super::Graphics::Gdi:: HDC, hcs : HCOLORSPACE) -> HCOLORSPACE); - SetColorSpace(hdc.param().abi(), hcs.param().abi()) + SetColorSpace(core::mem::transmute(hdc), core::mem::transmute(hcs)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetDeviceGammaRamp(hdc: P0, lpramp: *const core::ffi::c_void) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetDeviceGammaRamp(hdc: super::super::Graphics::Gdi::HDC, lpramp: *const core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn SetDeviceGammaRamp(hdc : super::super::Graphics::Gdi:: HDC, lpramp : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetDeviceGammaRamp(hdc.param().abi(), core::mem::transmute(lpramp)) + SetDeviceGammaRamp(core::mem::transmute(hdc), core::mem::transmute(lpramp)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetICMMode(hdc: P0, mode: ICM_MODE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetICMMode(hdc: super::super::Graphics::Gdi::HDC, mode: ICM_MODE) -> i32 { windows_targets::link!("gdi32.dll" "system" fn SetICMMode(hdc : super::super::Graphics::Gdi:: HDC, mode : ICM_MODE) -> i32); - SetICMMode(hdc.param().abi(), core::mem::transmute(mode)) + SetICMMode(core::mem::transmute(hdc), core::mem::transmute(mode)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetICMProfileA(hdc: P0, lpfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetICMProfileA(hdc: super::super::Graphics::Gdi::HDC, lpfilename: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetICMProfileA(hdc : super::super::Graphics::Gdi:: HDC, lpfilename : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetICMProfileA(hdc.param().abi(), lpfilename.param().abi()) + SetICMProfileA(core::mem::transmute(hdc), lpfilename.param().abi()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetICMProfileW(hdc: P0, lpfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetICMProfileW(hdc: super::super::Graphics::Gdi::HDC, lpfilename: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetICMProfileW(hdc : super::super::Graphics::Gdi:: HDC, lpfilename : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetICMProfileW(hdc.param().abi(), lpfilename.param().abi()) + SetICMProfileW(core::mem::transmute(hdc), lpfilename.param().abi()) } #[inline] pub unsafe fn SetStandardColorSpaceProfileA(pmachinename: P0, dwprofileid: u32, pprofilename: P2) -> super::super::Foundation::BOOL @@ -653,12 +589,9 @@ pub unsafe fn SetupColorMatchingW(pcms: *mut COLORMATCHSETUPW) -> super::super:: SetupColorMatchingW(core::mem::transmute(pcms)) } #[inline] -pub unsafe fn TranslateBitmapBits(hcolortransform: isize, psrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwinputstride: u32, pdestbits: *mut core::ffi::c_void, bmoutput: BMFORMAT, dwoutputstride: u32, pfncallback: LPBMCALLBACKFN, ulcallbackdata: P10) -> super::super::Foundation::BOOL -where - P10: windows_core::Param, -{ +pub unsafe fn TranslateBitmapBits(hcolortransform: isize, psrcbits: *const core::ffi::c_void, bminput: BMFORMAT, dwwidth: u32, dwheight: u32, dwinputstride: u32, pdestbits: *mut core::ffi::c_void, bmoutput: BMFORMAT, dwoutputstride: u32, pfncallback: Option, ulcallbackdata: Option) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn TranslateBitmapBits(hcolortransform : isize, psrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwinputstride : u32, pdestbits : *mut core::ffi::c_void, bmoutput : BMFORMAT, dwoutputstride : u32, pfncallback : LPBMCALLBACKFN, ulcallbackdata : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - TranslateBitmapBits(core::mem::transmute(hcolortransform), core::mem::transmute(psrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwinputstride), core::mem::transmute(pdestbits), core::mem::transmute(bmoutput), core::mem::transmute(dwoutputstride), core::mem::transmute(pfncallback), ulcallbackdata.param().abi()) + TranslateBitmapBits(core::mem::transmute(hcolortransform), core::mem::transmute(psrcbits), core::mem::transmute(bminput), core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwinputstride), core::mem::transmute(pdestbits), core::mem::transmute(bmoutput), core::mem::transmute(dwoutputstride), core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulcallbackdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn TranslateColors(hcolortransform: isize, painputcolors: *const COLOR, ncolors: u32, ctinput: COLORTYPE, paoutputcolors: *mut COLOR, ctoutput: COLORTYPE) -> super::super::Foundation::BOOL { @@ -702,22 +635,22 @@ where UnregisterCMMW(pmachinename.param().abi(), core::mem::transmute(cmmid)) } #[inline] -pub unsafe fn UpdateICMRegKeyA(reserved: u32, lpszcmid: P1, lpszfilename: P2, command: ICM_COMMAND) -> super::super::Foundation::BOOL +pub unsafe fn UpdateICMRegKeyA(reserved: Option, lpszcmid: P1, lpszfilename: P2, command: ICM_COMMAND) -> super::super::Foundation::BOOL where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn UpdateICMRegKeyA(reserved : u32, lpszcmid : windows_core::PCSTR, lpszfilename : windows_core::PCSTR, command : ICM_COMMAND) -> super::super::Foundation:: BOOL); - UpdateICMRegKeyA(core::mem::transmute(reserved), lpszcmid.param().abi(), lpszfilename.param().abi(), core::mem::transmute(command)) + UpdateICMRegKeyA(core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpszcmid.param().abi(), lpszfilename.param().abi(), core::mem::transmute(command)) } #[inline] -pub unsafe fn UpdateICMRegKeyW(reserved: u32, lpszcmid: P1, lpszfilename: P2, command: ICM_COMMAND) -> super::super::Foundation::BOOL +pub unsafe fn UpdateICMRegKeyW(reserved: Option, lpszcmid: P1, lpszfilename: P2, command: ICM_COMMAND) -> super::super::Foundation::BOOL where P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn UpdateICMRegKeyW(reserved : u32, lpszcmid : windows_core::PCWSTR, lpszfilename : windows_core::PCWSTR, command : ICM_COMMAND) -> super::super::Foundation:: BOOL); - UpdateICMRegKeyW(core::mem::transmute(reserved), lpszcmid.param().abi(), lpszfilename.param().abi(), core::mem::transmute(command)) + UpdateICMRegKeyW(core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), lpszcmid.param().abi(), lpszfilename.param().abi(), core::mem::transmute(command)) } #[inline] pub unsafe fn WcsAssociateColorProfileWithDevice(scope: WCS_PROFILE_MANAGEMENT_SCOPE, pprofilename: P1, pdevicename: P2) -> super::super::Foundation::BOOL @@ -750,7 +683,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(core::mem::transmute(scope), core::mem::transmute(penumrecord), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pnprofiles.unwrap_or(core::ptr::null_mut()))) + WcsEnumColorProfiles(core::mem::transmute(scope), core::mem::transmute(penumrecord), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pnprofiles.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WcsEnumColorProfilesSize(scope: WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord: *const ENUMTYPEW, pdwsize: *mut u32) -> super::super::Foundation::BOOL { @@ -794,12 +727,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(core::mem::transmute(pcdmpprofile), core::mem::transmute(pcampprofile.unwrap_or(core::ptr::null())), core::mem::transmute(pgmmpprofile.unwrap_or(core::ptr::null())), core::mem::transmute(dwdesireaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationmode), core::mem::transmute(dwflags)) + WcsOpenColorProfileA(core::mem::transmute(pcdmpprofile), core::mem::transmute(pcampprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgmmpprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdesireaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationmode), core::mem::transmute(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(core::mem::transmute(pcdmpprofile), core::mem::transmute(pcampprofile.unwrap_or(core::ptr::null())), core::mem::transmute(pgmmpprofile.unwrap_or(core::ptr::null())), core::mem::transmute(dwdesireaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationmode), core::mem::transmute(dwflags)) + WcsOpenColorProfileW(core::mem::transmute(pcdmpprofile), core::mem::transmute(pcampprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgmmpprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdesireaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationmode), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn WcsSetCalibrationManagementState(bisenabled: P0) -> super::super::Foundation::BOOL diff --git a/crates/libs/windows/src/Windows/Win32/UI/Controls/Dialogs/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Controls/Dialogs/mod.rs index c1a3eac683..a34566fa6f 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/Dialogs/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/Dialogs/mod.rs @@ -801,13 +801,8 @@ impl IPrintDialogCallback { pub unsafe fn SelectionChange(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SelectionChange)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn HandleMessage(&self, hdlg: P0, umsg: u32, wparam: P2, lparam: P3, presult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).HandleMessage)(windows_core::Interface::as_raw(self), hdlg.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(presult)).ok() + pub unsafe fn HandleMessage(&self, hdlg: super::super::super::Foundation::HWND, umsg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM, presult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).HandleMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(hdlg), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(presult)).ok() } } #[repr(C)] @@ -855,11 +850,11 @@ impl IPrintDialogServices { pub unsafe fn GetCurrentDevMode(&self, pdevmode: *mut super::super::super::Graphics::Gdi::DEVMODEA, pcbsize: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetCurrentDevMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode), core::mem::transmute(pcbsize)).ok() } - pub unsafe fn GetCurrentPrinterName(&self, pprintername: windows_core::PWSTR, pcchsize: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentPrinterName)(windows_core::Interface::as_raw(self), core::mem::transmute(pprintername), core::mem::transmute(pcchsize)).ok() + pub unsafe fn GetCurrentPrinterName(&self, pprintername: Option, pcchsize: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCurrentPrinterName)(windows_core::Interface::as_raw(self), core::mem::transmute(pprintername.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsize)).ok() } - pub unsafe fn GetCurrentPortName(&self, pportname: windows_core::PWSTR, pcchsize: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentPortName)(windows_core::Interface::as_raw(self), core::mem::transmute(pportname), core::mem::transmute(pcchsize)).ok() + pub unsafe fn GetCurrentPortName(&self, pportname: Option, pcchsize: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCurrentPortName)(windows_core::Interface::as_raw(self), core::mem::transmute(pportname.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchsize)).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs index f0e3d78aaf..daba30214d 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs @@ -1499,12 +1499,11 @@ impl IRichEditOle { (windows_core::Interface::vtable(self).GetClipboardData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpchrg), core::mem::transmute(reco), core::mem::transmute(lplpdataobj)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn ImportDataObject(&self, lpdataobj: P0, cf: u16, hmetapict: P2) -> windows_core::Result<()> + pub unsafe fn ImportDataObject(&self, lpdataobj: P0, cf: u16, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ImportDataObject)(windows_core::Interface::as_raw(self), lpdataobj.param().abi(), core::mem::transmute(cf), hmetapict.param().abi()).ok() + (windows_core::Interface::vtable(self).ImportDataObject)(windows_core::Interface::as_raw(self), lpdataobj.param().abi(), core::mem::transmute(cf), core::mem::transmute(hmetapict)).ok() } } #[repr(C)] @@ -1696,13 +1695,12 @@ impl IRichEditOleCallback { (windows_core::Interface::vtable(self).DeleteObject)(windows_core::Interface::as_raw(self), lpoleobj.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_SystemServices"))] - pub unsafe fn QueryAcceptData(&self, lpdataobj: P0, lpcfformat: *mut u16, reco: super::super::super::System::SystemServices::RECO_FLAGS, freally: P3, hmetapict: P4) -> windows_core::Result<()> + pub unsafe fn QueryAcceptData(&self, lpdataobj: P0, lpcfformat: *mut u16, reco: super::super::super::System::SystemServices::RECO_FLAGS, freally: P3, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()> where P0: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).QueryAcceptData)(windows_core::Interface::as_raw(self), lpdataobj.param().abi(), core::mem::transmute(lpcfformat), core::mem::transmute(reco), freally.param().abi(), hmetapict.param().abi()).ok() + (windows_core::Interface::vtable(self).QueryAcceptData)(windows_core::Interface::as_raw(self), lpdataobj.param().abi(), core::mem::transmute(lpcfformat), core::mem::transmute(reco), freally.param().abi(), core::mem::transmute(hmetapict)).ok() } pub unsafe fn ContextSensitiveHelp(&self, fentermode: P0) -> windows_core::Result<()> where @@ -2907,11 +2905,8 @@ impl ITextDocument2Old { { (windows_core::Interface::vtable(self).AttachMsgFilter)(windows_core::Interface::as_raw(self), pfilter.param().abi()).ok() } - pub unsafe fn SetEffectColor(&self, index: i32, cr: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEffectColor)(windows_core::Interface::as_raw(self), core::mem::transmute(index), cr.param().abi()).ok() + pub unsafe fn SetEffectColor(&self, index: i32, cr: super::super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEffectColor)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(cr)).ok() } pub unsafe fn GetEffectColor(&self, index: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4692,11 +4687,8 @@ impl ITextHost { (windows_core::Interface::vtable(self).TxGetDC)(windows_core::Interface::as_raw(self)) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn TxReleaseDC(&self, hdc: P0) -> i32 - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxReleaseDC)(windows_core::Interface::as_raw(self), hdc.param().abi()) + pub unsafe fn TxReleaseDC(&self, hdc: super::super::super::Graphics::Gdi::HDC) -> i32 { + (windows_core::Interface::vtable(self).TxReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc)) } pub unsafe fn TxShowScrollBar(&self, fnbar: i32, fshow: P1) -> super::super::super::Foundation::BOOL where @@ -4733,11 +4725,8 @@ impl ITextHost { (windows_core::Interface::vtable(self).TxViewChange)(windows_core::Interface::as_raw(self), fupdate.param().abi()) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn TxCreateCaret(&self, hbmp: P0, xwidth: i32, yheight: i32) -> super::super::super::Foundation::BOOL - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxCreateCaret)(windows_core::Interface::as_raw(self), hbmp.param().abi(), core::mem::transmute(xwidth), core::mem::transmute(yheight)) + pub unsafe fn TxCreateCaret(&self, hbmp: super::super::super::Graphics::Gdi::HBITMAP, xwidth: i32, yheight: i32) -> super::super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).TxCreateCaret)(windows_core::Interface::as_raw(self), core::mem::transmute(hbmp), core::mem::transmute(xwidth), core::mem::transmute(yheight)) } pub unsafe fn TxShowCaret(&self, fshow: P0) -> super::super::super::Foundation::BOOL where @@ -4755,11 +4744,8 @@ impl ITextHost { (windows_core::Interface::vtable(self).TxKillTimer)(windows_core::Interface::as_raw(self), core::mem::transmute(idtimer)) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] - pub unsafe fn TxScrollWindowEx(&self, dx: i32, dy: i32, lprcscroll: *mut super::super::super::Foundation::RECT, lprcclip: *mut super::super::super::Foundation::RECT, hrgnupdate: P4, lprcupdate: *mut super::super::super::Foundation::RECT, fuscroll: super::super::WindowsAndMessaging::SCROLL_WINDOW_FLAGS) - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxScrollWindowEx)(windows_core::Interface::as_raw(self), core::mem::transmute(dx), core::mem::transmute(dy), core::mem::transmute(lprcscroll), core::mem::transmute(lprcclip), hrgnupdate.param().abi(), core::mem::transmute(lprcupdate), core::mem::transmute(fuscroll)) + pub unsafe fn TxScrollWindowEx(&self, dx: i32, dy: i32, lprcscroll: *mut super::super::super::Foundation::RECT, lprcclip: *mut super::super::super::Foundation::RECT, hrgnupdate: super::super::super::Graphics::Gdi::HRGN, lprcupdate: *mut super::super::super::Foundation::RECT, fuscroll: super::super::WindowsAndMessaging::SCROLL_WINDOW_FLAGS) { + (windows_core::Interface::vtable(self).TxScrollWindowEx)(windows_core::Interface::as_raw(self), core::mem::transmute(dx), core::mem::transmute(dy), core::mem::transmute(lprcscroll), core::mem::transmute(lprcclip), core::mem::transmute(hrgnupdate), core::mem::transmute(lprcupdate), core::mem::transmute(fuscroll)) } pub unsafe fn TxSetCapture(&self, fcapture: P0) where @@ -4771,12 +4757,11 @@ impl ITextHost { (windows_core::Interface::vtable(self).TxSetFocus)(windows_core::Interface::as_raw(self)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn TxSetCursor(&self, hcur: P0, ftext: P1) + pub unsafe fn TxSetCursor(&self, hcur: super::super::WindowsAndMessaging::HCURSOR, ftext: P1) where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).TxSetCursor)(windows_core::Interface::as_raw(self), hcur.param().abi(), ftext.param().abi()) + (windows_core::Interface::vtable(self).TxSetCursor)(windows_core::Interface::as_raw(self), core::mem::transmute(hcur), ftext.param().abi()) } pub unsafe fn TxScreenToClient(&self, lppt: *mut super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).TxScreenToClient)(windows_core::Interface::as_raw(self), core::mem::transmute(lppt)) @@ -4844,11 +4829,8 @@ impl ITextHost { (windows_core::Interface::vtable(self).TxImmGetContext)(windows_core::Interface::as_raw(self)) } #[cfg(feature = "Win32_UI_Input_Ime")] - pub unsafe fn TxImmReleaseContext(&self, himc: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxImmReleaseContext)(windows_core::Interface::as_raw(self), himc.param().abi()) + pub unsafe fn TxImmReleaseContext(&self, himc: super::super::Input::Ime::HIMC) { + (windows_core::Interface::vtable(self).TxImmReleaseContext)(windows_core::Interface::as_raw(self), core::mem::transmute(himc)) } pub unsafe fn TxGetSelectionBarWidth(&self, lselbarwidth: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TxGetSelectionBarWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(lselbarwidth)).ok() @@ -5212,12 +5194,11 @@ impl ITextHost2 { (windows_core::Interface::vtable(self).TxGetEastAsianFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pflags)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn TxSetCursor2(&self, hcur: P0, btext: P1) -> super::super::WindowsAndMessaging::HCURSOR + pub unsafe fn TxSetCursor2(&self, hcur: super::super::WindowsAndMessaging::HCURSOR, btext: P1) -> super::super::WindowsAndMessaging::HCURSOR where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).TxSetCursor2)(windows_core::Interface::as_raw(self), hcur.param().abi(), btext.param().abi()) + (windows_core::Interface::vtable(self).TxSetCursor2)(windows_core::Interface::as_raw(self), core::mem::transmute(hcur), btext.param().abi()) } pub unsafe fn TxFreeTextServicesNotification(&self) { (windows_core::Interface::vtable(self).TxFreeTextServicesNotification)(windows_core::Interface::as_raw(self)) @@ -5229,12 +5210,11 @@ impl ITextHost2 { (windows_core::Interface::vtable(self).TxGetWindowStyles)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstyle), core::mem::transmute(pdwexstyle)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn TxShowDropCaret(&self, fshow: P0, hdc: P1, prc: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> + pub unsafe fn TxShowDropCaret(&self, fshow: P0, hdc: super::super::super::Graphics::Gdi::HDC, prc: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).TxShowDropCaret)(windows_core::Interface::as_raw(self), fshow.param().abi(), hdc.param().abi(), core::mem::transmute(prc)).ok() + (windows_core::Interface::vtable(self).TxShowDropCaret)(windows_core::Interface::as_raw(self), fshow.param().abi(), core::mem::transmute(hdc), core::mem::transmute(prc)).ok() } pub unsafe fn TxDestroyCaret(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TxDestroyCaret)(windows_core::Interface::as_raw(self)).ok() @@ -8591,20 +8571,12 @@ impl windows_core::RuntimeName for ITextSelection2 {} windows_core::imp::define_interface!(ITextServices, ITextServices_Vtbl, 0); windows_core::imp::interface_hierarchy!(ITextServices, windows_core::IUnknown); impl ITextServices { - pub unsafe fn TxSendMessage(&self, msg: u32, wparam: P1, lparam: P2, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxSendMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(plresult)).ok() + pub unsafe fn TxSendMessage(&self, msg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TxSendMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(plresult)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] - pub unsafe fn TxDraw(&self, dwdrawaspect: super::super::super::System::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, hdcdraw: P4, hictargetdev: P5, lprcbounds: *mut super::super::super::Foundation::RECTL, lprcwbounds: *mut super::super::super::Foundation::RECTL, lprcupdate: *mut super::super::super::Foundation::RECT, pfncontinue: isize, dwcontinue: u32, lviewid: i32) -> windows_core::Result<()> - where - P4: windows_core::Param, - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(pvaspect), core::mem::transmute(ptd), hdcdraw.param().abi(), hictargetdev.param().abi(), core::mem::transmute(lprcbounds), core::mem::transmute(lprcwbounds), core::mem::transmute(lprcupdate), core::mem::transmute(pfncontinue), core::mem::transmute(dwcontinue), core::mem::transmute(lviewid)).ok() + pub unsafe fn TxDraw(&self, dwdrawaspect: super::super::super::System::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, hdcdraw: super::super::super::Graphics::Gdi::HDC, hictargetdev: super::super::super::Graphics::Gdi::HDC, lprcbounds: *mut super::super::super::Foundation::RECTL, lprcwbounds: *mut super::super::super::Foundation::RECTL, lprcupdate: *mut super::super::super::Foundation::RECT, pfncontinue: isize, dwcontinue: u32, lviewid: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TxDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(pvaspect), core::mem::transmute(ptd), core::mem::transmute(hdcdraw), core::mem::transmute(hictargetdev), core::mem::transmute(lprcbounds), core::mem::transmute(lprcwbounds), core::mem::transmute(lprcupdate), core::mem::transmute(pfncontinue), core::mem::transmute(dwcontinue), core::mem::transmute(lviewid)).ok() } pub unsafe fn TxGetHScroll(&self, plmin: *mut i32, plmax: *mut i32, plpos: *mut i32, plpage: *mut i32, pfenabled: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TxGetHScroll)(windows_core::Interface::as_raw(self), core::mem::transmute(plmin), core::mem::transmute(plmax), core::mem::transmute(plpos), core::mem::transmute(plpage), core::mem::transmute(pfenabled)).ok() @@ -8613,20 +8585,12 @@ impl ITextServices { (windows_core::Interface::vtable(self).TxGetVScroll)(windows_core::Interface::as_raw(self), core::mem::transmute(plmin), core::mem::transmute(plmax), core::mem::transmute(plpos), core::mem::transmute(plpage), core::mem::transmute(pfenabled)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] - pub unsafe fn OnTxSetCursor(&self, dwdrawaspect: super::super::super::System::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, hdcdraw: P4, hictargetdev: P5, lprcclient: *mut super::super::super::Foundation::RECT, x: i32, y: i32) -> windows_core::Result<()> - where - P4: windows_core::Param, - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnTxSetCursor)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(pvaspect), core::mem::transmute(ptd), hdcdraw.param().abi(), hictargetdev.param().abi(), core::mem::transmute(lprcclient), core::mem::transmute(x), core::mem::transmute(y)).ok() + pub unsafe fn OnTxSetCursor(&self, dwdrawaspect: super::super::super::System::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, hdcdraw: super::super::super::Graphics::Gdi::HDC, hictargetdev: super::super::super::Graphics::Gdi::HDC, lprcclient: *mut super::super::super::Foundation::RECT, x: i32, y: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnTxSetCursor)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(pvaspect), core::mem::transmute(ptd), core::mem::transmute(hdcdraw), core::mem::transmute(hictargetdev), core::mem::transmute(lprcclient), core::mem::transmute(x), core::mem::transmute(y)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] - pub unsafe fn TxQueryHitPoint(&self, dwdrawaspect: super::super::super::System::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, hdcdraw: P4, hictargetdev: P5, lprcclient: *mut super::super::super::Foundation::RECT, x: i32, y: i32, phitresult: *mut u32) -> windows_core::Result<()> - where - P4: windows_core::Param, - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxQueryHitPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(pvaspect), core::mem::transmute(ptd), hdcdraw.param().abi(), hictargetdev.param().abi(), core::mem::transmute(lprcclient), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(phitresult)).ok() + pub unsafe fn TxQueryHitPoint(&self, dwdrawaspect: super::super::super::System::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, hdcdraw: super::super::super::Graphics::Gdi::HDC, hictargetdev: super::super::super::Graphics::Gdi::HDC, lprcclient: *mut super::super::super::Foundation::RECT, x: i32, y: i32, phitresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TxQueryHitPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdrawaspect), core::mem::transmute(lindex), core::mem::transmute(pvaspect), core::mem::transmute(ptd), core::mem::transmute(hdcdraw), core::mem::transmute(hictargetdev), core::mem::transmute(lprcclient), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(phitresult)).ok() } pub unsafe fn OnTxInPlaceActivate(&self, prcclient: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnTxInPlaceActivate)(windows_core::Interface::as_raw(self), core::mem::transmute(prcclient)).ok() @@ -8656,12 +8620,8 @@ impl ITextServices { (windows_core::Interface::vtable(self).TxGetBaseLinePos)(windows_core::Interface::as_raw(self), core::mem::transmute(param0)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] - pub unsafe fn TxGetNaturalSize(&self, dwaspect: u32, hdcdraw: P1, hictargetdev: P2, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, dwmode: u32, psizelextent: *const super::super::super::Foundation::SIZE, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxGetNaturalSize)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaspect), hdcdraw.param().abi(), hictargetdev.param().abi(), core::mem::transmute(ptd), core::mem::transmute(dwmode), core::mem::transmute(psizelextent), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() + pub unsafe fn TxGetNaturalSize(&self, dwaspect: u32, hdcdraw: super::super::super::Graphics::Gdi::HDC, hictargetdev: super::super::super::Graphics::Gdi::HDC, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, dwmode: u32, psizelextent: *const super::super::super::Foundation::SIZE, pwidth: *mut i32, pheight: *mut i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TxGetNaturalSize)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaspect), core::mem::transmute(hdcdraw), core::mem::transmute(hictargetdev), core::mem::transmute(ptd), core::mem::transmute(dwmode), core::mem::transmute(psizelextent), core::mem::transmute(pwidth), core::mem::transmute(pheight)).ok() } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn TxGetDropTarget(&self) -> windows_core::Result { @@ -8852,12 +8812,8 @@ impl core::ops::Deref for ITextServices2 { windows_core::imp::interface_hierarchy!(ITextServices2, windows_core::IUnknown, ITextServices); impl ITextServices2 { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] - pub unsafe fn TxGetNaturalSize2(&self, dwaspect: u32, hdcdraw: P1, hictargetdev: P2, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, dwmode: u32, psizelextent: *const super::super::super::Foundation::SIZE, pwidth: *mut i32, pheight: *mut i32, pascent: *mut i32) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxGetNaturalSize2)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaspect), hdcdraw.param().abi(), hictargetdev.param().abi(), core::mem::transmute(ptd), core::mem::transmute(dwmode), core::mem::transmute(psizelextent), core::mem::transmute(pwidth), core::mem::transmute(pheight), core::mem::transmute(pascent)).ok() + pub unsafe fn TxGetNaturalSize2(&self, dwaspect: u32, hdcdraw: super::super::super::Graphics::Gdi::HDC, hictargetdev: super::super::super::Graphics::Gdi::HDC, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, dwmode: u32, psizelextent: *const super::super::super::Foundation::SIZE, pwidth: *mut i32, pheight: *mut i32, pascent: *mut i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TxGetNaturalSize2)(windows_core::Interface::as_raw(self), core::mem::transmute(dwaspect), core::mem::transmute(hdcdraw), core::mem::transmute(hictargetdev), core::mem::transmute(ptd), core::mem::transmute(dwmode), core::mem::transmute(psizelextent), core::mem::transmute(pwidth), core::mem::transmute(pheight), core::mem::transmute(pascent)).ok() } #[cfg(feature = "Win32_Graphics_Direct2D")] pub unsafe fn TxDrawD2D(&self, prendertarget: P0, lprcbounds: *mut super::super::super::Foundation::RECTL, lprcupdate: *mut super::super::super::Foundation::RECT, lviewid: i32) -> windows_core::Result<()> 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 948975456e..706da60103 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs @@ -4,35 +4,25 @@ pub mod Dialogs; pub mod RichEdit; #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn BeginBufferedAnimation(hwnd: P0, hdctarget: P1, prctarget: *const super::super::Foundation::RECT, dwformat: BP_BUFFERFORMAT, ppaintparams: Option<*const BP_PAINTPARAMS>, panimationparams: *const BP_ANIMATIONPARAMS, phdcfrom: *mut super::super::Graphics::Gdi::HDC, phdcto: *mut super::super::Graphics::Gdi::HDC) -> isize -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn BeginBufferedAnimation(hwnd: super::super::Foundation::HWND, hdctarget: super::super::Graphics::Gdi::HDC, prctarget: *const super::super::Foundation::RECT, dwformat: BP_BUFFERFORMAT, ppaintparams: Option<*const BP_PAINTPARAMS>, panimationparams: *const BP_ANIMATIONPARAMS, phdcfrom: *mut super::super::Graphics::Gdi::HDC, phdcto: *mut super::super::Graphics::Gdi::HDC) -> isize { 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(), core::mem::transmute(prctarget), core::mem::transmute(dwformat), core::mem::transmute(ppaintparams.unwrap_or(core::ptr::null())), core::mem::transmute(panimationparams), core::mem::transmute(phdcfrom), core::mem::transmute(phdcto)) + BeginBufferedAnimation(core::mem::transmute(hwnd), core::mem::transmute(hdctarget), core::mem::transmute(prctarget), core::mem::transmute(dwformat), core::mem::transmute(ppaintparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(panimationparams), core::mem::transmute(phdcfrom), core::mem::transmute(phdcto)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn BeginBufferedPaint(hdctarget: P0, prctarget: *const super::super::Foundation::RECT, dwformat: BP_BUFFERFORMAT, ppaintparams: Option<*const BP_PAINTPARAMS>, phdc: *mut super::super::Graphics::Gdi::HDC) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn BeginBufferedPaint(hdctarget: super::super::Graphics::Gdi::HDC, prctarget: *const super::super::Foundation::RECT, dwformat: BP_BUFFERFORMAT, ppaintparams: Option<*const BP_PAINTPARAMS>, phdc: *mut super::super::Graphics::Gdi::HDC) -> isize { 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(), core::mem::transmute(prctarget), core::mem::transmute(dwformat), core::mem::transmute(ppaintparams.unwrap_or(core::ptr::null())), core::mem::transmute(phdc)) + BeginBufferedPaint(core::mem::transmute(hdctarget), core::mem::transmute(prctarget), core::mem::transmute(dwformat), core::mem::transmute(ppaintparams.unwrap_or(core::mem::zeroed())), core::mem::transmute(phdc)) } #[inline] -pub unsafe fn BeginPanningFeedback(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn BeginPanningFeedback(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("uxtheme.dll" "system" fn BeginPanningFeedback(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - BeginPanningFeedback(hwnd.param().abi()) + BeginPanningFeedback(core::mem::transmute(hwnd)) } #[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(core::mem::transmute(hbufferedpaint), core::mem::transmute(prc.unwrap_or(core::ptr::null()))).ok() + BufferedPaintClear(core::mem::transmute(hbufferedpaint), core::mem::transmute(prc.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn BufferedPaintInit() -> windows_core::Result<()> { @@ -41,26 +31,19 @@ pub unsafe fn BufferedPaintInit() -> windows_core::Result<()> { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn BufferedPaintRenderAnimation(hwnd: P0, hdctarget: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn BufferedPaintRenderAnimation(hwnd: super::super::Foundation::HWND, hdctarget: super::super::Graphics::Gdi::HDC) -> super::super::Foundation::BOOL { windows_targets::link!("uxtheme.dll" "system" fn BufferedPaintRenderAnimation(hwnd : super::super::Foundation:: HWND, hdctarget : super::super::Graphics::Gdi:: HDC) -> super::super::Foundation:: BOOL); - BufferedPaintRenderAnimation(hwnd.param().abi(), hdctarget.param().abi()) + BufferedPaintRenderAnimation(core::mem::transmute(hwnd), core::mem::transmute(hdctarget)) } #[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(core::mem::transmute(hbufferedpaint), core::mem::transmute(prc.unwrap_or(core::ptr::null())), core::mem::transmute(alpha)).ok() + BufferedPaintSetAlpha(core::mem::transmute(hbufferedpaint), core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), core::mem::transmute(alpha)).ok() } #[inline] -pub unsafe fn BufferedPaintStopAllAnimations(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BufferedPaintStopAllAnimations(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn BufferedPaintStopAllAnimations(hwnd : super::super::Foundation:: HWND) -> windows_core::HRESULT); - BufferedPaintStopAllAnimations(hwnd.param().abi()).ok() + BufferedPaintStopAllAnimations(core::mem::transmute(hwnd)).ok() } #[inline] pub unsafe fn BufferedPaintUnInit() -> windows_core::Result<()> { @@ -68,37 +51,25 @@ pub unsafe fn BufferedPaintUnInit() -> windows_core::Result<()> { BufferedPaintUnInit().ok() } #[inline] -pub unsafe fn CheckDlgButton(hdlg: P0, nidbutton: i32, ucheck: DLG_BUTTON_CHECK_STATE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CheckDlgButton(hdlg: super::super::Foundation::HWND, nidbutton: i32, ucheck: DLG_BUTTON_CHECK_STATE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CheckDlgButton(hdlg : super::super::Foundation:: HWND, nidbutton : i32, ucheck : DLG_BUTTON_CHECK_STATE) -> super::super::Foundation:: BOOL); - CheckDlgButton(hdlg.param().abi(), core::mem::transmute(nidbutton), core::mem::transmute(ucheck)).ok() + CheckDlgButton(core::mem::transmute(hdlg), core::mem::transmute(nidbutton), core::mem::transmute(ucheck)).ok() } #[inline] -pub unsafe fn CheckRadioButton(hdlg: P0, nidfirstbutton: i32, nidlastbutton: i32, nidcheckbutton: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CheckRadioButton(hdlg: super::super::Foundation::HWND, nidfirstbutton: i32, nidlastbutton: i32, nidcheckbutton: i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CheckRadioButton(hdlg : super::super::Foundation:: HWND, nidfirstbutton : i32, nidlastbutton : i32, nidcheckbutton : i32) -> super::super::Foundation:: BOOL); - CheckRadioButton(hdlg.param().abi(), core::mem::transmute(nidfirstbutton), core::mem::transmute(nidlastbutton), core::mem::transmute(nidcheckbutton)).ok() + CheckRadioButton(core::mem::transmute(hdlg), core::mem::transmute(nidfirstbutton), core::mem::transmute(nidlastbutton), core::mem::transmute(nidcheckbutton)).ok() } #[inline] -pub unsafe fn CloseThemeData(htheme: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseThemeData(htheme: HTHEME) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn CloseThemeData(htheme : HTHEME) -> windows_core::HRESULT); - CloseThemeData(htheme.param().abi()).ok() + CloseThemeData(core::mem::transmute(htheme)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn CreateMappedBitmap(hinstance: P0, idbitmap: isize, wflags: u32, lpcolormap: Option<*const COLORMAP>, inummaps: i32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CreateMappedBitmap(hinstance: super::super::Foundation::HINSTANCE, idbitmap: isize, wflags: u32, lpcolormap: Option<*const COLORMAP>, inummaps: i32) -> windows_core::Result { 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(), core::mem::transmute(idbitmap), core::mem::transmute(wflags), core::mem::transmute(lpcolormap.unwrap_or(core::ptr::null())), core::mem::transmute(inummaps)); + let result__ = CreateMappedBitmap(core::mem::transmute(hinstance), core::mem::transmute(idbitmap), core::mem::transmute(wflags), core::mem::transmute(lpcolormap.unwrap_or(core::mem::zeroed())), core::mem::transmute(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"))] @@ -114,23 +85,21 @@ pub unsafe fn CreatePropertySheetPageW(constpropsheetpagepointer: *mut PROPSHEET CreatePropertySheetPageW(core::mem::transmute(constpropsheetpagepointer)) } #[inline] -pub unsafe fn CreateStatusWindowA(style: i32, lpsztext: P1, hwndparent: P2, wid: u32) -> windows_core::Result +pub unsafe fn CreateStatusWindowA(style: i32, lpsztext: P1, hwndparent: super::super::Foundation::HWND, wid: u32) -> windows_core::Result where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn CreateStatusWindowA(style : i32, lpsztext : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, wid : u32) -> super::super::Foundation:: HWND); - let result__ = CreateStatusWindowA(core::mem::transmute(style), lpsztext.param().abi(), hwndparent.param().abi(), core::mem::transmute(wid)); + let result__ = CreateStatusWindowA(core::mem::transmute(style), lpsztext.param().abi(), core::mem::transmute(hwndparent), core::mem::transmute(wid)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateStatusWindowW(style: i32, lpsztext: P1, hwndparent: P2, wid: u32) -> windows_core::Result +pub unsafe fn CreateStatusWindowW(style: i32, lpsztext: P1, hwndparent: super::super::Foundation::HWND, wid: u32) -> windows_core::Result where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn CreateStatusWindowW(style : i32, lpsztext : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, wid : u32) -> super::super::Foundation:: HWND); - let result__ = CreateStatusWindowW(core::mem::transmute(style), lpsztext.param().abi(), hwndparent.param().abi(), core::mem::transmute(wid)); + let result__ = CreateStatusWindowW(core::mem::transmute(style), lpsztext.param().abi(), core::mem::transmute(hwndparent), core::mem::transmute(wid)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -141,33 +110,20 @@ pub unsafe fn CreateSyntheticPointerDevice(pointertype: super::WindowsAndMessagi (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateToolbarEx(hwnd: P0, ws: u32, wid: u32, nbitmaps: i32, hbminst: P4, wbmid: usize, lpbuttons: *mut TBBUTTON, inumbuttons: i32, dxbutton: i32, dybutton: i32, dxbitmap: i32, dybitmap: i32, ustructsize: u32) -> windows_core::Result -where - P0: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn CreateToolbarEx(hwnd: super::super::Foundation::HWND, ws: u32, wid: u32, nbitmaps: i32, hbminst: super::super::Foundation::HINSTANCE, wbmid: usize, lpbuttons: *mut TBBUTTON, inumbuttons: i32, dxbutton: i32, dybutton: i32, dxbitmap: i32, dybitmap: i32, ustructsize: u32) -> windows_core::Result { windows_targets::link!("comctl32.dll" "system" fn CreateToolbarEx(hwnd : super::super::Foundation:: HWND, ws : u32, wid : u32, nbitmaps : i32, hbminst : super::super::Foundation:: HINSTANCE, wbmid : usize, lpbuttons : *mut TBBUTTON, inumbuttons : i32, dxbutton : i32, dybutton : i32, dxbitmap : i32, dybitmap : i32, ustructsize : u32) -> super::super::Foundation:: HWND); - let result__ = CreateToolbarEx(hwnd.param().abi(), core::mem::transmute(ws), core::mem::transmute(wid), core::mem::transmute(nbitmaps), hbminst.param().abi(), core::mem::transmute(wbmid), core::mem::transmute(lpbuttons), core::mem::transmute(inumbuttons), core::mem::transmute(dxbutton), core::mem::transmute(dybutton), core::mem::transmute(dxbitmap), core::mem::transmute(dybitmap), core::mem::transmute(ustructsize)); + let result__ = CreateToolbarEx(core::mem::transmute(hwnd), core::mem::transmute(ws), core::mem::transmute(wid), core::mem::transmute(nbitmaps), core::mem::transmute(hbminst), core::mem::transmute(wbmid), core::mem::transmute(lpbuttons), core::mem::transmute(inumbuttons), core::mem::transmute(dxbutton), core::mem::transmute(dybutton), core::mem::transmute(dxbitmap), core::mem::transmute(dybitmap), core::mem::transmute(ustructsize)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateUpDownControl(dwstyle: u32, x: i32, y: i32, cx: i32, cy: i32, hparent: P5, nid: i32, hinst: P7, hbuddy: P8, nupper: i32, nlower: i32, npos: i32) -> super::super::Foundation::HWND -where - P5: windows_core::Param, - P7: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn CreateUpDownControl(dwstyle: u32, x: i32, y: i32, cx: i32, cy: i32, hparent: super::super::Foundation::HWND, nid: i32, hinst: super::super::Foundation::HINSTANCE, hbuddy: super::super::Foundation::HWND, nupper: i32, nlower: i32, npos: i32) -> super::super::Foundation::HWND { windows_targets::link!("comctl32.dll" "system" fn CreateUpDownControl(dwstyle : u32, x : i32, y : i32, cx : i32, cy : i32, hparent : super::super::Foundation:: HWND, nid : i32, hinst : super::super::Foundation:: HINSTANCE, hbuddy : super::super::Foundation:: HWND, nupper : i32, nlower : i32, npos : i32) -> super::super::Foundation:: HWND); - CreateUpDownControl(core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), hparent.param().abi(), core::mem::transmute(nid), hinst.param().abi(), hbuddy.param().abi(), core::mem::transmute(nupper), core::mem::transmute(nlower), core::mem::transmute(npos)) + CreateUpDownControl(core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(hparent), core::mem::transmute(nid), core::mem::transmute(hinst), core::mem::transmute(hbuddy), core::mem::transmute(nupper), core::mem::transmute(nlower), core::mem::transmute(npos)) } #[inline] -pub unsafe fn DPA_Clone(hdpa: P0, hdpanew: P1) -> HDPA -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DPA_Clone(hdpa: HDPA, hdpanew: Option) -> HDPA { windows_targets::link!("comctl32.dll" "system" fn DPA_Clone(hdpa : HDPA, hdpanew : HDPA) -> HDPA); - DPA_Clone(hdpa.param().abi(), hdpanew.param().abi()) + DPA_Clone(core::mem::transmute(hdpa), core::mem::transmute(hdpanew.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn DPA_Create(citemgrow: i32) -> HDPA { @@ -175,92 +131,59 @@ pub unsafe fn DPA_Create(citemgrow: i32) -> HDPA { DPA_Create(core::mem::transmute(citemgrow)) } #[inline] -pub unsafe fn DPA_CreateEx(cpgrow: i32, hheap: P1) -> HDPA -where - P1: windows_core::Param, -{ +pub unsafe fn DPA_CreateEx(cpgrow: i32, hheap: Option) -> HDPA { windows_targets::link!("comctl32.dll" "system" fn DPA_CreateEx(cpgrow : i32, hheap : super::super::Foundation:: HANDLE) -> HDPA); - DPA_CreateEx(core::mem::transmute(cpgrow), hheap.param().abi()) + DPA_CreateEx(core::mem::transmute(cpgrow), core::mem::transmute(hheap.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DPA_DeleteAllPtrs(hdpa: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_DeleteAllPtrs(hdpa: HDPA) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DPA_DeleteAllPtrs(hdpa : HDPA) -> super::super::Foundation:: BOOL); - DPA_DeleteAllPtrs(hdpa.param().abi()) + DPA_DeleteAllPtrs(core::mem::transmute(hdpa)) } #[inline] -pub unsafe fn DPA_DeletePtr(hdpa: P0, i: i32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_DeletePtr(hdpa: HDPA, i: i32) -> *mut core::ffi::c_void { windows_targets::link!("comctl32.dll" "system" fn DPA_DeletePtr(hdpa : HDPA, i : i32) -> *mut core::ffi::c_void); - DPA_DeletePtr(hdpa.param().abi(), core::mem::transmute(i)) + DPA_DeletePtr(core::mem::transmute(hdpa), core::mem::transmute(i)) } #[inline] -pub unsafe fn DPA_Destroy(hdpa: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_Destroy(hdpa: Option) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DPA_Destroy(hdpa : HDPA) -> super::super::Foundation:: BOOL); - DPA_Destroy(hdpa.param().abi()) + DPA_Destroy(core::mem::transmute(hdpa.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DPA_DestroyCallback(hdpa: P0, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_DestroyCallback(hdpa: Option, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) { windows_targets::link!("comctl32.dll" "system" fn DPA_DestroyCallback(hdpa : HDPA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); - DPA_DestroyCallback(hdpa.param().abi(), core::mem::transmute(pfncb), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))) + DPA_DestroyCallback(core::mem::transmute(hdpa.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfncb), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DPA_EnumCallback(hdpa: P0, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_EnumCallback(hdpa: Option, pfncb: Option, pdata: Option<*const core::ffi::c_void>) { windows_targets::link!("comctl32.dll" "system" fn DPA_EnumCallback(hdpa : HDPA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); - DPA_EnumCallback(hdpa.param().abi(), core::mem::transmute(pfncb), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))) + DPA_EnumCallback(core::mem::transmute(hdpa.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfncb.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DPA_GetPtr(hdpa: P0, i: isize) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_GetPtr(hdpa: HDPA, i: isize) -> *mut core::ffi::c_void { windows_targets::link!("comctl32.dll" "system" fn DPA_GetPtr(hdpa : HDPA, i : isize) -> *mut core::ffi::c_void); - DPA_GetPtr(hdpa.param().abi(), core::mem::transmute(i)) + DPA_GetPtr(core::mem::transmute(hdpa), core::mem::transmute(i)) } #[inline] -pub unsafe fn DPA_GetPtrIndex(hdpa: P0, p: Option<*const core::ffi::c_void>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_GetPtrIndex(hdpa: HDPA, p: Option<*const core::ffi::c_void>) -> i32 { 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(core::ptr::null()))) + DPA_GetPtrIndex(core::mem::transmute(hdpa), core::mem::transmute(p.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DPA_GetSize(hdpa: P0) -> u64 -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_GetSize(hdpa: Option) -> u64 { windows_targets::link!("comctl32.dll" "system" fn DPA_GetSize(hdpa : HDPA) -> u64); - DPA_GetSize(hdpa.param().abi()) + DPA_GetSize(core::mem::transmute(hdpa.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DPA_Grow(pdpa: P0, cp: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_Grow(pdpa: HDPA, cp: i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DPA_Grow(pdpa : HDPA, cp : i32) -> super::super::Foundation:: BOOL); - DPA_Grow(pdpa.param().abi(), core::mem::transmute(cp)) + DPA_Grow(core::mem::transmute(pdpa), core::mem::transmute(cp)) } #[inline] -pub unsafe fn DPA_InsertPtr(hdpa: P0, i: i32, p: Option<*const core::ffi::c_void>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_InsertPtr(hdpa: HDPA, i: i32, p: Option<*const core::ffi::c_void>) -> i32 { 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(), core::mem::transmute(i), core::mem::transmute(p.unwrap_or(core::ptr::null()))) + DPA_InsertPtr(core::mem::transmute(hdpa), core::mem::transmute(i), core::mem::transmute(p.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -269,61 +192,41 @@ where P2: 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(core::mem::transmute(phdpa), core::mem::transmute(pfn), pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(core::ptr::null()))).ok() + DPA_LoadStream(core::mem::transmute(phdpa), core::mem::transmute(pfn), pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DPA_Merge(hdpadest: P0, hdpasrc: P1, dwflags: u32, pfncompare: PFNDACOMPARE, pfnmerge: PFNDPAMERGE, lparam: P5) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn DPA_Merge(hdpadest: HDPA, hdpasrc: HDPA, dwflags: u32, pfncompare: PFNDACOMPARE, pfnmerge: PFNDPAMERGE, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DPA_Merge(hdpadest : HDPA, hdpasrc : HDPA, dwflags : u32, pfncompare : PFNDACOMPARE, pfnmerge : PFNDPAMERGE, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - DPA_Merge(hdpadest.param().abi(), hdpasrc.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pfncompare), core::mem::transmute(pfnmerge), lparam.param().abi()) + DPA_Merge(core::mem::transmute(hdpadest), core::mem::transmute(hdpasrc), core::mem::transmute(dwflags), core::mem::transmute(pfncompare), core::mem::transmute(pfnmerge), core::mem::transmute(lparam)) } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn DPA_SaveStream(hdpa: P0, pfn: PFNDPASTREAM, pstream: P2, pvinstdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn DPA_SaveStream(hdpa: HDPA, pfn: PFNDPASTREAM, pstream: P2, pvinstdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: 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(), core::mem::transmute(pfn), pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(core::ptr::null()))).ok() + DPA_SaveStream(core::mem::transmute(hdpa), core::mem::transmute(pfn), pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn DPA_Search(hdpa: P0, pfind: Option<*const core::ffi::c_void>, istart: i32, pfncompare: PFNDACOMPARE, lparam: P4, options: u32) -> i32 -where - P0: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DPA_Search(hdpa: HDPA, pfind: Option<*const core::ffi::c_void>, istart: i32, pfncompare: PFNDACOMPARE, lparam: super::super::Foundation::LPARAM, options: u32) -> i32 { 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(core::ptr::null())), core::mem::transmute(istart), core::mem::transmute(pfncompare), lparam.param().abi(), core::mem::transmute(options)) + DPA_Search(core::mem::transmute(hdpa), core::mem::transmute(pfind.unwrap_or(core::mem::zeroed())), core::mem::transmute(istart), core::mem::transmute(pfncompare), core::mem::transmute(lparam), core::mem::transmute(options)) } #[inline] -pub unsafe fn DPA_SetPtr(hdpa: P0, i: i32, p: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DPA_SetPtr(hdpa: HDPA, i: i32, p: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(i), core::mem::transmute(p.unwrap_or(core::ptr::null()))) + DPA_SetPtr(core::mem::transmute(hdpa), core::mem::transmute(i), core::mem::transmute(p.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DPA_Sort(hdpa: P0, pfncompare: PFNDACOMPARE, lparam: P2) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn DPA_Sort(hdpa: HDPA, pfncompare: PFNDACOMPARE, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DPA_Sort(hdpa : HDPA, pfncompare : PFNDACOMPARE, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - DPA_Sort(hdpa.param().abi(), core::mem::transmute(pfncompare), lparam.param().abi()) + DPA_Sort(core::mem::transmute(hdpa), core::mem::transmute(pfncompare), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DSA_Clone(hdsa: P0) -> HDSA -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_Clone(hdsa: HDSA) -> HDSA { windows_targets::link!("comctl32.dll" "system" fn DSA_Clone(hdsa : HDSA) -> HDSA); - DSA_Clone(hdsa.param().abi()) + DSA_Clone(core::mem::transmute(hdsa)) } #[inline] pub unsafe fn DSA_Create(cbitem: i32, citemgrow: i32) -> HDSA { @@ -331,310 +234,196 @@ pub unsafe fn DSA_Create(cbitem: i32, citemgrow: i32) -> HDSA { DSA_Create(core::mem::transmute(cbitem), core::mem::transmute(citemgrow)) } #[inline] -pub unsafe fn DSA_DeleteAllItems(hdsa: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_DeleteAllItems(hdsa: HDSA) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DSA_DeleteAllItems(hdsa : HDSA) -> super::super::Foundation:: BOOL); - DSA_DeleteAllItems(hdsa.param().abi()) + DSA_DeleteAllItems(core::mem::transmute(hdsa)) } #[inline] -pub unsafe fn DSA_DeleteItem(hdsa: P0, i: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_DeleteItem(hdsa: HDSA, i: i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DSA_DeleteItem(hdsa : HDSA, i : i32) -> super::super::Foundation:: BOOL); - DSA_DeleteItem(hdsa.param().abi(), core::mem::transmute(i)) + DSA_DeleteItem(core::mem::transmute(hdsa), core::mem::transmute(i)) } #[inline] -pub unsafe fn DSA_Destroy(hdsa: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_Destroy(hdsa: Option) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DSA_Destroy(hdsa : HDSA) -> super::super::Foundation:: BOOL); - DSA_Destroy(hdsa.param().abi()) + DSA_Destroy(core::mem::transmute(hdsa.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DSA_DestroyCallback(hdsa: P0, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_DestroyCallback(hdsa: Option, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) { windows_targets::link!("comctl32.dll" "system" fn DSA_DestroyCallback(hdsa : HDSA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); - DSA_DestroyCallback(hdsa.param().abi(), core::mem::transmute(pfncb), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))) + DSA_DestroyCallback(core::mem::transmute(hdsa.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfncb), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DSA_EnumCallback(hdsa: P0, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_EnumCallback(hdsa: HDSA, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) { windows_targets::link!("comctl32.dll" "system" fn DSA_EnumCallback(hdsa : HDSA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); - DSA_EnumCallback(hdsa.param().abi(), core::mem::transmute(pfncb), core::mem::transmute(pdata.unwrap_or(core::ptr::null()))) + DSA_EnumCallback(core::mem::transmute(hdsa), core::mem::transmute(pfncb), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DSA_GetItem(hdsa: P0, i: i32, pitem: *mut core::ffi::c_void) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_GetItem(hdsa: HDSA, i: i32, pitem: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DSA_GetItem(hdsa : HDSA, i : i32, pitem : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - DSA_GetItem(hdsa.param().abi(), core::mem::transmute(i), core::mem::transmute(pitem)) + DSA_GetItem(core::mem::transmute(hdsa), core::mem::transmute(i), core::mem::transmute(pitem)) } #[inline] -pub unsafe fn DSA_GetItemPtr(hdsa: P0, i: i32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_GetItemPtr(hdsa: HDSA, i: i32) -> *mut core::ffi::c_void { windows_targets::link!("comctl32.dll" "system" fn DSA_GetItemPtr(hdsa : HDSA, i : i32) -> *mut core::ffi::c_void); - DSA_GetItemPtr(hdsa.param().abi(), core::mem::transmute(i)) + DSA_GetItemPtr(core::mem::transmute(hdsa), core::mem::transmute(i)) } #[inline] -pub unsafe fn DSA_GetSize(hdsa: P0) -> u64 -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_GetSize(hdsa: Option) -> u64 { windows_targets::link!("comctl32.dll" "system" fn DSA_GetSize(hdsa : HDSA) -> u64); - DSA_GetSize(hdsa.param().abi()) + DSA_GetSize(core::mem::transmute(hdsa.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DSA_InsertItem(hdsa: P0, i: i32, pitem: *const core::ffi::c_void) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_InsertItem(hdsa: HDSA, i: i32, pitem: *const core::ffi::c_void) -> i32 { windows_targets::link!("comctl32.dll" "system" fn DSA_InsertItem(hdsa : HDSA, i : i32, pitem : *const core::ffi::c_void) -> i32); - DSA_InsertItem(hdsa.param().abi(), core::mem::transmute(i), core::mem::transmute(pitem)) + DSA_InsertItem(core::mem::transmute(hdsa), core::mem::transmute(i), core::mem::transmute(pitem)) } #[inline] -pub unsafe fn DSA_SetItem(hdsa: P0, i: i32, pitem: *const core::ffi::c_void) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DSA_SetItem(hdsa: HDSA, i: i32, pitem: *const core::ffi::c_void) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DSA_SetItem(hdsa : HDSA, i : i32, pitem : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - DSA_SetItem(hdsa.param().abi(), core::mem::transmute(i), core::mem::transmute(pitem)) + DSA_SetItem(core::mem::transmute(hdsa), core::mem::transmute(i), core::mem::transmute(pitem)) } #[inline] -pub unsafe fn DSA_Sort(pdsa: P0, pfncompare: PFNDACOMPARE, lparam: P2) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn DSA_Sort(pdsa: HDSA, pfncompare: PFNDACOMPARE, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DSA_Sort(pdsa : HDSA, pfncompare : PFNDACOMPARE, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - DSA_Sort(pdsa.param().abi(), core::mem::transmute(pfncompare), lparam.param().abi()) + DSA_Sort(core::mem::transmute(pdsa), core::mem::transmute(pfncompare), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DestroyPropertySheetPage(param0: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyPropertySheetPage(param0: HPROPSHEETPAGE) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn DestroyPropertySheetPage(param0 : HPROPSHEETPAGE) -> super::super::Foundation:: BOOL); - DestroyPropertySheetPage(param0.param().abi()) + DestroyPropertySheetPage(core::mem::transmute(param0)) } #[inline] -pub unsafe fn DestroySyntheticPointerDevice(device: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn DestroySyntheticPointerDevice(device: HSYNTHETICPOINTERDEVICE) { windows_targets::link!("user32.dll" "system" fn DestroySyntheticPointerDevice(device : HSYNTHETICPOINTERDEVICE)); - DestroySyntheticPointerDevice(device.param().abi()) + DestroySyntheticPointerDevice(core::mem::transmute(device)) } #[inline] -pub unsafe fn DlgDirListA(hdlg: P0, lppathspec: windows_core::PSTR, nidlistbox: i32, nidstaticpath: i32, ufiletype: DLG_DIR_LIST_FILE_TYPE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DlgDirListA(hdlg: super::super::Foundation::HWND, lppathspec: windows_core::PSTR, nidlistbox: i32, nidstaticpath: i32, ufiletype: DLG_DIR_LIST_FILE_TYPE) -> i32 { windows_targets::link!("user32.dll" "system" fn DlgDirListA(hdlg : super::super::Foundation:: HWND, lppathspec : windows_core::PSTR, nidlistbox : i32, nidstaticpath : i32, ufiletype : DLG_DIR_LIST_FILE_TYPE) -> i32); - DlgDirListA(hdlg.param().abi(), core::mem::transmute(lppathspec), core::mem::transmute(nidlistbox), core::mem::transmute(nidstaticpath), core::mem::transmute(ufiletype)) + DlgDirListA(core::mem::transmute(hdlg), core::mem::transmute(lppathspec), core::mem::transmute(nidlistbox), core::mem::transmute(nidstaticpath), core::mem::transmute(ufiletype)) } #[inline] -pub unsafe fn DlgDirListComboBoxA(hdlg: P0, lppathspec: windows_core::PSTR, nidcombobox: i32, nidstaticpath: i32, ufiletype: DLG_DIR_LIST_FILE_TYPE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DlgDirListComboBoxA(hdlg: super::super::Foundation::HWND, lppathspec: windows_core::PSTR, nidcombobox: i32, nidstaticpath: i32, ufiletype: DLG_DIR_LIST_FILE_TYPE) -> i32 { windows_targets::link!("user32.dll" "system" fn DlgDirListComboBoxA(hdlg : super::super::Foundation:: HWND, lppathspec : windows_core::PSTR, nidcombobox : i32, nidstaticpath : i32, ufiletype : DLG_DIR_LIST_FILE_TYPE) -> i32); - DlgDirListComboBoxA(hdlg.param().abi(), core::mem::transmute(lppathspec), core::mem::transmute(nidcombobox), core::mem::transmute(nidstaticpath), core::mem::transmute(ufiletype)) + DlgDirListComboBoxA(core::mem::transmute(hdlg), core::mem::transmute(lppathspec), core::mem::transmute(nidcombobox), core::mem::transmute(nidstaticpath), core::mem::transmute(ufiletype)) } #[inline] -pub unsafe fn DlgDirListComboBoxW(hdlg: P0, lppathspec: windows_core::PWSTR, nidcombobox: i32, nidstaticpath: i32, ufiletype: DLG_DIR_LIST_FILE_TYPE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DlgDirListComboBoxW(hdlg: super::super::Foundation::HWND, lppathspec: windows_core::PWSTR, nidcombobox: i32, nidstaticpath: i32, ufiletype: DLG_DIR_LIST_FILE_TYPE) -> i32 { windows_targets::link!("user32.dll" "system" fn DlgDirListComboBoxW(hdlg : super::super::Foundation:: HWND, lppathspec : windows_core::PWSTR, nidcombobox : i32, nidstaticpath : i32, ufiletype : DLG_DIR_LIST_FILE_TYPE) -> i32); - DlgDirListComboBoxW(hdlg.param().abi(), core::mem::transmute(lppathspec), core::mem::transmute(nidcombobox), core::mem::transmute(nidstaticpath), core::mem::transmute(ufiletype)) + DlgDirListComboBoxW(core::mem::transmute(hdlg), core::mem::transmute(lppathspec), core::mem::transmute(nidcombobox), core::mem::transmute(nidstaticpath), core::mem::transmute(ufiletype)) } #[inline] -pub unsafe fn DlgDirListW(hdlg: P0, lppathspec: windows_core::PWSTR, nidlistbox: i32, nidstaticpath: i32, ufiletype: DLG_DIR_LIST_FILE_TYPE) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn DlgDirListW(hdlg: super::super::Foundation::HWND, lppathspec: windows_core::PWSTR, nidlistbox: i32, nidstaticpath: i32, ufiletype: DLG_DIR_LIST_FILE_TYPE) -> i32 { windows_targets::link!("user32.dll" "system" fn DlgDirListW(hdlg : super::super::Foundation:: HWND, lppathspec : windows_core::PWSTR, nidlistbox : i32, nidstaticpath : i32, ufiletype : DLG_DIR_LIST_FILE_TYPE) -> i32); - DlgDirListW(hdlg.param().abi(), core::mem::transmute(lppathspec), core::mem::transmute(nidlistbox), core::mem::transmute(nidstaticpath), core::mem::transmute(ufiletype)) + DlgDirListW(core::mem::transmute(hdlg), core::mem::transmute(lppathspec), core::mem::transmute(nidlistbox), core::mem::transmute(nidstaticpath), core::mem::transmute(ufiletype)) } #[inline] -pub unsafe fn DlgDirSelectComboBoxExA(hwnddlg: P0, lpstring: &mut [u8], idcombobox: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DlgDirSelectComboBoxExA(hwnddlg: super::super::Foundation::HWND, lpstring: &mut [u8], idcombobox: i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DlgDirSelectComboBoxExA(hwnddlg : super::super::Foundation:: HWND, lpstring : windows_core::PSTR, cchout : i32, idcombobox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectComboBoxExA(hwnddlg.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(idcombobox)).ok() + DlgDirSelectComboBoxExA(core::mem::transmute(hwnddlg), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(idcombobox)).ok() } #[inline] -pub unsafe fn DlgDirSelectComboBoxExW(hwnddlg: P0, lpstring: &mut [u16], idcombobox: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DlgDirSelectComboBoxExW(hwnddlg: super::super::Foundation::HWND, lpstring: &mut [u16], idcombobox: i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DlgDirSelectComboBoxExW(hwnddlg : super::super::Foundation:: HWND, lpstring : windows_core::PWSTR, cchout : i32, idcombobox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectComboBoxExW(hwnddlg.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(idcombobox)).ok() + DlgDirSelectComboBoxExW(core::mem::transmute(hwnddlg), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(idcombobox)).ok() } #[inline] -pub unsafe fn DlgDirSelectExA(hwnddlg: P0, lpstring: &mut [u8], idlistbox: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DlgDirSelectExA(hwnddlg: super::super::Foundation::HWND, lpstring: &mut [u8], idlistbox: i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DlgDirSelectExA(hwnddlg : super::super::Foundation:: HWND, lpstring : windows_core::PSTR, chcount : i32, idlistbox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectExA(hwnddlg.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(idlistbox)).ok() + DlgDirSelectExA(core::mem::transmute(hwnddlg), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(idlistbox)).ok() } #[inline] -pub unsafe fn DlgDirSelectExW(hwnddlg: P0, lpstring: &mut [u16], idlistbox: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DlgDirSelectExW(hwnddlg: super::super::Foundation::HWND, lpstring: &mut [u16], idlistbox: i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DlgDirSelectExW(hwnddlg : super::super::Foundation:: HWND, lpstring : windows_core::PWSTR, chcount : i32, idlistbox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectExW(hwnddlg.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(idlistbox)).ok() + DlgDirSelectExW(core::mem::transmute(hwnddlg), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), core::mem::transmute(idlistbox)).ok() } #[inline] -pub unsafe fn DrawInsert(handparent: P0, hlb: P1, nitem: i32) -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DrawInsert(handparent: super::super::Foundation::HWND, hlb: super::super::Foundation::HWND, nitem: i32) { windows_targets::link!("comctl32.dll" "system" fn DrawInsert(handparent : super::super::Foundation:: HWND, hlb : super::super::Foundation:: HWND, nitem : i32)); - DrawInsert(handparent.param().abi(), hlb.param().abi(), core::mem::transmute(nitem)) + DrawInsert(core::mem::transmute(handparent), core::mem::transmute(hlb), core::mem::transmute(nitem)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawShadowText(hdc: P0, psztext: &[u16], prc: *const super::super::Foundation::RECT, dwflags: u32, crtext: P5, crshadow: P6, ixoffset: i32, iyoffset: i32) -> i32 -where - P0: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn DrawShadowText(hdc: super::super::Graphics::Gdi::HDC, psztext: &[u16], prc: *const super::super::Foundation::RECT, dwflags: u32, crtext: super::super::Foundation::COLORREF, crshadow: super::super::Foundation::COLORREF, ixoffset: i32, iyoffset: i32) -> i32 { windows_targets::link!("comctl32.dll" "system" fn DrawShadowText(hdc : super::super::Graphics::Gdi:: HDC, psztext : windows_core::PCWSTR, cch : u32, prc : *const super::super::Foundation:: RECT, dwflags : u32, crtext : super::super::Foundation:: COLORREF, crshadow : super::super::Foundation:: COLORREF, ixoffset : i32, iyoffset : i32) -> i32); - DrawShadowText(hdc.param().abi(), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(prc), core::mem::transmute(dwflags), crtext.param().abi(), crshadow.param().abi(), core::mem::transmute(ixoffset), core::mem::transmute(iyoffset)) + DrawShadowText(core::mem::transmute(hdc), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(prc), core::mem::transmute(dwflags), core::mem::transmute(crtext), core::mem::transmute(crshadow), core::mem::transmute(ixoffset), core::mem::transmute(iyoffset)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawStatusTextA(hdc: P0, lprc: *mut super::super::Foundation::RECT, psztext: P2, uflags: u32) +pub unsafe fn DrawStatusTextA(hdc: super::super::Graphics::Gdi::HDC, lprc: *mut super::super::Foundation::RECT, psztext: P2, uflags: u32) where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DrawStatusTextA(hdc : super::super::Graphics::Gdi:: HDC, lprc : *mut super::super::Foundation:: RECT, psztext : windows_core::PCSTR, uflags : u32)); - DrawStatusTextA(hdc.param().abi(), core::mem::transmute(lprc), psztext.param().abi(), core::mem::transmute(uflags)) + DrawStatusTextA(core::mem::transmute(hdc), core::mem::transmute(lprc), psztext.param().abi(), core::mem::transmute(uflags)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawStatusTextW(hdc: P0, lprc: *mut super::super::Foundation::RECT, psztext: P2, uflags: u32) +pub unsafe fn DrawStatusTextW(hdc: super::super::Graphics::Gdi::HDC, lprc: *mut super::super::Foundation::RECT, psztext: P2, uflags: u32) where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DrawStatusTextW(hdc : super::super::Graphics::Gdi:: HDC, lprc : *mut super::super::Foundation:: RECT, psztext : windows_core::PCWSTR, uflags : u32)); - DrawStatusTextW(hdc.param().abi(), core::mem::transmute(lprc), psztext.param().abi(), core::mem::transmute(uflags)) + DrawStatusTextW(core::mem::transmute(hdc), core::mem::transmute(lprc), psztext.param().abi(), core::mem::transmute(uflags)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawThemeBackground(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, prect: *const super::super::Foundation::RECT, pcliprect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DrawThemeBackground(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HDC, ipartid: i32, istateid: i32, prect: *const super::super::Foundation::RECT, pcliprect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { 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(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prect), core::mem::transmute(pcliprect.unwrap_or(core::ptr::null()))).ok() + DrawThemeBackground(core::mem::transmute(htheme), core::mem::transmute(hdc), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prect), core::mem::transmute(pcliprect.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawThemeBackgroundEx(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, prect: *const super::super::Foundation::RECT, poptions: Option<*const DTBGOPTS>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DrawThemeBackgroundEx(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HDC, ipartid: i32, istateid: i32, prect: *const super::super::Foundation::RECT, poptions: Option<*const DTBGOPTS>) -> windows_core::Result<()> { 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(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prect), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() + DrawThemeBackgroundEx(core::mem::transmute(htheme), core::mem::transmute(hdc), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prect), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawThemeEdge(htheme: P0, hdc: P1, 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: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe 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: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> { 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(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(pdestrect), core::mem::transmute(uedge), core::mem::transmute(uflags), core::mem::transmute(pcontentrect.unwrap_or(core::ptr::null_mut()))).ok() + DrawThemeEdge(core::mem::transmute(htheme), core::mem::transmute(hdc), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(pdestrect), core::mem::transmute(uedge), core::mem::transmute(uflags), core::mem::transmute(pcontentrect.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawThemeIcon(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, prect: *const super::super::Foundation::RECT, himl: P5, iimageindex: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn DrawThemeIcon(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HDC, ipartid: i32, istateid: i32, prect: *const super::super::Foundation::RECT, himl: HIMAGELIST, iimageindex: i32) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn DrawThemeIcon(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prect : *const super::super::Foundation:: RECT, himl : HIMAGELIST, iimageindex : i32) -> windows_core::HRESULT); - DrawThemeIcon(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prect), himl.param().abi(), core::mem::transmute(iimageindex)).ok() + DrawThemeIcon(core::mem::transmute(htheme), core::mem::transmute(hdc), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prect), core::mem::transmute(himl), core::mem::transmute(iimageindex)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawThemeParentBackground(hwnd: P0, hdc: P1, prc: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DrawThemeParentBackground(hwnd: super::super::Foundation::HWND, hdc: super::super::Graphics::Gdi::HDC, prc: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { 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(core::ptr::null()))).ok() + DrawThemeParentBackground(core::mem::transmute(hwnd), core::mem::transmute(hdc), core::mem::transmute(prc.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawThemeParentBackgroundEx(hwnd: P0, hdc: P1, dwflags: DRAW_THEME_PARENT_BACKGROUND_FLAGS, prc: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DrawThemeParentBackgroundEx(hwnd: super::super::Foundation::HWND, hdc: super::super::Graphics::Gdi::HDC, dwflags: DRAW_THEME_PARENT_BACKGROUND_FLAGS, prc: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { 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(), core::mem::transmute(dwflags), core::mem::transmute(prc.unwrap_or(core::ptr::null()))).ok() + DrawThemeParentBackgroundEx(core::mem::transmute(hwnd), core::mem::transmute(hdc), core::mem::transmute(dwflags), core::mem::transmute(prc.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawThemeText(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, psztext: &[u16], dwtextflags: super::super::Graphics::Gdi::DRAW_TEXT_FORMAT, dwtextflags2: u32, prect: *const super::super::Foundation::RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DrawThemeText(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HDC, ipartid: i32, istateid: i32, psztext: &[u16], dwtextflags: super::super::Graphics::Gdi::DRAW_TEXT_FORMAT, dwtextflags2: u32, prect: *const super::super::Foundation::RECT) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn DrawThemeText(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, dwtextflags2 : u32, prect : *const super::super::Foundation:: RECT) -> windows_core::HRESULT); - DrawThemeText(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(dwtextflags), core::mem::transmute(dwtextflags2), core::mem::transmute(prect)).ok() + DrawThemeText(core::mem::transmute(htheme), core::mem::transmute(hdc), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(dwtextflags), core::mem::transmute(dwtextflags2), core::mem::transmute(prect)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawThemeTextEx(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, psztext: &[u16], dwtextflags: super::super::Graphics::Gdi::DRAW_TEXT_FORMAT, prect: *mut super::super::Foundation::RECT, poptions: Option<*const DTTOPTS>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DrawThemeTextEx(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HDC, ipartid: i32, istateid: i32, psztext: &[u16], dwtextflags: super::super::Graphics::Gdi::DRAW_TEXT_FORMAT, prect: *mut super::super::Foundation::RECT, poptions: Option<*const DTTOPTS>) -> windows_core::Result<()> { 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(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(dwtextflags), core::mem::transmute(prect), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() + DrawThemeTextEx(core::mem::transmute(htheme), core::mem::transmute(hdc), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(dwtextflags), core::mem::transmute(prect), core::mem::transmute(poptions.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn EnableScrollBar(hwnd: P0, wsbflags: u32, warrows: ENABLE_SCROLL_BAR_ARROWS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnableScrollBar(hwnd: super::super::Foundation::HWND, wsbflags: u32, warrows: ENABLE_SCROLL_BAR_ARROWS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnableScrollBar(hwnd : super::super::Foundation:: HWND, wsbflags : u32, warrows : ENABLE_SCROLL_BAR_ARROWS) -> super::super::Foundation:: BOOL); - EnableScrollBar(hwnd.param().abi(), core::mem::transmute(wsbflags), core::mem::transmute(warrows)).ok() + EnableScrollBar(core::mem::transmute(hwnd), core::mem::transmute(wsbflags), core::mem::transmute(warrows)).ok() } #[inline] -pub unsafe fn EnableThemeDialogTexture(hwnd: P0, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnableThemeDialogTexture(hwnd: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn EnableThemeDialogTexture(hwnd : super::super::Foundation:: HWND, dwflags : u32) -> windows_core::HRESULT); - EnableThemeDialogTexture(hwnd.param().abi(), core::mem::transmute(dwflags)).ok() + EnableThemeDialogTexture(core::mem::transmute(hwnd), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn EnableTheming(fenable: P0) -> windows_core::Result<()> @@ -661,13 +450,12 @@ where EndBufferedPaint(core::mem::transmute(hbufferedpaint), fupdatetarget.param().abi()).ok() } #[inline] -pub unsafe fn EndPanningFeedback(hwnd: P0, fanimateback: P1) -> super::super::Foundation::BOOL +pub unsafe fn EndPanningFeedback(hwnd: super::super::Foundation::HWND, fanimateback: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn EndPanningFeedback(hwnd : super::super::Foundation:: HWND, fanimateback : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EndPanningFeedback(hwnd.param().abi(), fanimateback.param().abi()) + EndPanningFeedback(core::mem::transmute(hwnd), fanimateback.param().abi()) } #[inline] pub unsafe fn EvaluateProximityToPolygon(controlpolygon: &[super::super::Foundation::POINT], phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> windows_core::Result<()> { @@ -680,96 +468,76 @@ pub unsafe fn EvaluateProximityToRect(controlboundingbox: *const super::super::F EvaluateProximityToRect(core::mem::transmute(controlboundingbox), core::mem::transmute(phittestinginput), core::mem::transmute(pproximityeval)).ok() } #[inline] -pub unsafe fn FlatSB_EnableScrollBar(param0: P0, param1: i32, param2: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FlatSB_EnableScrollBar(param0: super::super::Foundation::HWND, param1: i32, param2: u32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn FlatSB_EnableScrollBar(param0 : super::super::Foundation:: HWND, param1 : i32, param2 : u32) -> super::super::Foundation:: BOOL); - FlatSB_EnableScrollBar(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)) + FlatSB_EnableScrollBar(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_GetScrollInfo(param0: P0, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, param2: *mut super::WindowsAndMessaging::SCROLLINFO) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FlatSB_GetScrollInfo(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, param2: *mut super::WindowsAndMessaging::SCROLLINFO) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn FlatSB_GetScrollInfo(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, param2 : *mut super::WindowsAndMessaging:: SCROLLINFO) -> super::super::Foundation:: BOOL); - FlatSB_GetScrollInfo(param0.param().abi(), core::mem::transmute(code), core::mem::transmute(param2)) + FlatSB_GetScrollInfo(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(param2)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_GetScrollPos(param0: P0, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn FlatSB_GetScrollPos(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS) -> i32 { windows_targets::link!("comctl32.dll" "system" fn FlatSB_GetScrollPos(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS) -> i32); - FlatSB_GetScrollPos(param0.param().abi(), core::mem::transmute(code)) + FlatSB_GetScrollPos(core::mem::transmute(param0), core::mem::transmute(code)) } #[inline] -pub unsafe fn FlatSB_GetScrollProp(param0: P0, propindex: WSB_PROP, param2: *mut i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FlatSB_GetScrollProp(param0: super::super::Foundation::HWND, propindex: WSB_PROP, param2: *mut i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn FlatSB_GetScrollProp(param0 : super::super::Foundation:: HWND, propindex : WSB_PROP, param2 : *mut i32) -> super::super::Foundation:: BOOL); - FlatSB_GetScrollProp(param0.param().abi(), core::mem::transmute(propindex), core::mem::transmute(param2)) + FlatSB_GetScrollProp(core::mem::transmute(param0), core::mem::transmute(propindex), core::mem::transmute(param2)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_GetScrollRange(param0: P0, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, param2: *mut i32, param3: *mut i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn FlatSB_GetScrollRange(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, param2: *mut i32, param3: *mut i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn FlatSB_GetScrollRange(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, param2 : *mut i32, param3 : *mut i32) -> super::super::Foundation:: BOOL); - FlatSB_GetScrollRange(param0.param().abi(), core::mem::transmute(code), core::mem::transmute(param2), core::mem::transmute(param3)) + FlatSB_GetScrollRange(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(param2), core::mem::transmute(param3)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_SetScrollInfo(param0: P0, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, psi: *mut super::WindowsAndMessaging::SCROLLINFO, fredraw: P3) -> i32 +pub unsafe fn FlatSB_SetScrollInfo(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, psi: *mut super::WindowsAndMessaging::SCROLLINFO, fredraw: P3) -> i32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn FlatSB_SetScrollInfo(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, psi : *mut super::WindowsAndMessaging:: SCROLLINFO, fredraw : super::super::Foundation:: BOOL) -> i32); - FlatSB_SetScrollInfo(param0.param().abi(), core::mem::transmute(code), core::mem::transmute(psi), fredraw.param().abi()) + FlatSB_SetScrollInfo(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(psi), fredraw.param().abi()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_SetScrollPos(param0: P0, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, pos: i32, fredraw: P3) -> i32 +pub unsafe fn FlatSB_SetScrollPos(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, pos: i32, fredraw: P3) -> i32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn FlatSB_SetScrollPos(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, pos : i32, fredraw : super::super::Foundation:: BOOL) -> i32); - FlatSB_SetScrollPos(param0.param().abi(), core::mem::transmute(code), core::mem::transmute(pos), fredraw.param().abi()) + FlatSB_SetScrollPos(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(pos), fredraw.param().abi()) } #[inline] -pub unsafe fn FlatSB_SetScrollProp(param0: P0, index: WSB_PROP, newvalue: isize, param3: P3) -> super::super::Foundation::BOOL +pub unsafe fn FlatSB_SetScrollProp(param0: super::super::Foundation::HWND, index: WSB_PROP, newvalue: isize, param3: P3) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn FlatSB_SetScrollProp(param0 : super::super::Foundation:: HWND, index : u32, newvalue : isize, param3 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FlatSB_SetScrollProp(param0.param().abi(), index.0 as _, core::mem::transmute(newvalue), param3.param().abi()) + FlatSB_SetScrollProp(core::mem::transmute(param0), index.0 as _, core::mem::transmute(newvalue), param3.param().abi()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_SetScrollRange(param0: P0, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, min: i32, max: i32, fredraw: P4) -> i32 +pub unsafe fn FlatSB_SetScrollRange(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, min: i32, max: i32, fredraw: P4) -> i32 where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn FlatSB_SetScrollRange(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, min : i32, max : i32, fredraw : super::super::Foundation:: BOOL) -> i32); - FlatSB_SetScrollRange(param0.param().abi(), core::mem::transmute(code), core::mem::transmute(min), core::mem::transmute(max), fredraw.param().abi()) + FlatSB_SetScrollRange(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(min), core::mem::transmute(max), fredraw.param().abi()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_ShowScrollBar(param0: P0, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, param2: P2) -> super::super::Foundation::BOOL +pub unsafe fn FlatSB_ShowScrollBar(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, param2: P2) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn FlatSB_ShowScrollBar(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, param2 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FlatSB_ShowScrollBar(param0.param().abi(), core::mem::transmute(code), param2.param().abi()) + FlatSB_ShowScrollBar(core::mem::transmute(param0), core::mem::transmute(code), param2.param().abi()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -796,12 +564,9 @@ pub unsafe fn GetBufferedPaintTargetRect(hbufferedpaint: isize) -> windows_core: GetBufferedPaintTargetRect(core::mem::transmute(hbufferedpaint), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetComboBoxInfo(hwndcombo: P0, pcbi: *mut COMBOBOXINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetComboBoxInfo(hwndcombo: super::super::Foundation::HWND, pcbi: *mut COMBOBOXINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetComboBoxInfo(hwndcombo : super::super::Foundation:: HWND, pcbi : *mut COMBOBOXINFO) -> super::super::Foundation:: BOOL); - GetComboBoxInfo(hwndcombo.param().abi(), core::mem::transmute(pcbi)).ok() + GetComboBoxInfo(core::mem::transmute(hwndcombo), core::mem::transmute(pcbi)).ok() } #[inline] pub unsafe fn GetCurrentThemeName(pszthemefilename: &mut [u16], pszcolorbuff: Option<&mut [u16]>, pszsizebuff: Option<&mut [u16]>) -> windows_core::Result<()> { @@ -809,20 +574,14 @@ pub unsafe fn GetCurrentThemeName(pszthemefilename: &mut [u16], pszcolorbuff: Op GetCurrentThemeName(core::mem::transmute(pszthemefilename.as_ptr()), pszthemefilename.len().try_into().unwrap(), core::mem::transmute(pszcolorbuff.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszcolorbuff.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pszsizebuff.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszsizebuff.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[inline] -pub unsafe fn GetEffectiveClientRect(hwnd: P0, lprc: *mut super::super::Foundation::RECT, lpinfo: *const i32) -where - P0: windows_core::Param, -{ +pub unsafe fn GetEffectiveClientRect(hwnd: super::super::Foundation::HWND, lprc: *mut super::super::Foundation::RECT, lpinfo: *const i32) { windows_targets::link!("comctl32.dll" "system" fn GetEffectiveClientRect(hwnd : super::super::Foundation:: HWND, lprc : *mut super::super::Foundation:: RECT, lpinfo : *const i32)); - GetEffectiveClientRect(hwnd.param().abi(), core::mem::transmute(lprc), core::mem::transmute(lpinfo)) + GetEffectiveClientRect(core::mem::transmute(hwnd), core::mem::transmute(lprc), core::mem::transmute(lpinfo)) } #[inline] -pub unsafe fn GetListBoxInfo(hwnd: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetListBoxInfo(hwnd: super::super::Foundation::HWND) -> u32 { windows_targets::link!("user32.dll" "system" fn GetListBoxInfo(hwnd : super::super::Foundation:: HWND) -> u32); - GetListBoxInfo(hwnd.param().abi()) + GetListBoxInfo(core::mem::transmute(hwnd)) } #[inline] pub unsafe fn GetMUILanguage() -> u16 { @@ -830,20 +589,14 @@ pub unsafe fn GetMUILanguage() -> u16 { GetMUILanguage() } #[inline] -pub unsafe fn GetThemeAnimationProperty(htheme: P0, istoryboardid: i32, itargetid: i32, eproperty: TA_PROPERTY, pvproperty: Option<*mut core::ffi::c_void>, cbsize: u32, pcbsizeout: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeAnimationProperty(htheme: HTHEME, istoryboardid: i32, itargetid: i32, eproperty: TA_PROPERTY, pvproperty: Option<*mut core::ffi::c_void>, cbsize: u32, pcbsizeout: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(istoryboardid), core::mem::transmute(itargetid), core::mem::transmute(eproperty), core::mem::transmute(pvproperty.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbsize), core::mem::transmute(pcbsizeout)).ok() + GetThemeAnimationProperty(core::mem::transmute(htheme), core::mem::transmute(istoryboardid), core::mem::transmute(itargetid), core::mem::transmute(eproperty), core::mem::transmute(pvproperty.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), core::mem::transmute(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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeAnimationTransform(htheme: HTHEME, istoryboardid: i32, itargetid: i32, dwtransformindex: u32, ptransform: Option<*mut TA_TRANSFORM>, cbsize: u32, pcbsizeout: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(istoryboardid), core::mem::transmute(itargetid), core::mem::transmute(dwtransformindex), core::mem::transmute(ptransform.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbsize), core::mem::transmute(pcbsizeout)).ok() + GetThemeAnimationTransform(core::mem::transmute(htheme), core::mem::transmute(istoryboardid), core::mem::transmute(itargetid), core::mem::transmute(dwtransformindex), core::mem::transmute(ptransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), core::mem::transmute(pcbsizeout)).ok() } #[inline] pub unsafe fn GetThemeAppProperties() -> SET_THEME_APP_PROPERTIES_FLAGS { @@ -852,64 +605,43 @@ pub unsafe fn GetThemeAppProperties() -> SET_THEME_APP_PROPERTIES_FLAGS { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeBackgroundContentRect(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, pboundingrect: *const super::super::Foundation::RECT) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemeBackgroundContentRect(htheme: HTHEME, hdc: Option, ipartid: i32, istateid: i32, pboundingrect: *const super::super::Foundation::RECT) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeBackgroundContentRect(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, pboundingrect : *const super::super::Foundation:: RECT, pcontentrect : *mut super::super::Foundation:: RECT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeBackgroundContentRect(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(pboundingrect), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeBackgroundContentRect(core::mem::transmute(htheme), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(pboundingrect), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeBackgroundExtent(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, pcontentrect: *const super::super::Foundation::RECT) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemeBackgroundExtent(htheme: HTHEME, hdc: Option, ipartid: i32, istateid: i32, pcontentrect: *const super::super::Foundation::RECT) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeBackgroundExtent(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, pcontentrect : *const super::super::Foundation:: RECT, pextentrect : *mut super::super::Foundation:: RECT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeBackgroundExtent(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(pcontentrect), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeBackgroundExtent(core::mem::transmute(htheme), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(pcontentrect), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeBackgroundRegion(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, prect: *const super::super::Foundation::RECT) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemeBackgroundRegion(htheme: HTHEME, hdc: Option, ipartid: i32, istateid: i32, prect: *const super::super::Foundation::RECT) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeBackgroundRegion(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prect : *const super::super::Foundation:: RECT, pregion : *mut super::super::Graphics::Gdi:: HRGN) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeBackgroundRegion(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prect), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeBackgroundRegion(core::mem::transmute(htheme), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prect), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeBitmap(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID, dwflags: GET_THEME_BITMAP_FLAGS) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeBitmap(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID, dwflags: GET_THEME_BITMAP_FLAGS) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeBitmap(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, dwflags : GET_THEME_BITMAP_FLAGS, phbitmap : *mut super::super::Graphics::Gdi:: HBITMAP) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeBitmap(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeBitmap(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemeBool(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeBool(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeBool(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pfval : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeBool(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeBool(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemeColor(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeColor(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeColor(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pcolor : *mut super::super::Foundation:: COLORREF) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeColor(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeColor(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn GetThemeDocumentationProperty(pszthemename: P0, pszpropertyname: P1, pszvaluebuff: &mut [u16]) -> windows_core::Result<()> @@ -921,288 +653,182 @@ where GetThemeDocumentationProperty(pszthemename.param().abi(), pszpropertyname.param().abi(), core::mem::transmute(pszvaluebuff.as_ptr()), pszvaluebuff.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn GetThemeEnumValue(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeEnumValue(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeEnumValue(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pival : *mut i32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeEnumValue(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeEnumValue(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemeFilename(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID, pszthemefilename: &mut [u16]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeFilename(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID, pszthemefilename: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn GetThemeFilename(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pszthemefilename : windows_core::PWSTR, cchmaxbuffchars : i32) -> windows_core::HRESULT); - GetThemeFilename(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, core::mem::transmute(pszthemefilename.as_ptr()), pszthemefilename.len().try_into().unwrap()).ok() + GetThemeFilename(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, core::mem::transmute(pszthemefilename.as_ptr()), pszthemefilename.len().try_into().unwrap()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeFont(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, ipropid: i32, pfont: *mut super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemeFont(htheme: HTHEME, hdc: Option, ipartid: i32, istateid: i32, ipropid: i32, pfont: *mut super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn GetThemeFont(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, ipropid : i32, pfont : *mut super::super::Graphics::Gdi:: LOGFONTW) -> windows_core::HRESULT); - GetThemeFont(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), core::mem::transmute(pfont)).ok() + GetThemeFont(core::mem::transmute(htheme), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), core::mem::transmute(pfont)).ok() } #[inline] -pub unsafe fn GetThemeInt(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeInt(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeInt(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pival : *mut i32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeInt(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeInt(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemeIntList(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID, pintlist: *mut INTLIST) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeIntList(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID, pintlist: *mut INTLIST) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn GetThemeIntList(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pintlist : *mut INTLIST) -> windows_core::HRESULT); - GetThemeIntList(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, core::mem::transmute(pintlist)).ok() + GetThemeIntList(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, core::mem::transmute(pintlist)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeMargins(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID, prc: Option<*const super::super::Foundation::RECT>) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemeMargins(htheme: HTHEME, hdc: Option, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID, prc: Option<*const super::super::Foundation::RECT>) -> windows_core::Result { 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(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, core::mem::transmute(prc.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeMargins(core::mem::transmute(htheme), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeMetric(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemeMetric(htheme: HTHEME, hdc: Option, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeMetric(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, ipropid : i32, pival : *mut i32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeMetric(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeMetric(core::mem::transmute(htheme), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemePartSize(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, prc: Option<*const super::super::Foundation::RECT>, esize: THEMESIZE) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemePartSize(htheme: HTHEME, hdc: Option, ipartid: i32, istateid: i32, prc: Option<*const super::super::Foundation::RECT>, esize: THEMESIZE) -> windows_core::Result { 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(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prc.unwrap_or(core::ptr::null())), core::mem::transmute(esize), &mut result__).map(|| core::mem::transmute(result__)) + GetThemePartSize(core::mem::transmute(htheme), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), core::mem::transmute(esize), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemePosition(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemePosition(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemePosition(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, ppoint : *mut super::super::Foundation:: POINT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemePosition(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) + GetThemePosition(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), ipropid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemePropertyOrigin(htheme: P0, ipartid: i32, istateid: i32, ipropid: i32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemePropertyOrigin(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: i32) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemePropertyOrigin(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, porigin : *mut PROPERTYORIGIN) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemePropertyOrigin(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), &mut result__).map(|| core::mem::transmute(result__)) + GetThemePropertyOrigin(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemeRect(htheme: P0, ipartid: i32, istateid: i32, ipropid: i32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeRect(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: i32) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeRect(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, prect : *mut super::super::Foundation:: RECT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeRect(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeRect(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemeStream(htheme: P0, ipartid: i32, istateid: i32, ipropid: i32, ppvstream: *mut *mut core::ffi::c_void, pcbstream: Option<*mut u32>, hinst: P6) -> windows_core::Result<()> -where - P0: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn GetThemeStream(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: i32, ppvstream: *mut *mut core::ffi::c_void, pcbstream: Option<*mut u32>, hinst: Option) -> windows_core::Result<()> { 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(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), core::mem::transmute(ppvstream), core::mem::transmute(pcbstream.unwrap_or(core::ptr::null_mut())), hinst.param().abi()).ok() + GetThemeStream(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), core::mem::transmute(ppvstream), core::mem::transmute(pcbstream.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinst.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetThemeString(htheme: P0, ipartid: i32, istateid: i32, ipropid: i32, pszbuff: &mut [u16]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeString(htheme: HTHEME, ipartid: i32, istateid: i32, ipropid: i32, pszbuff: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn GetThemeString(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pszbuff : windows_core::PWSTR, cchmaxbuffchars : i32) -> windows_core::HRESULT); - GetThemeString(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), core::mem::transmute(pszbuff.as_ptr()), pszbuff.len().try_into().unwrap()).ok() + GetThemeString(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ipropid), core::mem::transmute(pszbuff.as_ptr()), pszbuff.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn GetThemeSysBool(htheme: P0, iboolid: THEME_PROPERTY_SYMBOL_ID) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeSysBool(htheme: Option, iboolid: THEME_PROPERTY_SYMBOL_ID) -> super::super::Foundation::BOOL { windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysBool(htheme : HTHEME, iboolid : i32) -> super::super::Foundation:: BOOL); - GetThemeSysBool(htheme.param().abi(), iboolid.0 as _) + GetThemeSysBool(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), iboolid.0 as _) } #[inline] -pub unsafe fn GetThemeSysColor(htheme: P0, icolorid: i32) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeSysColor(htheme: Option, icolorid: i32) -> super::super::Foundation::COLORREF { windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysColor(htheme : HTHEME, icolorid : i32) -> super::super::Foundation:: COLORREF); - GetThemeSysColor(htheme.param().abi(), core::mem::transmute(icolorid)) + GetThemeSysColor(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), core::mem::transmute(icolorid)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeSysColorBrush(htheme: P0, icolorid: THEME_PROPERTY_SYMBOL_ID) -> super::super::Graphics::Gdi::HBRUSH -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeSysColorBrush(htheme: Option, icolorid: THEME_PROPERTY_SYMBOL_ID) -> super::super::Graphics::Gdi::HBRUSH { windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysColorBrush(htheme : HTHEME, icolorid : i32) -> super::super::Graphics::Gdi:: HBRUSH); - GetThemeSysColorBrush(htheme.param().abi(), icolorid.0 as _) + GetThemeSysColorBrush(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), icolorid.0 as _) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeSysFont(htheme: P0, ifontid: THEME_PROPERTY_SYMBOL_ID, plf: *mut super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeSysFont(htheme: Option, ifontid: THEME_PROPERTY_SYMBOL_ID, plf: *mut super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysFont(htheme : HTHEME, ifontid : i32, plf : *mut super::super::Graphics::Gdi:: LOGFONTW) -> windows_core::HRESULT); - GetThemeSysFont(htheme.param().abi(), ifontid.0 as _, core::mem::transmute(plf)).ok() + GetThemeSysFont(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), ifontid.0 as _, core::mem::transmute(plf)).ok() } #[inline] -pub unsafe fn GetThemeSysInt(htheme: P0, iintid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeSysInt(htheme: HTHEME, iintid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysInt(htheme : HTHEME, iintid : i32, pivalue : *mut i32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeSysInt(htheme.param().abi(), iintid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) + GetThemeSysInt(core::mem::transmute(htheme), iintid.0 as _, &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetThemeSysSize(htheme: P0, isizeid: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeSysSize(htheme: Option, isizeid: i32) -> i32 { windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysSize(htheme : HTHEME, isizeid : i32) -> i32); - GetThemeSysSize(htheme.param().abi(), core::mem::transmute(isizeid)) + GetThemeSysSize(core::mem::transmute(htheme.unwrap_or(core::mem::zeroed())), core::mem::transmute(isizeid)) } #[inline] -pub unsafe fn GetThemeSysString(htheme: P0, istringid: THEME_PROPERTY_SYMBOL_ID, pszstringbuff: &mut [u16]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeSysString(htheme: HTHEME, istringid: THEME_PROPERTY_SYMBOL_ID, pszstringbuff: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysString(htheme : HTHEME, istringid : i32, pszstringbuff : windows_core::PWSTR, cchmaxstringchars : i32) -> windows_core::HRESULT); - GetThemeSysString(htheme.param().abi(), istringid.0 as _, core::mem::transmute(pszstringbuff.as_ptr()), pszstringbuff.len().try_into().unwrap()).ok() + GetThemeSysString(core::mem::transmute(htheme), istringid.0 as _, core::mem::transmute(pszstringbuff.as_ptr()), pszstringbuff.len().try_into().unwrap()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeTextExtent(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, psztext: &[u16], dwtextflags: super::super::Graphics::Gdi::DRAW_TEXT_FORMAT, pboundingrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemeTextExtent(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HDC, ipartid: i32, istateid: i32, psztext: &[u16], dwtextflags: super::super::Graphics::Gdi::DRAW_TEXT_FORMAT, pboundingrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result { 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(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(dwtextflags), core::mem::transmute(pboundingrect.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeTextExtent(core::mem::transmute(htheme), core::mem::transmute(hdc), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), core::mem::transmute(dwtextflags), core::mem::transmute(pboundingrect.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetThemeTextMetrics(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, ptm: *mut super::super::Graphics::Gdi::TEXTMETRICW) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetThemeTextMetrics(htheme: HTHEME, hdc: super::super::Graphics::Gdi::HDC, ipartid: i32, istateid: i32, ptm: *mut super::super::Graphics::Gdi::TEXTMETRICW) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn GetThemeTextMetrics(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, ptm : *mut super::super::Graphics::Gdi:: TEXTMETRICW) -> windows_core::HRESULT); - GetThemeTextMetrics(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ptm)).ok() + GetThemeTextMetrics(core::mem::transmute(htheme), core::mem::transmute(hdc), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(ptm)).ok() } #[inline] -pub unsafe fn GetThemeTimingFunction(htheme: P0, itimingfunctionid: i32, ptimingfunction: Option<*mut TA_TIMINGFUNCTION>, cbsize: u32, pcbsizeout: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeTimingFunction(htheme: HTHEME, itimingfunctionid: i32, ptimingfunction: Option<*mut TA_TIMINGFUNCTION>, cbsize: u32, pcbsizeout: *mut u32) -> windows_core::Result<()> { 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(), core::mem::transmute(itimingfunctionid), core::mem::transmute(ptimingfunction.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbsize), core::mem::transmute(pcbsizeout)).ok() + GetThemeTimingFunction(core::mem::transmute(htheme), core::mem::transmute(itimingfunctionid), core::mem::transmute(ptimingfunction.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), core::mem::transmute(pcbsizeout)).ok() } #[inline] -pub unsafe fn GetThemeTransitionDuration(htheme: P0, ipartid: i32, istateidfrom: i32, istateidto: i32, ipropid: i32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetThemeTransitionDuration(htheme: HTHEME, ipartid: i32, istateidfrom: i32, istateidto: i32, ipropid: i32) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn GetThemeTransitionDuration(htheme : HTHEME, ipartid : i32, istateidfrom : i32, istateidto : i32, ipropid : i32, pdwduration : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeTransitionDuration(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateidfrom), core::mem::transmute(istateidto), core::mem::transmute(ipropid), &mut result__).map(|| core::mem::transmute(result__)) + GetThemeTransitionDuration(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateidfrom), core::mem::transmute(istateidto), core::mem::transmute(ipropid), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetWindowFeedbackSetting(hwnd: P0, feedback: FEEDBACK_TYPE, dwflags: u32, psize: *mut u32, config: Option<*mut core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowFeedbackSetting(hwnd: super::super::Foundation::HWND, feedback: FEEDBACK_TYPE, dwflags: u32, psize: *mut u32, config: Option<*mut core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(feedback), core::mem::transmute(dwflags), core::mem::transmute(psize), core::mem::transmute(config.unwrap_or(core::ptr::null_mut()))) + GetWindowFeedbackSetting(core::mem::transmute(hwnd), core::mem::transmute(feedback), core::mem::transmute(dwflags), core::mem::transmute(psize), core::mem::transmute(config.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetWindowTheme(hwnd: P0) -> HTHEME -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowTheme(hwnd: super::super::Foundation::HWND) -> HTHEME { windows_targets::link!("uxtheme.dll" "system" fn GetWindowTheme(hwnd : super::super::Foundation:: HWND) -> HTHEME); - GetWindowTheme(hwnd.param().abi()) + GetWindowTheme(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn HIMAGELIST_QueryInterface(himl: P0, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HIMAGELIST_QueryInterface(himl: HIMAGELIST, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("comctl32.dll" "system" fn HIMAGELIST_QueryInterface(himl : HIMAGELIST, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - HIMAGELIST_QueryInterface(himl.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() + HIMAGELIST_QueryInterface(core::mem::transmute(himl), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn HitTestThemeBackground(htheme: P0, hdc: P1, ipartid: i32, istateid: i32, dwoptions: HIT_TEST_BACKGROUND_OPTIONS, prect: *const super::super::Foundation::RECT, hrgn: P6, pttest: super::super::Foundation::POINT) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn HitTestThemeBackground(htheme: HTHEME, hdc: Option, ipartid: i32, istateid: i32, dwoptions: HIT_TEST_BACKGROUND_OPTIONS, prect: *const super::super::Foundation::RECT, hrgn: Option, pttest: super::super::Foundation::POINT) -> windows_core::Result { windows_targets::link!("uxtheme.dll" "system" fn HitTestThemeBackground(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, dwoptions : HIT_TEST_BACKGROUND_OPTIONS, prect : *const super::super::Foundation:: RECT, hrgn : super::super::Graphics::Gdi:: HRGN, pttest : super::super::Foundation:: POINT, pwhittestcode : *mut u16) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - HitTestThemeBackground(htheme.param().abi(), hdc.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(dwoptions), core::mem::transmute(prect), hrgn.param().abi(), core::mem::transmute(pttest), &mut result__).map(|| core::mem::transmute(result__)) + HitTestThemeBackground(core::mem::transmute(htheme), core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(ipartid), core::mem::transmute(istateid), core::mem::transmute(dwoptions), core::mem::transmute(prect), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), core::mem::transmute(pttest), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImageList_Add(himl: P0, hbmimage: P1, hbmmask: P2) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ImageList_Add(himl: HIMAGELIST, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: Option) -> i32 { windows_targets::link!("comctl32.dll" "system" fn ImageList_Add(himl : HIMAGELIST, hbmimage : super::super::Graphics::Gdi:: HBITMAP, hbmmask : super::super::Graphics::Gdi:: HBITMAP) -> i32); - ImageList_Add(himl.param().abi(), hbmimage.param().abi(), hbmmask.param().abi()) + ImageList_Add(core::mem::transmute(himl), core::mem::transmute(hbmimage), core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImageList_AddMasked(himl: P0, hbmimage: P1, crmask: P2) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ImageList_AddMasked(himl: HIMAGELIST, hbmimage: super::super::Graphics::Gdi::HBITMAP, crmask: super::super::Foundation::COLORREF) -> i32 { windows_targets::link!("comctl32.dll" "system" fn ImageList_AddMasked(himl : HIMAGELIST, hbmimage : super::super::Graphics::Gdi:: HBITMAP, crmask : super::super::Foundation:: COLORREF) -> i32); - ImageList_AddMasked(himl.param().abi(), hbmimage.param().abi(), crmask.param().abi()) + ImageList_AddMasked(core::mem::transmute(himl), core::mem::transmute(hbmimage), core::mem::transmute(crmask)) } #[inline] -pub unsafe fn ImageList_BeginDrag(himltrack: P0, itrack: i32, dxhotspot: i32, dyhotspot: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_BeginDrag(himltrack: HIMAGELIST, itrack: i32, dxhotspot: i32, dyhotspot: i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_BeginDrag(himltrack : HIMAGELIST, itrack : i32, dxhotspot : i32, dyhotspot : i32) -> super::super::Foundation:: BOOL); - ImageList_BeginDrag(himltrack.param().abi(), core::mem::transmute(itrack), core::mem::transmute(dxhotspot), core::mem::transmute(dyhotspot)) + ImageList_BeginDrag(core::mem::transmute(himltrack), core::mem::transmute(itrack), core::mem::transmute(dxhotspot), core::mem::transmute(dyhotspot)) } #[inline] pub unsafe fn ImageList_CoCreateInstance(rclsid: *const windows_core::GUID, punkouter: P1) -> windows_core::Result @@ -1215,13 +841,9 @@ where ImageList_CoCreateInstance(core::mem::transmute(rclsid), punkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn ImageList_Copy(himldst: P0, idst: i32, himlsrc: P2, isrc: i32, uflags: IMAGE_LIST_COPY_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ImageList_Copy(himldst: HIMAGELIST, idst: i32, himlsrc: HIMAGELIST, isrc: i32, uflags: IMAGE_LIST_COPY_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_Copy(himldst : HIMAGELIST, idst : i32, himlsrc : HIMAGELIST, isrc : i32, uflags : IMAGE_LIST_COPY_FLAGS) -> super::super::Foundation:: BOOL); - ImageList_Copy(himldst.param().abi(), core::mem::transmute(idst), himlsrc.param().abi(), core::mem::transmute(isrc), core::mem::transmute(uflags)) + ImageList_Copy(core::mem::transmute(himldst), core::mem::transmute(idst), core::mem::transmute(himlsrc), core::mem::transmute(isrc), core::mem::transmute(uflags)) } #[inline] pub unsafe fn ImageList_Create(cx: i32, cy: i32, flags: IMAGELIST_CREATION_FLAGS, cinitial: i32, cgrow: i32) -> HIMAGELIST { @@ -1229,28 +851,19 @@ pub unsafe fn ImageList_Create(cx: i32, cy: i32, flags: IMAGELIST_CREATION_FLAGS ImageList_Create(core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(flags), core::mem::transmute(cinitial), core::mem::transmute(cgrow)) } #[inline] -pub unsafe fn ImageList_Destroy(himl: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_Destroy(himl: Option) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_Destroy(himl : HIMAGELIST) -> super::super::Foundation:: BOOL); - ImageList_Destroy(himl.param().abi()) + ImageList_Destroy(core::mem::transmute(himl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ImageList_DragEnter(hwndlock: P0, x: i32, y: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_DragEnter(hwndlock: super::super::Foundation::HWND, x: i32, y: i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_DragEnter(hwndlock : super::super::Foundation:: HWND, x : i32, y : i32) -> super::super::Foundation:: BOOL); - ImageList_DragEnter(hwndlock.param().abi(), core::mem::transmute(x), core::mem::transmute(y)) + ImageList_DragEnter(core::mem::transmute(hwndlock), core::mem::transmute(x), core::mem::transmute(y)) } #[inline] -pub unsafe fn ImageList_DragLeave(hwndlock: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_DragLeave(hwndlock: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_DragLeave(hwndlock : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ImageList_DragLeave(hwndlock.param().abi()) + ImageList_DragLeave(core::mem::transmute(hwndlock)) } #[inline] pub unsafe fn ImageList_DragMove(x: i32, y: i32) -> super::super::Foundation::BOOL { @@ -1267,25 +880,15 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImageList_Draw(himl: P0, i: i32, hdcdst: P2, x: i32, y: i32, fstyle: IMAGE_LIST_DRAW_STYLE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ImageList_Draw(himl: HIMAGELIST, i: i32, hdcdst: super::super::Graphics::Gdi::HDC, x: i32, y: i32, fstyle: IMAGE_LIST_DRAW_STYLE) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_Draw(himl : HIMAGELIST, i : i32, hdcdst : super::super::Graphics::Gdi:: HDC, x : i32, y : i32, fstyle : IMAGE_LIST_DRAW_STYLE) -> super::super::Foundation:: BOOL); - ImageList_Draw(himl.param().abi(), core::mem::transmute(i), hdcdst.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(fstyle)) + ImageList_Draw(core::mem::transmute(himl), core::mem::transmute(i), core::mem::transmute(hdcdst), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(fstyle)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImageList_DrawEx(himl: P0, i: i32, hdcdst: P2, x: i32, y: i32, dx: i32, dy: i32, rgbbk: P7, rgbfg: P8, fstyle: IMAGE_LIST_DRAW_STYLE) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, - P7: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn ImageList_DrawEx(himl: HIMAGELIST, i: i32, hdcdst: super::super::Graphics::Gdi::HDC, x: i32, y: i32, dx: i32, dy: i32, rgbbk: super::super::Foundation::COLORREF, rgbfg: super::super::Foundation::COLORREF, fstyle: IMAGE_LIST_DRAW_STYLE) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_DrawEx(himl : HIMAGELIST, i : i32, hdcdst : super::super::Graphics::Gdi:: HDC, x : i32, y : i32, dx : i32, dy : i32, rgbbk : super::super::Foundation:: COLORREF, rgbfg : super::super::Foundation:: COLORREF, fstyle : IMAGE_LIST_DRAW_STYLE) -> super::super::Foundation:: BOOL); - ImageList_DrawEx(himl.param().abi(), core::mem::transmute(i), hdcdst.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(dx), core::mem::transmute(dy), rgbbk.param().abi(), rgbfg.param().abi(), core::mem::transmute(fstyle)) + ImageList_DrawEx(core::mem::transmute(himl), core::mem::transmute(i), core::mem::transmute(hdcdst), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(dx), core::mem::transmute(dy), core::mem::transmute(rgbbk), core::mem::transmute(rgbfg), core::mem::transmute(fstyle)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1294,12 +897,9 @@ pub unsafe fn ImageList_DrawIndirect(pimldp: *const IMAGELISTDRAWPARAMS) -> supe ImageList_DrawIndirect(core::mem::transmute(pimldp)) } #[inline] -pub unsafe fn ImageList_Duplicate(himl: P0) -> HIMAGELIST -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_Duplicate(himl: HIMAGELIST) -> HIMAGELIST { windows_targets::link!("comctl32.dll" "system" fn ImageList_Duplicate(himl : HIMAGELIST) -> HIMAGELIST); - ImageList_Duplicate(himl.param().abi()) + ImageList_Duplicate(core::mem::transmute(himl)) } #[inline] pub unsafe fn ImageList_EndDrag() { @@ -1307,82 +907,59 @@ pub unsafe fn ImageList_EndDrag() { ImageList_EndDrag() } #[inline] -pub unsafe fn ImageList_GetBkColor(himl: P0) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_GetBkColor(himl: HIMAGELIST) -> super::super::Foundation::COLORREF { windows_targets::link!("comctl32.dll" "system" fn ImageList_GetBkColor(himl : HIMAGELIST) -> super::super::Foundation:: COLORREF); - ImageList_GetBkColor(himl.param().abi()) + ImageList_GetBkColor(core::mem::transmute(himl)) } #[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(core::ptr::null_mut())), core::mem::transmute(ppthotspot.unwrap_or(core::ptr::null_mut()))) + ImageList_GetDragImage(core::mem::transmute(ppt.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppthotspot.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ImageList_GetIcon(himl: P0, i: i32, flags: IMAGE_LIST_DRAW_STYLE) -> super::WindowsAndMessaging::HICON -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_GetIcon(himl: HIMAGELIST, i: i32, flags: IMAGE_LIST_DRAW_STYLE) -> super::WindowsAndMessaging::HICON { windows_targets::link!("comctl32.dll" "system" fn ImageList_GetIcon(himl : HIMAGELIST, i : i32, flags : IMAGE_LIST_DRAW_STYLE) -> super::WindowsAndMessaging:: HICON); - ImageList_GetIcon(himl.param().abi(), core::mem::transmute(i), core::mem::transmute(flags)) + ImageList_GetIcon(core::mem::transmute(himl), core::mem::transmute(i), core::mem::transmute(flags)) } #[inline] -pub unsafe fn ImageList_GetIconSize(himl: P0, cx: Option<*mut i32>, cy: Option<*mut i32>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_GetIconSize(himl: HIMAGELIST, cx: Option<*mut i32>, cy: Option<*mut i32>) -> super::super::Foundation::BOOL { 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(core::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(core::ptr::null_mut()))) + ImageList_GetIconSize(core::mem::transmute(himl), core::mem::transmute(cx.unwrap_or(core::mem::zeroed())), core::mem::transmute(cy.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ImageList_GetImageCount(himl: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_GetImageCount(himl: HIMAGELIST) -> i32 { windows_targets::link!("comctl32.dll" "system" fn ImageList_GetImageCount(himl : HIMAGELIST) -> i32); - ImageList_GetImageCount(himl.param().abi()) + ImageList_GetImageCount(core::mem::transmute(himl)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImageList_GetImageInfo(himl: P0, i: i32, pimageinfo: *mut IMAGEINFO) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_GetImageInfo(himl: HIMAGELIST, i: i32, pimageinfo: *mut IMAGEINFO) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_GetImageInfo(himl : HIMAGELIST, i : i32, pimageinfo : *mut IMAGEINFO) -> super::super::Foundation:: BOOL); - ImageList_GetImageInfo(himl.param().abi(), core::mem::transmute(i), core::mem::transmute(pimageinfo)) + ImageList_GetImageInfo(core::mem::transmute(himl), core::mem::transmute(i), core::mem::transmute(pimageinfo)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ImageList_LoadImageA(hi: P0, lpbmp: P1, cx: i32, cgrow: i32, crmask: P4, utype: u32, uflags: super::WindowsAndMessaging::IMAGE_FLAGS) -> HIMAGELIST +pub unsafe fn ImageList_LoadImageA(hi: super::super::Foundation::HINSTANCE, lpbmp: P1, cx: i32, cgrow: i32, crmask: super::super::Foundation::COLORREF, utype: u32, uflags: super::WindowsAndMessaging::IMAGE_FLAGS) -> HIMAGELIST where - P0: windows_core::Param, P1: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn ImageList_LoadImageA(hi : super::super::Foundation:: HINSTANCE, lpbmp : windows_core::PCSTR, cx : i32, cgrow : i32, crmask : super::super::Foundation:: COLORREF, utype : u32, uflags : super::WindowsAndMessaging:: IMAGE_FLAGS) -> HIMAGELIST); - ImageList_LoadImageA(hi.param().abi(), lpbmp.param().abi(), core::mem::transmute(cx), core::mem::transmute(cgrow), crmask.param().abi(), core::mem::transmute(utype), core::mem::transmute(uflags)) + ImageList_LoadImageA(core::mem::transmute(hi), lpbmp.param().abi(), core::mem::transmute(cx), core::mem::transmute(cgrow), core::mem::transmute(crmask), core::mem::transmute(utype), core::mem::transmute(uflags)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ImageList_LoadImageW(hi: P0, lpbmp: P1, cx: i32, cgrow: i32, crmask: P4, utype: u32, uflags: super::WindowsAndMessaging::IMAGE_FLAGS) -> HIMAGELIST +pub unsafe fn ImageList_LoadImageW(hi: super::super::Foundation::HINSTANCE, lpbmp: P1, cx: i32, cgrow: i32, crmask: super::super::Foundation::COLORREF, utype: u32, uflags: super::WindowsAndMessaging::IMAGE_FLAGS) -> HIMAGELIST where - P0: windows_core::Param, P1: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn ImageList_LoadImageW(hi : super::super::Foundation:: HINSTANCE, lpbmp : windows_core::PCWSTR, cx : i32, cgrow : i32, crmask : super::super::Foundation:: COLORREF, utype : u32, uflags : super::WindowsAndMessaging:: IMAGE_FLAGS) -> HIMAGELIST); - ImageList_LoadImageW(hi.param().abi(), lpbmp.param().abi(), core::mem::transmute(cx), core::mem::transmute(cgrow), crmask.param().abi(), core::mem::transmute(utype), core::mem::transmute(uflags)) + ImageList_LoadImageW(core::mem::transmute(hi), lpbmp.param().abi(), core::mem::transmute(cx), core::mem::transmute(cgrow), core::mem::transmute(crmask), core::mem::transmute(utype), core::mem::transmute(uflags)) } #[inline] -pub unsafe fn ImageList_Merge(himl1: P0, i1: i32, himl2: P2, i2: i32, dx: i32, dy: i32) -> HIMAGELIST -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ImageList_Merge(himl1: HIMAGELIST, i1: i32, himl2: HIMAGELIST, i2: i32, dx: i32, dy: i32) -> HIMAGELIST { windows_targets::link!("comctl32.dll" "system" fn ImageList_Merge(himl1 : HIMAGELIST, i1 : i32, himl2 : HIMAGELIST, i2 : i32, dx : i32, dy : i32) -> HIMAGELIST); - ImageList_Merge(himl1.param().abi(), core::mem::transmute(i1), himl2.param().abi(), core::mem::transmute(i2), core::mem::transmute(dx), core::mem::transmute(dy)) + ImageList_Merge(core::mem::transmute(himl1), core::mem::transmute(i1), core::mem::transmute(himl2), core::mem::transmute(i2), core::mem::transmute(dx), core::mem::transmute(dy)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1403,94 +980,64 @@ where ImageList_ReadEx(core::mem::transmute(dwflags), pstm.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() } #[inline] -pub unsafe fn ImageList_Remove(himl: P0, i: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_Remove(himl: HIMAGELIST, i: i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_Remove(himl : HIMAGELIST, i : i32) -> super::super::Foundation:: BOOL); - ImageList_Remove(himl.param().abi(), core::mem::transmute(i)) + ImageList_Remove(core::mem::transmute(himl), core::mem::transmute(i)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImageList_Replace(himl: P0, i: i32, hbmimage: P2, hbmmask: P3) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn ImageList_Replace(himl: HIMAGELIST, i: i32, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: Option) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_Replace(himl : HIMAGELIST, i : i32, hbmimage : super::super::Graphics::Gdi:: HBITMAP, hbmmask : super::super::Graphics::Gdi:: HBITMAP) -> super::super::Foundation:: BOOL); - ImageList_Replace(himl.param().abi(), core::mem::transmute(i), hbmimage.param().abi(), hbmmask.param().abi()) + ImageList_Replace(core::mem::transmute(himl), core::mem::transmute(i), core::mem::transmute(hbmimage), core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ImageList_ReplaceIcon(himl: P0, i: i32, hicon: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ImageList_ReplaceIcon(himl: HIMAGELIST, i: i32, hicon: super::WindowsAndMessaging::HICON) -> i32 { windows_targets::link!("comctl32.dll" "system" fn ImageList_ReplaceIcon(himl : HIMAGELIST, i : i32, hicon : super::WindowsAndMessaging:: HICON) -> i32); - ImageList_ReplaceIcon(himl.param().abi(), core::mem::transmute(i), hicon.param().abi()) + ImageList_ReplaceIcon(core::mem::transmute(himl), core::mem::transmute(i), core::mem::transmute(hicon)) } #[inline] -pub unsafe fn ImageList_SetBkColor(himl: P0, clrbk: P1) -> super::super::Foundation::COLORREF -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImageList_SetBkColor(himl: HIMAGELIST, clrbk: super::super::Foundation::COLORREF) -> super::super::Foundation::COLORREF { windows_targets::link!("comctl32.dll" "system" fn ImageList_SetBkColor(himl : HIMAGELIST, clrbk : super::super::Foundation:: COLORREF) -> super::super::Foundation:: COLORREF); - ImageList_SetBkColor(himl.param().abi(), clrbk.param().abi()) + ImageList_SetBkColor(core::mem::transmute(himl), core::mem::transmute(clrbk)) } #[inline] -pub unsafe fn ImageList_SetDragCursorImage(himldrag: P0, idrag: i32, dxhotspot: i32, dyhotspot: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_SetDragCursorImage(himldrag: HIMAGELIST, idrag: i32, dxhotspot: i32, dyhotspot: i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_SetDragCursorImage(himldrag : HIMAGELIST, idrag : i32, dxhotspot : i32, dyhotspot : i32) -> super::super::Foundation:: BOOL); - ImageList_SetDragCursorImage(himldrag.param().abi(), core::mem::transmute(idrag), core::mem::transmute(dxhotspot), core::mem::transmute(dyhotspot)) + ImageList_SetDragCursorImage(core::mem::transmute(himldrag), core::mem::transmute(idrag), core::mem::transmute(dxhotspot), core::mem::transmute(dyhotspot)) } #[inline] -pub unsafe fn ImageList_SetIconSize(himl: P0, cx: i32, cy: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_SetIconSize(himl: HIMAGELIST, cx: i32, cy: i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_SetIconSize(himl : HIMAGELIST, cx : i32, cy : i32) -> super::super::Foundation:: BOOL); - ImageList_SetIconSize(himl.param().abi(), core::mem::transmute(cx), core::mem::transmute(cy)) + ImageList_SetIconSize(core::mem::transmute(himl), core::mem::transmute(cx), core::mem::transmute(cy)) } #[inline] -pub unsafe fn ImageList_SetImageCount(himl: P0, unewcount: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_SetImageCount(himl: HIMAGELIST, unewcount: u32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_SetImageCount(himl : HIMAGELIST, unewcount : u32) -> super::super::Foundation:: BOOL); - ImageList_SetImageCount(himl.param().abi(), core::mem::transmute(unewcount)) + ImageList_SetImageCount(core::mem::transmute(himl), core::mem::transmute(unewcount)) } #[inline] -pub unsafe fn ImageList_SetOverlayImage(himl: P0, iimage: i32, ioverlay: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_SetOverlayImage(himl: HIMAGELIST, iimage: i32, ioverlay: i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_SetOverlayImage(himl : HIMAGELIST, iimage : i32, ioverlay : i32) -> super::super::Foundation:: BOOL); - ImageList_SetOverlayImage(himl.param().abi(), core::mem::transmute(iimage), core::mem::transmute(ioverlay)) + ImageList_SetOverlayImage(core::mem::transmute(himl), core::mem::transmute(iimage), core::mem::transmute(ioverlay)) } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn ImageList_Write(himl: P0, pstm: P1) -> super::super::Foundation::BOOL +pub unsafe fn ImageList_Write(himl: HIMAGELIST, pstm: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn ImageList_Write(himl : HIMAGELIST, pstm : * mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - ImageList_Write(himl.param().abi(), pstm.param().abi()) + ImageList_Write(core::mem::transmute(himl), pstm.param().abi()) } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn ImageList_WriteEx(himl: P0, dwflags: IMAGE_LIST_WRITE_STREAM_FLAGS, pstm: P2) -> windows_core::Result<()> +pub unsafe fn ImageList_WriteEx(himl: HIMAGELIST, dwflags: IMAGE_LIST_WRITE_STREAM_FLAGS, pstm: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn ImageList_WriteEx(himl : HIMAGELIST, dwflags : IMAGE_LIST_WRITE_STREAM_FLAGS, pstm : * mut core::ffi::c_void) -> windows_core::HRESULT); - ImageList_WriteEx(himl.param().abi(), core::mem::transmute(dwflags), pstm.param().abi()).ok() + ImageList_WriteEx(core::mem::transmute(himl), core::mem::transmute(dwflags), pstm.param().abi()).ok() } #[inline] pub unsafe fn InitCommonControls() { @@ -1508,12 +1055,9 @@ pub unsafe fn InitMUILanguage(uilang: u16) { InitMUILanguage(core::mem::transmute(uilang)) } #[inline] -pub unsafe fn InitializeFlatSB(param0: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn InitializeFlatSB(param0: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn InitializeFlatSB(param0 : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - InitializeFlatSB(param0.param().abi()) + InitializeFlatSB(core::mem::transmute(param0)) } #[inline] pub unsafe fn IsAppThemed() -> super::super::Foundation::BOOL { @@ -1531,12 +1075,9 @@ pub unsafe fn IsCompositionActive() -> super::super::Foundation::BOOL { IsCompositionActive() } #[inline] -pub unsafe fn IsDlgButtonChecked(hdlg: P0, nidbutton: i32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn IsDlgButtonChecked(hdlg: super::super::Foundation::HWND, nidbutton: i32) -> u32 { windows_targets::link!("user32.dll" "system" fn IsDlgButtonChecked(hdlg : super::super::Foundation:: HWND, nidbutton : i32) -> u32); - IsDlgButtonChecked(hdlg.param().abi(), core::mem::transmute(nidbutton)) + IsDlgButtonChecked(core::mem::transmute(hdlg), core::mem::transmute(nidbutton)) } #[inline] pub unsafe fn IsThemeActive() -> super::super::Foundation::BOOL { @@ -1544,98 +1085,74 @@ pub unsafe fn IsThemeActive() -> super::super::Foundation::BOOL { IsThemeActive() } #[inline] -pub unsafe fn IsThemeBackgroundPartiallyTransparent(htheme: P0, ipartid: i32, istateid: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsThemeBackgroundPartiallyTransparent(htheme: HTHEME, ipartid: i32, istateid: i32) -> super::super::Foundation::BOOL { windows_targets::link!("uxtheme.dll" "system" fn IsThemeBackgroundPartiallyTransparent(htheme : HTHEME, ipartid : i32, istateid : i32) -> super::super::Foundation:: BOOL); - IsThemeBackgroundPartiallyTransparent(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid)) + IsThemeBackgroundPartiallyTransparent(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid)) } #[inline] -pub unsafe fn IsThemeDialogTextureEnabled(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsThemeDialogTextureEnabled(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("uxtheme.dll" "system" fn IsThemeDialogTextureEnabled(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsThemeDialogTextureEnabled(hwnd.param().abi()) + IsThemeDialogTextureEnabled(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn IsThemePartDefined(htheme: P0, ipartid: i32, istateid: i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsThemePartDefined(htheme: HTHEME, ipartid: i32, istateid: i32) -> super::super::Foundation::BOOL { windows_targets::link!("uxtheme.dll" "system" fn IsThemePartDefined(htheme : HTHEME, ipartid : i32, istateid : i32) -> super::super::Foundation:: BOOL); - IsThemePartDefined(htheme.param().abi(), core::mem::transmute(ipartid), core::mem::transmute(istateid)) + IsThemePartDefined(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid)) } #[inline] -pub unsafe fn LBItemFromPt(hlb: P0, pt: super::super::Foundation::POINT, bautoscroll: P2) -> i32 +pub unsafe fn LBItemFromPt(hlb: super::super::Foundation::HWND, pt: super::super::Foundation::POINT, bautoscroll: P2) -> i32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn LBItemFromPt(hlb : super::super::Foundation:: HWND, pt : super::super::Foundation:: POINT, bautoscroll : super::super::Foundation:: BOOL) -> i32); - LBItemFromPt(hlb.param().abi(), core::mem::transmute(pt), bautoscroll.param().abi()) + LBItemFromPt(core::mem::transmute(hlb), core::mem::transmute(pt), bautoscroll.param().abi()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn LoadIconMetric(hinst: P0, pszname: P1, lims: _LI_METRIC) -> windows_core::Result +pub unsafe fn LoadIconMetric(hinst: Option, pszname: P1, lims: _LI_METRIC) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn LoadIconMetric(hinst : super::super::Foundation:: HINSTANCE, pszname : windows_core::PCWSTR, lims : _LI_METRIC, phico : *mut super::WindowsAndMessaging:: HICON) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - LoadIconMetric(hinst.param().abi(), pszname.param().abi(), core::mem::transmute(lims), &mut result__).map(|| core::mem::transmute(result__)) + LoadIconMetric(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), pszname.param().abi(), core::mem::transmute(lims), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn LoadIconWithScaleDown(hinst: P0, pszname: P1, cx: i32, cy: i32) -> windows_core::Result +pub unsafe fn LoadIconWithScaleDown(hinst: Option, pszname: P1, cx: i32, cy: i32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn LoadIconWithScaleDown(hinst : super::super::Foundation:: HINSTANCE, pszname : windows_core::PCWSTR, cx : i32, cy : i32, phico : *mut super::WindowsAndMessaging:: HICON) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - LoadIconWithScaleDown(hinst.param().abi(), pszname.param().abi(), core::mem::transmute(cx), core::mem::transmute(cy), &mut result__).map(|| core::mem::transmute(result__)) + LoadIconWithScaleDown(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), pszname.param().abi(), core::mem::transmute(cx), core::mem::transmute(cy), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn MakeDragList(hlb: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MakeDragList(hlb: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn MakeDragList(hlb : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - MakeDragList(hlb.param().abi()) + MakeDragList(core::mem::transmute(hlb)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn MenuHelp(umsg: u32, wparam: P1, lparam: P2, hmainmenu: P3, hinst: P4, hwndstatus: P5, lpwids: *const u32) -where - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn MenuHelp(umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, hmainmenu: super::WindowsAndMessaging::HMENU, hinst: super::super::Foundation::HINSTANCE, hwndstatus: super::super::Foundation::HWND, lpwids: *const u32) { windows_targets::link!("comctl32.dll" "system" fn MenuHelp(umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, hmainmenu : super::WindowsAndMessaging:: HMENU, hinst : super::super::Foundation:: HINSTANCE, hwndstatus : super::super::Foundation:: HWND, lpwids : *const u32)); - MenuHelp(core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi(), hmainmenu.param().abi(), hinst.param().abi(), hwndstatus.param().abi(), core::mem::transmute(lpwids)) + MenuHelp(core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(hmainmenu), core::mem::transmute(hinst), core::mem::transmute(hwndstatus), core::mem::transmute(lpwids)) } #[inline] -pub unsafe fn OpenThemeData(hwnd: P0, pszclasslist: P1) -> HTHEME +pub unsafe fn OpenThemeData(hwnd: Option, pszclasslist: P1) -> HTHEME where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn OpenThemeData(hwnd : super::super::Foundation:: HWND, pszclasslist : windows_core::PCWSTR) -> HTHEME); - OpenThemeData(hwnd.param().abi(), pszclasslist.param().abi()) + OpenThemeData(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszclasslist.param().abi()) } #[inline] -pub unsafe fn OpenThemeDataEx(hwnd: P0, pszclasslist: P1, dwflags: OPEN_THEME_DATA_FLAGS) -> HTHEME +pub unsafe fn OpenThemeDataEx(hwnd: Option, pszclasslist: P1, dwflags: OPEN_THEME_DATA_FLAGS) -> HTHEME where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn OpenThemeDataEx(hwnd : super::super::Foundation:: HWND, pszclasslist : windows_core::PCWSTR, dwflags : OPEN_THEME_DATA_FLAGS) -> HTHEME); - OpenThemeDataEx(hwnd.param().abi(), pszclasslist.param().abi(), core::mem::transmute(dwflags)) + OpenThemeDataEx(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszclasslist.param().abi(), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn PackTouchHitTestingProximityEvaluation(phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *const TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation::LRESULT { @@ -1655,51 +1172,44 @@ pub unsafe fn PropertySheetW(param0: *mut PROPSHEETHEADERW_V2) -> isize { PropertySheetW(core::mem::transmute(param0)) } #[inline] -pub unsafe fn RegisterPointerDeviceNotifications(window: P0, notifyrange: P1) -> windows_core::Result<()> +pub unsafe fn RegisterPointerDeviceNotifications(window: super::super::Foundation::HWND, notifyrange: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn RegisterPointerDeviceNotifications(window : super::super::Foundation:: HWND, notifyrange : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterPointerDeviceNotifications(window.param().abi(), notifyrange.param().abi()).ok() + RegisterPointerDeviceNotifications(core::mem::transmute(window), notifyrange.param().abi()).ok() } #[inline] -pub unsafe fn RegisterTouchHitTestingWindow(hwnd: P0, value: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterTouchHitTestingWindow(hwnd: super::super::Foundation::HWND, value: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn RegisterTouchHitTestingWindow(hwnd : super::super::Foundation:: HWND, value : u32) -> super::super::Foundation:: BOOL); - RegisterTouchHitTestingWindow(hwnd.param().abi(), core::mem::transmute(value)).ok() + RegisterTouchHitTestingWindow(core::mem::transmute(hwnd), core::mem::transmute(value)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SetScrollInfo(hwnd: P0, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, lpsi: *const super::WindowsAndMessaging::SCROLLINFO, redraw: P3) -> i32 +pub unsafe fn SetScrollInfo(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, lpsi: *const super::WindowsAndMessaging::SCROLLINFO, redraw: P3) -> i32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetScrollInfo(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, lpsi : *const super::WindowsAndMessaging:: SCROLLINFO, redraw : super::super::Foundation:: BOOL) -> i32); - SetScrollInfo(hwnd.param().abi(), core::mem::transmute(nbar), core::mem::transmute(lpsi), redraw.param().abi()) + SetScrollInfo(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(lpsi), redraw.param().abi()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SetScrollPos(hwnd: P0, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, npos: i32, bredraw: P3) -> i32 +pub unsafe fn SetScrollPos(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, npos: i32, bredraw: P3) -> i32 where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetScrollPos(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, npos : i32, bredraw : super::super::Foundation:: BOOL) -> i32); - SetScrollPos(hwnd.param().abi(), core::mem::transmute(nbar), core::mem::transmute(npos), bredraw.param().abi()) + SetScrollPos(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(npos), bredraw.param().abi()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SetScrollRange(hwnd: P0, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, nminpos: i32, nmaxpos: i32, bredraw: P4) -> windows_core::Result<()> +pub unsafe fn SetScrollRange(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, nminpos: i32, nmaxpos: i32, bredraw: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetScrollRange(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, nminpos : i32, nmaxpos : i32, bredraw : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetScrollRange(hwnd.param().abi(), core::mem::transmute(nbar), core::mem::transmute(nminpos), core::mem::transmute(nmaxpos), bredraw.param().abi()).ok() + SetScrollRange(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(nminpos), core::mem::transmute(nmaxpos), bredraw.param().abi()).ok() } #[inline] pub unsafe fn SetThemeAppProperties(dwflags: SET_THEME_APP_PROPERTIES_FLAGS) { @@ -1707,48 +1217,37 @@ pub unsafe fn SetThemeAppProperties(dwflags: SET_THEME_APP_PROPERTIES_FLAGS) { SetThemeAppProperties(core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn SetWindowFeedbackSetting(hwnd: P0, feedback: FEEDBACK_TYPE, dwflags: u32, size: u32, configuration: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowFeedbackSetting(hwnd: super::super::Foundation::HWND, feedback: FEEDBACK_TYPE, dwflags: u32, size: u32, configuration: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(feedback), core::mem::transmute(dwflags), core::mem::transmute(size), core::mem::transmute(configuration.unwrap_or(core::ptr::null()))) + SetWindowFeedbackSetting(core::mem::transmute(hwnd), core::mem::transmute(feedback), core::mem::transmute(dwflags), core::mem::transmute(size), core::mem::transmute(configuration.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetWindowTheme(hwnd: P0, pszsubappname: P1, pszsubidlist: P2) -> windows_core::Result<()> +pub unsafe fn SetWindowTheme(hwnd: super::super::Foundation::HWND, pszsubappname: P1, pszsubidlist: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn SetWindowTheme(hwnd : super::super::Foundation:: HWND, pszsubappname : windows_core::PCWSTR, pszsubidlist : windows_core::PCWSTR) -> windows_core::HRESULT); - SetWindowTheme(hwnd.param().abi(), pszsubappname.param().abi(), pszsubidlist.param().abi()).ok() + SetWindowTheme(core::mem::transmute(hwnd), pszsubappname.param().abi(), pszsubidlist.param().abi()).ok() } #[inline] -pub unsafe fn SetWindowThemeAttribute(hwnd: P0, eattribute: WINDOWTHEMEATTRIBUTETYPE, pvattribute: *const core::ffi::c_void, cbattribute: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowThemeAttribute(hwnd: super::super::Foundation::HWND, eattribute: WINDOWTHEMEATTRIBUTETYPE, pvattribute: *const core::ffi::c_void, cbattribute: u32) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn SetWindowThemeAttribute(hwnd : super::super::Foundation:: HWND, eattribute : WINDOWTHEMEATTRIBUTETYPE, pvattribute : *const core::ffi::c_void, cbattribute : u32) -> windows_core::HRESULT); - SetWindowThemeAttribute(hwnd.param().abi(), core::mem::transmute(eattribute), core::mem::transmute(pvattribute), core::mem::transmute(cbattribute)).ok() + SetWindowThemeAttribute(core::mem::transmute(hwnd), core::mem::transmute(eattribute), core::mem::transmute(pvattribute), core::mem::transmute(cbattribute)).ok() } #[inline] -pub unsafe fn ShowHideMenuCtl(hwnd: P0, uflags: usize, lpinfo: *const i32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ShowHideMenuCtl(hwnd: super::super::Foundation::HWND, uflags: usize, lpinfo: *const i32) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ShowHideMenuCtl(hwnd : super::super::Foundation:: HWND, uflags : usize, lpinfo : *const i32) -> super::super::Foundation:: BOOL); - ShowHideMenuCtl(hwnd.param().abi(), core::mem::transmute(uflags), core::mem::transmute(lpinfo)) + ShowHideMenuCtl(core::mem::transmute(hwnd), core::mem::transmute(uflags), core::mem::transmute(lpinfo)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ShowScrollBar(hwnd: P0, wbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, bshow: P2) -> windows_core::Result<()> +pub unsafe fn ShowScrollBar(hwnd: super::super::Foundation::HWND, wbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, bshow: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ShowScrollBar(hwnd : super::super::Foundation:: HWND, wbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, bshow : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ShowScrollBar(hwnd.param().abi(), core::mem::transmute(wbar), bshow.param().abi()).ok() + ShowScrollBar(core::mem::transmute(hwnd), core::mem::transmute(wbar), bshow.param().abi()).ok() } #[inline] pub unsafe fn Str_SetPtrW(ppsz: *mut windows_core::PWSTR, psz: P1) -> super::super::Foundation::BOOL @@ -1759,40 +1258,34 @@ where Str_SetPtrW(core::mem::transmute(ppsz), psz.param().abi()) } #[inline] -pub unsafe fn TaskDialog(hwndowner: P0, hinstance: P1, pszwindowtitle: P2, pszmaininstruction: P3, pszcontent: P4, dwcommonbuttons: TASKDIALOG_COMMON_BUTTON_FLAGS, pszicon: P6, pnbutton: Option<*mut i32>) -> windows_core::Result<()> +pub unsafe fn TaskDialog(hwndowner: Option, hinstance: Option, pszwindowtitle: P2, pszmaininstruction: P3, pszcontent: P4, dwcommonbuttons: TASKDIALOG_COMMON_BUTTON_FLAGS, pszicon: P6, pnbutton: Option<*mut i32>) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P6: 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(), core::mem::transmute(dwcommonbuttons), pszicon.param().abi(), core::mem::transmute(pnbutton.unwrap_or(core::ptr::null_mut()))).ok() + TaskDialog(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), pszwindowtitle.param().abi(), pszmaininstruction.param().abi(), pszcontent.param().abi(), core::mem::transmute(dwcommonbuttons), pszicon.param().abi(), core::mem::transmute(pnbutton.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(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() + TaskDialogIndirect(core::mem::transmute(ptaskconfig), core::mem::transmute(pnbutton.unwrap_or(core::mem::zeroed())), core::mem::transmute(pnradiobutton.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfverificationflagchecked.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn UninitializeFlatSB(param0: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UninitializeFlatSB(param0: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("comctl32.dll" "system" fn UninitializeFlatSB(param0 : super::super::Foundation:: HWND) -> windows_core::HRESULT); - UninitializeFlatSB(param0.param().abi()).ok() + UninitializeFlatSB(core::mem::transmute(param0)).ok() } #[inline] -pub unsafe fn UpdatePanningFeedback(hwnd: P0, ltotaloverpanoffsetx: i32, ltotaloverpanoffsety: i32, fininertia: P3) -> super::super::Foundation::BOOL +pub unsafe fn UpdatePanningFeedback(hwnd: super::super::Foundation::HWND, ltotaloverpanoffsetx: i32, ltotaloverpanoffsety: i32, fininertia: P3) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn UpdatePanningFeedback(hwnd : super::super::Foundation:: HWND, ltotaloverpanoffsetx : i32, ltotaloverpanoffsety : i32, fininertia : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UpdatePanningFeedback(hwnd.param().abi(), core::mem::transmute(ltotaloverpanoffsetx), core::mem::transmute(ltotaloverpanoffsety), fininertia.param().abi()) + UpdatePanningFeedback(core::mem::transmute(hwnd), core::mem::transmute(ltotaloverpanoffsetx), core::mem::transmute(ltotaloverpanoffsety), fininertia.param().abi()) } pub const ABS_DOWNDISABLED: ARROWBTNSTATES = ARROWBTNSTATES(8i32); pub const ABS_DOWNHOT: ARROWBTNSTATES = ARROWBTNSTATES(6i32); @@ -4144,41 +3637,26 @@ windows_core::imp::define_interface!(IImageList, IImageList_Vtbl, 0x46eb5926_582 windows_core::imp::interface_hierarchy!(IImageList, windows_core::IUnknown); impl IImageList { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Add(&self, hbmimage: P0, hbmmask: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn Add(&self, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: Option) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), hbmimage.param().abi(), hbmmask.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Add)(windows_core::Interface::as_raw(self), core::mem::transmute(hbmimage), core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed())), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn ReplaceIcon(&self, i: i32, hicon: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn ReplaceIcon(&self, i: i32, hicon: super::WindowsAndMessaging::HICON) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ReplaceIcon)(windows_core::Interface::as_raw(self), core::mem::transmute(i), hicon.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ReplaceIcon)(windows_core::Interface::as_raw(self), core::mem::transmute(i), core::mem::transmute(hicon), &mut result__).map(|| result__) } pub unsafe fn SetOverlayImage(&self, iimage: i32, ioverlay: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetOverlayImage)(windows_core::Interface::as_raw(self), core::mem::transmute(iimage), core::mem::transmute(ioverlay)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Replace(&self, i: i32, hbmimage: P1, hbmmask: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Replace)(windows_core::Interface::as_raw(self), core::mem::transmute(i), hbmimage.param().abi(), hbmmask.param().abi()).ok() + pub unsafe fn Replace(&self, i: i32, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Replace)(windows_core::Interface::as_raw(self), core::mem::transmute(i), core::mem::transmute(hbmimage), core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn AddMasked(&self, hbmimage: P0, crmask: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn AddMasked(&self, hbmimage: super::super::Graphics::Gdi::HBITMAP, crmask: super::super::Foundation::COLORREF) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddMasked)(windows_core::Interface::as_raw(self), hbmimage.param().abi(), crmask.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AddMasked)(windows_core::Interface::as_raw(self), core::mem::transmute(hbmimage), core::mem::transmute(crmask), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn Draw(&self, pimldp: *const IMAGELISTDRAWPARAMS) -> windows_core::Result<()> { @@ -4228,12 +3706,9 @@ impl IImageList { pub unsafe fn SetImageCount(&self, unewcount: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetImageCount)(windows_core::Interface::as_raw(self), core::mem::transmute(unewcount)).ok() } - pub unsafe fn SetBkColor(&self, clrbk: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn SetBkColor(&self, clrbk: super::super::Foundation::COLORREF) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).SetBkColor)(windows_core::Interface::as_raw(self), clrbk.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).SetBkColor)(windows_core::Interface::as_raw(self), core::mem::transmute(clrbk), &mut result__).map(|| result__) } pub unsafe fn GetBkColor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4245,17 +3720,11 @@ impl IImageList { pub unsafe fn EndDrag(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndDrag)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn DragEnter(&self, hwndlock: P0, x: i32, y: i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DragEnter)(windows_core::Interface::as_raw(self), hwndlock.param().abi(), core::mem::transmute(x), core::mem::transmute(y)).ok() + pub unsafe fn DragEnter(&self, hwndlock: Option, x: i32, y: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DragEnter)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndlock.unwrap_or(core::mem::zeroed())), core::mem::transmute(x), core::mem::transmute(y)).ok() } - pub unsafe fn DragLeave(&self, hwndlock: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DragLeave)(windows_core::Interface::as_raw(self), hwndlock.param().abi()).ok() + pub unsafe fn DragLeave(&self, hwndlock: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DragLeave)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndlock.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn DragMove(&self, x: i32, y: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DragMove)(windows_core::Interface::as_raw(self), core::mem::transmute(x), core::mem::transmute(y)).ok() @@ -4273,7 +3742,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(core::ptr::null_mut())), core::mem::transmute(ppthotspot.unwrap_or(core::ptr::null_mut())), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() + (windows_core::Interface::vtable(self).GetDragImage)(windows_core::Interface::as_raw(self), core::mem::transmute(ppt.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppthotspot.unwrap_or(core::mem::zeroed())), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() } pub unsafe fn GetItemFlags(&self, i: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4632,13 +4101,11 @@ impl IImageList2 { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(flags), core::mem::transmute(cinitial), core::mem::transmute(cgrow)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Replace2(&self, i: i32, hbmimage: P1, hbmmask: P2, punk: P3, dwflags: u32) -> windows_core::Result<()> + pub unsafe fn Replace2(&self, i: i32, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: Option, punk: P3, dwflags: u32) -> windows_core::Result<()> where - P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Replace2)(windows_core::Interface::as_raw(self), core::mem::transmute(i), hbmimage.param().abi(), hbmmask.param().abi(), punk.param().abi(), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).Replace2)(windows_core::Interface::as_raw(self), core::mem::transmute(i), core::mem::transmute(hbmimage), core::mem::transmute(hbmmask.unwrap_or(core::mem::zeroed())), punk.param().abi(), core::mem::transmute(dwflags)).ok() } pub unsafe fn ReplaceFromImageList(&self, i: i32, pil: P1, isrc: i32, punk: P3, dwflags: u32) -> windows_core::Result<()> where 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 0829860d7c..6e6e32d561 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs @@ -8,62 +8,40 @@ where AdjustWindowRectExForDpi(core::mem::transmute(lprect), core::mem::transmute(dwstyle), bmenu.param().abi(), core::mem::transmute(dwexstyle), core::mem::transmute(dpi)).ok() } #[inline] -pub unsafe fn AreDpiAwarenessContextsEqual(dpicontexta: P0, dpicontextb: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn AreDpiAwarenessContextsEqual(dpicontexta: DPI_AWARENESS_CONTEXT, dpicontextb: DPI_AWARENESS_CONTEXT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn AreDpiAwarenessContextsEqual(dpicontexta : DPI_AWARENESS_CONTEXT, dpicontextb : DPI_AWARENESS_CONTEXT) -> super::super::Foundation:: BOOL); - AreDpiAwarenessContextsEqual(dpicontexta.param().abi(), dpicontextb.param().abi()) + AreDpiAwarenessContextsEqual(core::mem::transmute(dpicontexta), core::mem::transmute(dpicontextb)) } #[inline] -pub unsafe fn EnableNonClientDpiScaling(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnableNonClientDpiScaling(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnableNonClientDpiScaling(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - EnableNonClientDpiScaling(hwnd.param().abi()).ok() + EnableNonClientDpiScaling(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn GetAwarenessFromDpiAwarenessContext(value: P0) -> DPI_AWARENESS -where - P0: windows_core::Param, -{ +pub unsafe fn GetAwarenessFromDpiAwarenessContext(value: DPI_AWARENESS_CONTEXT) -> DPI_AWARENESS { windows_targets::link!("user32.dll" "system" fn GetAwarenessFromDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> DPI_AWARENESS); - GetAwarenessFromDpiAwarenessContext(value.param().abi()) + GetAwarenessFromDpiAwarenessContext(core::mem::transmute(value)) } #[inline] -pub unsafe fn GetDialogControlDpiChangeBehavior(hwnd: P0) -> DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS -where - P0: windows_core::Param, -{ +pub unsafe fn GetDialogControlDpiChangeBehavior(hwnd: super::super::Foundation::HWND) -> DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS { windows_targets::link!("user32.dll" "system" fn GetDialogControlDpiChangeBehavior(hwnd : super::super::Foundation:: HWND) -> DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS); - GetDialogControlDpiChangeBehavior(hwnd.param().abi()) + GetDialogControlDpiChangeBehavior(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetDialogDpiChangeBehavior(hdlg: P0) -> DIALOG_DPI_CHANGE_BEHAVIORS -where - P0: windows_core::Param, -{ +pub unsafe fn GetDialogDpiChangeBehavior(hdlg: super::super::Foundation::HWND) -> DIALOG_DPI_CHANGE_BEHAVIORS { windows_targets::link!("user32.dll" "system" fn GetDialogDpiChangeBehavior(hdlg : super::super::Foundation:: HWND) -> DIALOG_DPI_CHANGE_BEHAVIORS); - GetDialogDpiChangeBehavior(hdlg.param().abi()) + GetDialogDpiChangeBehavior(core::mem::transmute(hdlg)) } #[inline] -pub unsafe fn GetDpiAwarenessContextForProcess(hprocess: P0) -> DPI_AWARENESS_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn GetDpiAwarenessContextForProcess(hprocess: super::super::Foundation::HANDLE) -> DPI_AWARENESS_CONTEXT { windows_targets::link!("user32.dll" "system" fn GetDpiAwarenessContextForProcess(hprocess : super::super::Foundation:: HANDLE) -> DPI_AWARENESS_CONTEXT); - GetDpiAwarenessContextForProcess(hprocess.param().abi()) + GetDpiAwarenessContextForProcess(core::mem::transmute(hprocess)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetDpiForMonitor(hmonitor: P0, dpitype: MONITOR_DPI_TYPE, dpix: *mut u32, dpiy: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetDpiForMonitor(hmonitor: super::super::Graphics::Gdi::HMONITOR, dpitype: MONITOR_DPI_TYPE, dpix: *mut u32, dpiy: *mut u32) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-shcore-scaling-l1-1-1.dll" "system" fn GetDpiForMonitor(hmonitor : super::super::Graphics::Gdi:: HMONITOR, dpitype : MONITOR_DPI_TYPE, dpix : *mut u32, dpiy : *mut u32) -> windows_core::HRESULT); - GetDpiForMonitor(hmonitor.param().abi(), core::mem::transmute(dpitype), core::mem::transmute(dpix), core::mem::transmute(dpiy)).ok() + GetDpiForMonitor(core::mem::transmute(hmonitor), core::mem::transmute(dpitype), core::mem::transmute(dpix), core::mem::transmute(dpiy)).ok() } #[inline] pub unsafe fn GetDpiForSystem() -> u32 { @@ -71,37 +49,25 @@ pub unsafe fn GetDpiForSystem() -> u32 { GetDpiForSystem() } #[inline] -pub unsafe fn GetDpiForWindow(hwnd: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetDpiForWindow(hwnd: super::super::Foundation::HWND) -> u32 { windows_targets::link!("user32.dll" "system" fn GetDpiForWindow(hwnd : super::super::Foundation:: HWND) -> u32); - GetDpiForWindow(hwnd.param().abi()) + GetDpiForWindow(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetDpiFromDpiAwarenessContext(value: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetDpiFromDpiAwarenessContext(value: DPI_AWARENESS_CONTEXT) -> u32 { windows_targets::link!("user32.dll" "system" fn GetDpiFromDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> u32); - GetDpiFromDpiAwarenessContext(value.param().abi()) + GetDpiFromDpiAwarenessContext(core::mem::transmute(value)) } #[inline] -pub unsafe fn GetProcessDpiAwareness(hprocess: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetProcessDpiAwareness(hprocess: Option) -> windows_core::Result { windows_targets::link!("api-ms-win-shcore-scaling-l1-1-1.dll" "system" fn GetProcessDpiAwareness(hprocess : super::super::Foundation:: HANDLE, value : *mut PROCESS_DPI_AWARENESS) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetProcessDpiAwareness(hprocess.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + GetProcessDpiAwareness(core::mem::transmute(hprocess.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetSystemDpiForProcess(hprocess: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetSystemDpiForProcess(hprocess: super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("user32.dll" "system" fn GetSystemDpiForProcess(hprocess : super::super::Foundation:: HANDLE) -> u32); - GetSystemDpiForProcess(hprocess.param().abi()) + GetSystemDpiForProcess(core::mem::transmute(hprocess)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -120,70 +86,48 @@ pub unsafe fn GetThreadDpiHostingBehavior() -> DPI_HOSTING_BEHAVIOR { GetThreadDpiHostingBehavior() } #[inline] -pub unsafe fn GetWindowDpiAwarenessContext(hwnd: P0) -> DPI_AWARENESS_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowDpiAwarenessContext(hwnd: super::super::Foundation::HWND) -> DPI_AWARENESS_CONTEXT { windows_targets::link!("user32.dll" "system" fn GetWindowDpiAwarenessContext(hwnd : super::super::Foundation:: HWND) -> DPI_AWARENESS_CONTEXT); - GetWindowDpiAwarenessContext(hwnd.param().abi()) + GetWindowDpiAwarenessContext(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetWindowDpiHostingBehavior(hwnd: P0) -> DPI_HOSTING_BEHAVIOR -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowDpiHostingBehavior(hwnd: super::super::Foundation::HWND) -> DPI_HOSTING_BEHAVIOR { windows_targets::link!("user32.dll" "system" fn GetWindowDpiHostingBehavior(hwnd : super::super::Foundation:: HWND) -> DPI_HOSTING_BEHAVIOR); - GetWindowDpiHostingBehavior(hwnd.param().abi()) + GetWindowDpiHostingBehavior(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn IsValidDpiAwarenessContext(value: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsValidDpiAwarenessContext(value: DPI_AWARENESS_CONTEXT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsValidDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> super::super::Foundation:: BOOL); - IsValidDpiAwarenessContext(value.param().abi()) + IsValidDpiAwarenessContext(core::mem::transmute(value)) } #[inline] -pub unsafe fn LogicalToPhysicalPointForPerMonitorDPI(hwnd: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn LogicalToPhysicalPointForPerMonitorDPI(hwnd: Option, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn LogicalToPhysicalPointForPerMonitorDPI(hwnd : super::super::Foundation:: HWND, lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - LogicalToPhysicalPointForPerMonitorDPI(hwnd.param().abi(), core::mem::transmute(lppoint)) + LogicalToPhysicalPointForPerMonitorDPI(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lppoint)) } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn OpenThemeDataForDpi(hwnd: P0, pszclasslist: P1, dpi: u32) -> super::Controls::HTHEME +pub unsafe fn OpenThemeDataForDpi(hwnd: Option, pszclasslist: P1, dpi: u32) -> super::Controls::HTHEME where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn OpenThemeDataForDpi(hwnd : super::super::Foundation:: HWND, pszclasslist : windows_core::PCWSTR, dpi : u32) -> super::Controls:: HTHEME); - OpenThemeDataForDpi(hwnd.param().abi(), pszclasslist.param().abi(), core::mem::transmute(dpi)) + OpenThemeDataForDpi(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszclasslist.param().abi(), core::mem::transmute(dpi)) } #[inline] -pub unsafe fn PhysicalToLogicalPointForPerMonitorDPI(hwnd: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PhysicalToLogicalPointForPerMonitorDPI(hwnd: Option, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn PhysicalToLogicalPointForPerMonitorDPI(hwnd : super::super::Foundation:: HWND, lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - PhysicalToLogicalPointForPerMonitorDPI(hwnd.param().abi(), core::mem::transmute(lppoint)) + PhysicalToLogicalPointForPerMonitorDPI(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lppoint)) } #[inline] -pub unsafe fn SetDialogControlDpiChangeBehavior(hwnd: P0, mask: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS, values: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetDialogControlDpiChangeBehavior(hwnd: super::super::Foundation::HWND, mask: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS, values: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetDialogControlDpiChangeBehavior(hwnd : super::super::Foundation:: HWND, mask : DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS, values : DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS) -> super::super::Foundation:: BOOL); - SetDialogControlDpiChangeBehavior(hwnd.param().abi(), core::mem::transmute(mask), core::mem::transmute(values)).ok() + SetDialogControlDpiChangeBehavior(core::mem::transmute(hwnd), core::mem::transmute(mask), core::mem::transmute(values)).ok() } #[inline] -pub unsafe fn SetDialogDpiChangeBehavior(hdlg: P0, mask: DIALOG_DPI_CHANGE_BEHAVIORS, values: DIALOG_DPI_CHANGE_BEHAVIORS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetDialogDpiChangeBehavior(hdlg: super::super::Foundation::HWND, mask: DIALOG_DPI_CHANGE_BEHAVIORS, values: DIALOG_DPI_CHANGE_BEHAVIORS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetDialogDpiChangeBehavior(hdlg : super::super::Foundation:: HWND, mask : DIALOG_DPI_CHANGE_BEHAVIORS, values : DIALOG_DPI_CHANGE_BEHAVIORS) -> super::super::Foundation:: BOOL); - SetDialogDpiChangeBehavior(hdlg.param().abi(), core::mem::transmute(mask), core::mem::transmute(values)).ok() + SetDialogDpiChangeBehavior(core::mem::transmute(hdlg), core::mem::transmute(mask), core::mem::transmute(values)).ok() } #[inline] pub unsafe fn SetProcessDpiAwareness(value: PROCESS_DPI_AWARENESS) -> windows_core::Result<()> { @@ -191,20 +135,14 @@ pub unsafe fn SetProcessDpiAwareness(value: PROCESS_DPI_AWARENESS) -> windows_co SetProcessDpiAwareness(core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn SetProcessDpiAwarenessContext(value: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessDpiAwarenessContext(value: DPI_AWARENESS_CONTEXT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetProcessDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> super::super::Foundation:: BOOL); - SetProcessDpiAwarenessContext(value.param().abi()).ok() + SetProcessDpiAwarenessContext(core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn SetThreadDpiAwarenessContext(dpicontext: P0) -> DPI_AWARENESS_CONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn SetThreadDpiAwarenessContext(dpicontext: DPI_AWARENESS_CONTEXT) -> DPI_AWARENESS_CONTEXT { windows_targets::link!("user32.dll" "system" fn SetThreadDpiAwarenessContext(dpicontext : DPI_AWARENESS_CONTEXT) -> DPI_AWARENESS_CONTEXT); - SetThreadDpiAwarenessContext(dpicontext.param().abi()) + SetThreadDpiAwarenessContext(core::mem::transmute(dpicontext)) } #[inline] pub unsafe fn SetThreadDpiHostingBehavior(value: DPI_HOSTING_BEHAVIOR) -> DPI_HOSTING_BEHAVIOR { @@ -214,7 +152,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(core::mem::transmute(uiaction), core::mem::transmute(uiparam), core::mem::transmute(pvparam.unwrap_or(core::ptr::null_mut())), core::mem::transmute(fwinini), core::mem::transmute(dpi)).ok() + SystemParametersInfoForDpi(core::mem::transmute(uiaction), core::mem::transmute(uiparam), core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(fwinini), core::mem::transmute(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 9cfd407f6b..7938b5808e 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 @@ -1,40 +1,24 @@ #[inline] -pub unsafe fn ImmAssociateContext(param0: P0, param1: P1) -> HIMC -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImmAssociateContext(param0: super::super::super::Foundation::HWND, param1: HIMC) -> HIMC { windows_targets::link!("imm32.dll" "system" fn ImmAssociateContext(param0 : super::super::super::Foundation:: HWND, param1 : HIMC) -> HIMC); - ImmAssociateContext(param0.param().abi(), param1.param().abi()) + ImmAssociateContext(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] -pub unsafe fn ImmAssociateContextEx(param0: P0, param1: P1, param2: u32) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImmAssociateContextEx(param0: super::super::super::Foundation::HWND, param1: HIMC, param2: u32) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmAssociateContextEx(param0 : super::super::super::Foundation:: HWND, param1 : HIMC, param2 : u32) -> super::super::super::Foundation:: BOOL); - ImmAssociateContextEx(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2)) + ImmAssociateContextEx(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmConfigureIMEA(param0: P0, param1: P1, param2: u32, param3: *mut core::ffi::c_void) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImmConfigureIMEA(param0: super::KeyboardAndMouse::HKL, param1: super::super::super::Foundation::HWND, param2: u32, param3: *mut core::ffi::c_void) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmConfigureIMEA(param0 : super::KeyboardAndMouse:: HKL, param1 : super::super::super::Foundation:: HWND, param2 : u32, param3 : *mut core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - ImmConfigureIMEA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3)) + ImmConfigureIMEA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmConfigureIMEW(param0: P0, param1: P1, param2: u32, param3: *mut core::ffi::c_void) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImmConfigureIMEW(param0: super::KeyboardAndMouse::HKL, param1: super::super::super::Foundation::HWND, param2: u32, param3: *mut core::ffi::c_void) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmConfigureIMEW(param0 : super::KeyboardAndMouse:: HKL, param1 : super::super::super::Foundation:: HWND, param2 : u32, param3 : *mut core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - ImmConfigureIMEW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3)) + ImmConfigureIMEW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] pub unsafe fn ImmCreateContext() -> HIMC { @@ -47,36 +31,24 @@ pub unsafe fn ImmCreateIMCC(param0: u32) -> HIMCC { ImmCreateIMCC(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmCreateSoftKeyboard(param0: u32, param1: P1, param2: i32, param3: i32) -> super::super::super::Foundation::HWND -where - P1: windows_core::Param, -{ +pub unsafe fn ImmCreateSoftKeyboard(param0: u32, param1: super::super::super::Foundation::HWND, param2: i32, param3: i32) -> super::super::super::Foundation::HWND { windows_targets::link!("imm32.dll" "system" fn ImmCreateSoftKeyboard(param0 : u32, param1 : super::super::super::Foundation:: HWND, param2 : i32, param3 : i32) -> super::super::super::Foundation:: HWND); - ImmCreateSoftKeyboard(core::mem::transmute(param0), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3)) + ImmCreateSoftKeyboard(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] -pub unsafe fn ImmDestroyContext(param0: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmDestroyContext(param0: HIMC) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmDestroyContext(param0 : HIMC) -> super::super::super::Foundation:: BOOL); - ImmDestroyContext(param0.param().abi()) + ImmDestroyContext(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmDestroyIMCC(param0: P0) -> HIMCC -where - P0: windows_core::Param, -{ +pub unsafe fn ImmDestroyIMCC(param0: HIMCC) -> HIMCC { windows_targets::link!("imm32.dll" "system" fn ImmDestroyIMCC(param0 : HIMCC) -> HIMCC); - ImmDestroyIMCC(param0.param().abi()) + ImmDestroyIMCC(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmDestroySoftKeyboard(param0: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmDestroySoftKeyboard(param0: super::super::super::Foundation::HWND) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmDestroySoftKeyboard(param0 : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: BOOL); - ImmDestroySoftKeyboard(param0.param().abi()) + ImmDestroySoftKeyboard(core::mem::transmute(param0)) } #[inline] pub unsafe fn ImmDisableIME(param0: u32) -> super::super::super::Foundation::BOOL { @@ -94,224 +66,153 @@ pub unsafe fn ImmDisableTextFrameService(idthread: u32) -> super::super::super:: ImmDisableTextFrameService(core::mem::transmute(idthread)) } #[inline] -pub unsafe fn ImmEnumInputContext(idthread: u32, lpfn: IMCENUMPROC, lparam: P2) -> super::super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn ImmEnumInputContext(idthread: u32, lpfn: IMCENUMPROC, lparam: super::super::super::Foundation::LPARAM) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmEnumInputContext(idthread : u32, lpfn : IMCENUMPROC, lparam : super::super::super::Foundation:: LPARAM) -> super::super::super::Foundation:: BOOL); - ImmEnumInputContext(core::mem::transmute(idthread), core::mem::transmute(lpfn), lparam.param().abi()) + ImmEnumInputContext(core::mem::transmute(idthread), core::mem::transmute(lpfn), core::mem::transmute(lparam)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmEnumRegisterWordA(param0: P0, param1: REGISTERWORDENUMPROCA, lpszreading: P2, param3: u32, lpszregister: P4, param5: *mut core::ffi::c_void) -> u32 +pub unsafe fn ImmEnumRegisterWordA(param0: super::KeyboardAndMouse::HKL, param1: REGISTERWORDENUMPROCA, lpszreading: P2, param3: u32, lpszregister: P4, param5: *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmEnumRegisterWordA(param0 : super::KeyboardAndMouse:: HKL, param1 : REGISTERWORDENUMPROCA, lpszreading : windows_core::PCSTR, param3 : u32, lpszregister : windows_core::PCSTR, param5 : *mut core::ffi::c_void) -> u32); - ImmEnumRegisterWordA(param0.param().abi(), core::mem::transmute(param1), lpszreading.param().abi(), core::mem::transmute(param3), lpszregister.param().abi(), core::mem::transmute(param5)) + ImmEnumRegisterWordA(core::mem::transmute(param0), core::mem::transmute(param1), lpszreading.param().abi(), core::mem::transmute(param3), lpszregister.param().abi(), core::mem::transmute(param5)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmEnumRegisterWordW(param0: P0, param1: REGISTERWORDENUMPROCW, lpszreading: P2, param3: u32, lpszregister: P4, param5: *mut core::ffi::c_void) -> u32 +pub unsafe fn ImmEnumRegisterWordW(param0: super::KeyboardAndMouse::HKL, param1: REGISTERWORDENUMPROCW, lpszreading: P2, param3: u32, lpszregister: P4, param5: *mut core::ffi::c_void) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmEnumRegisterWordW(param0 : super::KeyboardAndMouse:: HKL, param1 : REGISTERWORDENUMPROCW, lpszreading : windows_core::PCWSTR, param3 : u32, lpszregister : windows_core::PCWSTR, param5 : *mut core::ffi::c_void) -> u32); - ImmEnumRegisterWordW(param0.param().abi(), core::mem::transmute(param1), lpszreading.param().abi(), core::mem::transmute(param3), lpszregister.param().abi(), core::mem::transmute(param5)) + ImmEnumRegisterWordW(core::mem::transmute(param0), core::mem::transmute(param1), lpszreading.param().abi(), core::mem::transmute(param3), lpszregister.param().abi(), core::mem::transmute(param5)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmEscapeA(param0: P0, param1: P1, param2: IME_ESCAPE, param3: *mut core::ffi::c_void) -> super::super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImmEscapeA(param0: super::KeyboardAndMouse::HKL, param1: HIMC, param2: IME_ESCAPE, param3: *mut core::ffi::c_void) -> super::super::super::Foundation::LRESULT { windows_targets::link!("imm32.dll" "system" fn ImmEscapeA(param0 : super::KeyboardAndMouse:: HKL, param1 : HIMC, param2 : IME_ESCAPE, param3 : *mut core::ffi::c_void) -> super::super::super::Foundation:: LRESULT); - ImmEscapeA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3)) + ImmEscapeA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmEscapeW(param0: P0, param1: P1, param2: IME_ESCAPE, param3: *mut core::ffi::c_void) -> super::super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImmEscapeW(param0: super::KeyboardAndMouse::HKL, param1: HIMC, param2: IME_ESCAPE, param3: *mut core::ffi::c_void) -> super::super::super::Foundation::LRESULT { windows_targets::link!("imm32.dll" "system" fn ImmEscapeW(param0 : super::KeyboardAndMouse:: HKL, param1 : HIMC, param2 : IME_ESCAPE, param3 : *mut core::ffi::c_void) -> super::super::super::Foundation:: LRESULT); - ImmEscapeW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), core::mem::transmute(param3)) + ImmEscapeW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] -pub unsafe fn ImmGenerateMessage(param0: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGenerateMessage(param0: HIMC) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmGenerateMessage(param0 : HIMC) -> super::super::super::Foundation:: BOOL); - ImmGenerateMessage(param0.param().abi()) + ImmGenerateMessage(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmGetCandidateListA(param0: P0, deindex: u32, lpcandlist: Option<*mut CANDIDATELIST>, dwbuflen: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCandidateListA(param0: HIMC, deindex: u32, lpcandlist: Option<*mut CANDIDATELIST>, dwbuflen: u32) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateListA(param0 : HIMC, deindex : u32, lpcandlist : *mut CANDIDATELIST, dwbuflen : u32) -> u32); - ImmGetCandidateListA(param0.param().abi(), core::mem::transmute(deindex), core::mem::transmute(lpcandlist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwbuflen)) + ImmGetCandidateListA(core::mem::transmute(param0), core::mem::transmute(deindex), core::mem::transmute(lpcandlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbuflen)) } #[inline] -pub unsafe fn ImmGetCandidateListCountA(param0: P0, lpdwlistcount: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCandidateListCountA(param0: HIMC, lpdwlistcount: *mut u32) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateListCountA(param0 : HIMC, lpdwlistcount : *mut u32) -> u32); - ImmGetCandidateListCountA(param0.param().abi(), core::mem::transmute(lpdwlistcount)) + ImmGetCandidateListCountA(core::mem::transmute(param0), core::mem::transmute(lpdwlistcount)) } #[inline] -pub unsafe fn ImmGetCandidateListCountW(param0: P0, lpdwlistcount: *mut u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCandidateListCountW(param0: HIMC, lpdwlistcount: *mut u32) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateListCountW(param0 : HIMC, lpdwlistcount : *mut u32) -> u32); - ImmGetCandidateListCountW(param0.param().abi(), core::mem::transmute(lpdwlistcount)) + ImmGetCandidateListCountW(core::mem::transmute(param0), core::mem::transmute(lpdwlistcount)) } #[inline] -pub unsafe fn ImmGetCandidateListW(param0: P0, deindex: u32, lpcandlist: Option<*mut CANDIDATELIST>, dwbuflen: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCandidateListW(param0: HIMC, deindex: u32, lpcandlist: Option<*mut CANDIDATELIST>, dwbuflen: u32) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateListW(param0 : HIMC, deindex : u32, lpcandlist : *mut CANDIDATELIST, dwbuflen : u32) -> u32); - ImmGetCandidateListW(param0.param().abi(), core::mem::transmute(deindex), core::mem::transmute(lpcandlist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwbuflen)) + ImmGetCandidateListW(core::mem::transmute(param0), core::mem::transmute(deindex), core::mem::transmute(lpcandlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbuflen)) } #[inline] -pub unsafe fn ImmGetCandidateWindow(param0: P0, param1: u32, lpcandidate: *mut CANDIDATEFORM) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCandidateWindow(param0: HIMC, param1: u32, lpcandidate: *mut CANDIDATEFORM) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateWindow(param0 : HIMC, param1 : u32, lpcandidate : *mut CANDIDATEFORM) -> super::super::super::Foundation:: BOOL); - ImmGetCandidateWindow(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(lpcandidate)) + ImmGetCandidateWindow(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(lpcandidate)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImmGetCompositionFontA(param0: P0, lplf: *mut super::super::super::Graphics::Gdi::LOGFONTA) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCompositionFontA(param0: HIMC, lplf: *mut super::super::super::Graphics::Gdi::LOGFONTA) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmGetCompositionFontA(param0 : HIMC, lplf : *mut super::super::super::Graphics::Gdi:: LOGFONTA) -> super::super::super::Foundation:: BOOL); - ImmGetCompositionFontA(param0.param().abi(), core::mem::transmute(lplf)) + ImmGetCompositionFontA(core::mem::transmute(param0), core::mem::transmute(lplf)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImmGetCompositionFontW(param0: P0, lplf: *mut super::super::super::Graphics::Gdi::LOGFONTW) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCompositionFontW(param0: HIMC, lplf: *mut super::super::super::Graphics::Gdi::LOGFONTW) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmGetCompositionFontW(param0 : HIMC, lplf : *mut super::super::super::Graphics::Gdi:: LOGFONTW) -> super::super::super::Foundation:: BOOL); - ImmGetCompositionFontW(param0.param().abi(), core::mem::transmute(lplf)) + ImmGetCompositionFontW(core::mem::transmute(param0), core::mem::transmute(lplf)) } #[inline] -pub unsafe fn ImmGetCompositionStringA(param0: P0, param1: IME_COMPOSITION_STRING, lpbuf: Option<*mut core::ffi::c_void>, dwbuflen: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCompositionStringA(param0: HIMC, param1: IME_COMPOSITION_STRING, lpbuf: Option<*mut core::ffi::c_void>, dwbuflen: u32) -> i32 { 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(), core::mem::transmute(param1), core::mem::transmute(lpbuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwbuflen)) + ImmGetCompositionStringA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(lpbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbuflen)) } #[inline] -pub unsafe fn ImmGetCompositionStringW(param0: P0, param1: IME_COMPOSITION_STRING, lpbuf: Option<*mut core::ffi::c_void>, dwbuflen: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCompositionStringW(param0: HIMC, param1: IME_COMPOSITION_STRING, lpbuf: Option<*mut core::ffi::c_void>, dwbuflen: u32) -> i32 { 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(), core::mem::transmute(param1), core::mem::transmute(lpbuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwbuflen)) + ImmGetCompositionStringW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(lpbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbuflen)) } #[inline] -pub unsafe fn ImmGetCompositionWindow(param0: P0, lpcompform: *mut COMPOSITIONFORM) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetCompositionWindow(param0: HIMC, lpcompform: *mut COMPOSITIONFORM) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmGetCompositionWindow(param0 : HIMC, lpcompform : *mut COMPOSITIONFORM) -> super::super::super::Foundation:: BOOL); - ImmGetCompositionWindow(param0.param().abi(), core::mem::transmute(lpcompform)) + ImmGetCompositionWindow(core::mem::transmute(param0), core::mem::transmute(lpcompform)) } #[inline] -pub unsafe fn ImmGetContext(param0: P0) -> HIMC -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetContext(param0: super::super::super::Foundation::HWND) -> HIMC { windows_targets::link!("imm32.dll" "system" fn ImmGetContext(param0 : super::super::super::Foundation:: HWND) -> HIMC); - ImmGetContext(param0.param().abi()) + ImmGetContext(core::mem::transmute(param0)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetConversionListA(param0: P0, param1: P1, lpsrc: P2, lpdst: *mut CANDIDATELIST, dwbuflen: u32, uflag: GET_CONVERSION_LIST_FLAG) -> u32 +pub unsafe fn ImmGetConversionListA(param0: super::KeyboardAndMouse::HKL, param1: HIMC, lpsrc: P2, lpdst: *mut CANDIDATELIST, dwbuflen: u32, uflag: GET_CONVERSION_LIST_FLAG) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetConversionListA(param0 : super::KeyboardAndMouse:: HKL, param1 : HIMC, lpsrc : windows_core::PCSTR, lpdst : *mut CANDIDATELIST, dwbuflen : u32, uflag : GET_CONVERSION_LIST_FLAG) -> u32); - ImmGetConversionListA(param0.param().abi(), param1.param().abi(), lpsrc.param().abi(), core::mem::transmute(lpdst), core::mem::transmute(dwbuflen), core::mem::transmute(uflag)) + ImmGetConversionListA(core::mem::transmute(param0), core::mem::transmute(param1), lpsrc.param().abi(), core::mem::transmute(lpdst), core::mem::transmute(dwbuflen), core::mem::transmute(uflag)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetConversionListW(param0: P0, param1: P1, lpsrc: P2, lpdst: *mut CANDIDATELIST, dwbuflen: u32, uflag: GET_CONVERSION_LIST_FLAG) -> u32 +pub unsafe fn ImmGetConversionListW(param0: super::KeyboardAndMouse::HKL, param1: HIMC, lpsrc: P2, lpdst: *mut CANDIDATELIST, dwbuflen: u32, uflag: GET_CONVERSION_LIST_FLAG) -> u32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetConversionListW(param0 : super::KeyboardAndMouse:: HKL, param1 : HIMC, lpsrc : windows_core::PCWSTR, lpdst : *mut CANDIDATELIST, dwbuflen : u32, uflag : GET_CONVERSION_LIST_FLAG) -> u32); - ImmGetConversionListW(param0.param().abi(), param1.param().abi(), lpsrc.param().abi(), core::mem::transmute(lpdst), core::mem::transmute(dwbuflen), core::mem::transmute(uflag)) + ImmGetConversionListW(core::mem::transmute(param0), core::mem::transmute(param1), lpsrc.param().abi(), core::mem::transmute(lpdst), core::mem::transmute(dwbuflen), core::mem::transmute(uflag)) } #[inline] -pub unsafe fn ImmGetConversionStatus(param0: P0, lpfdwconversion: Option<*mut IME_CONVERSION_MODE>, lpfdwsentence: Option<*mut IME_SENTENCE_MODE>) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetConversionStatus(param0: HIMC, lpfdwconversion: Option<*mut IME_CONVERSION_MODE>, lpfdwsentence: Option<*mut IME_SENTENCE_MODE>) -> super::super::super::Foundation::BOOL { 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(core::ptr::null_mut())), core::mem::transmute(lpfdwsentence.unwrap_or(core::ptr::null_mut()))) + ImmGetConversionStatus(core::mem::transmute(param0), core::mem::transmute(lpfdwconversion.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfdwsentence.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ImmGetDefaultIMEWnd(param0: P0) -> super::super::super::Foundation::HWND -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetDefaultIMEWnd(param0: super::super::super::Foundation::HWND) -> super::super::super::Foundation::HWND { windows_targets::link!("imm32.dll" "system" fn ImmGetDefaultIMEWnd(param0 : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: HWND); - ImmGetDefaultIMEWnd(param0.param().abi()) + ImmGetDefaultIMEWnd(core::mem::transmute(param0)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetDescriptionA(param0: P0, lpszdescription: Option<&mut [u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetDescriptionA(param0: super::KeyboardAndMouse::HKL, lpszdescription: Option<&mut [u8]>) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetDescriptionA(param0 : super::KeyboardAndMouse:: HKL, lpszdescription : windows_core::PSTR, ubuflen : u32) -> u32); - ImmGetDescriptionA(param0.param().abi(), core::mem::transmute(lpszdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + ImmGetDescriptionA(core::mem::transmute(param0), core::mem::transmute(lpszdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetDescriptionW(param0: P0, lpszdescription: Option<&mut [u16]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetDescriptionW(param0: super::KeyboardAndMouse::HKL, lpszdescription: Option<&mut [u16]>) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetDescriptionW(param0 : super::KeyboardAndMouse:: HKL, lpszdescription : windows_core::PWSTR, ubuflen : u32) -> u32); - ImmGetDescriptionW(param0.param().abi(), core::mem::transmute(lpszdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + ImmGetDescriptionW(core::mem::transmute(param0), core::mem::transmute(lpszdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn ImmGetGuideLineA(param0: P0, dwindex: GET_GUIDE_LINE_TYPE, lpbuf: Option<&mut [u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetGuideLineA(param0: HIMC, dwindex: GET_GUIDE_LINE_TYPE, lpbuf: Option<&mut [u8]>) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetGuideLineA(param0 : HIMC, dwindex : GET_GUIDE_LINE_TYPE, lpbuf : windows_core::PSTR, dwbuflen : u32) -> u32); - ImmGetGuideLineA(param0.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + ImmGetGuideLineA(core::mem::transmute(param0), core::mem::transmute(dwindex), core::mem::transmute(lpbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn ImmGetGuideLineW(param0: P0, dwindex: GET_GUIDE_LINE_TYPE, lpbuf: windows_core::PWSTR, dwbuflen: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetGuideLineW(param0: HIMC, dwindex: GET_GUIDE_LINE_TYPE, lpbuf: Option, dwbuflen: u32) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetGuideLineW(param0 : HIMC, dwindex : GET_GUIDE_LINE_TYPE, lpbuf : windows_core::PWSTR, dwbuflen : u32) -> u32); - ImmGetGuideLineW(param0.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(lpbuf), core::mem::transmute(dwbuflen)) + ImmGetGuideLineW(core::mem::transmute(param0), core::mem::transmute(dwindex), core::mem::transmute(lpbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwbuflen)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] @@ -320,115 +221,76 @@ pub unsafe fn ImmGetHotKey(param0: u32, lpumodifiers: *mut u32, lpuvkey: *mut u3 ImmGetHotKey(core::mem::transmute(param0), core::mem::transmute(lpumodifiers), core::mem::transmute(lpuvkey), core::mem::transmute(phkl)) } #[inline] -pub unsafe fn ImmGetIMCCLockCount(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetIMCCLockCount(param0: HIMCC) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetIMCCLockCount(param0 : HIMCC) -> u32); - ImmGetIMCCLockCount(param0.param().abi()) + ImmGetIMCCLockCount(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmGetIMCCSize(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetIMCCSize(param0: HIMCC) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetIMCCSize(param0 : HIMCC) -> u32); - ImmGetIMCCSize(param0.param().abi()) + ImmGetIMCCSize(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmGetIMCLockCount(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetIMCLockCount(param0: HIMC) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetIMCLockCount(param0 : HIMC) -> u32); - ImmGetIMCLockCount(param0.param().abi()) + ImmGetIMCLockCount(core::mem::transmute(param0)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetIMEFileNameA(param0: P0, lpszfilename: Option<&mut [u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetIMEFileNameA(param0: super::KeyboardAndMouse::HKL, lpszfilename: Option<&mut [u8]>) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetIMEFileNameA(param0 : super::KeyboardAndMouse:: HKL, lpszfilename : windows_core::PSTR, ubuflen : u32) -> u32); - ImmGetIMEFileNameA(param0.param().abi(), core::mem::transmute(lpszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszfilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + ImmGetIMEFileNameA(core::mem::transmute(param0), core::mem::transmute(lpszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszfilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetIMEFileNameW(param0: P0, lpszfilename: Option<&mut [u16]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetIMEFileNameW(param0: super::KeyboardAndMouse::HKL, lpszfilename: Option<&mut [u16]>) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetIMEFileNameW(param0 : super::KeyboardAndMouse:: HKL, lpszfilename : windows_core::PWSTR, ubuflen : u32) -> u32); - ImmGetIMEFileNameW(param0.param().abi(), core::mem::transmute(lpszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszfilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + ImmGetIMEFileNameW(core::mem::transmute(param0), core::mem::transmute(lpszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszfilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImmGetImeMenuItemsA(param0: P0, param1: u32, param2: u32, lpimeparentmenu: Option<*mut IMEMENUITEMINFOA>, lpimemenu: Option<*mut IMEMENUITEMINFOA>, dwsize: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetImeMenuItemsA(param0: HIMC, param1: u32, param2: u32, lpimeparentmenu: Option<*mut IMEMENUITEMINFOA>, lpimemenu: Option<*mut IMEMENUITEMINFOA>, dwsize: u32) -> u32 { 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(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(lpimeparentmenu.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpimemenu.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwsize)) + ImmGetImeMenuItemsA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(lpimeparentmenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpimemenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsize)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImmGetImeMenuItemsW(param0: P0, param1: u32, param2: u32, lpimeparentmenu: Option<*mut IMEMENUITEMINFOW>, lpimemenu: Option<*mut IMEMENUITEMINFOW>, dwsize: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetImeMenuItemsW(param0: HIMC, param1: u32, param2: u32, lpimeparentmenu: Option<*mut IMEMENUITEMINFOW>, lpimemenu: Option<*mut IMEMENUITEMINFOW>, dwsize: u32) -> u32 { 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(), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(lpimeparentmenu.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpimemenu.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dwsize)) + ImmGetImeMenuItemsW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(lpimeparentmenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpimemenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsize)) } #[inline] -pub unsafe fn ImmGetOpenStatus(param0: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetOpenStatus(param0: HIMC) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmGetOpenStatus(param0 : HIMC) -> super::super::super::Foundation:: BOOL); - ImmGetOpenStatus(param0.param().abi()) + ImmGetOpenStatus(core::mem::transmute(param0)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetProperty(param0: P0, param1: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetProperty(param0: super::KeyboardAndMouse::HKL, param1: u32) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetProperty(param0 : super::KeyboardAndMouse:: HKL, param1 : u32) -> u32); - ImmGetProperty(param0.param().abi(), core::mem::transmute(param1)) + ImmGetProperty(core::mem::transmute(param0), core::mem::transmute(param1)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetRegisterWordStyleA(param0: P0, lpstylebuf: &mut [STYLEBUFA]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetRegisterWordStyleA(param0: super::KeyboardAndMouse::HKL, lpstylebuf: &mut [STYLEBUFA]) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetRegisterWordStyleA(param0 : super::KeyboardAndMouse:: HKL, nitem : u32, lpstylebuf : *mut STYLEBUFA) -> u32); - ImmGetRegisterWordStyleA(param0.param().abi(), lpstylebuf.len().try_into().unwrap(), core::mem::transmute(lpstylebuf.as_ptr())) + ImmGetRegisterWordStyleA(core::mem::transmute(param0), lpstylebuf.len().try_into().unwrap(), core::mem::transmute(lpstylebuf.as_ptr())) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmGetRegisterWordStyleW(param0: P0, lpstylebuf: &mut [STYLEBUFW]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetRegisterWordStyleW(param0: super::KeyboardAndMouse::HKL, lpstylebuf: &mut [STYLEBUFW]) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetRegisterWordStyleW(param0 : super::KeyboardAndMouse:: HKL, nitem : u32, lpstylebuf : *mut STYLEBUFW) -> u32); - ImmGetRegisterWordStyleW(param0.param().abi(), lpstylebuf.len().try_into().unwrap(), core::mem::transmute(lpstylebuf.as_ptr())) + ImmGetRegisterWordStyleW(core::mem::transmute(param0), lpstylebuf.len().try_into().unwrap(), core::mem::transmute(lpstylebuf.as_ptr())) } #[inline] -pub unsafe fn ImmGetStatusWindowPos(param0: P0, lpptpos: *mut super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetStatusWindowPos(param0: HIMC, lpptpos: *mut super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmGetStatusWindowPos(param0 : HIMC, lpptpos : *mut super::super::super::Foundation:: POINT) -> super::super::super::Foundation:: BOOL); - ImmGetStatusWindowPos(param0.param().abi(), core::mem::transmute(lpptpos)) + ImmGetStatusWindowPos(core::mem::transmute(param0), core::mem::transmute(lpptpos)) } #[inline] -pub unsafe fn ImmGetVirtualKey(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmGetVirtualKey(param0: super::super::super::Foundation::HWND) -> u32 { windows_targets::link!("imm32.dll" "system" fn ImmGetVirtualKey(param0 : super::super::super::Foundation:: HWND) -> u32); - ImmGetVirtualKey(param0.param().abi()) + ImmGetVirtualKey(core::mem::transmute(param0)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] @@ -452,254 +314,171 @@ where } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmIsIME(param0: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmIsIME(param0: super::KeyboardAndMouse::HKL) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmIsIME(param0 : super::KeyboardAndMouse:: HKL) -> super::super::super::Foundation:: BOOL); - ImmIsIME(param0.param().abi()) + ImmIsIME(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmIsUIMessageA(param0: P0, param1: u32, param2: P2, param3: P3) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn ImmIsUIMessageA(param0: super::super::super::Foundation::HWND, param1: u32, param2: super::super::super::Foundation::WPARAM, param3: super::super::super::Foundation::LPARAM) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmIsUIMessageA(param0 : super::super::super::Foundation:: HWND, param1 : u32, param2 : super::super::super::Foundation:: WPARAM, param3 : super::super::super::Foundation:: LPARAM) -> super::super::super::Foundation:: BOOL); - ImmIsUIMessageA(param0.param().abi(), core::mem::transmute(param1), param2.param().abi(), param3.param().abi()) + ImmIsUIMessageA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] -pub unsafe fn ImmIsUIMessageW(param0: P0, param1: u32, param2: P2, param3: P3) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn ImmIsUIMessageW(param0: super::super::super::Foundation::HWND, param1: u32, param2: super::super::super::Foundation::WPARAM, param3: super::super::super::Foundation::LPARAM) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmIsUIMessageW(param0 : super::super::super::Foundation:: HWND, param1 : u32, param2 : super::super::super::Foundation:: WPARAM, param3 : super::super::super::Foundation:: LPARAM) -> super::super::super::Foundation:: BOOL); - ImmIsUIMessageW(param0.param().abi(), core::mem::transmute(param1), param2.param().abi(), param3.param().abi()) + ImmIsUIMessageW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImmLockIMC(param0: P0) -> *mut INPUTCONTEXT -where - P0: windows_core::Param, -{ +pub unsafe fn ImmLockIMC(param0: HIMC) -> *mut INPUTCONTEXT { windows_targets::link!("imm32.dll" "system" fn ImmLockIMC(param0 : HIMC) -> *mut INPUTCONTEXT); - ImmLockIMC(param0.param().abi()) + ImmLockIMC(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmLockIMCC(param0: P0) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn ImmLockIMCC(param0: HIMCC) -> *mut core::ffi::c_void { windows_targets::link!("imm32.dll" "system" fn ImmLockIMCC(param0 : HIMCC) -> *mut core::ffi::c_void); - ImmLockIMCC(param0.param().abi()) + ImmLockIMCC(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmNotifyIME(param0: P0, dwaction: NOTIFY_IME_ACTION, dwindex: NOTIFY_IME_INDEX, dwvalue: u32) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmNotifyIME(param0: HIMC, dwaction: NOTIFY_IME_ACTION, dwindex: NOTIFY_IME_INDEX, dwvalue: u32) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmNotifyIME(param0 : HIMC, dwaction : NOTIFY_IME_ACTION, dwindex : NOTIFY_IME_INDEX, dwvalue : u32) -> super::super::super::Foundation:: BOOL); - ImmNotifyIME(param0.param().abi(), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)) + ImmNotifyIME(core::mem::transmute(param0), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)) } #[inline] -pub unsafe fn ImmReSizeIMCC(param0: P0, param1: u32) -> HIMCC -where - P0: windows_core::Param, -{ +pub unsafe fn ImmReSizeIMCC(param0: HIMCC, param1: u32) -> HIMCC { windows_targets::link!("imm32.dll" "system" fn ImmReSizeIMCC(param0 : HIMCC, param1 : u32) -> HIMCC); - ImmReSizeIMCC(param0.param().abi(), core::mem::transmute(param1)) + ImmReSizeIMCC(core::mem::transmute(param0), core::mem::transmute(param1)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmRegisterWordA(param0: P0, lpszreading: P1, param2: u32, lpszregister: P3) -> super::super::super::Foundation::BOOL +pub unsafe fn ImmRegisterWordA(param0: super::KeyboardAndMouse::HKL, lpszreading: P1, param2: u32, lpszregister: P3) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmRegisterWordA(param0 : super::KeyboardAndMouse:: HKL, lpszreading : windows_core::PCSTR, param2 : u32, lpszregister : windows_core::PCSTR) -> super::super::super::Foundation:: BOOL); - ImmRegisterWordA(param0.param().abi(), lpszreading.param().abi(), core::mem::transmute(param2), lpszregister.param().abi()) + ImmRegisterWordA(core::mem::transmute(param0), lpszreading.param().abi(), core::mem::transmute(param2), lpszregister.param().abi()) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmRegisterWordW(param0: P0, lpszreading: P1, param2: u32, lpszregister: P3) -> super::super::super::Foundation::BOOL +pub unsafe fn ImmRegisterWordW(param0: super::KeyboardAndMouse::HKL, lpszreading: P1, param2: u32, lpszregister: P3) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmRegisterWordW(param0 : super::KeyboardAndMouse:: HKL, lpszreading : windows_core::PCWSTR, param2 : u32, lpszregister : windows_core::PCWSTR) -> super::super::super::Foundation:: BOOL); - ImmRegisterWordW(param0.param().abi(), lpszreading.param().abi(), core::mem::transmute(param2), lpszregister.param().abi()) + ImmRegisterWordW(core::mem::transmute(param0), lpszreading.param().abi(), core::mem::transmute(param2), lpszregister.param().abi()) } #[inline] -pub unsafe fn ImmReleaseContext(param0: P0, param1: P1) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn ImmReleaseContext(param0: super::super::super::Foundation::HWND, param1: HIMC) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmReleaseContext(param0 : super::super::super::Foundation:: HWND, param1 : HIMC) -> super::super::super::Foundation:: BOOL); - ImmReleaseContext(param0.param().abi(), param1.param().abi()) + ImmReleaseContext(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] -pub unsafe fn ImmRequestMessageA(param0: P0, param1: P1, param2: P2) -> super::super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ImmRequestMessageA(param0: HIMC, param1: super::super::super::Foundation::WPARAM, param2: super::super::super::Foundation::LPARAM) -> super::super::super::Foundation::LRESULT { windows_targets::link!("imm32.dll" "system" fn ImmRequestMessageA(param0 : HIMC, param1 : super::super::super::Foundation:: WPARAM, param2 : super::super::super::Foundation:: LPARAM) -> super::super::super::Foundation:: LRESULT); - ImmRequestMessageA(param0.param().abi(), param1.param().abi(), param2.param().abi()) + ImmRequestMessageA(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] -pub unsafe fn ImmRequestMessageW(param0: P0, param1: P1, param2: P2) -> super::super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ImmRequestMessageW(param0: HIMC, param1: super::super::super::Foundation::WPARAM, param2: super::super::super::Foundation::LPARAM) -> super::super::super::Foundation::LRESULT { windows_targets::link!("imm32.dll" "system" fn ImmRequestMessageW(param0 : HIMC, param1 : super::super::super::Foundation:: WPARAM, param2 : super::super::super::Foundation:: LPARAM) -> super::super::super::Foundation:: LRESULT); - ImmRequestMessageW(param0.param().abi(), param1.param().abi(), param2.param().abi()) + ImmRequestMessageW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] -pub unsafe fn ImmSetCandidateWindow(param0: P0, lpcandidate: *const CANDIDATEFORM) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSetCandidateWindow(param0: HIMC, lpcandidate: *const CANDIDATEFORM) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSetCandidateWindow(param0 : HIMC, lpcandidate : *const CANDIDATEFORM) -> super::super::super::Foundation:: BOOL); - ImmSetCandidateWindow(param0.param().abi(), core::mem::transmute(lpcandidate)) + ImmSetCandidateWindow(core::mem::transmute(param0), core::mem::transmute(lpcandidate)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImmSetCompositionFontA(param0: P0, lplf: *const super::super::super::Graphics::Gdi::LOGFONTA) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSetCompositionFontA(param0: HIMC, lplf: *const super::super::super::Graphics::Gdi::LOGFONTA) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSetCompositionFontA(param0 : HIMC, lplf : *const super::super::super::Graphics::Gdi:: LOGFONTA) -> super::super::super::Foundation:: BOOL); - ImmSetCompositionFontA(param0.param().abi(), core::mem::transmute(lplf)) + ImmSetCompositionFontA(core::mem::transmute(param0), core::mem::transmute(lplf)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ImmSetCompositionFontW(param0: P0, lplf: *const super::super::super::Graphics::Gdi::LOGFONTW) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSetCompositionFontW(param0: HIMC, lplf: *const super::super::super::Graphics::Gdi::LOGFONTW) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSetCompositionFontW(param0 : HIMC, lplf : *const super::super::super::Graphics::Gdi:: LOGFONTW) -> super::super::super::Foundation:: BOOL); - ImmSetCompositionFontW(param0.param().abi(), core::mem::transmute(lplf)) + ImmSetCompositionFontW(core::mem::transmute(param0), core::mem::transmute(lplf)) } #[inline] -pub unsafe fn ImmSetCompositionStringA(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 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSetCompositionStringA(param0: HIMC, 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 { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpcomp.unwrap_or(core::ptr::null())), core::mem::transmute(dwcomplen), core::mem::transmute(lpread.unwrap_or(core::ptr::null())), core::mem::transmute(dwreadlen)) + ImmSetCompositionStringA(core::mem::transmute(param0), core::mem::transmute(dwindex), core::mem::transmute(lpcomp.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcomplen), core::mem::transmute(lpread.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSetCompositionStringW(param0: HIMC, 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 { 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(), core::mem::transmute(dwindex), core::mem::transmute(lpcomp.unwrap_or(core::ptr::null())), core::mem::transmute(dwcomplen), core::mem::transmute(lpread.unwrap_or(core::ptr::null())), core::mem::transmute(dwreadlen)) + ImmSetCompositionStringW(core::mem::transmute(param0), core::mem::transmute(dwindex), core::mem::transmute(lpcomp.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcomplen), core::mem::transmute(lpread.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreadlen)) } #[inline] -pub unsafe fn ImmSetCompositionWindow(param0: P0, lpcompform: *const COMPOSITIONFORM) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSetCompositionWindow(param0: HIMC, lpcompform: *const COMPOSITIONFORM) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSetCompositionWindow(param0 : HIMC, lpcompform : *const COMPOSITIONFORM) -> super::super::super::Foundation:: BOOL); - ImmSetCompositionWindow(param0.param().abi(), core::mem::transmute(lpcompform)) + ImmSetCompositionWindow(core::mem::transmute(param0), core::mem::transmute(lpcompform)) } #[inline] -pub unsafe fn ImmSetConversionStatus(param0: P0, param1: IME_CONVERSION_MODE, param2: IME_SENTENCE_MODE) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSetConversionStatus(param0: HIMC, param1: IME_CONVERSION_MODE, param2: IME_SENTENCE_MODE) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSetConversionStatus(param0 : HIMC, param1 : IME_CONVERSION_MODE, param2 : IME_SENTENCE_MODE) -> super::super::super::Foundation:: BOOL); - ImmSetConversionStatus(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2)) + ImmSetConversionStatus(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmSetHotKey(param0: u32, param1: u32, param2: u32, param3: P3) -> super::super::super::Foundation::BOOL -where - P3: windows_core::Param, -{ +pub unsafe fn ImmSetHotKey(param0: u32, param1: u32, param2: u32, param3: super::KeyboardAndMouse::HKL) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSetHotKey(param0 : u32, param1 : u32, param2 : u32, param3 : super::KeyboardAndMouse:: HKL) -> super::super::super::Foundation:: BOOL); - ImmSetHotKey(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), param3.param().abi()) + ImmSetHotKey(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] -pub unsafe fn ImmSetOpenStatus(param0: P0, param1: P1) -> super::super::super::Foundation::BOOL +pub unsafe fn ImmSetOpenStatus(param0: HIMC, param1: P1) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmSetOpenStatus(param0 : HIMC, param1 : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - ImmSetOpenStatus(param0.param().abi(), param1.param().abi()) + ImmSetOpenStatus(core::mem::transmute(param0), param1.param().abi()) } #[inline] -pub unsafe fn ImmSetStatusWindowPos(param0: P0, lpptpos: *const super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSetStatusWindowPos(param0: HIMC, lpptpos: *const super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSetStatusWindowPos(param0 : HIMC, lpptpos : *const super::super::super::Foundation:: POINT) -> super::super::super::Foundation:: BOOL); - ImmSetStatusWindowPos(param0.param().abi(), core::mem::transmute(lpptpos)) + ImmSetStatusWindowPos(core::mem::transmute(param0), core::mem::transmute(lpptpos)) } #[inline] -pub unsafe fn ImmShowSoftKeyboard(param0: P0, param1: i32) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmShowSoftKeyboard(param0: super::super::super::Foundation::HWND, param1: i32) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmShowSoftKeyboard(param0 : super::super::super::Foundation:: HWND, param1 : i32) -> super::super::super::Foundation:: BOOL); - ImmShowSoftKeyboard(param0.param().abi(), core::mem::transmute(param1)) + ImmShowSoftKeyboard(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] -pub unsafe fn ImmSimulateHotKey(param0: P0, param1: IME_HOTKEY_IDENTIFIER) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmSimulateHotKey(param0: super::super::super::Foundation::HWND, param1: IME_HOTKEY_IDENTIFIER) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSimulateHotKey(param0 : super::super::super::Foundation:: HWND, param1 : IME_HOTKEY_IDENTIFIER) -> super::super::super::Foundation:: BOOL); - ImmSimulateHotKey(param0.param().abi(), core::mem::transmute(param1)) + ImmSimulateHotKey(core::mem::transmute(param0), core::mem::transmute(param1)) } #[inline] -pub unsafe fn ImmUnlockIMC(param0: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmUnlockIMC(param0: HIMC) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmUnlockIMC(param0 : HIMC) -> super::super::super::Foundation:: BOOL); - ImmUnlockIMC(param0.param().abi()) + ImmUnlockIMC(core::mem::transmute(param0)) } #[inline] -pub unsafe fn ImmUnlockIMCC(param0: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImmUnlockIMCC(param0: HIMCC) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmUnlockIMCC(param0 : HIMCC) -> super::super::super::Foundation:: BOOL); - ImmUnlockIMCC(param0.param().abi()) + ImmUnlockIMCC(core::mem::transmute(param0)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmUnregisterWordA(param0: P0, lpszreading: P1, param2: u32, lpszunregister: P3) -> super::super::super::Foundation::BOOL +pub unsafe fn ImmUnregisterWordA(param0: super::KeyboardAndMouse::HKL, lpszreading: P1, param2: u32, lpszunregister: P3) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmUnregisterWordA(param0 : super::KeyboardAndMouse:: HKL, lpszreading : windows_core::PCSTR, param2 : u32, lpszunregister : windows_core::PCSTR) -> super::super::super::Foundation:: BOOL); - ImmUnregisterWordA(param0.param().abi(), lpszreading.param().abi(), core::mem::transmute(param2), lpszunregister.param().abi()) + ImmUnregisterWordA(core::mem::transmute(param0), lpszreading.param().abi(), core::mem::transmute(param2), lpszunregister.param().abi()) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] #[inline] -pub unsafe fn ImmUnregisterWordW(param0: P0, lpszreading: P1, param2: u32, lpszunregister: P3) -> super::super::super::Foundation::BOOL +pub unsafe fn ImmUnregisterWordW(param0: super::KeyboardAndMouse::HKL, lpszreading: P1, param2: u32, lpszunregister: P3) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmUnregisterWordW(param0 : super::KeyboardAndMouse:: HKL, lpszreading : windows_core::PCWSTR, param2 : u32, lpszunregister : windows_core::PCWSTR) -> super::super::super::Foundation:: BOOL); - ImmUnregisterWordW(param0.param().abi(), lpszreading.param().abi(), core::mem::transmute(param2), lpszunregister.param().abi()) + ImmUnregisterWordW(core::mem::transmute(param0), lpszreading.param().abi(), core::mem::transmute(param2), lpszunregister.param().abi()) } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -1042,67 +821,45 @@ impl IActiveIME { pub unsafe fn Inquire(&self, dwsysteminfoflags: u32, pimeinfo: *mut IMEINFO, szwndclass: windows_core::PWSTR, pdwprivate: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Inquire)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsysteminfoflags), core::mem::transmute(pimeinfo), core::mem::transmute(szwndclass), core::mem::transmute(pdwprivate)).ok() } - pub unsafe fn ConversionList(&self, himc: P0, szsource: P1, uflag: u32, ubuflen: u32, pdest: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> + pub unsafe fn ConversionList(&self, himc: HIMC, szsource: P1, uflag: u32, ubuflen: u32, pdest: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ConversionList)(windows_core::Interface::as_raw(self), himc.param().abi(), szsource.param().abi(), core::mem::transmute(uflag), core::mem::transmute(ubuflen), core::mem::transmute(pdest), core::mem::transmute(pucopied)).ok() + (windows_core::Interface::vtable(self).ConversionList)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), szsource.param().abi(), core::mem::transmute(uflag), core::mem::transmute(ubuflen), core::mem::transmute(pdest), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn Configure(&self, hkl: P0, hwnd: P1, dwmode: u32, pregisterword: *const REGISTERWORDW) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), hkl.param().abi(), hwnd.param().abi(), core::mem::transmute(dwmode), core::mem::transmute(pregisterword)).ok() + pub unsafe fn Configure(&self, hkl: super::KeyboardAndMouse::HKL, hwnd: super::super::super::Foundation::HWND, dwmode: u32, pregisterword: *const REGISTERWORDW) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(hwnd), core::mem::transmute(dwmode), core::mem::transmute(pregisterword)).ok() } pub unsafe fn Destroy(&self, ureserved: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self), core::mem::transmute(ureserved)).ok() } - pub unsafe fn Escape(&self, himc: P0, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() + pub unsafe fn Escape(&self, himc: HIMC, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } - pub unsafe fn SetActiveContext(&self, himc: P0, fflag: P1) -> windows_core::Result<()> + pub unsafe fn SetActiveContext(&self, himc: HIMC, fflag: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetActiveContext)(windows_core::Interface::as_raw(self), himc.param().abi(), fflag.param().abi()).ok() + (windows_core::Interface::vtable(self).SetActiveContext)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fflag.param().abi()).ok() } - pub unsafe fn ProcessKey(&self, himc: P0, uvirkey: u32, lparam: u32, pbkeystate: *const u8) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ProcessKey)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(uvirkey), core::mem::transmute(lparam), core::mem::transmute(pbkeystate)).ok() + pub unsafe fn ProcessKey(&self, himc: HIMC, uvirkey: u32, lparam: u32, pbkeystate: *const u8) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ProcessKey)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(uvirkey), core::mem::transmute(lparam), core::mem::transmute(pbkeystate)).ok() } - pub unsafe fn Notify(&self, himc: P0, dwaction: u32, dwindex: u32, dwvalue: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)).ok() + pub unsafe fn Notify(&self, himc: HIMC, dwaction: u32, dwindex: u32, dwvalue: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)).ok() } - pub unsafe fn Select(&self, himc: P0, fselect: P1) -> windows_core::Result<()> + pub unsafe fn Select(&self, himc: HIMC, fselect: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Select)(windows_core::Interface::as_raw(self), himc.param().abi(), fselect.param().abi()).ok() + (windows_core::Interface::vtable(self).Select)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fselect.param().abi()).ok() } - pub unsafe fn SetCompositionString(&self, himc: P0, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionString)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() + pub unsafe fn SetCompositionString(&self, himc: HIMC, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionString)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() } - pub unsafe fn ToAsciiEx(&self, uvirkey: u32, uscancode: u32, pbkeystate: *const u8, fustate: u32, himc: P4, pdwtransbuf: *mut u32, pusize: *mut u32) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).ToAsciiEx)(windows_core::Interface::as_raw(self), core::mem::transmute(uvirkey), core::mem::transmute(uscancode), core::mem::transmute(pbkeystate), core::mem::transmute(fustate), himc.param().abi(), core::mem::transmute(pdwtransbuf), core::mem::transmute(pusize)).ok() + pub unsafe fn ToAsciiEx(&self, uvirkey: u32, uscancode: u32, pbkeystate: *const u8, fustate: u32, himc: HIMC, pdwtransbuf: *mut u32, pusize: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ToAsciiEx)(windows_core::Interface::as_raw(self), core::mem::transmute(uvirkey), core::mem::transmute(uscancode), core::mem::transmute(pbkeystate), core::mem::transmute(fustate), core::mem::transmute(himc), core::mem::transmute(pdwtransbuf), core::mem::transmute(pusize)).ok() } pub unsafe fn RegisterWord(&self, szreading: P0, dwstyle: u32, szstring: P2) -> windows_core::Result<()> where @@ -1350,257 +1107,153 @@ impl windows_core::RuntimeName for IActiveIME2 {} windows_core::imp::define_interface!(IActiveIMMApp, IActiveIMMApp_Vtbl, 0x08c0e040_62d1_11d1_9326_0060b067b86e); windows_core::imp::interface_hierarchy!(IActiveIMMApp, windows_core::IUnknown); impl IActiveIMMApp { - pub unsafe fn AssociateContext(&self, hwnd: P0, hime: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn AssociateContext(&self, hwnd: super::super::super::Foundation::HWND, hime: HIMC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AssociateContext)(windows_core::Interface::as_raw(self), hwnd.param().abi(), hime.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AssociateContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(hime), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn ConfigureIMEA(&self, hkl: P0, hwnd: P1, dwmode: u32, pdata: *const REGISTERWORDA) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ConfigureIMEA)(windows_core::Interface::as_raw(self), hkl.param().abi(), hwnd.param().abi(), core::mem::transmute(dwmode), core::mem::transmute(pdata)).ok() + pub unsafe fn ConfigureIMEA(&self, hkl: super::KeyboardAndMouse::HKL, hwnd: super::super::super::Foundation::HWND, dwmode: u32, pdata: *const REGISTERWORDA) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ConfigureIMEA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(hwnd), core::mem::transmute(dwmode), core::mem::transmute(pdata)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn ConfigureIMEW(&self, hkl: P0, hwnd: P1, dwmode: u32, pdata: *const REGISTERWORDW) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ConfigureIMEW)(windows_core::Interface::as_raw(self), hkl.param().abi(), hwnd.param().abi(), core::mem::transmute(dwmode), core::mem::transmute(pdata)).ok() + pub unsafe fn ConfigureIMEW(&self, hkl: super::KeyboardAndMouse::HKL, hwnd: super::super::super::Foundation::HWND, dwmode: u32, pdata: *const REGISTERWORDW) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ConfigureIMEW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(hwnd), core::mem::transmute(dwmode), core::mem::transmute(pdata)).ok() } pub unsafe fn CreateContext(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateContext)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn DestroyContext(&self, hime: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DestroyContext)(windows_core::Interface::as_raw(self), hime.param().abi()).ok() + pub unsafe fn DestroyContext(&self, hime: HIMC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DestroyContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hime)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn EnumRegisterWordA(&self, hkl: P0, szreading: P1, dwstyle: u32, szregister: P3, pdata: *const core::ffi::c_void) -> windows_core::Result + pub unsafe fn EnumRegisterWordA(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szregister: P3, pdata: *const core::ffi::c_void) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumRegisterWordA)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi(), core::mem::transmute(pdata), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumRegisterWordA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi(), core::mem::transmute(pdata), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn EnumRegisterWordW(&self, hkl: P0, szreading: P1, dwstyle: u32, szregister: P3, pdata: *const core::ffi::c_void) -> windows_core::Result + pub unsafe fn EnumRegisterWordW(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szregister: P3, pdata: *const core::ffi::c_void) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumRegisterWordW)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi(), core::mem::transmute(pdata), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumRegisterWordW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi(), core::mem::transmute(pdata), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn EscapeA(&self, hkl: P0, himc: P1, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).EscapeA)(windows_core::Interface::as_raw(self), hkl.param().abi(), himc.param().abi(), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() + pub unsafe fn EscapeA(&self, hkl: super::KeyboardAndMouse::HKL, himc: HIMC, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EscapeA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(himc), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn EscapeW(&self, hkl: P0, himc: P1, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).EscapeW)(windows_core::Interface::as_raw(self), hkl.param().abi(), himc.param().abi(), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() + pub unsafe fn EscapeW(&self, hkl: super::KeyboardAndMouse::HKL, himc: HIMC, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EscapeW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(himc), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } - pub unsafe fn GetCandidateListA(&self, himc: P0, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateListA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(ubuflen), core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetCandidateListA(&self, himc: HIMC, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateListA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(ubuflen), core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetCandidateListW(&self, himc: P0, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateListW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(ubuflen), core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetCandidateListW(&self, himc: HIMC, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateListW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(ubuflen), core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetCandidateListCountA(&self, himc: P0, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateListCountA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() + pub unsafe fn GetCandidateListCountA(&self, himc: HIMC, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateListCountA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() } - pub unsafe fn GetCandidateListCountW(&self, himc: P0, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateListCountW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() + pub unsafe fn GetCandidateListCountW(&self, himc: HIMC, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateListCountW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() } - pub unsafe fn GetCandidateWindow(&self, himc: P0, dwindex: u32, pcandidate: *mut CANDIDATEFORM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateWindow)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pcandidate)).ok() + pub unsafe fn GetCandidateWindow(&self, himc: HIMC, dwindex: u32, pcandidate: *mut CANDIDATEFORM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(pcandidate)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetCompositionFontA(&self, himc: P0, plf: *mut super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionFontA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(plf)).ok() + pub unsafe fn GetCompositionFontA(&self, himc: HIMC, plf: *mut super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionFontA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(plf)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetCompositionFontW(&self, himc: P0, plf: *mut super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionFontW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(plf)).ok() + pub unsafe fn GetCompositionFontW(&self, himc: HIMC, plf: *mut super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionFontW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(plf)).ok() } - pub unsafe fn GetCompositionStringA(&self, himc: P0, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionStringA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() + pub unsafe fn GetCompositionStringA(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionStringA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() } - pub unsafe fn GetCompositionStringW(&self, himc: P0, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionStringW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() + pub unsafe fn GetCompositionStringW(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionStringW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() } - pub unsafe fn GetCompositionWindow(&self, himc: P0, pcompform: *mut COMPOSITIONFORM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionWindow)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pcompform)).ok() + pub unsafe fn GetCompositionWindow(&self, himc: HIMC, pcompform: *mut COMPOSITIONFORM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pcompform)).ok() } - pub unsafe fn GetContext(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetContext(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetConversionListA(&self, hkl: P0, himc: P1, psrc: P2, ubuflen: u32, uflag: u32, pdst: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetConversionListA(&self, hkl: super::KeyboardAndMouse::HKL, himc: HIMC, psrc: P2, ubuflen: u32, uflag: u32, pdst: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetConversionListA)(windows_core::Interface::as_raw(self), hkl.param().abi(), himc.param().abi(), psrc.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(uflag), core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() + (windows_core::Interface::vtable(self).GetConversionListA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(himc), psrc.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(uflag), core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetConversionListW(&self, hkl: P0, himc: P1, psrc: P2, ubuflen: u32, uflag: u32, pdst: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetConversionListW(&self, hkl: super::KeyboardAndMouse::HKL, himc: HIMC, psrc: P2, ubuflen: u32, uflag: u32, pdst: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetConversionListW)(windows_core::Interface::as_raw(self), hkl.param().abi(), himc.param().abi(), psrc.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(uflag), core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() + (windows_core::Interface::vtable(self).GetConversionListW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(himc), psrc.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(uflag), core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetConversionStatus(&self, himc: P0, pfdwconversion: *mut u32, pfdwsentence: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetConversionStatus)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pfdwconversion), core::mem::transmute(pfdwsentence)).ok() + pub unsafe fn GetConversionStatus(&self, himc: HIMC, pfdwconversion: *mut u32, pfdwsentence: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetConversionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pfdwconversion), core::mem::transmute(pfdwsentence)).ok() } - pub unsafe fn GetDefaultIMEWnd(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetDefaultIMEWnd(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetDefaultIMEWnd)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetDefaultIMEWnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetDescriptionA(&self, hkl: P0, ubuflen: u32, szdescription: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetDescriptionA)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetDescriptionA(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szdescription: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDescriptionA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(ubuflen), core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetDescriptionW(&self, hkl: P0, ubuflen: u32, szdescription: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetDescriptionW)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetDescriptionW(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szdescription: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDescriptionW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(ubuflen), core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetGuideLineA(&self, himc: P0, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PSTR, pdwresult: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetGuideLineA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() + pub unsafe fn GetGuideLineA(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PSTR, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetGuideLineA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() } - pub unsafe fn GetGuideLineW(&self, himc: P0, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PWSTR, pdwresult: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetGuideLineW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() + pub unsafe fn GetGuideLineW(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PWSTR, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetGuideLineW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetIMEFileNameA(&self, hkl: P0, ubuflen: u32, szfilename: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetIMEFileNameA)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetIMEFileNameA(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szfilename: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetIMEFileNameA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(ubuflen), core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetIMEFileNameW(&self, hkl: P0, ubuflen: u32, szfilename: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetIMEFileNameW)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetIMEFileNameW(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szfilename: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetIMEFileNameW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(ubuflen), core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetOpenStatus(&self, himc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetOpenStatus)(windows_core::Interface::as_raw(self), himc.param().abi()).ok() + pub unsafe fn GetOpenStatus(&self, himc: HIMC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetOpenStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetProperty(&self, hkl: P0, fdwindex: u32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetProperty(&self, hkl: super::KeyboardAndMouse::HKL, fdwindex: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(fdwindex), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(fdwindex), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetRegisterWordStyleA(&self, hkl: P0, nitem: u32, pstylebuf: *mut STYLEBUFA, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetRegisterWordStyleA)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(nitem), core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetRegisterWordStyleA(&self, hkl: super::KeyboardAndMouse::HKL, nitem: u32, pstylebuf: *mut STYLEBUFA, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetRegisterWordStyleA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(nitem), core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetRegisterWordStyleW(&self, hkl: P0, nitem: u32, pstylebuf: *mut STYLEBUFW, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetRegisterWordStyleW)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(nitem), core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetRegisterWordStyleW(&self, hkl: super::KeyboardAndMouse::HKL, nitem: u32, pstylebuf: *mut STYLEBUFW, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetRegisterWordStyleW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(nitem), core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetStatusWindowPos(&self, himc: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetStatusWindowPos(&self, himc: HIMC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetStatusWindowPos)(windows_core::Interface::as_raw(self), himc.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetStatusWindowPos)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), &mut result__).map(|| result__) } - pub unsafe fn GetVirtualKey(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetVirtualKey(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVirtualKey)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVirtualKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn InstallIMEA(&self, szimefilename: P0, szlayouttext: P1) -> windows_core::Result @@ -1621,139 +1274,87 @@ impl IActiveIMMApp { (windows_core::Interface::vtable(self).InstallIMEW)(windows_core::Interface::as_raw(self), szimefilename.param().abi(), szlayouttext.param().abi(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn IsIME(&self, hkl: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).IsIME)(windows_core::Interface::as_raw(self), hkl.param().abi()).ok() + pub unsafe fn IsIME(&self, hkl: super::KeyboardAndMouse::HKL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).IsIME)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl)).ok() } - pub unsafe fn IsUIMessageA(&self, hwndime: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).IsUIMessageA)(windows_core::Interface::as_raw(self), hwndime.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn IsUIMessageA(&self, hwndime: super::super::super::Foundation::HWND, msg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).IsUIMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndime), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn IsUIMessageW(&self, hwndime: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).IsUIMessageW)(windows_core::Interface::as_raw(self), hwndime.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn IsUIMessageW(&self, hwndime: super::super::super::Foundation::HWND, msg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).IsUIMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndime), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn NotifyIME(&self, himc: P0, dwaction: u32, dwindex: u32, dwvalue: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).NotifyIME)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)).ok() + pub unsafe fn NotifyIME(&self, himc: HIMC, dwaction: u32, dwindex: u32, dwvalue: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).NotifyIME)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn RegisterWordA(&self, hkl: P0, szreading: P1, dwstyle: u32, szregister: P3) -> windows_core::Result<()> + pub unsafe fn RegisterWordA(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szregister: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).RegisterWordA)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi()).ok() + (windows_core::Interface::vtable(self).RegisterWordA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi()).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn RegisterWordW(&self, hkl: P0, szreading: P1, dwstyle: u32, szregister: P3) -> windows_core::Result<()> + pub unsafe fn RegisterWordW(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szregister: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).RegisterWordW)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi()).ok() + (windows_core::Interface::vtable(self).RegisterWordW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi()).ok() } - pub unsafe fn ReleaseContext(&self, hwnd: P0, himc: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseContext)(windows_core::Interface::as_raw(self), hwnd.param().abi(), himc.param().abi()).ok() + pub unsafe fn ReleaseContext(&self, hwnd: super::super::super::Foundation::HWND, himc: HIMC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(himc)).ok() } - pub unsafe fn SetCandidateWindow(&self, himc: P0, pcandidate: *const CANDIDATEFORM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCandidateWindow)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pcandidate)).ok() + pub unsafe fn SetCandidateWindow(&self, himc: HIMC, pcandidate: *const CANDIDATEFORM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCandidateWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pcandidate)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetCompositionFontA(&self, himc: P0, plf: *const super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionFontA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(plf)).ok() + pub unsafe fn SetCompositionFontA(&self, himc: HIMC, plf: *const super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionFontA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(plf)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetCompositionFontW(&self, himc: P0, plf: *const super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionFontW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(plf)).ok() + pub unsafe fn SetCompositionFontW(&self, himc: HIMC, plf: *const super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionFontW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(plf)).ok() } - pub unsafe fn SetCompositionStringA(&self, himc: P0, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionStringA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() + pub unsafe fn SetCompositionStringA(&self, himc: HIMC, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionStringA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() } - pub unsafe fn SetCompositionStringW(&self, himc: P0, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionStringW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() + pub unsafe fn SetCompositionStringW(&self, himc: HIMC, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionStringW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() } - pub unsafe fn SetCompositionWindow(&self, himc: P0, pcompform: *const COMPOSITIONFORM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionWindow)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pcompform)).ok() + pub unsafe fn SetCompositionWindow(&self, himc: HIMC, pcompform: *const COMPOSITIONFORM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pcompform)).ok() } - pub unsafe fn SetConversionStatus(&self, himc: P0, fdwconversion: u32, fdwsentence: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetConversionStatus)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(fdwconversion), core::mem::transmute(fdwsentence)).ok() + pub unsafe fn SetConversionStatus(&self, himc: HIMC, fdwconversion: u32, fdwsentence: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetConversionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(fdwconversion), core::mem::transmute(fdwsentence)).ok() } - pub unsafe fn SetOpenStatus(&self, himc: P0, fopen: P1) -> windows_core::Result<()> + pub unsafe fn SetOpenStatus(&self, himc: HIMC, fopen: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetOpenStatus)(windows_core::Interface::as_raw(self), himc.param().abi(), fopen.param().abi()).ok() + (windows_core::Interface::vtable(self).SetOpenStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fopen.param().abi()).ok() } - pub unsafe fn SetStatusWindowPos(&self, himc: P0, pptpos: *const super::super::super::Foundation::POINT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStatusWindowPos)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pptpos)).ok() + pub unsafe fn SetStatusWindowPos(&self, himc: HIMC, pptpos: *const super::super::super::Foundation::POINT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStatusWindowPos)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pptpos)).ok() } - pub unsafe fn SimulateHotKey(&self, hwnd: P0, dwhotkeyid: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SimulateHotKey)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(dwhotkeyid)).ok() + pub unsafe fn SimulateHotKey(&self, hwnd: super::super::super::Foundation::HWND, dwhotkeyid: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SimulateHotKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(dwhotkeyid)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn UnregisterWordA(&self, hkl: P0, szreading: P1, dwstyle: u32, szunregister: P3) -> windows_core::Result<()> + pub unsafe fn UnregisterWordA(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szunregister: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).UnregisterWordA)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() + (windows_core::Interface::vtable(self).UnregisterWordA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn UnregisterWordW(&self, hkl: P0, szreading: P1, dwstyle: u32, szunregister: P3) -> windows_core::Result<()> + pub unsafe fn UnregisterWordW(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szunregister: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).UnregisterWordW)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() + (windows_core::Interface::vtable(self).UnregisterWordW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() } pub unsafe fn Activate(&self, frestorelayout: P0) -> windows_core::Result<()> where @@ -1764,57 +1365,36 @@ impl IActiveIMMApp { pub unsafe fn Deactivate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn OnDefWindowProc(&self, hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { + pub unsafe fn OnDefWindowProc(&self, hwnd: super::super::super::Foundation::HWND, msg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnDefWindowProc)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnDefWindowProc)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } pub unsafe fn FilterClientWindows(&self, aaclasslist: *const u16, usize: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FilterClientWindows)(windows_core::Interface::as_raw(self), core::mem::transmute(aaclasslist), core::mem::transmute(usize)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetCodePageA(&self, hkl: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetCodePageA(&self, hkl: super::KeyboardAndMouse::HKL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCodePageA)(windows_core::Interface::as_raw(self), hkl.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetCodePageA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetLangId(&self, hkl: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetLangId(&self, hkl: super::KeyboardAndMouse::HKL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetLangId)(windows_core::Interface::as_raw(self), hkl.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetLangId)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), &mut result__).map(|| result__) } - pub unsafe fn AssociateContextEx(&self, hwnd: P0, himc: P1, dwflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AssociateContextEx)(windows_core::Interface::as_raw(self), hwnd.param().abi(), himc.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn AssociateContextEx(&self, hwnd: super::super::super::Foundation::HWND, himc: HIMC, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AssociateContextEx)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(himc), core::mem::transmute(dwflags)).ok() } pub unsafe fn DisableIME(&self, idthread: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DisableIME)(windows_core::Interface::as_raw(self), core::mem::transmute(idthread)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetImeMenuItemsA(&self, himc: P0, dwflags: u32, dwtype: u32, pimeparentmenu: *const IMEMENUITEMINFOA, pimemenu: *mut IMEMENUITEMINFOA, dwsize: u32, pdwresult: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetImeMenuItemsA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwtype), core::mem::transmute(pimeparentmenu), core::mem::transmute(pimemenu), core::mem::transmute(dwsize), core::mem::transmute(pdwresult)).ok() + pub unsafe fn GetImeMenuItemsA(&self, himc: HIMC, dwflags: u32, dwtype: u32, pimeparentmenu: *const IMEMENUITEMINFOA, pimemenu: *mut IMEMENUITEMINFOA, dwsize: u32, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetImeMenuItemsA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwflags), core::mem::transmute(dwtype), core::mem::transmute(pimeparentmenu), core::mem::transmute(pimemenu), core::mem::transmute(dwsize), core::mem::transmute(pdwresult)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetImeMenuItemsW(&self, himc: P0, dwflags: u32, dwtype: u32, pimeparentmenu: *const IMEMENUITEMINFOW, pimemenu: *mut IMEMENUITEMINFOW, dwsize: u32, pdwresult: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetImeMenuItemsW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwtype), core::mem::transmute(pimeparentmenu), core::mem::transmute(pimemenu), core::mem::transmute(dwsize), core::mem::transmute(pdwresult)).ok() + pub unsafe fn GetImeMenuItemsW(&self, himc: HIMC, dwflags: u32, dwtype: u32, pimeparentmenu: *const IMEMENUITEMINFOW, pimemenu: *mut IMEMENUITEMINFOW, dwsize: u32, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetImeMenuItemsW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwflags), core::mem::transmute(dwtype), core::mem::transmute(pimeparentmenu), core::mem::transmute(pimemenu), core::mem::transmute(dwsize), core::mem::transmute(pdwresult)).ok() } pub unsafe fn EnumInputContext(&self, idthread: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2500,257 +2080,153 @@ impl windows_core::RuntimeName for IActiveIMMApp {} windows_core::imp::define_interface!(IActiveIMMIME, IActiveIMMIME_Vtbl, 0x08c03411_f96b_11d0_a475_00aa006bcc59); windows_core::imp::interface_hierarchy!(IActiveIMMIME, windows_core::IUnknown); impl IActiveIMMIME { - pub unsafe fn AssociateContext(&self, hwnd: P0, hime: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn AssociateContext(&self, hwnd: super::super::super::Foundation::HWND, hime: HIMC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AssociateContext)(windows_core::Interface::as_raw(self), hwnd.param().abi(), hime.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AssociateContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(hime), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn ConfigureIMEA(&self, hkl: P0, hwnd: P1, dwmode: u32, pdata: *const REGISTERWORDA) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ConfigureIMEA)(windows_core::Interface::as_raw(self), hkl.param().abi(), hwnd.param().abi(), core::mem::transmute(dwmode), core::mem::transmute(pdata)).ok() + pub unsafe fn ConfigureIMEA(&self, hkl: super::KeyboardAndMouse::HKL, hwnd: super::super::super::Foundation::HWND, dwmode: u32, pdata: *const REGISTERWORDA) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ConfigureIMEA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(hwnd), core::mem::transmute(dwmode), core::mem::transmute(pdata)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn ConfigureIMEW(&self, hkl: P0, hwnd: P1, dwmode: u32, pdata: *const REGISTERWORDW) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ConfigureIMEW)(windows_core::Interface::as_raw(self), hkl.param().abi(), hwnd.param().abi(), core::mem::transmute(dwmode), core::mem::transmute(pdata)).ok() + pub unsafe fn ConfigureIMEW(&self, hkl: super::KeyboardAndMouse::HKL, hwnd: super::super::super::Foundation::HWND, dwmode: u32, pdata: *const REGISTERWORDW) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ConfigureIMEW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(hwnd), core::mem::transmute(dwmode), core::mem::transmute(pdata)).ok() } pub unsafe fn CreateContext(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateContext)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn DestroyContext(&self, hime: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DestroyContext)(windows_core::Interface::as_raw(self), hime.param().abi()).ok() + pub unsafe fn DestroyContext(&self, hime: HIMC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DestroyContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hime)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn EnumRegisterWordA(&self, hkl: P0, szreading: P1, dwstyle: u32, szregister: P3, pdata: *const core::ffi::c_void) -> windows_core::Result + pub unsafe fn EnumRegisterWordA(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szregister: P3, pdata: *const core::ffi::c_void) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumRegisterWordA)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi(), core::mem::transmute(pdata), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumRegisterWordA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi(), core::mem::transmute(pdata), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn EnumRegisterWordW(&self, hkl: P0, szreading: P1, dwstyle: u32, szregister: P3, pdata: *const core::ffi::c_void) -> windows_core::Result + pub unsafe fn EnumRegisterWordW(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szregister: P3, pdata: *const core::ffi::c_void) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumRegisterWordW)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi(), core::mem::transmute(pdata), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumRegisterWordW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi(), core::mem::transmute(pdata), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn EscapeA(&self, hkl: P0, himc: P1, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).EscapeA)(windows_core::Interface::as_raw(self), hkl.param().abi(), himc.param().abi(), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() + pub unsafe fn EscapeA(&self, hkl: super::KeyboardAndMouse::HKL, himc: HIMC, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EscapeA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(himc), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn EscapeW(&self, hkl: P0, himc: P1, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).EscapeW)(windows_core::Interface::as_raw(self), hkl.param().abi(), himc.param().abi(), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() + pub unsafe fn EscapeW(&self, hkl: super::KeyboardAndMouse::HKL, himc: HIMC, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EscapeW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(himc), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } - pub unsafe fn GetCandidateListA(&self, himc: P0, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateListA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(ubuflen), core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetCandidateListA(&self, himc: HIMC, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateListA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(ubuflen), core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetCandidateListW(&self, himc: P0, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateListW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(ubuflen), core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetCandidateListW(&self, himc: HIMC, dwindex: u32, ubuflen: u32, pcandlist: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateListW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(ubuflen), core::mem::transmute(pcandlist), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetCandidateListCountA(&self, himc: P0, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateListCountA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() + pub unsafe fn GetCandidateListCountA(&self, himc: HIMC, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateListCountA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() } - pub unsafe fn GetCandidateListCountW(&self, himc: P0, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateListCountW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() + pub unsafe fn GetCandidateListCountW(&self, himc: HIMC, pdwlistsize: *mut u32, pdwbuflen: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateListCountW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pdwlistsize), core::mem::transmute(pdwbuflen)).ok() } - pub unsafe fn GetCandidateWindow(&self, himc: P0, dwindex: u32, pcandidate: *mut CANDIDATEFORM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCandidateWindow)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pcandidate)).ok() + pub unsafe fn GetCandidateWindow(&self, himc: HIMC, dwindex: u32, pcandidate: *mut CANDIDATEFORM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCandidateWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(pcandidate)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetCompositionFontA(&self, himc: P0, plf: *mut super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionFontA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(plf)).ok() + pub unsafe fn GetCompositionFontA(&self, himc: HIMC, plf: *mut super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionFontA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(plf)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetCompositionFontW(&self, himc: P0, plf: *mut super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionFontW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(plf)).ok() + pub unsafe fn GetCompositionFontW(&self, himc: HIMC, plf: *mut super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionFontW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(plf)).ok() } - pub unsafe fn GetCompositionStringA(&self, himc: P0, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionStringA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() + pub unsafe fn GetCompositionStringA(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionStringA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() } - pub unsafe fn GetCompositionStringW(&self, himc: P0, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionStringW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() + pub unsafe fn GetCompositionStringW(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, plcopied: *mut i32, pbuf: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionStringW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(plcopied), core::mem::transmute(pbuf)).ok() } - pub unsafe fn GetCompositionWindow(&self, himc: P0, pcompform: *mut COMPOSITIONFORM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCompositionWindow)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pcompform)).ok() + pub unsafe fn GetCompositionWindow(&self, himc: HIMC, pcompform: *mut COMPOSITIONFORM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCompositionWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pcompform)).ok() } - pub unsafe fn GetContext(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetContext(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetConversionListA(&self, hkl: P0, himc: P1, psrc: P2, ubuflen: u32, uflag: u32, pdst: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetConversionListA(&self, hkl: super::KeyboardAndMouse::HKL, himc: HIMC, psrc: P2, ubuflen: u32, uflag: u32, pdst: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetConversionListA)(windows_core::Interface::as_raw(self), hkl.param().abi(), himc.param().abi(), psrc.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(uflag), core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() + (windows_core::Interface::vtable(self).GetConversionListA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(himc), psrc.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(uflag), core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetConversionListW(&self, hkl: P0, himc: P1, psrc: P2, ubuflen: u32, uflag: u32, pdst: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetConversionListW(&self, hkl: super::KeyboardAndMouse::HKL, himc: HIMC, psrc: P2, ubuflen: u32, uflag: u32, pdst: *mut CANDIDATELIST, pucopied: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetConversionListW)(windows_core::Interface::as_raw(self), hkl.param().abi(), himc.param().abi(), psrc.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(uflag), core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() + (windows_core::Interface::vtable(self).GetConversionListW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(himc), psrc.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(uflag), core::mem::transmute(pdst), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetConversionStatus(&self, himc: P0, pfdwconversion: *mut u32, pfdwsentence: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetConversionStatus)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pfdwconversion), core::mem::transmute(pfdwsentence)).ok() + pub unsafe fn GetConversionStatus(&self, himc: HIMC, pfdwconversion: *mut u32, pfdwsentence: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetConversionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pfdwconversion), core::mem::transmute(pfdwsentence)).ok() } - pub unsafe fn GetDefaultIMEWnd(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetDefaultIMEWnd(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetDefaultIMEWnd)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetDefaultIMEWnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetDescriptionA(&self, hkl: P0, ubuflen: u32, szdescription: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetDescriptionA)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetDescriptionA(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szdescription: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDescriptionA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(ubuflen), core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetDescriptionW(&self, hkl: P0, ubuflen: u32, szdescription: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetDescriptionW)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetDescriptionW(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szdescription: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDescriptionW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(ubuflen), core::mem::transmute(szdescription), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetGuideLineA(&self, himc: P0, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PSTR, pdwresult: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetGuideLineA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() + pub unsafe fn GetGuideLineA(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PSTR, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetGuideLineA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() } - pub unsafe fn GetGuideLineW(&self, himc: P0, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PWSTR, pdwresult: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetGuideLineW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() + pub unsafe fn GetGuideLineW(&self, himc: HIMC, dwindex: u32, dwbuflen: u32, pbuf: windows_core::PWSTR, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetGuideLineW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(dwbuflen), core::mem::transmute(pbuf), core::mem::transmute(pdwresult)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetIMEFileNameA(&self, hkl: P0, ubuflen: u32, szfilename: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetIMEFileNameA)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetIMEFileNameA(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szfilename: windows_core::PSTR, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetIMEFileNameA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(ubuflen), core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetIMEFileNameW(&self, hkl: P0, ubuflen: u32, szfilename: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetIMEFileNameW)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(ubuflen), core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetIMEFileNameW(&self, hkl: super::KeyboardAndMouse::HKL, ubuflen: u32, szfilename: windows_core::PWSTR, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetIMEFileNameW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(ubuflen), core::mem::transmute(szfilename), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetOpenStatus(&self, himc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetOpenStatus)(windows_core::Interface::as_raw(self), himc.param().abi()).ok() + pub unsafe fn GetOpenStatus(&self, himc: HIMC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetOpenStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetProperty(&self, hkl: P0, fdwindex: u32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetProperty(&self, hkl: super::KeyboardAndMouse::HKL, fdwindex: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(fdwindex), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(fdwindex), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetRegisterWordStyleA(&self, hkl: P0, nitem: u32, pstylebuf: *mut STYLEBUFA, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetRegisterWordStyleA)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(nitem), core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetRegisterWordStyleA(&self, hkl: super::KeyboardAndMouse::HKL, nitem: u32, pstylebuf: *mut STYLEBUFA, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetRegisterWordStyleA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(nitem), core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetRegisterWordStyleW(&self, hkl: P0, nitem: u32, pstylebuf: *mut STYLEBUFW, pucopied: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetRegisterWordStyleW)(windows_core::Interface::as_raw(self), hkl.param().abi(), core::mem::transmute(nitem), core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() + pub unsafe fn GetRegisterWordStyleW(&self, hkl: super::KeyboardAndMouse::HKL, nitem: u32, pstylebuf: *mut STYLEBUFW, pucopied: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetRegisterWordStyleW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), core::mem::transmute(nitem), core::mem::transmute(pstylebuf), core::mem::transmute(pucopied)).ok() } - pub unsafe fn GetStatusWindowPos(&self, himc: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetStatusWindowPos(&self, himc: HIMC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetStatusWindowPos)(windows_core::Interface::as_raw(self), himc.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetStatusWindowPos)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), &mut result__).map(|| result__) } - pub unsafe fn GetVirtualKey(&self, hwnd: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetVirtualKey(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVirtualKey)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVirtualKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn InstallIMEA(&self, szimefilename: P0, szlayouttext: P1) -> windows_core::Result @@ -2771,255 +2247,155 @@ impl IActiveIMMIME { (windows_core::Interface::vtable(self).InstallIMEW)(windows_core::Interface::as_raw(self), szimefilename.param().abi(), szlayouttext.param().abi(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn IsIME(&self, hkl: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).IsIME)(windows_core::Interface::as_raw(self), hkl.param().abi()).ok() + pub unsafe fn IsIME(&self, hkl: super::KeyboardAndMouse::HKL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).IsIME)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl)).ok() } - pub unsafe fn IsUIMessageA(&self, hwndime: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).IsUIMessageA)(windows_core::Interface::as_raw(self), hwndime.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn IsUIMessageA(&self, hwndime: super::super::super::Foundation::HWND, msg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).IsUIMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndime), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn IsUIMessageW(&self, hwndime: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).IsUIMessageW)(windows_core::Interface::as_raw(self), hwndime.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn IsUIMessageW(&self, hwndime: super::super::super::Foundation::HWND, msg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).IsUIMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndime), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn NotifyIME(&self, himc: P0, dwaction: u32, dwindex: u32, dwvalue: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).NotifyIME)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)).ok() + pub unsafe fn NotifyIME(&self, himc: HIMC, dwaction: u32, dwindex: u32, dwvalue: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).NotifyIME)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn RegisterWordA(&self, hkl: P0, szreading: P1, dwstyle: u32, szregister: P3) -> windows_core::Result<()> + pub unsafe fn RegisterWordA(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szregister: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).RegisterWordA)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi()).ok() + (windows_core::Interface::vtable(self).RegisterWordA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi()).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn RegisterWordW(&self, hkl: P0, szreading: P1, dwstyle: u32, szregister: P3) -> windows_core::Result<()> + pub unsafe fn RegisterWordW(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szregister: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).RegisterWordW)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi()).ok() + (windows_core::Interface::vtable(self).RegisterWordW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szregister.param().abi()).ok() } - pub unsafe fn ReleaseContext(&self, hwnd: P0, himc: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseContext)(windows_core::Interface::as_raw(self), hwnd.param().abi(), himc.param().abi()).ok() + pub unsafe fn ReleaseContext(&self, hwnd: super::super::super::Foundation::HWND, himc: HIMC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReleaseContext)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(himc)).ok() } - pub unsafe fn SetCandidateWindow(&self, himc: P0, pcandidate: *const CANDIDATEFORM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCandidateWindow)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pcandidate)).ok() + pub unsafe fn SetCandidateWindow(&self, himc: HIMC, pcandidate: *const CANDIDATEFORM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCandidateWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pcandidate)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetCompositionFontA(&self, himc: P0, plf: *const super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionFontA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(plf)).ok() + pub unsafe fn SetCompositionFontA(&self, himc: HIMC, plf: *const super::super::super::Graphics::Gdi::LOGFONTA) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionFontA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(plf)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetCompositionFontW(&self, himc: P0, plf: *const super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionFontW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(plf)).ok() + pub unsafe fn SetCompositionFontW(&self, himc: HIMC, plf: *const super::super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionFontW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(plf)).ok() } - pub unsafe fn SetCompositionStringA(&self, himc: P0, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionStringA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() + pub unsafe fn SetCompositionStringA(&self, himc: HIMC, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionStringA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() } - pub unsafe fn SetCompositionStringW(&self, himc: P0, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionStringW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() + pub unsafe fn SetCompositionStringW(&self, himc: HIMC, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionStringW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() } - pub unsafe fn SetCompositionWindow(&self, himc: P0, pcompform: *const COMPOSITIONFORM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionWindow)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pcompform)).ok() + pub unsafe fn SetCompositionWindow(&self, himc: HIMC, pcompform: *const COMPOSITIONFORM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pcompform)).ok() } - pub unsafe fn SetConversionStatus(&self, himc: P0, fdwconversion: u32, fdwsentence: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetConversionStatus)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(fdwconversion), core::mem::transmute(fdwsentence)).ok() + pub unsafe fn SetConversionStatus(&self, himc: HIMC, fdwconversion: u32, fdwsentence: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetConversionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(fdwconversion), core::mem::transmute(fdwsentence)).ok() } - pub unsafe fn SetOpenStatus(&self, himc: P0, fopen: P1) -> windows_core::Result<()> + pub unsafe fn SetOpenStatus(&self, himc: HIMC, fopen: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetOpenStatus)(windows_core::Interface::as_raw(self), himc.param().abi(), fopen.param().abi()).ok() + (windows_core::Interface::vtable(self).SetOpenStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fopen.param().abi()).ok() } - pub unsafe fn SetStatusWindowPos(&self, himc: P0, pptpos: *const super::super::super::Foundation::POINT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStatusWindowPos)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(pptpos)).ok() + pub unsafe fn SetStatusWindowPos(&self, himc: HIMC, pptpos: *const super::super::super::Foundation::POINT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStatusWindowPos)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pptpos)).ok() } - pub unsafe fn SimulateHotKey(&self, hwnd: P0, dwhotkeyid: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SimulateHotKey)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(dwhotkeyid)).ok() + pub unsafe fn SimulateHotKey(&self, hwnd: super::super::super::Foundation::HWND, dwhotkeyid: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SimulateHotKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(dwhotkeyid)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn UnregisterWordA(&self, hkl: P0, szreading: P1, dwstyle: u32, szunregister: P3) -> windows_core::Result<()> + pub unsafe fn UnregisterWordA(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szunregister: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).UnregisterWordA)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() + (windows_core::Interface::vtable(self).UnregisterWordA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn UnregisterWordW(&self, hkl: P0, szreading: P1, dwstyle: u32, szunregister: P3) -> windows_core::Result<()> + pub unsafe fn UnregisterWordW(&self, hkl: super::KeyboardAndMouse::HKL, szreading: P1, dwstyle: u32, szunregister: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).UnregisterWordW)(windows_core::Interface::as_raw(self), hkl.param().abi(), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() + (windows_core::Interface::vtable(self).UnregisterWordW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() } - pub unsafe fn GenerateMessage(&self, himc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GenerateMessage)(windows_core::Interface::as_raw(self), himc.param().abi()).ok() + pub unsafe fn GenerateMessage(&self, himc: HIMC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GenerateMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(himc)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn LockIMC(&self, himc: P0) -> windows_core::Result<*mut INPUTCONTEXT> - where - P0: windows_core::Param, - { + pub unsafe fn LockIMC(&self, himc: HIMC) -> windows_core::Result<*mut INPUTCONTEXT> { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).LockIMC)(windows_core::Interface::as_raw(self), himc.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).LockIMC)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), &mut result__).map(|| result__) } - pub unsafe fn UnlockIMC(&self, himc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UnlockIMC)(windows_core::Interface::as_raw(self), himc.param().abi()).ok() + pub unsafe fn UnlockIMC(&self, himc: HIMC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UnlockIMC)(windows_core::Interface::as_raw(self), core::mem::transmute(himc)).ok() } - pub unsafe fn GetIMCLockCount(&self, himc: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetIMCLockCount(&self, himc: HIMC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetIMCLockCount)(windows_core::Interface::as_raw(self), himc.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetIMCLockCount)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), &mut result__).map(|| result__) } pub unsafe fn CreateIMCC(&self, dwsize: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateIMCC)(windows_core::Interface::as_raw(self), core::mem::transmute(dwsize), &mut result__).map(|| result__) } - pub unsafe fn DestroyIMCC(&self, himcc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DestroyIMCC)(windows_core::Interface::as_raw(self), himcc.param().abi()).ok() + pub unsafe fn DestroyIMCC(&self, himcc: HIMCC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DestroyIMCC)(windows_core::Interface::as_raw(self), core::mem::transmute(himcc)).ok() } - pub unsafe fn LockIMCC(&self, himcc: P0, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).LockIMCC)(windows_core::Interface::as_raw(self), himcc.param().abi(), core::mem::transmute(ppv)).ok() + pub unsafe fn LockIMCC(&self, himcc: HIMCC, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LockIMCC)(windows_core::Interface::as_raw(self), core::mem::transmute(himcc), core::mem::transmute(ppv)).ok() } - pub unsafe fn UnlockIMCC(&self, himcc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UnlockIMCC)(windows_core::Interface::as_raw(self), himcc.param().abi()).ok() + pub unsafe fn UnlockIMCC(&self, himcc: HIMCC) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UnlockIMCC)(windows_core::Interface::as_raw(self), core::mem::transmute(himcc)).ok() } - pub unsafe fn ReSizeIMCC(&self, himcc: P0, dwsize: u32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn ReSizeIMCC(&self, himcc: HIMCC, dwsize: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ReSizeIMCC)(windows_core::Interface::as_raw(self), himcc.param().abi(), core::mem::transmute(dwsize), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ReSizeIMCC)(windows_core::Interface::as_raw(self), core::mem::transmute(himcc), core::mem::transmute(dwsize), &mut result__).map(|| result__) } - pub unsafe fn GetIMCCSize(&self, himcc: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetIMCCSize(&self, himcc: HIMCC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetIMCCSize)(windows_core::Interface::as_raw(self), himcc.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetIMCCSize)(windows_core::Interface::as_raw(self), core::mem::transmute(himcc), &mut result__).map(|| result__) } - pub unsafe fn GetIMCCLockCount(&self, himcc: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetIMCCLockCount(&self, himcc: HIMCC) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetIMCCLockCount)(windows_core::Interface::as_raw(self), himcc.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetIMCCLockCount)(windows_core::Interface::as_raw(self), core::mem::transmute(himcc), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn GetHotKey(&self, dwhotkeyid: u32, pumodifiers: *mut u32, puvkey: *mut u32, phkl: *mut super::KeyboardAndMouse::HKL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetHotKey)(windows_core::Interface::as_raw(self), core::mem::transmute(dwhotkeyid), core::mem::transmute(pumodifiers), core::mem::transmute(puvkey), core::mem::transmute(phkl)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn SetHotKey(&self, dwhotkeyid: u32, umodifiers: u32, uvkey: u32, hkl: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHotKey)(windows_core::Interface::as_raw(self), core::mem::transmute(dwhotkeyid), core::mem::transmute(umodifiers), core::mem::transmute(uvkey), hkl.param().abi()).ok() + pub unsafe fn SetHotKey(&self, dwhotkeyid: u32, umodifiers: u32, uvkey: u32, hkl: super::KeyboardAndMouse::HKL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHotKey)(windows_core::Interface::as_raw(self), core::mem::transmute(dwhotkeyid), core::mem::transmute(umodifiers), core::mem::transmute(uvkey), core::mem::transmute(hkl)).ok() } - pub unsafe fn CreateSoftKeyboard(&self, utype: u32, howner: P1, x: i32, y: i32) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn CreateSoftKeyboard(&self, utype: u32, howner: super::super::super::Foundation::HWND, x: i32, y: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSoftKeyboard)(windows_core::Interface::as_raw(self), core::mem::transmute(utype), howner.param().abi(), core::mem::transmute(x), core::mem::transmute(y), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateSoftKeyboard)(windows_core::Interface::as_raw(self), core::mem::transmute(utype), core::mem::transmute(howner), core::mem::transmute(x), core::mem::transmute(y), &mut result__).map(|| result__) } - pub unsafe fn DestroySoftKeyboard(&self, hsoftkbdwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DestroySoftKeyboard)(windows_core::Interface::as_raw(self), hsoftkbdwnd.param().abi()).ok() + pub unsafe fn DestroySoftKeyboard(&self, hsoftkbdwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DestroySoftKeyboard)(windows_core::Interface::as_raw(self), core::mem::transmute(hsoftkbdwnd)).ok() } - pub unsafe fn ShowSoftKeyboard(&self, hsoftkbdwnd: P0, ncmdshow: i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowSoftKeyboard)(windows_core::Interface::as_raw(self), hsoftkbdwnd.param().abi(), core::mem::transmute(ncmdshow)).ok() + pub unsafe fn ShowSoftKeyboard(&self, hsoftkbdwnd: super::super::super::Foundation::HWND, ncmdshow: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowSoftKeyboard)(windows_core::Interface::as_raw(self), core::mem::transmute(hsoftkbdwnd), core::mem::transmute(ncmdshow)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetCodePageA(&self, hkl: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetCodePageA(&self, hkl: super::KeyboardAndMouse::HKL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCodePageA)(windows_core::Interface::as_raw(self), hkl.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetCodePageA)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetLangId(&self, hkl: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetLangId(&self, hkl: super::KeyboardAndMouse::HKL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetLangId)(windows_core::Interface::as_raw(self), hkl.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetLangId)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), &mut result__).map(|| result__) } pub unsafe fn KeybdEvent(&self, lgidime: u16, bvk: u8, bscan: u8, dwflags: u32, dwextrainfo: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).KeybdEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(lgidime), core::mem::transmute(bvk), core::mem::transmute(bscan), core::mem::transmute(dwflags), core::mem::transmute(dwextrainfo)).ok() @@ -3030,69 +2406,39 @@ impl IActiveIMMIME { pub unsafe fn UnlockModal(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnlockModal)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn AssociateContextEx(&self, hwnd: P0, himc: P1, dwflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AssociateContextEx)(windows_core::Interface::as_raw(self), hwnd.param().abi(), himc.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn AssociateContextEx(&self, hwnd: super::super::super::Foundation::HWND, himc: HIMC, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AssociateContextEx)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(himc), core::mem::transmute(dwflags)).ok() } pub unsafe fn DisableIME(&self, idthread: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DisableIME)(windows_core::Interface::as_raw(self), core::mem::transmute(idthread)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetImeMenuItemsA(&self, himc: P0, dwflags: u32, dwtype: u32, pimeparentmenu: *const IMEMENUITEMINFOA, pimemenu: *mut IMEMENUITEMINFOA, dwsize: u32, pdwresult: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetImeMenuItemsA)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwtype), core::mem::transmute(pimeparentmenu), core::mem::transmute(pimemenu), core::mem::transmute(dwsize), core::mem::transmute(pdwresult)).ok() + pub unsafe fn GetImeMenuItemsA(&self, himc: HIMC, dwflags: u32, dwtype: u32, pimeparentmenu: *const IMEMENUITEMINFOA, pimemenu: *mut IMEMENUITEMINFOA, dwsize: u32, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetImeMenuItemsA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwflags), core::mem::transmute(dwtype), core::mem::transmute(pimeparentmenu), core::mem::transmute(pimemenu), core::mem::transmute(dwsize), core::mem::transmute(pdwresult)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetImeMenuItemsW(&self, himc: P0, dwflags: u32, dwtype: u32, pimeparentmenu: *const IMEMENUITEMINFOW, pimemenu: *mut IMEMENUITEMINFOW, dwsize: u32, pdwresult: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetImeMenuItemsW)(windows_core::Interface::as_raw(self), himc.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwtype), core::mem::transmute(pimeparentmenu), core::mem::transmute(pimemenu), core::mem::transmute(dwsize), core::mem::transmute(pdwresult)).ok() + pub unsafe fn GetImeMenuItemsW(&self, himc: HIMC, dwflags: u32, dwtype: u32, pimeparentmenu: *const IMEMENUITEMINFOW, pimemenu: *mut IMEMENUITEMINFOW, dwsize: u32, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetImeMenuItemsW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwflags), core::mem::transmute(dwtype), core::mem::transmute(pimeparentmenu), core::mem::transmute(pimemenu), core::mem::transmute(dwsize), core::mem::transmute(pdwresult)).ok() } pub unsafe fn EnumInputContext(&self, idthread: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumInputContext)(windows_core::Interface::as_raw(self), core::mem::transmute(idthread), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RequestMessageA(&self, himc: P0, wparam: P1, lparam: P2) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn RequestMessageA(&self, himc: HIMC, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RequestMessageA)(windows_core::Interface::as_raw(self), himc.param().abi(), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RequestMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn RequestMessageW(&self, himc: P0, wparam: P1, lparam: P2) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn RequestMessageW(&self, himc: HIMC, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RequestMessageW)(windows_core::Interface::as_raw(self), himc.param().abi(), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RequestMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn SendIMCA(&self, hwnd: P0, umsg: u32, wparam: P2, lparam: P3) -> windows_core::Result - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { + pub unsafe fn SendIMCA(&self, hwnd: super::super::super::Foundation::HWND, umsg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).SendIMCA)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).SendIMCA)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn SendIMCW(&self, hwnd: P0, umsg: u32, wparam: P2, lparam: P3) -> windows_core::Result - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { + pub unsafe fn SendIMCW(&self, hwnd: super::super::super::Foundation::HWND, umsg: u32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).SendIMCW)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).SendIMCW)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } pub unsafe fn IsSleeping(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsSleeping)(windows_core::Interface::as_raw(self)).ok() @@ -4536,11 +3882,8 @@ impl IFEDictionary { pub unsafe fn GetHeader(&self, pchdictpath: Option<&mut [u8; 260]>, pshf: *mut IMESHF, pjfmt: *mut IMEFMT, pultype: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetHeader)(windows_core::Interface::as_raw(self), core::mem::transmute(pchdictpath.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pshf), core::mem::transmute(pjfmt), core::mem::transmute(pultype)).ok() } - pub unsafe fn DisplayProperty(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DisplayProperty)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn DisplayProperty(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DisplayProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } pub unsafe fn GetPosTable(&self, prgpostbl: *mut *mut POSTBL, pcpostbl: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPosTable)(windows_core::Interface::as_raw(self), core::mem::transmute(prgpostbl), core::mem::transmute(pcpostbl)).ok() @@ -4830,13 +4173,11 @@ pub const IGIMII_TOOLS: u32 = 8u32; windows_core::imp::define_interface!(IImePad, IImePad_Vtbl, 0x5d8e643a_c3a9_11d1_afef_00805f0c8b6d); windows_core::imp::interface_hierarchy!(IImePad, windows_core::IUnknown); impl IImePad { - pub unsafe fn Request(&self, piimepadapplet: P0, reqid: IME_PAD_REQUEST_FLAGS, wparam: P2, lparam: P3) -> windows_core::Result<()> + pub unsafe fn Request(&self, piimepadapplet: P0, reqid: IME_PAD_REQUEST_FLAGS, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), piimepadapplet.param().abi(), reqid.0 as _, wparam.param().abi(), lparam.param().abi()).ok() + (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), piimepadapplet.param().abi(), reqid.0 as _, core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } } #[repr(C)] @@ -4876,19 +4217,14 @@ impl IImePadApplet { pub unsafe fn GetAppletConfig(&self, lpappletcfg: *mut IMEAPPLETCFG) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAppletConfig)(windows_core::Interface::as_raw(self), core::mem::transmute(lpappletcfg)).ok() } - pub unsafe fn CreateUI(&self, hwndparent: P0, lpimeappletui: *mut IMEAPPLETUI) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateUI)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(lpimeappletui)).ok() + pub unsafe fn CreateUI(&self, hwndparent: super::super::super::Foundation::HWND, lpimeappletui: *mut IMEAPPLETUI) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateUI)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(lpimeappletui)).ok() } - pub unsafe fn Notify(&self, lpimepad: P0, notify: i32, wparam: P2, lparam: P3) -> windows_core::Result<()> + pub unsafe fn Notify(&self, lpimepad: P0, notify: i32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), lpimepad.param().abi(), core::mem::transmute(notify), wparam.param().abi(), lparam.param().abi()).ok() + (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), lpimepad.param().abi(), core::mem::transmute(notify), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs index 22906466f7..c84ce1e65f 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn ActivateKeyboardLayout(hkl: P0, flags: ACTIVATE_KEYBOARD_LAYOUT_FLAGS) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn ActivateKeyboardLayout(hkl: HKL, flags: ACTIVATE_KEYBOARD_LAYOUT_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn ActivateKeyboardLayout(hkl : HKL, flags : ACTIVATE_KEYBOARD_LAYOUT_FLAGS) -> HKL); - let result__ = ActivateKeyboardLayout(hkl.param().abi(), core::mem::transmute(flags)); + let result__ = ActivateKeyboardLayout(core::mem::transmute(hkl), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -16,21 +13,17 @@ where BlockInput(fblockit.param().abi()).ok() } #[inline] -pub unsafe fn DragDetect(hwnd: P0, pt: super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DragDetect(hwnd: super::super::super::Foundation::HWND, pt: super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DragDetect(hwnd : super::super::super::Foundation:: HWND, pt : super::super::super::Foundation:: POINT) -> super::super::super::Foundation:: BOOL); - DragDetect(hwnd.param().abi(), core::mem::transmute(pt)) + DragDetect(core::mem::transmute(hwnd), core::mem::transmute(pt)) } #[inline] -pub unsafe fn EnableWindow(hwnd: P0, benable: P1) -> super::super::super::Foundation::BOOL +pub unsafe fn EnableWindow(hwnd: super::super::super::Foundation::HWND, benable: P1) -> super::super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn EnableWindow(hwnd : super::super::super::Foundation:: HWND, benable : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - EnableWindow(hwnd.param().abi(), benable.param().abi()) + EnableWindow(core::mem::transmute(hwnd), benable.param().abi()) } #[inline] pub unsafe fn GetActiveWindow() -> super::super::super::Foundation::HWND { @@ -118,12 +111,9 @@ pub unsafe fn GetMouseMovePointsEx(cbsize: u32, lppt: *const MOUSEMOVEPOINT, lpp GetMouseMovePointsEx(core::mem::transmute(cbsize), core::mem::transmute(lppt), core::mem::transmute(lpptbuf.as_ptr()), lpptbuf.len().try_into().unwrap(), core::mem::transmute(resolution)) } #[inline] -pub unsafe fn IsWindowEnabled(hwnd: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsWindowEnabled(hwnd: super::super::super::Foundation::HWND) -> super::super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsWindowEnabled(hwnd : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: BOOL); - IsWindowEnabled(hwnd.param().abi()) + IsWindowEnabled(core::mem::transmute(hwnd)) } #[inline] pub unsafe fn LoadKeyboardLayoutA(pwszklid: P0, flags: ACTIVATE_KEYBOARD_LAYOUT_FLAGS) -> windows_core::Result @@ -149,20 +139,14 @@ pub unsafe fn MapVirtualKeyA(ucode: u32, umaptype: MAP_VIRTUAL_KEY_TYPE) -> u32 MapVirtualKeyA(core::mem::transmute(ucode), core::mem::transmute(umaptype)) } #[inline] -pub unsafe fn MapVirtualKeyExA(ucode: u32, umaptype: MAP_VIRTUAL_KEY_TYPE, dwhkl: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn MapVirtualKeyExA(ucode: u32, umaptype: MAP_VIRTUAL_KEY_TYPE, dwhkl: Option) -> u32 { windows_targets::link!("user32.dll" "system" fn MapVirtualKeyExA(ucode : u32, umaptype : MAP_VIRTUAL_KEY_TYPE, dwhkl : HKL) -> u32); - MapVirtualKeyExA(core::mem::transmute(ucode), core::mem::transmute(umaptype), dwhkl.param().abi()) + MapVirtualKeyExA(core::mem::transmute(ucode), core::mem::transmute(umaptype), core::mem::transmute(dwhkl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MapVirtualKeyExW(ucode: u32, umaptype: MAP_VIRTUAL_KEY_TYPE, dwhkl: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn MapVirtualKeyExW(ucode: u32, umaptype: MAP_VIRTUAL_KEY_TYPE, dwhkl: Option) -> u32 { windows_targets::link!("user32.dll" "system" fn MapVirtualKeyExW(ucode : u32, umaptype : MAP_VIRTUAL_KEY_TYPE, dwhkl : HKL) -> u32); - MapVirtualKeyExW(core::mem::transmute(ucode), core::mem::transmute(umaptype), dwhkl.param().abi()) + MapVirtualKeyExW(core::mem::transmute(ucode), core::mem::transmute(umaptype), core::mem::transmute(dwhkl.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn MapVirtualKeyW(ucode: u32, umaptype: MAP_VIRTUAL_KEY_TYPE) -> u32 { @@ -175,12 +159,9 @@ pub unsafe fn OemKeyScan(woemchar: u16) -> u32 { OemKeyScan(core::mem::transmute(woemchar)) } #[inline] -pub unsafe fn RegisterHotKey(hwnd: P0, id: i32, fsmodifiers: HOT_KEY_MODIFIERS, vk: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterHotKey(hwnd: Option, id: i32, fsmodifiers: HOT_KEY_MODIFIERS, vk: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn RegisterHotKey(hwnd : super::super::super::Foundation:: HWND, id : i32, fsmodifiers : HOT_KEY_MODIFIERS, vk : u32) -> super::super::super::Foundation:: BOOL); - RegisterHotKey(hwnd.param().abi(), core::mem::transmute(id), core::mem::transmute(fsmodifiers), core::mem::transmute(vk)).ok() + RegisterHotKey(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id), core::mem::transmute(fsmodifiers), core::mem::transmute(vk)).ok() } #[inline] pub unsafe fn ReleaseCapture() -> windows_core::Result<()> { @@ -193,21 +174,15 @@ pub unsafe fn SendInput(pinputs: &[INPUT], cbsize: i32) -> u32 { SendInput(pinputs.len().try_into().unwrap(), core::mem::transmute(pinputs.as_ptr()), core::mem::transmute(cbsize)) } #[inline] -pub unsafe fn SetActiveWindow(hwnd: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn SetActiveWindow(hwnd: super::super::super::Foundation::HWND) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn SetActiveWindow(hwnd : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: HWND); - let result__ = SetActiveWindow(hwnd.param().abi()); + let result__ = SetActiveWindow(core::mem::transmute(hwnd)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetCapture(hwnd: P0) -> super::super::super::Foundation::HWND -where - P0: windows_core::Param, -{ +pub unsafe fn SetCapture(hwnd: super::super::super::Foundation::HWND) -> super::super::super::Foundation::HWND { windows_targets::link!("user32.dll" "system" fn SetCapture(hwnd : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: HWND); - SetCapture(hwnd.param().abi()) + SetCapture(core::mem::transmute(hwnd)) } #[inline] pub unsafe fn SetDoubleClickTime(param0: u32) -> windows_core::Result<()> { @@ -215,12 +190,9 @@ pub unsafe fn SetDoubleClickTime(param0: u32) -> windows_core::Result<()> { SetDoubleClickTime(core::mem::transmute(param0)).ok() } #[inline] -pub unsafe fn SetFocus(hwnd: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn SetFocus(hwnd: Option) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn SetFocus(hwnd : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: HWND); - let result__ = SetFocus(hwnd.param().abi()); + let result__ = SetFocus(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -242,12 +214,9 @@ pub unsafe fn ToAscii(uvirtkey: u32, uscancode: u32, lpkeystate: Option<&[u8; 25 ToAscii(core::mem::transmute(uvirtkey), core::mem::transmute(uscancode), core::mem::transmute(lpkeystate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpchar), core::mem::transmute(uflags)) } #[inline] -pub unsafe fn ToAsciiEx(uvirtkey: u32, uscancode: u32, lpkeystate: Option<&[u8; 256]>, lpchar: *mut u16, uflags: u32, dwhkl: P5) -> i32 -where - P5: windows_core::Param, -{ +pub unsafe fn ToAsciiEx(uvirtkey: u32, uscancode: u32, lpkeystate: Option<&[u8; 256]>, lpchar: *mut u16, uflags: u32, dwhkl: Option) -> i32 { windows_targets::link!("user32.dll" "system" fn ToAsciiEx(uvirtkey : u32, uscancode : u32, lpkeystate : *const u8, lpchar : *mut u16, uflags : u32, dwhkl : HKL) -> i32); - ToAsciiEx(core::mem::transmute(uvirtkey), core::mem::transmute(uscancode), core::mem::transmute(lpkeystate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpchar), core::mem::transmute(uflags), dwhkl.param().abi()) + ToAsciiEx(core::mem::transmute(uvirtkey), core::mem::transmute(uscancode), core::mem::transmute(lpkeystate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpchar), core::mem::transmute(uflags), core::mem::transmute(dwhkl.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ToUnicode(wvirtkey: u32, wscancode: u32, lpkeystate: Option<&[u8; 256]>, pwszbuff: &mut [u16], wflags: u32) -> i32 { @@ -255,12 +224,9 @@ pub unsafe fn ToUnicode(wvirtkey: u32, wscancode: u32, lpkeystate: Option<&[u8; ToUnicode(core::mem::transmute(wvirtkey), core::mem::transmute(wscancode), core::mem::transmute(lpkeystate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len().try_into().unwrap(), core::mem::transmute(wflags)) } #[inline] -pub unsafe fn ToUnicodeEx(wvirtkey: u32, wscancode: u32, lpkeystate: &[u8; 256], pwszbuff: &mut [u16], wflags: u32, dwhkl: P6) -> i32 -where - P6: windows_core::Param, -{ +pub unsafe fn ToUnicodeEx(wvirtkey: u32, wscancode: u32, lpkeystate: &[u8; 256], pwszbuff: &mut [u16], wflags: u32, dwhkl: Option) -> i32 { windows_targets::link!("user32.dll" "system" fn ToUnicodeEx(wvirtkey : u32, wscancode : u32, lpkeystate : *const u8, pwszbuff : windows_core::PWSTR, cchbuff : i32, wflags : u32, dwhkl : HKL) -> i32); - ToUnicodeEx(core::mem::transmute(wvirtkey), core::mem::transmute(wscancode), core::mem::transmute(lpkeystate.as_ptr()), core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len().try_into().unwrap(), core::mem::transmute(wflags), dwhkl.param().abi()) + ToUnicodeEx(core::mem::transmute(wvirtkey), core::mem::transmute(wscancode), core::mem::transmute(lpkeystate.as_ptr()), core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len().try_into().unwrap(), core::mem::transmute(wflags), core::mem::transmute(dwhkl.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn TrackMouseEvent(lpeventtrack: *mut TRACKMOUSEEVENT) -> windows_core::Result<()> { @@ -268,20 +234,14 @@ pub unsafe fn TrackMouseEvent(lpeventtrack: *mut TRACKMOUSEEVENT) -> windows_cor TrackMouseEvent(core::mem::transmute(lpeventtrack)).ok() } #[inline] -pub unsafe fn UnloadKeyboardLayout(hkl: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnloadKeyboardLayout(hkl: HKL) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UnloadKeyboardLayout(hkl : HKL) -> super::super::super::Foundation:: BOOL); - UnloadKeyboardLayout(hkl.param().abi()).ok() + UnloadKeyboardLayout(core::mem::transmute(hkl)).ok() } #[inline] -pub unsafe fn UnregisterHotKey(hwnd: P0, id: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterHotKey(hwnd: Option, id: i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UnregisterHotKey(hwnd : super::super::super::Foundation:: HWND, id : i32) -> super::super::super::Foundation:: BOOL); - UnregisterHotKey(hwnd.param().abi(), core::mem::transmute(id)).ok() + UnregisterHotKey(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(id)).ok() } #[inline] pub unsafe fn VkKeyScanA(ch: i8) -> i16 { @@ -289,20 +249,14 @@ pub unsafe fn VkKeyScanA(ch: i8) -> i16 { VkKeyScanA(core::mem::transmute(ch)) } #[inline] -pub unsafe fn VkKeyScanExA(ch: i8, dwhkl: P1) -> i16 -where - P1: windows_core::Param, -{ +pub unsafe fn VkKeyScanExA(ch: i8, dwhkl: HKL) -> i16 { windows_targets::link!("user32.dll" "system" fn VkKeyScanExA(ch : i8, dwhkl : HKL) -> i16); - VkKeyScanExA(core::mem::transmute(ch), dwhkl.param().abi()) + VkKeyScanExA(core::mem::transmute(ch), core::mem::transmute(dwhkl)) } #[inline] -pub unsafe fn VkKeyScanExW(ch: u16, dwhkl: P1) -> i16 -where - P1: windows_core::Param, -{ +pub unsafe fn VkKeyScanExW(ch: u16, dwhkl: HKL) -> i16 { windows_targets::link!("user32.dll" "system" fn VkKeyScanExW(ch : u16, dwhkl : HKL) -> i16); - VkKeyScanExW(core::mem::transmute(ch), dwhkl.param().abi()) + VkKeyScanExW(core::mem::transmute(ch), core::mem::transmute(dwhkl)) } #[inline] pub unsafe fn VkKeyScanW(ch: u16) -> i16 { 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 453a4e8614..a657fb3782 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 @@ -13,80 +13,68 @@ pub unsafe fn GetPointerCursorId(pointerid: u32, cursorid: *mut u32) -> windows_ } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn GetPointerDevice(device: P0, pointerdevice: *mut super::super::Controls::POINTER_DEVICE_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetPointerDevice(device: super::super::super::Foundation::HANDLE, pointerdevice: *mut super::super::Controls::POINTER_DEVICE_INFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetPointerDevice(device : super::super::super::Foundation:: HANDLE, pointerdevice : *mut super::super::Controls:: POINTER_DEVICE_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerDevice(device.param().abi(), core::mem::transmute(pointerdevice)).ok() + GetPointerDevice(core::mem::transmute(device), core::mem::transmute(pointerdevice)).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn GetPointerDeviceCursors(device: P0, cursorcount: *mut u32, devicecursors: Option<*mut super::super::Controls::POINTER_DEVICE_CURSOR_INFO>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetPointerDeviceCursors(device: super::super::super::Foundation::HANDLE, cursorcount: *mut u32, devicecursors: Option<*mut super::super::Controls::POINTER_DEVICE_CURSOR_INFO>) -> windows_core::Result<()> { 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(), core::mem::transmute(cursorcount), core::mem::transmute(devicecursors.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerDeviceCursors(core::mem::transmute(device), core::mem::transmute(cursorcount), core::mem::transmute(devicecursors.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn GetPointerDeviceProperties(device: P0, propertycount: *mut u32, pointerproperties: Option<*mut super::super::Controls::POINTER_DEVICE_PROPERTY>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetPointerDeviceProperties(device: super::super::super::Foundation::HANDLE, propertycount: *mut u32, pointerproperties: Option<*mut super::super::Controls::POINTER_DEVICE_PROPERTY>) -> windows_core::Result<()> { 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(), core::mem::transmute(propertycount), core::mem::transmute(pointerproperties.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerDeviceProperties(core::mem::transmute(device), core::mem::transmute(propertycount), core::mem::transmute(pointerproperties.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetPointerDeviceRects(device: super::super::super::Foundation::HANDLE, pointerdevicerect: *mut super::super::super::Foundation::RECT, displayrect: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetPointerDeviceRects(device : super::super::super::Foundation:: HANDLE, pointerdevicerect : *mut super::super::super::Foundation:: RECT, displayrect : *mut super::super::super::Foundation:: RECT) -> super::super::super::Foundation:: BOOL); - GetPointerDeviceRects(device.param().abi(), core::mem::transmute(pointerdevicerect), core::mem::transmute(displayrect)).ok() + GetPointerDeviceRects(core::mem::transmute(device), core::mem::transmute(pointerdevicerect), core::mem::transmute(displayrect)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] #[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(core::mem::transmute(devicecount), core::mem::transmute(pointerdevices.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerDevices(core::mem::transmute(devicecount), core::mem::transmute(pointerdevices.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pointerid), core::mem::transmute(pointercount), core::mem::transmute(pointerinfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerFrameInfo(core::mem::transmute(pointerid), core::mem::transmute(pointercount), core::mem::transmute(pointerinfo.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(pointerinfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerFrameInfoHistory(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(pointerinfo.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pointerid), core::mem::transmute(pointercount), core::mem::transmute(peninfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerFramePenInfo(core::mem::transmute(pointerid), core::mem::transmute(pointercount), core::mem::transmute(peninfo.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(peninfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerFramePenInfoHistory(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(peninfo.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pointerid), core::mem::transmute(pointercount), core::mem::transmute(touchinfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerFrameTouchInfo(core::mem::transmute(pointerid), core::mem::transmute(pointercount), core::mem::transmute(touchinfo.unwrap_or(core::mem::zeroed()))).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(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(touchinfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerFrameTouchInfoHistory(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(touchinfo.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -98,7 +86,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(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(pointerinfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerInfoHistory(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(pointerinfo.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn GetPointerInputTransform(pointerid: u32, inputtransform: &mut [INPUT_TRANSFORM]) -> windows_core::Result<()> { @@ -115,7 +103,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(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(peninfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerPenInfoHistory(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(peninfo.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -127,7 +115,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(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(touchinfo.unwrap_or(core::ptr::null_mut()))).ok() + GetPointerTouchInfoHistory(core::mem::transmute(pointerid), core::mem::transmute(entriescount), core::mem::transmute(touchinfo.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -153,12 +141,9 @@ pub unsafe fn InitializeTouchInjection(maxcount: u32, dwmode: TOUCH_FEEDBACK_MOD } #[cfg(all(feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn InjectSyntheticPointerInput(device: P0, pointerinfo: &[super::super::Controls::POINTER_TYPE_INFO]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn InjectSyntheticPointerInput(device: super::super::Controls::HSYNTHETICPOINTERDEVICE, pointerinfo: &[super::super::Controls::POINTER_TYPE_INFO]) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn InjectSyntheticPointerInput(device : super::super::Controls:: HSYNTHETICPOINTERDEVICE, pointerinfo : *const super::super::Controls:: POINTER_TYPE_INFO, count : u32) -> super::super::super::Foundation:: BOOL); - InjectSyntheticPointerInput(device.param().abi(), core::mem::transmute(pointerinfo.as_ptr()), pointerinfo.len().try_into().unwrap()).ok() + InjectSyntheticPointerInput(core::mem::transmute(device), core::mem::transmute(pointerinfo.as_ptr()), pointerinfo.len().try_into().unwrap()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Radial/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Radial/mod.rs index 09a068892e..61ace66b8f 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Radial/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Radial/mod.rs @@ -1,13 +1,12 @@ windows_core::imp::define_interface!(IRadialControllerConfigurationInterop, IRadialControllerConfigurationInterop_Vtbl, 0x787cdaac_3186_476d_87e4_b9374a7b9970); windows_core::imp::interface_hierarchy!(IRadialControllerConfigurationInterop, windows_core::IUnknown, windows_core::IInspectable); impl IRadialControllerConfigurationInterop { - pub unsafe fn GetForWindow(&self, hwnd: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -37,13 +36,12 @@ impl windows_core::RuntimeName for IRadialControllerConfigurationInterop {} windows_core::imp::define_interface!(IRadialControllerIndependentInputSourceInterop, IRadialControllerIndependentInputSourceInterop_Vtbl, 0x3d577eff_4cee_11e6_b535_001bdc06ab3b); windows_core::imp::interface_hierarchy!(IRadialControllerIndependentInputSourceInterop, windows_core::IUnknown, windows_core::IInspectable); impl IRadialControllerIndependentInputSourceInterop { - pub unsafe fn CreateForWindow(&self, hwnd: P0) -> windows_core::Result + pub unsafe fn CreateForWindow(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateForWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -73,13 +71,12 @@ impl windows_core::RuntimeName for IRadialControllerIndependentInputSourceIntero windows_core::imp::define_interface!(IRadialControllerInterop, IRadialControllerInterop_Vtbl, 0x1b0535c9_57ad_45c1_9d79_ad5c34360513); windows_core::imp::interface_hierarchy!(IRadialControllerInterop, windows_core::IUnknown, windows_core::IInspectable); impl IRadialControllerInterop { - pub unsafe fn CreateForWindow(&self, hwnd: P0) -> windows_core::Result + pub unsafe fn CreateForWindow(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateForWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] 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 4c34da0311..ea36e63354 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs @@ -1,82 +1,52 @@ #[inline] -pub unsafe fn CloseGestureInfoHandle(hgestureinfo: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseGestureInfoHandle(hgestureinfo: HGESTUREINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CloseGestureInfoHandle(hgestureinfo : HGESTUREINFO) -> super::super::super::Foundation:: BOOL); - CloseGestureInfoHandle(hgestureinfo.param().abi()).ok() + CloseGestureInfoHandle(core::mem::transmute(hgestureinfo)).ok() } #[inline] -pub unsafe fn CloseTouchInputHandle(htouchinput: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseTouchInputHandle(htouchinput: HTOUCHINPUT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CloseTouchInputHandle(htouchinput : HTOUCHINPUT) -> super::super::super::Foundation:: BOOL); - CloseTouchInputHandle(htouchinput.param().abi()).ok() + CloseTouchInputHandle(core::mem::transmute(htouchinput)).ok() } #[inline] -pub unsafe fn GetGestureConfig(hwnd: P0, dwreserved: u32, dwflags: u32, pcids: *const u32, pgestureconfig: *mut GESTURECONFIG, cbsize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetGestureConfig(hwnd: super::super::super::Foundation::HWND, dwreserved: u32, dwflags: u32, pcids: *const u32, pgestureconfig: *mut GESTURECONFIG, cbsize: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetGestureConfig(hwnd : super::super::super::Foundation:: HWND, dwreserved : u32, dwflags : u32, pcids : *const u32, pgestureconfig : *mut GESTURECONFIG, cbsize : u32) -> super::super::super::Foundation:: BOOL); - GetGestureConfig(hwnd.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(dwflags), core::mem::transmute(pcids), core::mem::transmute(pgestureconfig), core::mem::transmute(cbsize)).ok() + GetGestureConfig(core::mem::transmute(hwnd), core::mem::transmute(dwreserved), core::mem::transmute(dwflags), core::mem::transmute(pcids), core::mem::transmute(pgestureconfig), core::mem::transmute(cbsize)).ok() } #[inline] -pub unsafe fn GetGestureExtraArgs(hgestureinfo: P0, pextraargs: &mut [u8]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetGestureExtraArgs(hgestureinfo: HGESTUREINFO, pextraargs: &mut [u8]) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetGestureExtraArgs(hgestureinfo : HGESTUREINFO, cbextraargs : u32, pextraargs : *mut u8) -> super::super::super::Foundation:: BOOL); - GetGestureExtraArgs(hgestureinfo.param().abi(), pextraargs.len().try_into().unwrap(), core::mem::transmute(pextraargs.as_ptr())).ok() + GetGestureExtraArgs(core::mem::transmute(hgestureinfo), pextraargs.len().try_into().unwrap(), core::mem::transmute(pextraargs.as_ptr())).ok() } #[inline] -pub unsafe fn GetGestureInfo(hgestureinfo: P0, pgestureinfo: *mut GESTUREINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetGestureInfo(hgestureinfo: HGESTUREINFO, pgestureinfo: *mut GESTUREINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetGestureInfo(hgestureinfo : HGESTUREINFO, pgestureinfo : *mut GESTUREINFO) -> super::super::super::Foundation:: BOOL); - GetGestureInfo(hgestureinfo.param().abi(), core::mem::transmute(pgestureinfo)).ok() + GetGestureInfo(core::mem::transmute(hgestureinfo), core::mem::transmute(pgestureinfo)).ok() } #[inline] -pub unsafe fn GetTouchInputInfo(htouchinput: P0, pinputs: &mut [TOUCHINPUT], cbsize: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetTouchInputInfo(htouchinput: HTOUCHINPUT, pinputs: &mut [TOUCHINPUT], cbsize: i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetTouchInputInfo(htouchinput : HTOUCHINPUT, cinputs : u32, pinputs : *mut TOUCHINPUT, cbsize : i32) -> super::super::super::Foundation:: BOOL); - GetTouchInputInfo(htouchinput.param().abi(), pinputs.len().try_into().unwrap(), core::mem::transmute(pinputs.as_ptr()), core::mem::transmute(cbsize)).ok() + GetTouchInputInfo(core::mem::transmute(htouchinput), pinputs.len().try_into().unwrap(), core::mem::transmute(pinputs.as_ptr()), core::mem::transmute(cbsize)).ok() } #[inline] -pub unsafe fn IsTouchWindow(hwnd: P0, pulflags: Option<*mut u32>) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsTouchWindow(hwnd: super::super::super::Foundation::HWND, pulflags: Option<*mut u32>) -> super::super::super::Foundation::BOOL { 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(core::ptr::null_mut()))) + IsTouchWindow(core::mem::transmute(hwnd), core::mem::transmute(pulflags.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RegisterTouchWindow(hwnd: P0, ulflags: REGISTER_TOUCH_WINDOW_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterTouchWindow(hwnd: super::super::super::Foundation::HWND, ulflags: REGISTER_TOUCH_WINDOW_FLAGS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn RegisterTouchWindow(hwnd : super::super::super::Foundation:: HWND, ulflags : REGISTER_TOUCH_WINDOW_FLAGS) -> super::super::super::Foundation:: BOOL); - RegisterTouchWindow(hwnd.param().abi(), core::mem::transmute(ulflags)).ok() + RegisterTouchWindow(core::mem::transmute(hwnd), core::mem::transmute(ulflags)).ok() } #[inline] -pub unsafe fn SetGestureConfig(hwnd: P0, dwreserved: u32, pgestureconfig: &[GESTURECONFIG], cbsize: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetGestureConfig(hwnd: super::super::super::Foundation::HWND, dwreserved: u32, pgestureconfig: &[GESTURECONFIG], cbsize: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetGestureConfig(hwnd : super::super::super::Foundation:: HWND, dwreserved : u32, cids : u32, pgestureconfig : *const GESTURECONFIG, cbsize : u32) -> super::super::super::Foundation:: BOOL); - SetGestureConfig(hwnd.param().abi(), core::mem::transmute(dwreserved), pgestureconfig.len().try_into().unwrap(), core::mem::transmute(pgestureconfig.as_ptr()), core::mem::transmute(cbsize)).ok() + SetGestureConfig(core::mem::transmute(hwnd), core::mem::transmute(dwreserved), pgestureconfig.len().try_into().unwrap(), core::mem::transmute(pgestureconfig.as_ptr()), core::mem::transmute(cbsize)).ok() } #[inline] -pub unsafe fn UnregisterTouchWindow(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterTouchWindow(hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UnregisterTouchWindow(hwnd : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: BOOL); - UnregisterTouchWindow(hwnd.param().abi()).ok() + UnregisterTouchWindow(core::mem::transmute(hwnd)).ok() } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] 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 9d3045a9a9..454c40d3c7 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 @@ -7,9 +7,9 @@ where XInputEnable(enable.param().abi()) } #[inline] -pub unsafe fn XInputGetAudioDeviceIds(dwuserindex: u32, prenderdeviceid: windows_core::PWSTR, prendercount: Option<*mut u32>, pcapturedeviceid: windows_core::PWSTR, pcapturecount: Option<*mut u32>) -> u32 { +pub unsafe fn XInputGetAudioDeviceIds(dwuserindex: u32, prenderdeviceid: Option, prendercount: Option<*mut u32>, pcapturedeviceid: Option, 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(core::mem::transmute(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()))) + XInputGetAudioDeviceIds(core::mem::transmute(dwuserindex), core::mem::transmute(prenderdeviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(prendercount.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcapturedeviceid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcapturecount.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn XInputGetBatteryInformation(dwuserindex: u32, devtype: BATTERY_DEVTYPE, pbatteryinformation: *mut XINPUT_BATTERY_INFORMATION) -> u32 { @@ -22,9 +22,9 @@ pub unsafe fn XInputGetCapabilities(dwuserindex: u32, dwflags: XINPUT_FLAG, pcap XInputGetCapabilities(core::mem::transmute(dwuserindex), core::mem::transmute(dwflags), core::mem::transmute(pcapabilities)) } #[inline] -pub unsafe fn XInputGetKeystroke(dwuserindex: u32, dwreserved: u32, pkeystroke: *mut XINPUT_KEYSTROKE) -> u32 { +pub unsafe fn XInputGetKeystroke(dwuserindex: u32, dwreserved: Option, pkeystroke: *mut XINPUT_KEYSTROKE) -> u32 { windows_targets::link!("xinput1_4.dll" "system" fn XInputGetKeystroke(dwuserindex : u32, dwreserved : u32, pkeystroke : *mut XINPUT_KEYSTROKE) -> u32); - XInputGetKeystroke(core::mem::transmute(dwuserindex), core::mem::transmute(dwreserved), core::mem::transmute(pkeystroke)) + XInputGetKeystroke(core::mem::transmute(dwuserindex), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pkeystroke)) } #[inline] pub unsafe fn XInputGetState(dwuserindex: u32, pstate: *mut XINPUT_STATE) -> 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 2fec12e8f4..3ce67216c4 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs @@ -30,41 +30,32 @@ 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(core::ptr::null_mut())), core::mem::transmute(pcbsize), core::mem::transmute(cbsizeheader)) + GetRawInputBuffer(core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetRawInputData(hrawinput: HRAWINPUT, uicommand: RAW_INPUT_DATA_COMMAND_FLAGS, pdata: Option<*mut core::ffi::c_void>, pcbsize: *mut u32, cbsizeheader: u32) -> u32 { 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(), core::mem::transmute(uicommand), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbsize), core::mem::transmute(cbsizeheader)) + GetRawInputData(core::mem::transmute(hrawinput), core::mem::transmute(uicommand), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsize), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetRawInputDeviceInfoA(hdevice: Option, uicommand: RAW_INPUT_DEVICE_INFO_COMMAND, pdata: Option<*mut core::ffi::c_void>, pcbsize: *mut u32) -> u32 { 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(), core::mem::transmute(uicommand), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbsize)) + GetRawInputDeviceInfoA(core::mem::transmute(hdevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(uicommand), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn GetRawInputDeviceInfoW(hdevice: Option, uicommand: RAW_INPUT_DEVICE_INFO_COMMAND, pdata: Option<*mut core::ffi::c_void>, pcbsize: *mut u32) -> u32 { 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(), core::mem::transmute(uicommand), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbsize)) + GetRawInputDeviceInfoW(core::mem::transmute(hdevice.unwrap_or(core::mem::zeroed())), core::mem::transmute(uicommand), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(puinumdevices), core::mem::transmute(cbsize)) + GetRawInputDeviceList(core::mem::transmute(prawinputdevicelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(puinumdevices), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(puinumdevices), core::mem::transmute(cbsize)) + GetRegisteredRawInputDevices(core::mem::transmute(prawinputdevices.unwrap_or(core::mem::zeroed())), core::mem::transmute(puinumdevices), core::mem::transmute(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 3637ae6409..694154b229 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs @@ -1,19 +1,13 @@ #[inline] -pub unsafe fn AddPointerInteractionContext(interactioncontext: P0, pointerid: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AddPointerInteractionContext(interactioncontext: HINTERACTIONCONTEXT, pointerid: u32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn AddPointerInteractionContext(interactioncontext : HINTERACTIONCONTEXT, pointerid : u32) -> windows_core::HRESULT); - AddPointerInteractionContext(interactioncontext.param().abi(), core::mem::transmute(pointerid)).ok() + AddPointerInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(pointerid)).ok() } #[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn BufferPointerPacketsInteractionContext(interactioncontext: P0, pointerinfo: &[super::Input::Pointer::POINTER_INFO]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BufferPointerPacketsInteractionContext(interactioncontext: HINTERACTIONCONTEXT, pointerinfo: &[super::Input::Pointer::POINTER_INFO]) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn BufferPointerPacketsInteractionContext(interactioncontext : HINTERACTIONCONTEXT, entriescount : u32, pointerinfo : *const super::Input::Pointer:: POINTER_INFO) -> windows_core::HRESULT); - BufferPointerPacketsInteractionContext(interactioncontext.param().abi(), pointerinfo.len().try_into().unwrap(), core::mem::transmute(pointerinfo.as_ptr())).ok() + BufferPointerPacketsInteractionContext(core::mem::transmute(interactioncontext), pointerinfo.len().try_into().unwrap(), core::mem::transmute(pointerinfo.as_ptr())).ok() } #[inline] pub unsafe fn CreateInteractionContext() -> windows_core::Result { @@ -22,232 +16,151 @@ pub unsafe fn CreateInteractionContext() -> windows_core::Result(interactioncontext: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyInteractionContext(interactioncontext: HINTERACTIONCONTEXT) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn DestroyInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_core::HRESULT); - DestroyInteractionContext(interactioncontext.param().abi()).ok() + DestroyInteractionContext(core::mem::transmute(interactioncontext)).ok() } #[inline] -pub unsafe fn GetCrossSlideParameterInteractionContext(interactioncontext: P0, threshold: CROSS_SLIDE_THRESHOLD) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetCrossSlideParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, threshold: CROSS_SLIDE_THRESHOLD) -> windows_core::Result { windows_targets::link!("ninput.dll" "system" fn GetCrossSlideParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, threshold : CROSS_SLIDE_THRESHOLD, distance : *mut f32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetCrossSlideParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(threshold), &mut result__).map(|| core::mem::transmute(result__)) + GetCrossSlideParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(threshold), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetHoldParameterInteractionContext(interactioncontext: P0, parameter: HOLD_PARAMETER) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetHoldParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, parameter: HOLD_PARAMETER) -> windows_core::Result { windows_targets::link!("ninput.dll" "system" fn GetHoldParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : HOLD_PARAMETER, value : *mut f32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetHoldParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(parameter), &mut result__).map(|| core::mem::transmute(result__)) + GetHoldParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(parameter), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetInertiaParameterInteractionContext(interactioncontext: P0, inertiaparameter: INERTIA_PARAMETER) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetInertiaParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, inertiaparameter: INERTIA_PARAMETER) -> windows_core::Result { windows_targets::link!("ninput.dll" "system" fn GetInertiaParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, inertiaparameter : INERTIA_PARAMETER, value : *mut f32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetInertiaParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(inertiaparameter), &mut result__).map(|| core::mem::transmute(result__)) + GetInertiaParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(inertiaparameter), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetInteractionConfigurationInteractionContext(interactioncontext: P0, configuration: &mut [INTERACTION_CONTEXT_CONFIGURATION]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetInteractionConfigurationInteractionContext(interactioncontext: HINTERACTIONCONTEXT, configuration: &mut [INTERACTION_CONTEXT_CONFIGURATION]) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn GetInteractionConfigurationInteractionContext(interactioncontext : HINTERACTIONCONTEXT, configurationcount : u32, configuration : *mut INTERACTION_CONTEXT_CONFIGURATION) -> windows_core::HRESULT); - GetInteractionConfigurationInteractionContext(interactioncontext.param().abi(), configuration.len().try_into().unwrap(), core::mem::transmute(configuration.as_ptr())).ok() + GetInteractionConfigurationInteractionContext(core::mem::transmute(interactioncontext), configuration.len().try_into().unwrap(), core::mem::transmute(configuration.as_ptr())).ok() } #[inline] -pub unsafe fn GetMouseWheelParameterInteractionContext(interactioncontext: P0, parameter: MOUSE_WHEEL_PARAMETER) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetMouseWheelParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, parameter: MOUSE_WHEEL_PARAMETER) -> windows_core::Result { windows_targets::link!("ninput.dll" "system" fn GetMouseWheelParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : MOUSE_WHEEL_PARAMETER, value : *mut f32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetMouseWheelParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(parameter), &mut result__).map(|| core::mem::transmute(result__)) + GetMouseWheelParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(parameter), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetPropertyInteractionContext(interactioncontext: P0, contextproperty: INTERACTION_CONTEXT_PROPERTY) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetPropertyInteractionContext(interactioncontext: HINTERACTIONCONTEXT, contextproperty: INTERACTION_CONTEXT_PROPERTY) -> windows_core::Result { windows_targets::link!("ninput.dll" "system" fn GetPropertyInteractionContext(interactioncontext : HINTERACTIONCONTEXT, contextproperty : INTERACTION_CONTEXT_PROPERTY, value : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetPropertyInteractionContext(interactioncontext.param().abi(), core::mem::transmute(contextproperty), &mut result__).map(|| core::mem::transmute(result__)) + GetPropertyInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(contextproperty), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetStateInteractionContext(interactioncontext: P0, pointerinfo: Option<*const super::Input::Pointer::POINTER_INFO>) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetStateInteractionContext(interactioncontext: HINTERACTIONCONTEXT, pointerinfo: Option<*const super::Input::Pointer::POINTER_INFO>) -> windows_core::Result { 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(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + GetStateInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(pointerinfo.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetTapParameterInteractionContext(interactioncontext: P0, parameter: TAP_PARAMETER) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetTapParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, parameter: TAP_PARAMETER) -> windows_core::Result { windows_targets::link!("ninput.dll" "system" fn GetTapParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : TAP_PARAMETER, value : *mut f32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetTapParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(parameter), &mut result__).map(|| core::mem::transmute(result__)) + GetTapParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(parameter), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetTranslationParameterInteractionContext(interactioncontext: P0, parameter: TRANSLATION_PARAMETER) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetTranslationParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, parameter: TRANSLATION_PARAMETER) -> windows_core::Result { windows_targets::link!("ninput.dll" "system" fn GetTranslationParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : TRANSLATION_PARAMETER, value : *mut f32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetTranslationParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(parameter), &mut result__).map(|| core::mem::transmute(result__)) + GetTranslationParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(parameter), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn ProcessBufferedPacketsInteractionContext(interactioncontext: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ProcessBufferedPacketsInteractionContext(interactioncontext: HINTERACTIONCONTEXT) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn ProcessBufferedPacketsInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_core::HRESULT); - ProcessBufferedPacketsInteractionContext(interactioncontext.param().abi()).ok() + ProcessBufferedPacketsInteractionContext(core::mem::transmute(interactioncontext)).ok() } #[inline] -pub unsafe fn ProcessInertiaInteractionContext(interactioncontext: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ProcessInertiaInteractionContext(interactioncontext: HINTERACTIONCONTEXT) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn ProcessInertiaInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_core::HRESULT); - ProcessInertiaInteractionContext(interactioncontext.param().abi()).ok() + ProcessInertiaInteractionContext(core::mem::transmute(interactioncontext)).ok() } #[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn ProcessPointerFramesInteractionContext(interactioncontext: P0, entriescount: u32, pointercount: u32, pointerinfo: *const super::Input::Pointer::POINTER_INFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ProcessPointerFramesInteractionContext(interactioncontext: HINTERACTIONCONTEXT, entriescount: u32, pointercount: u32, pointerinfo: *const super::Input::Pointer::POINTER_INFO) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn ProcessPointerFramesInteractionContext(interactioncontext : HINTERACTIONCONTEXT, entriescount : u32, pointercount : u32, pointerinfo : *const super::Input::Pointer:: POINTER_INFO) -> windows_core::HRESULT); - ProcessPointerFramesInteractionContext(interactioncontext.param().abi(), core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(pointerinfo)).ok() + ProcessPointerFramesInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(entriescount), core::mem::transmute(pointercount), core::mem::transmute(pointerinfo)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn RegisterOutputCallbackInteractionContext(interactioncontext: P0, outputcallback: INTERACTION_CONTEXT_OUTPUT_CALLBACK, clientdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterOutputCallbackInteractionContext(interactioncontext: HINTERACTIONCONTEXT, outputcallback: INTERACTION_CONTEXT_OUTPUT_CALLBACK, clientdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(outputcallback), core::mem::transmute(clientdata.unwrap_or(core::ptr::null()))).ok() + RegisterOutputCallbackInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(outputcallback), core::mem::transmute(clientdata.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn RegisterOutputCallbackInteractionContext2(interactioncontext: P0, outputcallback: INTERACTION_CONTEXT_OUTPUT_CALLBACK2, clientdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterOutputCallbackInteractionContext2(interactioncontext: HINTERACTIONCONTEXT, outputcallback: INTERACTION_CONTEXT_OUTPUT_CALLBACK2, clientdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { 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(), core::mem::transmute(outputcallback), core::mem::transmute(clientdata.unwrap_or(core::ptr::null()))).ok() + RegisterOutputCallbackInteractionContext2(core::mem::transmute(interactioncontext), core::mem::transmute(outputcallback), core::mem::transmute(clientdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RemovePointerInteractionContext(interactioncontext: P0, pointerid: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RemovePointerInteractionContext(interactioncontext: HINTERACTIONCONTEXT, pointerid: u32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn RemovePointerInteractionContext(interactioncontext : HINTERACTIONCONTEXT, pointerid : u32) -> windows_core::HRESULT); - RemovePointerInteractionContext(interactioncontext.param().abi(), core::mem::transmute(pointerid)).ok() + RemovePointerInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(pointerid)).ok() } #[inline] -pub unsafe fn ResetInteractionContext(interactioncontext: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ResetInteractionContext(interactioncontext: HINTERACTIONCONTEXT) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn ResetInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_core::HRESULT); - ResetInteractionContext(interactioncontext.param().abi()).ok() + ResetInteractionContext(core::mem::transmute(interactioncontext)).ok() } #[inline] -pub unsafe fn SetCrossSlideParametersInteractionContext(interactioncontext: P0, crossslideparameters: &[CROSS_SLIDE_PARAMETER]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetCrossSlideParametersInteractionContext(interactioncontext: HINTERACTIONCONTEXT, crossslideparameters: &[CROSS_SLIDE_PARAMETER]) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetCrossSlideParametersInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parametercount : u32, crossslideparameters : *const CROSS_SLIDE_PARAMETER) -> windows_core::HRESULT); - SetCrossSlideParametersInteractionContext(interactioncontext.param().abi(), crossslideparameters.len().try_into().unwrap(), core::mem::transmute(crossslideparameters.as_ptr())).ok() + SetCrossSlideParametersInteractionContext(core::mem::transmute(interactioncontext), crossslideparameters.len().try_into().unwrap(), core::mem::transmute(crossslideparameters.as_ptr())).ok() } #[inline] -pub unsafe fn SetHoldParameterInteractionContext(interactioncontext: P0, parameter: HOLD_PARAMETER, value: f32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetHoldParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, parameter: HOLD_PARAMETER, value: f32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetHoldParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : HOLD_PARAMETER, value : f32) -> windows_core::HRESULT); - SetHoldParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(parameter), core::mem::transmute(value)).ok() + SetHoldParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(parameter), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn SetInertiaParameterInteractionContext(interactioncontext: P0, inertiaparameter: INERTIA_PARAMETER, value: f32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetInertiaParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, inertiaparameter: INERTIA_PARAMETER, value: f32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetInertiaParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, inertiaparameter : INERTIA_PARAMETER, value : f32) -> windows_core::HRESULT); - SetInertiaParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(inertiaparameter), core::mem::transmute(value)).ok() + SetInertiaParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(inertiaparameter), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn SetInteractionConfigurationInteractionContext(interactioncontext: P0, configuration: &[INTERACTION_CONTEXT_CONFIGURATION]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetInteractionConfigurationInteractionContext(interactioncontext: HINTERACTIONCONTEXT, configuration: &[INTERACTION_CONTEXT_CONFIGURATION]) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetInteractionConfigurationInteractionContext(interactioncontext : HINTERACTIONCONTEXT, configurationcount : u32, configuration : *const INTERACTION_CONTEXT_CONFIGURATION) -> windows_core::HRESULT); - SetInteractionConfigurationInteractionContext(interactioncontext.param().abi(), configuration.len().try_into().unwrap(), core::mem::transmute(configuration.as_ptr())).ok() + SetInteractionConfigurationInteractionContext(core::mem::transmute(interactioncontext), configuration.len().try_into().unwrap(), core::mem::transmute(configuration.as_ptr())).ok() } #[inline] -pub unsafe fn SetMouseWheelParameterInteractionContext(interactioncontext: P0, parameter: MOUSE_WHEEL_PARAMETER, value: f32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetMouseWheelParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, parameter: MOUSE_WHEEL_PARAMETER, value: f32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetMouseWheelParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : MOUSE_WHEEL_PARAMETER, value : f32) -> windows_core::HRESULT); - SetMouseWheelParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(parameter), core::mem::transmute(value)).ok() + SetMouseWheelParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(parameter), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn SetPivotInteractionContext(interactioncontext: P0, x: f32, y: f32, radius: f32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetPivotInteractionContext(interactioncontext: HINTERACTIONCONTEXT, x: f32, y: f32, radius: f32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetPivotInteractionContext(interactioncontext : HINTERACTIONCONTEXT, x : f32, y : f32, radius : f32) -> windows_core::HRESULT); - SetPivotInteractionContext(interactioncontext.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(radius)).ok() + SetPivotInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(radius)).ok() } #[inline] -pub unsafe fn SetPropertyInteractionContext(interactioncontext: P0, contextproperty: INTERACTION_CONTEXT_PROPERTY, value: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetPropertyInteractionContext(interactioncontext: HINTERACTIONCONTEXT, contextproperty: INTERACTION_CONTEXT_PROPERTY, value: u32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetPropertyInteractionContext(interactioncontext : HINTERACTIONCONTEXT, contextproperty : INTERACTION_CONTEXT_PROPERTY, value : u32) -> windows_core::HRESULT); - SetPropertyInteractionContext(interactioncontext.param().abi(), core::mem::transmute(contextproperty), core::mem::transmute(value)).ok() + SetPropertyInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(contextproperty), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn SetTapParameterInteractionContext(interactioncontext: P0, parameter: TAP_PARAMETER, value: f32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetTapParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, parameter: TAP_PARAMETER, value: f32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetTapParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : TAP_PARAMETER, value : f32) -> windows_core::HRESULT); - SetTapParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(parameter), core::mem::transmute(value)).ok() + SetTapParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(parameter), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn SetTranslationParameterInteractionContext(interactioncontext: P0, parameter: TRANSLATION_PARAMETER, value: f32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetTranslationParameterInteractionContext(interactioncontext: HINTERACTIONCONTEXT, parameter: TRANSLATION_PARAMETER, value: f32) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn SetTranslationParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : TRANSLATION_PARAMETER, value : f32) -> windows_core::HRESULT); - SetTranslationParameterInteractionContext(interactioncontext.param().abi(), core::mem::transmute(parameter), core::mem::transmute(value)).ok() + SetTranslationParameterInteractionContext(core::mem::transmute(interactioncontext), core::mem::transmute(parameter), core::mem::transmute(value)).ok() } #[inline] -pub unsafe fn StopInteractionContext(interactioncontext: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn StopInteractionContext(interactioncontext: HINTERACTIONCONTEXT) -> windows_core::Result<()> { windows_targets::link!("ninput.dll" "system" fn StopInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_core::HRESULT); - StopInteractionContext(interactioncontext.param().abi()).ok() + StopInteractionContext(core::mem::transmute(interactioncontext)).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] 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 90abb55940..273fa0797e 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs @@ -189,12 +189,11 @@ windows_core::imp::define_interface!(IEmptyVolumeCache, IEmptyVolumeCache_Vtbl, windows_core::imp::interface_hierarchy!(IEmptyVolumeCache, windows_core::IUnknown); impl IEmptyVolumeCache { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn Initialize(&self, hkregkey: P0, pcwszvolume: P1, ppwszdisplayname: *mut windows_core::PWSTR, ppwszdescription: *mut windows_core::PWSTR, pdwflags: *mut EMPTY_VOLUME_CACHE_FLAGS) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, hkregkey: super::super::System::Registry::HKEY, pcwszvolume: P1, ppwszdisplayname: *mut windows_core::PWSTR, ppwszdescription: *mut windows_core::PWSTR, pdwflags: *mut EMPTY_VOLUME_CACHE_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hkregkey.param().abi(), pcwszvolume.param().abi(), core::mem::transmute(ppwszdisplayname), core::mem::transmute(ppwszdescription), core::mem::transmute(pdwflags)).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hkregkey), pcwszvolume.param().abi(), core::mem::transmute(ppwszdisplayname), core::mem::transmute(ppwszdescription), core::mem::transmute(pdwflags)).ok() } pub unsafe fn GetSpaceUsed(&self, pdwlspaceused: *mut u64, picb: P1) -> windows_core::Result<()> where @@ -208,11 +207,8 @@ impl IEmptyVolumeCache { { (windows_core::Interface::vtable(self).Purge)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlspacetofree), picb.param().abi()).ok() } - pub unsafe fn ShowProperties(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowProperties)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn ShowProperties(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } pub unsafe fn Deactivate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -293,13 +289,12 @@ impl core::ops::Deref for IEmptyVolumeCache2 { windows_core::imp::interface_hierarchy!(IEmptyVolumeCache2, windows_core::IUnknown, IEmptyVolumeCache); impl IEmptyVolumeCache2 { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn InitializeEx(&self, hkregkey: P0, pcwszvolume: P1, pcwszkeyname: P2, ppwszdisplayname: *mut windows_core::PWSTR, ppwszdescription: *mut windows_core::PWSTR, ppwszbtntext: *mut windows_core::PWSTR, pdwflags: *mut EMPTY_VOLUME_CACHE_FLAGS) -> windows_core::Result<()> + pub unsafe fn InitializeEx(&self, hkregkey: super::super::System::Registry::HKEY, pcwszvolume: P1, pcwszkeyname: P2, ppwszdisplayname: *mut windows_core::PWSTR, ppwszdescription: *mut windows_core::PWSTR, ppwszbtntext: *mut windows_core::PWSTR, pdwflags: *mut EMPTY_VOLUME_CACHE_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeEx)(windows_core::Interface::as_raw(self), hkregkey.param().abi(), pcwszvolume.param().abi(), pcwszkeyname.param().abi(), core::mem::transmute(ppwszdisplayname), core::mem::transmute(ppwszdescription), core::mem::transmute(ppwszbtntext), core::mem::transmute(pdwflags)).ok() + (windows_core::Interface::vtable(self).InitializeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(hkregkey), pcwszvolume.param().abi(), pcwszkeyname.param().abi(), core::mem::transmute(ppwszdisplayname), core::mem::transmute(ppwszdescription), core::mem::transmute(ppwszbtntext), core::mem::transmute(pdwflags)).ok() } } #[repr(C)] @@ -380,14 +375,12 @@ windows_core::imp::define_interface!(IReconcilableObject, IReconcilableObject_Vt windows_core::imp::interface_hierarchy!(IReconcilableObject, windows_core::IUnknown); impl IReconcilableObject { #[cfg(feature = "Win32_System_Com_StructuredStorage")] - pub unsafe fn Reconcile(&self, pinitiator: P0, dwflags: u32, hwndowner: P2, hwndprogressfeedback: P3, rgpmkotherinput: &mut [Option], ploutindex: *mut i32, pstgnewresidues: P7, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> + pub unsafe fn Reconcile(&self, pinitiator: P0, dwflags: u32, hwndowner: super::super::Foundation::HWND, hwndprogressfeedback: super::super::Foundation::HWND, rgpmkotherinput: &mut [Option], ploutindex: *mut i32, pstgnewresidues: P7, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).Reconcile)(windows_core::Interface::as_raw(self), pinitiator.param().abi(), core::mem::transmute(dwflags), hwndowner.param().abi(), hwndprogressfeedback.param().abi(), rgpmkotherinput.len().try_into().unwrap(), core::mem::transmute(rgpmkotherinput.as_ptr()), core::mem::transmute(ploutindex), pstgnewresidues.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Reconcile)(windows_core::Interface::as_raw(self), pinitiator.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(hwndowner), core::mem::transmute(hwndprogressfeedback), rgpmkotherinput.len().try_into().unwrap(), core::mem::transmute(rgpmkotherinput.as_ptr()), core::mem::transmute(ploutindex), pstgnewresidues.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))).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/Magnification/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs index e9109ef7f7..25b0341e06 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn MagGetColorEffect(hwnd: P0, peffect: *mut MAGCOLOREFFECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagGetColorEffect(hwnd: super::super::Foundation::HWND, peffect: *mut MAGCOLOREFFECT) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagGetColorEffect(hwnd : super::super::Foundation:: HWND, peffect : *mut MAGCOLOREFFECT) -> super::super::Foundation:: BOOL); - MagGetColorEffect(hwnd.param().abi(), core::mem::transmute(peffect)) + MagGetColorEffect(core::mem::transmute(hwnd), core::mem::transmute(peffect)) } #[inline] pub unsafe fn MagGetFullscreenColorEffect(peffect: *mut MAGCOLOREFFECT) -> super::super::Foundation::BOOL { @@ -18,12 +15,9 @@ pub unsafe fn MagGetFullscreenTransform(pmaglevel: *mut f32, pxoffset: *mut i32, } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn MagGetImageScalingCallback(hwnd: P0) -> MagImageScalingCallback -where - P0: windows_core::Param, -{ +pub unsafe fn MagGetImageScalingCallback(hwnd: super::super::Foundation::HWND) -> MagImageScalingCallback { windows_targets::link!("magnification.dll" "system" fn MagGetImageScalingCallback(hwnd : super::super::Foundation:: HWND) -> MagImageScalingCallback); - MagGetImageScalingCallback(hwnd.param().abi()) + MagGetImageScalingCallback(core::mem::transmute(hwnd)) } #[inline] pub unsafe fn MagGetInputTransform(pfenabled: *mut super::super::Foundation::BOOL, prectsource: *mut super::super::Foundation::RECT, prectdest: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -31,28 +25,19 @@ pub unsafe fn MagGetInputTransform(pfenabled: *mut super::super::Foundation::BOO MagGetInputTransform(core::mem::transmute(pfenabled), core::mem::transmute(prectsource), core::mem::transmute(prectdest)) } #[inline] -pub unsafe fn MagGetWindowFilterList(hwnd: P0, pdwfiltermode: *mut MW_FILTERMODE, count: i32, phwnd: *mut super::super::Foundation::HWND) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn MagGetWindowFilterList(hwnd: super::super::Foundation::HWND, pdwfiltermode: *mut MW_FILTERMODE, count: i32, phwnd: *mut super::super::Foundation::HWND) -> i32 { windows_targets::link!("magnification.dll" "system" fn MagGetWindowFilterList(hwnd : super::super::Foundation:: HWND, pdwfiltermode : *mut MW_FILTERMODE, count : i32, phwnd : *mut super::super::Foundation:: HWND) -> i32); - MagGetWindowFilterList(hwnd.param().abi(), core::mem::transmute(pdwfiltermode), core::mem::transmute(count), core::mem::transmute(phwnd)) + MagGetWindowFilterList(core::mem::transmute(hwnd), core::mem::transmute(pdwfiltermode), core::mem::transmute(count), core::mem::transmute(phwnd)) } #[inline] -pub unsafe fn MagGetWindowSource(hwnd: P0, prect: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagGetWindowSource(hwnd: super::super::Foundation::HWND, prect: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagGetWindowSource(hwnd : super::super::Foundation:: HWND, prect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - MagGetWindowSource(hwnd.param().abi(), core::mem::transmute(prect)) + MagGetWindowSource(core::mem::transmute(hwnd), core::mem::transmute(prect)) } #[inline] -pub unsafe fn MagGetWindowTransform(hwnd: P0, ptransform: *mut MAGTRANSFORM) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagGetWindowTransform(hwnd: super::super::Foundation::HWND, ptransform: *mut MAGTRANSFORM) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagGetWindowTransform(hwnd : super::super::Foundation:: HWND, ptransform : *mut MAGTRANSFORM) -> super::super::Foundation:: BOOL); - MagGetWindowTransform(hwnd.param().abi(), core::mem::transmute(ptransform)) + MagGetWindowTransform(core::mem::transmute(hwnd), core::mem::transmute(ptransform)) } #[inline] pub unsafe fn MagInitialize() -> super::super::Foundation::BOOL { @@ -60,12 +45,9 @@ pub unsafe fn MagInitialize() -> super::super::Foundation::BOOL { MagInitialize() } #[inline] -pub unsafe fn MagSetColorEffect(hwnd: P0, peffect: *mut MAGCOLOREFFECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagSetColorEffect(hwnd: super::super::Foundation::HWND, peffect: *mut MAGCOLOREFFECT) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagSetColorEffect(hwnd : super::super::Foundation:: HWND, peffect : *mut MAGCOLOREFFECT) -> super::super::Foundation:: BOOL); - MagSetColorEffect(hwnd.param().abi(), core::mem::transmute(peffect)) + MagSetColorEffect(core::mem::transmute(hwnd), core::mem::transmute(peffect)) } #[inline] pub unsafe fn MagSetFullscreenColorEffect(peffect: *const MAGCOLOREFFECT) -> super::super::Foundation::BOOL { @@ -79,12 +61,9 @@ pub unsafe fn MagSetFullscreenTransform(maglevel: f32, xoffset: i32, yoffset: i3 } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn MagSetImageScalingCallback(hwnd: P0, callback: MagImageScalingCallback) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagSetImageScalingCallback(hwnd: super::super::Foundation::HWND, callback: MagImageScalingCallback) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagSetImageScalingCallback(hwnd : super::super::Foundation:: HWND, callback : MagImageScalingCallback) -> super::super::Foundation:: BOOL); - MagSetImageScalingCallback(hwnd.param().abi(), core::mem::transmute(callback)) + MagSetImageScalingCallback(core::mem::transmute(hwnd), core::mem::transmute(callback)) } #[inline] pub unsafe fn MagSetInputTransform(fenabled: P0, prectsource: *const super::super::Foundation::RECT, prectdest: *const super::super::Foundation::RECT) -> windows_core::Result<()> @@ -95,28 +74,19 @@ where MagSetInputTransform(fenabled.param().abi(), core::mem::transmute(prectsource), core::mem::transmute(prectdest)).ok() } #[inline] -pub unsafe fn MagSetWindowFilterList(hwnd: P0, dwfiltermode: MW_FILTERMODE, count: i32, phwnd: *mut super::super::Foundation::HWND) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagSetWindowFilterList(hwnd: super::super::Foundation::HWND, dwfiltermode: MW_FILTERMODE, count: i32, phwnd: *mut super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagSetWindowFilterList(hwnd : super::super::Foundation:: HWND, dwfiltermode : MW_FILTERMODE, count : i32, phwnd : *mut super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - MagSetWindowFilterList(hwnd.param().abi(), core::mem::transmute(dwfiltermode), core::mem::transmute(count), core::mem::transmute(phwnd)) + MagSetWindowFilterList(core::mem::transmute(hwnd), core::mem::transmute(dwfiltermode), core::mem::transmute(count), core::mem::transmute(phwnd)) } #[inline] -pub unsafe fn MagSetWindowSource(hwnd: P0, rect: super::super::Foundation::RECT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagSetWindowSource(hwnd: super::super::Foundation::HWND, rect: super::super::Foundation::RECT) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagSetWindowSource(hwnd : super::super::Foundation:: HWND, rect : super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - MagSetWindowSource(hwnd.param().abi(), core::mem::transmute(rect)) + MagSetWindowSource(core::mem::transmute(hwnd), core::mem::transmute(rect)) } #[inline] -pub unsafe fn MagSetWindowTransform(hwnd: P0, ptransform: *mut MAGTRANSFORM) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagSetWindowTransform(hwnd: super::super::Foundation::HWND, ptransform: *mut MAGTRANSFORM) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagSetWindowTransform(hwnd : super::super::Foundation:: HWND, ptransform : *mut MAGTRANSFORM) -> super::super::Foundation:: BOOL); - MagSetWindowTransform(hwnd.param().abi(), core::mem::transmute(ptransform)) + MagSetWindowTransform(core::mem::transmute(hwnd), core::mem::transmute(ptransform)) } #[inline] pub unsafe fn MagShowSystemCursor(fshowcursor: P0) -> super::super::Foundation::BOOL 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 f438b0925d..514bcbe5e2 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs @@ -216,12 +216,12 @@ impl IUICommandHandler { where P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(verb), core::mem::transmute(key.unwrap_or(core::ptr::null())), core::mem::transmute(currentvalue.unwrap_or(core::ptr::null())), commandexecutionproperties.param().abi()).ok() + (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(verb), core::mem::transmute(key.unwrap_or(core::mem::zeroed())), core::mem::transmute(currentvalue.unwrap_or(core::mem::zeroed())), commandexecutionproperties.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn UpdateProperty(&self, commandid: u32, key: *const super::super::Foundation::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), core::mem::transmute(commandid), core::mem::transmute(key), core::mem::transmute(currentvalue.unwrap_or(core::ptr::null())), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).UpdateProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(key), core::mem::transmute(currentvalue.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } } #[repr(C)] @@ -360,22 +360,20 @@ impl windows_core::RuntimeName for IUIEventingManager {} windows_core::imp::define_interface!(IUIFramework, IUIFramework_Vtbl, 0xf4f0385d_6872_43a8_ad09_4c339cb3f5c5); windows_core::imp::interface_hierarchy!(IUIFramework, windows_core::IUnknown); impl IUIFramework { - pub unsafe fn Initialize(&self, framewnd: P0, application: P1) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, framewnd: super::super::Foundation::HWND, application: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), framewnd.param().abi(), application.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(framewnd), application.param().abi()).ok() } pub unsafe fn Destroy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn LoadUI(&self, instance: P0, resourcename: P1) -> windows_core::Result<()> + pub unsafe fn LoadUI(&self, instance: super::super::Foundation::HINSTANCE, resourcename: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).LoadUI)(windows_core::Interface::as_raw(self), instance.param().abi(), resourcename.param().abi()).ok() + (windows_core::Interface::vtable(self).LoadUI)(windows_core::Interface::as_raw(self), core::mem::transmute(instance), resourcename.param().abi()).ok() } pub unsafe fn GetView(&self, viewid: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), core::mem::transmute(viewid), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() @@ -390,7 +388,7 @@ impl IUIFramework { (windows_core::Interface::vtable(self).SetUICommandProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(key), core::mem::transmute(value)).ok() } pub unsafe fn InvalidateUICommand(&self, commandid: u32, flags: UI_INVALIDATIONS, key: Option<*const super::super::Foundation::PROPERTYKEY>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).InvalidateUICommand)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(flags), core::mem::transmute(key.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).InvalidateUICommand)(windows_core::Interface::as_raw(self), core::mem::transmute(commandid), core::mem::transmute(flags), core::mem::transmute(key.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn FlushPendingInvalidations(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FlushPendingInvalidations)(windows_core::Interface::as_raw(self)).ok() @@ -540,12 +538,9 @@ windows_core::imp::define_interface!(IUIImageFromBitmap, IUIImageFromBitmap_Vtbl windows_core::imp::interface_hierarchy!(IUIImageFromBitmap, windows_core::IUnknown); impl IUIImageFromBitmap { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn CreateImage(&self, bitmap: P0, options: UI_OWNERSHIP) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateImage(&self, bitmap: super::super::Graphics::Gdi::HBITMAP, options: UI_OWNERSHIP) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateImage)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(options), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateImage)(windows_core::Interface::as_raw(self), core::mem::transmute(bitmap), core::mem::transmute(options), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] 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 270fdf26df..2d984ac2e5 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 super::super::super::Foundation:: PROPERTYKEY, rgflags : *const PKA_FLAGS, rgpropvar : *const 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(core::ptr::null())), core::mem::transmute(rgflags.unwrap_or(core::ptr::null())), core::mem::transmute(rgpropvar.unwrap_or(core::ptr::null())), core::mem::transmute(cchanges), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() + PSCreatePropertyChangeArray(core::mem::transmute(rgpropkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpropvar.unwrap_or(core::mem::zeroed())), core::mem::transmute(cchanges), core::mem::transmute(riid), core::mem::transmute(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<()> @@ -121,14 +121,13 @@ pub unsafe fn PSGetNameFromPropertyKey(propkey: *const super::super::super::Foun } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn PSGetNamedPropertyFromPropertyStorage(psps: P0, cb: u32, pszname: P2) -> windows_core::Result +pub unsafe fn PSGetNamedPropertyFromPropertyStorage(psps: PCUSERIALIZEDPROPSTORAGE, cb: u32, pszname: P2) -> windows_core::Result where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSGetNamedPropertyFromPropertyStorage(psps : PCUSERIALIZEDPROPSTORAGE, cb : u32, pszname : windows_core::PCWSTR, ppropvar : *mut super::super::super::System::Com::StructuredStorage:: PROPVARIANT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PSGetNamedPropertyFromPropertyStorage(psps.param().abi(), core::mem::transmute(cb), pszname.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + PSGetNamedPropertyFromPropertyStorage(core::mem::transmute(psps), core::mem::transmute(cb), pszname.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn PSGetPropertyDescription(propkey: *const super::super::super::Foundation::PROPERTYKEY, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -153,13 +152,10 @@ where } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn PSGetPropertyFromPropertyStorage(psps: P0, cb: u32, rpkey: *const super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn PSGetPropertyFromPropertyStorage(psps: PCUSERIALIZEDPROPSTORAGE, cb: u32, rpkey: *const super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result { windows_targets::link!("propsys.dll" "system" fn PSGetPropertyFromPropertyStorage(psps : PCUSERIALIZEDPROPSTORAGE, cb : u32, rpkey : *const super::super::super::Foundation:: PROPERTYKEY, ppropvar : *mut super::super::super::System::Com::StructuredStorage:: PROPVARIANT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PSGetPropertyFromPropertyStorage(psps.param().abi(), core::mem::transmute(cb), core::mem::transmute(rpkey), &mut result__).map(|| core::mem::transmute(result__)) + PSGetPropertyFromPropertyStorage(core::mem::transmute(psps), core::mem::transmute(cb), core::mem::transmute(rpkey), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn PSGetPropertyKeyFromName(pszname: P0, ppropkey: *mut super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> @@ -586,21 +582,17 @@ where PSUnregisterPropertySchema(pszpath.param().abi()).ok() } #[inline] -pub unsafe fn PifMgr_CloseProperties(hprops: P0, flopt: u32) -> super::super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn PifMgr_CloseProperties(hprops: Option, flopt: u32) -> super::super::super::Foundation::HANDLE { windows_targets::link!("shell32.dll" "system" fn PifMgr_CloseProperties(hprops : super::super::super::Foundation:: HANDLE, flopt : u32) -> super::super::super::Foundation:: HANDLE); - PifMgr_CloseProperties(hprops.param().abi(), core::mem::transmute(flopt)) + PifMgr_CloseProperties(core::mem::transmute(hprops.unwrap_or(core::mem::zeroed())), core::mem::transmute(flopt)) } #[inline] -pub unsafe fn PifMgr_GetProperties(hprops: P0, pszgroup: P1, lpprops: Option<*mut core::ffi::c_void>, cbprops: i32, flopt: u32) -> i32 +pub unsafe fn PifMgr_GetProperties(hprops: Option, pszgroup: P1, lpprops: Option<*mut core::ffi::c_void>, cbprops: i32, flopt: u32) -> i32 where - P0: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(cbprops), core::mem::transmute(flopt)) + PifMgr_GetProperties(core::mem::transmute(hprops.unwrap_or(core::mem::zeroed())), pszgroup.param().abi(), core::mem::transmute(lpprops.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbprops), core::mem::transmute(flopt)) } #[inline] pub unsafe fn PifMgr_OpenProperties(pszapp: P0, pszpif: P1, hinf: u32, flopt: u32) -> super::super::super::Foundation::HANDLE @@ -612,13 +604,12 @@ where PifMgr_OpenProperties(pszapp.param().abi(), pszpif.param().abi(), core::mem::transmute(hinf), core::mem::transmute(flopt)) } #[inline] -pub unsafe fn PifMgr_SetProperties(hprops: P0, pszgroup: P1, lpprops: *const core::ffi::c_void, cbprops: i32, flopt: u32) -> i32 +pub unsafe fn PifMgr_SetProperties(hprops: Option, pszgroup: P1, lpprops: *const core::ffi::c_void, cbprops: i32, flopt: u32) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn PifMgr_SetProperties(hprops : super::super::super::Foundation:: HANDLE, pszgroup : windows_core::PCSTR, lpprops : *const core::ffi::c_void, cbprops : i32, flopt : u32) -> i32); - PifMgr_SetProperties(hprops.param().abi(), pszgroup.param().abi(), core::mem::transmute(lpprops), core::mem::transmute(cbprops), core::mem::transmute(flopt)) + PifMgr_SetProperties(core::mem::transmute(hprops.unwrap_or(core::mem::zeroed())), pszgroup.param().abi(), core::mem::transmute(lpprops), core::mem::transmute(cbprops), core::mem::transmute(flopt)) } #[inline] pub unsafe fn SHAddDefaultPropertiesByExt(pszext: P0, ppropstore: P1) -> windows_core::Result<()> @@ -630,14 +621,13 @@ where SHAddDefaultPropertiesByExt(pszext.param().abi(), ppropstore.param().abi()).ok() } #[inline] -pub unsafe fn SHGetPropertyStoreForWindow(hwnd: P0) -> windows_core::Result +pub unsafe fn SHGetPropertyStoreForWindow(hwnd: super::super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { windows_targets::link!("shell32.dll" "system" fn SHGetPropertyStoreForWindow(hwnd : super::super::super::Foundation:: HWND, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHGetPropertyStoreForWindow(hwnd.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHGetPropertyStoreForWindow(core::mem::transmute(hwnd), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -664,7 +654,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(), core::mem::transmute(fmtid), core::mem::transmute(pclsid.unwrap_or(core::ptr::null())), core::mem::transmute(grfflags), core::mem::transmute(grfmode), core::mem::transmute(dwdisposition), core::mem::transmute(ppstg), core::mem::transmute(pucodepage.unwrap_or(core::ptr::null_mut()))).ok() + SHPropStgCreate(psstg.param().abi(), core::mem::transmute(fmtid), core::mem::transmute(pclsid.unwrap_or(core::mem::zeroed())), core::mem::transmute(grfflags), core::mem::transmute(grfmode), core::mem::transmute(dwdisposition), core::mem::transmute(ppstg), core::mem::transmute(pucodepage.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -683,7 +673,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 super::super::super::System::Com::StructuredStorage:: PROPVARIANT, propidnamefirst : u32) -> windows_core::HRESULT); - SHPropStgWriteMultiple(pps.param().abi(), core::mem::transmute(pucodepage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cpspec), core::mem::transmute(rgpspec), core::mem::transmute(rgvar), core::mem::transmute(propidnamefirst)).ok() + SHPropStgWriteMultiple(pps.param().abi(), core::mem::transmute(pucodepage.unwrap_or(core::mem::zeroed())), core::mem::transmute(cpspec), core::mem::transmute(rgpspec), core::mem::transmute(rgvar), core::mem::transmute(propidnamefirst)).ok() } pub const FPSPS_DEFAULT: _PERSIST_SPROPSTORE_FLAGS = _PERSIST_SPROPSTORE_FLAGS(0i32); pub const FPSPS_READONLY: _PERSIST_SPROPSTORE_FLAGS = _PERSIST_SPROPSTORE_FLAGS(1i32); @@ -1025,11 +1015,8 @@ impl IPersistSerializedPropStorage { pub unsafe fn SetFlags(&self, flags: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(flags)).ok() } - pub unsafe fn SetPropertyStorage(&self, psps: P0, cb: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPropertyStorage)(windows_core::Interface::as_raw(self), psps.param().abi(), core::mem::transmute(cb)).ok() + pub unsafe fn SetPropertyStorage(&self, psps: PCUSERIALIZEDPROPSTORAGE, cb: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPropertyStorage)(windows_core::Interface::as_raw(self), core::mem::transmute(psps), core::mem::transmute(cb)).ok() } pub unsafe fn GetPropertyStorage(&self, ppsps: *mut *mut SERIALIZEDPROPSTORAGE, pcb: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPropertyStorage)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsps), core::mem::transmute(pcb)).ok() 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 b7899063f2..31fb42de6e 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 super::super::Foundation:: PROPERTYKEY, pv : *mut super::super::System::Variant:: VARIANT, pffoundpropkey : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - AssocGetDetailsOfPropKey(psf.param().abi(), core::mem::transmute(pidl), core::mem::transmute(pkey), core::mem::transmute(pv), core::mem::transmute(pffoundpropkey.unwrap_or(core::ptr::null_mut()))).ok() + AssocGetDetailsOfPropKey(psf.param().abi(), core::mem::transmute(pidl), core::mem::transmute(pkey), core::mem::transmute(pv), core::mem::transmute(pffoundpropkey.unwrap_or(core::mem::zeroed()))).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(), core::mem::transmute(ptype), core::mem::transmute(pflag), core::mem::transmute(ppsztype.unwrap_or(core::ptr::null_mut()))).ok() + AssocGetPerceivedType(pszext.param().abi(), core::mem::transmute(ptype), core::mem::transmute(pflag), core::mem::transmute(ppsztype.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AssocIsDangerous(pszassoc: P0) -> super::super::Foundation::BOOL @@ -70,53 +70,61 @@ where AssocQueryKeyW(core::mem::transmute(flags), core::mem::transmute(key), pszassoc.param().abi(), pszextra.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn AssocQueryStringA(flags: ASSOCF, str: ASSOCSTR, pszassoc: P2, pszextra: P3, pszout: windows_core::PSTR, pcchout: *mut u32) -> windows_core::HRESULT +pub unsafe fn AssocQueryStringA(flags: ASSOCF, str: ASSOCSTR, pszassoc: P2, pszextra: P3, pszout: Option, pcchout: *mut u32) -> windows_core::HRESULT where P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn AssocQueryStringA(flags : ASSOCF, str : ASSOCSTR, pszassoc : windows_core::PCSTR, pszextra : windows_core::PCSTR, pszout : windows_core::PSTR, pcchout : *mut u32) -> windows_core::HRESULT); - AssocQueryStringA(core::mem::transmute(flags), core::mem::transmute(str), pszassoc.param().abi(), pszextra.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout)) + AssocQueryStringA(core::mem::transmute(flags), core::mem::transmute(str), pszassoc.param().abi(), pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn AssocQueryStringByKeyA(flags: ASSOCF, str: ASSOCSTR, hkassoc: P2, pszextra: P3, pszout: windows_core::PSTR, pcchout: *mut u32) -> windows_core::HRESULT +pub unsafe fn AssocQueryStringByKeyA(flags: ASSOCF, str: ASSOCSTR, hkassoc: super::super::System::Registry::HKEY, pszextra: P3, pszout: Option, pcchout: *mut u32) -> windows_core::HRESULT where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn AssocQueryStringByKeyA(flags : ASSOCF, str : ASSOCSTR, hkassoc : super::super::System::Registry:: HKEY, pszextra : windows_core::PCSTR, pszout : windows_core::PSTR, pcchout : *mut u32) -> windows_core::HRESULT); - AssocQueryStringByKeyA(core::mem::transmute(flags), core::mem::transmute(str), hkassoc.param().abi(), pszextra.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout)) + AssocQueryStringByKeyA(core::mem::transmute(flags), core::mem::transmute(str), core::mem::transmute(hkassoc), pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn AssocQueryStringByKeyW(flags: ASSOCF, str: ASSOCSTR, hkassoc: P2, pszextra: P3, pszout: windows_core::PWSTR, pcchout: *mut u32) -> windows_core::HRESULT +pub unsafe fn AssocQueryStringByKeyW(flags: ASSOCF, str: ASSOCSTR, hkassoc: super::super::System::Registry::HKEY, pszextra: P3, pszout: Option, pcchout: *mut u32) -> windows_core::HRESULT where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn AssocQueryStringByKeyW(flags : ASSOCF, str : ASSOCSTR, hkassoc : super::super::System::Registry:: HKEY, pszextra : windows_core::PCWSTR, pszout : windows_core::PWSTR, pcchout : *mut u32) -> windows_core::HRESULT); - AssocQueryStringByKeyW(core::mem::transmute(flags), core::mem::transmute(str), hkassoc.param().abi(), pszextra.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout)) + AssocQueryStringByKeyW(core::mem::transmute(flags), core::mem::transmute(str), core::mem::transmute(hkassoc), pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)) } #[inline] -pub unsafe fn AssocQueryStringW(flags: ASSOCF, str: ASSOCSTR, pszassoc: P2, pszextra: P3, pszout: windows_core::PWSTR, pcchout: *mut u32) -> windows_core::HRESULT +pub unsafe fn AssocQueryStringW(flags: ASSOCF, str: ASSOCSTR, pszassoc: P2, pszextra: P3, pszout: Option, pcchout: *mut u32) -> windows_core::HRESULT where P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn AssocQueryStringW(flags : ASSOCF, str : ASSOCSTR, pszassoc : windows_core::PCWSTR, pszextra : windows_core::PCWSTR, pszout : windows_core::PWSTR, pcchout : *mut u32) -> windows_core::HRESULT); - AssocQueryStringW(core::mem::transmute(flags), core::mem::transmute(str), pszassoc.param().abi(), pszextra.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout)) + AssocQueryStringW(core::mem::transmute(flags), core::mem::transmute(str), pszassoc.param().abi(), pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] #[inline] -pub unsafe fn CDefFolderMenu_Create2(pidlfolder: Option<*const Common::ITEMIDLIST>, hwnd: P1, apidl: Option<&[*const Common::ITEMIDLIST]>, psf: P4, pfn: LPFNDFMCALLBACK, ahkeys: Option<&[super::super::System::Registry::HKEY]>) -> windows_core::Result +pub unsafe fn CDefFolderMenu_Create2(pidlfolder: Option<*const Common::ITEMIDLIST>, hwnd: Option, apidl: Option<&[*const Common::ITEMIDLIST]>, psf: P4, pfn: Option, ahkeys: Option<&[super::super::System::Registry::HKEY]>) -> windows_core::Result where - P1: windows_core::Param, P4: windows_core::Param, { 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(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(), core::mem::transmute(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::mem::zeroed())), + core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), + 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(), + core::mem::transmute(pfn.unwrap_or(core::mem::zeroed())), + 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] @@ -136,13 +144,12 @@ pub unsafe fn ChrCmpIW(w1: u16, w2: u16) -> super::super::Foundation::BOOL { ChrCmpIW(core::mem::transmute(w1), core::mem::transmute(w2)) } #[inline] -pub unsafe fn ColorAdjustLuma(clrrgb: P0, n: i32, fscale: P2) -> super::super::Foundation::COLORREF +pub unsafe fn ColorAdjustLuma(clrrgb: super::super::Foundation::COLORREF, n: i32, fscale: P2) -> super::super::Foundation::COLORREF where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn ColorAdjustLuma(clrrgb : super::super::Foundation:: COLORREF, n : i32, fscale : super::super::Foundation:: BOOL) -> super::super::Foundation:: COLORREF); - ColorAdjustLuma(clrrgb.param().abi(), core::mem::transmute(n), fscale.param().abi()) + ColorAdjustLuma(core::mem::transmute(clrrgb), core::mem::transmute(n), fscale.param().abi()) } #[inline] pub unsafe fn ColorHLSToRGB(whue: u16, wluminance: u16, wsaturation: u16) -> super::super::Foundation::COLORREF { @@ -150,12 +157,9 @@ pub unsafe fn ColorHLSToRGB(whue: u16, wluminance: u16, wsaturation: u16) -> sup ColorHLSToRGB(core::mem::transmute(whue), core::mem::transmute(wluminance), core::mem::transmute(wsaturation)) } #[inline] -pub unsafe fn ColorRGBToHLS(clrrgb: P0, pwhue: *mut u16, pwluminance: *mut u16, pwsaturation: *mut u16) -where - P0: windows_core::Param, -{ +pub unsafe fn ColorRGBToHLS(clrrgb: super::super::Foundation::COLORREF, pwhue: *mut u16, pwluminance: *mut u16, pwsaturation: *mut u16) { windows_targets::link!("shlwapi.dll" "system" fn ColorRGBToHLS(clrrgb : super::super::Foundation:: COLORREF, pwhue : *mut u16, pwluminance : *mut u16, pwsaturation : *mut u16)); - ColorRGBToHLS(clrrgb.param().abi(), core::mem::transmute(pwhue), core::mem::transmute(pwluminance), core::mem::transmute(pwsaturation)) + ColorRGBToHLS(core::mem::transmute(clrrgb), core::mem::transmute(pwhue), core::mem::transmute(pwluminance), core::mem::transmute(pwsaturation)) } #[inline] pub unsafe fn CommandLineToArgvW(lpcmdline: P0, pnumargs: *mut i32) -> *mut windows_core::PWSTR @@ -174,7 +178,7 @@ where P3: 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(), core::mem::transmute(riidevent), fconnect.param().abi(), punktarget.param().abi(), core::mem::transmute(pdwcookie), core::mem::transmute(ppcpout.unwrap_or(core::ptr::null_mut()))).ok() + ConnectToConnectionPoint(punk.param().abi(), core::mem::transmute(riidevent), fconnect.param().abi(), punktarget.param().abi(), core::mem::transmute(pdwcookie), core::mem::transmute(ppcpout.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CreateProfile(pszusersid: P0, pszusername: P1, pszprofilepath: &mut [u16]) -> windows_core::Result<()> @@ -186,30 +190,23 @@ where CreateProfile(pszusersid.param().abi(), pszusername.param().abi(), core::mem::transmute(pszprofilepath.as_ptr()), pszprofilepath.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn DAD_AutoScroll(hwnd: P0, pad: *mut AUTO_SCROLL_DATA, pptnow: *const super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DAD_AutoScroll(hwnd: super::super::Foundation::HWND, pad: *mut AUTO_SCROLL_DATA, pptnow: *const super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn DAD_AutoScroll(hwnd : super::super::Foundation:: HWND, pad : *mut AUTO_SCROLL_DATA, pptnow : *const super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - DAD_AutoScroll(hwnd.param().abi(), core::mem::transmute(pad), core::mem::transmute(pptnow)) + DAD_AutoScroll(core::mem::transmute(hwnd), core::mem::transmute(pad), core::mem::transmute(pptnow)) } #[inline] -pub unsafe fn DAD_DragEnterEx(hwndtarget: P0, ptstart: super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DAD_DragEnterEx(hwndtarget: super::super::Foundation::HWND, ptstart: super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn DAD_DragEnterEx(hwndtarget : super::super::Foundation:: HWND, ptstart : super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - DAD_DragEnterEx(hwndtarget.param().abi(), core::mem::transmute(ptstart)) + DAD_DragEnterEx(core::mem::transmute(hwndtarget), core::mem::transmute(ptstart)) } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn DAD_DragEnterEx2(hwndtarget: P0, ptstart: super::super::Foundation::POINT, pdtobject: P2) -> super::super::Foundation::BOOL +pub unsafe fn DAD_DragEnterEx2(hwndtarget: super::super::Foundation::HWND, ptstart: super::super::Foundation::POINT, pdtobject: P2) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn DAD_DragEnterEx2(hwndtarget : super::super::Foundation:: HWND, ptstart : super::super::Foundation:: POINT, pdtobject : * mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - DAD_DragEnterEx2(hwndtarget.param().abi(), core::mem::transmute(ptstart), pdtobject.param().abi()) + DAD_DragEnterEx2(core::mem::transmute(hwndtarget), core::mem::transmute(ptstart), pdtobject.param().abi()) } #[inline] pub unsafe fn DAD_DragLeave() -> super::super::Foundation::BOOL { @@ -223,12 +220,9 @@ pub unsafe fn DAD_DragMove(pt: super::super::Foundation::POINT) -> super::super: } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn DAD_SetDragImage(him: P0, pptoffset: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DAD_SetDragImage(him: super::Controls::HIMAGELIST, pptoffset: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn DAD_SetDragImage(him : super::Controls:: HIMAGELIST, pptoffset : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - DAD_SetDragImage(him.param().abi(), core::mem::transmute(pptoffset)) + DAD_SetDragImage(core::mem::transmute(him), core::mem::transmute(pptoffset)) } #[inline] pub unsafe fn DAD_ShowDragImage(fshow: P0) -> super::super::Foundation::BOOL @@ -239,14 +233,9 @@ where DAD_ShowDragImage(fshow.param().abi()) } #[inline] -pub unsafe fn DefSubclassProc(hwnd: P0, umsg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DefSubclassProc(hwnd: super::super::Foundation::HWND, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("comctl32.dll" "system" fn DefSubclassProc(hwnd : super::super::Foundation:: HWND, umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefSubclassProc(hwnd.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + DefSubclassProc(core::mem::transmute(hwnd), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] pub unsafe fn DeleteProfileA(lpsidstring: P0, lpprofilepath: P1, lpcomputername: P2) -> windows_core::Result<()> @@ -279,45 +268,32 @@ pub unsafe fn DoEnvironmentSubstW(pszsrc: &mut [u16]) -> u32 { DoEnvironmentSubstW(core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap()) } #[inline] -pub unsafe fn DragAcceptFiles(hwnd: P0, faccept: P1) +pub unsafe fn DragAcceptFiles(hwnd: super::super::Foundation::HWND, faccept: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn DragAcceptFiles(hwnd : super::super::Foundation:: HWND, faccept : super::super::Foundation:: BOOL)); - DragAcceptFiles(hwnd.param().abi(), faccept.param().abi()) + DragAcceptFiles(core::mem::transmute(hwnd), faccept.param().abi()) } #[inline] -pub unsafe fn DragFinish(hdrop: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn DragFinish(hdrop: HDROP) { windows_targets::link!("shell32.dll" "system" fn DragFinish(hdrop : HDROP)); - DragFinish(hdrop.param().abi()) + DragFinish(core::mem::transmute(hdrop)) } #[inline] -pub unsafe fn DragQueryFileA(hdrop: P0, ifile: u32, lpszfile: Option<&mut [u8]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DragQueryFileA(hdrop: HDROP, ifile: u32, lpszfile: Option<&mut [u8]>) -> u32 { windows_targets::link!("shell32.dll" "system" fn DragQueryFileA(hdrop : HDROP, ifile : u32, lpszfile : windows_core::PSTR, cch : u32) -> u32); - DragQueryFileA(hdrop.param().abi(), core::mem::transmute(ifile), core::mem::transmute(lpszfile.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszfile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + DragQueryFileA(core::mem::transmute(hdrop), core::mem::transmute(ifile), core::mem::transmute(lpszfile.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszfile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn DragQueryFileW(hdrop: P0, ifile: u32, lpszfile: Option<&mut [u16]>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn DragQueryFileW(hdrop: HDROP, ifile: u32, lpszfile: Option<&mut [u16]>) -> u32 { windows_targets::link!("shell32.dll" "system" fn DragQueryFileW(hdrop : HDROP, ifile : u32, lpszfile : windows_core::PWSTR, cch : u32) -> u32); - DragQueryFileW(hdrop.param().abi(), core::mem::transmute(ifile), core::mem::transmute(lpszfile.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszfile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + DragQueryFileW(core::mem::transmute(hdrop), core::mem::transmute(ifile), core::mem::transmute(lpszfile.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpszfile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn DragQueryPoint(hdrop: P0, ppt: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DragQueryPoint(hdrop: HDROP, ppt: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn DragQueryPoint(hdrop : HDROP, ppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - DragQueryPoint(hdrop.param().abi(), core::mem::transmute(ppt)) + DragQueryPoint(core::mem::transmute(hdrop), core::mem::transmute(ppt)) } #[inline] pub unsafe fn DriveType(idrive: i32) -> i32 { @@ -326,59 +302,42 @@ pub unsafe fn DriveType(idrive: i32) -> i32 { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn DuplicateIcon(hinst: P0, hicon: P1) -> super::WindowsAndMessaging::HICON -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn DuplicateIcon(hinst: Option, hicon: super::WindowsAndMessaging::HICON) -> super::WindowsAndMessaging::HICON { windows_targets::link!("shell32.dll" "system" fn DuplicateIcon(hinst : super::super::Foundation:: HINSTANCE, hicon : super::WindowsAndMessaging:: HICON) -> super::WindowsAndMessaging:: HICON); - DuplicateIcon(hinst.param().abi(), hicon.param().abi()) + DuplicateIcon(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(hicon)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ExtractAssociatedIconA(hinst: P0, psziconpath: &mut [u8; 128], piicon: *mut u16) -> super::WindowsAndMessaging::HICON -where - P0: windows_core::Param, -{ +pub unsafe fn ExtractAssociatedIconA(hinst: Option, psziconpath: &mut [u8; 128], piicon: *mut u16) -> super::WindowsAndMessaging::HICON { windows_targets::link!("shell32.dll" "system" fn ExtractAssociatedIconA(hinst : super::super::Foundation:: HINSTANCE, psziconpath : windows_core::PSTR, piicon : *mut u16) -> super::WindowsAndMessaging:: HICON); - ExtractAssociatedIconA(hinst.param().abi(), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piicon)) + ExtractAssociatedIconA(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piicon)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ExtractAssociatedIconExA(hinst: P0, psziconpath: &mut [u8; 128], piiconindex: *mut u16, piiconid: *mut u16) -> super::WindowsAndMessaging::HICON -where - P0: windows_core::Param, -{ +pub unsafe fn ExtractAssociatedIconExA(hinst: Option, psziconpath: &mut [u8; 128], piiconindex: *mut u16, piiconid: *mut u16) -> super::WindowsAndMessaging::HICON { windows_targets::link!("shell32.dll" "system" fn ExtractAssociatedIconExA(hinst : super::super::Foundation:: HINSTANCE, psziconpath : windows_core::PSTR, piiconindex : *mut u16, piiconid : *mut u16) -> super::WindowsAndMessaging:: HICON); - ExtractAssociatedIconExA(hinst.param().abi(), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piiconindex), core::mem::transmute(piiconid)) + ExtractAssociatedIconExA(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piiconindex), core::mem::transmute(piiconid)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ExtractAssociatedIconExW(hinst: P0, psziconpath: &mut [u16; 128], piiconindex: *mut u16, piiconid: *mut u16) -> super::WindowsAndMessaging::HICON -where - P0: windows_core::Param, -{ +pub unsafe fn ExtractAssociatedIconExW(hinst: Option, psziconpath: &mut [u16; 128], piiconindex: *mut u16, piiconid: *mut u16) -> super::WindowsAndMessaging::HICON { windows_targets::link!("shell32.dll" "system" fn ExtractAssociatedIconExW(hinst : super::super::Foundation:: HINSTANCE, psziconpath : windows_core::PWSTR, piiconindex : *mut u16, piiconid : *mut u16) -> super::WindowsAndMessaging:: HICON); - ExtractAssociatedIconExW(hinst.param().abi(), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piiconindex), core::mem::transmute(piiconid)) + ExtractAssociatedIconExW(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piiconindex), core::mem::transmute(piiconid)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ExtractAssociatedIconW(hinst: P0, psziconpath: &mut [u16; 128], piicon: *mut u16) -> super::WindowsAndMessaging::HICON -where - P0: windows_core::Param, -{ +pub unsafe fn ExtractAssociatedIconW(hinst: Option, psziconpath: &mut [u16; 128], piicon: *mut u16) -> super::WindowsAndMessaging::HICON { windows_targets::link!("shell32.dll" "system" fn ExtractAssociatedIconW(hinst : super::super::Foundation:: HINSTANCE, psziconpath : windows_core::PWSTR, piicon : *mut u16) -> super::WindowsAndMessaging:: HICON); - ExtractAssociatedIconW(hinst.param().abi(), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piicon)) + ExtractAssociatedIconW(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), core::mem::transmute(piicon)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ExtractIconA(hinst: P0, pszexefilename: P1, niconindex: u32) -> super::WindowsAndMessaging::HICON +pub unsafe fn ExtractIconA(hinst: Option, pszexefilename: P1, niconindex: u32) -> super::WindowsAndMessaging::HICON where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ExtractIconA(hinst : super::super::Foundation:: HINSTANCE, pszexefilename : windows_core::PCSTR, niconindex : u32) -> super::WindowsAndMessaging:: HICON); - ExtractIconA(hinst.param().abi(), pszexefilename.param().abi(), core::mem::transmute(niconindex)) + ExtractIconA(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), pszexefilename.param().abi(), core::mem::transmute(niconindex)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -387,7 +346,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(), core::mem::transmute(niconindex), core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nicons)) + ExtractIconExA(lpszfile.param().abi(), core::mem::transmute(niconindex), core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), core::mem::transmute(nicons)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -396,17 +355,16 @@ 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(), core::mem::transmute(niconindex), core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nicons)) + ExtractIconExW(lpszfile.param().abi(), core::mem::transmute(niconindex), core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), core::mem::transmute(nicons)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ExtractIconW(hinst: P0, pszexefilename: P1, niconindex: u32) -> super::WindowsAndMessaging::HICON +pub unsafe fn ExtractIconW(hinst: Option, pszexefilename: P1, niconindex: u32) -> super::WindowsAndMessaging::HICON where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ExtractIconW(hinst : super::super::Foundation:: HINSTANCE, pszexefilename : windows_core::PCWSTR, niconindex : u32) -> super::WindowsAndMessaging:: HICON); - ExtractIconW(hinst.param().abi(), pszexefilename.param().abi(), core::mem::transmute(niconindex)) + ExtractIconW(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), pszexefilename.param().abi(), core::mem::transmute(niconindex)) } #[inline] pub unsafe fn FindExecutableA(lpfile: P0, lpdirectory: P1, lpresult: &mut [u8; 260]) -> super::super::Foundation::HINSTANCE @@ -437,14 +395,14 @@ pub unsafe fn GetAcceptLanguagesW(pszlanguages: windows_core::PWSTR, pcchlanguag GetAcceptLanguagesW(core::mem::transmute(pszlanguages), core::mem::transmute(pcchlanguages)).ok() } #[inline] -pub unsafe fn GetAllUsersProfileDirectoryA(lpprofiledir: windows_core::PSTR, lpcchsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetAllUsersProfileDirectoryA(lpprofiledir: Option, lpcchsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetAllUsersProfileDirectoryA(lpprofiledir : windows_core::PSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetAllUsersProfileDirectoryA(core::mem::transmute(lpprofiledir), core::mem::transmute(lpcchsize)).ok() + GetAllUsersProfileDirectoryA(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } #[inline] -pub unsafe fn GetAllUsersProfileDirectoryW(lpprofiledir: windows_core::PWSTR, lpcchsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetAllUsersProfileDirectoryW(lpprofiledir: Option, lpcchsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetAllUsersProfileDirectoryW(lpprofiledir : windows_core::PWSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetAllUsersProfileDirectoryW(core::mem::transmute(lpprofiledir), core::mem::transmute(lpcchsize)).ok() + GetAllUsersProfileDirectoryW(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } #[inline] pub unsafe fn GetCurrentProcessExplicitAppUserModelID() -> windows_core::Result { @@ -453,14 +411,14 @@ pub unsafe fn GetCurrentProcessExplicitAppUserModelID() -> windows_core::Result< GetCurrentProcessExplicitAppUserModelID(&mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetDefaultUserProfileDirectoryA(lpprofiledir: windows_core::PSTR, lpcchsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetDefaultUserProfileDirectoryA(lpprofiledir: Option, lpcchsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetDefaultUserProfileDirectoryA(lpprofiledir : windows_core::PSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetDefaultUserProfileDirectoryA(core::mem::transmute(lpprofiledir), core::mem::transmute(lpcchsize)).ok() + GetDefaultUserProfileDirectoryA(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } #[inline] -pub unsafe fn GetDefaultUserProfileDirectoryW(lpprofiledir: windows_core::PWSTR, lpcchsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetDefaultUserProfileDirectoryW(lpprofiledir: Option, lpcchsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetDefaultUserProfileDirectoryW(lpprofiledir : windows_core::PWSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetDefaultUserProfileDirectoryW(core::mem::transmute(lpprofiledir), core::mem::transmute(lpcchsize)).ok() + GetDefaultUserProfileDirectoryW(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } #[inline] pub unsafe fn GetDpiForShellUIComponent(param0: SHELL_UI_COMPONENT) -> u32 { @@ -468,34 +426,27 @@ pub unsafe fn GetDpiForShellUIComponent(param0: SHELL_UI_COMPONENT) -> u32 { GetDpiForShellUIComponent(core::mem::transmute(param0)) } #[inline] -pub unsafe fn GetFileNameFromBrowse(hwnd: P0, pszfilepath: &mut [u16], pszworkingdir: P3, pszdefext: P4, pszfilters: P5, psztitle: P6) -> super::super::Foundation::BOOL +pub unsafe fn GetFileNameFromBrowse(hwnd: Option, pszfilepath: &mut [u16], pszworkingdir: P3, pszdefext: P4, pszfilters: P5, psztitle: P6) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn GetFileNameFromBrowse(hwnd : super::super::Foundation:: HWND, pszfilepath : windows_core::PWSTR, cchfilepath : u32, pszworkingdir : windows_core::PCWSTR, pszdefext : windows_core::PCWSTR, pszfilters : windows_core::PCWSTR, psztitle : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - GetFileNameFromBrowse(hwnd.param().abi(), core::mem::transmute(pszfilepath.as_ptr()), pszfilepath.len().try_into().unwrap(), pszworkingdir.param().abi(), pszdefext.param().abi(), pszfilters.param().abi(), psztitle.param().abi()) + GetFileNameFromBrowse(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszfilepath.as_ptr()), pszfilepath.len().try_into().unwrap(), pszworkingdir.param().abi(), pszdefext.param().abi(), pszfilters.param().abi(), psztitle.param().abi()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn GetMenuContextHelpId(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuContextHelpId(param0: super::WindowsAndMessaging::HMENU) -> u32 { windows_targets::link!("user32.dll" "system" fn GetMenuContextHelpId(param0 : super::WindowsAndMessaging:: HMENU) -> u32); - GetMenuContextHelpId(param0.param().abi()) + GetMenuContextHelpId(core::mem::transmute(param0)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn GetMenuPosFromID(hmenu: P0, id: u32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuPosFromID(hmenu: super::WindowsAndMessaging::HMENU, id: u32) -> i32 { windows_targets::link!("shlwapi.dll" "system" fn GetMenuPosFromID(hmenu : super::WindowsAndMessaging:: HMENU, id : u32) -> i32); - GetMenuPosFromID(hmenu.param().abi(), core::mem::transmute(id)) + GetMenuPosFromID(core::mem::transmute(hmenu), core::mem::transmute(id)) } #[inline] pub unsafe fn GetProfileType(dwflags: *mut u32) -> windows_core::Result<()> { @@ -503,14 +454,14 @@ pub unsafe fn GetProfileType(dwflags: *mut u32) -> windows_core::Result<()> { GetProfileType(core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn GetProfilesDirectoryA(lpprofiledir: windows_core::PSTR, lpcchsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetProfilesDirectoryA(lpprofiledir: Option, lpcchsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetProfilesDirectoryA(lpprofiledir : windows_core::PSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetProfilesDirectoryA(core::mem::transmute(lpprofiledir), core::mem::transmute(lpcchsize)).ok() + GetProfilesDirectoryA(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } #[inline] -pub unsafe fn GetProfilesDirectoryW(lpprofiledir: windows_core::PWSTR, lpcchsize: *mut u32) -> windows_core::Result<()> { +pub unsafe fn GetProfilesDirectoryW(lpprofiledir: Option, lpcchsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetProfilesDirectoryW(lpprofiledir : windows_core::PWSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetProfilesDirectoryW(core::mem::transmute(lpprofiledir), core::mem::transmute(lpcchsize)).ok() + GetProfilesDirectoryW(core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -520,45 +471,30 @@ pub unsafe fn GetScaleFactorForDevice(devicetype: DISPLAY_DEVICE_TYPE) -> Common } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Shell_Common"))] #[inline] -pub unsafe fn GetScaleFactorForMonitor(hmon: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetScaleFactorForMonitor(hmon: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result { windows_targets::link!("api-ms-win-shcore-scaling-l1-1-1.dll" "system" fn GetScaleFactorForMonitor(hmon : super::super::Graphics::Gdi:: HMONITOR, pscale : *mut Common:: DEVICE_SCALE_FACTOR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetScaleFactorForMonitor(hmon.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + GetScaleFactorForMonitor(core::mem::transmute(hmon), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn GetUserProfileDirectoryA(htoken: P0, lpprofiledir: windows_core::PSTR, lpcchsize: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetUserProfileDirectoryA(htoken: super::super::Foundation::HANDLE, lpprofiledir: Option, lpcchsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetUserProfileDirectoryA(htoken : super::super::Foundation:: HANDLE, lpprofiledir : windows_core::PSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetUserProfileDirectoryA(htoken.param().abi(), core::mem::transmute(lpprofiledir), core::mem::transmute(lpcchsize)).ok() + GetUserProfileDirectoryA(core::mem::transmute(htoken), core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } #[inline] -pub unsafe fn GetUserProfileDirectoryW(htoken: P0, lpprofiledir: windows_core::PWSTR, lpcchsize: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetUserProfileDirectoryW(htoken: super::super::Foundation::HANDLE, lpprofiledir: Option, lpcchsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn GetUserProfileDirectoryW(htoken : super::super::Foundation:: HANDLE, lpprofiledir : windows_core::PWSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetUserProfileDirectoryW(htoken.param().abi(), core::mem::transmute(lpprofiledir), core::mem::transmute(lpcchsize)).ok() + GetUserProfileDirectoryW(core::mem::transmute(htoken), core::mem::transmute(lpprofiledir.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcchsize)).ok() } #[inline] -pub unsafe fn GetWindowContextHelpId(param0: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowContextHelpId(param0: super::super::Foundation::HWND) -> u32 { windows_targets::link!("user32.dll" "system" fn GetWindowContextHelpId(param0 : super::super::Foundation:: HWND) -> u32); - GetWindowContextHelpId(param0.param().abi()) + GetWindowContextHelpId(core::mem::transmute(param0)) } #[inline] -pub unsafe fn GetWindowSubclass(hwnd: P0, pfnsubclass: SUBCLASSPROC, uidsubclass: usize, pdwrefdata: Option<*mut usize>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowSubclass(hwnd: super::super::Foundation::HWND, pfnsubclass: SUBCLASSPROC, uidsubclass: usize, pdwrefdata: Option<*mut usize>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(pfnsubclass), core::mem::transmute(uidsubclass), core::mem::transmute(pdwrefdata.unwrap_or(core::ptr::null_mut()))) + GetWindowSubclass(core::mem::transmute(hwnd), core::mem::transmute(pfnsubclass), core::mem::transmute(uidsubclass), core::mem::transmute(pdwrefdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -635,10 +571,9 @@ where HlinkCreateBrowseContext(piunkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn HlinkCreateExtensionServices(pwzadditionalheaders: P0, phwnd: P1, pszusername: P2, pszpassword: P3, piunkouter: P4) -> windows_core::Result +pub unsafe fn HlinkCreateExtensionServices(pwzadditionalheaders: P0, phwnd: super::super::Foundation::HWND, pszusername: P2, pszpassword: P3, piunkouter: P4) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, @@ -646,7 +581,7 @@ where { windows_targets::link!("hlink.dll" "system" fn HlinkCreateExtensionServices(pwzadditionalheaders : windows_core::PCWSTR, phwnd : super::super::Foundation:: HWND, pszusername : windows_core::PCWSTR, pszpassword : windows_core::PCWSTR, piunkouter : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - HlinkCreateExtensionServices(pwzadditionalheaders.param().abi(), phwnd.param().abi(), pszusername.param().abi(), pszpassword.param().abi(), piunkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + HlinkCreateExtensionServices(pwzadditionalheaders.param().abi(), core::mem::transmute(phwnd), pszusername.param().abi(), pszpassword.param().abi(), piunkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -918,7 +853,7 @@ where P2: 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(core::ptr::null())), core::mem::transmute(pmkid), fappend.param().abi()) + ILAppendID(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmkid), fappend.param().abi()) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -936,7 +871,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(core::ptr::null())), core::mem::transmute(pidl2.unwrap_or(core::ptr::null()))) + ILCombine(core::mem::transmute(pidl1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pidl2.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -972,19 +907,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(core::ptr::null()))) + ILFree(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + ILGetNext(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + ILGetSize(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -1015,7 +950,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(core::ptr::null_mut()))) + ILRemoveLastID(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -1115,7 +1050,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(core::ptr::null_mut()))) + IUnknown_AtomicRelease(core::mem::transmute(ppunk.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn IUnknown_GetSite(punk: P0) -> windows_core::Result @@ -1180,7 +1115,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 super::super::System::Com::StructuredStorage:: PROPVARIANT) -> windows_core::HRESULT); - InitPropVariantFromStrRet(core::mem::transmute(pstrret), core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(ppropvar)).ok() + InitPropVariantFromStrRet(core::mem::transmute(pstrret), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), 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] @@ -1256,20 +1191,14 @@ pub unsafe fn IsUserAnAdmin() -> super::super::Foundation::BOOL { IsUserAnAdmin() } #[inline] -pub unsafe fn LoadUserProfileA(htoken: P0, lpprofileinfo: *mut PROFILEINFOA) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LoadUserProfileA(htoken: super::super::Foundation::HANDLE, lpprofileinfo: *mut PROFILEINFOA) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn LoadUserProfileA(htoken : super::super::Foundation:: HANDLE, lpprofileinfo : *mut PROFILEINFOA) -> super::super::Foundation:: BOOL); - LoadUserProfileA(htoken.param().abi(), core::mem::transmute(lpprofileinfo)).ok() + LoadUserProfileA(core::mem::transmute(htoken), core::mem::transmute(lpprofileinfo)).ok() } #[inline] -pub unsafe fn LoadUserProfileW(htoken: P0, lpprofileinfo: *mut PROFILEINFOW) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn LoadUserProfileW(htoken: super::super::Foundation::HANDLE, lpprofileinfo: *mut PROFILEINFOW) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn LoadUserProfileW(htoken : super::super::Foundation:: HANDLE, lpprofileinfo : *mut PROFILEINFOW) -> super::super::Foundation:: BOOL); - LoadUserProfileW(htoken.param().abi(), core::mem::transmute(lpprofileinfo)).ok() + LoadUserProfileW(core::mem::transmute(htoken), core::mem::transmute(lpprofileinfo)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1284,14 +1213,13 @@ where } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn OpenRegStream(hkey: P0, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option +pub unsafe fn OpenRegStream(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn OpenRegStream(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, grfmode : u32) -> Option < super::super::System::Com:: IStream >); - OpenRegStream(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) + OpenRegStream(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) } #[inline] pub unsafe fn ParseURLA(pcszurl: P0, ppu: *mut PARSEDURLA) -> windows_core::Result<()> @@ -1404,7 +1332,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(core::ptr::null_mut())), core::mem::transmute(pcchremaining.unwrap_or(core::ptr::null_mut()))) + PathCchAddBackslashEx(core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), core::mem::transmute(ppszend.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchremaining.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PathCchAddExtension(pszpath: &mut [u16], pszext: P2) -> windows_core::Result<()> @@ -1489,7 +1417,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), core::mem::transmute(cchpath), core::mem::transmute(ppszend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchremaining.unwrap_or(core::ptr::null_mut()))).ok() + PathCchRemoveBackslashEx(core::mem::transmute(pszpath), core::mem::transmute(cchpath), core::mem::transmute(ppszend.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchremaining.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn PathCchRemoveExtension(pszpath: windows_core::PWSTR, cchpath: usize) -> windows_core::Result<()> { @@ -1574,12 +1502,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn PathCompactPathA(hdc: P0, pszpath: &mut [u8; 260], dx: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PathCompactPathA(hdc: Option, pszpath: &mut [u8; 260], dx: u32) -> super::super::Foundation::BOOL { windows_targets::link!("shlwapi.dll" "system" fn PathCompactPathA(hdc : super::super::Graphics::Gdi:: HDC, pszpath : windows_core::PSTR, dx : u32) -> super::super::Foundation:: BOOL); - PathCompactPathA(hdc.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dx)) + PathCompactPathA(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dx)) } #[inline] pub unsafe fn PathCompactPathExA(pszout: &mut [u8], pszsrc: P1, dwflags: u32) -> super::super::Foundation::BOOL @@ -1599,12 +1524,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn PathCompactPathW(hdc: P0, pszpath: &mut [u16; 260], dx: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PathCompactPathW(hdc: Option, pszpath: &mut [u16; 260], dx: u32) -> super::super::Foundation::BOOL { windows_targets::link!("shlwapi.dll" "system" fn PathCompactPathW(hdc : super::super::Graphics::Gdi:: HDC, pszpath : windows_core::PWSTR, dx : u32) -> super::super::Foundation:: BOOL); - PathCompactPathW(hdc.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dx)) + PathCompactPathW(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dx)) } #[inline] pub unsafe fn PathCreateFromUrlA(pszurl: P0, pszpath: windows_core::PSTR, pcchpath: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -1697,12 +1619,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(core::ptr::null()))) + PathFindOnPathA(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(ppszotherdirs.unwrap_or(core::mem::zeroed()))) } #[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(core::ptr::null()))) + PathFindOnPathW(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(ppszotherdirs.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PathFindSuffixArrayA(pszpath: P0, apszsuffix: &[windows_core::PCSTR]) -> windows_core::PCSTR @@ -1987,7 +1909,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(core::ptr::null_mut()))) + PathIsUNCEx(pszpath.param().abi(), core::mem::transmute(ppszserver.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PathIsUNCServerA(pszpath: P0) -> super::super::Foundation::BOOL @@ -2229,7 +2151,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(core::ptr::null())), fflags.0 as _) + PathResolve(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dirs.unwrap_or(core::mem::zeroed())), fflags.0 as _) } #[inline] pub unsafe fn PathSearchAndQualifyA(pszpath: P0, pszbuf: &mut [u8]) -> super::super::Foundation::BOOL @@ -2248,22 +2170,20 @@ where PathSearchAndQualifyW(pszpath.param().abi(), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] -pub unsafe fn PathSetDlgItemPathA(hdlg: P0, id: i32, pszpath: P2) +pub unsafe fn PathSetDlgItemPathA(hdlg: super::super::Foundation::HWND, id: i32, pszpath: P2) where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn PathSetDlgItemPathA(hdlg : super::super::Foundation:: HWND, id : i32, pszpath : windows_core::PCSTR)); - PathSetDlgItemPathA(hdlg.param().abi(), core::mem::transmute(id), pszpath.param().abi()) + PathSetDlgItemPathA(core::mem::transmute(hdlg), core::mem::transmute(id), pszpath.param().abi()) } #[inline] -pub unsafe fn PathSetDlgItemPathW(hdlg: P0, id: i32, pszpath: P2) +pub unsafe fn PathSetDlgItemPathW(hdlg: super::super::Foundation::HWND, id: i32, pszpath: P2) where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn PathSetDlgItemPathW(hdlg : super::super::Foundation:: HWND, id : i32, pszpath : windows_core::PCWSTR)); - PathSetDlgItemPathW(hdlg.param().abi(), core::mem::transmute(id), pszpath.param().abi()) + PathSetDlgItemPathW(core::mem::transmute(hdlg), core::mem::transmute(id), pszpath.param().abi()) } #[inline] pub unsafe fn PathSkipRootA(pszpath: P0) -> windows_core::PSTR @@ -2364,12 +2284,9 @@ where PathYetAnotherMakeUniqueName(core::mem::transmute(pszuniquename.as_ptr()), pszpath.param().abi(), pszshort.param().abi(), pszfilespec.param().abi()) } #[inline] -pub unsafe fn PickIconDlg(hwnd: P0, psziconpath: &mut [u16], piiconindex: Option<*mut i32>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn PickIconDlg(hwnd: Option, psziconpath: &mut [u16], piiconindex: Option<*mut i32>) -> i32 { 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(core::ptr::null_mut()))) + PickIconDlg(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), core::mem::transmute(piiconindex.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2402,56 +2319,45 @@ 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(core::mem::transmute(routine), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(registration)) + RegisterAppConstrainedChangeNotification(core::mem::transmute(routine), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(routine), core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(registration)) + RegisterAppStateChangeNotification(core::mem::transmute(routine), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(registration)) } #[inline] -pub unsafe fn RegisterScaleChangeEvent(hevent: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterScaleChangeEvent(hevent: super::super::Foundation::HANDLE) -> windows_core::Result { windows_targets::link!("api-ms-win-shcore-scaling-l1-1-1.dll" "system" fn RegisterScaleChangeEvent(hevent : super::super::Foundation:: HANDLE, pdwcookie : *mut usize) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - RegisterScaleChangeEvent(hevent.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + RegisterScaleChangeEvent(core::mem::transmute(hevent), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn RegisterScaleChangeNotifications(displaydevice: DISPLAY_DEVICE_TYPE, hwndnotify: P1, umsgnotify: u32) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn RegisterScaleChangeNotifications(displaydevice: DISPLAY_DEVICE_TYPE, hwndnotify: super::super::Foundation::HWND, umsgnotify: u32) -> windows_core::Result { windows_targets::link!("api-ms-win-shcore-scaling-l1-1-0.dll" "system" fn RegisterScaleChangeNotifications(displaydevice : DISPLAY_DEVICE_TYPE, hwndnotify : super::super::Foundation:: HWND, umsgnotify : u32, pdwcookie : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - RegisterScaleChangeNotifications(core::mem::transmute(displaydevice), hwndnotify.param().abi(), core::mem::transmute(umsgnotify), &mut result__).map(|| core::mem::transmute(result__)) + RegisterScaleChangeNotifications(core::mem::transmute(displaydevice), core::mem::transmute(hwndnotify), core::mem::transmute(umsgnotify), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn RemoveWindowSubclass(hwnd: P0, pfnsubclass: SUBCLASSPROC, uidsubclass: usize) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RemoveWindowSubclass(hwnd: super::super::Foundation::HWND, pfnsubclass: SUBCLASSPROC, uidsubclass: usize) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn RemoveWindowSubclass(hwnd : super::super::Foundation:: HWND, pfnsubclass : SUBCLASSPROC, uidsubclass : usize) -> super::super::Foundation:: BOOL); - RemoveWindowSubclass(hwnd.param().abi(), core::mem::transmute(pfnsubclass), core::mem::transmute(uidsubclass)) + RemoveWindowSubclass(core::mem::transmute(hwnd), core::mem::transmute(pfnsubclass), core::mem::transmute(uidsubclass)) } #[inline] -pub unsafe fn RestartDialog(hwnd: P0, pszprompt: P1, dwreturn: u32) -> i32 +pub unsafe fn RestartDialog(hwnd: Option, pszprompt: P1, dwreturn: u32) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn RestartDialog(hwnd : super::super::Foundation:: HWND, pszprompt : windows_core::PCWSTR, dwreturn : u32) -> i32); - RestartDialog(hwnd.param().abi(), pszprompt.param().abi(), core::mem::transmute(dwreturn)) + RestartDialog(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszprompt.param().abi(), core::mem::transmute(dwreturn)) } #[inline] -pub unsafe fn RestartDialogEx(hwnd: P0, pszprompt: P1, dwreturn: u32, dwreasoncode: u32) -> i32 +pub unsafe fn RestartDialogEx(hwnd: Option, pszprompt: P1, dwreturn: u32, dwreasoncode: u32) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn RestartDialogEx(hwnd : super::super::Foundation:: HWND, pszprompt : windows_core::PCWSTR, dwreturn : u32, dwreasoncode : u32) -> i32); - RestartDialogEx(hwnd.param().abi(), pszprompt.param().abi(), core::mem::transmute(dwreturn), core::mem::transmute(dwreasoncode)) + RestartDialogEx(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszprompt.param().abi(), core::mem::transmute(dwreturn), core::mem::transmute(dwreasoncode)) } #[inline] pub unsafe fn RevokeScaleChangeNotifications(displaydevice: DISPLAY_DEVICE_TYPE, dwcookie: u32) -> windows_core::Result<()> { @@ -2460,18 +2366,14 @@ pub unsafe fn RevokeScaleChangeNotifications(displaydevice: DISPLAY_DEVICE_TYPE, } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn SHAddFromPropSheetExtArray(hpsxa: P0, lpfnaddpage: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: P2) -> u32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SHAddFromPropSheetExtArray(hpsxa: HPSXA, lpfnaddpage: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> u32 { windows_targets::link!("shell32.dll" "system" fn SHAddFromPropSheetExtArray(hpsxa : HPSXA, lpfnaddpage : super::Controls:: LPFNSVADDPROPSHEETPAGE, lparam : super::super::Foundation:: LPARAM) -> u32); - SHAddFromPropSheetExtArray(hpsxa.param().abi(), core::mem::transmute(lpfnaddpage), lparam.param().abi()) + SHAddFromPropSheetExtArray(core::mem::transmute(hpsxa), core::mem::transmute(lpfnaddpage), core::mem::transmute(lparam)) } #[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(core::mem::transmute(uflags), core::mem::transmute(pv.unwrap_or(core::ptr::null()))) + SHAddToRecentDocs(core::mem::transmute(uflags), core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SHAlloc(cb: usize) -> *mut core::ffi::c_void { @@ -2481,7 +2383,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(core::ptr::null())), core::mem::transmute(dwsize), core::mem::transmute(dwprocessid)) + SHAllocShared(core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsize), core::mem::transmute(dwprocessid)) } #[inline] pub unsafe fn SHAnsiToAnsi(pszsrc: P0, pszdst: &mut [u8]) -> i32 @@ -2524,12 +2426,9 @@ where SHAssocEnumHandlersForProtocolByApplication(protocol.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn SHAutoComplete(hwndedit: P0, dwflags: SHELL_AUTOCOMPLETE_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SHAutoComplete(hwndedit: super::super::Foundation::HWND, dwflags: SHELL_AUTOCOMPLETE_FLAGS) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn SHAutoComplete(hwndedit : super::super::Foundation:: HWND, dwflags : SHELL_AUTOCOMPLETE_FLAGS) -> windows_core::HRESULT); - SHAutoComplete(hwndedit.param().abi(), core::mem::transmute(dwflags)).ok() + SHAutoComplete(core::mem::transmute(hwndedit), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -2540,7 +2439,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(), core::mem::transmute(pidl), &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::ptr::null_mut()))).and_then(|| windows_core::Type::from_abi(result__)) + SHBindToFolderIDListParent(psfroot.param().abi(), core::mem::transmute(pidl), &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::mem::zeroed()))).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2552,7 +2451,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(), core::mem::transmute(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__)) + SHBindToFolderIDListParentEx(psfroot.param().abi(), core::mem::transmute(pidl), ppbc.param().abi(), &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::mem::zeroed()))).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2574,7 +2473,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(core::mem::transmute(pidl), &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::ptr::null_mut()))).and_then(|| windows_core::Type::from_abi(result__)) + SHBindToParent(core::mem::transmute(pidl), &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::mem::zeroed()))).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -2599,25 +2498,19 @@ where } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn SHChangeNotification_Lock(hchange: P0, dwprocid: u32, pppidl: Option<*mut *mut *mut Common::ITEMIDLIST>, plevent: Option<*mut i32>) -> super::super::Foundation::HANDLE -where - P0: windows_core::Param, -{ +pub unsafe fn SHChangeNotification_Lock(hchange: super::super::Foundation::HANDLE, dwprocid: u32, pppidl: Option<*mut *mut *mut Common::ITEMIDLIST>, plevent: Option<*mut i32>) -> super::super::Foundation::HANDLE { 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(), core::mem::transmute(dwprocid), core::mem::transmute(pppidl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plevent.unwrap_or(core::ptr::null_mut()))) + SHChangeNotification_Lock(core::mem::transmute(hchange), core::mem::transmute(dwprocid), core::mem::transmute(pppidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(plevent.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SHChangeNotification_Unlock(hlock: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SHChangeNotification_Unlock(hlock: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn SHChangeNotification_Unlock(hlock : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SHChangeNotification_Unlock(hlock.param().abi()) + SHChangeNotification_Unlock(core::mem::transmute(hlock)) } #[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 _, core::mem::transmute(uflags), core::mem::transmute(dwitem1.unwrap_or(core::ptr::null())), core::mem::transmute(dwitem2.unwrap_or(core::ptr::null()))) + SHChangeNotify(weventid.0 as _, core::mem::transmute(uflags), core::mem::transmute(dwitem1.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwitem2.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SHChangeNotifyDeregister(ulid: u32) -> super::super::Foundation::BOOL { @@ -2626,12 +2519,9 @@ pub unsafe fn SHChangeNotifyDeregister(ulid: u32) -> super::super::Foundation::B } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn SHChangeNotifyRegister(hwnd: P0, fsources: SHCNRF_SOURCE, fevents: i32, wmsg: u32, centries: i32, pshcne: *const SHChangeNotifyEntry) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SHChangeNotifyRegister(hwnd: super::super::Foundation::HWND, fsources: SHCNRF_SOURCE, fevents: i32, wmsg: u32, centries: i32, pshcne: *const SHChangeNotifyEntry) -> u32 { windows_targets::link!("shell32.dll" "system" fn SHChangeNotifyRegister(hwnd : super::super::Foundation:: HWND, fsources : SHCNRF_SOURCE, fevents : i32, wmsg : u32, centries : i32, pshcne : *const SHChangeNotifyEntry) -> u32); - SHChangeNotifyRegister(hwnd.param().abi(), core::mem::transmute(fsources), core::mem::transmute(fevents), core::mem::transmute(wmsg), core::mem::transmute(centries), core::mem::transmute(pshcne)) + SHChangeNotifyRegister(core::mem::transmute(hwnd), core::mem::transmute(fsources), core::mem::transmute(fevents), core::mem::transmute(wmsg), core::mem::transmute(centries), core::mem::transmute(pshcne)) } #[inline] pub unsafe fn SHChangeNotifyRegisterThread(status: SCNRT_STATUS) { @@ -2640,13 +2530,12 @@ pub unsafe fn SHChangeNotifyRegisterThread(status: SCNRT_STATUS) { } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn SHCloneSpecialIDList(hwnd: P0, csidl: i32, fcreate: P2) -> *mut Common::ITEMIDLIST +pub unsafe fn SHCloneSpecialIDList(hwnd: Option, csidl: i32, fcreate: P2) -> *mut Common::ITEMIDLIST where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHCloneSpecialIDList(hwnd : super::super::Foundation:: HWND, csidl : i32, fcreate : super::super::Foundation:: BOOL) -> *mut Common:: ITEMIDLIST); - SHCloneSpecialIDList(hwnd.param().abi(), core::mem::transmute(csidl), fcreate.param().abi()) + SHCloneSpecialIDList(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), fcreate.param().abi()) } #[inline] pub unsafe fn SHCoCreateInstance(pszclsid: P0, pclsid: Option<*const windows_core::GUID>, punkouter: P2) -> windows_core::Result @@ -2657,29 +2546,25 @@ 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(core::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::mem::zeroed())), punkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHCopyKeyA(hkeysrc: P0, pszsrcsubkey: P1, hkeydest: P2, freserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHCopyKeyA(hkeysrc: super::super::System::Registry::HKEY, pszsrcsubkey: P1, hkeydest: super::super::System::Registry::HKEY, freserved: Option) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHCopyKeyA(hkeysrc : super::super::System::Registry:: HKEY, pszsrcsubkey : windows_core::PCSTR, hkeydest : super::super::System::Registry:: HKEY, freserved : u32) -> super::super::Foundation:: WIN32_ERROR); - SHCopyKeyA(hkeysrc.param().abi(), pszsrcsubkey.param().abi(), hkeydest.param().abi(), core::mem::transmute(freserved)) + SHCopyKeyA(core::mem::transmute(hkeysrc), pszsrcsubkey.param().abi(), core::mem::transmute(hkeydest), core::mem::transmute(freserved.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHCopyKeyW(hkeysrc: P0, pszsrcsubkey: P1, hkeydest: P2, freserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHCopyKeyW(hkeysrc: super::super::System::Registry::HKEY, pszsrcsubkey: P1, hkeydest: super::super::System::Registry::HKEY, freserved: Option) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHCopyKeyW(hkeysrc : super::super::System::Registry:: HKEY, pszsrcsubkey : windows_core::PCWSTR, hkeydest : super::super::System::Registry:: HKEY, freserved : u32) -> super::super::Foundation:: WIN32_ERROR); - SHCopyKeyW(hkeysrc.param().abi(), pszsrcsubkey.param().abi(), hkeydest.param().abi(), core::mem::transmute(freserved)) + SHCopyKeyW(core::mem::transmute(hkeysrc), pszsrcsubkey.param().abi(), core::mem::transmute(hkeydest), core::mem::transmute(freserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SHCreateAssociationRegistration() -> windows_core::Result @@ -2699,7 +2584,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(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__)) + SHCreateDataObject(core::mem::transmute(pidlfolder.unwrap_or(core::mem::zeroed())), 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] @@ -2730,33 +2615,30 @@ where SHCreateDefaultPropertiesOp(psi.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn SHCreateDirectory(hwnd: P0, pszpath: P1) -> i32 +pub unsafe fn SHCreateDirectory(hwnd: Option, pszpath: P1) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHCreateDirectory(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PCWSTR) -> i32); - SHCreateDirectory(hwnd.param().abi(), pszpath.param().abi()) + SHCreateDirectory(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszpath.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SHCreateDirectoryExA(hwnd: P0, pszpath: P1, psa: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> i32 +pub unsafe fn SHCreateDirectoryExA(hwnd: Option, pszpath: P1, psa: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> i32 where - P0: windows_core::Param, 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(core::ptr::null()))) + SHCreateDirectoryExA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszpath.param().abi(), core::mem::transmute(psa.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SHCreateDirectoryExW(hwnd: P0, pszpath: P1, psa: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> i32 +pub unsafe fn SHCreateDirectoryExW(hwnd: Option, pszpath: P1, psa: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> i32 where - P0: windows_core::Param, 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(core::ptr::null()))) + SHCreateDirectoryExW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszpath.param().abi(), core::mem::transmute(psa.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SHCreateFileExtractIconW(pszfile: P0, dwfileattributes: u32) -> windows_core::Result @@ -2822,7 +2704,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(core::ptr::null())), psfparent.param().abi(), core::mem::transmute(pidl), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCreateItemWithParent(core::mem::transmute(pidlparent.unwrap_or(core::mem::zeroed())), psfparent.param().abi(), core::mem::transmute(pidl), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2838,13 +2720,12 @@ pub unsafe fn SHCreateProcessAsUserW(pscpi: *mut SHCREATEPROCESSINFOW) -> window } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHCreatePropSheetExtArray(hkey: P0, pszsubkey: P1, max_iface: u32) -> HPSXA +pub unsafe fn SHCreatePropSheetExtArray(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, max_iface: u32) -> HPSXA where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHCreatePropSheetExtArray(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, max_iface : u32) -> HPSXA); - SHCreatePropSheetExtArray(hkey.param().abi(), pszsubkey.param().abi(), core::mem::transmute(max_iface)) + SHCreatePropSheetExtArray(core::mem::transmute(hkey), pszsubkey.param().abi(), core::mem::transmute(max_iface)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2875,7 +2756,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(core::ptr::null())), psfparent.param().abi(), core::mem::transmute(pidl), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCreateShellItem(core::mem::transmute(pidlparent.unwrap_or(core::mem::zeroed())), psfparent.param().abi(), core::mem::transmute(pidl), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -2885,7 +2766,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(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__)) + SHCreateShellItemArray(core::mem::transmute(pidlparent.unwrap_or(core::mem::zeroed())), 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] @@ -2917,12 +2798,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SHCreateShellPalette(hdc: P0) -> super::super::Graphics::Gdi::HPALETTE -where - P0: windows_core::Param, -{ +pub unsafe fn SHCreateShellPalette(hdc: Option) -> super::super::Graphics::Gdi::HPALETTE { windows_targets::link!("shlwapi.dll" "system" fn SHCreateShellPalette(hdc : super::super::Graphics::Gdi:: HDC) -> super::super::Graphics::Gdi:: HPALETTE); - SHCreateShellPalette(hdc.param().abi()) + SHCreateShellPalette(core::mem::transmute(hdc.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2965,9 +2843,9 @@ where } #[cfg(feature = "Win32_System_Threading")] #[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<()> { +pub unsafe fn SHCreateThread(pfnthreadproc: super::super::System::Threading::LPTHREAD_START_ROUTINE, pdata: Option<*const core::ffi::c_void>, flags: u32, pfncallback: Option) -> 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(core::mem::transmute(pfnthreadproc), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(pfncallback)).ok() + SHCreateThread(core::mem::transmute(pfnthreadproc), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SHCreateThreadRef(pcref: *mut i32, ppunk: *mut Option) -> windows_core::Result<()> { @@ -2976,9 +2854,9 @@ 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<()> { +pub unsafe fn SHCreateThreadWithHandle(pfnthreadproc: super::super::System::Threading::LPTHREAD_START_ROUTINE, pdata: Option<*const core::ffi::c_void>, flags: u32, pfncallback: Option, 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(core::mem::transmute(pfnthreadproc), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), core::mem::transmute(flags), core::mem::transmute(pfncallback), core::mem::transmute(phandle.unwrap_or(core::ptr::null_mut()))).ok() + SHCreateThreadWithHandle(core::mem::transmute(pfnthreadproc), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), core::mem::transmute(pfncallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(phandle.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -2987,7 +2865,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(), core::mem::transmute(iindex), core::mem::transmute(uflags), core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), core::mem::transmute(niconsize)) + SHDefExtractIconA(psziconfile.param().abi(), core::mem::transmute(iindex), core::mem::transmute(uflags), core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), core::mem::transmute(niconsize)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -2996,152 +2874,125 @@ 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(), core::mem::transmute(iindex), core::mem::transmute(uflags), core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), core::mem::transmute(niconsize)) + SHDefExtractIconW(psziconfile.param().abi(), core::mem::transmute(iindex), core::mem::transmute(uflags), core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), core::mem::transmute(niconsize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHDeleteEmptyKeyA(hkey: P0, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteEmptyKeyA(hkey: super::super::System::Registry::HKEY, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHDeleteEmptyKeyA(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteEmptyKeyA(hkey.param().abi(), pszsubkey.param().abi()) + SHDeleteEmptyKeyA(core::mem::transmute(hkey), pszsubkey.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHDeleteEmptyKeyW(hkey: P0, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteEmptyKeyW(hkey: super::super::System::Registry::HKEY, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHDeleteEmptyKeyW(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteEmptyKeyW(hkey.param().abi(), pszsubkey.param().abi()) + SHDeleteEmptyKeyW(core::mem::transmute(hkey), pszsubkey.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHDeleteKeyA(hkey: P0, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteKeyA(hkey: super::super::System::Registry::HKEY, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHDeleteKeyA(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteKeyA(hkey.param().abi(), pszsubkey.param().abi()) + SHDeleteKeyA(core::mem::transmute(hkey), pszsubkey.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHDeleteKeyW(hkey: P0, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteKeyW(hkey: super::super::System::Registry::HKEY, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHDeleteKeyW(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteKeyW(hkey.param().abi(), pszsubkey.param().abi()) + SHDeleteKeyW(core::mem::transmute(hkey), pszsubkey.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHDeleteValueA(hkey: P0, pszsubkey: P1, pszvalue: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteValueA(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHDeleteValueA(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteValueA(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi()) + SHDeleteValueA(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHDeleteValueW(hkey: P0, pszsubkey: P1, pszvalue: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteValueW(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHDeleteValueW(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteValueW(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi()) + SHDeleteValueW(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi()) } #[inline] -pub unsafe fn SHDestroyPropSheetExtArray(hpsxa: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn SHDestroyPropSheetExtArray(hpsxa: HPSXA) { windows_targets::link!("shell32.dll" "system" fn SHDestroyPropSheetExtArray(hpsxa : HPSXA)); - SHDestroyPropSheetExtArray(hpsxa.param().abi()) + SHDestroyPropSheetExtArray(core::mem::transmute(hpsxa)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] -pub unsafe fn SHDoDragDrop(hwnd: P0, pdata: P1, pdsrc: P2, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result +pub unsafe fn SHDoDragDrop(hwnd: Option, pdata: P1, pdsrc: P2, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHDoDragDrop(hwnd : super::super::Foundation:: HWND, pdata : * mut core::ffi::c_void, pdsrc : * mut core::ffi::c_void, dweffect : super::super::System::Ole:: DROPEFFECT, pdweffect : *mut super::super::System::Ole:: DROPEFFECT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SHDoDragDrop(hwnd.param().abi(), pdata.param().abi(), pdsrc.param().abi(), core::mem::transmute(dweffect), &mut result__).map(|| core::mem::transmute(result__)) + SHDoDragDrop(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pdata.param().abi(), pdsrc.param().abi(), core::mem::transmute(dweffect), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn SHEmptyRecycleBinA(hwnd: P0, pszrootpath: P1, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SHEmptyRecycleBinA(hwnd: Option, pszrootpath: P1, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHEmptyRecycleBinA(hwnd : super::super::Foundation:: HWND, pszrootpath : windows_core::PCSTR, dwflags : u32) -> windows_core::HRESULT); - SHEmptyRecycleBinA(hwnd.param().abi(), pszrootpath.param().abi(), core::mem::transmute(dwflags)).ok() + SHEmptyRecycleBinA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszrootpath.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SHEmptyRecycleBinW(hwnd: P0, pszrootpath: P1, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SHEmptyRecycleBinW(hwnd: Option, pszrootpath: P1, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHEmptyRecycleBinW(hwnd : super::super::Foundation:: HWND, pszrootpath : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - SHEmptyRecycleBinW(hwnd.param().abi(), pszrootpath.param().abi(), core::mem::transmute(dwflags)).ok() + SHEmptyRecycleBinW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszrootpath.param().abi(), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHEnumKeyExA(hkey: P0, dwindex: u32, pszname: windows_core::PSTR, pcchname: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SHEnumKeyExA(hkey: super::super::System::Registry::HKEY, dwindex: u32, pszname: windows_core::PSTR, pcchname: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("shlwapi.dll" "system" fn SHEnumKeyExA(hkey : super::super::System::Registry:: HKEY, dwindex : u32, pszname : windows_core::PSTR, pcchname : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHEnumKeyExA(hkey.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pszname), core::mem::transmute(pcchname)) + SHEnumKeyExA(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(pszname), core::mem::transmute(pcchname)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHEnumKeyExW(hkey: P0, dwindex: u32, pszname: windows_core::PWSTR, pcchname: *mut u32) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SHEnumKeyExW(hkey: super::super::System::Registry::HKEY, dwindex: u32, pszname: windows_core::PWSTR, pcchname: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("shlwapi.dll" "system" fn SHEnumKeyExW(hkey : super::super::System::Registry:: HKEY, dwindex : u32, pszname : windows_core::PWSTR, pcchname : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHEnumKeyExW(hkey.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pszname), core::mem::transmute(pcchname)) + SHEnumKeyExW(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(pszname), core::mem::transmute(pcchname)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHEnumValueA(hkey: P0, dwindex: u32, pszvaluename: windows_core::PSTR, pcchvaluename: Option<*mut u32>, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SHEnumValueA(hkey: super::super::System::Registry::HKEY, dwindex: u32, pszvaluename: Option, pcchvaluename: Option<*mut u32>, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(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()))) + SHEnumValueA(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(pszvaluename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHEnumValueW(hkey: P0, dwindex: u32, pszvaluename: windows_core::PWSTR, pcchvaluename: Option<*mut u32>, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SHEnumValueW(hkey: super::super::System::Registry::HKEY, dwindex: u32, pszvaluename: Option, pcchvaluename: Option<*mut u32>, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(), core::mem::transmute(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()))) + SHEnumValueW(core::mem::transmute(hkey), core::mem::transmute(dwindex), core::mem::transmute(pszvaluename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchvaluename.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHEnumerateUnreadMailAccountsW(hkeyuser: P0, dwindex: u32, pszmailaddress: &mut [u16]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SHEnumerateUnreadMailAccountsW(hkeyuser: Option, dwindex: u32, pszmailaddress: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn SHEnumerateUnreadMailAccountsW(hkeyuser : super::super::System::Registry:: HKEY, dwindex : u32, pszmailaddress : windows_core::PWSTR, cchmailaddress : i32) -> windows_core::HRESULT); - SHEnumerateUnreadMailAccountsW(hkeyuser.param().abi(), core::mem::transmute(dwindex), core::mem::transmute(pszmailaddress.as_ptr()), pszmailaddress.len().try_into().unwrap()).ok() + SHEnumerateUnreadMailAccountsW(core::mem::transmute(hkeyuser.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwindex), core::mem::transmute(pszmailaddress.as_ptr()), pszmailaddress.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn SHEvaluateSystemCommandTemplate(pszcmdtemplate: P0, ppszapplication: *mut windows_core::PWSTR, ppszcommandline: Option<*mut windows_core::PWSTR>, ppszparameters: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -3149,7 +3000,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(), core::mem::transmute(ppszapplication), core::mem::transmute(ppszcommandline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppszparameters.unwrap_or(core::ptr::null_mut()))).ok() + SHEvaluateSystemCommandTemplate(pszcmdtemplate.param().abi(), core::mem::transmute(ppszapplication), core::mem::transmute(ppszcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppszparameters.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SHFileOperationA(lpfileop: *mut SHFILEOPSTRUCTA) -> i32 { @@ -3165,17 +3016,13 @@ 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(core::ptr::null())), core::mem::transmute(pidlsavefile.unwrap_or(core::ptr::null()))) + SHFindFiles(core::mem::transmute(pidlfolder.unwrap_or(core::mem::zeroed())), core::mem::transmute(pidlsavefile.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SHFind_InitMenuPopup(hmenu: P0, hwndowner: P1, idcmdfirst: u32, idcmdlast: u32) -> Option -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SHFind_InitMenuPopup(hmenu: super::WindowsAndMessaging::HMENU, hwndowner: Option, idcmdfirst: u32, idcmdlast: u32) -> Option { windows_targets::link!("shell32.dll" "system" fn SHFind_InitMenuPopup(hmenu : super::WindowsAndMessaging:: HMENU, hwndowner : super::super::Foundation:: HWND, idcmdfirst : u32, idcmdlast : u32) -> Option < IContextMenu >); - SHFind_InitMenuPopup(hmenu.param().abi(), hwndowner.param().abi(), core::mem::transmute(idcmdfirst), core::mem::transmute(idcmdlast)) + SHFind_InitMenuPopup(core::mem::transmute(hmenu), core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(idcmdfirst), core::mem::transmute(idcmdlast)) } #[inline] pub unsafe fn SHFlushSFCache() { @@ -3185,41 +3032,32 @@ 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(core::mem::transmute(pft), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) + SHFormatDateTimeA(core::mem::transmute(pft), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(pft), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) + SHFormatDateTimeW(core::mem::transmute(pft), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed())), 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 -where - P0: windows_core::Param, -{ +pub unsafe fn SHFormatDrive(hwnd: super::super::Foundation::HWND, drive: u32, fmtid: SHFMT_ID, options: SHFMT_OPT) -> u32 { windows_targets::link!("shell32.dll" "system" fn SHFormatDrive(hwnd : super::super::Foundation:: HWND, drive : u32, fmtid : SHFMT_ID, options : u32) -> u32); - SHFormatDrive(hwnd.param().abi(), core::mem::transmute(drive), core::mem::transmute(fmtid), options.0 as _) + SHFormatDrive(core::mem::transmute(hwnd), core::mem::transmute(drive), core::mem::transmute(fmtid), options.0 as _) } #[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(core::ptr::null()))) + SHFree(core::mem::transmute(pv.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SHFreeNameMappings(hnamemappings: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn SHFreeNameMappings(hnamemappings: Option) { windows_targets::link!("shell32.dll" "system" fn SHFreeNameMappings(hnamemappings : super::super::Foundation:: HANDLE)); - SHFreeNameMappings(hnamemappings.param().abi()) + SHFreeNameMappings(core::mem::transmute(hnamemappings.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SHFreeShared(hdata: P0, dwprocessid: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SHFreeShared(hdata: super::super::Foundation::HANDLE, dwprocessid: u32) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn SHFreeShared(hdata : super::super::Foundation:: HANDLE, dwprocessid : u32) -> super::super::Foundation:: BOOL); - SHFreeShared(hdata.param().abi(), core::mem::transmute(dwprocessid)).ok() + SHFreeShared(core::mem::transmute(hdata), core::mem::transmute(dwprocessid)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -3228,7 +3066,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(), core::mem::transmute(dwattributemask), core::mem::transmute(pdwattributes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcitems.unwrap_or(core::ptr::null_mut()))) + SHGetAttributesFromDataObject(pdo.param().abi(), core::mem::transmute(dwattributemask), core::mem::transmute(pdwattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcitems.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3260,7 +3098,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(core::ptr::null_mut())), core::mem::transmute(pultotalnumberofbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pultotalnumberoffreebytes.unwrap_or(core::ptr::null_mut()))) + SHGetDiskFreeSpaceExA(pszdirectoryname.param().abi(), core::mem::transmute(pulfreebytesavailabletocaller.unwrap_or(core::mem::zeroed())), core::mem::transmute(pultotalnumberofbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pultotalnumberoffreebytes.unwrap_or(core::mem::zeroed()))) } #[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 +3106,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(core::ptr::null_mut())), core::mem::transmute(pultotalnumberofbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pultotalnumberoffreebytes.unwrap_or(core::ptr::null_mut()))) + SHGetDiskFreeSpaceExW(pszdirectoryname.param().abi(), core::mem::transmute(pulfreebytesavailabletocaller.unwrap_or(core::mem::zeroed())), core::mem::transmute(pultotalnumberofbytes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pultotalnumberoffreebytes.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SHGetDriveMedia(pszdrive: P0) -> windows_core::Result @@ -3286,7 +3124,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(), core::mem::transmute(dwfileattributes), core::mem::transmute(psfi.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbfileinfo), core::mem::transmute(uflags)) + SHGetFileInfoA(pszpath.param().abi(), core::mem::transmute(dwfileattributes), core::mem::transmute(psfi.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbfileinfo), core::mem::transmute(uflags)) } #[cfg(all(feature = "Win32_Storage_FileSystem", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] @@ -3295,56 +3133,40 @@ 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(), core::mem::transmute(dwfileattributes), core::mem::transmute(psfi.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cbfileinfo), core::mem::transmute(uflags)) + SHGetFileInfoW(pszpath.param().abi(), core::mem::transmute(dwfileattributes), core::mem::transmute(psfi.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbfileinfo), core::mem::transmute(uflags)) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn SHGetFolderLocation(hwnd: P0, csidl: i32, htoken: P2, dwflags: u32) -> windows_core::Result<*mut Common::ITEMIDLIST> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SHGetFolderLocation(hwnd: Option, csidl: i32, htoken: Option, dwflags: u32) -> windows_core::Result<*mut Common::ITEMIDLIST> { windows_targets::link!("shell32.dll" "system" fn SHGetFolderLocation(hwnd : super::super::Foundation:: HWND, csidl : i32, htoken : super::super::Foundation:: HANDLE, dwflags : u32, ppidl : *mut *mut Common:: ITEMIDLIST) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SHGetFolderLocation(hwnd.param().abi(), core::mem::transmute(csidl), htoken.param().abi(), core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) + SHGetFolderLocation(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn SHGetFolderPathA(hwnd: P0, csidl: i32, htoken: P2, dwflags: u32, pszpath: &mut [u8; 260]) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SHGetFolderPathA(hwnd: Option, csidl: i32, htoken: Option, dwflags: u32, pszpath: &mut [u8; 260]) -> windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn SHGetFolderPathA(hwnd : super::super::Foundation:: HWND, csidl : i32, htoken : super::super::Foundation:: HANDLE, dwflags : u32, pszpath : windows_core::PSTR) -> windows_core::HRESULT); - SHGetFolderPathA(hwnd.param().abi(), core::mem::transmute(csidl), htoken.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pszpath.as_ptr())).ok() + SHGetFolderPathA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pszpath.as_ptr())).ok() } #[inline] -pub unsafe fn SHGetFolderPathAndSubDirA(hwnd: P0, csidl: i32, htoken: P2, dwflags: u32, pszsubdir: P4, pszpath: &mut [u8; 260]) -> windows_core::Result<()> +pub unsafe fn SHGetFolderPathAndSubDirA(hwnd: Option, csidl: i32, htoken: Option, dwflags: u32, pszsubdir: P4, pszpath: &mut [u8; 260]) -> windows_core::Result<()> where - P0: windows_core::Param, - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetFolderPathAndSubDirA(hwnd : super::super::Foundation:: HWND, csidl : i32, htoken : super::super::Foundation:: HANDLE, dwflags : u32, pszsubdir : windows_core::PCSTR, pszpath : windows_core::PSTR) -> windows_core::HRESULT); - SHGetFolderPathAndSubDirA(hwnd.param().abi(), core::mem::transmute(csidl), htoken.param().abi(), core::mem::transmute(dwflags), pszsubdir.param().abi(), core::mem::transmute(pszpath.as_ptr())).ok() + SHGetFolderPathAndSubDirA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), pszsubdir.param().abi(), core::mem::transmute(pszpath.as_ptr())).ok() } #[inline] -pub unsafe fn SHGetFolderPathAndSubDirW(hwnd: P0, csidl: i32, htoken: P2, dwflags: u32, pszsubdir: P4, pszpath: &mut [u16; 260]) -> windows_core::Result<()> +pub unsafe fn SHGetFolderPathAndSubDirW(hwnd: Option, csidl: i32, htoken: Option, dwflags: u32, pszsubdir: P4, pszpath: &mut [u16; 260]) -> windows_core::Result<()> where - P0: windows_core::Param, - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetFolderPathAndSubDirW(hwnd : super::super::Foundation:: HWND, csidl : i32, htoken : super::super::Foundation:: HANDLE, dwflags : u32, pszsubdir : windows_core::PCWSTR, pszpath : windows_core::PWSTR) -> windows_core::HRESULT); - SHGetFolderPathAndSubDirW(hwnd.param().abi(), core::mem::transmute(csidl), htoken.param().abi(), core::mem::transmute(dwflags), pszsubdir.param().abi(), core::mem::transmute(pszpath.as_ptr())).ok() + SHGetFolderPathAndSubDirW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), pszsubdir.param().abi(), core::mem::transmute(pszpath.as_ptr())).ok() } #[inline] -pub unsafe fn SHGetFolderPathW(hwnd: P0, csidl: i32, htoken: P2, dwflags: u32, pszpath: &mut [u16; 260]) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SHGetFolderPathW(hwnd: Option, csidl: i32, htoken: Option, dwflags: u32, pszpath: &mut [u16; 260]) -> windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn SHGetFolderPathW(hwnd : super::super::Foundation:: HWND, csidl : i32, htoken : super::super::Foundation:: HANDLE, dwflags : u32, pszpath : windows_core::PWSTR) -> windows_core::HRESULT); - SHGetFolderPathW(hwnd.param().abi(), core::mem::transmute(csidl), htoken.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pszpath.as_ptr())).ok() + SHGetFolderPathW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), core::mem::transmute(pszpath.as_ptr())).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3415,32 +3237,25 @@ where } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn SHGetKnownFolderIDList(rfid: *const windows_core::GUID, dwflags: u32, htoken: P2) -> windows_core::Result<*mut Common::ITEMIDLIST> -where - P2: windows_core::Param, -{ +pub unsafe fn SHGetKnownFolderIDList(rfid: *const windows_core::GUID, dwflags: u32, htoken: Option) -> windows_core::Result<*mut Common::ITEMIDLIST> { windows_targets::link!("shell32.dll" "system" fn SHGetKnownFolderIDList(rfid : *const windows_core::GUID, dwflags : u32, htoken : super::super::Foundation:: HANDLE, ppidl : *mut *mut Common:: ITEMIDLIST) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SHGetKnownFolderIDList(core::mem::transmute(rfid), core::mem::transmute(dwflags), htoken.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + SHGetKnownFolderIDList(core::mem::transmute(rfid), core::mem::transmute(dwflags), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn SHGetKnownFolderItem(rfid: *const windows_core::GUID, flags: KNOWN_FOLDER_FLAG, htoken: P2) -> windows_core::Result +pub unsafe fn SHGetKnownFolderItem(rfid: *const windows_core::GUID, flags: KNOWN_FOLDER_FLAG, htoken: Option) -> windows_core::Result where - P2: windows_core::Param, T: windows_core::Interface, { windows_targets::link!("shell32.dll" "system" fn SHGetKnownFolderItem(rfid : *const windows_core::GUID, flags : KNOWN_FOLDER_FLAG, htoken : super::super::Foundation:: HANDLE, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHGetKnownFolderItem(core::mem::transmute(rfid), core::mem::transmute(flags), htoken.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHGetKnownFolderItem(core::mem::transmute(rfid), core::mem::transmute(flags), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn SHGetKnownFolderPath(rfid: *const windows_core::GUID, dwflags: KNOWN_FOLDER_FLAG, htoken: P2) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn SHGetKnownFolderPath(rfid: *const windows_core::GUID, dwflags: KNOWN_FOLDER_FLAG, htoken: Option) -> windows_core::Result { windows_targets::link!("shell32.dll" "system" fn SHGetKnownFolderPath(rfid : *const windows_core::GUID, dwflags : u32, htoken : super::super::Foundation:: HANDLE, ppszpath : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SHGetKnownFolderPath(core::mem::transmute(rfid), dwflags.0 as _, htoken.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + SHGetKnownFolderPath(core::mem::transmute(rfid), dwflags.0 as _, core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn SHGetLocalizedName(pszpath: P0, pszresmodule: &mut [u16], pidsres: *mut i32) -> windows_core::Result<()> @@ -3524,7 +3339,7 @@ where P2: 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(core::ptr::null_mut())), core::mem::transmute(dwmask), bset.param().abi()) + SHGetSetSettings(core::mem::transmute(lpss.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmask), bset.param().abi()) } #[inline] pub unsafe fn SHGetSettings(psfs: *mut SHELLFLAGSTATE, dwmask: u32) { @@ -3533,31 +3348,26 @@ pub unsafe fn SHGetSettings(psfs: *mut SHELLFLAGSTATE, dwmask: u32) { } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn SHGetSpecialFolderLocation(hwnd: P0, csidl: i32) -> windows_core::Result<*mut Common::ITEMIDLIST> -where - P0: windows_core::Param, -{ +pub unsafe fn SHGetSpecialFolderLocation(hwnd: Option, csidl: i32) -> windows_core::Result<*mut Common::ITEMIDLIST> { windows_targets::link!("shell32.dll" "system" fn SHGetSpecialFolderLocation(hwnd : super::super::Foundation:: HWND, csidl : i32, ppidl : *mut *mut Common:: ITEMIDLIST) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SHGetSpecialFolderLocation(hwnd.param().abi(), core::mem::transmute(csidl), &mut result__).map(|| core::mem::transmute(result__)) + SHGetSpecialFolderLocation(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn SHGetSpecialFolderPathA(hwnd: P0, pszpath: &mut [u8; 260], csidl: i32, fcreate: P3) -> super::super::Foundation::BOOL +pub unsafe fn SHGetSpecialFolderPathA(hwnd: Option, pszpath: &mut [u8; 260], csidl: i32, fcreate: P3) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetSpecialFolderPathA(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PSTR, csidl : i32, fcreate : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHGetSpecialFolderPathA(hwnd.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(csidl), fcreate.param().abi()) + SHGetSpecialFolderPathA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(csidl), fcreate.param().abi()) } #[inline] -pub unsafe fn SHGetSpecialFolderPathW(hwnd: P0, pszpath: &mut [u16; 260], csidl: i32, fcreate: P3) -> super::super::Foundation::BOOL +pub unsafe fn SHGetSpecialFolderPathW(hwnd: Option, pszpath: &mut [u16; 260], csidl: i32, fcreate: P3) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetSpecialFolderPathW(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PWSTR, csidl : i32, fcreate : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHGetSpecialFolderPathW(hwnd.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(csidl), fcreate.param().abi()) + SHGetSpecialFolderPathW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(csidl), fcreate.param().abi()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -3583,35 +3393,32 @@ pub unsafe fn SHGetThreadRef() -> windows_core::Result { } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHGetUnreadMailCountW(hkeyuser: P0, pszmailaddress: P1, pdwcount: Option<*mut u32>, pfiletime: Option<*mut super::super::Foundation::FILETIME>, pszshellexecutecommand: Option<&mut [u16]>) -> windows_core::Result<()> +pub unsafe fn SHGetUnreadMailCountW(hkeyuser: Option, pszmailaddress: P1, pdwcount: Option<*mut u32>, pfiletime: Option<*mut super::super::Foundation::FILETIME>, pszshellexecutecommand: Option<&mut [u16]>) -> windows_core::Result<()> where - P0: windows_core::Param, 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(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() + SHGetUnreadMailCountW(core::mem::transmute(hkeyuser.unwrap_or(core::mem::zeroed())), pszmailaddress.param().abi(), core::mem::transmute(pdwcount.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfiletime.unwrap_or(core::mem::zeroed())), 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] -pub unsafe fn SHGetValueA(hkey: P0, pszsubkey: P1, pszvalue: P2, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHGetValueA(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) + SHGetValueA(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHGetValueW(hkey: P0, pszsubkey: P1, pszvalue: P2, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHGetValueW(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, 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(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) + SHGetValueW(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3622,7 +3429,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(core::ptr::null())), pszbagname.param().abi(), core::mem::transmute(dwflags), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHGetViewStatePropertyBag(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), pszbagname.param().abi(), core::mem::transmute(dwflags), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn SHGlobalCounterDecrement(id: SHGLOBALCOUNTER) -> i32 { @@ -3652,29 +3459,27 @@ 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(), core::mem::transmute(ppidl), core::mem::transmute(rgfinout.unwrap_or(core::ptr::null_mut()))).ok() + SHILCreateFromPath(pszpath.param().abi(), core::mem::transmute(ppidl), core::mem::transmute(rgfinout.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SHInvokePrinterCommandA(hwnd: P0, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: P4) -> super::super::Foundation::BOOL +pub unsafe fn SHInvokePrinterCommandA(hwnd: Option, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: P4) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHInvokePrinterCommandA(hwnd : super::super::Foundation:: HWND, uaction : u32, lpbuf1 : windows_core::PCSTR, lpbuf2 : windows_core::PCSTR, fmodal : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHInvokePrinterCommandA(hwnd.param().abi(), core::mem::transmute(uaction), lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.param().abi()) + SHInvokePrinterCommandA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(uaction), lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.param().abi()) } #[inline] -pub unsafe fn SHInvokePrinterCommandW(hwnd: P0, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: P4) -> super::super::Foundation::BOOL +pub unsafe fn SHInvokePrinterCommandW(hwnd: Option, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: P4) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHInvokePrinterCommandW(hwnd : super::super::Foundation:: HWND, uaction : u32, lpbuf1 : windows_core::PCWSTR, lpbuf2 : windows_core::PCWSTR, fmodal : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHInvokePrinterCommandW(hwnd.param().abi(), core::mem::transmute(uaction), lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.param().abi()) + SHInvokePrinterCommandW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(uaction), lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.param().abi()) } #[inline] pub unsafe fn SHIsFileAvailableOffline(pwszpath: P0, pdwstatus: Option<*mut u32>) -> windows_core::Result<()> @@ -3682,7 +3487,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(core::ptr::null_mut()))).ok() + SHIsFileAvailableOffline(pwszpath.param().abi(), core::mem::transmute(pdwstatus.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn SHIsLowMemoryMachine(dwtype: u32) -> super::super::Foundation::BOOL { @@ -3690,13 +3495,12 @@ pub unsafe fn SHIsLowMemoryMachine(dwtype: u32) -> super::super::Foundation::BOO SHIsLowMemoryMachine(core::mem::transmute(dwtype)) } #[inline] -pub unsafe fn SHLimitInputEdit(hwndedit: P0, psf: P1) -> windows_core::Result<()> +pub unsafe fn SHLimitInputEdit(hwndedit: super::super::Foundation::HWND, psf: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHLimitInputEdit(hwndedit : super::super::Foundation:: HWND, psf : * mut core::ffi::c_void) -> windows_core::HRESULT); - SHLimitInputEdit(hwndedit.param().abi(), psf.param().abi()).ok() + SHLimitInputEdit(core::mem::transmute(hwndedit), psf.param().abi()).ok() } #[inline] pub unsafe fn SHLoadInProc(rclsid: *const windows_core::GUID) -> windows_core::Result<()> { @@ -3709,7 +3513,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(core::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::mem::zeroed()))).ok() } #[inline] pub unsafe fn SHLoadNonloadedIconOverlayIdentifiers() -> windows_core::Result<()> { @@ -3717,12 +3521,9 @@ pub unsafe fn SHLoadNonloadedIconOverlayIdentifiers() -> windows_core::Result<() SHLoadNonloadedIconOverlayIdentifiers().ok() } #[inline] -pub unsafe fn SHLockShared(hdata: P0, dwprocessid: u32) -> *mut core::ffi::c_void -where - P0: windows_core::Param, -{ +pub unsafe fn SHLockShared(hdata: super::super::Foundation::HANDLE, dwprocessid: u32) -> *mut core::ffi::c_void { windows_targets::link!("shlwapi.dll" "system" fn SHLockShared(hdata : super::super::Foundation:: HANDLE, dwprocessid : u32) -> *mut core::ffi::c_void); - SHLockShared(hdata.param().abi(), core::mem::transmute(dwprocessid)) + SHLockShared(core::mem::transmute(hdata), core::mem::transmute(dwprocessid)) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3731,29 +3532,27 @@ 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(), core::mem::transmute(pidl), core::mem::transmute(piindexsel.unwrap_or(core::ptr::null_mut()))) + SHMapPIDLToSystemImageListIndex(pshf.param().abi(), core::mem::transmute(pidl), core::mem::transmute(piindexsel.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SHMessageBoxCheckA(hwnd: P0, psztext: P1, pszcaption: P2, utype: u32, idefault: i32, pszregval: P5) -> i32 +pub unsafe fn SHMessageBoxCheckA(hwnd: Option, psztext: P1, pszcaption: P2, utype: u32, idefault: i32, pszregval: P5) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHMessageBoxCheckA(hwnd : super::super::Foundation:: HWND, psztext : windows_core::PCSTR, pszcaption : windows_core::PCSTR, utype : u32, idefault : i32, pszregval : windows_core::PCSTR) -> i32); - SHMessageBoxCheckA(hwnd.param().abi(), psztext.param().abi(), pszcaption.param().abi(), core::mem::transmute(utype), core::mem::transmute(idefault), pszregval.param().abi()) + SHMessageBoxCheckA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psztext.param().abi(), pszcaption.param().abi(), core::mem::transmute(utype), core::mem::transmute(idefault), pszregval.param().abi()) } #[inline] -pub unsafe fn SHMessageBoxCheckW(hwnd: P0, psztext: P1, pszcaption: P2, utype: u32, idefault: i32, pszregval: P5) -> i32 +pub unsafe fn SHMessageBoxCheckW(hwnd: Option, psztext: P1, pszcaption: P2, utype: u32, idefault: i32, pszregval: P5) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHMessageBoxCheckW(hwnd : super::super::Foundation:: HWND, psztext : windows_core::PCWSTR, pszcaption : windows_core::PCWSTR, utype : u32, idefault : i32, pszregval : windows_core::PCWSTR) -> i32); - SHMessageBoxCheckW(hwnd.param().abi(), psztext.param().abi(), pszcaption.param().abi(), core::mem::transmute(utype), core::mem::transmute(idefault), pszregval.param().abi()) + SHMessageBoxCheckW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psztext.param().abi(), pszcaption.param().abi(), core::mem::transmute(utype), core::mem::transmute(idefault), pszregval.param().abi()) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -3765,14 +3564,13 @@ where SHMultiFileProperties(pdtobj.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SHObjectProperties(hwnd: P0, shopobjecttype: SHOP_TYPE, pszobjectname: P2, pszpropertypage: P3) -> super::super::Foundation::BOOL +pub unsafe fn SHObjectProperties(hwnd: Option, shopobjecttype: SHOP_TYPE, pszobjectname: P2, pszpropertypage: P3) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHObjectProperties(hwnd : super::super::Foundation:: HWND, shopobjecttype : u32, pszobjectname : windows_core::PCWSTR, pszpropertypage : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SHObjectProperties(hwnd.param().abi(), shopobjecttype.0 as _, pszobjectname.param().abi(), pszpropertypage.param().abi()) + SHObjectProperties(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), shopobjecttype.0 as _, pszobjectname.param().abi(), pszpropertypage.param().abi()) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3790,59 +3588,52 @@ where P6: 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(core::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::mem::zeroed())), pdtobj.param().abi(), psb.param().abi(), pstartpage.param().abi()) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHOpenRegStream2A(hkey: P0, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option +pub unsafe fn SHOpenRegStream2A(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHOpenRegStream2A(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, grfmode : u32) -> Option < super::super::System::Com:: IStream >); - SHOpenRegStream2A(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) + SHOpenRegStream2A(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHOpenRegStream2W(hkey: P0, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option +pub unsafe fn SHOpenRegStream2W(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHOpenRegStream2W(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, grfmode : u32) -> Option < super::super::System::Com:: IStream >); - SHOpenRegStream2W(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) + SHOpenRegStream2W(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHOpenRegStreamA(hkey: P0, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option +pub unsafe fn SHOpenRegStreamA(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHOpenRegStreamA(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, grfmode : u32) -> Option < super::super::System::Com:: IStream >); - SHOpenRegStreamA(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) + SHOpenRegStreamA(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHOpenRegStreamW(hkey: P0, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option +pub unsafe fn SHOpenRegStreamW(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, grfmode: u32) -> Option where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHOpenRegStreamW(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, grfmode : u32) -> Option < super::super::System::Com:: IStream >); - SHOpenRegStreamW(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) + SHOpenRegStreamW(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(grfmode)) } #[inline] -pub unsafe fn SHOpenWithDialog(hwndparent: P0, poainfo: *const OPENASINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SHOpenWithDialog(hwndparent: Option, poainfo: *const OPENASINFO) -> windows_core::Result<()> { windows_targets::link!("shell32.dll" "system" fn SHOpenWithDialog(hwndparent : super::super::Foundation:: HWND, poainfo : *const OPENASINFO) -> windows_core::HRESULT); - SHOpenWithDialog(hwndparent.param().abi(), core::mem::transmute(poainfo)).ok() + SHOpenWithDialog(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(poainfo)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -3852,45 +3643,37 @@ 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(), core::mem::transmute(ppidl), core::mem::transmute(sfgaoin), core::mem::transmute(psfgaoout.unwrap_or(core::ptr::null_mut()))).ok() + SHParseDisplayName(pszname.param().abi(), pbc.param().abi(), core::mem::transmute(ppidl), core::mem::transmute(sfgaoin), core::mem::transmute(psfgaoout.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SHPathPrepareForWriteA(hwnd: P0, punkenablemodless: P1, pszpath: P2, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SHPathPrepareForWriteA(hwnd: Option, punkenablemodless: P1, pszpath: P2, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHPathPrepareForWriteA(hwnd : super::super::Foundation:: HWND, punkenablemodless : * mut core::ffi::c_void, pszpath : windows_core::PCSTR, dwflags : u32) -> windows_core::HRESULT); - SHPathPrepareForWriteA(hwnd.param().abi(), punkenablemodless.param().abi(), pszpath.param().abi(), core::mem::transmute(dwflags)).ok() + SHPathPrepareForWriteA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), punkenablemodless.param().abi(), pszpath.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SHPathPrepareForWriteW(hwnd: P0, punkenablemodless: P1, pszpath: P2, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn SHPathPrepareForWriteW(hwnd: Option, punkenablemodless: P1, pszpath: P2, dwflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHPathPrepareForWriteW(hwnd : super::super::Foundation:: HWND, punkenablemodless : * mut core::ffi::c_void, pszpath : windows_core::PCWSTR, dwflags : u32) -> windows_core::HRESULT); - SHPathPrepareForWriteW(hwnd.param().abi(), punkenablemodless.param().abi(), pszpath.param().abi(), core::mem::transmute(dwflags)).ok() + SHPathPrepareForWriteW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), punkenablemodless.param().abi(), pszpath.param().abi(), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHQueryInfoKeyA(hkey: P0, pcsubkeys: Option<*mut u32>, pcchmaxsubkeylen: Option<*mut u32>, pcvalues: Option<*mut u32>, pcchmaxvaluenamelen: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SHQueryInfoKeyA(hkey: super::super::System::Registry::HKEY, pcsubkeys: Option<*mut u32>, pcchmaxsubkeylen: Option<*mut u32>, pcvalues: Option<*mut u32>, pcchmaxvaluenamelen: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(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()))) + SHQueryInfoKeyA(core::mem::transmute(hkey), core::mem::transmute(pcsubkeys.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcvalues.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHQueryInfoKeyW(hkey: P0, pcsubkeys: Option<*mut u32>, pcchmaxsubkeylen: Option<*mut u32>, pcvalues: Option<*mut u32>, pcchmaxvaluenamelen: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR -where - P0: windows_core::Param, -{ +pub unsafe fn SHQueryInfoKeyW(hkey: super::super::System::Registry::HKEY, pcsubkeys: Option<*mut u32>, pcchmaxsubkeylen: Option<*mut u32>, pcvalues: Option<*mut u32>, pcchmaxvaluenamelen: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR { 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(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()))) + SHQueryInfoKeyW(core::mem::transmute(hkey), core::mem::transmute(pcsubkeys.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcvalues.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SHQueryRecycleBinA(pszrootpath: P0, pshqueryrbinfo: *mut SHQUERYRBINFO) -> windows_core::Result<()> @@ -3916,23 +3699,21 @@ pub unsafe fn SHQueryUserNotificationState() -> windows_core::Result(hkey: P0, pszvalue: P1, pdwreserved: Option<*const u32>, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHQueryValueExA(hkey: super::super::System::Registry::HKEY, pszvalue: P1, pdwreserved: Option<*const u32>, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, 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(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()))) + SHQueryValueExA(core::mem::transmute(hkey), pszvalue.param().abi(), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHQueryValueExW(hkey: P0, pszvalue: P1, pdwreserved: Option<*const u32>, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHQueryValueExW(hkey: super::super::System::Registry::HKEY, pszvalue: P1, pdwreserved: Option<*const u32>, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, 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(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()))) + SHQueryValueExW(core::mem::transmute(hkey), pszvalue.param().abi(), core::mem::transmute(pdwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SHRegCloseUSKey(huskey: isize) -> super::super::Foundation::WIN32_ERROR { @@ -3940,20 +3721,20 @@ pub unsafe fn SHRegCloseUSKey(huskey: isize) -> super::super::Foundation::WIN32_ SHRegCloseUSKey(core::mem::transmute(huskey)) } #[inline] -pub unsafe fn SHRegCreateUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegCreateUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, dwflags: u32) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegCreateUSKeyA(pszpath : windows_core::PCSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegCreateUSKeyA(pszpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey), core::mem::transmute(phnewuskey), core::mem::transmute(dwflags)) + SHRegCreateUSKeyA(pszpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn SHRegCreateUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegCreateUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, dwflags: u32) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegCreateUSKeyW(pwzpath : windows_core::PCWSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegCreateUSKeyW(pwzpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey), core::mem::transmute(phnewuskey), core::mem::transmute(dwflags)) + SHRegCreateUSKeyW(pwzpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn SHRegDeleteEmptyUSKeyA(huskey: isize, pszsubkey: P1, delregflags: SHREGDEL_FLAGS) -> super::super::Foundation::WIN32_ERROR @@ -3989,12 +3770,9 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHRegDuplicateHKey(hkey: P0) -> super::super::System::Registry::HKEY -where - P0: windows_core::Param, -{ +pub unsafe fn SHRegDuplicateHKey(hkey: super::super::System::Registry::HKEY) -> super::super::System::Registry::HKEY { windows_targets::link!("shlwapi.dll" "system" fn SHRegDuplicateHKey(hkey : super::super::System::Registry:: HKEY) -> super::super::System::Registry:: HKEY); - SHRegDuplicateHKey(hkey.param().abi()) + SHRegDuplicateHKey(core::mem::transmute(hkey)) } #[inline] pub unsafe fn SHRegEnumUSKeyA(huskey: isize, dwindex: u32, pszname: windows_core::PSTR, pcchname: *mut u32, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { @@ -4009,12 +3787,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(core::mem::transmute(huskey), core::mem::transmute(dwindex), core::mem::transmute(pszvaluename), core::mem::transmute(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())), core::mem::transmute(enumregflags)) + SHRegEnumUSValueA(core::mem::transmute(huskey), core::mem::transmute(dwindex), core::mem::transmute(pszvaluename), core::mem::transmute(pcchvaluename), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(huskey), core::mem::transmute(dwindex), core::mem::transmute(pszvaluename), core::mem::transmute(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())), core::mem::transmute(enumregflags)) + SHRegEnumUSValueW(core::mem::transmute(huskey), core::mem::transmute(dwindex), core::mem::transmute(pszvaluename), core::mem::transmute(pcchvaluename), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumregflags)) } #[inline] pub unsafe fn SHRegGetBoolUSValueA(pszsubkey: P0, pszvalue: P1, fignorehkcu: P2, fdefault: P3) -> super::super::Foundation::BOOL @@ -4040,35 +3818,32 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHRegGetIntW(hk: P0, pwzkey: P1, idefault: i32) -> i32 +pub unsafe fn SHRegGetIntW(hk: super::super::System::Registry::HKEY, pwzkey: P1, idefault: i32) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetIntW(hk : super::super::System::Registry:: HKEY, pwzkey : windows_core::PCWSTR, idefault : i32) -> i32); - SHRegGetIntW(hk.param().abi(), pwzkey.param().abi(), core::mem::transmute(idefault)) + SHRegGetIntW(core::mem::transmute(hk), pwzkey.param().abi(), core::mem::transmute(idefault)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHRegGetPathA(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pszpath: &mut [u8; 260], dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetPathA(hkey: super::super::System::Registry::HKEY, pcszsubkey: P1, pcszvalue: P2, pszpath: &mut [u8; 260], dwflags: u32) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetPathA(hkey : super::super::System::Registry:: HKEY, pcszsubkey : windows_core::PCSTR, pcszvalue : windows_core::PCSTR, pszpath : windows_core::PSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetPathA(hkey.param().abi(), pcszsubkey.param().abi(), pcszvalue.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dwflags)) + SHRegGetPathA(core::mem::transmute(hkey), pcszsubkey.param().abi(), pcszvalue.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dwflags)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHRegGetPathW(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pszpath: &mut [u16; 260], dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetPathW(hkey: super::super::System::Registry::HKEY, pcszsubkey: P1, pcszvalue: P2, pszpath: &mut [u16; 260], dwflags: u32) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetPathW(hkey : super::super::System::Registry:: HKEY, pcszsubkey : windows_core::PCWSTR, pcszvalue : windows_core::PCWSTR, pszpath : windows_core::PWSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetPathW(hkey.param().abi(), pcszsubkey.param().abi(), pcszvalue.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dwflags)) + SHRegGetPathW(core::mem::transmute(hkey), pcszsubkey.param().abi(), pcszvalue.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn SHRegGetUSValueA(pszsubkey: P0, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR @@ -4078,7 +3853,7 @@ where P5: 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(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())), core::mem::transmute(dwdefaultdatasize)) + SHRegGetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(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: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR @@ -4088,18 +3863,17 @@ where P5: 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(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())), core::mem::transmute(dwdefaultdatasize)) + SHRegGetUSValueW(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHRegGetValueA(hkey: P0, pszsubkey: P1, pszvalue: P2, srrfflags: i32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetValueA(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, srrfflags: i32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(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()))) + SHRegGetValueA(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(srrfflags), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[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,106 +3882,103 @@ 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(), core::mem::transmute(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()))) + SHRegGetValueFromHKCUHKLM(pwszkey.param().abi(), pwszvalue.param().abi(), core::mem::transmute(srrfflags), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHRegGetValueW(hkey: P0, pszsubkey: P1, pszvalue: P2, srrfflags: i32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetValueW(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, srrfflags: i32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(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()))) + SHRegGetValueW(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(srrfflags), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SHRegOpenUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, fignorehkcu: P4) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegOpenUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, fignorehkcu: P4) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegOpenUSKeyA(pszpath : windows_core::PCSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, fignorehkcu : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - SHRegOpenUSKeyA(pszpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey), core::mem::transmute(phnewuskey), fignorehkcu.param().abi()) + SHRegOpenUSKeyA(pszpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), fignorehkcu.param().abi()) } #[inline] -pub unsafe fn SHRegOpenUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, fignorehkcu: P4) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegOpenUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, fignorehkcu: P4) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegOpenUSKeyW(pwzpath : windows_core::PCWSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, fignorehkcu : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - SHRegOpenUSKeyW(pwzpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey), core::mem::transmute(phnewuskey), fignorehkcu.param().abi()) + SHRegOpenUSKeyW(pwzpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), fignorehkcu.param().abi()) } #[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(core::mem::transmute(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())), core::mem::transmute(enumregflags)) + SHRegQueryInfoUSKeyA(core::mem::transmute(huskey), core::mem::transmute(pcsubkeys.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcvalues.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(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())), core::mem::transmute(enumregflags)) + SHRegQueryInfoUSKeyW(core::mem::transmute(huskey), core::mem::transmute(pcsubkeys.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcvalues.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumregflags)) } #[inline] -pub unsafe fn SHRegQueryUSValueA(huskey: isize, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegQueryUSValueA(huskey: isize, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: Option) -> super::super::Foundation::WIN32_ERROR where P1: windows_core::Param, P5: 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(core::mem::transmute(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())), core::mem::transmute(dwdefaultdatasize)) + SHRegQueryUSValueA(core::mem::transmute(huskey), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SHRegQueryUSValueW(huskey: isize, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegQueryUSValueW(huskey: isize, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: Option) -> super::super::Foundation::WIN32_ERROR where P1: windows_core::Param, P5: 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(core::mem::transmute(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())), core::mem::transmute(dwdefaultdatasize)) + SHRegQueryUSValueW(core::mem::transmute(huskey), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHRegSetPathA(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pcszpath: P3, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegSetPathA(hkey: super::super::System::Registry::HKEY, pcszsubkey: P1, pcszvalue: P2, pcszpath: P3, dwflags: u32) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegSetPathA(hkey : super::super::System::Registry:: HKEY, pcszsubkey : windows_core::PCSTR, pcszvalue : windows_core::PCSTR, pcszpath : windows_core::PCSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegSetPathA(hkey.param().abi(), pcszsubkey.param().abi(), pcszvalue.param().abi(), pcszpath.param().abi(), core::mem::transmute(dwflags)) + SHRegSetPathA(core::mem::transmute(hkey), pcszsubkey.param().abi(), pcszvalue.param().abi(), pcszpath.param().abi(), core::mem::transmute(dwflags)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHRegSetPathW(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pcszpath: P3, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegSetPathW(hkey: super::super::System::Registry::HKEY, pcszsubkey: P1, pcszvalue: P2, pcszpath: P3, dwflags: u32) -> super::super::Foundation::WIN32_ERROR where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegSetPathW(hkey : super::super::System::Registry:: HKEY, pcszsubkey : windows_core::PCWSTR, pcszvalue : windows_core::PCWSTR, pcszpath : windows_core::PCWSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegSetPathW(hkey.param().abi(), pcszsubkey.param().abi(), pcszvalue.param().abi(), pcszpath.param().abi(), core::mem::transmute(dwflags)) + SHRegSetPathW(core::mem::transmute(hkey), pcszsubkey.param().abi(), pcszvalue.param().abi(), pcszpath.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn SHRegSetUSValueA(pszsubkey: P0, pszvalue: P1, dwtype: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: u32, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegSetUSValueA(pszsubkey: P0, pszvalue: P1, dwtype: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: Option, dwflags: Option) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, 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(), core::mem::transmute(dwtype), core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata), core::mem::transmute(dwflags)) + SHRegSetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))) } #[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 +pub unsafe fn SHRegSetUSValueW(pwzsubkey: P0, pwzvalue: P1, dwtype: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: Option, dwflags: Option) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, 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(), core::mem::transmute(dwtype), core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata), core::mem::transmute(dwflags)) + SHRegSetUSValueW(pwzsubkey.param().abi(), pwzvalue.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SHRegWriteUSValueA(huskey: isize, pszvalue: P1, dwtype: u32, pvdata: *const core::ffi::c_void, cbdata: u32, dwflags: u32) -> super::super::Foundation::WIN32_ERROR @@ -4240,13 +4011,9 @@ where } #[cfg(feature = "Win32_UI_Controls")] #[inline] -pub unsafe fn SHReplaceFromPropSheetExtArray(hpsxa: P0, upageid: u32, lpfnreplacewith: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: P3) -> u32 -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SHReplaceFromPropSheetExtArray(hpsxa: HPSXA, upageid: u32, lpfnreplacewith: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> u32 { windows_targets::link!("shell32.dll" "system" fn SHReplaceFromPropSheetExtArray(hpsxa : HPSXA, upageid : u32, lpfnreplacewith : super::Controls:: LPFNSVADDPROPSHEETPAGE, lparam : super::super::Foundation:: LPARAM) -> u32); - SHReplaceFromPropSheetExtArray(hpsxa.param().abi(), core::mem::transmute(upageid), core::mem::transmute(lpfnreplacewith), lparam.param().abi()) + SHReplaceFromPropSheetExtArray(core::mem::transmute(hpsxa), core::mem::transmute(upageid), core::mem::transmute(lpfnreplacewith), core::mem::transmute(lparam)) } #[inline] pub unsafe fn SHResolveLibrary(psilibrary: P0) -> windows_core::Result<()> @@ -4262,50 +4029,39 @@ pub unsafe fn SHRestricted(rest: RESTRICTIONS) -> u32 { SHRestricted(core::mem::transmute(rest)) } #[inline] -pub unsafe fn SHSendMessageBroadcastA(umsg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::LRESULT -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SHSendMessageBroadcastA(umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("shlwapi.dll" "system" fn SHSendMessageBroadcastA(umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SHSendMessageBroadcastA(core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + SHSendMessageBroadcastA(core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn SHSendMessageBroadcastW(umsg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::LRESULT -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SHSendMessageBroadcastW(umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("shlwapi.dll" "system" fn SHSendMessageBroadcastW(umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SHSendMessageBroadcastW(core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + SHSendMessageBroadcastW(core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn SHSetDefaultProperties(hwnd: P0, psi: P1, dwfileopflags: u32, pfops: P3) -> windows_core::Result<()> +pub unsafe fn SHSetDefaultProperties(hwnd: Option, psi: P1, dwfileopflags: u32, pfops: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHSetDefaultProperties(hwnd : super::super::Foundation:: HWND, psi : * mut core::ffi::c_void, dwfileopflags : u32, pfops : * mut core::ffi::c_void) -> windows_core::HRESULT); - SHSetDefaultProperties(hwnd.param().abi(), psi.param().abi(), core::mem::transmute(dwfileopflags), pfops.param().abi()).ok() + SHSetDefaultProperties(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), psi.param().abi(), core::mem::transmute(dwfileopflags), pfops.param().abi()).ok() } #[inline] -pub unsafe fn SHSetFolderPathA(csidl: i32, htoken: P1, dwflags: u32, pszpath: P3) -> windows_core::Result<()> +pub unsafe fn SHSetFolderPathA(csidl: i32, htoken: Option, dwflags: u32, pszpath: P3) -> windows_core::Result<()> where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHSetFolderPathA(csidl : i32, htoken : super::super::Foundation:: HANDLE, dwflags : u32, pszpath : windows_core::PCSTR) -> windows_core::HRESULT); - SHSetFolderPathA(core::mem::transmute(csidl), htoken.param().abi(), core::mem::transmute(dwflags), pszpath.param().abi()).ok() + SHSetFolderPathA(core::mem::transmute(csidl), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), pszpath.param().abi()).ok() } #[inline] -pub unsafe fn SHSetFolderPathW(csidl: i32, htoken: P1, dwflags: u32, pszpath: P3) -> windows_core::Result<()> +pub unsafe fn SHSetFolderPathW(csidl: i32, htoken: Option, dwflags: u32, pszpath: P3) -> windows_core::Result<()> where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHSetFolderPathW(csidl : i32, htoken : super::super::Foundation:: HANDLE, dwflags : u32, pszpath : windows_core::PCWSTR) -> windows_core::HRESULT); - SHSetFolderPathW(core::mem::transmute(csidl), htoken.param().abi(), core::mem::transmute(dwflags), pszpath.param().abi()).ok() + SHSetFolderPathW(core::mem::transmute(csidl), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), pszpath.param().abi()).ok() } #[inline] pub unsafe fn SHSetInstanceExplorer(punk: P0) @@ -4316,13 +4072,12 @@ where SHSetInstanceExplorer(punk.param().abi()) } #[inline] -pub unsafe fn SHSetKnownFolderPath(rfid: *const windows_core::GUID, dwflags: u32, htoken: P2, pszpath: P3) -> windows_core::Result<()> +pub unsafe fn SHSetKnownFolderPath(rfid: *const windows_core::GUID, dwflags: u32, htoken: Option, pszpath: P3) -> windows_core::Result<()> where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHSetKnownFolderPath(rfid : *const windows_core::GUID, dwflags : u32, htoken : super::super::Foundation:: HANDLE, pszpath : windows_core::PCWSTR) -> windows_core::HRESULT); - SHSetKnownFolderPath(core::mem::transmute(rfid), core::mem::transmute(dwflags), htoken.param().abi(), pszpath.param().abi()).ok() + SHSetKnownFolderPath(core::mem::transmute(rfid), core::mem::transmute(dwflags), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszpath.param().abi()).ok() } #[inline] pub unsafe fn SHSetLocalizedName(pszpath: P0, pszresmodule: P1, idsres: i32) -> windows_core::Result<()> @@ -4361,45 +4116,38 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHSetValueA(hkey: P0, pszsubkey: P1, pszvalue: P2, dwtype: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: u32) -> i32 +pub unsafe fn SHSetValueA(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, dwtype: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: u32) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(dwtype), core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata)) + SHSetValueA(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn SHSetValueW(hkey: P0, pszsubkey: P1, pszvalue: P2, dwtype: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: u32) -> i32 +pub unsafe fn SHSetValueW(hkey: super::super::System::Registry::HKEY, pszsubkey: P1, pszvalue: P2, dwtype: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: u32) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, 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(), core::mem::transmute(dwtype), core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), core::mem::transmute(cbdata)) + SHSetValueW(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(dwtype), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbdata)) } #[inline] -pub unsafe fn SHShellFolderView_Message(hwndmain: P0, umsg: u32, lparam: P2) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SHShellFolderView_Message(hwndmain: super::super::Foundation::HWND, umsg: u32, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("shell32.dll" "system" fn SHShellFolderView_Message(hwndmain : super::super::Foundation:: HWND, umsg : u32, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SHShellFolderView_Message(hwndmain.param().abi(), core::mem::transmute(umsg), lparam.param().abi()) + SHShellFolderView_Message(core::mem::transmute(hwndmain), core::mem::transmute(umsg), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn SHShowManageLibraryUI(psilibrary: P0, hwndowner: P1, psztitle: P2, pszinstruction: P3, lmdoptions: LIBRARYMANAGEDIALOGOPTIONS) -> windows_core::Result<()> +pub unsafe fn SHShowManageLibraryUI(psilibrary: P0, hwndowner: super::super::Foundation::HWND, psztitle: P2, pszinstruction: P3, lmdoptions: LIBRARYMANAGEDIALOGOPTIONS) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHShowManageLibraryUI(psilibrary : * mut core::ffi::c_void, hwndowner : super::super::Foundation:: HWND, psztitle : windows_core::PCWSTR, pszinstruction : windows_core::PCWSTR, lmdoptions : LIBRARYMANAGEDIALOGOPTIONS) -> windows_core::HRESULT); - SHShowManageLibraryUI(psilibrary.param().abi(), hwndowner.param().abi(), psztitle.param().abi(), pszinstruction.param().abi(), core::mem::transmute(lmdoptions)).ok() + SHShowManageLibraryUI(psilibrary.param().abi(), core::mem::transmute(hwndowner), psztitle.param().abi(), pszinstruction.param().abi(), core::mem::transmute(lmdoptions)).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -4420,13 +4168,12 @@ where SHSkipJunction(pbc.param().abi(), core::mem::transmute(pclsid)) } #[inline] -pub unsafe fn SHStartNetConnectionDialogW(hwnd: P0, pszremotename: P1, dwtype: u32) -> windows_core::Result<()> +pub unsafe fn SHStartNetConnectionDialogW(hwnd: Option, pszremotename: P1, dwtype: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHStartNetConnectionDialogW(hwnd : super::super::Foundation:: HWND, pszremotename : windows_core::PCWSTR, dwtype : u32) -> windows_core::HRESULT); - SHStartNetConnectionDialogW(hwnd.param().abi(), pszremotename.param().abi(), core::mem::transmute(dwtype)).ok() + SHStartNetConnectionDialogW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszremotename.param().abi(), core::mem::transmute(dwtype)).ok() } #[inline] pub unsafe fn SHStrDupA(psz: P0) -> windows_core::Result @@ -4457,12 +4204,9 @@ pub unsafe fn SHStripMneumonicW(pszmenu: windows_core::PWSTR) -> u16 { SHStripMneumonicW(core::mem::transmute(pszmenu)) } #[inline] -pub unsafe fn SHTestTokenMembership(htoken: P0, ulrid: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SHTestTokenMembership(htoken: Option, ulrid: u32) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn SHTestTokenMembership(htoken : super::super::Foundation:: HANDLE, ulrid : u32) -> super::super::Foundation:: BOOL); - SHTestTokenMembership(htoken.param().abi(), core::mem::transmute(ulrid)) + SHTestTokenMembership(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), core::mem::transmute(ulrid)) } #[inline] pub unsafe fn SHUnicodeToAnsi(pwszsrc: P0, pszdst: &mut [u8]) -> i32 @@ -4502,12 +4246,9 @@ where SHUpdateImageW(pszhashitem.param().abi(), core::mem::transmute(iindex), core::mem::transmute(uflags), core::mem::transmute(iimageindex)) } #[inline] -pub unsafe fn SHValidateUNC(hwndowner: P0, pszfile: windows_core::PWSTR, fconnect: VALIDATEUNC_OPTION) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SHValidateUNC(hwndowner: Option, pszfile: windows_core::PWSTR, fconnect: VALIDATEUNC_OPTION) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn SHValidateUNC(hwndowner : super::super::Foundation:: HWND, pszfile : windows_core::PWSTR, fconnect : u32) -> super::super::Foundation:: BOOL); - SHValidateUNC(hwndowner.param().abi(), core::mem::transmute(pszfile), fconnect.0 as _) + SHValidateUNC(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszfile), fconnect.0 as _) } #[inline] pub unsafe fn SetCurrentProcessExplicitAppUserModelID(appid: P0) -> windows_core::Result<()> @@ -4519,65 +4260,51 @@ where } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SetMenuContextHelpId(param0: P0, param1: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetMenuContextHelpId(param0: super::WindowsAndMessaging::HMENU, param1: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetMenuContextHelpId(param0 : super::WindowsAndMessaging:: HMENU, param1 : u32) -> super::super::Foundation:: BOOL); - SetMenuContextHelpId(param0.param().abi(), core::mem::transmute(param1)).ok() + SetMenuContextHelpId(core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[inline] -pub unsafe fn SetWindowContextHelpId(param0: P0, param1: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowContextHelpId(param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetWindowContextHelpId(param0 : super::super::Foundation:: HWND, param1 : u32) -> super::super::Foundation:: BOOL); - SetWindowContextHelpId(param0.param().abi(), core::mem::transmute(param1)).ok() + SetWindowContextHelpId(core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[inline] -pub unsafe fn SetWindowSubclass(hwnd: P0, pfnsubclass: SUBCLASSPROC, uidsubclass: usize, dwrefdata: usize) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowSubclass(hwnd: super::super::Foundation::HWND, pfnsubclass: SUBCLASSPROC, uidsubclass: usize, dwrefdata: usize) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn SetWindowSubclass(hwnd : super::super::Foundation:: HWND, pfnsubclass : SUBCLASSPROC, uidsubclass : usize, dwrefdata : usize) -> super::super::Foundation:: BOOL); - SetWindowSubclass(hwnd.param().abi(), core::mem::transmute(pfnsubclass), core::mem::transmute(uidsubclass), core::mem::transmute(dwrefdata)) + SetWindowSubclass(core::mem::transmute(hwnd), core::mem::transmute(pfnsubclass), core::mem::transmute(uidsubclass), core::mem::transmute(dwrefdata)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ShellAboutA(hwnd: P0, szapp: P1, szotherstuff: P2, hicon: P3) -> i32 +pub unsafe fn ShellAboutA(hwnd: Option, szapp: P1, szotherstuff: P2, hicon: Option) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ShellAboutA(hwnd : super::super::Foundation:: HWND, szapp : windows_core::PCSTR, szotherstuff : windows_core::PCSTR, hicon : super::WindowsAndMessaging:: HICON) -> i32); - ShellAboutA(hwnd.param().abi(), szapp.param().abi(), szotherstuff.param().abi(), hicon.param().abi()) + ShellAboutA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), szapp.param().abi(), szotherstuff.param().abi(), core::mem::transmute(hicon.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ShellAboutW(hwnd: P0, szapp: P1, szotherstuff: P2, hicon: P3) -> i32 +pub unsafe fn ShellAboutW(hwnd: Option, szapp: P1, szotherstuff: P2, hicon: Option) -> i32 where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ShellAboutW(hwnd : super::super::Foundation:: HWND, szapp : windows_core::PCWSTR, szotherstuff : windows_core::PCWSTR, hicon : super::WindowsAndMessaging:: HICON) -> i32); - ShellAboutW(hwnd.param().abi(), szapp.param().abi(), szotherstuff.param().abi(), hicon.param().abi()) + ShellAboutW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), szapp.param().abi(), szotherstuff.param().abi(), core::mem::transmute(hicon.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ShellExecuteA(hwnd: P0, lpoperation: P1, lpfile: P2, lpparameters: P3, lpdirectory: P4, nshowcmd: super::WindowsAndMessaging::SHOW_WINDOW_CMD) -> super::super::Foundation::HINSTANCE +pub unsafe fn ShellExecuteA(hwnd: Option, lpoperation: P1, lpfile: P2, lpparameters: P3, lpdirectory: P4, nshowcmd: super::WindowsAndMessaging::SHOW_WINDOW_CMD) -> super::super::Foundation::HINSTANCE where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ShellExecuteA(hwnd : super::super::Foundation:: HWND, lpoperation : windows_core::PCSTR, lpfile : windows_core::PCSTR, lpparameters : windows_core::PCSTR, lpdirectory : windows_core::PCSTR, nshowcmd : super::WindowsAndMessaging:: SHOW_WINDOW_CMD) -> super::super::Foundation:: HINSTANCE); - ShellExecuteA(hwnd.param().abi(), lpoperation.param().abi(), lpfile.param().abi(), lpparameters.param().abi(), lpdirectory.param().abi(), core::mem::transmute(nshowcmd)) + ShellExecuteA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lpoperation.param().abi(), lpfile.param().abi(), lpparameters.param().abi(), lpdirectory.param().abi(), core::mem::transmute(nshowcmd)) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -4593,40 +4320,35 @@ pub unsafe fn ShellExecuteExW(pexecinfo: *mut SHELLEXECUTEINFOW) -> windows_core } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ShellExecuteW(hwnd: P0, lpoperation: P1, lpfile: P2, lpparameters: P3, lpdirectory: P4, nshowcmd: super::WindowsAndMessaging::SHOW_WINDOW_CMD) -> super::super::Foundation::HINSTANCE +pub unsafe fn ShellExecuteW(hwnd: Option, lpoperation: P1, lpfile: P2, lpparameters: P3, lpdirectory: P4, nshowcmd: super::WindowsAndMessaging::SHOW_WINDOW_CMD) -> super::super::Foundation::HINSTANCE where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ShellExecuteW(hwnd : super::super::Foundation:: HWND, lpoperation : windows_core::PCWSTR, lpfile : windows_core::PCWSTR, lpparameters : windows_core::PCWSTR, lpdirectory : windows_core::PCWSTR, nshowcmd : super::WindowsAndMessaging:: SHOW_WINDOW_CMD) -> super::super::Foundation:: HINSTANCE); - ShellExecuteW(hwnd.param().abi(), lpoperation.param().abi(), lpfile.param().abi(), lpparameters.param().abi(), lpdirectory.param().abi(), core::mem::transmute(nshowcmd)) + ShellExecuteW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lpoperation.param().abi(), lpfile.param().abi(), lpparameters.param().abi(), lpdirectory.param().abi(), core::mem::transmute(nshowcmd)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ShellMessageBoxA(happinst: P0, hwnd: P1, lpctext: P2, lpctitle: P3, fustyle: super::WindowsAndMessaging::MESSAGEBOX_STYLE) -> i32 +pub unsafe fn ShellMessageBoxA(happinst: Option, hwnd: Option, lpctext: P2, lpctitle: P3, fustyle: super::WindowsAndMessaging::MESSAGEBOX_STYLE) -> i32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "cdecl" fn ShellMessageBoxA(happinst : super::super::Foundation:: HINSTANCE, hwnd : super::super::Foundation:: HWND, lpctext : windows_core::PCSTR, lpctitle : windows_core::PCSTR, fustyle : super::WindowsAndMessaging:: MESSAGEBOX_STYLE) -> i32); - ShellMessageBoxA(happinst.param().abi(), hwnd.param().abi(), lpctext.param().abi(), lpctitle.param().abi(), core::mem::transmute(fustyle)) + ShellMessageBoxA(core::mem::transmute(happinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lpctext.param().abi(), lpctitle.param().abi(), core::mem::transmute(fustyle)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ShellMessageBoxW(happinst: P0, hwnd: P1, lpctext: P2, lpctitle: P3, fustyle: super::WindowsAndMessaging::MESSAGEBOX_STYLE) -> i32 +pub unsafe fn ShellMessageBoxW(happinst: Option, hwnd: Option, lpctext: P2, lpctitle: P3, fustyle: super::WindowsAndMessaging::MESSAGEBOX_STYLE) -> i32 where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "cdecl" fn ShellMessageBoxW(happinst : super::super::Foundation:: HINSTANCE, hwnd : super::super::Foundation:: HWND, lpctext : windows_core::PCWSTR, lpctitle : windows_core::PCWSTR, fustyle : super::WindowsAndMessaging:: MESSAGEBOX_STYLE) -> i32); - ShellMessageBoxW(happinst.param().abi(), hwnd.param().abi(), lpctext.param().abi(), lpctitle.param().abi(), core::mem::transmute(fustyle)) + ShellMessageBoxW(core::mem::transmute(happinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lpctext.param().abi(), lpctitle.param().abi(), core::mem::transmute(fustyle)) } #[inline] pub unsafe fn Shell_GetCachedImageIndex(pwsziconpath: P0, iiconindex: i32, uiconflags: u32) -> i32 @@ -4656,17 +4378,13 @@ 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(core::ptr::null_mut())), core::mem::transmute(phimlsmall.unwrap_or(core::ptr::null_mut()))) + Shell_GetImageLists(core::mem::transmute(phiml.unwrap_or(core::mem::zeroed())), core::mem::transmute(phimlsmall.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn Shell_MergeMenus(hmdst: P0, hmsrc: P1, uinsert: u32, uidadjust: u32, uidadjustmax: u32, uflags: MM_FLAGS) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn Shell_MergeMenus(hmdst: super::WindowsAndMessaging::HMENU, hmsrc: super::WindowsAndMessaging::HMENU, uinsert: u32, uidadjust: u32, uidadjustmax: u32, uflags: MM_FLAGS) -> u32 { windows_targets::link!("shell32.dll" "system" fn Shell_MergeMenus(hmdst : super::WindowsAndMessaging:: HMENU, hmsrc : super::WindowsAndMessaging:: HMENU, uinsert : u32, uidadjust : u32, uidadjustmax : u32, uflags : MM_FLAGS) -> u32); - Shell_MergeMenus(hmdst.param().abi(), hmsrc.param().abi(), core::mem::transmute(uinsert), core::mem::transmute(uidadjust), core::mem::transmute(uidadjustmax), core::mem::transmute(uflags)) + Shell_MergeMenus(core::mem::transmute(hmdst), core::mem::transmute(hmsrc), core::mem::transmute(uinsert), core::mem::transmute(uidadjust), core::mem::transmute(uidadjustmax), core::mem::transmute(uflags)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -4694,13 +4412,12 @@ pub unsafe fn SignalFileOpen(pidl: *const Common::ITEMIDLIST) -> super::super::F } #[cfg(feature = "Win32_System_Com_Urlmon")] #[inline] -pub unsafe fn SoftwareUpdateMessageBox(hwnd: P0, pszdistunit: P1, dwflags: u32, psdi: Option<*mut super::super::System::Com::Urlmon::SOFTDISTINFO>) -> u32 +pub unsafe fn SoftwareUpdateMessageBox(hwnd: Option, pszdistunit: P1, dwflags: u32, psdi: Option<*mut super::super::System::Com::Urlmon::SOFTDISTINFO>) -> u32 where - P0: windows_core::Param, 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(), core::mem::transmute(dwflags), core::mem::transmute(psdi.unwrap_or(core::ptr::null_mut()))) + SoftwareUpdateMessageBox(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), pszdistunit.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(psdi.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -5151,31 +4868,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 * mut core::ffi::c_void) -> windows_core::HRESULT); - StrRetToBSTR(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(pbstr)).ok() + StrRetToBSTR(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() + StrRetToBufA(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() + StrRetToBufW(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), 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(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(ppsz)).ok() + StrRetToStrA(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(ppsz)).ok() + StrRetToStrW(core::mem::transmute(pstr), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsz)).ok() } #[inline] pub unsafe fn StrSpnA(psz: P0, pszset: P1) -> i32 @@ -5314,29 +5031,19 @@ where StrTrimW(core::mem::transmute(psz), psztrimchars.param().abi()) } #[inline] -pub unsafe fn UnloadUserProfile(htoken: P0, hprofile: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn UnloadUserProfile(htoken: super::super::Foundation::HANDLE, hprofile: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn UnloadUserProfile(htoken : super::super::Foundation:: HANDLE, hprofile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - UnloadUserProfile(htoken.param().abi(), hprofile.param().abi()).ok() + UnloadUserProfile(core::mem::transmute(htoken), core::mem::transmute(hprofile)).ok() } #[inline] -pub unsafe fn UnregisterAppConstrainedChangeNotification(registration: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterAppConstrainedChangeNotification(registration: PAPPCONSTRAIN_REGISTRATION) { windows_targets::link!("api-ms-win-core-psm-appnotify-l1-1-1.dll" "system" fn UnregisterAppConstrainedChangeNotification(registration : PAPPCONSTRAIN_REGISTRATION)); - UnregisterAppConstrainedChangeNotification(registration.param().abi()) + UnregisterAppConstrainedChangeNotification(core::mem::transmute(registration)) } #[inline] -pub unsafe fn UnregisterAppStateChangeNotification(registration: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterAppStateChangeNotification(registration: PAPPSTATE_REGISTRATION) { windows_targets::link!("api-ms-win-core-psm-appnotify-l1-1-0.dll" "system" fn UnregisterAppStateChangeNotification(registration : PAPPSTATE_REGISTRATION)); - UnregisterAppStateChangeNotification(registration.param().abi()) + UnregisterAppStateChangeNotification(core::mem::transmute(registration)) } #[inline] pub unsafe fn UnregisterScaleChangeEvent(dwcookie: usize) -> windows_core::Result<()> { @@ -5376,22 +5083,22 @@ where UrlCanonicalizeW(pszurl.param().abi(), core::mem::transmute(pszcanonicalized), core::mem::transmute(pcchcanonicalized), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn UrlCombineA(pszbase: P0, pszrelative: P1, pszcombined: windows_core::PSTR, pcchcombined: *mut u32, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn UrlCombineA(pszbase: P0, pszrelative: P1, pszcombined: Option, pcchcombined: *mut u32, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlCombineA(pszbase : windows_core::PCSTR, pszrelative : windows_core::PCSTR, pszcombined : windows_core::PSTR, pcchcombined : *mut u32, dwflags : u32) -> windows_core::HRESULT); - UrlCombineA(pszbase.param().abi(), pszrelative.param().abi(), core::mem::transmute(pszcombined), core::mem::transmute(pcchcombined), core::mem::transmute(dwflags)).ok() + UrlCombineA(pszbase.param().abi(), pszrelative.param().abi(), core::mem::transmute(pszcombined.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcombined), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn UrlCombineW(pszbase: P0, pszrelative: P1, pszcombined: windows_core::PWSTR, pcchcombined: *mut u32, dwflags: u32) -> windows_core::Result<()> +pub unsafe fn UrlCombineW(pszbase: P0, pszrelative: P1, pszcombined: Option, pcchcombined: *mut u32, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlCombineW(pszbase : windows_core::PCWSTR, pszrelative : windows_core::PCWSTR, pszcombined : windows_core::PWSTR, pcchcombined : *mut u32, dwflags : u32) -> windows_core::HRESULT); - UrlCombineW(pszbase.param().abi(), pszrelative.param().abi(), core::mem::transmute(pszcombined), core::mem::transmute(pcchcombined), core::mem::transmute(dwflags)).ok() + UrlCombineW(pszbase.param().abi(), pszrelative.param().abi(), core::mem::transmute(pszcombined.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcombined), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn UrlCompareA(psz1: P0, psz2: P1, fignoreslash: P2) -> i32 @@ -5550,14 +5257,14 @@ where UrlIsW(pszurl.param().abi(), core::mem::transmute(urlis)) } #[inline] -pub unsafe fn UrlUnescapeA(pszurl: windows_core::PSTR, pszunescaped: windows_core::PSTR, pcchunescaped: Option<*mut u32>, dwflags: u32) -> windows_core::Result<()> { +pub unsafe fn UrlUnescapeA(pszurl: windows_core::PSTR, pszunescaped: Option, 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(core::ptr::null_mut())), core::mem::transmute(dwflags)).ok() + UrlUnescapeA(core::mem::transmute(pszurl), core::mem::transmute(pszunescaped.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchunescaped.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn UrlUnescapeW(pszurl: windows_core::PWSTR, pszunescaped: windows_core::PWSTR, pcchunescaped: Option<*mut u32>, dwflags: u32) -> windows_core::Result<()> { +pub unsafe fn UrlUnescapeW(pszurl: windows_core::PWSTR, pszunescaped: Option, 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(core::ptr::null_mut())), core::mem::transmute(dwflags)).ok() + UrlUnescapeW(core::mem::transmute(pszurl), core::mem::transmute(pszunescaped.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchunescaped.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -5579,22 +5286,20 @@ where Win32DeleteFile(pszpath.param().abi()) } #[inline] -pub unsafe fn WinHelpA(hwndmain: P0, lpszhelp: P1, ucommand: u32, dwdata: usize) -> windows_core::Result<()> +pub unsafe fn WinHelpA(hwndmain: Option, lpszhelp: P1, ucommand: u32, dwdata: usize) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn WinHelpA(hwndmain : super::super::Foundation:: HWND, lpszhelp : windows_core::PCSTR, ucommand : u32, dwdata : usize) -> super::super::Foundation:: BOOL); - WinHelpA(hwndmain.param().abi(), lpszhelp.param().abi(), core::mem::transmute(ucommand), core::mem::transmute(dwdata)).ok() + WinHelpA(core::mem::transmute(hwndmain.unwrap_or(core::mem::zeroed())), lpszhelp.param().abi(), core::mem::transmute(ucommand), core::mem::transmute(dwdata)).ok() } #[inline] -pub unsafe fn WinHelpW(hwndmain: P0, lpszhelp: P1, ucommand: u32, dwdata: usize) -> windows_core::Result<()> +pub unsafe fn WinHelpW(hwndmain: Option, lpszhelp: P1, ucommand: u32, dwdata: usize) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn WinHelpW(hwndmain : super::super::Foundation:: HWND, lpszhelp : windows_core::PCWSTR, ucommand : u32, dwdata : usize) -> super::super::Foundation:: BOOL); - WinHelpW(hwndmain.param().abi(), lpszhelp.param().abi(), core::mem::transmute(ucommand), core::mem::transmute(dwdata)).ok() + WinHelpW(core::mem::transmute(hwndmain.unwrap_or(core::mem::zeroed())), lpszhelp.param().abi(), core::mem::transmute(ucommand), core::mem::transmute(dwdata)).ok() } #[inline] pub unsafe fn WriteCabinetState(pcs: *const CABINETSTATE) -> super::super::Foundation::BOOL { @@ -9906,11 +9611,8 @@ impl Folder3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ShowWebViewBarricade)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetShowWebViewBarricade(&self, bshowwebviewbarricade: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetShowWebViewBarricade)(windows_core::Interface::as_raw(self), bshowwebviewbarricade.param().abi()).ok() + pub unsafe fn SetShowWebViewBarricade(&self, bshowwebviewbarricade: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetShowWebViewBarricade)(windows_core::Interface::as_raw(self), core::mem::transmute(bshowwebviewbarricade)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -11352,26 +11054,18 @@ windows_core::imp::define_interface!(IAccessibilityDockingService, IAccessibilit windows_core::imp::interface_hierarchy!(IAccessibilityDockingService, windows_core::IUnknown); impl IAccessibilityDockingService { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetAvailableSize(&self, hmonitor: P0, pcxfixed: *mut u32, pcymax: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetAvailableSize)(windows_core::Interface::as_raw(self), hmonitor.param().abi(), core::mem::transmute(pcxfixed), core::mem::transmute(pcymax)).ok() + pub unsafe fn GetAvailableSize(&self, hmonitor: super::super::Graphics::Gdi::HMONITOR, pcxfixed: *mut u32, pcymax: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetAvailableSize)(windows_core::Interface::as_raw(self), core::mem::transmute(hmonitor), core::mem::transmute(pcxfixed), core::mem::transmute(pcymax)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn DockWindow(&self, hwnd: P0, hmonitor: P1, cyrequested: u32, pcallback: P3) -> windows_core::Result<()> + pub unsafe fn DockWindow(&self, hwnd: super::super::Foundation::HWND, hmonitor: super::super::Graphics::Gdi::HMONITOR, cyrequested: u32, pcallback: P3) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).DockWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), hmonitor.param().abi(), core::mem::transmute(cyrequested), pcallback.param().abi()).ok() + (windows_core::Interface::vtable(self).DockWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(hmonitor), core::mem::transmute(cyrequested), pcallback.param().abi()).ok() } - pub unsafe fn UndockWindow(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UndockWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn UndockWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UndockWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } } #[repr(C)] @@ -11819,12 +11513,9 @@ windows_core::imp::define_interface!(IAppVisibility, IAppVisibility_Vtbl, 0x2246 windows_core::imp::interface_hierarchy!(IAppVisibility, windows_core::IUnknown); impl IAppVisibility { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetAppVisibilityOnMonitor(&self, hmonitor: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetAppVisibilityOnMonitor(&self, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetAppVisibilityOnMonitor)(windows_core::Interface::as_raw(self), hmonitor.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetAppVisibilityOnMonitor)(windows_core::Interface::as_raw(self), core::mem::transmute(hmonitor), &mut result__).map(|| result__) } pub unsafe fn IsLauncherVisible(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11914,11 +11605,8 @@ windows_core::imp::define_interface!(IAppVisibilityEvents, IAppVisibilityEvents_ windows_core::imp::interface_hierarchy!(IAppVisibilityEvents, windows_core::IUnknown); impl IAppVisibilityEvents { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn AppVisibilityOnMonitorChanged(&self, hmonitor: P0, previousmode: MONITOR_APP_VISIBILITY, currentmode: MONITOR_APP_VISIBILITY) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AppVisibilityOnMonitorChanged)(windows_core::Interface::as_raw(self), hmonitor.param().abi(), core::mem::transmute(previousmode), core::mem::transmute(currentmode)).ok() + pub unsafe fn AppVisibilityOnMonitorChanged(&self, hmonitor: super::super::Graphics::Gdi::HMONITOR, previousmode: MONITOR_APP_VISIBILITY, currentmode: MONITOR_APP_VISIBILITY) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AppVisibilityOnMonitorChanged)(windows_core::Interface::as_raw(self), core::mem::transmute(hmonitor), core::mem::transmute(previousmode), core::mem::transmute(currentmode)).ok() } pub unsafe fn LauncherVisibilityChange(&self, currentvisiblestate: P0) -> windows_core::Result<()> where @@ -12728,28 +12416,21 @@ impl IAttachmentExecute { pub unsafe fn CheckPolicy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckPolicy)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Prompt(&self, hwnd: P0, prompt: ATTACHMENT_PROMPT) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn Prompt(&self, hwnd: super::super::Foundation::HWND, prompt: ATTACHMENT_PROMPT) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Prompt)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(prompt), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Prompt)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(prompt), &mut result__).map(|| result__) } pub unsafe fn Save(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Execute(&self, hwnd: P0, pszverb: P1, phprocess: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> + pub unsafe fn Execute(&self, hwnd: super::super::Foundation::HWND, pszverb: P1, phprocess: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> where - 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(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pszverb.param().abi(), core::mem::transmute(phprocess.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SaveWithUI(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SaveWithUI)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SaveWithUI(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SaveWithUI)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } pub unsafe fn ClearClientState(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ClearClientState)(windows_core::Interface::as_raw(self)).ok() @@ -12865,14 +12546,13 @@ impl windows_core::RuntimeName for IAttachmentExecute {} windows_core::imp::define_interface!(IAutoComplete, IAutoComplete_Vtbl, 0x00bb2762_6a77_11d0_a535_00c04fd7d062); windows_core::imp::interface_hierarchy!(IAutoComplete, windows_core::IUnknown); impl IAutoComplete { - pub unsafe fn Init(&self, hwndedit: P0, punkacl: P1, pwszregkeypath: P2, pwszquickcomplete: P3) -> windows_core::Result<()> + pub unsafe fn Init(&self, hwndedit: super::super::Foundation::HWND, punkacl: P1, pwszregkeypath: P2, pwszquickcomplete: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), hwndedit.param().abi(), punkacl.param().abi(), pwszregkeypath.param().abi(), pwszquickcomplete.param().abi()).ok() + (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndedit), punkacl.param().abi(), pwszregkeypath.param().abi(), pwszquickcomplete.param().abi()).ok() } pub unsafe fn Enable(&self, fenable: P0) -> windows_core::Result<()> where @@ -13074,7 +12754,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), core::mem::transmute(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() + (windows_core::Interface::vtable(self).QueryBand)(windows_core::Interface::as_raw(self), core::mem::transmute(dwbandid), core::mem::transmute(ppstb.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwstate.unwrap_or(core::mem::zeroed())), 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), core::mem::transmute(dwbandid), core::mem::transmute(dwmask), core::mem::transmute(dwstate)).ok() @@ -13220,11 +12900,8 @@ impl IBanneredBar { (windows_core::Interface::vtable(self).GetIconSize)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetBitmap(&self, hbitmap: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBitmap)(windows_core::Interface::as_raw(self), hbitmap.param().abi()).ok() + pub unsafe fn SetBitmap(&self, hbitmap: super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(hbitmap)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetBitmap(&self) -> windows_core::Result { @@ -13854,13 +13531,8 @@ impl core::ops::Deref for IBrowserService2 { } windows_core::imp::interface_hierarchy!(IBrowserService2, windows_core::IUnknown, IBrowserService); impl IBrowserService2 { - pub unsafe fn WndProcBS(&self, hwnd: P0, umsg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).WndProcBS)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + pub unsafe fn WndProcBS(&self, hwnd: super::super::Foundation::HWND, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { + (windows_core::Interface::vtable(self).WndProcBS)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } pub unsafe fn SetAsDefFolderSettings(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAsDefFolderSettings)(windows_core::Interface::as_raw(self)).ok() @@ -13869,22 +13541,15 @@ impl IBrowserService2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetViewRect)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn OnSize(&self, wparam: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnSize)(windows_core::Interface::as_raw(self), wparam.param().abi()).ok() + pub unsafe fn OnSize(&self, wparam: super::super::Foundation::WPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnSize)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn OnCreate(&self, pcs: *const super::WindowsAndMessaging::CREATESTRUCTW) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnCreate)(windows_core::Interface::as_raw(self), core::mem::transmute(pcs)).ok() } - pub unsafe fn OnCommand(&self, wparam: P0, lparam: P1) -> super::super::Foundation::LRESULT - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnCommand)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi()) + pub unsafe fn OnCommand(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { + (windows_core::Interface::vtable(self).OnCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam)) } pub unsafe fn OnDestroy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnDestroy)(windows_core::Interface::as_raw(self)).ok() @@ -13963,12 +13628,11 @@ impl IBrowserService2 { pub unsafe fn InitializeTransitionSite(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeTransitionSite)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn _Initialize(&self, hwnd: P0, pauto: P1) -> windows_core::Result<()> + pub unsafe fn _Initialize(&self, hwnd: super::super::Foundation::HWND, pauto: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self)._Initialize)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pauto.param().abi()).ok() + (windows_core::Interface::vtable(self)._Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pauto.param().abi()).ok() } pub unsafe fn _CancelPendingNavigationAsync(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self)._CancelPendingNavigationAsync)(windows_core::Interface::as_raw(self)).ok() @@ -14008,16 +13672,13 @@ 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(core::ptr::null())), core::mem::transmute(ncmdid), core::mem::transmute(ncmdexecopt), core::mem::transmute(pvarargin.unwrap_or(core::ptr::null())), core::mem::transmute(pvarargout.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(ncmdid), core::mem::transmute(ncmdexecopt), core::mem::transmute(pvarargin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvarargout.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn _SendChildren(&self, hwndbar: P0, fbroadcast: P1, umsg: u32, wparam: P3, lparam: P4) -> windows_core::Result<()> + pub unsafe fn _SendChildren(&self, hwndbar: super::super::Foundation::HWND, fbroadcast: P1, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self)._SendChildren)(windows_core::Interface::as_raw(self), hwndbar.param().abi(), fbroadcast.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()).ok() + (windows_core::Interface::vtable(self)._SendChildren)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndbar), fbroadcast.param().abi(), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } pub unsafe fn GetFolderSetData(&self, pfsd: *mut FOLDERSETDATA) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFolderSetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfsd)).ok() @@ -14053,11 +13714,8 @@ impl IBrowserService2 { (windows_core::Interface::vtable(self)._ResizeView)(windows_core::Interface::as_raw(self)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn _GetEffectiveClientArea(&self, lprectborder: *mut super::super::Foundation::RECT, hmon: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self)._GetEffectiveClientArea)(windows_core::Interface::as_raw(self), core::mem::transmute(lprectborder), hmon.param().abi()).ok() + pub unsafe fn _GetEffectiveClientArea(&self, lprectborder: *mut super::super::Foundation::RECT, hmon: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self)._GetEffectiveClientArea)(windows_core::Interface::as_raw(self), core::mem::transmute(lprectborder), core::mem::transmute(hmon)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] pub unsafe fn v_GetViewStream(&self, pidl: *mut Common::ITEMIDLIST, grfmode: u32, pwszname: P2) -> Option @@ -14066,19 +13724,12 @@ impl IBrowserService2 { { (windows_core::Interface::vtable(self).v_GetViewStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl), core::mem::transmute(grfmode), pwszname.param().abi()) } - pub unsafe fn ForwardViewMsg(&self, umsg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::LRESULT - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ForwardViewMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + pub unsafe fn ForwardViewMsg(&self, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { + (windows_core::Interface::vtable(self).ForwardViewMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetAcceleratorMenu(&self, hacc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAcceleratorMenu)(windows_core::Interface::as_raw(self), hacc.param().abi()).ok() + pub unsafe fn SetAcceleratorMenu(&self, hacc: super::WindowsAndMessaging::HACCEL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAcceleratorMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(hacc)).ok() } pub unsafe fn _GetToolbarCount(&self) -> i32 { (windows_core::Interface::vtable(self)._GetToolbarCount)(windows_core::Interface::as_raw(self)) @@ -14124,11 +13775,8 @@ impl IBrowserService2 { (windows_core::Interface::vtable(self)._FindTBar)(windows_core::Interface::as_raw(self), punksrc.param().abi()) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Ole", feature = "Win32_UI_WindowsAndMessaging"))] - pub unsafe fn _SetFocus(&self, ptbi: *const TOOLBARITEM, hwnd: P1, lpmsg: *const super::WindowsAndMessaging::MSG) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self)._SetFocus)(windows_core::Interface::as_raw(self), core::mem::transmute(ptbi), hwnd.param().abi(), core::mem::transmute(lpmsg)).ok() + pub unsafe fn _SetFocus(&self, ptbi: *const TOOLBARITEM, hwnd: super::super::Foundation::HWND, lpmsg: *const super::WindowsAndMessaging::MSG) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self)._SetFocus)(windows_core::Interface::as_raw(self), core::mem::transmute(ptbi), core::mem::transmute(hwnd), core::mem::transmute(lpmsg)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn v_MayTranslateAccelerator(&self, pmsg: *mut super::WindowsAndMessaging::MSG) -> windows_core::Result<()> { @@ -14687,11 +14335,8 @@ impl core::ops::Deref for IBrowserService3 { } windows_core::imp::interface_hierarchy!(IBrowserService3, windows_core::IUnknown, IBrowserService, IBrowserService2); impl IBrowserService3 { - pub unsafe fn _PositionViewWindow(&self, hwnd: P0, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self)._PositionViewWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(prc)).ok() + pub unsafe fn _PositionViewWindow(&self, hwnd: super::super::Foundation::HWND, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self)._PositionViewWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(prc)).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn IEParseDisplayNameEx(&self, uicp: u32, pwszpath: P1, dwflags: u32) -> windows_core::Result<*mut Common::ITEMIDLIST> @@ -14814,11 +14459,8 @@ impl ICDBurn { pub unsafe fn GetRecorderDriveLetter(&self, pszdrive: &mut [u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRecorderDriveLetter)(windows_core::Interface::as_raw(self), core::mem::transmute(pszdrive.as_ptr()), pszdrive.len().try_into().unwrap()).ok() } - pub unsafe fn Burn(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Burn)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn Burn(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Burn)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } pub unsafe fn HasRecordableDrive(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15546,12 +15188,11 @@ impl windows_core::RuntimeName for IConnectableCredentialProviderCredential {} windows_core::imp::define_interface!(IContactManagerInterop, IContactManagerInterop_Vtbl, 0x99eacba7_e073_43b6_a896_55afe48a0833); windows_core::imp::interface_hierarchy!(IContactManagerInterop, windows_core::IUnknown); impl IContactManagerInterop { - pub unsafe fn ShowContactCardForWindow(&self, appwindow: P0, contact: P1, selection: *const super::super::Foundation::RECT, preferredplacement: FLYOUT_PLACEMENT) -> windows_core::Result<()> + pub unsafe fn ShowContactCardForWindow(&self, appwindow: super::super::Foundation::HWND, contact: P1, selection: *const super::super::Foundation::RECT, preferredplacement: FLYOUT_PLACEMENT) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ShowContactCardForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), contact.param().abi(), core::mem::transmute(selection), core::mem::transmute(preferredplacement)).ok() + (windows_core::Interface::vtable(self).ShowContactCardForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), contact.param().abi(), core::mem::transmute(selection), core::mem::transmute(preferredplacement)).ok() } } #[repr(C)] @@ -15579,17 +15220,14 @@ windows_core::imp::define_interface!(IContextMenu, IContextMenu_Vtbl, 0x000214e4 windows_core::imp::interface_hierarchy!(IContextMenu, windows_core::IUnknown); impl IContextMenu { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn QueryContextMenu(&self, hmenu: P0, indexmenu: u32, idcmdfirst: u32, idcmdlast: u32, uflags: u32) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).QueryContextMenu)(windows_core::Interface::as_raw(self), hmenu.param().abi(), core::mem::transmute(indexmenu), core::mem::transmute(idcmdfirst), core::mem::transmute(idcmdlast), core::mem::transmute(uflags)) + pub unsafe fn QueryContextMenu(&self, hmenu: super::WindowsAndMessaging::HMENU, indexmenu: u32, idcmdfirst: u32, idcmdlast: u32, uflags: u32) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).QueryContextMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenu), core::mem::transmute(indexmenu), core::mem::transmute(idcmdfirst), core::mem::transmute(idcmdlast), core::mem::transmute(uflags)) } pub unsafe fn InvokeCommand(&self, pici: *const CMINVOKECOMMANDINFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InvokeCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(idcmd), core::mem::transmute(utype), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pszname), core::mem::transmute(cchmax)).ok() + (windows_core::Interface::vtable(self).GetCommandString)(windows_core::Interface::as_raw(self), core::mem::transmute(idcmd), core::mem::transmute(utype), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszname), core::mem::transmute(cchmax)).ok() } } #[repr(C)] @@ -15645,12 +15283,8 @@ impl core::ops::Deref for IContextMenu2 { } windows_core::imp::interface_hierarchy!(IContextMenu2, windows_core::IUnknown, IContextMenu); impl IContextMenu2 { - pub unsafe fn HandleMenuMsg(&self, umsg: u32, wparam: P1, lparam: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).HandleMenuMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn HandleMenuMsg(&self, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).HandleMenuMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } } #[repr(C)] @@ -15686,12 +15320,8 @@ impl core::ops::Deref for IContextMenu3 { } windows_core::imp::interface_hierarchy!(IContextMenu3, windows_core::IUnknown, IContextMenu, IContextMenu2); impl IContextMenu3 { - pub unsafe fn HandleMenuMsg2(&self, umsg: u32, wparam: P1, lparam: P2, plresult: Option<*mut super::super::Foundation::LRESULT>) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).HandleMenuMsg2)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(plresult.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn HandleMenuMsg2(&self, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plresult: Option<*mut super::super::Foundation::LRESULT>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).HandleMenuMsg2)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(plresult.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -15722,15 +15352,12 @@ windows_core::imp::define_interface!(IContextMenuCB, IContextMenuCB_Vtbl, 0x3409 windows_core::imp::interface_hierarchy!(IContextMenuCB, windows_core::IUnknown); impl IContextMenuCB { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn CallBack(&self, psf: P0, hwndowner: P1, pdtobj: P2, umsg: u32, wparam: P4, lparam: P5) -> windows_core::Result<()> + pub unsafe fn CallBack(&self, psf: P0, hwndowner: Option, pdtobj: P2, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).CallBack)(windows_core::Interface::as_raw(self), psf.param().abi(), hwndowner.param().abi(), pdtobj.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()).ok() + (windows_core::Interface::vtable(self).CallBack)(windows_core::Interface::as_raw(self), psf.param().abi(), core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), pdtobj.param().abi(), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } } #[repr(C)] @@ -15794,13 +15421,12 @@ impl windows_core::RuntimeName for IContextMenuSite {} windows_core::imp::define_interface!(ICopyHookA, ICopyHookA_Vtbl, 0x000214ef_0000_0000_c000_000000000046); windows_core::imp::interface_hierarchy!(ICopyHookA, windows_core::IUnknown); impl ICopyHookA { - pub unsafe fn CopyCallback(&self, hwnd: P0, wfunc: u32, wflags: u32, pszsrcfile: P3, dwsrcattribs: u32, pszdestfile: P5, dwdestattribs: u32) -> u32 + pub unsafe fn CopyCallback(&self, hwnd: Option, wfunc: u32, wflags: u32, pszsrcfile: P3, dwsrcattribs: u32, pszdestfile: P5, dwdestattribs: u32) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(wfunc), core::mem::transmute(wflags), pszsrcfile.param().abi(), core::mem::transmute(dwsrcattribs), pszdestfile.param().abi(), core::mem::transmute(dwdestattribs)) + (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(wfunc), core::mem::transmute(wflags), pszsrcfile.param().abi(), core::mem::transmute(dwsrcattribs), pszdestfile.param().abi(), core::mem::transmute(dwdestattribs)) } } #[repr(C)] @@ -15827,13 +15453,12 @@ impl windows_core::RuntimeName for ICopyHookA {} windows_core::imp::define_interface!(ICopyHookW, ICopyHookW_Vtbl, 0x000214fc_0000_0000_c000_000000000046); windows_core::imp::interface_hierarchy!(ICopyHookW, windows_core::IUnknown); impl ICopyHookW { - pub unsafe fn CopyCallback(&self, hwnd: P0, wfunc: u32, wflags: u32, pszsrcfile: P3, dwsrcattribs: u32, pszdestfile: P5, dwdestattribs: u32) -> u32 + pub unsafe fn CopyCallback(&self, hwnd: Option, wfunc: u32, wflags: u32, pszsrcfile: P3, dwsrcattribs: u32, pszdestfile: P5, dwdestattribs: u32) -> u32 where - P0: windows_core::Param, P3: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(wfunc), core::mem::transmute(wflags), pszsrcfile.param().abi(), core::mem::transmute(dwsrcattribs), pszdestfile.param().abi(), core::mem::transmute(dwdestattribs)) + (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(wfunc), core::mem::transmute(wflags), pszsrcfile.param().abi(), core::mem::transmute(dwsrcattribs), pszdestfile.param().abi(), core::mem::transmute(dwdestattribs)) } } #[repr(C)] @@ -16184,12 +15809,8 @@ impl ICredentialProviderCredential { pub unsafe fn GetSerialization(&self, pcpgsr: *mut CREDENTIAL_PROVIDER_GET_SERIALIZATION_RESPONSE, pcpcs: *mut CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION, ppszoptionalstatustext: *mut windows_core::PWSTR, pcpsioptionalstatusicon: *mut CREDENTIAL_PROVIDER_STATUS_ICON) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSerialization)(windows_core::Interface::as_raw(self), core::mem::transmute(pcpgsr), core::mem::transmute(pcpcs), core::mem::transmute(ppszoptionalstatustext), core::mem::transmute(pcpsioptionalstatusicon)).ok() } - pub unsafe fn ReportResult(&self, ntsstatus: P0, ntssubstatus: P1, ppszoptionalstatustext: *mut windows_core::PWSTR, pcpsioptionalstatusicon: *mut CREDENTIAL_PROVIDER_STATUS_ICON) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReportResult)(windows_core::Interface::as_raw(self), ntsstatus.param().abi(), ntssubstatus.param().abi(), core::mem::transmute(ppszoptionalstatustext), core::mem::transmute(pcpsioptionalstatusicon)).ok() + pub unsafe fn ReportResult(&self, ntsstatus: super::super::Foundation::NTSTATUS, ntssubstatus: super::super::Foundation::NTSTATUS, ppszoptionalstatustext: *mut windows_core::PWSTR, pcpsioptionalstatusicon: *mut CREDENTIAL_PROVIDER_STATUS_ICON) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReportResult)(windows_core::Interface::as_raw(self), core::mem::transmute(ntsstatus), core::mem::transmute(ntssubstatus), core::mem::transmute(ppszoptionalstatustext), core::mem::transmute(pcpsioptionalstatusicon)).ok() } } #[repr(C)] @@ -16439,12 +16060,11 @@ impl ICredentialProviderCredentialEvents { (windows_core::Interface::vtable(self).SetFieldCheckbox)(windows_core::Interface::as_raw(self), pcpc.param().abi(), core::mem::transmute(dwfieldid), bchecked.param().abi(), pszlabel.param().abi()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetFieldBitmap(&self, pcpc: P0, dwfieldid: u32, hbmp: P2) -> windows_core::Result<()> + pub unsafe fn SetFieldBitmap(&self, pcpc: P0, dwfieldid: u32, hbmp: super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetFieldBitmap)(windows_core::Interface::as_raw(self), pcpc.param().abi(), core::mem::transmute(dwfieldid), hbmp.param().abi()).ok() + (windows_core::Interface::vtable(self).SetFieldBitmap)(windows_core::Interface::as_raw(self), pcpc.param().abi(), core::mem::transmute(dwfieldid), core::mem::transmute(hbmp)).ok() } pub unsafe fn SetFieldComboBoxSelectedItem(&self, pcpc: P0, dwfieldid: u32, dwselecteditem: u32) -> windows_core::Result<()> where @@ -17344,19 +16964,15 @@ impl windows_core::RuntimeName for IDataObjectProvider {} windows_core::imp::define_interface!(IDataTransferManagerInterop, IDataTransferManagerInterop_Vtbl, 0x3a3dcd6c_3eab_43dc_bcde_45671ce800c8); windows_core::imp::interface_hierarchy!(IDataTransferManagerInterop, windows_core::IUnknown); impl IDataTransferManagerInterop { - pub unsafe fn GetForWindow(&self, appwindow: P0) -> windows_core::Result + pub unsafe fn GetForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ShowShareUIForWindow(&self, appwindow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowShareUIForWindow)(windows_core::Interface::as_raw(self), appwindow.param().abi()).ok() + pub unsafe fn ShowShareUIForWindow(&self, appwindow: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowShareUIForWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(appwindow)).ok() } } #[repr(C)] @@ -17397,11 +17013,8 @@ impl IDefaultExtractIconInit { (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(uflags)).ok() } #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn SetKey(&self, hkey: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetKey)(windows_core::Interface::as_raw(self), hkey.param().abi()).ok() + pub unsafe fn SetKey(&self, hkey: super::super::System::Registry::HKEY) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hkey)).ok() } pub unsafe fn SetNormalIcon(&self, pszfile: P0, iicon: i32) -> windows_core::Result<()> where @@ -17497,14 +17110,13 @@ windows_core::imp::define_interface!(IDefaultFolderMenuInitialize, IDefaultFolde windows_core::imp::interface_hierarchy!(IDefaultFolderMenuInitialize, windows_core::IUnknown); impl IDefaultFolderMenuInitialize { #[cfg(all(feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] - pub unsafe fn Initialize(&self, hwnd: P0, pcmcb: P1, pidlfolder: Option<*const Common::ITEMIDLIST>, psf: P3, apidl: &[*const Common::ITEMIDLIST], punkassociation: P6, ckeys: u32, akeys: Option<*const super::super::System::Registry::HKEY>) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, hwnd: super::super::Foundation::HWND, pcmcb: P1, pidlfolder: Option<*const Common::ITEMIDLIST>, psf: P3, apidl: &[*const Common::ITEMIDLIST], punkassociation: P6, ckeys: u32, akeys: Option<*const super::super::System::Registry::HKEY>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, P6: 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(core::ptr::null())), psf.param().abi(), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), punkassociation.param().abi(), core::mem::transmute(ckeys), core::mem::transmute(akeys.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pcmcb.param().abi(), core::mem::transmute(pidlfolder.unwrap_or(core::mem::zeroed())), psf.param().abi(), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), punkassociation.param().abi(), core::mem::transmute(ckeys), core::mem::transmute(akeys.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(dfmrvalues)).ok() @@ -18019,11 +17631,8 @@ impl IDesktopWallpaper { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMonitorRECT)(windows_core::Interface::as_raw(self), monitorid.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn SetBackgroundColor(&self, color: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), color.param().abi()).ok() + pub unsafe fn SetBackgroundColor(&self, color: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), core::mem::transmute(color)).ok() } pub unsafe fn GetBackgroundColor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -18587,12 +18196,11 @@ impl IDragSourceHelper { (windows_core::Interface::vtable(self).InitializeFromBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(pshdi), pdataobject.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn InitializeFromWindow(&self, hwnd: P0, ppt: Option<*const super::super::Foundation::POINT>, pdataobject: P2) -> windows_core::Result<()> + pub unsafe fn InitializeFromWindow(&self, hwnd: Option, ppt: Option<*const super::super::Foundation::POINT>, pdataobject: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { - (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() + (windows_core::Interface::vtable(self).InitializeFromWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppt.unwrap_or(core::mem::zeroed())), pdataobject.param().abi()).ok() } } #[repr(C)] @@ -18676,12 +18284,11 @@ windows_core::imp::define_interface!(IDropTargetHelper, IDropTargetHelper_Vtbl, windows_core::imp::interface_hierarchy!(IDropTargetHelper, windows_core::IUnknown); impl IDropTargetHelper { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] - pub unsafe fn DragEnter(&self, hwndtarget: P0, pdataobject: P1, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()> + pub unsafe fn DragEnter(&self, hwndtarget: super::super::Foundation::HWND, pdataobject: P1, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DragEnter)(windows_core::Interface::as_raw(self), hwndtarget.param().abi(), pdataobject.param().abi(), core::mem::transmute(ppt), core::mem::transmute(dweffect)).ok() + (windows_core::Interface::vtable(self).DragEnter)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtarget), pdataobject.param().abi(), core::mem::transmute(ppt), core::mem::transmute(dweffect)).ok() } pub unsafe fn DragLeave(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DragLeave)(windows_core::Interface::as_raw(self)).ok() @@ -18908,7 +18515,7 @@ windows_core::imp::define_interface!(IEnumAssocHandlers, IEnumAssocHandlers_Vtbl 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(core::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::mem::zeroed()))).ok() } } #[repr(C)] @@ -18936,7 +18543,7 @@ windows_core::imp::define_interface!(IEnumExplorerCommand, 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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -19073,7 +18680,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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -19216,7 +18823,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(core::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::mem::zeroed()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)) @@ -19283,7 +18890,7 @@ windows_core::imp::define_interface!(IEnumObjects, IEnumObjects_Vtbl, 0x2c1c7e2e 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(), core::mem::transmute(riid), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(riid), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -19491,7 +19098,7 @@ windows_core::imp::define_interface!(IEnumShellItems, IEnumShellItems_Vtbl, 0x70 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(core::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::mem::zeroed()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), core::mem::transmute(celt)).ok() @@ -20204,18 +19811,15 @@ impl windows_core::RuntimeName for IExpDispSupportXP {} windows_core::imp::define_interface!(IExplorerBrowser, IExplorerBrowser_Vtbl, 0xdfd3b6b5_c10c_4be9_85f6_a66969f402f6); windows_core::imp::interface_hierarchy!(IExplorerBrowser, windows_core::IUnknown); impl IExplorerBrowser { - pub unsafe fn Initialize(&self, hwndparent: P0, prc: *const super::super::Foundation::RECT, pfs: Option<*const FOLDERSETTINGS>) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(prc), core::mem::transmute(pfs.unwrap_or(core::ptr::null()))).ok() + pub unsafe fn Initialize(&self, hwndparent: super::super::Foundation::HWND, prc: *const super::super::Foundation::RECT, pfs: Option<*const FOLDERSETTINGS>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(prc), core::mem::transmute(pfs.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed())), core::mem::transmute(rcbrowser)).ok() } pub unsafe fn SetPropertyBag(&self, pszpropertybag: P0) -> windows_core::Result<()> where @@ -20809,13 +20413,12 @@ impl IExtensionServices { { (windows_core::Interface::vtable(self).SetAdditionalHeaders)(windows_core::Interface::as_raw(self), pwzadditionalheaders.param().abi()).ok() } - pub unsafe fn SetAuthenticateData(&self, phwnd: P0, pwzusername: P1, pwzpassword: P2) -> windows_core::Result<()> + pub unsafe fn SetAuthenticateData(&self, phwnd: super::super::Foundation::HWND, pwzusername: P1, pwzpassword: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetAuthenticateData)(windows_core::Interface::as_raw(self), phwnd.param().abi(), pwzusername.param().abi(), pwzpassword.param().abi()).ok() + (windows_core::Interface::vtable(self).SetAuthenticateData)(windows_core::Interface::as_raw(self), core::mem::transmute(phwnd), pwzusername.param().abi(), pwzpassword.param().abi()).ok() } } #[repr(C)] @@ -20860,7 +20463,7 @@ impl IExtractIconA { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), core::mem::transmute(niconindex), core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), core::mem::transmute(niconsize)).ok() + (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), core::mem::transmute(niconindex), core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), core::mem::transmute(niconsize)).ok() } } #[repr(C)] @@ -20911,7 +20514,7 @@ impl IExtractIconW { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), core::mem::transmute(niconindex), core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), core::mem::transmute(niconsize)).ok() + (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), core::mem::transmute(niconindex), core::mem::transmute(phiconlarge.unwrap_or(core::mem::zeroed())), core::mem::transmute(phiconsmall.unwrap_or(core::mem::zeroed())), core::mem::transmute(niconsize)).ok() } } #[repr(C)] @@ -22210,11 +21813,8 @@ impl IFileOperation { { (windows_core::Interface::vtable(self).SetProperties)(windows_core::Interface::as_raw(self), pproparray.param().abi()).ok() } - pub unsafe fn SetOwnerWindow(&self, hwndowner: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOwnerWindow)(windows_core::Interface::as_raw(self), hwndowner.param().abi()).ok() + pub unsafe fn SetOwnerWindow(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOwnerWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner)).ok() } pub unsafe fn ApplyPropertiesToItem(&self, psiitem: P0) -> windows_core::Result<()> where @@ -22782,14 +22382,13 @@ impl IFileSaveDialog { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] - pub unsafe fn ApplyProperties(&self, psi: P0, pstore: P1, hwnd: P2, psink: P3) -> windows_core::Result<()> + pub unsafe fn ApplyProperties(&self, psi: P0, pstore: P1, hwnd: super::super::Foundation::HWND, psink: P3) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).ApplyProperties)(windows_core::Interface::as_raw(self), psi.param().abi(), pstore.param().abi(), hwnd.param().abi(), psink.param().abi()).ok() + (windows_core::Interface::vtable(self).ApplyProperties)(windows_core::Interface::as_raw(self), psi.param().abi(), pstore.param().abi(), core::mem::transmute(hwnd), psink.param().abi()).ok() } } #[repr(C)] @@ -22882,11 +22481,8 @@ impl IFileSearchBand { (windows_core::Interface::vtable(self).SetFocus)(windows_core::Interface::as_raw(self)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn SetSearchParameters(&self, pbstrsearchid: *const windows_core::BSTR, bnavtoresults: P1, pvarscope: *const super::super::System::Variant::VARIANT, pvarqueryfile: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSearchParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsearchid), bnavtoresults.param().abi(), core::mem::transmute(pvarscope), core::mem::transmute(pvarqueryfile)).ok() + pub unsafe fn SetSearchParameters(&self, pbstrsearchid: *const windows_core::BSTR, bnavtoresults: super::super::Foundation::VARIANT_BOOL, pvarscope: *const super::super::System::Variant::VARIANT, pvarqueryfile: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSearchParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrsearchid), core::mem::transmute(bnavtoresults), core::mem::transmute(pvarscope), core::mem::transmute(pvarqueryfile)).ok() } pub unsafe fn SearchID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -22998,12 +22594,11 @@ impl IFileSyncMergeHandler { (windows_core::Interface::vtable(self).Merge)(windows_core::Interface::as_raw(self), localfilepath.param().abi(), serverfilepath.param().abi(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn ShowResolveConflictUIAsync(&self, localfilepath: P0, monitortodisplayon: P1) -> windows_core::Result<()> + pub unsafe fn ShowResolveConflictUIAsync(&self, localfilepath: P0, monitortodisplayon: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ShowResolveConflictUIAsync)(windows_core::Interface::as_raw(self), localfilepath.param().abi(), monitortodisplayon.param().abi()).ok() + (windows_core::Interface::vtable(self).ShowResolveConflictUIAsync)(windows_core::Interface::as_raw(self), localfilepath.param().abi(), core::mem::transmute(monitortodisplayon)).ok() } } #[repr(C)] @@ -23408,7 +23003,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), core::mem::transmute(cidl), core::mem::transmute(apidl), core::mem::transmute(apt.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).SelectAndPositionItems)(windows_core::Interface::as_raw(self), core::mem::transmute(cidl), core::mem::transmute(apidl), core::mem::transmute(apt.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } } #[repr(C)] @@ -23596,7 +23191,7 @@ impl IFolderView2 { (windows_core::Interface::vtable(self).SetGroupBy)(windows_core::Interface::as_raw(self), core::mem::transmute(key), fascending.param().abi()).ok() } pub unsafe fn GetGroupBy(&self, pkey: *mut super::super::Foundation::PROPERTYKEY, pfascending: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetGroupBy)(windows_core::Interface::as_raw(self), core::mem::transmute(pkey), core::mem::transmute(pfascending.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetGroupBy)(windows_core::Interface::as_raw(self), core::mem::transmute(pkey), core::mem::transmute(pfascending.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] pub unsafe fn SetViewProperty(&self, pidl: *const Common::ITEMIDLIST, propkey: *const super::super::Foundation::PROPERTYKEY, propvar: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { @@ -23968,12 +23563,11 @@ windows_core::imp::define_interface!(IFolderViewHost, IFolderViewHost_Vtbl, 0x1e windows_core::imp::interface_hierarchy!(IFolderViewHost, windows_core::IUnknown); impl IFolderViewHost { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn Initialize(&self, hwndparent: P0, pdo: P1, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, hwndparent: super::super::Foundation::HWND, pdo: P1, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), pdo.param().abi(), core::mem::transmute(prc)).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), pdo.param().abi(), core::mem::transmute(prc)).ok() } } #[repr(C)] @@ -24223,13 +23817,12 @@ impl IFrameworkInputPane { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), pwindow.param().abi(), phandler.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn AdviseWithHWND(&self, hwnd: P0, phandler: P1) -> windows_core::Result + pub unsafe fn AdviseWithHWND(&self, hwnd: super::super::Foundation::HWND, phandler: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AdviseWithHWND)(windows_core::Interface::as_raw(self), hwnd.param().abi(), phandler.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AdviseWithHWND)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), phandler.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unadvise)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)).ok() @@ -24455,14 +24048,13 @@ impl core::ops::Deref for IHWEventHandler2 { } windows_core::imp::interface_hierarchy!(IHWEventHandler2, windows_core::IUnknown, IHWEventHandler); impl IHWEventHandler2 { - pub unsafe fn HandleEventWithHWND(&self, pszdeviceid: P0, pszaltdeviceid: P1, pszeventtype: P2, hwndowner: P3) -> windows_core::Result<()> + pub unsafe fn HandleEventWithHWND(&self, pszdeviceid: P0, pszaltdeviceid: P1, pszeventtype: P2, hwndowner: super::super::Foundation::HWND) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).HandleEventWithHWND)(windows_core::Interface::as_raw(self), pszdeviceid.param().abi(), pszaltdeviceid.param().abi(), pszeventtype.param().abi(), hwndowner.param().abi()).ok() + (windows_core::Interface::vtable(self).HandleEventWithHWND)(windows_core::Interface::as_raw(self), pszdeviceid.param().abi(), pszaltdeviceid.param().abi(), pszeventtype.param().abi(), core::mem::transmute(hwndowner)).ok() } } #[repr(C)] @@ -24674,7 +24266,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), core::mem::transmute(dwwhichref), core::mem::transmute(ppimktarget.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppwzlocation.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetMonikerReference)(windows_core::Interface::as_raw(self), core::mem::transmute(dwwhichref), core::mem::transmute(ppimktarget.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwzlocation.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetStringReference(&self, grfhlsetf: u32, pwztarget: P1, pwzlocation: P2) -> windows_core::Result<()> where @@ -24684,7 +24276,7 @@ impl IHlink { (windows_core::Interface::vtable(self).SetStringReference)(windows_core::Interface::as_raw(self), core::mem::transmute(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), core::mem::transmute(dwwhichref), core::mem::transmute(ppwztarget.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppwzlocation.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStringReference)(windows_core::Interface::as_raw(self), core::mem::transmute(dwwhichref), core::mem::transmute(ppwztarget.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwzlocation.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetFriendlyName(&self, pwzfriendlyname: P0) -> windows_core::Result<()> where @@ -25447,12 +25039,9 @@ impl IHomeGroup { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsMember)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn ShowSharingWizard(&self, owner: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn ShowSharingWizard(&self, owner: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ShowSharingWizard)(windows_core::Interface::as_raw(self), owner.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ShowSharingWizard)(windows_core::Interface::as_raw(self), core::mem::transmute(owner), &mut result__).map(|| result__) } } #[repr(C)] @@ -25505,7 +25094,7 @@ impl IIOCancelInformation { (windows_core::Interface::vtable(self).SetCancelInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(dwthreadid), core::mem::transmute(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(core::ptr::null_mut())), core::mem::transmute(pumsgcancel.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCancelInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwthreadid.unwrap_or(core::mem::zeroed())), core::mem::transmute(pumsgcancel.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -25826,11 +25415,8 @@ impl windows_core::RuntimeName for IInitializeWithPropertyStore {} windows_core::imp::define_interface!(IInitializeWithWindow, IInitializeWithWindow_Vtbl, 0x3e68d4bd_7135_4d10_8018_9fb6d9f33fa1); windows_core::imp::interface_hierarchy!(IInitializeWithWindow, windows_core::IUnknown); impl IInitializeWithWindow { - pub unsafe fn Initialize(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn Initialize(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } } #[repr(C)] @@ -26383,12 +25969,11 @@ impl IKnownFolderManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FindFolderFromIDList)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Redirect(&self, rfid: *const windows_core::GUID, hwnd: P1, flags: u32, psztargetpath: P3, pexclusion: Option<&[windows_core::GUID]>, ppszerror: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> + pub unsafe fn Redirect(&self, rfid: *const windows_core::GUID, hwnd: Option, flags: u32, psztargetpath: P3, pexclusion: Option<&[windows_core::GUID]>, ppszerror: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> where - P1: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Redirect)(windows_core::Interface::as_raw(self), core::mem::transmute(rfid), hwnd.param().abi(), core::mem::transmute(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() + (windows_core::Interface::vtable(self).Redirect)(windows_core::Interface::as_raw(self), core::mem::transmute(rfid), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(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::mem::zeroed()))).ok() } } #[repr(C)] @@ -26691,11 +26276,8 @@ impl windows_core::RuntimeName for ILaunchTargetViewSizePreference {} windows_core::imp::define_interface!(ILaunchUIContext, ILaunchUIContext_Vtbl, 0x1791e8f6_21c7_4340_882a_a6a93e3fd73b); windows_core::imp::interface_hierarchy!(ILaunchUIContext, windows_core::IUnknown); impl ILaunchUIContext { - pub unsafe fn SetAssociatedWindow(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAssociatedWindow)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAssociatedWindow(&self, value: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAssociatedWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn SetTabGroupingPreference(&self, value: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetTabGroupingPreference)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() @@ -26832,7 +26414,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), core::mem::transmute(ppt), core::mem::transmute(prcexclude.unwrap_or(core::ptr::null())), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), core::mem::transmute(ppt), core::mem::transmute(prcexclude.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } pub unsafe fn OnSelect(&self, dwselecttype: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnSelect)(windows_core::Interface::as_raw(self), core::mem::transmute(dwselecttype)).ok() @@ -26890,11 +26472,8 @@ impl windows_core::RuntimeName for IMenuPopup {} windows_core::imp::define_interface!(IModalWindow, IModalWindow_Vtbl, 0xb4db1657_70d7_485e_8e3e_6fcb5a5c1802); windows_core::imp::interface_hierarchy!(IModalWindow, windows_core::IUnknown); impl IModalWindow { - pub unsafe fn Show(&self, hwndowner: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), hwndowner.param().abi()).ok() + pub unsafe fn Show(&self, hwndowner: Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -27004,11 +26583,8 @@ impl windows_core::RuntimeName for INameSpaceTreeAccessible {} windows_core::imp::define_interface!(INameSpaceTreeControl, INameSpaceTreeControl_Vtbl, 0x028212a3_b627_47e9_8856_c14265554e4f); windows_core::imp::interface_hierarchy!(INameSpaceTreeControl, windows_core::IUnknown); impl INameSpaceTreeControl { - pub unsafe fn Initialize(&self, hwndparent: P0, prc: *const super::super::Foundation::RECT, nsctsflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(prc), core::mem::transmute(nsctsflags)).ok() + pub unsafe fn Initialize(&self, hwndparent: super::super::Foundation::HWND, prc: *const super::super::Foundation::RECT, nsctsflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(prc), core::mem::transmute(nsctsflags)).ok() } pub unsafe fn TreeAdvise(&self, punk: P0) -> windows_core::Result where @@ -27394,33 +26970,21 @@ windows_core::imp::define_interface!(INameSpaceTreeControlCustomDraw, INameSpace windows_core::imp::interface_hierarchy!(INameSpaceTreeControlCustomDraw, windows_core::IUnknown); impl INameSpaceTreeControlCustomDraw { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn PrePaint(&self, hdc: P0, prc: *const super::super::Foundation::RECT) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn PrePaint(&self, hdc: super::super::Graphics::Gdi::HDC, prc: *const super::super::Foundation::RECT) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).PrePaint)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(prc), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).PrePaint)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(prc), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn PostPaint(&self, hdc: P0, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PostPaint)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(prc)).ok() + pub unsafe fn PostPaint(&self, hdc: super::super::Graphics::Gdi::HDC, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PostPaint)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(prc)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] - pub unsafe fn ItemPrePaint(&self, hdc: P0, prc: *const super::super::Foundation::RECT, pnstccditem: *const NSTCCUSTOMDRAW, pclrtext: *mut super::super::Foundation::COLORREF, pclrtextbk: *mut super::super::Foundation::COLORREF, plres: *mut super::super::Foundation::LRESULT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ItemPrePaint)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(prc), core::mem::transmute(pnstccditem), core::mem::transmute(pclrtext), core::mem::transmute(pclrtextbk), core::mem::transmute(plres)).ok() + pub unsafe fn ItemPrePaint(&self, hdc: super::super::Graphics::Gdi::HDC, prc: *const super::super::Foundation::RECT, pnstccditem: *const NSTCCUSTOMDRAW, pclrtext: *mut super::super::Foundation::COLORREF, pclrtextbk: *mut super::super::Foundation::COLORREF, plres: *mut super::super::Foundation::LRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ItemPrePaint)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(prc), core::mem::transmute(pnstccditem), core::mem::transmute(pclrtext), core::mem::transmute(pclrtextbk), core::mem::transmute(plres)).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] - pub unsafe fn ItemPostPaint(&self, hdc: P0, prc: *const super::super::Foundation::RECT, pnstccditem: *const NSTCCUSTOMDRAW) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ItemPostPaint)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(prc), core::mem::transmute(pnstccditem)).ok() + pub unsafe fn ItemPostPaint(&self, hdc: super::super::Graphics::Gdi::HDC, prc: *const super::super::Foundation::RECT, pnstccditem: *const NSTCCUSTOMDRAW) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ItemPostPaint)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(prc), core::mem::transmute(pnstccditem)).ok() } } #[repr(C)] @@ -27627,12 +27191,8 @@ impl INameSpaceTreeControlEvents { { (windows_core::Interface::vtable(self).OnSelectionChanged)(windows_core::Interface::as_raw(self), psiaselection.param().abi()).ok() } - pub unsafe fn OnKeyboardInput(&self, umsg: u32, wparam: P1, lparam: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnKeyboardInput)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn OnKeyboardInput(&self, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnKeyboardInput)(windows_core::Interface::as_raw(self), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } pub unsafe fn OnBeforeExpand(&self, psi: P0) -> windows_core::Result<()> where @@ -28270,12 +27830,11 @@ impl windows_core::RuntimeName for INewMenuClient {} windows_core::imp::define_interface!(INewShortcutHookA, INewShortcutHookA_Vtbl, 0x000214e1_0000_0000_c000_000000000046); windows_core::imp::interface_hierarchy!(INewShortcutHookA, windows_core::IUnknown); impl INewShortcutHookA { - pub unsafe fn SetReferent(&self, pcszreferent: P0, hwnd: P1) -> windows_core::Result<()> + pub unsafe fn SetReferent(&self, pcszreferent: P0, hwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetReferent)(windows_core::Interface::as_raw(self), pcszreferent.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).SetReferent)(windows_core::Interface::as_raw(self), pcszreferent.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReferent(&self, pszreferent: &mut [u8]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetReferent)(windows_core::Interface::as_raw(self), core::mem::transmute(pszreferent.as_ptr()), pszreferent.len().try_into().unwrap()).ok() @@ -28358,12 +27917,11 @@ impl windows_core::RuntimeName for INewShortcutHookA {} windows_core::imp::define_interface!(INewShortcutHookW, INewShortcutHookW_Vtbl, 0x000214f7_0000_0000_c000_000000000046); windows_core::imp::interface_hierarchy!(INewShortcutHookW, windows_core::IUnknown); impl INewShortcutHookW { - pub unsafe fn SetReferent(&self, pcszreferent: P0, hwnd: P1) -> windows_core::Result<()> + pub unsafe fn SetReferent(&self, pcszreferent: P0, hwnd: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetReferent)(windows_core::Interface::as_raw(self), pcszreferent.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).SetReferent)(windows_core::Interface::as_raw(self), pcszreferent.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetReferent(&self, pszreferent: &mut [u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetReferent)(windows_core::Interface::as_raw(self), core::mem::transmute(pszreferent.as_ptr()), pszreferent.len().try_into().unwrap()).ok() @@ -28959,14 +28517,13 @@ impl windows_core::RuntimeName for IOpenControlPanel {} windows_core::imp::define_interface!(IOpenSearchSource, IOpenSearchSource_Vtbl, 0xf0ee7333_e6fc_479b_9f25_a860c234a38e); windows_core::imp::interface_hierarchy!(IOpenSearchSource, windows_core::IUnknown); impl IOpenSearchSource { - pub unsafe fn GetResults(&self, hwnd: P0, pszquery: P1, dwstartindex: u32, dwcount: u32) -> windows_core::Result + pub unsafe fn GetResults(&self, hwnd: super::super::Foundation::HWND, pszquery: P1, dwstartindex: u32, dwcount: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetResults)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pszquery.param().abi(), core::mem::transmute(dwstartindex), core::mem::transmute(dwcount), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetResults)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pszquery.param().abi(), core::mem::transmute(dwstartindex), core::mem::transmute(dwcount), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -28993,11 +28550,8 @@ impl windows_core::RuntimeName for IOpenSearchSource {} windows_core::imp::define_interface!(IOperationsProgressDialog, IOperationsProgressDialog_Vtbl, 0x0c9fb851_e5c9_43eb_a370_f0677b13874c); windows_core::imp::interface_hierarchy!(IOperationsProgressDialog, windows_core::IUnknown); impl IOperationsProgressDialog { - pub unsafe fn StartProgressDialog(&self, hwndowner: P0, flags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).StartProgressDialog)(windows_core::Interface::as_raw(self), hwndowner.param().abi(), core::mem::transmute(flags)).ok() + pub unsafe fn StartProgressDialog(&self, hwndowner: super::super::Foundation::HWND, flags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).StartProgressDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner), core::mem::transmute(flags)).ok() } pub unsafe fn StopProgressDialog(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StopProgressDialog)(windows_core::Interface::as_raw(self)).ok() @@ -29447,7 +29001,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(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() + (windows_core::Interface::vtable(self).GetParentAndItem)(windows_core::Interface::as_raw(self), core::mem::transmute(ppidlparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppsf.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppidlchild.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -29772,11 +29326,8 @@ impl windows_core::RuntimeName for IPersistIDList {} windows_core::imp::define_interface!(IPreviewHandler, IPreviewHandler_Vtbl, 0x8895b1c6_b41f_4c1c_a562_0d564250836f); windows_core::imp::interface_hierarchy!(IPreviewHandler, windows_core::IUnknown); impl IPreviewHandler { - pub unsafe fn SetWindow(&self, hwnd: P0, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(prc)).ok() + pub unsafe fn SetWindow(&self, hwnd: super::super::Foundation::HWND, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(prc)).ok() } pub unsafe fn SetRect(&self, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc)).ok() @@ -29939,21 +29490,15 @@ impl windows_core::RuntimeName for IPreviewHandlerFrame {} windows_core::imp::define_interface!(IPreviewHandlerVisuals, IPreviewHandlerVisuals_Vtbl, 0x196bf9a5_b346_4ef0_aa1e_5dcdb76768b1); windows_core::imp::interface_hierarchy!(IPreviewHandlerVisuals, windows_core::IUnknown); impl IPreviewHandlerVisuals { - pub unsafe fn SetBackgroundColor(&self, color: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), color.param().abi()).ok() + pub unsafe fn SetBackgroundColor(&self, color: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), core::mem::transmute(color)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetFont(&self, plf: *const super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetFont)(windows_core::Interface::as_raw(self), core::mem::transmute(plf)).ok() } - pub unsafe fn SetTextColor(&self, color: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTextColor)(windows_core::Interface::as_raw(self), color.param().abi()).ok() + pub unsafe fn SetTextColor(&self, color: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTextColor)(windows_core::Interface::as_raw(self), core::mem::transmute(color)).ok() } } #[repr(C)] @@ -30125,12 +29670,11 @@ impl windows_core::RuntimeName for IProfferService {} windows_core::imp::define_interface!(IProgressDialog, IProgressDialog_Vtbl, 0xebbc7c04_315e_11d2_b62f_006097df5bd4); windows_core::imp::interface_hierarchy!(IProgressDialog, windows_core::IUnknown); impl IProgressDialog { - pub unsafe fn StartProgressDialog(&self, hwndparent: P0, punkenablemodless: P1, dwflags: u32, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> + pub unsafe fn StartProgressDialog(&self, hwndparent: Option, punkenablemodless: P1, dwflags: u32, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where - 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(), core::mem::transmute(dwflags), core::mem::transmute(pvresevered.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProgressDialog)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), punkenablemodless.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pvresevered.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn StopProgressDialog(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StopProgressDialog)(windows_core::Interface::as_raw(self)).ok() @@ -30141,11 +29685,8 @@ impl IProgressDialog { { (windows_core::Interface::vtable(self).SetTitle)(windows_core::Interface::as_raw(self), pwztitle.param().abi()).ok() } - pub unsafe fn SetAnimation(&self, hinstanimation: P0, idanimation: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAnimation)(windows_core::Interface::as_raw(self), hinstanimation.param().abi(), core::mem::transmute(idanimation)).ok() + pub unsafe fn SetAnimation(&self, hinstanimation: Option, idanimation: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAnimation)(windows_core::Interface::as_raw(self), core::mem::transmute(hinstanimation.unwrap_or(core::mem::zeroed())), core::mem::transmute(idanimation)).ok() } pub unsafe fn HasUserCancelled(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).HasUserCancelled)(windows_core::Interface::as_raw(self)) @@ -30161,16 +29702,16 @@ impl IProgressDialog { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetLine)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlinenum), pwzstring.param().abi(), fcompactpath.param().abi(), core::mem::transmute(pvresevered.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetLine)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlinenum), pwzstring.param().abi(), fcompactpath.param().abi(), core::mem::transmute(pvresevered.unwrap_or(core::mem::zeroed()))).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(core::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::mem::zeroed()))).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), core::mem::transmute(dwtimeraction), core::mem::transmute(pvresevered.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Timer)(windows_core::Interface::as_raw(self), core::mem::transmute(dwtimeraction), core::mem::transmute(pvresevered.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -30414,11 +29955,8 @@ impl core::ops::Deref for IPublishedApp2 { } windows_core::imp::interface_hierarchy!(IPublishedApp2, windows_core::IUnknown, IShellApp, IPublishedApp); impl IPublishedApp2 { - pub unsafe fn Install2(&self, pstinstall: *const super::super::Foundation::SYSTEMTIME, hwndparent: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Install2)(windows_core::Interface::as_raw(self), core::mem::transmute(pstinstall), hwndparent.param().abi()).ok() + pub unsafe fn Install2(&self, pstinstall: *const super::super::Foundation::SYSTEMTIME, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Install2)(windows_core::Interface::as_raw(self), core::mem::transmute(pstinstall), core::mem::transmute(hwndparent)).ok() } } #[repr(C)] @@ -30461,7 +29999,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(core::ptr::null_mut())), core::mem::transmute(pdocmanifest.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTransferManifest)(windows_core::Interface::as_raw(self), core::mem::transmute(phrfromtransfer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdocmanifest.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -30508,19 +30046,17 @@ windows_core::imp::define_interface!(IQueryAssociations, IQueryAssociations_Vtbl windows_core::imp::interface_hierarchy!(IQueryAssociations, windows_core::IUnknown); impl IQueryAssociations { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn Init(&self, flags: ASSOCF, pszassoc: P1, hkprogid: P2, hwnd: P3) -> windows_core::Result<()> + pub unsafe fn Init(&self, flags: ASSOCF, pszassoc: P1, hkprogid: Option, hwnd: Option) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), pszassoc.param().abi(), hkprogid.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), pszassoc.param().abi(), core::mem::transmute(hkprogid.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn GetString(&self, flags: ASSOCF, str: ASSOCSTR, pszextra: P2, pszout: windows_core::PWSTR, pcchout: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetString(&self, flags: ASSOCF, str: ASSOCSTR, pszextra: P2, pszout: Option, pcchout: *mut u32) -> windows_core::Result<()> where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), core::mem::transmute(str), pszextra.param().abi(), core::mem::transmute(pszout), core::mem::transmute(pcchout)).ok() + (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), core::mem::transmute(str), pszextra.param().abi(), core::mem::transmute(pszout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchout)).ok() } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn GetKey(&self, flags: ASSOCF, key: ASSOCKEY, pszextra: P2) -> windows_core::Result @@ -30534,7 +30070,7 @@ impl IQueryAssociations { where P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(flags), core::mem::transmute(data), pszextra.param().abi(), core::mem::transmute(pvout.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbout.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetEnum(&self, flags: ASSOCF, assocenum: ASSOCENUM, pszextra: P2, riid: *const windows_core::GUID, ppvout: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where @@ -30963,12 +30499,11 @@ impl windows_core::RuntimeName for IRemoteComputer {} windows_core::imp::define_interface!(IResolveShellLink, IResolveShellLink_Vtbl, 0x5cd52983_9449_11d2_963a_00c04f79adf0); windows_core::imp::interface_hierarchy!(IResolveShellLink, windows_core::IUnknown); impl IResolveShellLink { - pub unsafe fn ResolveShellLink(&self, punklink: P0, hwnd: P1, fflags: u32) -> windows_core::Result<()> + pub unsafe fn ResolveShellLink(&self, punklink: P0, hwnd: super::super::Foundation::HWND, fflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ResolveShellLink)(windows_core::Interface::as_raw(self), punklink.param().abi(), hwnd.param().abi(), core::mem::transmute(fflags)).ok() + (windows_core::Interface::vtable(self).ResolveShellLink)(windows_core::Interface::as_raw(self), punklink.param().abi(), core::mem::transmute(hwnd), core::mem::transmute(fflags)).ok() } } #[repr(C)] @@ -31003,7 +30538,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), core::mem::transmute(pidl), core::mem::transmute(ppidladded.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddIDList)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl), core::mem::transmute(ppidladded.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn RemoveItem(&self, psi: P0) -> windows_core::Result<()> where @@ -31746,11 +31281,8 @@ impl ISharedBitmap { (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn InitializeBitmap(&self, hbm: P0, wtsat: WTS_ALPHATYPE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializeBitmap)(windows_core::Interface::as_raw(self), hbm.param().abi(), core::mem::transmute(wtsat)).ok() + pub unsafe fn InitializeBitmap(&self, hbm: super::super::Graphics::Gdi::HBITMAP, wtsat: WTS_ALPHATYPE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializeBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(hbm), core::mem::transmute(wtsat)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn Detach(&self) -> windows_core::Result { @@ -32036,26 +31568,16 @@ windows_core::imp::interface_hierarchy!(IShellBrowser, windows_core::IUnknown, s #[cfg(feature = "Win32_System_Ole")] impl IShellBrowser { #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_WindowsAndMessaging"))] - pub unsafe fn InsertMenusSB(&self, hmenushared: P0, lpmenuwidths: *mut super::super::System::Ole::OLEMENUGROUPWIDTHS) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InsertMenusSB)(windows_core::Interface::as_raw(self), hmenushared.param().abi(), core::mem::transmute(lpmenuwidths)).ok() + pub unsafe fn InsertMenusSB(&self, hmenushared: super::WindowsAndMessaging::HMENU, lpmenuwidths: *mut super::super::System::Ole::OLEMENUGROUPWIDTHS) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InsertMenusSB)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenushared), core::mem::transmute(lpmenuwidths)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetMenuSB(&self, hmenushared: P0, holemenures: isize, hwndactiveobject: P2) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMenuSB)(windows_core::Interface::as_raw(self), hmenushared.param().abi(), core::mem::transmute(holemenures), hwndactiveobject.param().abi()).ok() + pub unsafe fn SetMenuSB(&self, hmenushared: super::WindowsAndMessaging::HMENU, holemenures: isize, hwndactiveobject: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMenuSB)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenushared), core::mem::transmute(holemenures), core::mem::transmute(hwndactiveobject)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn RemoveMenusSB(&self, hmenushared: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemoveMenusSB)(windows_core::Interface::as_raw(self), hmenushared.param().abi()).ok() + pub unsafe fn RemoveMenusSB(&self, hmenushared: super::WindowsAndMessaging::HMENU) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemoveMenusSB)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenushared)).ok() } pub unsafe fn SetStatusTextSB(&self, pszstatustext: P0) -> windows_core::Result<()> where @@ -32086,12 +31608,8 @@ impl IShellBrowser { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetControlWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(id), &mut result__).map(|| result__) } - pub unsafe fn SendControlMsg(&self, id: u32, umsg: u32, wparam: P2, lparam: P3, pret: Option<*mut super::super::Foundation::LRESULT>) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).SendControlMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pret.unwrap_or(core::ptr::null_mut()))).ok() + pub unsafe fn SendControlMsg(&self, id: u32, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, pret: Option<*mut super::super::Foundation::LRESULT>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SendControlMsg)(windows_core::Interface::as_raw(self), core::mem::transmute(id), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(pret.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn QueryActiveShellView(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -32264,7 +31782,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), core::mem::transmute(levent), core::mem::transmute(pidl1.unwrap_or(core::ptr::null())), core::mem::transmute(pidl2.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).OnChange)(windows_core::Interface::as_raw(self), core::mem::transmute(levent), core::mem::transmute(pidl1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pidl2.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -32299,7 +31817,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(core::ptr::null())), core::mem::transmute(icolumn), core::mem::transmute(pdetails)).ok() + (windows_core::Interface::vtable(self).GetDetailsOf)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(icolumn), core::mem::transmute(pdetails)).ok() } pub unsafe fn ColumnClick(&self, icolumn: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ColumnClick)(windows_core::Interface::as_raw(self), core::mem::transmute(icolumn)).ok() @@ -33087,12 +32605,11 @@ windows_core::imp::define_interface!(IShellExtInit, IShellExtInit_Vtbl, 0x000214 windows_core::imp::interface_hierarchy!(IShellExtInit, windows_core::IUnknown); impl IShellExtInit { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] - pub unsafe fn Initialize(&self, pidlfolder: Option<*const Common::ITEMIDLIST>, pdtobj: P1, hkeyprogid: P2) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, pidlfolder: Option<*const Common::ITEMIDLIST>, pdtobj: P1, hkeyprogid: Option) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (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() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pidlfolder.unwrap_or(core::mem::zeroed())), pdtobj.param().abi(), core::mem::transmute(hkeyprogid.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -33312,19 +32829,15 @@ windows_core::imp::define_interface!(IShellFolder, IShellFolder_Vtbl, 0x000214e6 windows_core::imp::interface_hierarchy!(IShellFolder, windows_core::IUnknown); impl IShellFolder { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] - pub unsafe fn ParseDisplayName(&self, hwnd: P0, pbc: P1, pszdisplayname: P2, pcheaten: Option<*const u32>, ppidl: *mut *mut Common::ITEMIDLIST, pdwattributes: *mut u32) -> windows_core::Result<()> + pub unsafe fn ParseDisplayName(&self, hwnd: super::super::Foundation::HWND, pbc: P1, pszdisplayname: P2, pcheaten: Option<*const u32>, ppidl: *mut *mut Common::ITEMIDLIST, pdwattributes: *mut u32) -> windows_core::Result<()> where - P0: windows_core::Param, 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(core::ptr::null())), core::mem::transmute(ppidl), core::mem::transmute(pdwattributes)).ok() + (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pbc.param().abi(), pszdisplayname.param().abi(), core::mem::transmute(pcheaten.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppidl), core::mem::transmute(pdwattributes)).ok() } - pub unsafe fn EnumObjects(&self, hwnd: P0, grfflags: u32, ppenumidlist: *mut Option) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(grfflags), core::mem::transmute(ppenumidlist)) + pub unsafe fn EnumObjects(&self, hwnd: super::super::Foundation::HWND, grfflags: u32, ppenumidlist: *mut Option) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(grfflags), core::mem::transmute(ppenumidlist)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] pub unsafe fn BindToObject(&self, pidl: *const Common::ITEMIDLIST, pbc: P1) -> windows_core::Result @@ -33345,44 +32858,38 @@ impl IShellFolder { (windows_core::Interface::vtable(self).BindToStorage)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl), pbc.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] - pub unsafe fn CompareIDs(&self, lparam: P0, pidl1: *const Common::ITEMIDLIST, pidl2: *const Common::ITEMIDLIST) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CompareIDs)(windows_core::Interface::as_raw(self), lparam.param().abi(), core::mem::transmute(pidl1), core::mem::transmute(pidl2)) + pub unsafe fn CompareIDs(&self, lparam: super::super::Foundation::LPARAM, pidl1: *const Common::ITEMIDLIST, pidl2: *const Common::ITEMIDLIST) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).CompareIDs)(windows_core::Interface::as_raw(self), core::mem::transmute(lparam), core::mem::transmute(pidl1), core::mem::transmute(pidl2)) } - pub unsafe fn CreateViewObject(&self, hwndowner: P0) -> windows_core::Result + pub unsafe fn CreateViewObject(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateViewObject)(windows_core::Interface::as_raw(self), hwndowner.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateViewObject)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetAttributesOf(&self, apidl: &[*const Common::ITEMIDLIST], rgfinout: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAttributesOf)(windows_core::Interface::as_raw(self), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), core::mem::transmute(rgfinout)).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] - pub unsafe fn GetUIObjectOf(&self, hwndowner: P0, apidl: &[*const Common::ITEMIDLIST], rgfreserved: Option<*const u32>) -> windows_core::Result + pub unsafe fn GetUIObjectOf(&self, hwndowner: super::super::Foundation::HWND, apidl: &[*const Common::ITEMIDLIST], rgfreserved: Option<*const u32>) -> windows_core::Result where - P0: windows_core::Param, 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(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetUIObjectOf)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), &T::IID, core::mem::transmute(rgfreserved.unwrap_or(core::mem::zeroed())), &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<()> { (windows_core::Interface::vtable(self).GetDisplayNameOf)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl), core::mem::transmute(uflags), core::mem::transmute(pname)).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] - pub unsafe fn SetNameOf(&self, hwnd: P0, pidl: *const Common::ITEMIDLIST, pszname: P2, uflags: SHGDNF, ppidlout: Option<*mut *mut Common::ITEMIDLIST>) -> windows_core::Result<()> + pub unsafe fn SetNameOf(&self, hwnd: Option, pidl: *const Common::ITEMIDLIST, pszname: P2, uflags: SHGDNF, ppidlout: Option<*mut *mut Common::ITEMIDLIST>) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetNameOf)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(pidl), pszname.param().abi(), core::mem::transmute(uflags), core::mem::transmute(ppidlout.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetNameOf)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pidl), pszname.param().abi(), core::mem::transmute(uflags), core::mem::transmute(ppidlout.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -33647,7 +33154,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(core::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::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn SetBandInfoSFB(&self, pbi: *const BANDINFOSFB) -> windows_core::Result<()> { @@ -33711,11 +33218,8 @@ impl windows_core::RuntimeName for IShellFolderBand {} windows_core::imp::define_interface!(IShellFolderView, IShellFolderView_Vtbl, 0x37a378c0_f82d_11ce_ae65_08002b2e1262); windows_core::imp::interface_hierarchy!(IShellFolderView, windows_core::IUnknown); impl IShellFolderView { - pub unsafe fn Rearrange(&self, lparamsort: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Rearrange)(windows_core::Interface::as_raw(self), lparamsort.param().abi()).ok() + pub unsafe fn Rearrange(&self, lparamsort: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Rearrange)(windows_core::Interface::as_raw(self), core::mem::transmute(lparamsort)).ok() } pub unsafe fn GetArrangeParam(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -33742,7 +33246,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(core::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::mem::zeroed())), &mut result__).map(|| result__) } pub unsafe fn GetObjectCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -34167,12 +33671,8 @@ impl windows_core::RuntimeName for IShellFolderView {} windows_core::imp::define_interface!(IShellFolderViewCB, IShellFolderViewCB_Vtbl, 0x2047e320_f2a9_11ce_ae65_08002b2e1262); windows_core::imp::interface_hierarchy!(IShellFolderViewCB, windows_core::IUnknown); impl IShellFolderViewCB { - pub unsafe fn MessageSFVCB(&self, umsg: SFVM_MESSAGE_ID, wparam: P1, lparam: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).MessageSFVCB)(windows_core::Interface::as_raw(self), umsg.0 as _, wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn MessageSFVCB(&self, umsg: SFVM_MESSAGE_ID, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).MessageSFVCB)(windows_core::Interface::as_raw(self), umsg.0 as _, core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } } #[repr(C)] @@ -34855,11 +34355,8 @@ impl IShellImageData { (windows_core::Interface::vtable(self).Decode)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), core::mem::transmute(cxdesired), core::mem::transmute(cydesired)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn Draw(&self, hdc: P0, prcdest: *mut super::super::Foundation::RECT, prcsrc: *mut super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), hdc.param().abi(), core::mem::transmute(prcdest), core::mem::transmute(prcsrc)).ok() + pub unsafe fn Draw(&self, hdc: super::super::Graphics::Gdi::HDC, prcdest: *mut super::super::Foundation::RECT, prcsrc: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc), core::mem::transmute(prcdest), core::mem::transmute(prcsrc)).ok() } pub unsafe fn NextFrame(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).NextFrame)(windows_core::Interface::as_raw(self)).ok() @@ -36456,11 +35953,8 @@ impl IShellLinkA { { (windows_core::Interface::vtable(self).SetRelativePath)(windows_core::Interface::as_raw(self), pszpathrel.param().abi(), core::mem::transmute(dwreserved)).ok() } - pub unsafe fn Resolve(&self, hwnd: P0, fflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(fflags)).ok() + pub unsafe fn Resolve(&self, hwnd: super::super::Foundation::HWND, fflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(fflags)).ok() } pub unsafe fn SetPath(&self, pszfile: P0) -> windows_core::Result<()> where @@ -37097,11 +36591,8 @@ impl IShellLinkW { { (windows_core::Interface::vtable(self).SetRelativePath)(windows_core::Interface::as_raw(self), pszpathrel.param().abi(), core::mem::transmute(dwreserved)).ok() } - pub unsafe fn Resolve(&self, hwnd: P0, fflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(fflags)).ok() + pub unsafe fn Resolve(&self, hwnd: super::super::Foundation::HWND, fflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(fflags)).ok() } pub unsafe fn SetPath(&self, pszfile: P0) -> windows_core::Result<()> where @@ -37299,35 +36790,30 @@ impl IShellMenu { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), psmc.param().abi(), core::mem::transmute(uid), core::mem::transmute(uidancestor), core::mem::transmute(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(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() + (windows_core::Interface::vtable(self).GetMenuInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsmc.unwrap_or(core::mem::zeroed())), core::mem::transmute(puid.unwrap_or(core::mem::zeroed())), core::mem::transmute(puidancestor.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))).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: P2, dwflags: u32) -> windows_core::Result<()> + pub unsafe fn SetShellFolder(&self, psf: P0, pidlfolder: Option<*const Common::ITEMIDLIST>, hkey: Option, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (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(), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).SetShellFolder)(windows_core::Interface::as_raw(self), psf.param().abi(), core::mem::transmute(pidlfolder.unwrap_or(core::mem::zeroed())), core::mem::transmute(hkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(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<()> { (windows_core::Interface::vtable(self).GetShellFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags), core::mem::transmute(ppidl), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetMenu(&self, hmenu: P0, hwnd: P1, dwflags: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMenu)(windows_core::Interface::as_raw(self), hmenu.param().abi(), hwnd.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn SetMenu(&self, hmenu: Option, hwnd: Option, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(hmenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[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(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() + (windows_core::Interface::vtable(self).GetMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(phmenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(phwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).InvalidateItem)(windows_core::Interface::as_raw(self), core::mem::transmute(psmd.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn GetState(&self, psmd: *mut SMDATA) -> windows_core::Result<()> { @@ -37445,12 +36931,8 @@ windows_core::imp::define_interface!(IShellMenuCallback, IShellMenuCallback_Vtbl windows_core::imp::interface_hierarchy!(IShellMenuCallback, windows_core::IUnknown); impl IShellMenuCallback { #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] - pub unsafe fn CallbackSM(&self, psmd: *mut SMDATA, umsg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).CallbackSM)(windows_core::Interface::as_raw(self), core::mem::transmute(psmd), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn CallbackSM(&self, psmd: *mut SMDATA, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CallbackSM)(windows_core::Interface::as_raw(self), core::mem::transmute(psmd), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } } #[repr(C)] @@ -37814,18 +37296,12 @@ windows_core::imp::define_interface!(IShellPropSheetExt, IShellPropSheetExt_Vtbl windows_core::imp::interface_hierarchy!(IShellPropSheetExt, windows_core::IUnknown); impl IShellPropSheetExt { #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn AddPages(&self, pfnaddpage: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddPages)(windows_core::Interface::as_raw(self), core::mem::transmute(pfnaddpage), lparam.param().abi()).ok() + pub unsafe fn AddPages(&self, pfnaddpage: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddPages)(windows_core::Interface::as_raw(self), core::mem::transmute(pfnaddpage), core::mem::transmute(lparam)).ok() } #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn ReplacePage(&self, upageid: u32, pfnreplacewith: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReplacePage)(windows_core::Interface::as_raw(self), core::mem::transmute(upageid), core::mem::transmute(pfnreplacewith), lparam.param().abi()).ok() + pub unsafe fn ReplacePage(&self, upageid: u32, pfnreplacewith: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReplacePage)(windows_core::Interface::as_raw(self), core::mem::transmute(upageid), core::mem::transmute(pfnreplacewith), core::mem::transmute(lparam)).ok() } } #[repr(C)] @@ -38021,14 +37497,14 @@ impl IShellUIHelper { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AddFavorite(&self, url: &windows_core::BSTR, title: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AddFavorite)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), core::mem::transmute(title.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AddFavorite)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), core::mem::transmute(title.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn AddChannel(&self, url: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddChannel)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AddDesktopComponent(&self, url: &windows_core::BSTR, r#type: &windows_core::BSTR, left: Option<*const super::super::System::Variant::VARIANT>, top: Option<*const super::super::System::Variant::VARIANT>, width: Option<*const super::super::System::Variant::VARIANT>, height: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AddDesktopComponent)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), core::mem::transmute_copy(r#type), 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() + (windows_core::Interface::vtable(self).AddDesktopComponent)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), core::mem::transmute_copy(r#type), core::mem::transmute(left.unwrap_or(core::mem::zeroed())), core::mem::transmute(top.unwrap_or(core::mem::zeroed())), core::mem::transmute(width.unwrap_or(core::mem::zeroed())), core::mem::transmute(height.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn IsSubscribed(&self, url: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -38038,23 +37514,20 @@ impl IShellUIHelper { pub unsafe fn NavigateAndFind(&self, url: &windows_core::BSTR, strquery: &windows_core::BSTR, vartargetframe: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).NavigateAndFind)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), core::mem::transmute_copy(strquery), core::mem::transmute(vartargetframe)).ok() } - pub unsafe fn ImportExportFavorites(&self, fimport: P0, strimpexppath: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ImportExportFavorites)(windows_core::Interface::as_raw(self), fimport.param().abi(), core::mem::transmute_copy(strimpexppath)).ok() + pub unsafe fn ImportExportFavorites(&self, fimport: super::super::Foundation::VARIANT_BOOL, strimpexppath: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ImportExportFavorites)(windows_core::Interface::as_raw(self), core::mem::transmute(fimport), core::mem::transmute_copy(strimpexppath)).ok() } #[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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AutoCompleteSaveForm)(windows_core::Interface::as_raw(self), core::mem::transmute(form.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AutoScan(&self, strsearch: &windows_core::BSTR, strfailureurl: &windows_core::BSTR, pvartargetframe: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AutoScan)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strsearch), core::mem::transmute_copy(strfailureurl), core::mem::transmute(pvartargetframe.unwrap_or(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AutoScan)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(strsearch), core::mem::transmute_copy(strfailureurl), core::mem::transmute(pvartargetframe.unwrap_or(core::mem::zeroed()))).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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AutoCompleteAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ShowBrowserUI(&self, bstrname: &windows_core::BSTR, pvarin: *const super::super::System::Variant::VARIANT) -> windows_core::Result { @@ -38229,12 +37702,8 @@ impl IShellUIHelper2 { pub unsafe fn SkipRunOnce(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SkipRunOnce)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn CustomizeSettings(&self, fsqm: P0, fphishing: P1, bstrlocale: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).CustomizeSettings)(windows_core::Interface::as_raw(self), fsqm.param().abi(), fphishing.param().abi(), core::mem::transmute_copy(bstrlocale)).ok() + pub unsafe fn CustomizeSettings(&self, fsqm: super::super::Foundation::VARIANT_BOOL, fphishing: super::super::Foundation::VARIANT_BOOL, bstrlocale: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CustomizeSettings)(windows_core::Interface::as_raw(self), core::mem::transmute(fsqm), core::mem::transmute(fphishing), core::mem::transmute_copy(bstrlocale)).ok() } pub unsafe fn SqmEnabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -38254,11 +37723,8 @@ impl IShellUIHelper2 { pub unsafe fn DiagnoseConnection(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DiagnoseConnection)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn CustomizeClearType(&self, fset: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CustomizeClearType)(windows_core::Interface::as_raw(self), fset.param().abi()).ok() + pub unsafe fn CustomizeClearType(&self, fset: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CustomizeClearType)(windows_core::Interface::as_raw(self), core::mem::transmute(fset)).ok() } pub unsafe fn IsSearchProviderInstalled(&self, url: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -38272,11 +37738,8 @@ impl IShellUIHelper2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DefaultSearchProvider)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn RunOnceRequiredSettingsComplete(&self, fcomplete: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RunOnceRequiredSettingsComplete)(windows_core::Interface::as_raw(self), fcomplete.param().abi()).ok() + pub unsafe fn RunOnceRequiredSettingsComplete(&self, fcomplete: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RunOnceRequiredSettingsComplete)(windows_core::Interface::as_raw(self), core::mem::transmute(fcomplete)).ok() } pub unsafe fn RunOnceHasShown(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -38499,17 +37962,11 @@ impl IShellUIHelper3 { pub unsafe fn BuildNewTabPage(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BuildNewTabPage)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetRecentlyClosedVisible(&self, fvisible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRecentlyClosedVisible)(windows_core::Interface::as_raw(self), fvisible.param().abi()).ok() + pub unsafe fn SetRecentlyClosedVisible(&self, fvisible: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRecentlyClosedVisible)(windows_core::Interface::as_raw(self), core::mem::transmute(fvisible)).ok() } - pub unsafe fn SetActivitiesVisible(&self, fvisible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetActivitiesVisible)(windows_core::Interface::as_raw(self), fvisible.param().abi()).ok() + pub unsafe fn SetActivitiesVisible(&self, fvisible: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetActivitiesVisible)(windows_core::Interface::as_raw(self), core::mem::transmute(fvisible)).ok() } pub unsafe fn ContentDiscoveryReset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ContentDiscoveryReset)(windows_core::Interface::as_raw(self)).ok() @@ -38518,11 +37975,8 @@ impl IShellUIHelper3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsSuggestedSitesEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn EnableSuggestedSites(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableSuggestedSites)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableSuggestedSites(&self, fenable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableSuggestedSites)(windows_core::Interface::as_raw(self), core::mem::transmute(fenable)).ok() } pub unsafe fn NavigateToSuggestedSites(&self, bstrrelativeurl: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).NavigateToSuggestedSites)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrelativeurl)).ok() @@ -38693,12 +38147,8 @@ impl IShellUIHelper4 { (windows_core::Interface::vtable(self).msSiteModeAddThumbBarButton)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstriconurl), core::mem::transmute_copy(bstrtooltip), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn msSiteModeUpdateThumbBarButton(&self, buttonid: &super::super::System::Variant::VARIANT, fenabled: P1, fvisible: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).msSiteModeUpdateThumbBarButton)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(buttonid), fenabled.param().abi(), fvisible.param().abi()).ok() + pub unsafe fn msSiteModeUpdateThumbBarButton(&self, buttonid: &super::super::System::Variant::VARIANT, fenabled: super::super::Foundation::VARIANT_BOOL, fvisible: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).msSiteModeUpdateThumbBarButton)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(buttonid), core::mem::transmute(fenabled), core::mem::transmute(fvisible)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn msSiteModeSetIconOverlay(&self, iconurl: &windows_core::BSTR, pvardescription: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -38736,12 +38186,9 @@ impl IShellUIHelper4 { (windows_core::Interface::vtable(self).msSiteModeActivate)(windows_core::Interface::as_raw(self)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn msIsSiteModeFirstRun(&self, fpreservestate: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn msIsSiteModeFirstRun(&self, fpreservestate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).msIsSiteModeFirstRun)(windows_core::Interface::as_raw(self), fpreservestate.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).msIsSiteModeFirstRun)(windows_core::Interface::as_raw(self), core::mem::transmute(fpreservestate), &mut result__).map(|| core::mem::transmute(result__)) } pub unsafe fn msAddTrackingProtectionList(&self, url: &windows_core::BSTR, bstrfiltername: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).msAddTrackingProtectionList)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), core::mem::transmute_copy(bstrfiltername)).ok() @@ -38992,11 +38439,8 @@ impl IShellUIHelper5 { pub unsafe fn msLaunchNetworkClientHelp(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).msLaunchNetworkClientHelp)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn msChangeDefaultBrowser(&self, fchange: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).msChangeDefaultBrowser)(windows_core::Interface::as_raw(self), fchange.param().abi()).ok() + pub unsafe fn msChangeDefaultBrowser(&self, fchange: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).msChangeDefaultBrowser)(windows_core::Interface::as_raw(self), core::mem::transmute(fchange)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -39105,34 +38549,22 @@ impl IShellUIHelper6 { pub unsafe fn msClearTile(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).msClearTile)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn msEnableTileNotificationQueue(&self, fchange: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).msEnableTileNotificationQueue)(windows_core::Interface::as_raw(self), fchange.param().abi()).ok() + pub unsafe fn msEnableTileNotificationQueue(&self, fchange: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).msEnableTileNotificationQueue)(windows_core::Interface::as_raw(self), core::mem::transmute(fchange)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn msPinnedSiteState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).msPinnedSiteState)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn msEnableTileNotificationQueueForSquare150x150(&self, fchange: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).msEnableTileNotificationQueueForSquare150x150)(windows_core::Interface::as_raw(self), fchange.param().abi()).ok() + pub unsafe fn msEnableTileNotificationQueueForSquare150x150(&self, fchange: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).msEnableTileNotificationQueueForSquare150x150)(windows_core::Interface::as_raw(self), core::mem::transmute(fchange)).ok() } - pub unsafe fn msEnableTileNotificationQueueForWide310x150(&self, fchange: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).msEnableTileNotificationQueueForWide310x150)(windows_core::Interface::as_raw(self), fchange.param().abi()).ok() + pub unsafe fn msEnableTileNotificationQueueForWide310x150(&self, fchange: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).msEnableTileNotificationQueueForWide310x150)(windows_core::Interface::as_raw(self), core::mem::transmute(fchange)).ok() } - pub unsafe fn msEnableTileNotificationQueueForSquare310x310(&self, fchange: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).msEnableTileNotificationQueueForSquare310x310)(windows_core::Interface::as_raw(self), fchange.param().abi()).ok() + pub unsafe fn msEnableTileNotificationQueueForSquare310x310(&self, fchange: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).msEnableTileNotificationQueueForSquare310x310)(windows_core::Interface::as_raw(self), core::mem::transmute(fchange)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn msScheduledTileNotification(&self, bstrnotificationxml: &windows_core::BSTR, bstrnotificationid: &windows_core::BSTR, bstrnotificationtag: &windows_core::BSTR, starttime: &super::super::System::Variant::VARIANT, expirationtime: &super::super::System::Variant::VARIANT) -> windows_core::Result<()> { @@ -39305,11 +38737,8 @@ impl core::ops::Deref for IShellUIHelper7 { windows_core::imp::interface_hierarchy!(IShellUIHelper7, windows_core::IUnknown, super::super::System::Com::IDispatch, IShellUIHelper, IShellUIHelper2, IShellUIHelper3, IShellUIHelper4, IShellUIHelper5, IShellUIHelper6); #[cfg(feature = "Win32_System_Com")] impl IShellUIHelper7 { - pub unsafe fn SetExperimentalFlag(&self, bstrflagstring: &windows_core::BSTR, vfflag: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetExperimentalFlag)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrflagstring), vfflag.param().abi()).ok() + pub unsafe fn SetExperimentalFlag(&self, bstrflagstring: &windows_core::BSTR, vfflag: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetExperimentalFlag)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrflagstring), core::mem::transmute(vfflag)).ok() } pub unsafe fn GetExperimentalFlag(&self, bstrflagstring: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -39329,21 +38758,15 @@ impl IShellUIHelper7 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNeedIEAutoLaunchFlag)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrurl), &mut result__).map(|| result__) } - pub unsafe fn SetNeedIEAutoLaunchFlag(&self, bstrurl: &windows_core::BSTR, flag: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNeedIEAutoLaunchFlag)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrurl), flag.param().abi()).ok() + pub unsafe fn SetNeedIEAutoLaunchFlag(&self, bstrurl: &windows_core::BSTR, flag: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNeedIEAutoLaunchFlag)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrurl), core::mem::transmute(flag)).ok() } pub unsafe fn HasNeedIEAutoLaunchFlag(&self, bstrurl: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HasNeedIEAutoLaunchFlag)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrurl), &mut result__).map(|| result__) } - pub unsafe fn LaunchIE(&self, bstrurl: &windows_core::BSTR, automated: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).LaunchIE)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrurl), automated.param().abi()).ok() + pub unsafe fn LaunchIE(&self, bstrurl: &windows_core::BSTR, automated: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LaunchIE)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrurl), core::mem::transmute(automated)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -39681,11 +39104,8 @@ impl IShellView { (windows_core::Interface::vtable(self).GetCurrentInfo)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn AddPropertySheetPages(&self, dwreserved: u32, pfn: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddPropertySheetPages)(windows_core::Interface::as_raw(self), core::mem::transmute(dwreserved), core::mem::transmute(pfn), lparam.param().abi()).ok() + pub unsafe fn AddPropertySheetPages(&self, dwreserved: u32, pfn: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddPropertySheetPages)(windows_core::Interface::as_raw(self), core::mem::transmute(dwreserved), core::mem::transmute(pfn), core::mem::transmute(lparam)).ok() } pub unsafe fn SaveViewState(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveViewState)(windows_core::Interface::as_raw(self)).ok() @@ -40002,11 +39422,8 @@ impl IShellWindows { pub unsafe fn OnNavigate(&self, lcookie: i32, pvarloc: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnNavigate)(windows_core::Interface::as_raw(self), core::mem::transmute(lcookie), core::mem::transmute(pvarloc)).ok() } - pub unsafe fn OnActivated(&self, lcookie: i32, factive: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnActivated)(windows_core::Interface::as_raw(self), core::mem::transmute(lcookie), factive.param().abi()).ok() + pub unsafe fn OnActivated(&self, lcookie: i32, factive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnActivated)(windows_core::Interface::as_raw(self), core::mem::transmute(lcookie), core::mem::transmute(factive)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn FindWindowSW(&self, pvarloc: *const super::super::System::Variant::VARIANT, pvarlocroot: *const super::super::System::Variant::VARIANT, swclass: ShellWindowTypeConstants, phwnd: *mut i32, swfwoptions: ShellWindowFindWindowOptions) -> windows_core::Result { @@ -40019,11 +39436,8 @@ impl IShellWindows { { (windows_core::Interface::vtable(self).OnCreated)(windows_core::Interface::as_raw(self), core::mem::transmute(lcookie), punk.param().abi()).ok() } - pub unsafe fn ProcessAttachDetach(&self, fattach: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ProcessAttachDetach)(windows_core::Interface::as_raw(self), fattach.param().abi()).ok() + pub unsafe fn ProcessAttachDetach(&self, fattach: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ProcessAttachDetach)(windows_core::Interface::as_raw(self), core::mem::transmute(fattach)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -40355,14 +39769,13 @@ impl windows_core::RuntimeName for IStorageProviderBanners {} windows_core::imp::define_interface!(IStorageProviderCopyHook, IStorageProviderCopyHook_Vtbl, 0x7bf992a9_af7a_4dba_b2e5_4d080b1ecbc6); windows_core::imp::interface_hierarchy!(IStorageProviderCopyHook, windows_core::IUnknown); impl IStorageProviderCopyHook { - pub unsafe fn CopyCallback(&self, hwnd: P0, operation: u32, flags: u32, srcfile: P3, srcattribs: u32, destfile: P5, destattribs: u32) -> windows_core::Result + pub unsafe fn CopyCallback(&self, hwnd: super::super::Foundation::HWND, operation: u32, flags: u32, srcfile: P3, srcattribs: u32, destfile: P5, destattribs: u32) -> windows_core::Result where - P0: windows_core::Param, P3: windows_core::Param, P5: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(operation), core::mem::transmute(flags), srcfile.param().abi(), core::mem::transmute(srcattribs), destfile.param().abi(), core::mem::transmute(destattribs), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CopyCallback)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(operation), core::mem::transmute(flags), srcfile.param().abi(), core::mem::transmute(srcattribs), destfile.param().abi(), core::mem::transmute(destattribs), &mut result__).map(|| result__) } } #[repr(C)] @@ -40550,11 +39963,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), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped)).ok() + (windows_core::Interface::vtable(self).ReadAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(pv), core::mem::transmute(cb), core::mem::transmute(pcbread.unwrap_or(core::mem::zeroed())), core::mem::transmute(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), core::mem::transmute(lpbuffer), core::mem::transmute(cb), core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped)).ok() + (windows_core::Interface::vtable(self).WriteAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(cb), core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped)).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn OverlappedResult(&self, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P2) -> windows_core::Result<()> @@ -40663,23 +40076,14 @@ impl windows_core::RuntimeName for IStreamUnbufferedInfo {} windows_core::imp::define_interface!(ISuspensionDependencyManager, ISuspensionDependencyManager_Vtbl, 0x52b83a42_2543_416a_81d9_c0de7969c8b3); windows_core::imp::interface_hierarchy!(ISuspensionDependencyManager, windows_core::IUnknown); impl ISuspensionDependencyManager { - pub unsafe fn RegisterAsChild(&self, processhandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterAsChild)(windows_core::Interface::as_raw(self), processhandle.param().abi()).ok() + pub unsafe fn RegisterAsChild(&self, processhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterAsChild)(windows_core::Interface::as_raw(self), core::mem::transmute(processhandle)).ok() } - pub unsafe fn GroupChildWithParent(&self, childprocesshandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GroupChildWithParent)(windows_core::Interface::as_raw(self), childprocesshandle.param().abi()).ok() + pub unsafe fn GroupChildWithParent(&self, childprocesshandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GroupChildWithParent)(windows_core::Interface::as_raw(self), core::mem::transmute(childprocesshandle)).ok() } - pub unsafe fn UngroupChildFromParent(&self, childprocesshandle: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UngroupChildFromParent)(windows_core::Interface::as_raw(self), childprocesshandle.param().abi()).ok() + pub unsafe fn UngroupChildFromParent(&self, childprocesshandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UngroupChildFromParent)(windows_core::Interface::as_raw(self), core::mem::transmute(childprocesshandle)).ok() } } #[repr(C)] @@ -41228,29 +40632,24 @@ impl windows_core::RuntimeName for ISyncMgrConflictStore {} windows_core::imp::define_interface!(ISyncMgrControl, ISyncMgrControl_Vtbl, 0x9b63616c_36b2_46bc_959f_c1593952d19b); windows_core::imp::interface_hierarchy!(ISyncMgrControl, windows_core::IUnknown); impl ISyncMgrControl { - pub unsafe fn StartHandlerSync(&self, pszhandlerid: P0, hwndowner: P1, punk: P2, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: P4) -> windows_core::Result<()> + pub unsafe fn StartHandlerSync(&self, pszhandlerid: P0, hwndowner: super::super::Foundation::HWND, punk: P2, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: P4) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).StartHandlerSync)(windows_core::Interface::as_raw(self), pszhandlerid.param().abi(), hwndowner.param().abi(), punk.param().abi(), core::mem::transmute(nsynccontrolflags), presult.param().abi()).ok() + (windows_core::Interface::vtable(self).StartHandlerSync)(windows_core::Interface::as_raw(self), pszhandlerid.param().abi(), core::mem::transmute(hwndowner), punk.param().abi(), core::mem::transmute(nsynccontrolflags), presult.param().abi()).ok() } - pub unsafe fn StartItemSync(&self, pszhandlerid: P0, ppszitemids: &[windows_core::PCWSTR], hwndowner: P3, punk: P4, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: P6) -> windows_core::Result<()> + pub unsafe fn StartItemSync(&self, pszhandlerid: P0, ppszitemids: &[windows_core::PCWSTR], hwndowner: super::super::Foundation::HWND, punk: P4, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: P6) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).StartItemSync)(windows_core::Interface::as_raw(self), pszhandlerid.param().abi(), core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len().try_into().unwrap(), hwndowner.param().abi(), punk.param().abi(), core::mem::transmute(nsynccontrolflags), presult.param().abi()).ok() + (windows_core::Interface::vtable(self).StartItemSync)(windows_core::Interface::as_raw(self), pszhandlerid.param().abi(), core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len().try_into().unwrap(), core::mem::transmute(hwndowner), punk.param().abi(), core::mem::transmute(nsynccontrolflags), presult.param().abi()).ok() } - pub unsafe fn StartSyncAll(&self, hwndowner: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).StartSyncAll)(windows_core::Interface::as_raw(self), hwndowner.param().abi()).ok() + pub unsafe fn StartSyncAll(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).StartSyncAll)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner)).ok() } pub unsafe fn StopHandlerSync(&self, pszhandlerid: P0) -> windows_core::Result<()> where @@ -41305,30 +40704,27 @@ impl ISyncMgrControl { { (windows_core::Interface::vtable(self).UpdateConflicts)(windows_core::Interface::as_raw(self), pszhandlerid.param().abi(), pszitemid.param().abi(), core::mem::transmute(ncontrolflags)).ok() } - pub unsafe fn ActivateHandler(&self, factivate: P0, pszhandlerid: P1, hwndowner: P2, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> + pub unsafe fn ActivateHandler(&self, factivate: P0, pszhandlerid: P1, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ActivateHandler)(windows_core::Interface::as_raw(self), factivate.param().abi(), pszhandlerid.param().abi(), hwndowner.param().abi(), core::mem::transmute(ncontrolflags)).ok() + (windows_core::Interface::vtable(self).ActivateHandler)(windows_core::Interface::as_raw(self), factivate.param().abi(), pszhandlerid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() } - pub unsafe fn EnableHandler(&self, fenable: P0, pszhandlerid: P1, hwndowner: P2, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> + pub unsafe fn EnableHandler(&self, fenable: P0, pszhandlerid: P1, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).EnableHandler)(windows_core::Interface::as_raw(self), fenable.param().abi(), pszhandlerid.param().abi(), hwndowner.param().abi(), core::mem::transmute(ncontrolflags)).ok() + (windows_core::Interface::vtable(self).EnableHandler)(windows_core::Interface::as_raw(self), fenable.param().abi(), pszhandlerid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() } - pub unsafe fn EnableItem(&self, fenable: P0, pszhandlerid: P1, pszitemid: P2, hwndowner: P3, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> + pub unsafe fn EnableItem(&self, fenable: P0, pszhandlerid: P1, pszitemid: P2, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).EnableItem)(windows_core::Interface::as_raw(self), fenable.param().abi(), pszhandlerid.param().abi(), pszitemid.param().abi(), hwndowner.param().abi(), core::mem::transmute(ncontrolflags)).ok() + (windows_core::Interface::vtable(self).EnableItem)(windows_core::Interface::as_raw(self), fenable.param().abi(), pszhandlerid.param().abi(), pszitemid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() } } #[repr(C)] @@ -41893,13 +41289,12 @@ impl ISyncMgrHandler { { (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() } - pub unsafe fn Synchronize(&self, ppszitemids: &[windows_core::PCWSTR], hwndowner: P2, psessioncreator: P3, punk: P4) -> windows_core::Result<()> + pub unsafe fn Synchronize(&self, ppszitemids: &[windows_core::PCWSTR], hwndowner: super::super::Foundation::HWND, psessioncreator: P3, punk: P4) -> windows_core::Result<()> where - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len().try_into().unwrap(), hwndowner.param().abi(), psessioncreator.param().abi(), punk.param().abi()).ok() + (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len().try_into().unwrap(), core::mem::transmute(hwndowner), psessioncreator.param().abi(), punk.param().abi()).ok() } } #[repr(C)] @@ -42944,11 +42339,8 @@ impl ISyncMgrSynchronize { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).GetItemObject)(windows_core::Interface::as_raw(self), core::mem::transmute(itemid), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ShowProperties(&self, hwndparent: P0, itemid: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowProperties)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(itemid)).ok() + pub unsafe fn ShowProperties(&self, hwndparent: super::super::Foundation::HWND, itemid: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(itemid)).ok() } pub unsafe fn SetProgressCallback(&self, lpcallback: P0) -> windows_core::Result<()> where @@ -42956,26 +42348,17 @@ impl ISyncMgrSynchronize { { (windows_core::Interface::vtable(self).SetProgressCallback)(windows_core::Interface::as_raw(self), lpcallback.param().abi()).ok() } - pub unsafe fn PrepareForSync(&self, pitemids: &[windows_core::GUID], hwndparent: P2, dwreserved: u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).PrepareForSync)(windows_core::Interface::as_raw(self), pitemids.len().try_into().unwrap(), core::mem::transmute(pitemids.as_ptr()), hwndparent.param().abi(), core::mem::transmute(dwreserved)).ok() + pub unsafe fn PrepareForSync(&self, pitemids: &[windows_core::GUID], hwndparent: super::super::Foundation::HWND, dwreserved: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PrepareForSync)(windows_core::Interface::as_raw(self), pitemids.len().try_into().unwrap(), core::mem::transmute(pitemids.as_ptr()), core::mem::transmute(hwndparent), core::mem::transmute(dwreserved)).ok() } - pub unsafe fn Synchronize(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn Synchronize(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } pub unsafe fn SetItemStatus(&self, pitemid: *const windows_core::GUID, dwsyncmgrstatus: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetItemStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pitemid), core::mem::transmute(dwsyncmgrstatus)).ok() } - pub unsafe fn ShowError(&self, hwndparent: P0, errorid: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowError)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(errorid)).ok() + pub unsafe fn ShowError(&self, hwndparent: super::super::Foundation::HWND, errorid: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowError)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(errorid)).ok() } } #[repr(C)] @@ -43247,11 +42630,8 @@ impl windows_core::RuntimeName for ISyncMgrSynchronizeInvoke {} windows_core::imp::define_interface!(ISyncMgrUIOperation, ISyncMgrUIOperation_Vtbl, 0xfc7cfa47_dfe1_45b5_a049_8cfd82bec271); windows_core::imp::interface_hierarchy!(ISyncMgrUIOperation, windows_core::IUnknown); impl ISyncMgrUIOperation { - pub unsafe fn Run(&self, hwndowner: P0) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Run)(windows_core::Interface::as_raw(self), hwndowner.param().abi()) + pub unsafe fn Run(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).Run)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner)) } } #[repr(C)] @@ -43304,29 +42684,17 @@ impl ITaskbarList { pub unsafe fn HrInit(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HrInit)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn AddTab(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddTab)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn AddTab(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddTab)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } - pub unsafe fn DeleteTab(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeleteTab)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn DeleteTab(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeleteTab)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } - pub unsafe fn ActivateTab(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ActivateTab)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn ActivateTab(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ActivateTab)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } - pub unsafe fn SetActiveAlt(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetActiveAlt)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SetActiveAlt(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetActiveAlt)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } } #[repr(C)] @@ -43390,12 +42758,11 @@ impl core::ops::Deref for ITaskbarList2 { } windows_core::imp::interface_hierarchy!(ITaskbarList2, windows_core::IUnknown, ITaskbarList); impl ITaskbarList2 { - pub unsafe fn MarkFullscreenWindow(&self, hwnd: P0, ffullscreen: P1) -> windows_core::Result<()> + pub unsafe fn MarkFullscreenWindow(&self, hwnd: super::super::Foundation::HWND, ffullscreen: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).MarkFullscreenWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), ffullscreen.param().abi()).ok() + (windows_core::Interface::vtable(self).MarkFullscreenWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), ffullscreen.param().abi()).ok() } } #[repr(C)] @@ -43428,88 +42795,51 @@ impl core::ops::Deref for ITaskbarList3 { } windows_core::imp::interface_hierarchy!(ITaskbarList3, windows_core::IUnknown, ITaskbarList, ITaskbarList2); impl ITaskbarList3 { - pub unsafe fn SetProgressValue(&self, hwnd: P0, ullcompleted: u64, ulltotal: u64) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetProgressValue)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(ullcompleted), core::mem::transmute(ulltotal)).ok() + pub unsafe fn SetProgressValue(&self, hwnd: super::super::Foundation::HWND, ullcompleted: u64, ulltotal: u64) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetProgressValue)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(ullcompleted), core::mem::transmute(ulltotal)).ok() } - pub unsafe fn SetProgressState(&self, hwnd: P0, tbpflags: TBPFLAG) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetProgressState)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(tbpflags)).ok() + pub unsafe fn SetProgressState(&self, hwnd: super::super::Foundation::HWND, tbpflags: TBPFLAG) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetProgressState)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(tbpflags)).ok() } - pub unsafe fn RegisterTab(&self, hwndtab: P0, hwndmdi: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterTab)(windows_core::Interface::as_raw(self), hwndtab.param().abi(), hwndmdi.param().abi()).ok() + pub unsafe fn RegisterTab(&self, hwndtab: super::super::Foundation::HWND, hwndmdi: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterTab)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtab), core::mem::transmute(hwndmdi)).ok() } - pub unsafe fn UnregisterTab(&self, hwndtab: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UnregisterTab)(windows_core::Interface::as_raw(self), hwndtab.param().abi()).ok() + pub unsafe fn UnregisterTab(&self, hwndtab: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UnregisterTab)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtab)).ok() } - pub unsafe fn SetTabOrder(&self, hwndtab: P0, hwndinsertbefore: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTabOrder)(windows_core::Interface::as_raw(self), hwndtab.param().abi(), hwndinsertbefore.param().abi()).ok() + pub unsafe fn SetTabOrder(&self, hwndtab: super::super::Foundation::HWND, hwndinsertbefore: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTabOrder)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtab), core::mem::transmute(hwndinsertbefore)).ok() } - pub unsafe fn SetTabActive(&self, hwndtab: P0, hwndmdi: P1, dwreserved: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTabActive)(windows_core::Interface::as_raw(self), hwndtab.param().abi(), hwndmdi.param().abi(), core::mem::transmute(dwreserved)).ok() + pub unsafe fn SetTabActive(&self, hwndtab: super::super::Foundation::HWND, hwndmdi: super::super::Foundation::HWND, dwreserved: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTabActive)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtab), core::mem::transmute(hwndmdi), core::mem::transmute(dwreserved)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn ThumbBarAddButtons(&self, hwnd: P0, pbutton: &[THUMBBUTTON]) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ThumbBarAddButtons)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pbutton.len().try_into().unwrap(), core::mem::transmute(pbutton.as_ptr())).ok() + pub unsafe fn ThumbBarAddButtons(&self, hwnd: super::super::Foundation::HWND, pbutton: &[THUMBBUTTON]) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ThumbBarAddButtons)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pbutton.len().try_into().unwrap(), core::mem::transmute(pbutton.as_ptr())).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn ThumbBarUpdateButtons(&self, hwnd: P0, pbutton: &[THUMBBUTTON]) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ThumbBarUpdateButtons)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pbutton.len().try_into().unwrap(), core::mem::transmute(pbutton.as_ptr())).ok() + pub unsafe fn ThumbBarUpdateButtons(&self, hwnd: super::super::Foundation::HWND, pbutton: &[THUMBBUTTON]) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ThumbBarUpdateButtons)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pbutton.len().try_into().unwrap(), core::mem::transmute(pbutton.as_ptr())).ok() } #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn ThumbBarSetImageList(&self, hwnd: P0, himl: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ThumbBarSetImageList)(windows_core::Interface::as_raw(self), hwnd.param().abi(), himl.param().abi()).ok() + pub unsafe fn ThumbBarSetImageList(&self, hwnd: super::super::Foundation::HWND, himl: super::Controls::HIMAGELIST) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ThumbBarSetImageList)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(himl)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetOverlayIcon(&self, hwnd: P0, hicon: P1, pszdescription: P2) -> windows_core::Result<()> + pub unsafe fn SetOverlayIcon(&self, hwnd: super::super::Foundation::HWND, hicon: super::WindowsAndMessaging::HICON, pszdescription: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetOverlayIcon)(windows_core::Interface::as_raw(self), hwnd.param().abi(), hicon.param().abi(), pszdescription.param().abi()).ok() + (windows_core::Interface::vtable(self).SetOverlayIcon)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(hicon), pszdescription.param().abi()).ok() } - pub unsafe fn SetThumbnailTooltip(&self, hwnd: P0, psztip: P1) -> windows_core::Result<()> + pub unsafe fn SetThumbnailTooltip(&self, hwnd: super::super::Foundation::HWND, psztip: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetThumbnailTooltip)(windows_core::Interface::as_raw(self), hwnd.param().abi(), psztip.param().abi()).ok() + (windows_core::Interface::vtable(self).SetThumbnailTooltip)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), psztip.param().abi()).ok() } - pub unsafe fn SetThumbnailClip(&self, hwnd: P0, prcclip: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetThumbnailClip)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(prcclip)).ok() + pub unsafe fn SetThumbnailClip(&self, hwnd: super::super::Foundation::HWND, prcclip: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetThumbnailClip)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(prcclip)).ok() } } #[repr(C)] @@ -43637,11 +42967,8 @@ impl core::ops::Deref for ITaskbarList4 { } windows_core::imp::interface_hierarchy!(ITaskbarList4, windows_core::IUnknown, ITaskbarList, ITaskbarList2, ITaskbarList3); impl ITaskbarList4 { - pub unsafe fn SetTabProperties(&self, hwndtab: P0, stpflags: STPFLAG) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTabProperties)(windows_core::Interface::as_raw(self), hwndtab.param().abi(), core::mem::transmute(stpflags)).ok() + pub unsafe fn SetTabProperties(&self, hwndtab: super::super::Foundation::HWND, stpflags: STPFLAG) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTabProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtab), core::mem::transmute(stpflags)).ok() } } #[repr(C)] @@ -43675,10 +43002,10 @@ impl IThumbnailCache { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetThumbnail)(windows_core::Interface::as_raw(self), pshellitem.param().abi(), core::mem::transmute(cxyrequestedthumbsize), core::mem::transmute(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() + (windows_core::Interface::vtable(self).GetThumbnail)(windows_core::Interface::as_raw(self), pshellitem.param().abi(), core::mem::transmute(cxyrequestedthumbsize), core::mem::transmute(flags), core::mem::transmute(ppvthumb.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(pthumbnailid.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(cxyrequestedthumbsize), core::mem::transmute(ppvthumb.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutflags.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThumbnailByID)(windows_core::Interface::as_raw(self), core::mem::transmute(thumbnailid), core::mem::transmute(cxyrequestedthumbsize), core::mem::transmute(ppvthumb.unwrap_or(core::mem::zeroed())), core::mem::transmute(poutflags.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -43959,18 +43286,14 @@ impl core::ops::Deref for ITrackShellMenu { } windows_core::imp::interface_hierarchy!(ITrackShellMenu, windows_core::IUnknown, IShellMenu); impl ITrackShellMenu { - pub unsafe fn SetObscured(&self, hwndtb: P0, punkband: P1, dwsmsetflags: u32) -> windows_core::Result<()> + pub unsafe fn SetObscured(&self, hwndtb: super::super::Foundation::HWND, punkband: P1, dwsmsetflags: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetObscured)(windows_core::Interface::as_raw(self), hwndtb.param().abi(), punkband.param().abi(), core::mem::transmute(dwsmsetflags)).ok() + (windows_core::Interface::vtable(self).SetObscured)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtb), punkband.param().abi(), core::mem::transmute(dwsmsetflags)).ok() } - pub unsafe fn Popup(&self, hwnd: P0, ppt: *mut super::super::Foundation::POINTL, prcexclude: *mut super::super::Foundation::RECTL, dwflags: i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(ppt), core::mem::transmute(prcexclude), core::mem::transmute(dwflags)).ok() + pub unsafe fn Popup(&self, hwnd: super::super::Foundation::HWND, ppt: *mut super::super::Foundation::POINTL, prcexclude: *mut super::super::Foundation::RECTL, dwflags: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(ppt), core::mem::transmute(prcexclude), core::mem::transmute(dwflags)).ok() } } #[repr(C)] @@ -44597,7 +43920,7 @@ impl ITravelLog { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetTravelEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), core::mem::transmute(ioffset), core::mem::transmute(ppte.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTravelEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), core::mem::transmute(ioffset), core::mem::transmute(ppte.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn FindTravelEntry(&self, punk: P0, pidl: *const Common::ITEMIDLIST) -> windows_core::Result @@ -44614,12 +43937,11 @@ impl ITravelLog { (windows_core::Interface::vtable(self).GetToolTipText)(windows_core::Interface::as_raw(self), punk.param().abi(), core::mem::transmute(ioffset), core::mem::transmute(idstemplate), core::mem::transmute(pwztext.as_ptr()), pwztext.len().try_into().unwrap()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn InsertMenuEntries(&self, punk: P0, hmenu: P1, npos: i32, idfirst: i32, idlast: i32, dwflags: u32) -> windows_core::Result<()> + pub unsafe fn InsertMenuEntries(&self, punk: P0, hmenu: super::WindowsAndMessaging::HMENU, npos: i32, idfirst: i32, idlast: i32, dwflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InsertMenuEntries)(windows_core::Interface::as_raw(self), punk.param().abi(), hmenu.param().abi(), core::mem::transmute(npos), core::mem::transmute(idfirst), core::mem::transmute(idlast), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).InsertMenuEntries)(windows_core::Interface::as_raw(self), punk.param().abi(), core::mem::transmute(hmenu), core::mem::transmute(npos), core::mem::transmute(idfirst), core::mem::transmute(idlast), core::mem::transmute(dwflags)).ok() } pub unsafe fn Clone(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -45389,12 +44711,11 @@ impl IUserNotification { (windows_core::Interface::vtable(self).SetBalloonRetry)(windows_core::Interface::as_raw(self), core::mem::transmute(dwshowtime), core::mem::transmute(dwinterval), core::mem::transmute(cretrycount)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetIconInfo(&self, hicon: P0, psztooltip: P1) -> windows_core::Result<()> + pub unsafe fn SetIconInfo(&self, hicon: super::WindowsAndMessaging::HICON, psztooltip: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetIconInfo)(windows_core::Interface::as_raw(self), hicon.param().abi(), psztooltip.param().abi()).ok() + (windows_core::Interface::vtable(self).SetIconInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(hicon), psztooltip.param().abi()).ok() } pub unsafe fn Show(&self, pqc: P0, dwcontinuepollinterval: u32) -> windows_core::Result<()> where @@ -45481,12 +44802,11 @@ impl IUserNotification2 { (windows_core::Interface::vtable(self).SetBalloonRetry)(windows_core::Interface::as_raw(self), core::mem::transmute(dwshowtime), core::mem::transmute(dwinterval), core::mem::transmute(cretrycount)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetIconInfo(&self, hicon: P0, psztooltip: P1) -> windows_core::Result<()> + pub unsafe fn SetIconInfo(&self, hicon: super::WindowsAndMessaging::HICON, psztooltip: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetIconInfo)(windows_core::Interface::as_raw(self), hicon.param().abi(), psztooltip.param().abi()).ok() + (windows_core::Interface::vtable(self).SetIconInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(hicon), psztooltip.param().abi()).ok() } pub unsafe fn Show(&self, pqc: P0, dwcontinuepollinterval: u32, psink: P2) -> windows_core::Result<()> where @@ -45639,25 +44959,16 @@ impl windows_core::RuntimeName for IViewStateIdentityItem {} windows_core::imp::define_interface!(IVirtualDesktopManager, IVirtualDesktopManager_Vtbl, 0xa5cd92ff_29be_454c_8d04_d82879fb3f1b); windows_core::imp::interface_hierarchy!(IVirtualDesktopManager, windows_core::IUnknown); impl IVirtualDesktopManager { - pub unsafe fn IsWindowOnCurrentVirtualDesktop(&self, toplevelwindow: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn IsWindowOnCurrentVirtualDesktop(&self, toplevelwindow: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).IsWindowOnCurrentVirtualDesktop)(windows_core::Interface::as_raw(self), toplevelwindow.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).IsWindowOnCurrentVirtualDesktop)(windows_core::Interface::as_raw(self), core::mem::transmute(toplevelwindow), &mut result__).map(|| result__) } - pub unsafe fn GetWindowDesktopId(&self, toplevelwindow: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetWindowDesktopId(&self, toplevelwindow: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetWindowDesktopId)(windows_core::Interface::as_raw(self), toplevelwindow.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetWindowDesktopId)(windows_core::Interface::as_raw(self), core::mem::transmute(toplevelwindow), &mut result__).map(|| result__) } - pub unsafe fn MoveWindowToDesktop(&self, toplevelwindow: P0, desktopid: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).MoveWindowToDesktop)(windows_core::Interface::as_raw(self), toplevelwindow.param().abi(), core::mem::transmute(desktopid)).ok() + pub unsafe fn MoveWindowToDesktop(&self, toplevelwindow: super::super::Foundation::HWND, desktopid: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).MoveWindowToDesktop)(windows_core::Interface::as_raw(self), core::mem::transmute(toplevelwindow), core::mem::transmute(desktopid)).ok() } } #[repr(C)] @@ -45714,17 +45025,11 @@ windows_core::imp::define_interface!(IVisualProperties, IVisualProperties_Vtbl, windows_core::imp::interface_hierarchy!(IVisualProperties, windows_core::IUnknown); impl IVisualProperties { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetWatermark(&self, hbmp: P0, vpwf: VPWATERMARKFLAGS) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWatermark)(windows_core::Interface::as_raw(self), hbmp.param().abi(), core::mem::transmute(vpwf)).ok() + pub unsafe fn SetWatermark(&self, hbmp: super::super::Graphics::Gdi::HBITMAP, vpwf: VPWATERMARKFLAGS) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWatermark)(windows_core::Interface::as_raw(self), core::mem::transmute(hbmp), core::mem::transmute(vpwf)).ok() } - pub unsafe fn SetColor(&self, vpcf: VPCOLORFLAGS, cr: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetColor)(windows_core::Interface::as_raw(self), core::mem::transmute(vpcf), cr.param().abi()).ok() + pub unsafe fn SetColor(&self, vpcf: VPCOLORFLAGS, cr: super::super::Foundation::COLORREF) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetColor)(windows_core::Interface::as_raw(self), core::mem::transmute(vpcf), core::mem::transmute(cr)).ok() } pub unsafe fn GetColor(&self, vpcf: VPCOLORFLAGS) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -45880,14 +45185,14 @@ impl IWebBrowser { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Navigate(&self, url: &windows_core::BSTR, 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).Navigate)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(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() + (windows_core::Interface::vtable(self).Navigate)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(url), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(targetframename.unwrap_or(core::mem::zeroed())), core::mem::transmute(postdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(headers.unwrap_or(core::mem::zeroed()))).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(core::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Refresh2)(windows_core::Interface::as_raw(self), core::mem::transmute(level.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Stop(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() @@ -46252,7 +45557,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(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() + (windows_core::Interface::vtable(self).Navigate2)(windows_core::Interface::as_raw(self), core::mem::transmute(url), core::mem::transmute(flags.unwrap_or(core::mem::zeroed())), core::mem::transmute(targetframename.unwrap_or(core::mem::zeroed())), core::mem::transmute(postdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(headers.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn QueryStatusWB(&self, cmdid: super::super::System::Ole::OLECMDID) -> windows_core::Result { @@ -46261,11 +45566,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), core::mem::transmute(cmdid), core::mem::transmute(cmdexecopt), core::mem::transmute(pvain.unwrap_or(core::ptr::null())), core::mem::transmute(pvaout.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ExecWB)(windows_core::Interface::as_raw(self), core::mem::transmute(cmdid), core::mem::transmute(cmdexecopt), core::mem::transmute(pvain.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvaout.unwrap_or(core::mem::zeroed()))).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(core::ptr::null())), core::mem::transmute(pvarsize.unwrap_or(core::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::mem::zeroed())), core::mem::transmute(pvarsize.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn ReadyState(&self) -> windows_core::Result { @@ -46276,71 +45581,50 @@ impl IWebBrowser2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Offline)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOffline(&self, boffline: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOffline)(windows_core::Interface::as_raw(self), boffline.param().abi()).ok() + pub unsafe fn SetOffline(&self, boffline: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOffline)(windows_core::Interface::as_raw(self), core::mem::transmute(boffline)).ok() } pub unsafe fn Silent(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Silent)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSilent(&self, bsilent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), bsilent.param().abi()).ok() + pub unsafe fn SetSilent(&self, bsilent: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSilent)(windows_core::Interface::as_raw(self), core::mem::transmute(bsilent)).ok() } pub unsafe fn RegisterAsBrowser(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RegisterAsBrowser)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetRegisterAsBrowser(&self, bregister: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRegisterAsBrowser)(windows_core::Interface::as_raw(self), bregister.param().abi()).ok() + pub unsafe fn SetRegisterAsBrowser(&self, bregister: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRegisterAsBrowser)(windows_core::Interface::as_raw(self), core::mem::transmute(bregister)).ok() } pub unsafe fn RegisterAsDropTarget(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RegisterAsDropTarget)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetRegisterAsDropTarget(&self, bregister: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRegisterAsDropTarget)(windows_core::Interface::as_raw(self), bregister.param().abi()).ok() + pub unsafe fn SetRegisterAsDropTarget(&self, bregister: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRegisterAsDropTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(bregister)).ok() } pub unsafe fn TheaterMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).TheaterMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetTheaterMode(&self, bregister: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTheaterMode)(windows_core::Interface::as_raw(self), bregister.param().abi()).ok() + pub unsafe fn SetTheaterMode(&self, bregister: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTheaterMode)(windows_core::Interface::as_raw(self), core::mem::transmute(bregister)).ok() } pub unsafe fn AddressBar(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AddressBar)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAddressBar(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAddressBar)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetAddressBar(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAddressBar)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn Resizable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Resizable)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetResizable(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetResizable)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetResizable(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetResizable)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -46614,21 +45898,15 @@ impl IWebBrowserApp { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Visible)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetVisible(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetVisible(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn StatusBar(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).StatusBar)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetStatusBar(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStatusBar)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetStatusBar(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStatusBar)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn StatusText(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -46648,21 +45926,15 @@ impl IWebBrowserApp { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MenuBar)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMenuBar(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMenuBar)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetMenuBar(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMenuBar)(windows_core::Interface::as_raw(self), core::mem::transmute(value)).ok() } pub unsafe fn FullScreen(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FullScreen)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFullScreen(&self, bfullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFullScreen)(windows_core::Interface::as_raw(self), bfullscreen.param().abi()).ok() + pub unsafe fn SetFullScreen(&self, bfullscreen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(bfullscreen)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -46992,13 +46264,8 @@ impl IWebWizardHost { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_Property)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpropertyname), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetWizardButtons(&self, vfenableback: P0, vfenablenext: P1, vflastpage: P2) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWizardButtons)(windows_core::Interface::as_raw(self), vfenableback.param().abi(), vfenablenext.param().abi(), vflastpage.param().abi()).ok() + pub unsafe fn SetWizardButtons(&self, vfenableback: super::super::Foundation::VARIANT_BOOL, vfenablenext: super::super::Foundation::VARIANT_BOOL, vflastpage: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWizardButtons)(windows_core::Interface::as_raw(self), core::mem::transmute(vfenableback), core::mem::transmute(vfenablenext), core::mem::transmute(vflastpage)).ok() } pub unsafe fn SetHeaderText(&self, bstrheadertitle: &windows_core::BSTR, bstrheadersubtitle: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetHeaderText)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrheadertitle), core::mem::transmute_copy(bstrheadersubtitle)).ok() 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 393ecf9040..e5f3348f68 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs @@ -1,37 +1,29 @@ #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn AddStroke(hrc: P0, ppacketdesc: *const PACKET_DESCRIPTION, cbpacket: u32, ppacket: *const u8, pxform: *const super::super::Graphics::Gdi::XFORM) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AddStroke(hrc: HRECOCONTEXT, ppacketdesc: *const PACKET_DESCRIPTION, cbpacket: u32, ppacket: *const u8, pxform: *const super::super::Graphics::Gdi::XFORM) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn AddStroke(hrc : HRECOCONTEXT, ppacketdesc : *const PACKET_DESCRIPTION, cbpacket : u32, ppacket : *const u8, pxform : *const super::super::Graphics::Gdi:: XFORM) -> windows_core::HRESULT); - AddStroke(hrc.param().abi(), core::mem::transmute(ppacketdesc), core::mem::transmute(cbpacket), core::mem::transmute(ppacket), core::mem::transmute(pxform)).ok() + AddStroke(core::mem::transmute(hrc), core::mem::transmute(ppacketdesc), core::mem::transmute(cbpacket), core::mem::transmute(ppacket), core::mem::transmute(pxform)).ok() } #[inline] -pub unsafe fn AddWordsToWordList(hwl: P0, pwcwords: P1) -> windows_core::Result<()> +pub unsafe fn AddWordsToWordList(hwl: HRECOWORDLIST, pwcwords: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("inkobjcore.dll" "system" fn AddWordsToWordList(hwl : HRECOWORDLIST, pwcwords : windows_core::PCWSTR) -> windows_core::HRESULT); - AddWordsToWordList(hwl.param().abi(), pwcwords.param().abi()).ok() + AddWordsToWordList(core::mem::transmute(hwl), pwcwords.param().abi()).ok() } #[inline] -pub unsafe fn AdviseInkChange(hrc: P0, bnewstroke: P1) -> windows_core::Result<()> +pub unsafe fn AdviseInkChange(hrc: HRECOCONTEXT, bnewstroke: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("inkobjcore.dll" "system" fn AdviseInkChange(hrc : HRECOCONTEXT, bnewstroke : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - AdviseInkChange(hrc.param().abi(), bnewstroke.param().abi()).ok() + AdviseInkChange(core::mem::transmute(hrc), bnewstroke.param().abi()).ok() } #[inline] -pub unsafe fn CreateContext(hrec: P0, phrc: *mut HRECOCONTEXT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CreateContext(hrec: HRECOGNIZER, phrc: *mut HRECOCONTEXT) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn CreateContext(hrec : HRECOGNIZER, phrc : *mut HRECOCONTEXT) -> windows_core::HRESULT); - CreateContext(hrec.param().abi(), core::mem::transmute(phrc)).ok() + CreateContext(core::mem::transmute(hrec), core::mem::transmute(phrc)).ok() } #[inline] pub unsafe fn CreateRecognizer(pclsid: *mut windows_core::GUID, phrec: *mut HRECOGNIZER) -> windows_core::Result<()> { @@ -39,36 +31,24 @@ pub unsafe fn CreateRecognizer(pclsid: *mut windows_core::GUID, phrec: *mut HREC CreateRecognizer(core::mem::transmute(pclsid), core::mem::transmute(phrec)).ok() } #[inline] -pub unsafe fn DestroyContext(hrc: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyContext(hrc: HRECOCONTEXT) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn DestroyContext(hrc : HRECOCONTEXT) -> windows_core::HRESULT); - DestroyContext(hrc.param().abi()).ok() + DestroyContext(core::mem::transmute(hrc)).ok() } #[inline] -pub unsafe fn DestroyRecognizer(hrec: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyRecognizer(hrec: HRECOGNIZER) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn DestroyRecognizer(hrec : HRECOGNIZER) -> windows_core::HRESULT); - DestroyRecognizer(hrec.param().abi()).ok() + DestroyRecognizer(core::mem::transmute(hrec)).ok() } #[inline] -pub unsafe fn DestroyWordList(hwl: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyWordList(hwl: HRECOWORDLIST) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn DestroyWordList(hwl : HRECOWORDLIST) -> windows_core::HRESULT); - DestroyWordList(hwl.param().abi()).ok() + DestroyWordList(core::mem::transmute(hwl)).ok() } #[inline] -pub unsafe fn EndInkInput(hrc: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EndInkInput(hrc: HRECOCONTEXT) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn EndInkInput(hrc : HRECOCONTEXT) -> windows_core::HRESULT); - EndInkInput(hrc.param().abi()).ok() + EndInkInput(core::mem::transmute(hrc)).ok() } #[inline] pub unsafe fn GetAllRecognizers(recognizerclsids: *mut *mut windows_core::GUID, count: *mut u32) -> windows_core::Result<()> { @@ -76,69 +56,47 @@ pub unsafe fn GetAllRecognizers(recognizerclsids: *mut *mut windows_core::GUID, GetAllRecognizers(core::mem::transmute(recognizerclsids), core::mem::transmute(count)).ok() } #[inline] -pub unsafe fn GetBestResultString(hrc: P0, pcsize: *mut u32, pwcbestresult: windows_core::PWSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetBestResultString(hrc: HRECOCONTEXT, pcsize: *mut u32, pwcbestresult: Option) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn GetBestResultString(hrc : HRECOCONTEXT, pcsize : *mut u32, pwcbestresult : windows_core::PWSTR) -> windows_core::HRESULT); - GetBestResultString(hrc.param().abi(), core::mem::transmute(pcsize), core::mem::transmute(pwcbestresult)).ok() + GetBestResultString(core::mem::transmute(hrc), core::mem::transmute(pcsize), core::mem::transmute(pwcbestresult.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetLatticePtr(hrc: P0, pplattice: *mut *mut RECO_LATTICE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetLatticePtr(hrc: HRECOCONTEXT, pplattice: *mut *mut RECO_LATTICE) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn GetLatticePtr(hrc : HRECOCONTEXT, pplattice : *mut *mut RECO_LATTICE) -> windows_core::HRESULT); - GetLatticePtr(hrc.param().abi(), core::mem::transmute(pplattice)).ok() + GetLatticePtr(core::mem::transmute(hrc), core::mem::transmute(pplattice)).ok() } #[inline] -pub unsafe fn GetLeftSeparator(hrc: P0, pcsize: *mut u32, pwcleftseparator: windows_core::PWSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetLeftSeparator(hrc: HRECOCONTEXT, pcsize: *mut u32, pwcleftseparator: windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn GetLeftSeparator(hrc : HRECOCONTEXT, pcsize : *mut u32, pwcleftseparator : windows_core::PWSTR) -> windows_core::HRESULT); - GetLeftSeparator(hrc.param().abi(), core::mem::transmute(pcsize), core::mem::transmute(pwcleftseparator)).ok() + GetLeftSeparator(core::mem::transmute(hrc), core::mem::transmute(pcsize), core::mem::transmute(pwcleftseparator)).ok() } #[inline] -pub unsafe fn GetRecoAttributes(hrec: P0, precoattrs: *mut RECO_ATTRS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetRecoAttributes(hrec: HRECOGNIZER, precoattrs: *mut RECO_ATTRS) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn GetRecoAttributes(hrec : HRECOGNIZER, precoattrs : *mut RECO_ATTRS) -> windows_core::HRESULT); - GetRecoAttributes(hrec.param().abi(), core::mem::transmute(precoattrs)).ok() + GetRecoAttributes(core::mem::transmute(hrec), core::mem::transmute(precoattrs)).ok() } #[inline] -pub unsafe fn GetResultPropertyList(hrec: P0, ppropertycount: *mut u32, ppropertyguid: *mut windows_core::GUID) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetResultPropertyList(hrec: HRECOGNIZER, ppropertycount: *mut u32, ppropertyguid: *mut windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn GetResultPropertyList(hrec : HRECOGNIZER, ppropertycount : *mut u32, ppropertyguid : *mut windows_core::GUID) -> windows_core::HRESULT); - GetResultPropertyList(hrec.param().abi(), core::mem::transmute(ppropertycount), core::mem::transmute(ppropertyguid)).ok() + GetResultPropertyList(core::mem::transmute(hrec), core::mem::transmute(ppropertycount), core::mem::transmute(ppropertyguid)).ok() } #[inline] -pub unsafe fn GetRightSeparator(hrc: P0, pcsize: *mut u32, pwcrightseparator: windows_core::PWSTR) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetRightSeparator(hrc: HRECOCONTEXT, pcsize: *mut u32, pwcrightseparator: windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn GetRightSeparator(hrc : HRECOCONTEXT, pcsize : *mut u32, pwcrightseparator : windows_core::PWSTR) -> windows_core::HRESULT); - GetRightSeparator(hrc.param().abi(), core::mem::transmute(pcsize), core::mem::transmute(pwcrightseparator)).ok() + GetRightSeparator(core::mem::transmute(hrc), core::mem::transmute(pcsize), core::mem::transmute(pwcrightseparator)).ok() } #[inline] -pub unsafe fn GetUnicodeRanges(hrec: P0, pcranges: *mut u32, pcr: *mut CHARACTER_RANGE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetUnicodeRanges(hrec: HRECOGNIZER, pcranges: *mut u32, pcr: *mut CHARACTER_RANGE) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn GetUnicodeRanges(hrec : HRECOGNIZER, pcranges : *mut u32, pcr : *mut CHARACTER_RANGE) -> windows_core::HRESULT); - GetUnicodeRanges(hrec.param().abi(), core::mem::transmute(pcranges), core::mem::transmute(pcr)).ok() + GetUnicodeRanges(core::mem::transmute(hrec), core::mem::transmute(pcranges), core::mem::transmute(pcr)).ok() } #[inline] -pub unsafe fn IsStringSupported(hrc: P0, wcstring: u32, pwcstring: P2) -> windows_core::Result<()> +pub unsafe fn IsStringSupported(hrc: HRECOCONTEXT, wcstring: u32, pwcstring: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("inkobjcore.dll" "system" fn IsStringSupported(hrc : HRECOCONTEXT, wcstring : u32, pwcstring : windows_core::PCWSTR) -> windows_core::HRESULT); - IsStringSupported(hrc.param().abi(), core::mem::transmute(wcstring), pwcstring.param().abi()).ok() + IsStringSupported(core::mem::transmute(hrc), core::mem::transmute(wcstring), pwcstring.param().abi()).ok() } #[inline] pub unsafe fn LoadCachedAttributes(clsid: windows_core::GUID, precoattributes: *mut RECO_ATTRS) -> windows_core::Result<()> { @@ -146,71 +104,50 @@ pub unsafe fn LoadCachedAttributes(clsid: windows_core::GUID, precoattributes: * LoadCachedAttributes(core::mem::transmute(clsid), core::mem::transmute(precoattributes)).ok() } #[inline] -pub unsafe fn MakeWordList(hrec: P0, pbuffer: P1, phwl: *mut HRECOWORDLIST) -> windows_core::Result<()> +pub unsafe fn MakeWordList(hrec: HRECOGNIZER, pbuffer: P1, phwl: *mut HRECOWORDLIST) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("inkobjcore.dll" "system" fn MakeWordList(hrec : HRECOGNIZER, pbuffer : windows_core::PCWSTR, phwl : *mut HRECOWORDLIST) -> windows_core::HRESULT); - MakeWordList(hrec.param().abi(), pbuffer.param().abi(), core::mem::transmute(phwl)).ok() + MakeWordList(core::mem::transmute(hrec), pbuffer.param().abi(), core::mem::transmute(phwl)).ok() } #[inline] -pub unsafe fn Process(hrc: P0, pbpartialprocessing: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn Process(hrc: HRECOCONTEXT, pbpartialprocessing: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn Process(hrc : HRECOCONTEXT, pbpartialprocessing : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - Process(hrc.param().abi(), core::mem::transmute(pbpartialprocessing)).ok() + Process(core::mem::transmute(hrc), core::mem::transmute(pbpartialprocessing)).ok() } #[inline] -pub unsafe fn SetEnabledUnicodeRanges(hrc: P0, cranges: u32, pcr: *mut CHARACTER_RANGE) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetEnabledUnicodeRanges(hrc: HRECOCONTEXT, cranges: u32, pcr: *mut CHARACTER_RANGE) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn SetEnabledUnicodeRanges(hrc : HRECOCONTEXT, cranges : u32, pcr : *mut CHARACTER_RANGE) -> windows_core::HRESULT); - SetEnabledUnicodeRanges(hrc.param().abi(), core::mem::transmute(cranges), core::mem::transmute(pcr)).ok() + SetEnabledUnicodeRanges(core::mem::transmute(hrc), core::mem::transmute(cranges), core::mem::transmute(pcr)).ok() } #[inline] -pub unsafe fn SetFactoid(hrc: P0, cwcfactoid: u32, pwcfactoid: P2) -> windows_core::Result<()> +pub unsafe fn SetFactoid(hrc: HRECOCONTEXT, cwcfactoid: u32, pwcfactoid: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("inkobjcore.dll" "system" fn SetFactoid(hrc : HRECOCONTEXT, cwcfactoid : u32, pwcfactoid : windows_core::PCWSTR) -> windows_core::HRESULT); - SetFactoid(hrc.param().abi(), core::mem::transmute(cwcfactoid), pwcfactoid.param().abi()).ok() + SetFactoid(core::mem::transmute(hrc), core::mem::transmute(cwcfactoid), pwcfactoid.param().abi()).ok() } #[inline] -pub unsafe fn SetFlags(hrc: P0, dwflags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetFlags(hrc: HRECOCONTEXT, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn SetFlags(hrc : HRECOCONTEXT, dwflags : u32) -> windows_core::HRESULT); - SetFlags(hrc.param().abi(), core::mem::transmute(dwflags)).ok() + SetFlags(core::mem::transmute(hrc), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SetGuide(hrc: P0, pguide: *const RECO_GUIDE, iindex: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetGuide(hrc: HRECOCONTEXT, pguide: *const RECO_GUIDE, iindex: u32) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn SetGuide(hrc : HRECOCONTEXT, pguide : *const RECO_GUIDE, iindex : u32) -> windows_core::HRESULT); - SetGuide(hrc.param().abi(), core::mem::transmute(pguide), core::mem::transmute(iindex)).ok() + SetGuide(core::mem::transmute(hrc), core::mem::transmute(pguide), core::mem::transmute(iindex)).ok() } #[inline] -pub unsafe fn SetTextContext(hrc: P0, pwcbefore: &[u16], pwcafter: &[u16]) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetTextContext(hrc: HRECOCONTEXT, pwcbefore: &[u16], pwcafter: &[u16]) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn SetTextContext(hrc : HRECOCONTEXT, cwcbefore : u32, pwcbefore : windows_core::PCWSTR, cwcafter : u32, pwcafter : windows_core::PCWSTR) -> windows_core::HRESULT); - SetTextContext(hrc.param().abi(), pwcbefore.len().try_into().unwrap(), core::mem::transmute(pwcbefore.as_ptr()), pwcafter.len().try_into().unwrap(), core::mem::transmute(pwcafter.as_ptr())).ok() + SetTextContext(core::mem::transmute(hrc), pwcbefore.len().try_into().unwrap(), core::mem::transmute(pwcbefore.as_ptr()), pwcafter.len().try_into().unwrap(), core::mem::transmute(pwcafter.as_ptr())).ok() } #[inline] -pub unsafe fn SetWordList(hrc: P0, hwl: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetWordList(hrc: HRECOCONTEXT, hwl: HRECOWORDLIST) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn SetWordList(hrc : HRECOCONTEXT, hwl : HRECOWORDLIST) -> windows_core::HRESULT); - SetWordList(hrc.param().abi(), hwl.param().abi()).ok() + SetWordList(core::mem::transmute(hrc), core::mem::transmute(hwl)).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -1367,11 +1304,8 @@ impl IDynamicRenderer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HWND)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetHWND(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHWND)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SetHWND(&self, hwnd: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHWND)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } pub unsafe fn ClipRectangle(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1384,11 +1318,8 @@ impl IDynamicRenderer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ClipRegion)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetClipRegion(&self, hcliprgn: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetClipRegion)(windows_core::Interface::as_raw(self), hcliprgn.param().abi()).ok() + pub unsafe fn SetClipRegion(&self, hcliprgn: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetClipRegion)(windows_core::Interface::as_raw(self), core::mem::transmute(hcliprgn)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn DrawingAttributes(&self) -> windows_core::Result { @@ -1418,11 +1349,8 @@ impl IDynamicRenderer { pub unsafe fn Refresh(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Draw(&self, hdc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), hdc.param().abi()).ok() + pub unsafe fn Draw(&self, hdc: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc)).ok() } } #[repr(C)] @@ -1877,11 +1805,8 @@ impl IInkCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, collecting: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), collecting.param().abi()).ok() + pub unsafe fn SetEnabled(&self, collecting: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(collecting)).ok() } pub unsafe fn DefaultDrawingAttributes(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1917,11 +1842,8 @@ impl IInkCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoRedraw)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoRedraw(&self, autoredraw: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoRedraw)(windows_core::Interface::as_raw(self), autoredraw.param().abi()).ok() + pub unsafe fn SetAutoRedraw(&self, autoredraw: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoRedraw)(windows_core::Interface::as_raw(self), core::mem::transmute(autoredraw)).ok() } pub unsafe fn CollectingInk(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1938,11 +1860,8 @@ impl IInkCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DynamicRendering)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDynamicRendering(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDynamicRendering)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetDynamicRendering(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDynamicRendering)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn DesiredPacketDescription(&self) -> windows_core::Result { @@ -2005,17 +1924,11 @@ impl IInkCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SupportHighContrastInk)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSupportHighContrastInk(&self, support: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSupportHighContrastInk)(windows_core::Interface::as_raw(self), support.param().abi()).ok() + pub unsafe fn SetSupportHighContrastInk(&self, support: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSupportHighContrastInk)(windows_core::Interface::as_raw(self), core::mem::transmute(support)).ok() } - pub unsafe fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), listen.param().abi()).ok() + pub unsafe fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), core::mem::transmute(listen)).ok() } pub unsafe fn GetGestureStatus(&self, gesture: InkApplicationGesture) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2030,11 +1943,8 @@ impl IInkCollector { { (windows_core::Interface::vtable(self).SetWindowInputRectangle)(windows_core::Interface::as_raw(self), windowinputrectangle.param().abi()).ok() } - pub unsafe fn SetAllTabletsMode(&self, usemouseforinput: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllTabletsMode)(windows_core::Interface::as_raw(self), usemouseforinput.param().abi()).ok() + pub unsafe fn SetAllTabletsMode(&self, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllTabletsMode)(windows_core::Interface::as_raw(self), core::mem::transmute(usemouseforinput)).ok() } pub unsafe fn SetSingleTabletIntegratedMode(&self, tablet: P0) -> windows_core::Result<()> where @@ -2046,11 +1956,8 @@ impl IInkCollector { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), &mut result__).map(|| result__) } - pub unsafe fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), listen.param().abi()).ok() + pub unsafe fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), core::mem::transmute(listen)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -3047,11 +2954,8 @@ impl IInkDisp { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Dirty)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDirty(&self, dirty: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDirty)(windows_core::Interface::as_raw(self), dirty.param().abi()).ok() + pub unsafe fn SetDirty(&self, dirty: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDirty)(windows_core::Interface::as_raw(self), core::mem::transmute(dirty)).ok() } pub unsafe fn CustomStrokes(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3110,7 +3014,7 @@ impl IInkDisp { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn HitTestWithLasso(&self, points: &super::super::System::Variant::VARIANT, intersectpercent: f32, lassopoints: Option<*mut super::super::System::Variant::VARIANT>, strokes: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).HitTestWithLasso)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(points), core::mem::transmute(intersectpercent), core::mem::transmute(lassopoints.unwrap_or(core::ptr::null_mut())), core::mem::transmute(strokes)).ok() + (windows_core::Interface::vtable(self).HitTestWithLasso)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(points), core::mem::transmute(intersectpercent), core::mem::transmute(lassopoints.unwrap_or(core::mem::zeroed())), core::mem::transmute(strokes)).ok() } pub unsafe fn NearestPoint(&self, x: i32, y: i32, pointonstroke: *mut f32, distancefrompacket: *mut f32, stroke: *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).NearestPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(pointonstroke), core::mem::transmute(distancefrompacket), core::mem::transmute(stroke)).ok() @@ -3934,31 +3838,22 @@ impl IInkDrawingAttributes { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FitToCurve)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFitToCurve(&self, flag: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFitToCurve)(windows_core::Interface::as_raw(self), flag.param().abi()).ok() + pub unsafe fn SetFitToCurve(&self, flag: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFitToCurve)(windows_core::Interface::as_raw(self), core::mem::transmute(flag)).ok() } pub unsafe fn IgnorePressure(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IgnorePressure)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIgnorePressure(&self, flag: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIgnorePressure)(windows_core::Interface::as_raw(self), flag.param().abi()).ok() + pub unsafe fn SetIgnorePressure(&self, flag: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIgnorePressure)(windows_core::Interface::as_raw(self), core::mem::transmute(flag)).ok() } pub unsafe fn AntiAliased(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AntiAliased)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAntiAliased(&self, flag: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAntiAliased)(windows_core::Interface::as_raw(self), flag.param().abi()).ok() + pub unsafe fn SetAntiAliased(&self, flag: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAntiAliased)(windows_core::Interface::as_raw(self), core::mem::transmute(flag)).ok() } pub unsafe fn Transparency(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4238,11 +4133,8 @@ impl IInkEdit { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseMouseForInput)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseMouseForInput(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseMouseForInput)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetUseMouseForInput(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseMouseForInput)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn InkMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4315,11 +4207,8 @@ impl IInkEdit { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), &mut result__).map(|| result__) } - pub unsafe fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), listen.param().abi()).ok() + pub unsafe fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), core::mem::transmute(listen)).ok() } pub unsafe fn SetBackColor(&self, clr: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetBackColor)(windows_core::Interface::as_raw(self), core::mem::transmute(clr)).ok() @@ -4396,21 +4285,15 @@ impl IInkEdit { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Locked)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLocked(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLocked)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetLocked(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLocked)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn Enabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetEnabled(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn MaxLength(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4423,11 +4306,8 @@ impl IInkEdit { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MultiLine)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMultiLine(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMultiLine)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetMultiLine(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMultiLine)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } pub unsafe fn ScrollBars(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4440,11 +4320,8 @@ impl IInkEdit { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DisableNoScroll)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDisableNoScroll(&self, newval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisableNoScroll)(windows_core::Interface::as_raw(self), newval.param().abi()).ok() + pub unsafe fn SetDisableNoScroll(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisableNoScroll)(windows_core::Interface::as_raw(self), core::mem::transmute(newval)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SelAlignment(&self) -> windows_core::Result { @@ -5846,11 +5723,8 @@ impl IInkOverlay { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, collecting: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), collecting.param().abi()).ok() + pub unsafe fn SetEnabled(&self, collecting: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(collecting)).ok() } pub unsafe fn DefaultDrawingAttributes(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5886,11 +5760,8 @@ impl IInkOverlay { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoRedraw)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoRedraw(&self, autoredraw: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoRedraw)(windows_core::Interface::as_raw(self), autoredraw.param().abi()).ok() + pub unsafe fn SetAutoRedraw(&self, autoredraw: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoRedraw)(windows_core::Interface::as_raw(self), core::mem::transmute(autoredraw)).ok() } pub unsafe fn CollectingInk(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5907,11 +5778,8 @@ impl IInkOverlay { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DynamicRendering)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDynamicRendering(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDynamicRendering)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetDynamicRendering(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDynamicRendering)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn DesiredPacketDescription(&self) -> windows_core::Result { @@ -6012,21 +5880,15 @@ impl IInkOverlay { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SupportHighContrastInk)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSupportHighContrastInk(&self, support: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSupportHighContrastInk)(windows_core::Interface::as_raw(self), support.param().abi()).ok() + pub unsafe fn SetSupportHighContrastInk(&self, support: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSupportHighContrastInk)(windows_core::Interface::as_raw(self), core::mem::transmute(support)).ok() } pub unsafe fn SupportHighContrastSelectionUI(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SupportHighContrastSelectionUI)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSupportHighContrastSelectionUI(&self, support: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSupportHighContrastSelectionUI)(windows_core::Interface::as_raw(self), support.param().abi()).ok() + pub unsafe fn SetSupportHighContrastSelectionUI(&self, support: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSupportHighContrastSelectionUI)(windows_core::Interface::as_raw(self), core::mem::transmute(support)).ok() } pub unsafe fn HitTestSelection(&self, x: i32, y: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6038,11 +5900,8 @@ impl IInkOverlay { { (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), rect.param().abi()).ok() } - pub unsafe fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), listen.param().abi()).ok() + pub unsafe fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), core::mem::transmute(listen)).ok() } pub unsafe fn GetGestureStatus(&self, gesture: InkApplicationGesture) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6057,11 +5916,8 @@ impl IInkOverlay { { (windows_core::Interface::vtable(self).SetWindowInputRectangle)(windows_core::Interface::as_raw(self), windowinputrectangle.param().abi()).ok() } - pub unsafe fn SetAllTabletsMode(&self, usemouseforinput: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllTabletsMode)(windows_core::Interface::as_raw(self), usemouseforinput.param().abi()).ok() + pub unsafe fn SetAllTabletsMode(&self, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllTabletsMode)(windows_core::Interface::as_raw(self), core::mem::transmute(usemouseforinput)).ok() } pub unsafe fn SetSingleTabletIntegratedMode(&self, tablet: P0) -> windows_core::Result<()> where @@ -6073,11 +5929,8 @@ impl IInkOverlay { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), &mut result__).map(|| result__) } - pub unsafe fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), listen.param().abi()).ok() + pub unsafe fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), core::mem::transmute(listen)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -6701,11 +6554,8 @@ impl IInkPicture { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoRedraw)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoRedraw(&self, autoredraw: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoRedraw)(windows_core::Interface::as_raw(self), autoredraw.param().abi()).ok() + pub unsafe fn SetAutoRedraw(&self, autoredraw: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoRedraw)(windows_core::Interface::as_raw(self), core::mem::transmute(autoredraw)).ok() } pub unsafe fn CollectingInk(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6722,11 +6572,8 @@ impl IInkPicture { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DynamicRendering)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDynamicRendering(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDynamicRendering)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetDynamicRendering(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDynamicRendering)(windows_core::Interface::as_raw(self), core::mem::transmute(enabled)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn DesiredPacketDescription(&self) -> windows_core::Result { @@ -6853,31 +6700,22 @@ impl IInkPicture { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SupportHighContrastInk)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSupportHighContrastInk(&self, support: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSupportHighContrastInk)(windows_core::Interface::as_raw(self), support.param().abi()).ok() + pub unsafe fn SetSupportHighContrastInk(&self, support: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSupportHighContrastInk)(windows_core::Interface::as_raw(self), core::mem::transmute(support)).ok() } pub unsafe fn SupportHighContrastSelectionUI(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SupportHighContrastSelectionUI)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSupportHighContrastSelectionUI(&self, support: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSupportHighContrastSelectionUI)(windows_core::Interface::as_raw(self), support.param().abi()).ok() + pub unsafe fn SetSupportHighContrastSelectionUI(&self, support: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSupportHighContrastSelectionUI)(windows_core::Interface::as_raw(self), core::mem::transmute(support)).ok() } pub unsafe fn HitTestSelection(&self, x: i32, y: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HitTestSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(x), core::mem::transmute(y), &mut result__).map(|| result__) } - pub unsafe fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), listen.param().abi()).ok() + pub unsafe fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGestureStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(gesture), core::mem::transmute(listen)).ok() } pub unsafe fn GetGestureStatus(&self, gesture: InkApplicationGesture) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6892,11 +6730,8 @@ impl IInkPicture { { (windows_core::Interface::vtable(self).SetWindowInputRectangle)(windows_core::Interface::as_raw(self), windowinputrectangle.param().abi()).ok() } - pub unsafe fn SetAllTabletsMode(&self, usemouseforinput: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllTabletsMode)(windows_core::Interface::as_raw(self), usemouseforinput.param().abi()).ok() + pub unsafe fn SetAllTabletsMode(&self, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllTabletsMode)(windows_core::Interface::as_raw(self), core::mem::transmute(usemouseforinput)).ok() } pub unsafe fn SetSingleTabletIntegratedMode(&self, tablet: P0) -> windows_core::Result<()> where @@ -6908,31 +6743,22 @@ impl IInkPicture { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), &mut result__).map(|| result__) } - pub unsafe fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), listen.param().abi()).ok() + pub unsafe fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEventInterest)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), core::mem::transmute(listen)).ok() } pub unsafe fn InkEnabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).InkEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetInkEnabled(&self, collecting: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetInkEnabled)(windows_core::Interface::as_raw(self), collecting.param().abi()).ok() + pub unsafe fn SetInkEnabled(&self, collecting: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetInkEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(collecting)).ok() } pub unsafe fn Enabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, vbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), vbool.param().abi()).ok() + pub unsafe fn SetEnabled(&self, vbool: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), core::mem::transmute(vbool)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -9367,11 +9193,8 @@ impl IInkRenderer { pub unsafe fn Rotate(&self, degrees: f32, x: f32, y: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Rotate)(windows_core::Interface::as_raw(self), core::mem::transmute(degrees), core::mem::transmute(x), core::mem::transmute(y)).ok() } - pub unsafe fn ScaleTransform(&self, horizontalmultiplier: f32, verticalmultiplier: f32, applyonpenwidth: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ScaleTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(horizontalmultiplier), core::mem::transmute(verticalmultiplier), applyonpenwidth.param().abi()).ok() + pub unsafe fn ScaleTransform(&self, horizontalmultiplier: f32, verticalmultiplier: f32, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ScaleTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(horizontalmultiplier), core::mem::transmute(verticalmultiplier), core::mem::transmute(applyonpenwidth)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -9660,12 +9483,11 @@ impl IInkStrokeDisp { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetFlattenedBezierPoints)(windows_core::Interface::as_raw(self), core::mem::transmute(fittingerror), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn Transform(&self, transform: P0, applyonpenwidth: P1) -> windows_core::Result<()> + pub unsafe fn Transform(&self, transform: P0, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Transform)(windows_core::Interface::as_raw(self), transform.param().abi(), applyonpenwidth.param().abi()).ok() + (windows_core::Interface::vtable(self).Transform)(windows_core::Interface::as_raw(self), transform.param().abi(), core::mem::transmute(applyonpenwidth)).ok() } pub unsafe fn ScaleToRectangle(&self, rectangle: P0) -> windows_core::Result<()> where @@ -10186,12 +10008,11 @@ impl IInkStrokes { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetBoundingBox)(windows_core::Interface::as_raw(self), core::mem::transmute(boundingboxmode), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Transform(&self, transform: P0, applyonpenwidth: P1) -> windows_core::Result<()> + pub unsafe fn Transform(&self, transform: P0, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Transform)(windows_core::Interface::as_raw(self), transform.param().abi(), applyonpenwidth.param().abi()).ok() + (windows_core::Interface::vtable(self).Transform)(windows_core::Interface::as_raw(self), transform.param().abi(), core::mem::transmute(applyonpenwidth)).ok() } pub unsafe fn ScaleToRectangle(&self, rectangle: P0) -> windows_core::Result<()> where @@ -10814,12 +10635,8 @@ impl IInkTransform { pub unsafe fn Rotate(&self, degrees: f32, x: f32, y: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Rotate)(windows_core::Interface::as_raw(self), core::mem::transmute(degrees), core::mem::transmute(x), core::mem::transmute(y)).ok() } - pub unsafe fn Reflect(&self, horizontally: P0, vertically: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Reflect)(windows_core::Interface::as_raw(self), horizontally.param().abi(), vertically.param().abi()).ok() + pub unsafe fn Reflect(&self, horizontally: super::super::Foundation::VARIANT_BOOL, vertically: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Reflect)(windows_core::Interface::as_raw(self), core::mem::transmute(horizontally), core::mem::transmute(vertically)).ok() } pub unsafe fn Shear(&self, horizontalcomponent: f32, verticalcomponent: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Shear)(windows_core::Interface::as_raw(self), core::mem::transmute(horizontalcomponent), core::mem::transmute(verticalcomponent)).ok() @@ -11343,11 +11160,8 @@ impl IMathInputControl { pub unsafe fn Clear(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetCustomPaint(&self, element: i32, paint: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCustomPaint)(windows_core::Interface::as_raw(self), core::mem::transmute(element), paint.param().abi()).ok() + pub unsafe fn SetCustomPaint(&self, element: i32, paint: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCustomPaint)(windows_core::Interface::as_raw(self), core::mem::transmute(element), core::mem::transmute(paint)).ok() } pub unsafe fn SetCaptionText(&self, captiontext: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetCaptionText)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(captiontext)).ok() @@ -11361,11 +11175,8 @@ impl IMathInputControl { pub unsafe fn SetOwnerWindow(&self, ownerwindow: isize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetOwnerWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(ownerwindow)).ok() } - pub unsafe fn EnableExtendedButtons(&self, extended: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableExtendedButtons)(windows_core::Interface::as_raw(self), extended.param().abi()).ok() + pub unsafe fn EnableExtendedButtons(&self, extended: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableExtendedButtons)(windows_core::Interface::as_raw(self), core::mem::transmute(extended)).ok() } pub unsafe fn GetPreviewHeight(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11374,11 +11185,8 @@ impl IMathInputControl { pub unsafe fn SetPreviewHeight(&self, height: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetPreviewHeight)(windows_core::Interface::as_raw(self), core::mem::transmute(height)).ok() } - pub unsafe fn EnableAutoGrow(&self, autogrow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableAutoGrow)(windows_core::Interface::as_raw(self), autogrow.param().abi()).ok() + pub unsafe fn EnableAutoGrow(&self, autogrow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableAutoGrow)(windows_core::Interface::as_raw(self), core::mem::transmute(autogrow)).ok() } pub unsafe fn AddFunctionName(&self, functionname: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddFunctionName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(functionname)).ok() @@ -11656,11 +11464,8 @@ impl IPenInputPanel { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Visible)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetVisible(&self, visible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), visible.param().abi()).ok() + pub unsafe fn SetVisible(&self, visible: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), core::mem::transmute(visible)).ok() } pub unsafe fn Top(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11696,11 +11501,8 @@ impl IPenInputPanel { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoShow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoShow(&self, autoshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoShow)(windows_core::Interface::as_raw(self), autoshow.param().abi()).ok() + pub unsafe fn SetAutoShow(&self, autoshow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoShow)(windows_core::Interface::as_raw(self), core::mem::transmute(autoshow)).ok() } pub unsafe fn MoveTo(&self, left: i32, top: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).MoveTo)(windows_core::Interface::as_raw(self), core::mem::transmute(left), core::mem::transmute(top)).ok() @@ -11711,11 +11513,8 @@ impl IPenInputPanel { pub unsafe fn Refresh(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn EnableTsf(&self, enable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableTsf)(windows_core::Interface::as_raw(self), enable.param().abi()).ok() + pub unsafe fn EnableTsf(&self, enable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableTsf)(windows_core::Interface::as_raw(self), core::mem::transmute(enable)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -12076,11 +11875,8 @@ impl IRealTimeStylus { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HWND)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetHWND(&self, hwnd: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHWND)(windows_core::Interface::as_raw(self), hwnd.param().abi()).ok() + pub unsafe fn SetHWND(&self, hwnd: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHWND)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd)).ok() } pub unsafe fn WindowInputRectangle(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -12196,7 +11992,7 @@ impl IRealTimeStylus { (windows_core::Interface::vtable(self).GetDesiredPacketDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pcproperties), core::mem::transmute(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), core::mem::transmute(tcid), core::mem::transmute(pfinktodevicescalex.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfinktodevicescaley.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcpacketproperties), core::mem::transmute(pppacketproperties)).ok() + (windows_core::Interface::vtable(self).GetPacketDescriptionData)(windows_core::Interface::as_raw(self), core::mem::transmute(tcid), core::mem::transmute(pfinktodevicescalex.unwrap_or(core::mem::zeroed())), core::mem::transmute(pfinktodevicescaley.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcpacketproperties), core::mem::transmute(pppacketproperties)).ok() } } #[repr(C)] @@ -12725,7 +12521,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), core::mem::transmute(tcid), core::mem::transmute(sid), core::mem::transmute(ppacket), ppacketproperties.len().try_into().unwrap(), core::mem::transmute(ppacketproperties.as_ptr()), core::mem::transmute(finktodevicescalex), core::mem::transmute(finktodevicescaley), core::mem::transmute(ppiinkstroke.unwrap_or(core::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BeginStroke)(windows_core::Interface::as_raw(self), core::mem::transmute(tcid), core::mem::transmute(sid), core::mem::transmute(ppacket), ppacketproperties.len().try_into().unwrap(), core::mem::transmute(ppacketproperties.as_ptr()), core::mem::transmute(finktodevicescalex), core::mem::transmute(finktodevicescaley), core::mem::transmute(ppiinkstroke.unwrap_or(core::mem::zeroed()))).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), core::mem::transmute(tcid), core::mem::transmute(sid), ppackets.len().try_into().unwrap(), core::mem::transmute(ppackets.as_ptr())).ok() @@ -13142,11 +12938,8 @@ impl ITextInputPanel { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AttachedEditWindow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAttachedEditWindow(&self, attachededitwindow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAttachedEditWindow)(windows_core::Interface::as_raw(self), attachededitwindow.param().abi()).ok() + pub unsafe fn SetAttachedEditWindow(&self, attachededitwindow: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAttachedEditWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(attachededitwindow)).ok() } pub unsafe fn CurrentInteractionMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13713,19 +13506,17 @@ impl windows_core::RuntimeName for ITextInputPanelRunInfo {} windows_core::imp::define_interface!(ITipAutoCompleteClient, ITipAutoCompleteClient_Vtbl, 0x5e078e03_8265_4bbe_9487_d242edbef910); windows_core::imp::interface_hierarchy!(ITipAutoCompleteClient, windows_core::IUnknown); impl ITipAutoCompleteClient { - pub unsafe fn AdviseProvider(&self, hwndfield: P0, piprovider: P1) -> windows_core::Result<()> + pub unsafe fn AdviseProvider(&self, hwndfield: super::super::Foundation::HWND, piprovider: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AdviseProvider)(windows_core::Interface::as_raw(self), hwndfield.param().abi(), piprovider.param().abi()).ok() + (windows_core::Interface::vtable(self).AdviseProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndfield), piprovider.param().abi()).ok() } - pub unsafe fn UnadviseProvider(&self, hwndfield: P0, piprovider: P1) -> windows_core::Result<()> + pub unsafe fn UnadviseProvider(&self, hwndfield: super::super::Foundation::HWND, piprovider: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).UnadviseProvider)(windows_core::Interface::as_raw(self), hwndfield.param().abi(), piprovider.param().abi()).ok() + (windows_core::Interface::vtable(self).UnadviseProvider)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndfield), piprovider.param().abi()).ok() } pub unsafe fn UserSelection(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UserSelection)(windows_core::Interface::as_raw(self)).ok() @@ -13733,12 +13524,9 @@ impl ITipAutoCompleteClient { pub unsafe fn PreferredRects(&self, prcaclist: *const super::super::Foundation::RECT, prcfield: *const super::super::Foundation::RECT, prcmodifiedaclist: *mut super::super::Foundation::RECT, pfshownabovetip: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).PreferredRects)(windows_core::Interface::as_raw(self), core::mem::transmute(prcaclist), core::mem::transmute(prcfield), core::mem::transmute(prcmodifiedaclist), core::mem::transmute(pfshownabovetip)).ok() } - pub unsafe fn RequestShowUI(&self, hwndlist: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn RequestShowUI(&self, hwndlist: super::super::Foundation::HWND) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RequestShowUI)(windows_core::Interface::as_raw(self), hwndlist.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RequestShowUI)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndlist), &mut result__).map(|| result__) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs index 96d1b3d754..0464387859 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn DoMsCtfMonitor(dwflags: u32, heventforservicestop: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn DoMsCtfMonitor(dwflags: u32, heventforservicestop: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { windows_targets::link!("msctfmonitor.dll" "system" fn DoMsCtfMonitor(dwflags : u32, heventforservicestop : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DoMsCtfMonitor(core::mem::transmute(dwflags), heventforservicestop.param().abi()) + DoMsCtfMonitor(core::mem::transmute(dwflags), core::mem::transmute(heventforservicestop)) } #[inline] pub unsafe fn InitLocalMsCtfMonitor(dwflags: u32) -> windows_core::Result<()> { @@ -195,12 +192,9 @@ impl IAccClientDocMgr { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDocuments)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn LookupByHWND(&self, hwnd: P0, riid: *const windows_core::GUID) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn LookupByHWND(&self, hwnd: super::super::Foundation::HWND, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).LookupByHWND)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(riid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).LookupByHWND)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(riid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn LookupByPoint(&self, pt: super::super::Foundation::POINT, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -465,12 +459,9 @@ impl IAccStore { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDocuments)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn LookupByHWND(&self, hwnd: P0, riid: *const windows_core::GUID) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn LookupByHWND(&self, hwnd: super::super::Foundation::HWND, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).LookupByHWND)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(riid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).LookupByHWND)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), core::mem::transmute(riid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn LookupByPoint(&self, pt: super::super::Foundation::POINT, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5262,37 +5253,21 @@ impl windows_core::RuntimeName for ITfContextComposition {} windows_core::imp::define_interface!(ITfContextKeyEventSink, ITfContextKeyEventSink_Vtbl, 0x0552ba5d_c835_4934_bf50_846aaa67432f); windows_core::imp::interface_hierarchy!(ITfContextKeyEventSink, windows_core::IUnknown); impl ITfContextKeyEventSink { - pub unsafe fn OnKeyDown(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn OnKeyDown(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnKeyDown)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnKeyDown)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn OnKeyUp(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn OnKeyUp(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnKeyUp)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnKeyUp)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn OnTestKeyDown(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn OnTestKeyDown(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnTestKeyDown)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnTestKeyDown)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn OnTestKeyUp(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn OnTestKeyUp(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnTestKeyUp)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnTestKeyUp)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } } #[repr(C)] @@ -6424,11 +6399,8 @@ impl core::ops::Deref for ITfFnConfigure { } windows_core::imp::interface_hierarchy!(ITfFnConfigure, windows_core::IUnknown, ITfFunction); impl ITfFnConfigure { - pub unsafe fn Show(&self, hwndparent: P0, langid: u16, rguidprofile: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(langid), core::mem::transmute(rguidprofile)).ok() + pub unsafe fn Show(&self, hwndparent: super::super::Foundation::HWND, langid: u16, rguidprofile: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(langid), core::mem::transmute(rguidprofile)).ok() } } #[repr(C)] @@ -6461,11 +6433,8 @@ impl core::ops::Deref for ITfFnConfigureRegisterEudc { } windows_core::imp::interface_hierarchy!(ITfFnConfigureRegisterEudc, windows_core::IUnknown, ITfFunction); impl ITfFnConfigureRegisterEudc { - pub unsafe fn Show(&self, hwndparent: P0, langid: u16, rguidprofile: *const windows_core::GUID, bstrregistered: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(langid), core::mem::transmute(rguidprofile), core::mem::transmute_copy(bstrregistered)).ok() + pub unsafe fn Show(&self, hwndparent: super::super::Foundation::HWND, langid: u16, rguidprofile: *const windows_core::GUID, bstrregistered: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(langid), core::mem::transmute(rguidprofile), core::mem::transmute_copy(bstrregistered)).ok() } } #[repr(C)] @@ -6498,11 +6467,8 @@ impl core::ops::Deref for ITfFnConfigureRegisterWord { } windows_core::imp::interface_hierarchy!(ITfFnConfigureRegisterWord, windows_core::IUnknown, ITfFunction); impl ITfFnConfigureRegisterWord { - pub unsafe fn Show(&self, hwndparent: P0, langid: u16, rguidprofile: *const windows_core::GUID, bstrregistered: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(langid), core::mem::transmute(rguidprofile), core::mem::transmute_copy(bstrregistered)).ok() + pub unsafe fn Show(&self, hwndparent: super::super::Foundation::HWND, langid: u16, rguidprofile: *const windows_core::GUID, bstrregistered: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(langid), core::mem::transmute(rguidprofile), core::mem::transmute_copy(bstrregistered)).ok() } } #[repr(C)] @@ -6751,22 +6717,18 @@ impl ITfFnLMProcessor { { (windows_core::Interface::vtable(self).Reconvert)(windows_core::Interface::as_raw(self), prange.param().abi()).ok() } - pub unsafe fn QueryKey(&self, fup: P0, vkey: P1, lparamkeydata: P2) -> windows_core::Result + pub unsafe fn QueryKey(&self, fup: P0, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).QueryKey)(windows_core::Interface::as_raw(self), fup.param().abi(), vkey.param().abi(), lparamkeydata.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).QueryKey)(windows_core::Interface::as_raw(self), fup.param().abi(), core::mem::transmute(vkey), core::mem::transmute(lparamkeydata), &mut result__).map(|| result__) } - pub unsafe fn InvokeKey(&self, fup: P0, vkey: P1, lparamkeydata: P2) -> windows_core::Result<()> + pub unsafe fn InvokeKey(&self, fup: P0, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).InvokeKey)(windows_core::Interface::as_raw(self), fup.param().abi(), vkey.param().abi(), lparamkeydata.param().abi()).ok() + (windows_core::Interface::vtable(self).InvokeKey)(windows_core::Interface::as_raw(self), fup.param().abi(), core::mem::transmute(vkey), core::mem::transmute(lparamkeydata)).ok() } pub unsafe fn InvokeFunc(&self, pic: P0, refguidfunc: *const windows_core::GUID) -> windows_core::Result<()> where @@ -7148,11 +7110,8 @@ impl core::ops::Deref for ITfFnShowHelp { } windows_core::imp::interface_hierarchy!(ITfFnShowHelp, windows_core::IUnknown, ITfFunction); impl ITfFnShowHelp { - pub unsafe fn Show(&self, hwndparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), hwndparent.param().abi()).ok() + pub unsafe fn Show(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent)).ok() } } #[repr(C)] @@ -7287,11 +7246,8 @@ windows_core::imp::define_interface!(ITfInputProcessorProfileActivationSink, ITf windows_core::imp::interface_hierarchy!(ITfInputProcessorProfileActivationSink, windows_core::IUnknown); impl ITfInputProcessorProfileActivationSink { #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn OnActivated(&self, dwprofiletype: u32, langid: u16, clsid: *const windows_core::GUID, catid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, hkl: P5, dwflags: u32) -> windows_core::Result<()> - where - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnActivated)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofiletype), core::mem::transmute(langid), core::mem::transmute(clsid), core::mem::transmute(catid), core::mem::transmute(guidprofile), hkl.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn OnActivated(&self, dwprofiletype: u32, langid: u16, clsid: *const windows_core::GUID, catid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, hkl: super::Input::KeyboardAndMouse::HKL, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnActivated)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofiletype), core::mem::transmute(langid), core::mem::transmute(clsid), core::mem::transmute(catid), core::mem::transmute(guidprofile), core::mem::transmute(hkl), core::mem::transmute(dwflags)).ok() } } #[repr(C)] @@ -7325,25 +7281,16 @@ windows_core::imp::define_interface!(ITfInputProcessorProfileMgr, ITfInputProces windows_core::imp::interface_hierarchy!(ITfInputProcessorProfileMgr, windows_core::IUnknown); impl ITfInputProcessorProfileMgr { #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn ActivateProfile(&self, dwprofiletype: u32, langid: u16, clsid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, hkl: P4, dwflags: u32) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).ActivateProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofiletype), core::mem::transmute(langid), core::mem::transmute(clsid), core::mem::transmute(guidprofile), hkl.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn ActivateProfile(&self, dwprofiletype: u32, langid: u16, clsid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, hkl: super::Input::KeyboardAndMouse::HKL, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ActivateProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofiletype), core::mem::transmute(langid), core::mem::transmute(clsid), core::mem::transmute(guidprofile), core::mem::transmute(hkl), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn DeactivateProfile(&self, dwprofiletype: u32, langid: u16, clsid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, hkl: P4, dwflags: u32) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeactivateProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofiletype), core::mem::transmute(langid), core::mem::transmute(clsid), core::mem::transmute(guidprofile), hkl.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn DeactivateProfile(&self, dwprofiletype: u32, langid: u16, clsid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, hkl: super::Input::KeyboardAndMouse::HKL, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeactivateProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofiletype), core::mem::transmute(langid), core::mem::transmute(clsid), core::mem::transmute(guidprofile), core::mem::transmute(hkl), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn GetProfile(&self, dwprofiletype: u32, langid: u16, clsid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, hkl: P4, pprofile: *mut TF_INPUTPROCESSORPROFILE) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofiletype), core::mem::transmute(langid), core::mem::transmute(clsid), core::mem::transmute(guidprofile), hkl.param().abi(), core::mem::transmute(pprofile)).ok() + pub unsafe fn GetProfile(&self, dwprofiletype: u32, langid: u16, clsid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, hkl: super::Input::KeyboardAndMouse::HKL, pprofile: *mut TF_INPUTPROCESSORPROFILE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofiletype), core::mem::transmute(langid), core::mem::transmute(clsid), core::mem::transmute(guidprofile), core::mem::transmute(hkl), core::mem::transmute(pprofile)).ok() } pub unsafe fn EnumProfiles(&self, langid: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7353,12 +7300,11 @@ impl ITfInputProcessorProfileMgr { (windows_core::Interface::vtable(self).ReleaseInputProcessor)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn RegisterProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, pchdesc: &[u16], pchiconfile: &[u16], uiconindex: u32, hklsubstitute: P8, dwpreferredlayout: u32, benabledbydefault: P10, dwflags: u32) -> windows_core::Result<()> + pub unsafe fn RegisterProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, pchdesc: &[u16], pchiconfile: &[u16], uiconindex: u32, hklsubstitute: super::Input::KeyboardAndMouse::HKL, dwpreferredlayout: u32, benabledbydefault: P10, dwflags: u32) -> windows_core::Result<()> where - P8: windows_core::Param, P10: windows_core::Param, { - (windows_core::Interface::vtable(self).RegisterProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap(), core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len().try_into().unwrap(), core::mem::transmute(uiconindex), hklsubstitute.param().abi(), core::mem::transmute(dwpreferredlayout), benabledbydefault.param().abi(), core::mem::transmute(dwflags)).ok() + (windows_core::Interface::vtable(self).RegisterProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap(), core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len().try_into().unwrap(), core::mem::transmute(uiconindex), core::mem::transmute(hklsubstitute), core::mem::transmute(dwpreferredlayout), benabledbydefault.param().abi(), core::mem::transmute(dwflags)).ok() } pub unsafe fn UnregisterProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnregisterProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), core::mem::transmute(dwflags)).ok() @@ -7574,11 +7520,8 @@ impl ITfInputProcessorProfiles { (windows_core::Interface::vtable(self).EnableLanguageProfileByDefault)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), fenable.param().abi()).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn SubstituteKeyboardLayout(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, hkl: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).SubstituteKeyboardLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), hkl.param().abi()).ok() + pub unsafe fn SubstituteKeyboardLayout(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, hkl: super::Input::KeyboardAndMouse::HKL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SubstituteKeyboardLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), core::mem::transmute(hkl)).ok() } } #[repr(C)] @@ -8018,13 +7961,9 @@ impl ITfIntegratableCandidateListUIElement { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSelectionStyle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn OnKeyDown(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn OnKeyDown(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnKeyDown)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnKeyDown)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } pub unsafe fn ShowCandidateNumbers(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8113,41 +8052,33 @@ impl ITfKeyEventSink { { (windows_core::Interface::vtable(self).OnSetFocus)(windows_core::Interface::as_raw(self), fforeground.param().abi()).ok() } - pub unsafe fn OnTestKeyDown(&self, pic: P0, wparam: P1, lparam: P2) -> windows_core::Result + pub unsafe fn OnTestKeyDown(&self, pic: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnTestKeyDown)(windows_core::Interface::as_raw(self), pic.param().abi(), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnTestKeyDown)(windows_core::Interface::as_raw(self), pic.param().abi(), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn OnTestKeyUp(&self, pic: P0, wparam: P1, lparam: P2) -> windows_core::Result + pub unsafe fn OnTestKeyUp(&self, pic: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnTestKeyUp)(windows_core::Interface::as_raw(self), pic.param().abi(), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnTestKeyUp)(windows_core::Interface::as_raw(self), pic.param().abi(), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn OnKeyDown(&self, pic: P0, wparam: P1, lparam: P2) -> windows_core::Result + pub unsafe fn OnKeyDown(&self, pic: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnKeyDown)(windows_core::Interface::as_raw(self), pic.param().abi(), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnKeyDown)(windows_core::Interface::as_raw(self), pic.param().abi(), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn OnKeyUp(&self, pic: P0, wparam: P1, lparam: P2) -> windows_core::Result + pub unsafe fn OnKeyUp(&self, pic: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnKeyUp)(windows_core::Interface::as_raw(self), pic.param().abi(), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnKeyUp)(windows_core::Interface::as_raw(self), pic.param().abi(), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } pub unsafe fn OnPreservedKey(&self, pic: P0, rguid: *const windows_core::GUID) -> windows_core::Result where @@ -8249,19 +8180,11 @@ impl windows_core::RuntimeName for ITfKeyEventSink {} windows_core::imp::define_interface!(ITfKeyTraceEventSink, ITfKeyTraceEventSink_Vtbl, 0x1cd4c13b_1c36_4191_a70a_7f3e611f367d); windows_core::imp::interface_hierarchy!(ITfKeyTraceEventSink, windows_core::IUnknown); impl ITfKeyTraceEventSink { - pub unsafe fn OnKeyTraceDown(&self, wparam: P0, lparam: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnKeyTraceDown)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn OnKeyTraceDown(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnKeyTraceDown)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn OnKeyTraceUp(&self, wparam: P0, lparam: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnKeyTraceUp)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn OnKeyTraceUp(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnKeyTraceUp)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } } #[repr(C)] @@ -8312,37 +8235,21 @@ impl ITfKeystrokeMgr { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetForeground)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn TestKeyDown(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn TestKeyDown(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TestKeyDown)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).TestKeyDown)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn TestKeyUp(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn TestKeyUp(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TestKeyUp)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).TestKeyUp)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn KeyDown(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn KeyDown(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).KeyDown)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).KeyDown)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } - pub unsafe fn KeyUp(&self, wparam: P0, lparam: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn KeyUp(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).KeyUp)(windows_core::Interface::as_raw(self), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).KeyUp)(windows_core::Interface::as_raw(self), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } pub unsafe fn GetPreservedKey(&self, pic: P0, pprekey: *const TF_PRESERVEDKEY) -> windows_core::Result where @@ -8612,12 +8519,8 @@ impl ITfLangBarEventSink { pub unsafe fn OnThreadItemChange(&self, dwthreadid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnThreadItemChange)(windows_core::Interface::as_raw(self), core::mem::transmute(dwthreadid)).ok() } - pub unsafe fn OnModalInput(&self, dwthreadid: u32, umsg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnModalInput)(windows_core::Interface::as_raw(self), core::mem::transmute(dwthreadid), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()).ok() + pub unsafe fn OnModalInput(&self, dwthreadid: u32, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnModalInput)(windows_core::Interface::as_raw(self), core::mem::transmute(dwthreadid), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } pub unsafe fn ShowFloating(&self, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ShowFloating)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags)).ok() @@ -9347,12 +9250,11 @@ impl windows_core::RuntimeName for ITfLangBarItemSink {} windows_core::imp::define_interface!(ITfLangBarMgr, ITfLangBarMgr_Vtbl, 0x87955690_e627_11d2_8ddb_00105a2799b5); windows_core::imp::interface_hierarchy!(ITfLangBarMgr, windows_core::IUnknown); impl ITfLangBarMgr { - pub unsafe fn AdviseEventSink(&self, psink: P0, hwnd: P1, dwflags: u32, pdwcookie: *const u32) -> windows_core::Result<()> + pub unsafe fn AdviseEventSink(&self, psink: P0, hwnd: super::super::Foundation::HWND, dwflags: u32, pdwcookie: *const u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AdviseEventSink)(windows_core::Interface::as_raw(self), psink.param().abi(), hwnd.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pdwcookie)).ok() + (windows_core::Interface::vtable(self).AdviseEventSink)(windows_core::Interface::as_raw(self), psink.param().abi(), core::mem::transmute(hwnd), core::mem::transmute(dwflags), core::mem::transmute(pdwcookie)).ok() } pub unsafe fn UnadviseEventSink(&self, dwcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnadviseEventSink)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)).ok() @@ -9572,12 +9474,8 @@ windows_core::imp::define_interface!(ITfMenu, ITfMenu_Vtbl, 0x6f8a98e4_aaa0_4f15 windows_core::imp::interface_hierarchy!(ITfMenu, windows_core::IUnknown); impl ITfMenu { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn AddMenuItem(&self, uid: u32, dwflags: u32, hbmp: P2, hbmpmask: P3, pch: &[u16], ppmenu: *mut Option) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddMenuItem)(windows_core::Interface::as_raw(self), core::mem::transmute(uid), core::mem::transmute(dwflags), hbmp.param().abi(), hbmpmask.param().abi(), core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap(), core::mem::transmute(ppmenu)).ok() + pub unsafe fn AddMenuItem(&self, uid: u32, dwflags: u32, hbmp: super::super::Graphics::Gdi::HBITMAP, hbmpmask: super::super::Graphics::Gdi::HBITMAP, pch: &[u16], ppmenu: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddMenuItem)(windows_core::Interface::as_raw(self), core::mem::transmute(uid), core::mem::transmute(dwflags), core::mem::transmute(hbmp), core::mem::transmute(hbmpmask), core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap(), core::mem::transmute(ppmenu)).ok() } } #[repr(C)] @@ -9611,32 +9509,20 @@ windows_core::imp::define_interface!(ITfMessagePump, ITfMessagePump_Vtbl, 0x8f1b windows_core::imp::interface_hierarchy!(ITfMessagePump, windows_core::IUnknown); impl ITfMessagePump { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn PeekMessageA(&self, pmsg: *mut super::WindowsAndMessaging::MSG, hwnd: P1, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PeekMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), hwnd.param().abi(), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(wremovemsg), core::mem::transmute(pfresult)).ok() + pub unsafe fn PeekMessageA(&self, pmsg: *mut super::WindowsAndMessaging::MSG, hwnd: super::super::Foundation::HWND, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PeekMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(hwnd), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(wremovemsg), core::mem::transmute(pfresult)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn GetMessageA(&self, pmsg: *mut super::WindowsAndMessaging::MSG, hwnd: P1, wmsgfiltermin: u32, wmsgfiltermax: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), hwnd.param().abi(), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(pfresult)).ok() + pub unsafe fn GetMessageA(&self, pmsg: *mut super::WindowsAndMessaging::MSG, hwnd: super::super::Foundation::HWND, wmsgfiltermin: u32, wmsgfiltermax: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetMessageA)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(hwnd), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(pfresult)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn PeekMessageW(&self, pmsg: *mut super::WindowsAndMessaging::MSG, hwnd: P1, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PeekMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), hwnd.param().abi(), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(wremovemsg), core::mem::transmute(pfresult)).ok() + pub unsafe fn PeekMessageW(&self, pmsg: *mut super::WindowsAndMessaging::MSG, hwnd: super::super::Foundation::HWND, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PeekMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(hwnd), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(wremovemsg), core::mem::transmute(pfresult)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn GetMessageW(&self, pmsg: *mut super::WindowsAndMessaging::MSG, hwnd: P1, wmsgfiltermin: u32, wmsgfiltermax: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), hwnd.param().abi(), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(pfresult)).ok() + pub unsafe fn GetMessageW(&self, pmsg: *mut super::WindowsAndMessaging::MSG, hwnd: super::super::Foundation::HWND, wmsgfiltermin: u32, wmsgfiltermax: u32, pfresult: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetMessageW)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(hwnd), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(pfresult)).ok() } } #[repr(C)] @@ -11253,11 +11139,8 @@ windows_core::imp::define_interface!(ITfSystemLangBarItem, ITfSystemLangBarItem_ windows_core::imp::interface_hierarchy!(ITfSystemLangBarItem, windows_core::IUnknown); impl ITfSystemLangBarItem { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn SetIcon(&self, hicon: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIcon)(windows_core::Interface::as_raw(self), hicon.param().abi()).ok() + pub unsafe fn SetIcon(&self, hicon: super::WindowsAndMessaging::HICON) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIcon)(windows_core::Interface::as_raw(self), core::mem::transmute(hicon)).ok() } pub unsafe fn SetTooltipString(&self, pchtooltip: &[u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetTooltipString)(windows_core::Interface::as_raw(self), core::mem::transmute(pchtooltip.as_ptr()), pchtooltip.len().try_into().unwrap()).ok() @@ -11606,13 +11489,12 @@ impl ITfThreadMgr { { (windows_core::Interface::vtable(self).SetFocus)(windows_core::Interface::as_raw(self), pdimfocus.param().abi()).ok() } - pub unsafe fn AssociateFocus(&self, hwnd: P0, pdimnew: P1) -> windows_core::Result + pub unsafe fn AssociateFocus(&self, hwnd: super::super::Foundation::HWND, pdimnew: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AssociateFocus)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pdimnew.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).AssociateFocus)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), pdimnew.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn IsThreadFocus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 074058254f..946343aa79 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs @@ -20,12 +20,9 @@ pub unsafe fn AllowSetForegroundWindow(dwprocessid: u32) -> windows_core::Result AllowSetForegroundWindow(core::mem::transmute(dwprocessid)).ok() } #[inline] -pub unsafe fn AnimateWindow(hwnd: P0, dwtime: u32, dwflags: ANIMATE_WINDOW_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn AnimateWindow(hwnd: super::super::Foundation::HWND, dwtime: u32, dwflags: ANIMATE_WINDOW_FLAGS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn AnimateWindow(hwnd : super::super::Foundation:: HWND, dwtime : u32, dwflags : ANIMATE_WINDOW_FLAGS) -> super::super::Foundation:: BOOL); - AnimateWindow(hwnd.param().abi(), core::mem::transmute(dwtime), core::mem::transmute(dwflags)).ok() + AnimateWindow(core::mem::transmute(hwnd), core::mem::transmute(dwtime), core::mem::transmute(dwflags)).ok() } #[inline] pub unsafe fn AnyPopup() -> super::super::Foundation::BOOL { @@ -33,30 +30,25 @@ pub unsafe fn AnyPopup() -> super::super::Foundation::BOOL { AnyPopup() } #[inline] -pub unsafe fn AppendMenuA(hmenu: P0, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P3) -> windows_core::Result<()> +pub unsafe fn AppendMenuA(hmenu: HMENU, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn AppendMenuA(hmenu : HMENU, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - AppendMenuA(hmenu.param().abi(), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() + AppendMenuA(core::mem::transmute(hmenu), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() } #[inline] -pub unsafe fn AppendMenuW(hmenu: P0, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P3) -> windows_core::Result<()> +pub unsafe fn AppendMenuW(hmenu: HMENU, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn AppendMenuW(hmenu : HMENU, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AppendMenuW(hmenu.param().abi(), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() + AppendMenuW(core::mem::transmute(hmenu), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() } #[inline] -pub unsafe fn ArrangeIconicWindows(hwnd: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ArrangeIconicWindows(hwnd: super::super::Foundation::HWND) -> u32 { windows_targets::link!("user32.dll" "system" fn ArrangeIconicWindows(hwnd : super::super::Foundation:: HWND) -> u32); - ArrangeIconicWindows(hwnd.param().abi()) + ArrangeIconicWindows(core::mem::transmute(hwnd)) } #[inline] pub unsafe fn BeginDeferWindowPos(nnumwindows: i32) -> windows_core::Result { @@ -65,17 +57,14 @@ pub unsafe fn BeginDeferWindowPos(nnumwindows: i32) -> windows_core::Result(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BringWindowToTop(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn BringWindowToTop(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - BringWindowToTop(hwnd.param().abi()).ok() + BringWindowToTop(core::mem::transmute(hwnd)).ok() } #[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(core::mem::transmute(anchorpoint), core::mem::transmute(windowsize), core::mem::transmute(flags), core::mem::transmute(excluderect.unwrap_or(core::ptr::null())), core::mem::transmute(popupwindowposition)).ok() + CalculatePopupWindowPosition(core::mem::transmute(anchorpoint), core::mem::transmute(windowsize), core::mem::transmute(flags), core::mem::transmute(excluderect.unwrap_or(core::mem::zeroed())), core::mem::transmute(popupwindowposition)).ok() } #[inline] pub unsafe fn CallMsgFilterA(lpmsg: *const MSG, ncode: i32) -> super::super::Foundation::BOOL { @@ -88,34 +77,19 @@ pub unsafe fn CallMsgFilterW(lpmsg: *const MSG, ncode: i32) -> super::super::Fou CallMsgFilterW(core::mem::transmute(lpmsg), core::mem::transmute(ncode)) } #[inline] -pub unsafe fn CallNextHookEx(hhk: P0, ncode: i32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn CallNextHookEx(hhk: Option, ncode: i32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn CallNextHookEx(hhk : HHOOK, ncode : i32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - CallNextHookEx(hhk.param().abi(), core::mem::transmute(ncode), wparam.param().abi(), lparam.param().abi()) + CallNextHookEx(core::mem::transmute(hhk.unwrap_or(core::mem::zeroed())), core::mem::transmute(ncode), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn CallWindowProcA(lpprevwndfunc: WNDPROC, hwnd: P1, msg: u32, wparam: P3, lparam: P4) -> super::super::Foundation::LRESULT -where - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn CallWindowProcA(lpprevwndfunc: WNDPROC, hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn CallWindowProcA(lpprevwndfunc : WNDPROC, hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - CallWindowProcA(core::mem::transmute(lpprevwndfunc), hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + CallWindowProcA(core::mem::transmute(lpprevwndfunc), core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn CallWindowProcW(lpprevwndfunc: WNDPROC, hwnd: P1, msg: u32, wparam: P3, lparam: P4) -> super::super::Foundation::LRESULT -where - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn CallWindowProcW(lpprevwndfunc: WNDPROC, hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn CallWindowProcW(lpprevwndfunc : WNDPROC, hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - CallWindowProcW(core::mem::transmute(lpprevwndfunc), hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + CallWindowProcW(core::mem::transmute(lpprevwndfunc), core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] pub unsafe fn CancelShutdown() -> super::super::Foundation::BOOL { @@ -123,30 +97,25 @@ pub unsafe fn CancelShutdown() -> super::super::Foundation::BOOL { CancelShutdown() } #[inline] -pub unsafe fn CascadeWindows(hwndparent: P0, whow: CASCADE_WINDOWS_HOW, lprect: Option<*const super::super::Foundation::RECT>, lpkids: Option<&[super::super::Foundation::HWND]>) -> u16 -where - P0: windows_core::Param, -{ +pub unsafe fn CascadeWindows(hwndparent: Option, whow: CASCADE_WINDOWS_HOW, lprect: Option<*const super::super::Foundation::RECT>, lpkids: Option<&[super::super::Foundation::HWND]>) -> u16 { 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(), core::mem::transmute(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()))) + CascadeWindows(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(whow), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), 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: P2, cmdinsert: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn ChangeMenuA(hmenu: HMENU, cmd: u32, lpsznewitem: P2, cmdinsert: u32, flags: u32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ChangeMenuA(hmenu : HMENU, cmd : u32, lpsznewitem : windows_core::PCSTR, cmdinsert : u32, flags : u32) -> super::super::Foundation:: BOOL); - ChangeMenuA(hmenu.param().abi(), core::mem::transmute(cmd), lpsznewitem.param().abi(), core::mem::transmute(cmdinsert), core::mem::transmute(flags)) + ChangeMenuA(core::mem::transmute(hmenu), core::mem::transmute(cmd), lpsznewitem.param().abi(), core::mem::transmute(cmdinsert), core::mem::transmute(flags)) } #[inline] -pub unsafe fn ChangeMenuW(hmenu: P0, cmd: u32, lpsznewitem: P2, cmdinsert: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn ChangeMenuW(hmenu: HMENU, cmd: u32, lpsznewitem: P2, cmdinsert: u32, flags: u32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ChangeMenuW(hmenu : HMENU, cmd : u32, lpsznewitem : windows_core::PCWSTR, cmdinsert : u32, flags : u32) -> super::super::Foundation:: BOOL); - ChangeMenuW(hmenu.param().abi(), core::mem::transmute(cmd), lpsznewitem.param().abi(), core::mem::transmute(cmdinsert), core::mem::transmute(flags)) + ChangeMenuW(core::mem::transmute(hmenu), core::mem::transmute(cmd), lpsznewitem.param().abi(), core::mem::transmute(cmdinsert), core::mem::transmute(flags)) } #[inline] pub unsafe fn ChangeWindowMessageFilter(message: u32, dwflag: CHANGE_WINDOW_MESSAGE_FILTER_FLAGS) -> windows_core::Result<()> { @@ -154,12 +123,9 @@ pub unsafe fn ChangeWindowMessageFilter(message: u32, dwflag: CHANGE_WINDOW_MESS ChangeWindowMessageFilter(core::mem::transmute(message), core::mem::transmute(dwflag)).ok() } #[inline] -pub unsafe fn ChangeWindowMessageFilterEx(hwnd: P0, message: u32, action: WINDOW_MESSAGE_FILTER_ACTION, pchangefilterstruct: Option<*mut CHANGEFILTERSTRUCT>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ChangeWindowMessageFilterEx(hwnd: super::super::Foundation::HWND, message: u32, action: WINDOW_MESSAGE_FILTER_ACTION, pchangefilterstruct: Option<*mut CHANGEFILTERSTRUCT>) -> windows_core::Result<()> { 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(), core::mem::transmute(message), core::mem::transmute(action), core::mem::transmute(pchangefilterstruct.unwrap_or(core::ptr::null_mut()))).ok() + ChangeWindowMessageFilterEx(core::mem::transmute(hwnd), core::mem::transmute(message), core::mem::transmute(action), core::mem::transmute(pchangefilterstruct.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CharLowerA(lpsz: windows_core::PSTR) -> windows_core::PSTR { @@ -285,82 +251,55 @@ pub unsafe fn CharUpperW(lpsz: windows_core::PWSTR) -> windows_core::PWSTR { CharUpperW(core::mem::transmute(lpsz)) } #[inline] -pub unsafe fn CheckMenuItem(hmenu: P0, uidcheckitem: u32, ucheck: u32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn CheckMenuItem(hmenu: HMENU, uidcheckitem: u32, ucheck: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn CheckMenuItem(hmenu : HMENU, uidcheckitem : u32, ucheck : u32) -> u32); - CheckMenuItem(hmenu.param().abi(), core::mem::transmute(uidcheckitem), core::mem::transmute(ucheck)) + CheckMenuItem(core::mem::transmute(hmenu), core::mem::transmute(uidcheckitem), core::mem::transmute(ucheck)) } #[inline] -pub unsafe fn CheckMenuRadioItem(hmenu: P0, first: u32, last: u32, check: u32, flags: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CheckMenuRadioItem(hmenu: HMENU, first: u32, last: u32, check: u32, flags: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CheckMenuRadioItem(hmenu : HMENU, first : u32, last : u32, check : u32, flags : u32) -> super::super::Foundation:: BOOL); - CheckMenuRadioItem(hmenu.param().abi(), core::mem::transmute(first), core::mem::transmute(last), core::mem::transmute(check), core::mem::transmute(flags)).ok() + CheckMenuRadioItem(core::mem::transmute(hmenu), core::mem::transmute(first), core::mem::transmute(last), core::mem::transmute(check), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn ChildWindowFromPoint(hwndparent: P0, point: super::super::Foundation::POINT) -> super::super::Foundation::HWND -where - P0: windows_core::Param, -{ +pub unsafe fn ChildWindowFromPoint(hwndparent: super::super::Foundation::HWND, point: super::super::Foundation::POINT) -> super::super::Foundation::HWND { windows_targets::link!("user32.dll" "system" fn ChildWindowFromPoint(hwndparent : super::super::Foundation:: HWND, point : super::super::Foundation:: POINT) -> super::super::Foundation:: HWND); - ChildWindowFromPoint(hwndparent.param().abi(), core::mem::transmute(point)) + ChildWindowFromPoint(core::mem::transmute(hwndparent), core::mem::transmute(point)) } #[inline] -pub unsafe fn ChildWindowFromPointEx(hwnd: P0, pt: super::super::Foundation::POINT, flags: CWP_FLAGS) -> super::super::Foundation::HWND -where - P0: windows_core::Param, -{ +pub unsafe fn ChildWindowFromPointEx(hwnd: super::super::Foundation::HWND, pt: super::super::Foundation::POINT, flags: CWP_FLAGS) -> super::super::Foundation::HWND { windows_targets::link!("user32.dll" "system" fn ChildWindowFromPointEx(hwnd : super::super::Foundation:: HWND, pt : super::super::Foundation:: POINT, flags : CWP_FLAGS) -> super::super::Foundation:: HWND); - ChildWindowFromPointEx(hwnd.param().abi(), core::mem::transmute(pt), core::mem::transmute(flags)) + ChildWindowFromPointEx(core::mem::transmute(hwnd), core::mem::transmute(pt), core::mem::transmute(flags)) } #[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(core::ptr::null()))).ok() + ClipCursor(core::mem::transmute(lprect.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CloseWindow(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CloseWindow(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CloseWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - CloseWindow(hwnd.param().abi()).ok() + CloseWindow(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn CopyAcceleratorTableA(haccelsrc: P0, lpacceldst: Option<&mut [ACCEL]>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn CopyAcceleratorTableA(haccelsrc: HACCEL, lpacceldst: Option<&mut [ACCEL]>) -> i32 { windows_targets::link!("user32.dll" "system" fn CopyAcceleratorTableA(haccelsrc : HACCEL, lpacceldst : *mut ACCEL, caccelentries : i32) -> i32); - CopyAcceleratorTableA(haccelsrc.param().abi(), core::mem::transmute(lpacceldst.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpacceldst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + CopyAcceleratorTableA(core::mem::transmute(haccelsrc), core::mem::transmute(lpacceldst.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpacceldst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn CopyAcceleratorTableW(haccelsrc: P0, lpacceldst: Option<&mut [ACCEL]>) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn CopyAcceleratorTableW(haccelsrc: HACCEL, lpacceldst: Option<&mut [ACCEL]>) -> i32 { windows_targets::link!("user32.dll" "system" fn CopyAcceleratorTableW(haccelsrc : HACCEL, lpacceldst : *mut ACCEL, caccelentries : i32) -> i32); - CopyAcceleratorTableW(haccelsrc.param().abi(), core::mem::transmute(lpacceldst.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpacceldst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + CopyAcceleratorTableW(core::mem::transmute(haccelsrc), core::mem::transmute(lpacceldst.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpacceldst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn CopyIcon(hicon: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CopyIcon(hicon: HICON) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn CopyIcon(hicon : HICON) -> HICON); - let result__ = CopyIcon(hicon.param().abi()); + let result__ = CopyIcon(core::mem::transmute(hicon)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CopyImage(h: P0, r#type: GDI_IMAGE_TYPE, cx: i32, cy: i32, flags: IMAGE_FLAGS) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CopyImage(h: super::super::Foundation::HANDLE, r#type: GDI_IMAGE_TYPE, cx: i32, cy: i32, flags: IMAGE_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn CopyImage(h : super::super::Foundation:: HANDLE, r#type : GDI_IMAGE_TYPE, cx : i32, cy : i32, flags : IMAGE_FLAGS) -> super::super::Foundation:: HANDLE); - let result__ = CopyImage(h.param().abi(), core::mem::transmute(r#type), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(flags)); + let result__ = CopyImage(core::mem::transmute(h), core::mem::transmute(r#type), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -377,76 +316,50 @@ pub unsafe fn CreateAcceleratorTableW(paccel: &[ACCEL]) -> windows_core::Result< } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn CreateCaret(hwnd: P0, hbitmap: P1, nwidth: i32, nheight: i32) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn CreateCaret(hwnd: super::super::Foundation::HWND, hbitmap: Option, nwidth: i32, nheight: i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn CreateCaret(hwnd : super::super::Foundation:: HWND, hbitmap : super::super::Graphics::Gdi:: HBITMAP, nwidth : i32, nheight : i32) -> super::super::Foundation:: BOOL); - CreateCaret(hwnd.param().abi(), hbitmap.param().abi(), core::mem::transmute(nwidth), core::mem::transmute(nheight)).ok() + CreateCaret(core::mem::transmute(hwnd), core::mem::transmute(hbitmap.unwrap_or(core::mem::zeroed())), core::mem::transmute(nwidth), core::mem::transmute(nheight)).ok() } #[inline] -pub unsafe fn CreateCursor(hinst: P0, xhotspot: i32, yhotspot: i32, nwidth: i32, nheight: i32, pvandplane: *const core::ffi::c_void, pvxorplane: *const core::ffi::c_void) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CreateCursor(hinst: Option, xhotspot: i32, yhotspot: i32, nwidth: i32, nheight: i32, pvandplane: *const core::ffi::c_void, pvxorplane: *const core::ffi::c_void) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn CreateCursor(hinst : super::super::Foundation:: HINSTANCE, xhotspot : i32, yhotspot : i32, nwidth : i32, nheight : i32, pvandplane : *const core::ffi::c_void, pvxorplane : *const core::ffi::c_void) -> HCURSOR); - let result__ = CreateCursor(hinst.param().abi(), core::mem::transmute(xhotspot), core::mem::transmute(yhotspot), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(pvandplane), core::mem::transmute(pvxorplane)); + let result__ = CreateCursor(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), core::mem::transmute(xhotspot), core::mem::transmute(yhotspot), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(pvandplane), core::mem::transmute(pvxorplane)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateDialogIndirectParamA(hinstance: P0, lptemplate: *const DLGTEMPLATE, hwndparent: P2, lpdialogfunc: DLGPROC, dwinitparam: P4) -> windows_core::Result -where - P0: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn CreateDialogIndirectParamA(hinstance: Option, lptemplate: *const DLGTEMPLATE, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn CreateDialogIndirectParamA(hinstance : super::super::Foundation:: HINSTANCE, lptemplate : *const DLGTEMPLATE, hwndparent : super::super::Foundation:: HWND, lpdialogfunc : DLGPROC, dwinitparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: HWND); - let result__ = CreateDialogIndirectParamA(hinstance.param().abi(), core::mem::transmute(lptemplate), hwndparent.param().abi(), core::mem::transmute(lpdialogfunc), dwinitparam.param().abi()); + let result__ = CreateDialogIndirectParamA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptemplate), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinitparam)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateDialogIndirectParamW(hinstance: P0, lptemplate: *const DLGTEMPLATE, hwndparent: P2, lpdialogfunc: DLGPROC, dwinitparam: P4) -> windows_core::Result -where - P0: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn CreateDialogIndirectParamW(hinstance: Option, lptemplate: *const DLGTEMPLATE, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn CreateDialogIndirectParamW(hinstance : super::super::Foundation:: HINSTANCE, lptemplate : *const DLGTEMPLATE, hwndparent : super::super::Foundation:: HWND, lpdialogfunc : DLGPROC, dwinitparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: HWND); - let result__ = CreateDialogIndirectParamW(hinstance.param().abi(), core::mem::transmute(lptemplate), hwndparent.param().abi(), core::mem::transmute(lpdialogfunc), dwinitparam.param().abi()); + let result__ = CreateDialogIndirectParamW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(lptemplate), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinitparam)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateDialogParamA(hinstance: P0, lptemplatename: P1, hwndparent: P2, lpdialogfunc: DLGPROC, dwinitparam: P4) -> windows_core::Result +pub unsafe fn CreateDialogParamA(hinstance: Option, lptemplatename: P1, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateDialogParamA(hinstance : super::super::Foundation:: HINSTANCE, lptemplatename : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, lpdialogfunc : DLGPROC, dwinitparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: HWND); - let result__ = CreateDialogParamA(hinstance.param().abi(), lptemplatename.param().abi(), hwndparent.param().abi(), core::mem::transmute(lpdialogfunc), dwinitparam.param().abi()); + let result__ = CreateDialogParamA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptemplatename.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinitparam)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateDialogParamW(hinstance: P0, lptemplatename: P1, hwndparent: P2, lpdialogfunc: DLGPROC, dwinitparam: P4) -> windows_core::Result +pub unsafe fn CreateDialogParamW(hinstance: Option, lptemplatename: P1, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateDialogParamW(hinstance : super::super::Foundation:: HINSTANCE, lptemplatename : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, lpdialogfunc : DLGPROC, dwinitparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: HWND); - let result__ = CreateDialogParamW(hinstance.param().abi(), lptemplatename.param().abi(), hwndparent.param().abi(), core::mem::transmute(lpdialogfunc), dwinitparam.param().abi()); + let result__ = CreateDialogParamW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptemplatename.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinitparam)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateIcon(hinstance: P0, nwidth: i32, nheight: i32, cplanes: u8, cbitspixel: u8, lpbandbits: *const u8, lpbxorbits: *const u8) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CreateIcon(hinstance: Option, nwidth: i32, nheight: i32, cplanes: u8, cbitspixel: u8, lpbandbits: *const u8, lpbxorbits: *const u8) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn CreateIcon(hinstance : super::super::Foundation:: HINSTANCE, nwidth : i32, nheight : i32, cplanes : u8, cbitspixel : u8, lpbandbits : *const u8, lpbxorbits : *const u8) -> HICON); - let result__ = CreateIcon(hinstance.param().abi(), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(cplanes), core::mem::transmute(cbitspixel), core::mem::transmute(lpbandbits), core::mem::transmute(lpbxorbits)); + let result__ = CreateIcon(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(cplanes), core::mem::transmute(cbitspixel), core::mem::transmute(lpbandbits), core::mem::transmute(lpbxorbits)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -475,29 +388,23 @@ pub unsafe fn CreateIconIndirect(piconinfo: *const ICONINFO) -> windows_core::Re (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateMDIWindowA(lpclassname: P0, lpwindowname: P1, dwstyle: WINDOW_STYLE, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: P7, hinstance: P8, lparam: P9) -> windows_core::Result +pub unsafe fn CreateMDIWindowA(lpclassname: P0, lpwindowname: P1, dwstyle: WINDOW_STYLE, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: Option, hinstance: Option, lparam: super::super::Foundation::LPARAM) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P7: windows_core::Param, - P8: windows_core::Param, - P9: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateMDIWindowA(lpclassname : windows_core::PCSTR, lpwindowname : windows_core::PCSTR, dwstyle : WINDOW_STYLE, x : i32, y : i32, nwidth : i32, nheight : i32, hwndparent : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: HWND); - let result__ = CreateMDIWindowA(lpclassname.param().abi(), lpwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), hwndparent.param().abi(), hinstance.param().abi(), lparam.param().abi()); + let result__ = CreateMDIWindowA(lpclassname.param().abi(), lpwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateMDIWindowW(lpclassname: P0, lpwindowname: P1, dwstyle: WINDOW_STYLE, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: P7, hinstance: P8, lparam: P9) -> windows_core::Result +pub unsafe fn CreateMDIWindowW(lpclassname: P0, lpwindowname: P1, dwstyle: WINDOW_STYLE, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: Option, hinstance: Option, lparam: super::super::Foundation::LPARAM) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P7: windows_core::Param, - P8: windows_core::Param, - P9: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateMDIWindowW(lpclassname : windows_core::PCWSTR, lpwindowname : windows_core::PCWSTR, dwstyle : WINDOW_STYLE, x : i32, y : i32, nwidth : i32, nheight : i32, hwndparent : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: HWND); - let result__ = CreateMDIWindowW(lpclassname.param().abi(), lpwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), hwndparent.param().abi(), hinstance.param().abi(), lparam.param().abi()); + let result__ = CreateMDIWindowW(lpclassname.param().abi(), lpwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -522,147 +429,85 @@ where CreateResourceIndexer(projectroot.param().abi(), extensiondllpath.param().abi(), core::mem::transmute(ppresourceindexer)).ok() } #[inline] -pub unsafe fn CreateWindowExA(dwexstyle: WINDOW_EX_STYLE, lpclassname: P1, lpwindowname: P2, dwstyle: WINDOW_STYLE, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: P8, hmenu: P9, hinstance: P10, lpparam: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn CreateWindowExA(dwexstyle: WINDOW_EX_STYLE, lpclassname: P1, lpwindowname: P2, dwstyle: WINDOW_STYLE, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: Option, hmenu: Option, hinstance: Option, lpparam: Option<*const core::ffi::c_void>) -> windows_core::Result where P1: windows_core::Param, P2: windows_core::Param, - P8: windows_core::Param, - P9: windows_core::Param, - P10: 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(core::mem::transmute(dwexstyle), lpclassname.param().abi(), lpwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), hwndparent.param().abi(), hmenu.param().abi(), hinstance.param().abi(), core::mem::transmute(lpparam.unwrap_or(core::ptr::null()))); + let result__ = CreateWindowExA(core::mem::transmute(dwexstyle), lpclassname.param().abi(), lpwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpparam.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateWindowExW(dwexstyle: WINDOW_EX_STYLE, lpclassname: P1, lpwindowname: P2, dwstyle: WINDOW_STYLE, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: P8, hmenu: P9, hinstance: P10, lpparam: Option<*const core::ffi::c_void>) -> windows_core::Result +pub unsafe fn CreateWindowExW(dwexstyle: WINDOW_EX_STYLE, lpclassname: P1, lpwindowname: P2, dwstyle: WINDOW_STYLE, x: i32, y: i32, nwidth: i32, nheight: i32, hwndparent: Option, hmenu: Option, hinstance: Option, lpparam: Option<*const core::ffi::c_void>) -> windows_core::Result where P1: windows_core::Param, P2: windows_core::Param, - P8: windows_core::Param, - P9: windows_core::Param, - P10: 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(core::mem::transmute(dwexstyle), lpclassname.param().abi(), lpwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), hwndparent.param().abi(), hmenu.param().abi(), hinstance.param().abi(), core::mem::transmute(lpparam.unwrap_or(core::ptr::null()))); + let result__ = CreateWindowExW(core::mem::transmute(dwexstyle), lpclassname.param().abi(), lpwindowname.param().abi(), core::mem::transmute(dwstyle), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmenu.unwrap_or(core::mem::zeroed())), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpparam.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn DefDlgProcA(hdlg: P0, msg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DefDlgProcA(hdlg: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn DefDlgProcA(hdlg : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefDlgProcA(hdlg.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + DefDlgProcA(core::mem::transmute(hdlg), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DefDlgProcW(hdlg: P0, msg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DefDlgProcW(hdlg: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn DefDlgProcW(hdlg : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefDlgProcW(hdlg.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + DefDlgProcW(core::mem::transmute(hdlg), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DefFrameProcA(hwnd: P0, hwndmdiclient: P1, umsg: u32, wparam: P3, lparam: P4) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DefFrameProcA(hwnd: super::super::Foundation::HWND, hwndmdiclient: Option, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn DefFrameProcA(hwnd : super::super::Foundation:: HWND, hwndmdiclient : super::super::Foundation:: HWND, umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefFrameProcA(hwnd.param().abi(), hwndmdiclient.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + DefFrameProcA(core::mem::transmute(hwnd), core::mem::transmute(hwndmdiclient.unwrap_or(core::mem::zeroed())), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DefFrameProcW(hwnd: P0, hwndmdiclient: P1, umsg: u32, wparam: P3, lparam: P4) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DefFrameProcW(hwnd: super::super::Foundation::HWND, hwndmdiclient: Option, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn DefFrameProcW(hwnd : super::super::Foundation:: HWND, hwndmdiclient : super::super::Foundation:: HWND, umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefFrameProcW(hwnd.param().abi(), hwndmdiclient.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + DefFrameProcW(core::mem::transmute(hwnd), core::mem::transmute(hwndmdiclient.unwrap_or(core::mem::zeroed())), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DefMDIChildProcA(hwnd: P0, umsg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DefMDIChildProcA(hwnd: super::super::Foundation::HWND, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn DefMDIChildProcA(hwnd : super::super::Foundation:: HWND, umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefMDIChildProcA(hwnd.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + DefMDIChildProcA(core::mem::transmute(hwnd), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DefMDIChildProcW(hwnd: P0, umsg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DefMDIChildProcW(hwnd: super::super::Foundation::HWND, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn DefMDIChildProcW(hwnd : super::super::Foundation:: HWND, umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefMDIChildProcW(hwnd.param().abi(), core::mem::transmute(umsg), wparam.param().abi(), lparam.param().abi()) + DefMDIChildProcW(core::mem::transmute(hwnd), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DefWindowProcA(hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DefWindowProcA(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn DefWindowProcA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefWindowProcA(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + DefWindowProcA(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DefWindowProcW(hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DefWindowProcW(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn DefWindowProcW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - DefWindowProcW(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + DefWindowProcW(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn DeferWindowPos(hwinposinfo: P0, hwnd: P1, hwndinsertafter: P2, x: i32, y: i32, cx: i32, cy: i32, uflags: SET_WINDOW_POS_FLAGS) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn DeferWindowPos(hwinposinfo: HDWP, hwnd: super::super::Foundation::HWND, hwndinsertafter: Option, x: i32, y: i32, cx: i32, cy: i32, uflags: SET_WINDOW_POS_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn DeferWindowPos(hwinposinfo : HDWP, hwnd : super::super::Foundation:: HWND, hwndinsertafter : super::super::Foundation:: HWND, x : i32, y : i32, cx : i32, cy : i32, uflags : SET_WINDOW_POS_FLAGS) -> HDWP); - let result__ = DeferWindowPos(hwinposinfo.param().abi(), hwnd.param().abi(), hwndinsertafter.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(uflags)); + let result__ = DeferWindowPos(core::mem::transmute(hwinposinfo), core::mem::transmute(hwnd), core::mem::transmute(hwndinsertafter.unwrap_or(core::mem::zeroed())), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(uflags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn DeleteMenu(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DeleteMenu(hmenu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DeleteMenu(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS) -> super::super::Foundation:: BOOL); - DeleteMenu(hmenu.param().abi(), core::mem::transmute(uposition), core::mem::transmute(uflags)).ok() + DeleteMenu(core::mem::transmute(hmenu), core::mem::transmute(uposition), core::mem::transmute(uflags)).ok() } #[inline] -pub unsafe fn DeregisterShellHookWindow(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DeregisterShellHookWindow(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DeregisterShellHookWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - DeregisterShellHookWindow(hwnd.param().abi()) + DeregisterShellHookWindow(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn DestroyAcceleratorTable(haccel: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyAcceleratorTable(haccel: HACCEL) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn DestroyAcceleratorTable(haccel : HACCEL) -> super::super::Foundation:: BOOL); - DestroyAcceleratorTable(haccel.param().abi()) + DestroyAcceleratorTable(core::mem::transmute(haccel)) } #[inline] pub unsafe fn DestroyCaret() -> windows_core::Result<()> { @@ -670,20 +515,14 @@ pub unsafe fn DestroyCaret() -> windows_core::Result<()> { DestroyCaret().ok() } #[inline] -pub unsafe fn DestroyCursor(hcursor: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyCursor(hcursor: HCURSOR) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DestroyCursor(hcursor : HCURSOR) -> super::super::Foundation:: BOOL); - DestroyCursor(hcursor.param().abi()).ok() + DestroyCursor(core::mem::transmute(hcursor)).ok() } #[inline] -pub unsafe fn DestroyIcon(hicon: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyIcon(hicon: HICON) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DestroyIcon(hicon : HICON) -> super::super::Foundation:: BOOL); - DestroyIcon(hicon.param().abi()).ok() + DestroyIcon(core::mem::transmute(hicon)).ok() } #[inline] pub unsafe fn DestroyIndexedResults(resourceuri: P0, qualifiers: Option<&[IndexedResourceQualifier]>) @@ -694,67 +533,45 @@ where DestroyIndexedResults(resourceuri.param().abi(), qualifiers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(qualifiers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] -pub unsafe fn DestroyMenu(hmenu: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyMenu(hmenu: HMENU) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DestroyMenu(hmenu : HMENU) -> super::super::Foundation:: BOOL); - DestroyMenu(hmenu.param().abi()).ok() + DestroyMenu(core::mem::transmute(hmenu)).ok() } #[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(core::ptr::null()))) + DestroyResourceIndexer(core::mem::transmute(resourceindexer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn DestroyWindow(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DestroyWindow(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DestroyWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - DestroyWindow(hwnd.param().abi()).ok() + DestroyWindow(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn DialogBoxIndirectParamA(hinstance: P0, hdialogtemplate: *const DLGTEMPLATE, hwndparent: P2, lpdialogfunc: DLGPROC, dwinitparam: P4) -> isize -where - P0: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DialogBoxIndirectParamA(hinstance: Option, hdialogtemplate: *const DLGTEMPLATE, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> isize { windows_targets::link!("user32.dll" "system" fn DialogBoxIndirectParamA(hinstance : super::super::Foundation:: HINSTANCE, hdialogtemplate : *const DLGTEMPLATE, hwndparent : super::super::Foundation:: HWND, lpdialogfunc : DLGPROC, dwinitparam : super::super::Foundation:: LPARAM) -> isize); - DialogBoxIndirectParamA(hinstance.param().abi(), core::mem::transmute(hdialogtemplate), hwndparent.param().abi(), core::mem::transmute(lpdialogfunc), dwinitparam.param().abi()) + DialogBoxIndirectParamA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(hdialogtemplate), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinitparam)) } #[inline] -pub unsafe fn DialogBoxIndirectParamW(hinstance: P0, hdialogtemplate: *const DLGTEMPLATE, hwndparent: P2, lpdialogfunc: DLGPROC, dwinitparam: P4) -> isize -where - P0: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DialogBoxIndirectParamW(hinstance: Option, hdialogtemplate: *const DLGTEMPLATE, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> isize { windows_targets::link!("user32.dll" "system" fn DialogBoxIndirectParamW(hinstance : super::super::Foundation:: HINSTANCE, hdialogtemplate : *const DLGTEMPLATE, hwndparent : super::super::Foundation:: HWND, lpdialogfunc : DLGPROC, dwinitparam : super::super::Foundation:: LPARAM) -> isize); - DialogBoxIndirectParamW(hinstance.param().abi(), core::mem::transmute(hdialogtemplate), hwndparent.param().abi(), core::mem::transmute(lpdialogfunc), dwinitparam.param().abi()) + DialogBoxIndirectParamW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(hdialogtemplate), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinitparam)) } #[inline] -pub unsafe fn DialogBoxParamA(hinstance: P0, lptemplatename: P1, hwndparent: P2, lpdialogfunc: DLGPROC, dwinitparam: P4) -> isize +pub unsafe fn DialogBoxParamA(hinstance: Option, lptemplatename: P1, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> isize where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn DialogBoxParamA(hinstance : super::super::Foundation:: HINSTANCE, lptemplatename : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, lpdialogfunc : DLGPROC, dwinitparam : super::super::Foundation:: LPARAM) -> isize); - DialogBoxParamA(hinstance.param().abi(), lptemplatename.param().abi(), hwndparent.param().abi(), core::mem::transmute(lpdialogfunc), dwinitparam.param().abi()) + DialogBoxParamA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptemplatename.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinitparam)) } #[inline] -pub unsafe fn DialogBoxParamW(hinstance: P0, lptemplatename: P1, hwndparent: P2, lpdialogfunc: DLGPROC, dwinitparam: P4) -> isize +pub unsafe fn DialogBoxParamW(hinstance: Option, lptemplatename: P1, hwndparent: Option, lpdialogfunc: Option, dwinitparam: super::super::Foundation::LPARAM) -> isize where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn DialogBoxParamW(hinstance : super::super::Foundation:: HINSTANCE, lptemplatename : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, lpdialogfunc : DLGPROC, dwinitparam : super::super::Foundation:: LPARAM) -> isize); - DialogBoxParamW(hinstance.param().abi(), lptemplatename.param().abi(), hwndparent.param().abi(), core::mem::transmute(lpdialogfunc), dwinitparam.param().abi()) + DialogBoxParamW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptemplatename.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdialogfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwinitparam)) } #[inline] pub unsafe fn DisableProcessWindowsGhosting() { @@ -772,67 +589,41 @@ pub unsafe fn DispatchMessageW(lpmsg: *const MSG) -> super::super::Foundation::L DispatchMessageW(core::mem::transmute(lpmsg)) } #[inline] -pub unsafe fn DragObject(hwndparent: P0, hwndfrom: P1, fmt: u32, data: usize, hcur: P4) -> u32 -where - P0: windows_core::Param, - P1: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn DragObject(hwndparent: super::super::Foundation::HWND, hwndfrom: super::super::Foundation::HWND, fmt: u32, data: usize, hcur: Option) -> u32 { windows_targets::link!("user32.dll" "system" fn DragObject(hwndparent : super::super::Foundation:: HWND, hwndfrom : super::super::Foundation:: HWND, fmt : u32, data : usize, hcur : HCURSOR) -> u32); - DragObject(hwndparent.param().abi(), hwndfrom.param().abi(), core::mem::transmute(fmt), core::mem::transmute(data), hcur.param().abi()) + DragObject(core::mem::transmute(hwndparent), core::mem::transmute(hwndfrom), core::mem::transmute(fmt), core::mem::transmute(data), core::mem::transmute(hcur.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawIcon(hdc: P0, x: i32, y: i32, hicon: P3) -> windows_core::Result<()> -where - P0: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn DrawIcon(hdc: super::super::Graphics::Gdi::HDC, x: i32, y: i32, hicon: HICON) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DrawIcon(hdc : super::super::Graphics::Gdi:: HDC, x : i32, y : i32, hicon : HICON) -> super::super::Foundation:: BOOL); - DrawIcon(hdc.param().abi(), core::mem::transmute(x), core::mem::transmute(y), hicon.param().abi()).ok() + DrawIcon(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(hicon)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawIconEx(hdc: P0, xleft: i32, ytop: i32, hicon: P3, cxwidth: i32, cywidth: i32, istepifanicur: u32, hbrflickerfreedraw: P7, diflags: DI_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, - P3: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn DrawIconEx(hdc: super::super::Graphics::Gdi::HDC, xleft: i32, ytop: i32, hicon: HICON, cxwidth: i32, cywidth: i32, istepifanicur: u32, hbrflickerfreedraw: Option, diflags: DI_FLAGS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DrawIconEx(hdc : super::super::Graphics::Gdi:: HDC, xleft : i32, ytop : i32, hicon : HICON, cxwidth : i32, cywidth : i32, istepifanicur : u32, hbrflickerfreedraw : super::super::Graphics::Gdi:: HBRUSH, diflags : DI_FLAGS) -> super::super::Foundation:: BOOL); - DrawIconEx(hdc.param().abi(), core::mem::transmute(xleft), core::mem::transmute(ytop), hicon.param().abi(), core::mem::transmute(cxwidth), core::mem::transmute(cywidth), core::mem::transmute(istepifanicur), hbrflickerfreedraw.param().abi(), core::mem::transmute(diflags)).ok() + DrawIconEx(core::mem::transmute(hdc), core::mem::transmute(xleft), core::mem::transmute(ytop), core::mem::transmute(hicon), core::mem::transmute(cxwidth), core::mem::transmute(cywidth), core::mem::transmute(istepifanicur), core::mem::transmute(hbrflickerfreedraw.unwrap_or(core::mem::zeroed())), core::mem::transmute(diflags)).ok() } #[inline] -pub unsafe fn DrawMenuBar(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DrawMenuBar(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn DrawMenuBar(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - DrawMenuBar(hwnd.param().abi()).ok() + DrawMenuBar(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn EnableMenuItem(hmenu: P0, uidenableitem: u32, uenable: MENU_ITEM_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn EnableMenuItem(hmenu: HMENU, uidenableitem: u32, uenable: MENU_ITEM_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn EnableMenuItem(hmenu : HMENU, uidenableitem : u32, uenable : MENU_ITEM_FLAGS) -> super::super::Foundation:: BOOL); - EnableMenuItem(hmenu.param().abi(), core::mem::transmute(uidenableitem), core::mem::transmute(uenable)) + EnableMenuItem(core::mem::transmute(hmenu), core::mem::transmute(uidenableitem), core::mem::transmute(uenable)) } #[inline] -pub unsafe fn EndDeferWindowPos(hwinposinfo: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EndDeferWindowPos(hwinposinfo: HDWP) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EndDeferWindowPos(hwinposinfo : HDWP) -> super::super::Foundation:: BOOL); - EndDeferWindowPos(hwinposinfo.param().abi()).ok() + EndDeferWindowPos(core::mem::transmute(hwinposinfo)).ok() } #[inline] -pub unsafe fn EndDialog(hdlg: P0, nresult: isize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EndDialog(hdlg: super::super::Foundation::HWND, nresult: isize) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EndDialog(hdlg : super::super::Foundation:: HWND, nresult : isize) -> super::super::Foundation:: BOOL); - EndDialog(hdlg.param().abi(), core::mem::transmute(nresult)).ok() + EndDialog(core::mem::transmute(hdlg), core::mem::transmute(nresult)).ok() } #[inline] pub unsafe fn EndMenu() -> windows_core::Result<()> { @@ -840,63 +631,39 @@ pub unsafe fn EndMenu() -> windows_core::Result<()> { EndMenu().ok() } #[inline] -pub unsafe fn EnumChildWindows(hwndparent: P0, lpenumfunc: WNDENUMPROC, lparam: P2) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EnumChildWindows(hwndparent: Option, lpenumfunc: WNDENUMPROC, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn EnumChildWindows(hwndparent : super::super::Foundation:: HWND, lpenumfunc : WNDENUMPROC, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumChildWindows(hwndparent.param().abi(), core::mem::transmute(lpenumfunc), lparam.param().abi()) + EnumChildWindows(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumPropsA(hwnd: P0, lpenumfunc: PROPENUMPROCA) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn EnumPropsA(hwnd: super::super::Foundation::HWND, lpenumfunc: PROPENUMPROCA) -> i32 { windows_targets::link!("user32.dll" "system" fn EnumPropsA(hwnd : super::super::Foundation:: HWND, lpenumfunc : PROPENUMPROCA) -> i32); - EnumPropsA(hwnd.param().abi(), core::mem::transmute(lpenumfunc)) + EnumPropsA(core::mem::transmute(hwnd), core::mem::transmute(lpenumfunc)) } #[inline] -pub unsafe fn EnumPropsExA(hwnd: P0, lpenumfunc: PROPENUMPROCEXA, lparam: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EnumPropsExA(hwnd: super::super::Foundation::HWND, lpenumfunc: PROPENUMPROCEXA, lparam: super::super::Foundation::LPARAM) -> i32 { windows_targets::link!("user32.dll" "system" fn EnumPropsExA(hwnd : super::super::Foundation:: HWND, lpenumfunc : PROPENUMPROCEXA, lparam : super::super::Foundation:: LPARAM) -> i32); - EnumPropsExA(hwnd.param().abi(), core::mem::transmute(lpenumfunc), lparam.param().abi()) + EnumPropsExA(core::mem::transmute(hwnd), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumPropsExW(hwnd: P0, lpenumfunc: PROPENUMPROCEXW, lparam: P2) -> i32 -where - P0: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn EnumPropsExW(hwnd: super::super::Foundation::HWND, lpenumfunc: PROPENUMPROCEXW, lparam: super::super::Foundation::LPARAM) -> i32 { windows_targets::link!("user32.dll" "system" fn EnumPropsExW(hwnd : super::super::Foundation:: HWND, lpenumfunc : PROPENUMPROCEXW, lparam : super::super::Foundation:: LPARAM) -> i32); - EnumPropsExW(hwnd.param().abi(), core::mem::transmute(lpenumfunc), lparam.param().abi()) + EnumPropsExW(core::mem::transmute(hwnd), core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumPropsW(hwnd: P0, lpenumfunc: PROPENUMPROCW) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn EnumPropsW(hwnd: super::super::Foundation::HWND, lpenumfunc: PROPENUMPROCW) -> i32 { windows_targets::link!("user32.dll" "system" fn EnumPropsW(hwnd : super::super::Foundation:: HWND, lpenumfunc : PROPENUMPROCW) -> i32); - EnumPropsW(hwnd.param().abi(), core::mem::transmute(lpenumfunc)) + EnumPropsW(core::mem::transmute(hwnd), core::mem::transmute(lpenumfunc)) } #[inline] -pub unsafe fn EnumThreadWindows(dwthreadid: u32, lpfn: WNDENUMPROC, lparam: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn EnumThreadWindows(dwthreadid: u32, lpfn: WNDENUMPROC, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn EnumThreadWindows(dwthreadid : u32, lpfn : WNDENUMPROC, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumThreadWindows(core::mem::transmute(dwthreadid), core::mem::transmute(lpfn), lparam.param().abi()) + EnumThreadWindows(core::mem::transmute(dwthreadid), core::mem::transmute(lpfn), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn EnumWindows(lpenumfunc: WNDENUMPROC, lparam: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn EnumWindows(lpenumfunc: WNDENUMPROC, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnumWindows(lpenumfunc : WNDENUMPROC, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumWindows(core::mem::transmute(lpenumfunc), lparam.param().abi()).ok() + EnumWindows(core::mem::transmute(lpenumfunc), core::mem::transmute(lparam)).ok() } #[inline] pub unsafe fn FindWindowA(lpclassname: P0, lpwindowname: P1) -> windows_core::Result @@ -909,27 +676,23 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindWindowExA(hwndparent: P0, hwndchildafter: P1, lpszclass: P2, lpszwindow: P3) -> windows_core::Result +pub unsafe fn FindWindowExA(hwndparent: Option, hwndchildafter: Option, lpszclass: P2, lpszwindow: P3) -> windows_core::Result where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn FindWindowExA(hwndparent : super::super::Foundation:: HWND, hwndchildafter : super::super::Foundation:: HWND, lpszclass : windows_core::PCSTR, lpszwindow : windows_core::PCSTR) -> super::super::Foundation:: HWND); - let result__ = FindWindowExA(hwndparent.param().abi(), hwndchildafter.param().abi(), lpszclass.param().abi(), lpszwindow.param().abi()); + let result__ = FindWindowExA(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwndchildafter.unwrap_or(core::mem::zeroed())), lpszclass.param().abi(), lpszwindow.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindWindowExW(hwndparent: P0, hwndchildafter: P1, lpszclass: P2, lpszwindow: P3) -> windows_core::Result +pub unsafe fn FindWindowExW(hwndparent: Option, hwndchildafter: Option, lpszclass: P2, lpszwindow: P3) -> windows_core::Result where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn FindWindowExW(hwndparent : super::super::Foundation:: HWND, hwndchildafter : super::super::Foundation:: HWND, lpszclass : windows_core::PCWSTR, lpszwindow : windows_core::PCWSTR) -> super::super::Foundation:: HWND); - let result__ = FindWindowExW(hwndparent.param().abi(), hwndchildafter.param().abi(), lpszclass.param().abi(), lpszwindow.param().abi()); + let result__ = FindWindowExW(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwndchildafter.unwrap_or(core::mem::zeroed())), lpszclass.param().abi(), lpszwindow.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -943,13 +706,12 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FlashWindow(hwnd: P0, binvert: P1) -> super::super::Foundation::BOOL +pub unsafe fn FlashWindow(hwnd: super::super::Foundation::HWND, binvert: P1) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn FlashWindow(hwnd : super::super::Foundation:: HWND, binvert : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FlashWindow(hwnd.param().abi(), binvert.param().abi()) + FlashWindow(core::mem::transmute(hwnd), binvert.param().abi()) } #[inline] pub unsafe fn FlashWindowEx(pfwi: *const FLASHWINFO) -> super::super::Foundation::BOOL { @@ -957,28 +719,19 @@ pub unsafe fn FlashWindowEx(pfwi: *const FLASHWINFO) -> super::super::Foundation FlashWindowEx(core::mem::transmute(pfwi)) } #[inline] -pub unsafe fn GetAltTabInfoA(hwnd: P0, iitem: i32, pati: *mut ALTTABINFO, pszitemtext: Option<&mut [u8]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetAltTabInfoA(hwnd: Option, iitem: i32, pati: *mut ALTTABINFO, pszitemtext: Option<&mut [u8]>) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetAltTabInfoA(hwnd : super::super::Foundation:: HWND, iitem : i32, pati : *mut ALTTABINFO, pszitemtext : windows_core::PSTR, cchitemtext : u32) -> super::super::Foundation:: BOOL); - GetAltTabInfoA(hwnd.param().abi(), core::mem::transmute(iitem), core::mem::transmute(pati), core::mem::transmute(pszitemtext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() + GetAltTabInfoA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(iitem), core::mem::transmute(pati), core::mem::transmute(pszitemtext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[inline] -pub unsafe fn GetAltTabInfoW(hwnd: P0, iitem: i32, pati: *mut ALTTABINFO, pszitemtext: Option<&mut [u16]>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetAltTabInfoW(hwnd: Option, iitem: i32, pati: *mut ALTTABINFO, pszitemtext: Option<&mut [u16]>) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetAltTabInfoW(hwnd : super::super::Foundation:: HWND, iitem : i32, pati : *mut ALTTABINFO, pszitemtext : windows_core::PWSTR, cchitemtext : u32) -> super::super::Foundation:: BOOL); - GetAltTabInfoW(hwnd.param().abi(), core::mem::transmute(iitem), core::mem::transmute(pati), core::mem::transmute(pszitemtext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() + GetAltTabInfoW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(iitem), core::mem::transmute(pati), core::mem::transmute(pszitemtext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[inline] -pub unsafe fn GetAncestor(hwnd: P0, gaflags: GET_ANCESTOR_FLAGS) -> super::super::Foundation::HWND -where - P0: windows_core::Param, -{ +pub unsafe fn GetAncestor(hwnd: super::super::Foundation::HWND, gaflags: GET_ANCESTOR_FLAGS) -> super::super::Foundation::HWND { windows_targets::link!("user32.dll" "system" fn GetAncestor(hwnd : super::super::Foundation:: HWND, gaflags : GET_ANCESTOR_FLAGS) -> super::super::Foundation:: HWND); - GetAncestor(hwnd.param().abi(), core::mem::transmute(gaflags)) + GetAncestor(core::mem::transmute(hwnd), core::mem::transmute(gaflags)) } #[inline] pub unsafe fn GetCaretBlinkTime() -> u32 { @@ -992,109 +745,81 @@ pub unsafe fn GetCaretPos(lppoint: *mut super::super::Foundation::POINT) -> wind } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetClassInfoA(hinstance: P0, lpclassname: P1, lpwndclass: *mut WNDCLASSA) -> windows_core::Result<()> +pub unsafe fn GetClassInfoA(hinstance: Option, lpclassname: P1, lpwndclass: *mut WNDCLASSA) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetClassInfoA(hinstance : super::super::Foundation:: HINSTANCE, lpclassname : windows_core::PCSTR, lpwndclass : *mut WNDCLASSA) -> super::super::Foundation:: BOOL); - GetClassInfoA(hinstance.param().abi(), lpclassname.param().abi(), core::mem::transmute(lpwndclass)).ok() + GetClassInfoA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpclassname.param().abi(), core::mem::transmute(lpwndclass)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetClassInfoExA(hinstance: P0, lpszclass: P1, lpwcx: *mut WNDCLASSEXA) -> windows_core::Result<()> +pub unsafe fn GetClassInfoExA(hinstance: Option, lpszclass: P1, lpwcx: *mut WNDCLASSEXA) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetClassInfoExA(hinstance : super::super::Foundation:: HINSTANCE, lpszclass : windows_core::PCSTR, lpwcx : *mut WNDCLASSEXA) -> super::super::Foundation:: BOOL); - GetClassInfoExA(hinstance.param().abi(), lpszclass.param().abi(), core::mem::transmute(lpwcx)).ok() + GetClassInfoExA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpszclass.param().abi(), core::mem::transmute(lpwcx)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetClassInfoExW(hinstance: P0, lpszclass: P1, lpwcx: *mut WNDCLASSEXW) -> windows_core::Result<()> +pub unsafe fn GetClassInfoExW(hinstance: Option, lpszclass: P1, lpwcx: *mut WNDCLASSEXW) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetClassInfoExW(hinstance : super::super::Foundation:: HINSTANCE, lpszclass : windows_core::PCWSTR, lpwcx : *mut WNDCLASSEXW) -> super::super::Foundation:: BOOL); - GetClassInfoExW(hinstance.param().abi(), lpszclass.param().abi(), core::mem::transmute(lpwcx)).ok() + GetClassInfoExW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpszclass.param().abi(), core::mem::transmute(lpwcx)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetClassInfoW(hinstance: P0, lpclassname: P1, lpwndclass: *mut WNDCLASSW) -> windows_core::Result<()> +pub unsafe fn GetClassInfoW(hinstance: Option, lpclassname: P1, lpwndclass: *mut WNDCLASSW) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetClassInfoW(hinstance : super::super::Foundation:: HINSTANCE, lpclassname : windows_core::PCWSTR, lpwndclass : *mut WNDCLASSW) -> super::super::Foundation:: BOOL); - GetClassInfoW(hinstance.param().abi(), lpclassname.param().abi(), core::mem::transmute(lpwndclass)).ok() + GetClassInfoW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpclassname.param().abi(), core::mem::transmute(lpwndclass)).ok() } #[inline] -pub unsafe fn GetClassLongA(hwnd: P0, nindex: GET_CLASS_LONG_INDEX) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClassLongA(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX) -> u32 { windows_targets::link!("user32.dll" "system" fn GetClassLongA(hwnd : super::super::Foundation:: HWND, nindex : GET_CLASS_LONG_INDEX) -> u32); - GetClassLongA(hwnd.param().abi(), core::mem::transmute(nindex)) + GetClassLongA(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn GetClassLongPtrA(hwnd: P0, nindex: GET_CLASS_LONG_INDEX) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn GetClassLongPtrA(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX) -> usize { windows_targets::link!("user32.dll" "system" fn GetClassLongPtrA(hwnd : super::super::Foundation:: HWND, nindex : GET_CLASS_LONG_INDEX) -> usize); - GetClassLongPtrA(hwnd.param().abi(), core::mem::transmute(nindex)) + GetClassLongPtrA(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn GetClassLongPtrW(hwnd: P0, nindex: GET_CLASS_LONG_INDEX) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn GetClassLongPtrW(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX) -> usize { windows_targets::link!("user32.dll" "system" fn GetClassLongPtrW(hwnd : super::super::Foundation:: HWND, nindex : GET_CLASS_LONG_INDEX) -> usize); - GetClassLongPtrW(hwnd.param().abi(), core::mem::transmute(nindex)) + GetClassLongPtrW(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[inline] -pub unsafe fn GetClassLongW(hwnd: P0, nindex: GET_CLASS_LONG_INDEX) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClassLongW(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX) -> u32 { windows_targets::link!("user32.dll" "system" fn GetClassLongW(hwnd : super::super::Foundation:: HWND, nindex : GET_CLASS_LONG_INDEX) -> u32); - GetClassLongW(hwnd.param().abi(), core::mem::transmute(nindex)) + GetClassLongW(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[inline] -pub unsafe fn GetClassNameA(hwnd: P0, lpclassname: &mut [u8]) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClassNameA(hwnd: super::super::Foundation::HWND, lpclassname: &mut [u8]) -> i32 { windows_targets::link!("user32.dll" "system" fn GetClassNameA(hwnd : super::super::Foundation:: HWND, lpclassname : windows_core::PSTR, nmaxcount : i32) -> i32); - GetClassNameA(hwnd.param().abi(), core::mem::transmute(lpclassname.as_ptr()), lpclassname.len().try_into().unwrap()) + GetClassNameA(core::mem::transmute(hwnd), core::mem::transmute(lpclassname.as_ptr()), lpclassname.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetClassNameW(hwnd: P0, lpclassname: &mut [u16]) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClassNameW(hwnd: super::super::Foundation::HWND, lpclassname: &mut [u16]) -> i32 { windows_targets::link!("user32.dll" "system" fn GetClassNameW(hwnd : super::super::Foundation:: HWND, lpclassname : windows_core::PWSTR, nmaxcount : i32) -> i32); - GetClassNameW(hwnd.param().abi(), core::mem::transmute(lpclassname.as_ptr()), lpclassname.len().try_into().unwrap()) + GetClassNameW(core::mem::transmute(hwnd), core::mem::transmute(lpclassname.as_ptr()), lpclassname.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetClassWord(hwnd: P0, nindex: i32) -> u16 -where - P0: windows_core::Param, -{ +pub unsafe fn GetClassWord(hwnd: super::super::Foundation::HWND, nindex: i32) -> u16 { windows_targets::link!("user32.dll" "system" fn GetClassWord(hwnd : super::super::Foundation:: HWND, nindex : i32) -> u16); - GetClassWord(hwnd.param().abi(), core::mem::transmute(nindex)) + GetClassWord(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[inline] -pub unsafe fn GetClientRect(hwnd: P0, lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetClientRect(hwnd: super::super::Foundation::HWND, lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetClientRect(hwnd : super::super::Foundation:: HWND, lprect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - GetClientRect(hwnd.param().abi(), core::mem::transmute(lprect)).ok() + GetClientRect(core::mem::transmute(hwnd), core::mem::transmute(lprect)).ok() } #[inline] pub unsafe fn GetClipCursor(lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { @@ -1127,46 +852,33 @@ pub unsafe fn GetDialogBaseUnits() -> i32 { GetDialogBaseUnits() } #[inline] -pub unsafe fn GetDlgCtrlID(hwnd: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetDlgCtrlID(hwnd: super::super::Foundation::HWND) -> i32 { windows_targets::link!("user32.dll" "system" fn GetDlgCtrlID(hwnd : super::super::Foundation:: HWND) -> i32); - GetDlgCtrlID(hwnd.param().abi()) + GetDlgCtrlID(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetDlgItem(hdlg: P0, niddlgitem: i32) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetDlgItem(hdlg: Option, niddlgitem: i32) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn GetDlgItem(hdlg : super::super::Foundation:: HWND, niddlgitem : i32) -> super::super::Foundation:: HWND); - let result__ = GetDlgItem(hdlg.param().abi(), core::mem::transmute(niddlgitem)); + let result__ = GetDlgItem(core::mem::transmute(hdlg.unwrap_or(core::mem::zeroed())), core::mem::transmute(niddlgitem)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetDlgItemInt(hdlg: P0, niddlgitem: i32, lptranslated: Option<*mut super::super::Foundation::BOOL>, bsigned: P3) -> u32 +pub unsafe fn GetDlgItemInt(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lptranslated: Option<*mut super::super::Foundation::BOOL>, bsigned: P3) -> u32 where - P0: windows_core::Param, P3: 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(), core::mem::transmute(niddlgitem), core::mem::transmute(lptranslated.unwrap_or(core::ptr::null_mut())), bsigned.param().abi()) + GetDlgItemInt(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(lptranslated.unwrap_or(core::mem::zeroed())), bsigned.param().abi()) } #[inline] -pub unsafe fn GetDlgItemTextA(hdlg: P0, niddlgitem: i32, lpstring: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetDlgItemTextA(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lpstring: &mut [u8]) -> u32 { windows_targets::link!("user32.dll" "system" fn GetDlgItemTextA(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lpstring : windows_core::PSTR, cchmax : i32) -> u32); - GetDlgItemTextA(hdlg.param().abi(), core::mem::transmute(niddlgitem), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) + GetDlgItemTextA(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetDlgItemTextW(hdlg: P0, niddlgitem: i32, lpstring: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetDlgItemTextW(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lpstring: &mut [u16]) -> u32 { windows_targets::link!("user32.dll" "system" fn GetDlgItemTextW(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lpstring : windows_core::PWSTR, cchmax : i32) -> u32); - GetDlgItemTextW(hdlg.param().abi(), core::mem::transmute(niddlgitem), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) + GetDlgItemTextW(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[inline] pub unsafe fn GetForegroundWindow() -> super::super::Foundation::HWND { @@ -1180,30 +892,21 @@ pub unsafe fn GetGUIThreadInfo(idthread: u32, pgui: *mut GUITHREADINFO) -> windo } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetIconInfo(hicon: P0, piconinfo: *mut ICONINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetIconInfo(hicon: HICON, piconinfo: *mut ICONINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetIconInfo(hicon : HICON, piconinfo : *mut ICONINFO) -> super::super::Foundation:: BOOL); - GetIconInfo(hicon.param().abi(), core::mem::transmute(piconinfo)).ok() + GetIconInfo(core::mem::transmute(hicon), core::mem::transmute(piconinfo)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetIconInfoExA(hicon: P0, piconinfo: *mut ICONINFOEXA) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetIconInfoExA(hicon: HICON, piconinfo: *mut ICONINFOEXA) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetIconInfoExA(hicon : HICON, piconinfo : *mut ICONINFOEXA) -> super::super::Foundation:: BOOL); - GetIconInfoExA(hicon.param().abi(), core::mem::transmute(piconinfo)) + GetIconInfoExA(core::mem::transmute(hicon), core::mem::transmute(piconinfo)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetIconInfoExW(hicon: P0, piconinfo: *mut ICONINFOEXW) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn GetIconInfoExW(hicon: HICON, piconinfo: *mut ICONINFOEXW) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetIconInfoExW(hicon : HICON, piconinfo : *mut ICONINFOEXW) -> super::super::Foundation:: BOOL); - GetIconInfoExW(hicon.param().abi(), core::mem::transmute(piconinfo)) + GetIconInfoExW(core::mem::transmute(hicon), core::mem::transmute(piconinfo)) } #[inline] pub unsafe fn GetInputState() -> super::super::Foundation::BOOL { @@ -1211,36 +914,24 @@ pub unsafe fn GetInputState() -> super::super::Foundation::BOOL { GetInputState() } #[inline] -pub unsafe fn GetLastActivePopup(hwnd: P0) -> super::super::Foundation::HWND -where - P0: windows_core::Param, -{ +pub unsafe fn GetLastActivePopup(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::HWND { windows_targets::link!("user32.dll" "system" fn GetLastActivePopup(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: HWND); - GetLastActivePopup(hwnd.param().abi()) + GetLastActivePopup(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetLayeredWindowAttributes(hwnd: P0, pcrkey: Option<*mut super::super::Foundation::COLORREF>, pbalpha: Option<*mut u8>, pdwflags: Option<*mut LAYERED_WINDOW_ATTRIBUTES_FLAGS>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetLayeredWindowAttributes(hwnd: super::super::Foundation::HWND, pcrkey: Option<*mut super::super::Foundation::COLORREF>, pbalpha: Option<*mut u8>, pdwflags: Option<*mut LAYERED_WINDOW_ATTRIBUTES_FLAGS>) -> windows_core::Result<()> { 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(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() + GetLayeredWindowAttributes(core::mem::transmute(hwnd), core::mem::transmute(pcrkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbalpha.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwflags.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetMenu(hwnd: P0) -> HMENU -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenu(hwnd: super::super::Foundation::HWND) -> HMENU { windows_targets::link!("user32.dll" "system" fn GetMenu(hwnd : super::super::Foundation:: HWND) -> HMENU); - GetMenu(hwnd.param().abi()) + GetMenu(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetMenuBarInfo(hwnd: P0, idobject: OBJECT_IDENTIFIER, iditem: i32, pmbi: *mut MENUBARINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuBarInfo(hwnd: super::super::Foundation::HWND, idobject: OBJECT_IDENTIFIER, iditem: i32, pmbi: *mut MENUBARINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetMenuBarInfo(hwnd : super::super::Foundation:: HWND, idobject : OBJECT_IDENTIFIER, iditem : i32, pmbi : *mut MENUBARINFO) -> super::super::Foundation:: BOOL); - GetMenuBarInfo(hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(iditem), core::mem::transmute(pmbi)).ok() + GetMenuBarInfo(core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(iditem), core::mem::transmute(pmbi)).ok() } #[inline] pub unsafe fn GetMenuCheckMarkDimensions() -> i32 { @@ -1248,98 +939,68 @@ pub unsafe fn GetMenuCheckMarkDimensions() -> i32 { GetMenuCheckMarkDimensions() } #[inline] -pub unsafe fn GetMenuDefaultItem(hmenu: P0, fbypos: u32, gmdiflags: GET_MENU_DEFAULT_ITEM_FLAGS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuDefaultItem(hmenu: HMENU, fbypos: u32, gmdiflags: GET_MENU_DEFAULT_ITEM_FLAGS) -> u32 { windows_targets::link!("user32.dll" "system" fn GetMenuDefaultItem(hmenu : HMENU, fbypos : u32, gmdiflags : GET_MENU_DEFAULT_ITEM_FLAGS) -> u32); - GetMenuDefaultItem(hmenu.param().abi(), core::mem::transmute(fbypos), core::mem::transmute(gmdiflags)) + GetMenuDefaultItem(core::mem::transmute(hmenu), core::mem::transmute(fbypos), core::mem::transmute(gmdiflags)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetMenuInfo(param0: P0, param1: *mut MENUINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuInfo(param0: HMENU, param1: *mut MENUINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetMenuInfo(param0 : HMENU, param1 : *mut MENUINFO) -> super::super::Foundation:: BOOL); - GetMenuInfo(param0.param().abi(), core::mem::transmute(param1)).ok() + GetMenuInfo(core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[inline] -pub unsafe fn GetMenuItemCount(hmenu: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuItemCount(hmenu: Option) -> i32 { windows_targets::link!("user32.dll" "system" fn GetMenuItemCount(hmenu : HMENU) -> i32); - GetMenuItemCount(hmenu.param().abi()) + GetMenuItemCount(core::mem::transmute(hmenu.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetMenuItemID(hmenu: P0, npos: i32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuItemID(hmenu: HMENU, npos: i32) -> u32 { windows_targets::link!("user32.dll" "system" fn GetMenuItemID(hmenu : HMENU, npos : i32) -> u32); - GetMenuItemID(hmenu.param().abi(), core::mem::transmute(npos)) + GetMenuItemID(core::mem::transmute(hmenu), core::mem::transmute(npos)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetMenuItemInfoA(hmenu: P0, item: u32, fbyposition: P2, lpmii: *mut MENUITEMINFOA) -> windows_core::Result<()> +pub unsafe fn GetMenuItemInfoA(hmenu: HMENU, item: u32, fbyposition: P2, lpmii: *mut MENUITEMINFOA) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetMenuItemInfoA(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmii : *mut MENUITEMINFOA) -> super::super::Foundation:: BOOL); - GetMenuItemInfoA(hmenu.param().abi(), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmii)).ok() + GetMenuItemInfoA(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmii)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetMenuItemInfoW(hmenu: P0, item: u32, fbyposition: P2, lpmii: *mut MENUITEMINFOW) -> windows_core::Result<()> +pub unsafe fn GetMenuItemInfoW(hmenu: HMENU, item: u32, fbyposition: P2, lpmii: *mut MENUITEMINFOW) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetMenuItemInfoW(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmii : *mut MENUITEMINFOW) -> super::super::Foundation:: BOOL); - GetMenuItemInfoW(hmenu.param().abi(), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmii)).ok() + GetMenuItemInfoW(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmii)).ok() } #[inline] -pub unsafe fn GetMenuItemRect(hwnd: P0, hmenu: P1, uitem: u32, lprcitem: *mut super::super::Foundation::RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn GetMenuItemRect(hwnd: Option, hmenu: HMENU, uitem: u32, lprcitem: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetMenuItemRect(hwnd : super::super::Foundation:: HWND, hmenu : HMENU, uitem : u32, lprcitem : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - GetMenuItemRect(hwnd.param().abi(), hmenu.param().abi(), core::mem::transmute(uitem), core::mem::transmute(lprcitem)).ok() + GetMenuItemRect(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmenu), core::mem::transmute(uitem), core::mem::transmute(lprcitem)).ok() } #[inline] -pub unsafe fn GetMenuState(hmenu: P0, uid: u32, uflags: MENU_ITEM_FLAGS) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuState(hmenu: HMENU, uid: u32, uflags: MENU_ITEM_FLAGS) -> u32 { windows_targets::link!("user32.dll" "system" fn GetMenuState(hmenu : HMENU, uid : u32, uflags : MENU_ITEM_FLAGS) -> u32); - GetMenuState(hmenu.param().abi(), core::mem::transmute(uid), core::mem::transmute(uflags)) + GetMenuState(core::mem::transmute(hmenu), core::mem::transmute(uid), core::mem::transmute(uflags)) } #[inline] -pub unsafe fn GetMenuStringA(hmenu: P0, uiditem: u32, lpstring: Option<&mut [u8]>, flags: MENU_ITEM_FLAGS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuStringA(hmenu: HMENU, uiditem: u32, lpstring: Option<&mut [u8]>, flags: MENU_ITEM_FLAGS) -> i32 { windows_targets::link!("user32.dll" "system" fn GetMenuStringA(hmenu : HMENU, uiditem : u32, lpstring : windows_core::PSTR, cchmax : i32, flags : MENU_ITEM_FLAGS) -> i32); - GetMenuStringA(hmenu.param().abi(), core::mem::transmute(uiditem), core::mem::transmute(lpstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) + GetMenuStringA(core::mem::transmute(hmenu), core::mem::transmute(uiditem), core::mem::transmute(lpstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) } #[inline] -pub unsafe fn GetMenuStringW(hmenu: P0, uiditem: u32, lpstring: Option<&mut [u16]>, flags: MENU_ITEM_FLAGS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetMenuStringW(hmenu: HMENU, uiditem: u32, lpstring: Option<&mut [u16]>, flags: MENU_ITEM_FLAGS) -> i32 { windows_targets::link!("user32.dll" "system" fn GetMenuStringW(hmenu : HMENU, uiditem : u32, lpstring : windows_core::PWSTR, cchmax : i32, flags : MENU_ITEM_FLAGS) -> i32); - GetMenuStringW(hmenu.param().abi(), core::mem::transmute(uiditem), core::mem::transmute(lpstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) + GetMenuStringW(core::mem::transmute(hmenu), core::mem::transmute(uiditem), core::mem::transmute(lpstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) } #[inline] -pub unsafe fn GetMessageA(lpmsg: *mut MSG, hwnd: P1, wmsgfiltermin: u32, wmsgfiltermax: u32) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn GetMessageA(lpmsg: *mut MSG, hwnd: Option, wmsgfiltermin: u32, wmsgfiltermax: u32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetMessageA(lpmsg : *mut MSG, hwnd : super::super::Foundation:: HWND, wmsgfiltermin : u32, wmsgfiltermax : u32) -> super::super::Foundation:: BOOL); - GetMessageA(core::mem::transmute(lpmsg), hwnd.param().abi(), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax)) + GetMessageA(core::mem::transmute(lpmsg), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax)) } #[inline] pub unsafe fn GetMessageExtraInfo() -> super::super::Foundation::LPARAM { @@ -1357,42 +1018,32 @@ pub unsafe fn GetMessageTime() -> i32 { GetMessageTime() } #[inline] -pub unsafe fn GetMessageW(lpmsg: *mut MSG, hwnd: P1, wmsgfiltermin: u32, wmsgfiltermax: u32) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn GetMessageW(lpmsg: *mut MSG, hwnd: Option, wmsgfiltermin: u32, wmsgfiltermax: u32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetMessageW(lpmsg : *mut MSG, hwnd : super::super::Foundation:: HWND, wmsgfiltermin : u32, wmsgfiltermax : u32) -> super::super::Foundation:: BOOL); - GetMessageW(core::mem::transmute(lpmsg), hwnd.param().abi(), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax)) + GetMessageW(core::mem::transmute(lpmsg), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax)) } #[inline] -pub unsafe fn GetNextDlgGroupItem(hdlg: P0, hctl: P1, bprevious: P2) -> windows_core::Result +pub unsafe fn GetNextDlgGroupItem(hdlg: super::super::Foundation::HWND, hctl: Option, bprevious: P2) -> windows_core::Result where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetNextDlgGroupItem(hdlg : super::super::Foundation:: HWND, hctl : super::super::Foundation:: HWND, bprevious : super::super::Foundation:: BOOL) -> super::super::Foundation:: HWND); - let result__ = GetNextDlgGroupItem(hdlg.param().abi(), hctl.param().abi(), bprevious.param().abi()); + let result__ = GetNextDlgGroupItem(core::mem::transmute(hdlg), core::mem::transmute(hctl.unwrap_or(core::mem::zeroed())), bprevious.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetNextDlgTabItem(hdlg: P0, hctl: P1, bprevious: P2) -> windows_core::Result +pub unsafe fn GetNextDlgTabItem(hdlg: super::super::Foundation::HWND, hctl: Option, bprevious: P2) -> windows_core::Result where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetNextDlgTabItem(hdlg : super::super::Foundation:: HWND, hctl : super::super::Foundation:: HWND, bprevious : super::super::Foundation:: BOOL) -> super::super::Foundation:: HWND); - let result__ = GetNextDlgTabItem(hdlg.param().abi(), hctl.param().abi(), bprevious.param().abi()); + let result__ = GetNextDlgTabItem(core::mem::transmute(hdlg), core::mem::transmute(hctl.unwrap_or(core::mem::zeroed())), bprevious.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetParent(hwnd: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetParent(hwnd: super::super::Foundation::HWND) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn GetParent(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: HWND); - let result__ = GetParent(hwnd.param().abi()); + let result__ = GetParent(core::mem::transmute(hwnd)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1406,22 +1057,20 @@ pub unsafe fn GetProcessDefaultLayout(pdwdefaultlayout: *mut u32) -> windows_cor GetProcessDefaultLayout(core::mem::transmute(pdwdefaultlayout)).ok() } #[inline] -pub unsafe fn GetPropA(hwnd: P0, lpstring: P1) -> super::super::Foundation::HANDLE +pub unsafe fn GetPropA(hwnd: super::super::Foundation::HWND, lpstring: P1) -> super::super::Foundation::HANDLE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetPropA(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - GetPropA(hwnd.param().abi(), lpstring.param().abi()) + GetPropA(core::mem::transmute(hwnd), lpstring.param().abi()) } #[inline] -pub unsafe fn GetPropW(hwnd: P0, lpstring: P1) -> super::super::Foundation::HANDLE +pub unsafe fn GetPropW(hwnd: super::super::Foundation::HWND, lpstring: P1) -> super::super::Foundation::HANDLE where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetPropW(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - GetPropW(hwnd.param().abi(), lpstring.param().abi()) + GetPropW(core::mem::transmute(hwnd), lpstring.param().abi()) } #[inline] pub unsafe fn GetQueueStatus(flags: QUEUE_STATUS_FLAGS) -> u32 { @@ -1429,36 +1078,24 @@ pub unsafe fn GetQueueStatus(flags: QUEUE_STATUS_FLAGS) -> u32 { GetQueueStatus(core::mem::transmute(flags)) } #[inline] -pub unsafe fn GetScrollBarInfo(hwnd: P0, idobject: OBJECT_IDENTIFIER, psbi: *mut SCROLLBARINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetScrollBarInfo(hwnd: super::super::Foundation::HWND, idobject: OBJECT_IDENTIFIER, psbi: *mut SCROLLBARINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetScrollBarInfo(hwnd : super::super::Foundation:: HWND, idobject : OBJECT_IDENTIFIER, psbi : *mut SCROLLBARINFO) -> super::super::Foundation:: BOOL); - GetScrollBarInfo(hwnd.param().abi(), core::mem::transmute(idobject), core::mem::transmute(psbi)).ok() + GetScrollBarInfo(core::mem::transmute(hwnd), core::mem::transmute(idobject), core::mem::transmute(psbi)).ok() } #[inline] -pub unsafe fn GetScrollInfo(hwnd: P0, nbar: SCROLLBAR_CONSTANTS, lpsi: *mut SCROLLINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetScrollInfo(hwnd: super::super::Foundation::HWND, nbar: SCROLLBAR_CONSTANTS, lpsi: *mut SCROLLINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetScrollInfo(hwnd : super::super::Foundation:: HWND, nbar : SCROLLBAR_CONSTANTS, lpsi : *mut SCROLLINFO) -> super::super::Foundation:: BOOL); - GetScrollInfo(hwnd.param().abi(), core::mem::transmute(nbar), core::mem::transmute(lpsi)).ok() + GetScrollInfo(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(lpsi)).ok() } #[inline] -pub unsafe fn GetScrollPos(hwnd: P0, nbar: SCROLLBAR_CONSTANTS) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetScrollPos(hwnd: super::super::Foundation::HWND, nbar: SCROLLBAR_CONSTANTS) -> i32 { windows_targets::link!("user32.dll" "system" fn GetScrollPos(hwnd : super::super::Foundation:: HWND, nbar : SCROLLBAR_CONSTANTS) -> i32); - GetScrollPos(hwnd.param().abi(), core::mem::transmute(nbar)) + GetScrollPos(core::mem::transmute(hwnd), core::mem::transmute(nbar)) } #[inline] -pub unsafe fn GetScrollRange(hwnd: P0, nbar: SCROLLBAR_CONSTANTS, lpminpos: *mut i32, lpmaxpos: *mut i32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetScrollRange(hwnd: super::super::Foundation::HWND, nbar: SCROLLBAR_CONSTANTS, lpminpos: *mut i32, lpmaxpos: *mut i32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetScrollRange(hwnd : super::super::Foundation:: HWND, nbar : SCROLLBAR_CONSTANTS, lpminpos : *mut i32, lpmaxpos : *mut i32) -> super::super::Foundation:: BOOL); - GetScrollRange(hwnd.param().abi(), core::mem::transmute(nbar), core::mem::transmute(lpminpos), core::mem::transmute(lpmaxpos)).ok() + GetScrollRange(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(lpminpos), core::mem::transmute(lpmaxpos)).ok() } #[inline] pub unsafe fn GetShellWindow() -> super::super::Foundation::HWND { @@ -1466,21 +1103,17 @@ pub unsafe fn GetShellWindow() -> super::super::Foundation::HWND { GetShellWindow() } #[inline] -pub unsafe fn GetSubMenu(hmenu: P0, npos: i32) -> HMENU -where - P0: windows_core::Param, -{ +pub unsafe fn GetSubMenu(hmenu: HMENU, npos: i32) -> HMENU { windows_targets::link!("user32.dll" "system" fn GetSubMenu(hmenu : HMENU, npos : i32) -> HMENU); - GetSubMenu(hmenu.param().abi(), core::mem::transmute(npos)) + GetSubMenu(core::mem::transmute(hmenu), core::mem::transmute(npos)) } #[inline] -pub unsafe fn GetSystemMenu(hwnd: P0, brevert: P1) -> HMENU +pub unsafe fn GetSystemMenu(hwnd: super::super::Foundation::HWND, brevert: P1) -> HMENU where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetSystemMenu(hwnd : super::super::Foundation:: HWND, brevert : super::super::Foundation:: BOOL) -> HMENU); - GetSystemMenu(hwnd.param().abi(), brevert.param().abi()) + GetSystemMenu(core::mem::transmute(hwnd), brevert.param().abi()) } #[inline] pub unsafe fn GetSystemMetrics(nindex: SYSTEM_METRICS_INDEX) -> i32 { @@ -1488,181 +1121,117 @@ pub unsafe fn GetSystemMetrics(nindex: SYSTEM_METRICS_INDEX) -> i32 { GetSystemMetrics(core::mem::transmute(nindex)) } #[inline] -pub unsafe fn GetTitleBarInfo(hwnd: P0, pti: *mut TITLEBARINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetTitleBarInfo(hwnd: super::super::Foundation::HWND, pti: *mut TITLEBARINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetTitleBarInfo(hwnd : super::super::Foundation:: HWND, pti : *mut TITLEBARINFO) -> super::super::Foundation:: BOOL); - GetTitleBarInfo(hwnd.param().abi(), core::mem::transmute(pti)).ok() + GetTitleBarInfo(core::mem::transmute(hwnd), core::mem::transmute(pti)).ok() } #[inline] -pub unsafe fn GetTopWindow(hwnd: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetTopWindow(hwnd: Option) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn GetTopWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: HWND); - let result__ = GetTopWindow(hwnd.param().abi()); + let result__ = GetTopWindow(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetWindow(hwnd: P0, ucmd: GET_WINDOW_CMD) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindow(hwnd: super::super::Foundation::HWND, ucmd: GET_WINDOW_CMD) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn GetWindow(hwnd : super::super::Foundation:: HWND, ucmd : GET_WINDOW_CMD) -> super::super::Foundation:: HWND); - let result__ = GetWindow(hwnd.param().abi(), core::mem::transmute(ucmd)); + let result__ = GetWindow(core::mem::transmute(hwnd), core::mem::transmute(ucmd)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetWindowDisplayAffinity(hwnd: P0, pdwaffinity: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowDisplayAffinity(hwnd: super::super::Foundation::HWND, pdwaffinity: *mut u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetWindowDisplayAffinity(hwnd : super::super::Foundation:: HWND, pdwaffinity : *mut u32) -> super::super::Foundation:: BOOL); - GetWindowDisplayAffinity(hwnd.param().abi(), core::mem::transmute(pdwaffinity)).ok() + GetWindowDisplayAffinity(core::mem::transmute(hwnd), core::mem::transmute(pdwaffinity)).ok() } #[inline] -pub unsafe fn GetWindowInfo(hwnd: P0, pwi: *mut WINDOWINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowInfo(hwnd: super::super::Foundation::HWND, pwi: *mut WINDOWINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetWindowInfo(hwnd : super::super::Foundation:: HWND, pwi : *mut WINDOWINFO) -> super::super::Foundation:: BOOL); - GetWindowInfo(hwnd.param().abi(), core::mem::transmute(pwi)).ok() + GetWindowInfo(core::mem::transmute(hwnd), core::mem::transmute(pwi)).ok() } #[inline] -pub unsafe fn GetWindowLongA(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowLongA(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX) -> i32 { windows_targets::link!("user32.dll" "system" fn GetWindowLongA(hwnd : super::super::Foundation:: HWND, nindex : WINDOW_LONG_PTR_INDEX) -> i32); - GetWindowLongA(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowLongA(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn GetWindowLongPtrA(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowLongPtrA(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX) -> isize { windows_targets::link!("user32.dll" "system" fn GetWindowLongPtrA(hwnd : super::super::Foundation:: HWND, nindex : WINDOW_LONG_PTR_INDEX) -> isize); - GetWindowLongPtrA(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowLongPtrA(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[cfg(target_pointer_width = "32")] pub use GetWindowLongA as GetWindowLongPtrA; #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn GetWindowLongPtrW(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowLongPtrW(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX) -> isize { windows_targets::link!("user32.dll" "system" fn GetWindowLongPtrW(hwnd : super::super::Foundation:: HWND, nindex : WINDOW_LONG_PTR_INDEX) -> isize); - GetWindowLongPtrW(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowLongPtrW(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[cfg(target_pointer_width = "32")] pub use GetWindowLongW as GetWindowLongPtrW; #[inline] -pub unsafe fn GetWindowLongW(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowLongW(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX) -> i32 { windows_targets::link!("user32.dll" "system" fn GetWindowLongW(hwnd : super::super::Foundation:: HWND, nindex : WINDOW_LONG_PTR_INDEX) -> i32); - GetWindowLongW(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowLongW(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[inline] -pub unsafe fn GetWindowModuleFileNameA(hwnd: P0, pszfilename: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowModuleFileNameA(hwnd: super::super::Foundation::HWND, pszfilename: &mut [u8]) -> u32 { windows_targets::link!("user32.dll" "system" fn GetWindowModuleFileNameA(hwnd : super::super::Foundation:: HWND, pszfilename : windows_core::PSTR, cchfilenamemax : u32) -> u32); - GetWindowModuleFileNameA(hwnd.param().abi(), core::mem::transmute(pszfilename.as_ptr()), pszfilename.len().try_into().unwrap()) + GetWindowModuleFileNameA(core::mem::transmute(hwnd), core::mem::transmute(pszfilename.as_ptr()), pszfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetWindowModuleFileNameW(hwnd: P0, pszfilename: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowModuleFileNameW(hwnd: super::super::Foundation::HWND, pszfilename: &mut [u16]) -> u32 { windows_targets::link!("user32.dll" "system" fn GetWindowModuleFileNameW(hwnd : super::super::Foundation:: HWND, pszfilename : windows_core::PWSTR, cchfilenamemax : u32) -> u32); - GetWindowModuleFileNameW(hwnd.param().abi(), core::mem::transmute(pszfilename.as_ptr()), pszfilename.len().try_into().unwrap()) + GetWindowModuleFileNameW(core::mem::transmute(hwnd), core::mem::transmute(pszfilename.as_ptr()), pszfilename.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetWindowPlacement(hwnd: P0, lpwndpl: *mut WINDOWPLACEMENT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowPlacement(hwnd: super::super::Foundation::HWND, lpwndpl: *mut WINDOWPLACEMENT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetWindowPlacement(hwnd : super::super::Foundation:: HWND, lpwndpl : *mut WINDOWPLACEMENT) -> super::super::Foundation:: BOOL); - GetWindowPlacement(hwnd.param().abi(), core::mem::transmute(lpwndpl)).ok() + GetWindowPlacement(core::mem::transmute(hwnd), core::mem::transmute(lpwndpl)).ok() } #[inline] -pub unsafe fn GetWindowRect(hwnd: P0, lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowRect(hwnd: super::super::Foundation::HWND, lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetWindowRect(hwnd : super::super::Foundation:: HWND, lprect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - GetWindowRect(hwnd.param().abi(), core::mem::transmute(lprect)).ok() + GetWindowRect(core::mem::transmute(hwnd), core::mem::transmute(lprect)).ok() } #[inline] -pub unsafe fn GetWindowTextA(hwnd: P0, lpstring: &mut [u8]) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowTextA(hwnd: super::super::Foundation::HWND, lpstring: &mut [u8]) -> i32 { windows_targets::link!("user32.dll" "system" fn GetWindowTextA(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PSTR, nmaxcount : i32) -> i32); - GetWindowTextA(hwnd.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) + GetWindowTextA(core::mem::transmute(hwnd), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetWindowTextLengthA(hwnd: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowTextLengthA(hwnd: super::super::Foundation::HWND) -> i32 { windows_targets::link!("user32.dll" "system" fn GetWindowTextLengthA(hwnd : super::super::Foundation:: HWND) -> i32); - GetWindowTextLengthA(hwnd.param().abi()) + GetWindowTextLengthA(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetWindowTextLengthW(hwnd: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowTextLengthW(hwnd: super::super::Foundation::HWND) -> i32 { windows_targets::link!("user32.dll" "system" fn GetWindowTextLengthW(hwnd : super::super::Foundation:: HWND) -> i32); - GetWindowTextLengthW(hwnd.param().abi()) + GetWindowTextLengthW(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn GetWindowTextW(hwnd: P0, lpstring: &mut [u16]) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowTextW(hwnd: super::super::Foundation::HWND, lpstring: &mut [u16]) -> i32 { windows_targets::link!("user32.dll" "system" fn GetWindowTextW(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PWSTR, nmaxcount : i32) -> i32); - GetWindowTextW(hwnd.param().abi(), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) + GetWindowTextW(core::mem::transmute(hwnd), core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[inline] -pub unsafe fn GetWindowThreadProcessId(hwnd: P0, lpdwprocessid: Option<*mut u32>) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowThreadProcessId(hwnd: super::super::Foundation::HWND, lpdwprocessid: Option<*mut u32>) -> u32 { 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(core::ptr::null_mut()))) + GetWindowThreadProcessId(core::mem::transmute(hwnd), core::mem::transmute(lpdwprocessid.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn GetWindowWord(hwnd: P0, nindex: i32) -> u16 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowWord(hwnd: super::super::Foundation::HWND, nindex: i32) -> u16 { windows_targets::link!("user32.dll" "system" fn GetWindowWord(hwnd : super::super::Foundation:: HWND, nindex : i32) -> u16); - GetWindowWord(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowWord(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[inline] -pub unsafe fn HideCaret(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn HideCaret(hwnd: Option) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn HideCaret(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - HideCaret(hwnd.param().abi()).ok() + HideCaret(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn HiliteMenuItem(hwnd: P0, hmenu: P1, uidhiliteitem: u32, uhilite: u32) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn HiliteMenuItem(hwnd: super::super::Foundation::HWND, hmenu: HMENU, uidhiliteitem: u32, uhilite: u32) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn HiliteMenuItem(hwnd : super::super::Foundation:: HWND, hmenu : HMENU, uidhiliteitem : u32, uhilite : u32) -> super::super::Foundation:: BOOL); - HiliteMenuItem(hwnd.param().abi(), hmenu.param().abi(), core::mem::transmute(uidhiliteitem), core::mem::transmute(uhilite)) + HiliteMenuItem(core::mem::transmute(hwnd), core::mem::transmute(hmenu), core::mem::transmute(uidhiliteitem), core::mem::transmute(uhilite)) } #[inline] pub unsafe fn InSendMessage() -> super::super::Foundation::BOOL { @@ -1672,7 +1241,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(core::ptr::null()))) + InSendMessageEx(core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn IndexFilePath(resourceindexer: *const core::ffi::c_void, filepath: P1, ppresourceuri: *mut windows_core::PWSTR, pqualifiercount: *mut u32, ppqualifiers: *mut *mut IndexedResourceQualifier) -> windows_core::Result<()> @@ -1683,59 +1252,48 @@ where IndexFilePath(core::mem::transmute(resourceindexer), filepath.param().abi(), core::mem::transmute(ppresourceuri), core::mem::transmute(pqualifiercount), core::mem::transmute(ppqualifiers)).ok() } #[inline] -pub unsafe fn InheritWindowMonitor(hwnd: P0, hwndinherit: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn InheritWindowMonitor(hwnd: super::super::Foundation::HWND, hwndinherit: Option) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn InheritWindowMonitor(hwnd : super::super::Foundation:: HWND, hwndinherit : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - InheritWindowMonitor(hwnd.param().abi(), hwndinherit.param().abi()) + InheritWindowMonitor(core::mem::transmute(hwnd), core::mem::transmute(hwndinherit.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InsertMenuA(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> +pub unsafe fn InsertMenuA(hmenu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn InsertMenuA(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - InsertMenuA(hmenu.param().abi(), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() + InsertMenuA(core::mem::transmute(hmenu), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn InsertMenuItemA(hmenu: P0, item: u32, fbyposition: P2, lpmi: *const MENUITEMINFOA) -> windows_core::Result<()> +pub unsafe fn InsertMenuItemA(hmenu: HMENU, item: u32, fbyposition: P2, lpmi: *const MENUITEMINFOA) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn InsertMenuItemA(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmi : *const MENUITEMINFOA) -> super::super::Foundation:: BOOL); - InsertMenuItemA(hmenu.param().abi(), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmi)).ok() + InsertMenuItemA(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmi)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn InsertMenuItemW(hmenu: P0, item: u32, fbyposition: P2, lpmi: *const MENUITEMINFOW) -> windows_core::Result<()> +pub unsafe fn InsertMenuItemW(hmenu: HMENU, item: u32, fbyposition: P2, lpmi: *const MENUITEMINFOW) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn InsertMenuItemW(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmi : *const MENUITEMINFOW) -> super::super::Foundation:: BOOL); - InsertMenuItemW(hmenu.param().abi(), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmi)).ok() + InsertMenuItemW(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmi)).ok() } #[inline] -pub unsafe fn InsertMenuW(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> +pub unsafe fn InsertMenuW(hmenu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn InsertMenuW(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - InsertMenuW(hmenu.param().abi(), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() + InsertMenuW(core::mem::transmute(hmenu), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() } #[inline] -pub unsafe fn InternalGetWindowText(hwnd: P0, pstring: &mut [u16]) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn InternalGetWindowText(hwnd: super::super::Foundation::HWND, pstring: &mut [u16]) -> i32 { windows_targets::link!("user32.dll" "system" fn InternalGetWindowText(hwnd : super::super::Foundation:: HWND, pstring : windows_core::PWSTR, cchmaxcount : i32) -> i32); - InternalGetWindowText(hwnd.param().abi(), core::mem::transmute(pstring.as_ptr()), pstring.len().try_into().unwrap()) + InternalGetWindowText(core::mem::transmute(hwnd), core::mem::transmute(pstring.as_ptr()), pstring.len().try_into().unwrap()) } #[inline] pub unsafe fn IsCharAlphaA(ch: i8) -> windows_core::Result<()> { @@ -1773,29 +1331,19 @@ pub unsafe fn IsCharUpperW(ch: u16) -> windows_core::Result<()> { IsCharUpperW(core::mem::transmute(ch)).ok() } #[inline] -pub unsafe fn IsChild(hwndparent: P0, hwnd: P1) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn IsChild(hwndparent: super::super::Foundation::HWND, hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsChild(hwndparent : super::super::Foundation:: HWND, hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsChild(hwndparent.param().abi(), hwnd.param().abi()) + IsChild(core::mem::transmute(hwndparent), core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn IsDialogMessageA(hdlg: P0, lpmsg: *const MSG) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsDialogMessageA(hdlg: super::super::Foundation::HWND, lpmsg: *const MSG) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsDialogMessageA(hdlg : super::super::Foundation:: HWND, lpmsg : *const MSG) -> super::super::Foundation:: BOOL); - IsDialogMessageA(hdlg.param().abi(), core::mem::transmute(lpmsg)) + IsDialogMessageA(core::mem::transmute(hdlg), core::mem::transmute(lpmsg)) } #[inline] -pub unsafe fn IsDialogMessageW(hdlg: P0, lpmsg: *const MSG) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsDialogMessageW(hdlg: super::super::Foundation::HWND, lpmsg: *const MSG) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsDialogMessageW(hdlg : super::super::Foundation:: HWND, lpmsg : *const MSG) -> super::super::Foundation:: BOOL); - IsDialogMessageW(hdlg.param().abi(), core::mem::transmute(lpmsg)) + IsDialogMessageW(core::mem::transmute(hdlg), core::mem::transmute(lpmsg)) } #[inline] pub unsafe fn IsGUIThread(bconvert: P0) -> super::super::Foundation::BOOL @@ -1806,28 +1354,19 @@ where IsGUIThread(bconvert.param().abi()) } #[inline] -pub unsafe fn IsHungAppWindow(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsHungAppWindow(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsHungAppWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsHungAppWindow(hwnd.param().abi()) + IsHungAppWindow(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn IsIconic(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsIconic(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsIconic(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsIconic(hwnd.param().abi()) + IsIconic(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn IsMenu(hmenu: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsMenu(hmenu: HMENU) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsMenu(hmenu : HMENU) -> super::super::Foundation:: BOOL); - IsMenu(hmenu.param().abi()) + IsMenu(core::mem::transmute(hmenu)) } #[inline] pub unsafe fn IsProcessDPIAware() -> super::super::Foundation::BOOL { @@ -1835,36 +1374,24 @@ pub unsafe fn IsProcessDPIAware() -> super::super::Foundation::BOOL { IsProcessDPIAware() } #[inline] -pub unsafe fn IsWindow(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsWindow(hwnd: Option) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsWindow(hwnd.param().abi()) + IsWindow(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IsWindowArranged(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsWindowArranged(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsWindowArranged(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsWindowArranged(hwnd.param().abi()) + IsWindowArranged(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn IsWindowUnicode(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsWindowUnicode(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsWindowUnicode(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsWindowUnicode(hwnd.param().abi()) + IsWindowUnicode(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn IsWindowVisible(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsWindowVisible(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsWindowVisible(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsWindowVisible(hwnd.param().abi()) + IsWindowVisible(core::mem::transmute(hwnd)) } #[inline] pub unsafe fn IsWow64Message() -> super::super::Foundation::BOOL { @@ -1872,49 +1399,40 @@ pub unsafe fn IsWow64Message() -> super::super::Foundation::BOOL { IsWow64Message() } #[inline] -pub unsafe fn IsZoomed(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsZoomed(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsZoomed(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - IsZoomed(hwnd.param().abi()) + IsZoomed(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn KillTimer(hwnd: P0, uidevent: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn KillTimer(hwnd: Option, uidevent: usize) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn KillTimer(hwnd : super::super::Foundation:: HWND, uidevent : usize) -> super::super::Foundation:: BOOL); - KillTimer(hwnd.param().abi(), core::mem::transmute(uidevent)).ok() + KillTimer(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(uidevent)).ok() } #[inline] -pub unsafe fn LoadAcceleratorsA(hinstance: P0, lptablename: P1) -> windows_core::Result +pub unsafe fn LoadAcceleratorsA(hinstance: Option, lptablename: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadAcceleratorsA(hinstance : super::super::Foundation:: HINSTANCE, lptablename : windows_core::PCSTR) -> HACCEL); - let result__ = LoadAcceleratorsA(hinstance.param().abi(), lptablename.param().abi()); + let result__ = LoadAcceleratorsA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptablename.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadAcceleratorsW(hinstance: P0, lptablename: P1) -> windows_core::Result +pub unsafe fn LoadAcceleratorsW(hinstance: Option, lptablename: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadAcceleratorsW(hinstance : super::super::Foundation:: HINSTANCE, lptablename : windows_core::PCWSTR) -> HACCEL); - let result__ = LoadAcceleratorsW(hinstance.param().abi(), lptablename.param().abi()); + let result__ = LoadAcceleratorsW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lptablename.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadCursorA(hinstance: P0, lpcursorname: P1) -> windows_core::Result +pub unsafe fn LoadCursorA(hinstance: Option, lpcursorname: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadCursorA(hinstance : super::super::Foundation:: HINSTANCE, lpcursorname : windows_core::PCSTR) -> HCURSOR); - let result__ = LoadCursorA(hinstance.param().abi(), lpcursorname.param().abi()); + let result__ = LoadCursorA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpcursorname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1936,63 +1454,57 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadCursorW(hinstance: P0, lpcursorname: P1) -> windows_core::Result +pub unsafe fn LoadCursorW(hinstance: Option, lpcursorname: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadCursorW(hinstance : super::super::Foundation:: HINSTANCE, lpcursorname : windows_core::PCWSTR) -> HCURSOR); - let result__ = LoadCursorW(hinstance.param().abi(), lpcursorname.param().abi()); + let result__ = LoadCursorW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpcursorname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadIconA(hinstance: P0, lpiconname: P1) -> windows_core::Result +pub unsafe fn LoadIconA(hinstance: Option, lpiconname: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadIconA(hinstance : super::super::Foundation:: HINSTANCE, lpiconname : windows_core::PCSTR) -> HICON); - let result__ = LoadIconA(hinstance.param().abi(), lpiconname.param().abi()); + let result__ = LoadIconA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpiconname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadIconW(hinstance: P0, lpiconname: P1) -> windows_core::Result +pub unsafe fn LoadIconW(hinstance: Option, lpiconname: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadIconW(hinstance : super::super::Foundation:: HINSTANCE, lpiconname : windows_core::PCWSTR) -> HICON); - let result__ = LoadIconW(hinstance.param().abi(), lpiconname.param().abi()); + let result__ = LoadIconW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpiconname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadImageA(hinst: P0, name: P1, r#type: GDI_IMAGE_TYPE, cx: i32, cy: i32, fuload: IMAGE_FLAGS) -> windows_core::Result +pub unsafe fn LoadImageA(hinst: Option, name: P1, r#type: GDI_IMAGE_TYPE, cx: i32, cy: i32, fuload: IMAGE_FLAGS) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadImageA(hinst : super::super::Foundation:: HINSTANCE, name : windows_core::PCSTR, r#type : GDI_IMAGE_TYPE, cx : i32, cy : i32, fuload : IMAGE_FLAGS) -> super::super::Foundation:: HANDLE); - let result__ = LoadImageA(hinst.param().abi(), name.param().abi(), core::mem::transmute(r#type), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(fuload)); + let result__ = LoadImageA(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), name.param().abi(), core::mem::transmute(r#type), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(fuload)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadImageW(hinst: P0, name: P1, r#type: GDI_IMAGE_TYPE, cx: i32, cy: i32, fuload: IMAGE_FLAGS) -> windows_core::Result +pub unsafe fn LoadImageW(hinst: Option, name: P1, r#type: GDI_IMAGE_TYPE, cx: i32, cy: i32, fuload: IMAGE_FLAGS) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadImageW(hinst : super::super::Foundation:: HINSTANCE, name : windows_core::PCWSTR, r#type : GDI_IMAGE_TYPE, cx : i32, cy : i32, fuload : IMAGE_FLAGS) -> super::super::Foundation:: HANDLE); - let result__ = LoadImageW(hinst.param().abi(), name.param().abi(), core::mem::transmute(r#type), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(fuload)); + let result__ = LoadImageW(core::mem::transmute(hinst.unwrap_or(core::mem::zeroed())), name.param().abi(), core::mem::transmute(r#type), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(fuload)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadMenuA(hinstance: P0, lpmenuname: P1) -> windows_core::Result +pub unsafe fn LoadMenuA(hinstance: Option, lpmenuname: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadMenuA(hinstance : super::super::Foundation:: HINSTANCE, lpmenuname : windows_core::PCSTR) -> HMENU); - let result__ = LoadMenuA(hinstance.param().abi(), lpmenuname.param().abi()); + let result__ = LoadMenuA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpmenuname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2008,30 +1520,23 @@ pub unsafe fn LoadMenuIndirectW(lpmenutemplate: *const core::ffi::c_void) -> win (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadMenuW(hinstance: P0, lpmenuname: P1) -> windows_core::Result +pub unsafe fn LoadMenuW(hinstance: Option, lpmenuname: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn LoadMenuW(hinstance : super::super::Foundation:: HINSTANCE, lpmenuname : windows_core::PCWSTR) -> HMENU); - let result__ = LoadMenuW(hinstance.param().abi(), lpmenuname.param().abi()); + let result__ = LoadMenuW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), lpmenuname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn LoadStringA(hinstance: P0, uid: u32, lpbuffer: windows_core::PSTR, cchbuffermax: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn LoadStringA(hinstance: Option, uid: u32, lpbuffer: windows_core::PSTR, cchbuffermax: i32) -> i32 { windows_targets::link!("user32.dll" "system" fn LoadStringA(hinstance : super::super::Foundation:: HINSTANCE, uid : u32, lpbuffer : windows_core::PSTR, cchbuffermax : i32) -> i32); - LoadStringA(hinstance.param().abi(), core::mem::transmute(uid), core::mem::transmute(lpbuffer), core::mem::transmute(cchbuffermax)) + LoadStringA(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(uid), core::mem::transmute(lpbuffer), core::mem::transmute(cchbuffermax)) } #[inline] -pub unsafe fn LoadStringW(hinstance: P0, uid: u32, lpbuffer: windows_core::PWSTR, cchbuffermax: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn LoadStringW(hinstance: Option, uid: u32, lpbuffer: windows_core::PWSTR, cchbuffermax: i32) -> i32 { windows_targets::link!("user32.dll" "system" fn LoadStringW(hinstance : super::super::Foundation:: HINSTANCE, uid : u32, lpbuffer : windows_core::PWSTR, cchbuffermax : i32) -> i32); - LoadStringW(hinstance.param().abi(), core::mem::transmute(uid), core::mem::transmute(lpbuffer), core::mem::transmute(cchbuffermax)) + LoadStringW(core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed())), core::mem::transmute(uid), core::mem::transmute(lpbuffer), core::mem::transmute(cchbuffermax)) } #[inline] pub unsafe fn LockSetForegroundWindow(ulockcode: FOREGROUND_WINDOW_LOCK_CODE) -> windows_core::Result<()> { @@ -2039,12 +1544,9 @@ pub unsafe fn LockSetForegroundWindow(ulockcode: FOREGROUND_WINDOW_LOCK_CODE) -> LockSetForegroundWindow(core::mem::transmute(ulockcode)).ok() } #[inline] -pub unsafe fn LogicalToPhysicalPoint(hwnd: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn LogicalToPhysicalPoint(hwnd: super::super::Foundation::HWND, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn LogicalToPhysicalPoint(hwnd : super::super::Foundation:: HWND, lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - LogicalToPhysicalPoint(hwnd.param().abi(), core::mem::transmute(lppoint)) + LogicalToPhysicalPoint(core::mem::transmute(hwnd), core::mem::transmute(lppoint)) } #[inline] pub unsafe fn LookupIconIdFromDirectory(presbits: *const u8, ficon: P1) -> i32 @@ -2063,51 +1565,41 @@ where LookupIconIdFromDirectoryEx(core::mem::transmute(presbits), ficon.param().abi(), core::mem::transmute(cxdesired), core::mem::transmute(cydesired), core::mem::transmute(flags)) } #[inline] -pub unsafe fn MapDialogRect(hdlg: P0, lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MapDialogRect(hdlg: super::super::Foundation::HWND, lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn MapDialogRect(hdlg : super::super::Foundation:: HWND, lprect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - MapDialogRect(hdlg.param().abi(), core::mem::transmute(lprect)).ok() + MapDialogRect(core::mem::transmute(hdlg), core::mem::transmute(lprect)).ok() } #[inline] -pub unsafe fn MenuItemFromPoint(hwnd: P0, hmenu: P1, ptscreen: super::super::Foundation::POINT) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn MenuItemFromPoint(hwnd: Option, hmenu: HMENU, ptscreen: super::super::Foundation::POINT) -> i32 { windows_targets::link!("user32.dll" "system" fn MenuItemFromPoint(hwnd : super::super::Foundation:: HWND, hmenu : HMENU, ptscreen : super::super::Foundation:: POINT) -> i32); - MenuItemFromPoint(hwnd.param().abi(), hmenu.param().abi(), core::mem::transmute(ptscreen)) + MenuItemFromPoint(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(hmenu), core::mem::transmute(ptscreen)) } #[inline] -pub unsafe fn MessageBoxA(hwnd: P0, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE) -> MESSAGEBOX_RESULT +pub unsafe fn MessageBoxA(hwnd: Option, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE) -> MESSAGEBOX_RESULT where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn MessageBoxA(hwnd : super::super::Foundation:: HWND, lptext : windows_core::PCSTR, lpcaption : windows_core::PCSTR, utype : MESSAGEBOX_STYLE) -> MESSAGEBOX_RESULT); - MessageBoxA(hwnd.param().abi(), lptext.param().abi(), lpcaption.param().abi(), core::mem::transmute(utype)) + MessageBoxA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lptext.param().abi(), lpcaption.param().abi(), core::mem::transmute(utype)) } #[inline] -pub unsafe fn MessageBoxExA(hwnd: P0, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE, wlanguageid: u16) -> MESSAGEBOX_RESULT +pub unsafe fn MessageBoxExA(hwnd: Option, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE, wlanguageid: u16) -> MESSAGEBOX_RESULT where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn MessageBoxExA(hwnd : super::super::Foundation:: HWND, lptext : windows_core::PCSTR, lpcaption : windows_core::PCSTR, utype : MESSAGEBOX_STYLE, wlanguageid : u16) -> MESSAGEBOX_RESULT); - MessageBoxExA(hwnd.param().abi(), lptext.param().abi(), lpcaption.param().abi(), core::mem::transmute(utype), core::mem::transmute(wlanguageid)) + MessageBoxExA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lptext.param().abi(), lpcaption.param().abi(), core::mem::transmute(utype), core::mem::transmute(wlanguageid)) } #[inline] -pub unsafe fn MessageBoxExW(hwnd: P0, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE, wlanguageid: u16) -> MESSAGEBOX_RESULT +pub unsafe fn MessageBoxExW(hwnd: Option, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE, wlanguageid: u16) -> MESSAGEBOX_RESULT where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn MessageBoxExW(hwnd : super::super::Foundation:: HWND, lptext : windows_core::PCWSTR, lpcaption : windows_core::PCWSTR, utype : MESSAGEBOX_STYLE, wlanguageid : u16) -> MESSAGEBOX_RESULT); - MessageBoxExW(hwnd.param().abi(), lptext.param().abi(), lpcaption.param().abi(), core::mem::transmute(utype), core::mem::transmute(wlanguageid)) + MessageBoxExW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lptext.param().abi(), lpcaption.param().abi(), core::mem::transmute(utype), core::mem::transmute(wlanguageid)) } #[cfg(feature = "Win32_UI_Shell")] #[inline] @@ -2122,41 +1614,37 @@ pub unsafe fn MessageBoxIndirectW(lpmbp: *const MSGBOXPARAMSW) -> MESSAGEBOX_RES MessageBoxIndirectW(core::mem::transmute(lpmbp)) } #[inline] -pub unsafe fn MessageBoxW(hwnd: P0, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE) -> MESSAGEBOX_RESULT +pub unsafe fn MessageBoxW(hwnd: Option, lptext: P1, lpcaption: P2, utype: MESSAGEBOX_STYLE) -> MESSAGEBOX_RESULT where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn MessageBoxW(hwnd : super::super::Foundation:: HWND, lptext : windows_core::PCWSTR, lpcaption : windows_core::PCWSTR, utype : MESSAGEBOX_STYLE) -> MESSAGEBOX_RESULT); - MessageBoxW(hwnd.param().abi(), lptext.param().abi(), lpcaption.param().abi(), core::mem::transmute(utype)) + MessageBoxW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), lptext.param().abi(), lpcaption.param().abi(), core::mem::transmute(utype)) } #[inline] -pub unsafe fn ModifyMenuA(hmnu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> +pub unsafe fn ModifyMenuA(hmnu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ModifyMenuA(hmnu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - ModifyMenuA(hmnu.param().abi(), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() + ModifyMenuA(core::mem::transmute(hmnu), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() } #[inline] -pub unsafe fn ModifyMenuW(hmnu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> +pub unsafe fn ModifyMenuW(hmnu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> where - P0: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ModifyMenuW(hmnu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - ModifyMenuW(hmnu.param().abi(), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() + ModifyMenuW(core::mem::transmute(hmnu), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() } #[inline] -pub unsafe fn MoveWindow(hwnd: P0, x: i32, y: i32, nwidth: i32, nheight: i32, brepaint: P5) -> windows_core::Result<()> +pub unsafe fn MoveWindow(hwnd: super::super::Foundation::HWND, x: i32, y: i32, nwidth: i32, nheight: i32, brepaint: P5) -> windows_core::Result<()> where - P0: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn MoveWindow(hwnd : super::super::Foundation:: HWND, x : i32, y : i32, nwidth : i32, nheight : i32, brepaint : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - MoveWindow(hwnd.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), brepaint.param().abi()).ok() + MoveWindow(core::mem::transmute(hwnd), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), brepaint.param().abi()).ok() } #[inline] pub unsafe fn MrmCreateConfig(platformversion: MrmPlatformVersion, defaultqualifiers: P1, outputxmlfile: P2) -> windows_core::Result<()> @@ -2393,56 +1881,34 @@ where OemToCharW(psrc.param().abi(), core::mem::transmute(pdst)).ok() } #[inline] -pub unsafe fn OpenIcon(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn OpenIcon(hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn OpenIcon(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - OpenIcon(hwnd.param().abi()).ok() + OpenIcon(core::mem::transmute(hwnd)).ok() } #[inline] -pub unsafe fn PeekMessageA(lpmsg: *mut MSG, hwnd: P1, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: PEEK_MESSAGE_REMOVE_TYPE) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn PeekMessageA(lpmsg: *mut MSG, hwnd: Option, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: PEEK_MESSAGE_REMOVE_TYPE) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn PeekMessageA(lpmsg : *mut MSG, hwnd : super::super::Foundation:: HWND, wmsgfiltermin : u32, wmsgfiltermax : u32, wremovemsg : PEEK_MESSAGE_REMOVE_TYPE) -> super::super::Foundation:: BOOL); - PeekMessageA(core::mem::transmute(lpmsg), hwnd.param().abi(), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(wremovemsg)) + PeekMessageA(core::mem::transmute(lpmsg), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(wremovemsg)) } #[inline] -pub unsafe fn PeekMessageW(lpmsg: *mut MSG, hwnd: P1, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: PEEK_MESSAGE_REMOVE_TYPE) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn PeekMessageW(lpmsg: *mut MSG, hwnd: Option, wmsgfiltermin: u32, wmsgfiltermax: u32, wremovemsg: PEEK_MESSAGE_REMOVE_TYPE) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn PeekMessageW(lpmsg : *mut MSG, hwnd : super::super::Foundation:: HWND, wmsgfiltermin : u32, wmsgfiltermax : u32, wremovemsg : PEEK_MESSAGE_REMOVE_TYPE) -> super::super::Foundation:: BOOL); - PeekMessageW(core::mem::transmute(lpmsg), hwnd.param().abi(), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(wremovemsg)) + PeekMessageW(core::mem::transmute(lpmsg), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(wmsgfiltermin), core::mem::transmute(wmsgfiltermax), core::mem::transmute(wremovemsg)) } #[inline] -pub unsafe fn PhysicalToLogicalPoint(hwnd: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn PhysicalToLogicalPoint(hwnd: super::super::Foundation::HWND, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn PhysicalToLogicalPoint(hwnd : super::super::Foundation:: HWND, lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - PhysicalToLogicalPoint(hwnd.param().abi(), core::mem::transmute(lppoint)) + PhysicalToLogicalPoint(core::mem::transmute(hwnd), core::mem::transmute(lppoint)) } #[inline] -pub unsafe fn PostMessageA(hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn PostMessageA(hwnd: Option, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn PostMessageA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - PostMessageA(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + PostMessageA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn PostMessageW(hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn PostMessageW(hwnd: Option, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn PostMessageW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - PostMessageW(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + PostMessageW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } #[inline] pub unsafe fn PostQuitMessage(nexitcode: i32) { @@ -2450,56 +1916,39 @@ pub unsafe fn PostQuitMessage(nexitcode: i32) { PostQuitMessage(core::mem::transmute(nexitcode)) } #[inline] -pub unsafe fn PostThreadMessageA(idthread: u32, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn PostThreadMessageA(idthread: u32, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn PostThreadMessageA(idthread : u32, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - PostThreadMessageA(core::mem::transmute(idthread), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + PostThreadMessageA(core::mem::transmute(idthread), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn PostThreadMessageW(idthread: u32, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn PostThreadMessageW(idthread: u32, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn PostThreadMessageW(idthread : u32, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - PostThreadMessageW(core::mem::transmute(idthread), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + PostThreadMessageW(core::mem::transmute(idthread), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } #[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()), core::mem::transmute(niconindex), core::mem::transmute(cxicon), core::mem::transmute(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()), core::mem::transmute(flags)) + PrivateExtractIconsA(core::mem::transmute(szfilename.as_ptr()), core::mem::transmute(niconindex), core::mem::transmute(cxicon), core::mem::transmute(cyicon), core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(piconid.unwrap_or(core::mem::zeroed())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(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()), core::mem::transmute(niconindex), core::mem::transmute(cxicon), core::mem::transmute(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()), core::mem::transmute(flags)) + PrivateExtractIconsW(core::mem::transmute(szfilename.as_ptr()), core::mem::transmute(niconindex), core::mem::transmute(cxicon), core::mem::transmute(cyicon), core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(piconid.unwrap_or(core::mem::zeroed())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(flags)) } #[inline] -pub unsafe fn RealChildWindowFromPoint(hwndparent: P0, ptparentclientcoords: super::super::Foundation::POINT) -> super::super::Foundation::HWND -where - P0: windows_core::Param, -{ +pub unsafe fn RealChildWindowFromPoint(hwndparent: super::super::Foundation::HWND, ptparentclientcoords: super::super::Foundation::POINT) -> super::super::Foundation::HWND { windows_targets::link!("user32.dll" "system" fn RealChildWindowFromPoint(hwndparent : super::super::Foundation:: HWND, ptparentclientcoords : super::super::Foundation:: POINT) -> super::super::Foundation:: HWND); - RealChildWindowFromPoint(hwndparent.param().abi(), core::mem::transmute(ptparentclientcoords)) + RealChildWindowFromPoint(core::mem::transmute(hwndparent), core::mem::transmute(ptparentclientcoords)) } #[inline] -pub unsafe fn RealGetWindowClassA(hwnd: P0, ptszclassname: &mut [u8]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RealGetWindowClassA(hwnd: super::super::Foundation::HWND, ptszclassname: &mut [u8]) -> u32 { windows_targets::link!("user32.dll" "system" fn RealGetWindowClassA(hwnd : super::super::Foundation:: HWND, ptszclassname : windows_core::PSTR, cchclassnamemax : u32) -> u32); - RealGetWindowClassA(hwnd.param().abi(), core::mem::transmute(ptszclassname.as_ptr()), ptszclassname.len().try_into().unwrap()) + RealGetWindowClassA(core::mem::transmute(hwnd), core::mem::transmute(ptszclassname.as_ptr()), ptszclassname.len().try_into().unwrap()) } #[inline] -pub unsafe fn RealGetWindowClassW(hwnd: P0, ptszclassname: &mut [u16]) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn RealGetWindowClassW(hwnd: super::super::Foundation::HWND, ptszclassname: &mut [u16]) -> u32 { windows_targets::link!("user32.dll" "system" fn RealGetWindowClassW(hwnd : super::super::Foundation:: HWND, ptszclassname : windows_core::PWSTR, cchclassnamemax : u32) -> u32); - RealGetWindowClassW(hwnd.param().abi(), core::mem::transmute(ptszclassname.as_ptr()), ptszclassname.len().try_into().unwrap()) + RealGetWindowClassW(core::mem::transmute(hwnd), core::mem::transmute(ptszclassname.as_ptr()), ptszclassname.len().try_into().unwrap()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2526,38 +1975,26 @@ pub unsafe fn RegisterClassW(lpwndclass: *const WNDCLASSW) -> u16 { RegisterClassW(core::mem::transmute(lpwndclass)) } #[inline] -pub unsafe fn RegisterDeviceNotificationA(hrecipient: P0, notificationfilter: *const core::ffi::c_void, flags: REGISTER_NOTIFICATION_FLAGS) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterDeviceNotificationA(hrecipient: super::super::Foundation::HANDLE, notificationfilter: *const core::ffi::c_void, flags: REGISTER_NOTIFICATION_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn RegisterDeviceNotificationA(hrecipient : super::super::Foundation:: HANDLE, notificationfilter : *const core::ffi::c_void, flags : REGISTER_NOTIFICATION_FLAGS) -> HDEVNOTIFY); - let result__ = RegisterDeviceNotificationA(hrecipient.param().abi(), core::mem::transmute(notificationfilter), core::mem::transmute(flags)); + let result__ = RegisterDeviceNotificationA(core::mem::transmute(hrecipient), core::mem::transmute(notificationfilter), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn RegisterDeviceNotificationW(hrecipient: P0, notificationfilter: *const core::ffi::c_void, flags: REGISTER_NOTIFICATION_FLAGS) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterDeviceNotificationW(hrecipient: super::super::Foundation::HANDLE, notificationfilter: *const core::ffi::c_void, flags: REGISTER_NOTIFICATION_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn RegisterDeviceNotificationW(hrecipient : super::super::Foundation:: HANDLE, notificationfilter : *const core::ffi::c_void, flags : REGISTER_NOTIFICATION_FLAGS) -> HDEVNOTIFY); - let result__ = RegisterDeviceNotificationW(hrecipient.param().abi(), core::mem::transmute(notificationfilter), core::mem::transmute(flags)); + let result__ = RegisterDeviceNotificationW(core::mem::transmute(hrecipient), core::mem::transmute(notificationfilter), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn RegisterForTooltipDismissNotification(hwnd: P0, tdflags: TOOLTIP_DISMISS_FLAGS) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterForTooltipDismissNotification(hwnd: super::super::Foundation::HWND, tdflags: TOOLTIP_DISMISS_FLAGS) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn RegisterForTooltipDismissNotification(hwnd : super::super::Foundation:: HWND, tdflags : TOOLTIP_DISMISS_FLAGS) -> super::super::Foundation:: BOOL); - RegisterForTooltipDismissNotification(hwnd.param().abi(), core::mem::transmute(tdflags)) + RegisterForTooltipDismissNotification(core::mem::transmute(hwnd), core::mem::transmute(tdflags)) } #[inline] -pub unsafe fn RegisterShellHookWindow(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn RegisterShellHookWindow(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn RegisterShellHookWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - RegisterShellHookWindow(hwnd.param().abi()) + RegisterShellHookWindow(core::mem::transmute(hwnd)) } #[inline] pub unsafe fn RegisterWindowMessageA(lpstring: P0) -> u32 @@ -2576,176 +2013,104 @@ where RegisterWindowMessageW(lpstring.param().abi()) } #[inline] -pub unsafe fn RemoveMenu(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RemoveMenu(hmenu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn RemoveMenu(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS) -> super::super::Foundation:: BOOL); - RemoveMenu(hmenu.param().abi(), core::mem::transmute(uposition), core::mem::transmute(uflags)).ok() + RemoveMenu(core::mem::transmute(hmenu), core::mem::transmute(uposition), core::mem::transmute(uflags)).ok() } #[inline] -pub unsafe fn RemovePropA(hwnd: P0, lpstring: P1) -> windows_core::Result +pub unsafe fn RemovePropA(hwnd: super::super::Foundation::HWND, lpstring: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn RemovePropA(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = RemovePropA(hwnd.param().abi(), lpstring.param().abi()); + let result__ = RemovePropA(core::mem::transmute(hwnd), lpstring.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn RemovePropW(hwnd: P0, lpstring: P1) -> windows_core::Result +pub unsafe fn RemovePropW(hwnd: super::super::Foundation::HWND, lpstring: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn RemovePropW(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = RemovePropW(hwnd.param().abi(), lpstring.param().abi()); + let result__ = RemovePropW(core::mem::transmute(hwnd), lpstring.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn ReplyMessage(lresult: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ReplyMessage(lresult: super::super::Foundation::LRESULT) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn ReplyMessage(lresult : super::super::Foundation:: LRESULT) -> super::super::Foundation:: BOOL); - ReplyMessage(lresult.param().abi()) + ReplyMessage(core::mem::transmute(lresult)) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScrollDC(hdc: P0, dx: i32, dy: i32, lprcscroll: Option<*const super::super::Foundation::RECT>, lprcclip: Option<*const super::super::Foundation::RECT>, hrgnupdate: P5, lprcupdate: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn ScrollDC(hdc: super::super::Graphics::Gdi::HDC, dx: i32, dy: i32, lprcscroll: Option<*const super::super::Foundation::RECT>, lprcclip: Option<*const super::super::Foundation::RECT>, hrgnupdate: Option, lprcupdate: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> { 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(), core::mem::transmute(dx), core::mem::transmute(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() + ScrollDC(core::mem::transmute(hdc), core::mem::transmute(dx), core::mem::transmute(dy), core::mem::transmute(lprcscroll.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprcclip.unwrap_or(core::mem::zeroed())), core::mem::transmute(hrgnupdate.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprcupdate.unwrap_or(core::mem::zeroed()))).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<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ScrollWindow(hwnd: super::super::Foundation::HWND, xamount: i32, yamount: i32, lprect: Option<*const super::super::Foundation::RECT>, lpcliprect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { 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(), core::mem::transmute(xamount), core::mem::transmute(yamount), core::mem::transmute(lprect.unwrap_or(core::ptr::null())), core::mem::transmute(lpcliprect.unwrap_or(core::ptr::null()))).ok() + ScrollWindow(core::mem::transmute(hwnd), core::mem::transmute(xamount), core::mem::transmute(yamount), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcliprect.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScrollWindowEx(hwnd: P0, dx: i32, dy: i32, prcscroll: Option<*const super::super::Foundation::RECT>, prcclip: Option<*const super::super::Foundation::RECT>, hrgnupdate: P5, prcupdate: Option<*mut super::super::Foundation::RECT>, flags: SCROLL_WINDOW_FLAGS) -> i32 -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn ScrollWindowEx(hwnd: super::super::Foundation::HWND, dx: i32, dy: i32, prcscroll: Option<*const super::super::Foundation::RECT>, prcclip: Option<*const super::super::Foundation::RECT>, hrgnupdate: Option, prcupdate: Option<*mut super::super::Foundation::RECT>, flags: SCROLL_WINDOW_FLAGS) -> i32 { 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(), core::mem::transmute(dx), core::mem::transmute(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())), core::mem::transmute(flags)) + ScrollWindowEx(core::mem::transmute(hwnd), core::mem::transmute(dx), core::mem::transmute(dy), core::mem::transmute(prcscroll.unwrap_or(core::mem::zeroed())), core::mem::transmute(prcclip.unwrap_or(core::mem::zeroed())), core::mem::transmute(hrgnupdate.unwrap_or(core::mem::zeroed())), core::mem::transmute(prcupdate.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags)) } #[inline] -pub unsafe fn SendDlgItemMessageA(hdlg: P0, niddlgitem: i32, msg: u32, wparam: P3, lparam: P4) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn SendDlgItemMessageA(hdlg: super::super::Foundation::HWND, niddlgitem: i32, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn SendDlgItemMessageA(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SendDlgItemMessageA(hdlg.param().abi(), core::mem::transmute(niddlgitem), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + SendDlgItemMessageA(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn SendDlgItemMessageW(hdlg: P0, niddlgitem: i32, msg: u32, wparam: P3, lparam: P4) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn SendDlgItemMessageW(hdlg: super::super::Foundation::HWND, niddlgitem: i32, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn SendDlgItemMessageW(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SendDlgItemMessageW(hdlg.param().abi(), core::mem::transmute(niddlgitem), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + SendDlgItemMessageW(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn SendMessageA(hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SendMessageA(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn SendMessageA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SendMessageA(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + SendMessageA(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)) } #[inline] -pub unsafe fn SendMessageCallbackA(hwnd: P0, msg: u32, wparam: P2, lparam: P3, lpresultcallback: SENDASYNCPROC, dwdata: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SendMessageCallbackA(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, lpresultcallback: SENDASYNCPROC, dwdata: usize) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SendMessageCallbackA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, lpresultcallback : SENDASYNCPROC, dwdata : usize) -> super::super::Foundation:: BOOL); - SendMessageCallbackA(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(lpresultcallback), core::mem::transmute(dwdata)).ok() + SendMessageCallbackA(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(lpresultcallback), core::mem::transmute(dwdata)).ok() } #[inline] -pub unsafe fn SendMessageCallbackW(hwnd: P0, msg: u32, wparam: P2, lparam: P3, lpresultcallback: SENDASYNCPROC, dwdata: usize) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SendMessageCallbackW(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, lpresultcallback: SENDASYNCPROC, dwdata: usize) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SendMessageCallbackW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, lpresultcallback : SENDASYNCPROC, dwdata : usize) -> super::super::Foundation:: BOOL); - SendMessageCallbackW(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(lpresultcallback), core::mem::transmute(dwdata)).ok() + SendMessageCallbackW(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(lpresultcallback), core::mem::transmute(dwdata)).ok() } #[inline] -pub unsafe fn SendMessageTimeoutA(hwnd: P0, msg: u32, wparam: P2, lparam: P3, fuflags: SEND_MESSAGE_TIMEOUT_FLAGS, utimeout: u32, lpdwresult: Option<*mut usize>) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe 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: Option<*mut usize>) -> super::super::Foundation::LRESULT { 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(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(fuflags), core::mem::transmute(utimeout), core::mem::transmute(lpdwresult.unwrap_or(core::ptr::null_mut()))) + SendMessageTimeoutA(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(fuflags), core::mem::transmute(utimeout), core::mem::transmute(lpdwresult.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SendMessageTimeoutW(hwnd: P0, msg: u32, wparam: P2, lparam: P3, fuflags: SEND_MESSAGE_TIMEOUT_FLAGS, utimeout: u32, lpdwresult: Option<*mut usize>) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe 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: Option<*mut usize>) -> super::super::Foundation::LRESULT { 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(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), core::mem::transmute(fuflags), core::mem::transmute(utimeout), core::mem::transmute(lpdwresult.unwrap_or(core::ptr::null_mut()))) + SendMessageTimeoutW(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(fuflags), core::mem::transmute(utimeout), core::mem::transmute(lpdwresult.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SendMessageW(hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> super::super::Foundation::LRESULT -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SendMessageW(hwnd: super::super::Foundation::HWND, msg: u32, wparam: Option, lparam: Option) -> super::super::Foundation::LRESULT { windows_targets::link!("user32.dll" "system" fn SendMessageW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LRESULT); - SendMessageW(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()) + SendMessageW(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SendNotifyMessageA(hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SendNotifyMessageA(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SendNotifyMessageA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - SendNotifyMessageA(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + SendNotifyMessageA(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn SendNotifyMessageW(hwnd: P0, msg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> -where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SendNotifyMessageW(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SendNotifyMessageW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - SendNotifyMessageW(hwnd.param().abi(), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi()).ok() + SendNotifyMessageW(core::mem::transmute(hwnd), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } #[inline] -pub unsafe fn SetAdditionalForegroundBoostProcesses(toplevelwindow: P0, processhandlearray: &[super::super::Foundation::HANDLE]) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetAdditionalForegroundBoostProcesses(toplevelwindow: super::super::Foundation::HWND, processhandlearray: &[super::super::Foundation::HANDLE]) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn SetAdditionalForegroundBoostProcesses(toplevelwindow : super::super::Foundation:: HWND, processhandlecount : u32, processhandlearray : *const super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetAdditionalForegroundBoostProcesses(toplevelwindow.param().abi(), processhandlearray.len().try_into().unwrap(), core::mem::transmute(processhandlearray.as_ptr())) + SetAdditionalForegroundBoostProcesses(core::mem::transmute(toplevelwindow), processhandlearray.len().try_into().unwrap(), core::mem::transmute(processhandlearray.as_ptr())) } #[inline] pub unsafe fn SetCaretBlinkTime(umseconds: u32) -> windows_core::Result<()> { @@ -2758,62 +2123,41 @@ pub unsafe fn SetCaretPos(x: i32, y: i32) -> windows_core::Result<()> { SetCaretPos(core::mem::transmute(x), core::mem::transmute(y)).ok() } #[inline] -pub unsafe fn SetClassLongA(hwnd: P0, nindex: GET_CLASS_LONG_INDEX, dwnewlong: i32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetClassLongA(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX, dwnewlong: i32) -> u32 { windows_targets::link!("user32.dll" "system" fn SetClassLongA(hwnd : super::super::Foundation:: HWND, nindex : GET_CLASS_LONG_INDEX, dwnewlong : i32) -> u32); - SetClassLongA(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) + SetClassLongA(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn SetClassLongPtrA(hwnd: P0, nindex: GET_CLASS_LONG_INDEX, dwnewlong: isize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn SetClassLongPtrA(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX, dwnewlong: isize) -> usize { windows_targets::link!("user32.dll" "system" fn SetClassLongPtrA(hwnd : super::super::Foundation:: HWND, nindex : GET_CLASS_LONG_INDEX, dwnewlong : isize) -> usize); - SetClassLongPtrA(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) + SetClassLongPtrA(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn SetClassLongPtrW(hwnd: P0, nindex: GET_CLASS_LONG_INDEX, dwnewlong: isize) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn SetClassLongPtrW(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX, dwnewlong: isize) -> usize { windows_targets::link!("user32.dll" "system" fn SetClassLongPtrW(hwnd : super::super::Foundation:: HWND, nindex : GET_CLASS_LONG_INDEX, dwnewlong : isize) -> usize); - SetClassLongPtrW(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) + SetClassLongPtrW(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) } #[inline] -pub unsafe fn SetClassLongW(hwnd: P0, nindex: GET_CLASS_LONG_INDEX, dwnewlong: i32) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetClassLongW(hwnd: super::super::Foundation::HWND, nindex: GET_CLASS_LONG_INDEX, dwnewlong: i32) -> u32 { windows_targets::link!("user32.dll" "system" fn SetClassLongW(hwnd : super::super::Foundation:: HWND, nindex : GET_CLASS_LONG_INDEX, dwnewlong : i32) -> u32); - SetClassLongW(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) + SetClassLongW(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) } #[inline] -pub unsafe fn SetClassWord(hwnd: P0, nindex: i32, wnewword: u16) -> u16 -where - P0: windows_core::Param, -{ +pub unsafe fn SetClassWord(hwnd: super::super::Foundation::HWND, nindex: i32, wnewword: u16) -> u16 { windows_targets::link!("user32.dll" "system" fn SetClassWord(hwnd : super::super::Foundation:: HWND, nindex : i32, wnewword : u16) -> u16); - SetClassWord(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(wnewword)) + SetClassWord(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(wnewword)) } #[inline] -pub unsafe fn SetCoalescableTimer(hwnd: P0, nidevent: usize, uelapse: u32, lptimerfunc: TIMERPROC, utolerancedelay: u32) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn SetCoalescableTimer(hwnd: Option, nidevent: usize, uelapse: u32, lptimerfunc: Option, utolerancedelay: u32) -> usize { windows_targets::link!("user32.dll" "system" fn SetCoalescableTimer(hwnd : super::super::Foundation:: HWND, nidevent : usize, uelapse : u32, lptimerfunc : TIMERPROC, utolerancedelay : u32) -> usize); - SetCoalescableTimer(hwnd.param().abi(), core::mem::transmute(nidevent), core::mem::transmute(uelapse), core::mem::transmute(lptimerfunc), core::mem::transmute(utolerancedelay)) + SetCoalescableTimer(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(nidevent), core::mem::transmute(uelapse), core::mem::transmute(lptimerfunc.unwrap_or(core::mem::zeroed())), core::mem::transmute(utolerancedelay)) } #[inline] -pub unsafe fn SetCursor(hcursor: P0) -> HCURSOR -where - P0: windows_core::Param, -{ +pub unsafe fn SetCursor(hcursor: Option) -> HCURSOR { windows_targets::link!("user32.dll" "system" fn SetCursor(hcursor : HCURSOR) -> HCURSOR); - SetCursor(hcursor.param().abi()) + SetCursor(core::mem::transmute(hcursor.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SetCursorPos(x: i32, y: i32) -> windows_core::Result<()> { @@ -2826,113 +2170,83 @@ pub unsafe fn SetDebugErrorLevel(dwlevel: u32) { SetDebugErrorLevel(core::mem::transmute(dwlevel)) } #[inline] -pub unsafe fn SetDlgItemInt(hdlg: P0, niddlgitem: i32, uvalue: u32, bsigned: P3) -> windows_core::Result<()> +pub unsafe fn SetDlgItemInt(hdlg: super::super::Foundation::HWND, niddlgitem: i32, uvalue: u32, bsigned: P3) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetDlgItemInt(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, uvalue : u32, bsigned : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetDlgItemInt(hdlg.param().abi(), core::mem::transmute(niddlgitem), core::mem::transmute(uvalue), bsigned.param().abi()).ok() + SetDlgItemInt(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(uvalue), bsigned.param().abi()).ok() } #[inline] -pub unsafe fn SetDlgItemTextA(hdlg: P0, niddlgitem: i32, lpstring: P2) -> windows_core::Result<()> +pub unsafe fn SetDlgItemTextA(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lpstring: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetDlgItemTextA(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lpstring : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetDlgItemTextA(hdlg.param().abi(), core::mem::transmute(niddlgitem), lpstring.param().abi()).ok() + SetDlgItemTextA(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), lpstring.param().abi()).ok() } #[inline] -pub unsafe fn SetDlgItemTextW(hdlg: P0, niddlgitem: i32, lpstring: P2) -> windows_core::Result<()> +pub unsafe fn SetDlgItemTextW(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lpstring: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetDlgItemTextW(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lpstring : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetDlgItemTextW(hdlg.param().abi(), core::mem::transmute(niddlgitem), lpstring.param().abi()).ok() + SetDlgItemTextW(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), lpstring.param().abi()).ok() } #[inline] -pub unsafe fn SetForegroundWindow(hwnd: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetForegroundWindow(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn SetForegroundWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - SetForegroundWindow(hwnd.param().abi()) + SetForegroundWindow(core::mem::transmute(hwnd)) } #[inline] -pub unsafe fn SetLayeredWindowAttributes(hwnd: P0, crkey: P1, balpha: u8, dwflags: LAYERED_WINDOW_ATTRIBUTES_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetLayeredWindowAttributes(hwnd: super::super::Foundation::HWND, crkey: super::super::Foundation::COLORREF, balpha: u8, dwflags: LAYERED_WINDOW_ATTRIBUTES_FLAGS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetLayeredWindowAttributes(hwnd : super::super::Foundation:: HWND, crkey : super::super::Foundation:: COLORREF, balpha : u8, dwflags : LAYERED_WINDOW_ATTRIBUTES_FLAGS) -> super::super::Foundation:: BOOL); - SetLayeredWindowAttributes(hwnd.param().abi(), crkey.param().abi(), core::mem::transmute(balpha), core::mem::transmute(dwflags)).ok() + SetLayeredWindowAttributes(core::mem::transmute(hwnd), core::mem::transmute(crkey), core::mem::transmute(balpha), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn SetMenu(hwnd: P0, hmenu: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetMenu(hwnd: super::super::Foundation::HWND, hmenu: Option) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetMenu(hwnd : super::super::Foundation:: HWND, hmenu : HMENU) -> super::super::Foundation:: BOOL); - SetMenu(hwnd.param().abi(), hmenu.param().abi()).ok() + SetMenu(core::mem::transmute(hwnd), core::mem::transmute(hmenu.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetMenuDefaultItem(hmenu: P0, uitem: u32, fbypos: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetMenuDefaultItem(hmenu: HMENU, uitem: u32, fbypos: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetMenuDefaultItem(hmenu : HMENU, uitem : u32, fbypos : u32) -> super::super::Foundation:: BOOL); - SetMenuDefaultItem(hmenu.param().abi(), core::mem::transmute(uitem), core::mem::transmute(fbypos)).ok() + SetMenuDefaultItem(core::mem::transmute(hmenu), core::mem::transmute(uitem), core::mem::transmute(fbypos)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetMenuInfo(param0: P0, param1: *const MENUINFO) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetMenuInfo(param0: HMENU, param1: *const MENUINFO) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetMenuInfo(param0 : HMENU, param1 : *const MENUINFO) -> super::super::Foundation:: BOOL); - SetMenuInfo(param0.param().abi(), core::mem::transmute(param1)).ok() + SetMenuInfo(core::mem::transmute(param0), core::mem::transmute(param1)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetMenuItemBitmaps(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, hbitmapunchecked: P3, hbitmapchecked: P4) -> windows_core::Result<()> -where - P0: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn SetMenuItemBitmaps(hmenu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS, hbitmapunchecked: Option, hbitmapchecked: Option) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetMenuItemBitmaps(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, hbitmapunchecked : super::super::Graphics::Gdi:: HBITMAP, hbitmapchecked : super::super::Graphics::Gdi:: HBITMAP) -> super::super::Foundation:: BOOL); - SetMenuItemBitmaps(hmenu.param().abi(), core::mem::transmute(uposition), core::mem::transmute(uflags), hbitmapunchecked.param().abi(), hbitmapchecked.param().abi()).ok() + SetMenuItemBitmaps(core::mem::transmute(hmenu), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(hbitmapunchecked.unwrap_or(core::mem::zeroed())), core::mem::transmute(hbitmapchecked.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetMenuItemInfoA(hmenu: P0, item: u32, fbypositon: P2, lpmii: *const MENUITEMINFOA) -> windows_core::Result<()> +pub unsafe fn SetMenuItemInfoA(hmenu: HMENU, item: u32, fbypositon: P2, lpmii: *const MENUITEMINFOA) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetMenuItemInfoA(hmenu : HMENU, item : u32, fbypositon : super::super::Foundation:: BOOL, lpmii : *const MENUITEMINFOA) -> super::super::Foundation:: BOOL); - SetMenuItemInfoA(hmenu.param().abi(), core::mem::transmute(item), fbypositon.param().abi(), core::mem::transmute(lpmii)).ok() + SetMenuItemInfoA(core::mem::transmute(hmenu), core::mem::transmute(item), fbypositon.param().abi(), core::mem::transmute(lpmii)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetMenuItemInfoW(hmenu: P0, item: u32, fbypositon: P2, lpmii: *const MENUITEMINFOW) -> windows_core::Result<()> +pub unsafe fn SetMenuItemInfoW(hmenu: HMENU, item: u32, fbypositon: P2, lpmii: *const MENUITEMINFOW) -> windows_core::Result<()> where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetMenuItemInfoW(hmenu : HMENU, item : u32, fbypositon : super::super::Foundation:: BOOL, lpmii : *const MENUITEMINFOW) -> super::super::Foundation:: BOOL); - SetMenuItemInfoW(hmenu.param().abi(), core::mem::transmute(item), fbypositon.param().abi(), core::mem::transmute(lpmii)).ok() + SetMenuItemInfoW(core::mem::transmute(hmenu), core::mem::transmute(item), fbypositon.param().abi(), core::mem::transmute(lpmii)).ok() } #[inline] -pub unsafe fn SetMessageExtraInfo(lparam: P0) -> super::super::Foundation::LPARAM -where - P0: windows_core::Param, -{ +pub unsafe fn SetMessageExtraInfo(lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LPARAM { windows_targets::link!("user32.dll" "system" fn SetMessageExtraInfo(lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: LPARAM); - SetMessageExtraInfo(lparam.param().abi()) + SetMessageExtraInfo(core::mem::transmute(lparam)) } #[inline] pub unsafe fn SetMessageQueue(cmessagesmax: i32) -> super::super::Foundation::BOOL { @@ -2940,13 +2254,9 @@ pub unsafe fn SetMessageQueue(cmessagesmax: i32) -> super::super::Foundation::BO SetMessageQueue(core::mem::transmute(cmessagesmax)) } #[inline] -pub unsafe fn SetParent(hwndchild: P0, hwndnewparent: P1) -> windows_core::Result -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetParent(hwndchild: super::super::Foundation::HWND, hwndnewparent: Option) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn SetParent(hwndchild : super::super::Foundation:: HWND, hwndnewparent : super::super::Foundation:: HWND) -> super::super::Foundation:: HWND); - let result__ = SetParent(hwndchild.param().abi(), hwndnewparent.param().abi()); + let result__ = SetParent(core::mem::transmute(hwndchild), core::mem::transmute(hwndnewparent.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2965,129 +2275,92 @@ pub unsafe fn SetProcessDefaultLayout(dwdefaultlayout: u32) -> windows_core::Res SetProcessDefaultLayout(core::mem::transmute(dwdefaultlayout)).ok() } #[inline] -pub unsafe fn SetPropA(hwnd: P0, lpstring: P1, hdata: P2) -> windows_core::Result<()> +pub unsafe fn SetPropA(hwnd: super::super::Foundation::HWND, lpstring: P1, hdata: Option) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetPropA(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PCSTR, hdata : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetPropA(hwnd.param().abi(), lpstring.param().abi(), hdata.param().abi()).ok() + SetPropA(core::mem::transmute(hwnd), lpstring.param().abi(), core::mem::transmute(hdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetPropW(hwnd: P0, lpstring: P1, hdata: P2) -> windows_core::Result<()> +pub unsafe fn SetPropW(hwnd: super::super::Foundation::HWND, lpstring: P1, hdata: Option) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetPropW(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PCWSTR, hdata : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetPropW(hwnd.param().abi(), lpstring.param().abi(), hdata.param().abi()).ok() + SetPropW(core::mem::transmute(hwnd), lpstring.param().abi(), core::mem::transmute(hdata.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetSystemCursor(hcur: P0, id: SYSTEM_CURSOR_ID) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetSystemCursor(hcur: HCURSOR, id: SYSTEM_CURSOR_ID) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetSystemCursor(hcur : HCURSOR, id : SYSTEM_CURSOR_ID) -> super::super::Foundation:: BOOL); - SetSystemCursor(hcur.param().abi(), core::mem::transmute(id)).ok() + SetSystemCursor(core::mem::transmute(hcur), core::mem::transmute(id)).ok() } #[inline] -pub unsafe fn SetTimer(hwnd: P0, nidevent: usize, uelapse: u32, lptimerfunc: TIMERPROC) -> usize -where - P0: windows_core::Param, -{ +pub unsafe fn SetTimer(hwnd: Option, nidevent: usize, uelapse: u32, lptimerfunc: Option) -> usize { windows_targets::link!("user32.dll" "system" fn SetTimer(hwnd : super::super::Foundation:: HWND, nidevent : usize, uelapse : u32, lptimerfunc : TIMERPROC) -> usize); - SetTimer(hwnd.param().abi(), core::mem::transmute(nidevent), core::mem::transmute(uelapse), core::mem::transmute(lptimerfunc)) + SetTimer(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(nidevent), core::mem::transmute(uelapse), core::mem::transmute(lptimerfunc.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetWindowDisplayAffinity(hwnd: P0, dwaffinity: WINDOW_DISPLAY_AFFINITY) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowDisplayAffinity(hwnd: super::super::Foundation::HWND, dwaffinity: WINDOW_DISPLAY_AFFINITY) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetWindowDisplayAffinity(hwnd : super::super::Foundation:: HWND, dwaffinity : WINDOW_DISPLAY_AFFINITY) -> super::super::Foundation:: BOOL); - SetWindowDisplayAffinity(hwnd.param().abi(), core::mem::transmute(dwaffinity)).ok() + SetWindowDisplayAffinity(core::mem::transmute(hwnd), core::mem::transmute(dwaffinity)).ok() } #[inline] -pub unsafe fn SetWindowLongA(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowLongA(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32 { windows_targets::link!("user32.dll" "system" fn SetWindowLongA(hwnd : super::super::Foundation:: HWND, nindex : WINDOW_LONG_PTR_INDEX, dwnewlong : i32) -> i32); - SetWindowLongA(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) + SetWindowLongA(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn SetWindowLongPtrA(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: isize) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowLongPtrA(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: isize) -> isize { windows_targets::link!("user32.dll" "system" fn SetWindowLongPtrA(hwnd : super::super::Foundation:: HWND, nindex : WINDOW_LONG_PTR_INDEX, dwnewlong : isize) -> isize); - SetWindowLongPtrA(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) + SetWindowLongPtrA(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) } #[cfg(target_pointer_width = "32")] pub use SetWindowLongA as SetWindowLongPtrA; #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn SetWindowLongPtrW(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: isize) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowLongPtrW(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: isize) -> isize { windows_targets::link!("user32.dll" "system" fn SetWindowLongPtrW(hwnd : super::super::Foundation:: HWND, nindex : WINDOW_LONG_PTR_INDEX, dwnewlong : isize) -> isize); - SetWindowLongPtrW(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) + SetWindowLongPtrW(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) } #[cfg(target_pointer_width = "32")] pub use SetWindowLongW as SetWindowLongPtrW; #[inline] -pub unsafe fn SetWindowLongW(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowLongW(hwnd: super::super::Foundation::HWND, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32 { windows_targets::link!("user32.dll" "system" fn SetWindowLongW(hwnd : super::super::Foundation:: HWND, nindex : WINDOW_LONG_PTR_INDEX, dwnewlong : i32) -> i32); - SetWindowLongW(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) + SetWindowLongW(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong)) } #[inline] -pub unsafe fn SetWindowPlacement(hwnd: P0, lpwndpl: *const WINDOWPLACEMENT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowPlacement(hwnd: super::super::Foundation::HWND, lpwndpl: *const WINDOWPLACEMENT) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetWindowPlacement(hwnd : super::super::Foundation:: HWND, lpwndpl : *const WINDOWPLACEMENT) -> super::super::Foundation:: BOOL); - SetWindowPlacement(hwnd.param().abi(), core::mem::transmute(lpwndpl)).ok() + SetWindowPlacement(core::mem::transmute(hwnd), core::mem::transmute(lpwndpl)).ok() } #[inline] -pub unsafe fn SetWindowPos(hwnd: P0, hwndinsertafter: P1, x: i32, y: i32, cx: i32, cy: i32, uflags: SET_WINDOW_POS_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetWindowPos(hwnd: super::super::Foundation::HWND, hwndinsertafter: Option, x: i32, y: i32, cx: i32, cy: i32, uflags: SET_WINDOW_POS_FLAGS) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetWindowPos(hwnd : super::super::Foundation:: HWND, hwndinsertafter : super::super::Foundation:: HWND, x : i32, y : i32, cx : i32, cy : i32, uflags : SET_WINDOW_POS_FLAGS) -> super::super::Foundation:: BOOL); - SetWindowPos(hwnd.param().abi(), hwndinsertafter.param().abi(), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(uflags)).ok() + SetWindowPos(core::mem::transmute(hwnd), core::mem::transmute(hwndinsertafter.unwrap_or(core::mem::zeroed())), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(cx), core::mem::transmute(cy), core::mem::transmute(uflags)).ok() } #[inline] -pub unsafe fn SetWindowTextA(hwnd: P0, lpstring: P1) -> windows_core::Result<()> +pub unsafe fn SetWindowTextA(hwnd: super::super::Foundation::HWND, lpstring: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetWindowTextA(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetWindowTextA(hwnd.param().abi(), lpstring.param().abi()).ok() + SetWindowTextA(core::mem::transmute(hwnd), lpstring.param().abi()).ok() } #[inline] -pub unsafe fn SetWindowTextW(hwnd: P0, lpstring: P1) -> windows_core::Result<()> +pub unsafe fn SetWindowTextW(hwnd: super::super::Foundation::HWND, lpstring: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetWindowTextW(hwnd : super::super::Foundation:: HWND, lpstring : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetWindowTextW(hwnd.param().abi(), lpstring.param().abi()).ok() + SetWindowTextW(core::mem::transmute(hwnd), lpstring.param().abi()).ok() } #[inline] -pub unsafe fn SetWindowWord(hwnd: P0, nindex: i32, wnewword: u16) -> u16 -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowWord(hwnd: super::super::Foundation::HWND, nindex: i32, wnewword: u16) -> u16 { windows_targets::link!("user32.dll" "system" fn SetWindowWord(hwnd : super::super::Foundation:: HWND, nindex : i32, wnewword : u16) -> u16); - SetWindowWord(hwnd.param().abi(), core::mem::transmute(nindex), core::mem::transmute(wnewword)) + SetWindowWord(core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(wnewword)) } #[inline] pub unsafe fn SetWindowsHookA(nfiltertype: i32, pfnfilterproc: HOOKPROC) -> HHOOK { @@ -3095,21 +2368,15 @@ pub unsafe fn SetWindowsHookA(nfiltertype: i32, pfnfilterproc: HOOKPROC) -> HHOO SetWindowsHookA(core::mem::transmute(nfiltertype), core::mem::transmute(pfnfilterproc)) } #[inline] -pub unsafe fn SetWindowsHookExA(idhook: WINDOWS_HOOK_ID, lpfn: HOOKPROC, hmod: P2, dwthreadid: u32) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn SetWindowsHookExA(idhook: WINDOWS_HOOK_ID, lpfn: HOOKPROC, hmod: Option, dwthreadid: u32) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn SetWindowsHookExA(idhook : WINDOWS_HOOK_ID, lpfn : HOOKPROC, hmod : super::super::Foundation:: HINSTANCE, dwthreadid : u32) -> HHOOK); - let result__ = SetWindowsHookExA(core::mem::transmute(idhook), core::mem::transmute(lpfn), hmod.param().abi(), core::mem::transmute(dwthreadid)); + let result__ = SetWindowsHookExA(core::mem::transmute(idhook), core::mem::transmute(lpfn), core::mem::transmute(hmod.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwthreadid)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetWindowsHookExW(idhook: WINDOWS_HOOK_ID, lpfn: HOOKPROC, hmod: P2, dwthreadid: u32) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn SetWindowsHookExW(idhook: WINDOWS_HOOK_ID, lpfn: HOOKPROC, hmod: Option, dwthreadid: u32) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn SetWindowsHookExW(idhook : WINDOWS_HOOK_ID, lpfn : HOOKPROC, hmod : super::super::Foundation:: HINSTANCE, dwthreadid : u32) -> HHOOK); - let result__ = SetWindowsHookExW(core::mem::transmute(idhook), core::mem::transmute(lpfn), hmod.param().abi(), core::mem::transmute(dwthreadid)); + let result__ = SetWindowsHookExW(core::mem::transmute(idhook), core::mem::transmute(lpfn), core::mem::transmute(hmod.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwthreadid)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -3118,12 +2385,9 @@ pub unsafe fn SetWindowsHookW(nfiltertype: i32, pfnfilterproc: HOOKPROC) -> HHOO SetWindowsHookW(core::mem::transmute(nfiltertype), core::mem::transmute(pfnfilterproc)) } #[inline] -pub unsafe fn ShowCaret(hwnd: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ShowCaret(hwnd: Option) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn ShowCaret(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ShowCaret(hwnd.param().abi()).ok() + ShowCaret(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ShowCursor(bshow: P0) -> i32 @@ -3134,29 +2398,22 @@ where ShowCursor(bshow.param().abi()) } #[inline] -pub unsafe fn ShowOwnedPopups(hwnd: P0, fshow: P1) -> windows_core::Result<()> +pub unsafe fn ShowOwnedPopups(hwnd: super::super::Foundation::HWND, fshow: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ShowOwnedPopups(hwnd : super::super::Foundation:: HWND, fshow : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ShowOwnedPopups(hwnd.param().abi(), fshow.param().abi()).ok() + ShowOwnedPopups(core::mem::transmute(hwnd), fshow.param().abi()).ok() } #[inline] -pub unsafe fn ShowWindow(hwnd: P0, ncmdshow: SHOW_WINDOW_CMD) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ShowWindow(hwnd: super::super::Foundation::HWND, ncmdshow: SHOW_WINDOW_CMD) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn ShowWindow(hwnd : super::super::Foundation:: HWND, ncmdshow : SHOW_WINDOW_CMD) -> super::super::Foundation:: BOOL); - ShowWindow(hwnd.param().abi(), core::mem::transmute(ncmdshow)) + ShowWindow(core::mem::transmute(hwnd), core::mem::transmute(ncmdshow)) } #[inline] -pub unsafe fn ShowWindowAsync(hwnd: P0, ncmdshow: SHOW_WINDOW_CMD) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ShowWindowAsync(hwnd: super::super::Foundation::HWND, ncmdshow: SHOW_WINDOW_CMD) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn ShowWindowAsync(hwnd : super::super::Foundation:: HWND, ncmdshow : SHOW_WINDOW_CMD) -> super::super::Foundation:: BOOL); - ShowWindowAsync(hwnd.param().abi(), core::mem::transmute(ncmdshow)) + ShowWindowAsync(core::mem::transmute(hwnd), core::mem::transmute(ncmdshow)) } #[inline] pub unsafe fn SoundSentry() -> super::super::Foundation::BOOL { @@ -3164,75 +2421,52 @@ pub unsafe fn SoundSentry() -> super::super::Foundation::BOOL { SoundSentry() } #[inline] -pub unsafe fn SwitchToThisWindow(hwnd: P0, funknown: P1) +pub unsafe fn SwitchToThisWindow(hwnd: super::super::Foundation::HWND, funknown: P1) where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SwitchToThisWindow(hwnd : super::super::Foundation:: HWND, funknown : super::super::Foundation:: BOOL)); - SwitchToThisWindow(hwnd.param().abi(), funknown.param().abi()) + SwitchToThisWindow(core::mem::transmute(hwnd), funknown.param().abi()) } #[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(core::mem::transmute(uiaction), core::mem::transmute(uiparam), core::mem::transmute(pvparam.unwrap_or(core::ptr::null_mut())), core::mem::transmute(fwinini)).ok() + SystemParametersInfoA(core::mem::transmute(uiaction), core::mem::transmute(uiparam), core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(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(core::mem::transmute(uiaction), core::mem::transmute(uiparam), core::mem::transmute(pvparam.unwrap_or(core::ptr::null_mut())), core::mem::transmute(fwinini)).ok() + SystemParametersInfoW(core::mem::transmute(uiaction), core::mem::transmute(uiparam), core::mem::transmute(pvparam.unwrap_or(core::mem::zeroed())), core::mem::transmute(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 -where - P0: windows_core::Param, -{ +pub unsafe fn TileWindows(hwndparent: Option, whow: TILE_WINDOWS_HOW, lprect: Option<*const super::super::Foundation::RECT>, lpkids: Option<&[super::super::Foundation::HWND]>) -> u16 { 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(), core::mem::transmute(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()))) + TileWindows(core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(whow), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), 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: P5, prcrect: Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn TrackPopupMenu(hmenu: HMENU, uflags: TRACK_POPUP_MENU_FLAGS, x: i32, y: i32, nreserved: Option, hwnd: super::super::Foundation::HWND, prcrect: Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(uflags), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nreserved), hwnd.param().abi(), core::mem::transmute(prcrect.unwrap_or(core::ptr::null()))) + TrackPopupMenu(core::mem::transmute(hmenu), core::mem::transmute(uflags), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(hwnd), core::mem::transmute(prcrect.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn TrackPopupMenuEx(hmenu: P0, uflags: u32, x: i32, y: i32, hwnd: P4, lptpm: Option<*const TPMPARAMS>) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn TrackPopupMenuEx(hmenu: HMENU, uflags: u32, x: i32, y: i32, hwnd: super::super::Foundation::HWND, lptpm: Option<*const TPMPARAMS>) -> super::super::Foundation::BOOL { 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(), core::mem::transmute(uflags), core::mem::transmute(x), core::mem::transmute(y), hwnd.param().abi(), core::mem::transmute(lptpm.unwrap_or(core::ptr::null()))) + TrackPopupMenuEx(core::mem::transmute(hmenu), core::mem::transmute(uflags), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(hwnd), core::mem::transmute(lptpm.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn TranslateAcceleratorA(hwnd: P0, hacctable: P1, lpmsg: *const MSG) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn TranslateAcceleratorA(hwnd: super::super::Foundation::HWND, hacctable: HACCEL, lpmsg: *const MSG) -> i32 { windows_targets::link!("user32.dll" "system" fn TranslateAcceleratorA(hwnd : super::super::Foundation:: HWND, hacctable : HACCEL, lpmsg : *const MSG) -> i32); - TranslateAcceleratorA(hwnd.param().abi(), hacctable.param().abi(), core::mem::transmute(lpmsg)) + TranslateAcceleratorA(core::mem::transmute(hwnd), core::mem::transmute(hacctable), core::mem::transmute(lpmsg)) } #[inline] -pub unsafe fn TranslateAcceleratorW(hwnd: P0, hacctable: P1, lpmsg: *const MSG) -> i32 -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn TranslateAcceleratorW(hwnd: super::super::Foundation::HWND, hacctable: HACCEL, lpmsg: *const MSG) -> i32 { windows_targets::link!("user32.dll" "system" fn TranslateAcceleratorW(hwnd : super::super::Foundation:: HWND, hacctable : HACCEL, lpmsg : *const MSG) -> i32); - TranslateAcceleratorW(hwnd.param().abi(), hacctable.param().abi(), core::mem::transmute(lpmsg)) + TranslateAcceleratorW(core::mem::transmute(hwnd), core::mem::transmute(hacctable), core::mem::transmute(lpmsg)) } #[inline] -pub unsafe fn TranslateMDISysAccel(hwndclient: P0, lpmsg: *const MSG) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn TranslateMDISysAccel(hwndclient: super::super::Foundation::HWND, lpmsg: *const MSG) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn TranslateMDISysAccel(hwndclient : super::super::Foundation:: HWND, lpmsg : *const MSG) -> super::super::Foundation:: BOOL); - TranslateMDISysAccel(hwndclient.param().abi(), core::mem::transmute(lpmsg)) + TranslateMDISysAccel(core::mem::transmute(hwndclient), core::mem::transmute(lpmsg)) } #[inline] pub unsafe fn TranslateMessage(lpmsg: *const MSG) -> super::super::Foundation::BOOL { @@ -3245,59 +2479,42 @@ pub unsafe fn UnhookWindowsHook(ncode: i32, pfnfilterproc: HOOKPROC) -> super::s UnhookWindowsHook(core::mem::transmute(ncode), core::mem::transmute(pfnfilterproc)) } #[inline] -pub unsafe fn UnhookWindowsHookEx(hhk: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnhookWindowsHookEx(hhk: HHOOK) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UnhookWindowsHookEx(hhk : HHOOK) -> super::super::Foundation:: BOOL); - UnhookWindowsHookEx(hhk.param().abi()).ok() + UnhookWindowsHookEx(core::mem::transmute(hhk)).ok() } #[inline] -pub unsafe fn UnregisterClassA(lpclassname: P0, hinstance: P1) -> windows_core::Result<()> +pub unsafe fn UnregisterClassA(lpclassname: P0, hinstance: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn UnregisterClassA(lpclassname : windows_core::PCSTR, hinstance : super::super::Foundation:: HINSTANCE) -> super::super::Foundation:: BOOL); - UnregisterClassA(lpclassname.param().abi(), hinstance.param().abi()).ok() + UnregisterClassA(lpclassname.param().abi(), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn UnregisterClassW(lpclassname: P0, hinstance: P1) -> windows_core::Result<()> +pub unsafe fn UnregisterClassW(lpclassname: P0, hinstance: Option) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn UnregisterClassW(lpclassname : windows_core::PCWSTR, hinstance : super::super::Foundation:: HINSTANCE) -> super::super::Foundation:: BOOL); - UnregisterClassW(lpclassname.param().abi(), hinstance.param().abi()).ok() + UnregisterClassW(lpclassname.param().abi(), core::mem::transmute(hinstance.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn UnregisterDeviceNotification(handle: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn UnregisterDeviceNotification(handle: HDEVNOTIFY) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UnregisterDeviceNotification(handle : HDEVNOTIFY) -> super::super::Foundation:: BOOL); - UnregisterDeviceNotification(handle.param().abi()).ok() + UnregisterDeviceNotification(core::mem::transmute(handle)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn UpdateLayeredWindow(hwnd: P0, hdcdst: P1, pptdst: Option<*const super::super::Foundation::POINT>, psize: Option<*const super::super::Foundation::SIZE>, hdcsrc: P4, pptsrc: Option<*const super::super::Foundation::POINT>, crkey: P6, pblend: Option<*const super::super::Graphics::Gdi::BLENDFUNCTION>, dwflags: UPDATE_LAYERED_WINDOW_FLAGS) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, - P4: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn UpdateLayeredWindow(hwnd: super::super::Foundation::HWND, hdcdst: Option, pptdst: Option<*const super::super::Foundation::POINT>, psize: Option<*const super::super::Foundation::SIZE>, hdcsrc: Option, pptsrc: Option<*const super::super::Foundation::POINT>, crkey: super::super::Foundation::COLORREF, pblend: Option<*const super::super::Graphics::Gdi::BLENDFUNCTION>, dwflags: UPDATE_LAYERED_WINDOW_FLAGS) -> windows_core::Result<()> { 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(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())), core::mem::transmute(dwflags)).ok() + UpdateLayeredWindow(core::mem::transmute(hwnd), core::mem::transmute(hdcdst.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptdst.unwrap_or(core::mem::zeroed())), core::mem::transmute(psize.unwrap_or(core::mem::zeroed())), core::mem::transmute(hdcsrc.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptsrc.unwrap_or(core::mem::zeroed())), core::mem::transmute(crkey), core::mem::transmute(pblend.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn UpdateLayeredWindowIndirect(hwnd: P0, pulwinfo: *const UPDATELAYEREDWINDOWINFO) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn UpdateLayeredWindowIndirect(hwnd: super::super::Foundation::HWND, pulwinfo: *const UPDATELAYEREDWINDOWINFO) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn UpdateLayeredWindowIndirect(hwnd : super::super::Foundation:: HWND, pulwinfo : *const UPDATELAYEREDWINDOWINFO) -> super::super::Foundation:: BOOL); - UpdateLayeredWindowIndirect(hwnd.param().abi(), core::mem::transmute(pulwinfo)) + UpdateLayeredWindowIndirect(core::mem::transmute(hwnd), core::mem::transmute(pulwinfo)) } #[inline] pub unsafe fn WaitMessage() -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs index e2e601fe76..7466566b94 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs @@ -1030,19 +1030,17 @@ impl IMILBitmapEffectPrimitive { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(uiindex), pcontext.param().abi(), core::mem::transmute(pfmodifyinplace), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn TransformPoint(&self, uiindex: u32, p: *mut MilPoint2D, fforwardtransform: P2, pcontext: P3, pfpointtransformed: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> + pub unsafe fn TransformPoint(&self, uiindex: u32, p: *mut MilPoint2D, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: P3, pfpointtransformed: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> where - P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).TransformPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(uiindex), core::mem::transmute(p), fforwardtransform.param().abi(), pcontext.param().abi(), core::mem::transmute(pfpointtransformed)).ok() + (windows_core::Interface::vtable(self).TransformPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(uiindex), core::mem::transmute(p), core::mem::transmute(fforwardtransform), pcontext.param().abi(), core::mem::transmute(pfpointtransformed)).ok() } - pub unsafe fn TransformRect(&self, uiindex: u32, p: *mut MilRectD, fforwardtransform: P2, pcontext: P3) -> windows_core::Result<()> + pub unsafe fn TransformRect(&self, uiindex: u32, p: *mut MilRectD, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: P3) -> windows_core::Result<()> where - P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).TransformRect)(windows_core::Interface::as_raw(self), core::mem::transmute(uiindex), core::mem::transmute(p), fforwardtransform.param().abi(), pcontext.param().abi()).ok() + (windows_core::Interface::vtable(self).TransformRect)(windows_core::Interface::as_raw(self), core::mem::transmute(uiindex), core::mem::transmute(p), core::mem::transmute(fforwardtransform), pcontext.param().abi()).ok() } pub unsafe fn HasAffineTransform(&self, uiindex: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1197,11 +1195,8 @@ impl IMILBitmapEffectRenderContext { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetOutputPixelFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseSoftwareRenderer(&self, fsoftware: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseSoftwareRenderer)(windows_core::Interface::as_raw(self), fsoftware.param().abi()).ok() + pub unsafe fn SetUseSoftwareRenderer(&self, fsoftware: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseSoftwareRenderer)(windows_core::Interface::as_raw(self), core::mem::transmute(fsoftware)).ok() } pub unsafe fn SetInitialTransform(&self, pmatrix: *const MILMatrixF) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetInitialTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(pmatrix)).ok() 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 61afa90f87..d168747a51 100644 --- a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs @@ -6,13 +6,10 @@ pub unsafe fn ComputeInvCMAP(prgbcolors: *const super::super::Graphics::Gdi::RGB } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn CreateDDrawSurfaceOnDIB(hbmdib: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn CreateDDrawSurfaceOnDIB(hbmdib: super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result { windows_targets::link!("imgutil.dll" "system" fn CreateDDrawSurfaceOnDIB(hbmdib : super::super::Graphics::Gdi:: HBITMAP, ppsurface : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateDDrawSurfaceOnDIB(hbmdib.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateDDrawSurfaceOnDIB(core::mem::transmute(hbmdib), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn CreateMIMEMap() -> windows_core::Result { @@ -60,12 +57,9 @@ pub unsafe fn IEAssociateThreadWithTab(dwtabthreadid: u32, dwassociatedthreadid: IEAssociateThreadWithTab(core::mem::transmute(dwtabthreadid), core::mem::transmute(dwassociatedthreadid)).ok() } #[inline] -pub unsafe fn IECancelSaveFile(hstate: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn IECancelSaveFile(hstate: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("ieframe.dll" "system" fn IECancelSaveFile(hstate : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - IECancelSaveFile(hstate.param().abi()).ok() + IECancelSaveFile(core::mem::transmute(hstate)).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -78,13 +72,12 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn IECreateFile(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: u32, lpsecurityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, dwcreationdisposition: u32, dwflagsandattributes: u32, htemplatefile: P6) -> super::super::Foundation::HANDLE +pub unsafe fn IECreateFile(lpfilename: P0, dwdesiredaccess: u32, dwsharemode: u32, lpsecurityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, dwcreationdisposition: u32, dwflagsandattributes: u32, htemplatefile: Option) -> super::super::Foundation::HANDLE where P0: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("ieframe.dll" "system" fn IECreateFile(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); - IECreateFile(lpfilename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes), core::mem::transmute(dwcreationdisposition), core::mem::transmute(dwflagsandattributes), htemplatefile.param().abi()) + IECreateFile(lpfilename.param().abi(), core::mem::transmute(dwdesiredaccess), core::mem::transmute(dwsharemode), core::mem::transmute(lpsecurityattributes), core::mem::transmute(dwcreationdisposition), core::mem::transmute(dwflagsandattributes), core::mem::transmute(htemplatefile.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn IEDeleteFile(lpfilename: P0) -> super::super::Foundation::BOOL @@ -170,7 +163,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(), core::mem::transmute(lpprocinfo), core::mem::transmute(lpinfo.unwrap_or(core::ptr::null()))).ok() + IELaunchURL(lpwstrurl.param().abi(), core::mem::transmute(lpprocinfo), core::mem::transmute(lpinfo.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn IEMoveFileEx(lpexistingfilename: P0, lpnewfilename: P1, dwflags: u32) -> super::super::Foundation::BOOL @@ -194,7 +187,7 @@ where P2: 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(), core::mem::transmute(reserved), lpclass.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition)).ok() + IERegCreateKeyEx(lpsubkey.param().abi(), core::mem::transmute(reserved), lpclass.param().abi(), core::mem::transmute(dwoptions), core::mem::transmute(samdesired), core::mem::transmute(lpsecurityattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(phkresult), core::mem::transmute(lpdwdisposition)).ok() } #[inline] pub unsafe fn IERegSetValueEx(lpsubkey: P0, lpvaluename: P1, reserved: u32, dwtype: u32, lpdata: &[u8]) -> windows_core::Result<()> @@ -232,13 +225,12 @@ where IERemoveDirectory(lppathname.param().abi()) } #[inline] -pub unsafe fn IESaveFile(hstate: P0, lpwstrsourcefile: P1) -> windows_core::Result<()> +pub unsafe fn IESaveFile(hstate: super::super::Foundation::HANDLE, lpwstrsourcefile: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("ieframe.dll" "system" fn IESaveFile(hstate : super::super::Foundation:: HANDLE, lpwstrsourcefile : windows_core::PCWSTR) -> windows_core::HRESULT); - IESaveFile(hstate.param().abi(), lpwstrsourcefile.param().abi()).ok() + IESaveFile(core::mem::transmute(hstate), lpwstrsourcefile.param().abi()).ok() } #[inline] pub unsafe fn IESetProtectedModeCookie(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, dwflags: u32) -> windows_core::Result<()> @@ -251,27 +243,25 @@ where IESetProtectedModeCookie(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn IEShowOpenFileDialog(hwnd: P0, lpwstrfilename: &mut [u16], lpwstrinitialdir: P3, lpwstrfilter: P4, lpwstrdefext: P5, dwfilterindex: u32, dwflags: u32, phfile: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> +pub unsafe fn IEShowOpenFileDialog(hwnd: super::super::Foundation::HWND, lpwstrfilename: &mut [u16], lpwstrinitialdir: P3, lpwstrfilter: P4, lpwstrdefext: P5, dwfilterindex: u32, dwflags: u32, phfile: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { windows_targets::link!("ieframe.dll" "system" fn IEShowOpenFileDialog(hwnd : super::super::Foundation:: HWND, lpwstrfilename : windows_core::PWSTR, cchmaxfilename : u32, lpwstrinitialdir : windows_core::PCWSTR, lpwstrfilter : windows_core::PCWSTR, lpwstrdefext : windows_core::PCWSTR, dwfilterindex : u32, dwflags : u32, phfile : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - IEShowOpenFileDialog(hwnd.param().abi(), core::mem::transmute(lpwstrfilename.as_ptr()), lpwstrfilename.len().try_into().unwrap(), lpwstrinitialdir.param().abi(), lpwstrfilter.param().abi(), lpwstrdefext.param().abi(), core::mem::transmute(dwfilterindex), core::mem::transmute(dwflags), core::mem::transmute(phfile)).ok() + IEShowOpenFileDialog(core::mem::transmute(hwnd), core::mem::transmute(lpwstrfilename.as_ptr()), lpwstrfilename.len().try_into().unwrap(), lpwstrinitialdir.param().abi(), lpwstrfilter.param().abi(), lpwstrdefext.param().abi(), core::mem::transmute(dwfilterindex), core::mem::transmute(dwflags), core::mem::transmute(phfile)).ok() } #[inline] -pub unsafe fn IEShowSaveFileDialog(hwnd: P0, lpwstrinitialfilename: P1, lpwstrinitialdir: P2, lpwstrfilter: P3, lpwstrdefext: P4, dwfilterindex: u32, dwflags: u32, lppwstrdestinationfilepath: *mut windows_core::PWSTR, phstate: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> +pub unsafe fn IEShowSaveFileDialog(hwnd: super::super::Foundation::HWND, lpwstrinitialfilename: P1, lpwstrinitialdir: P2, lpwstrfilter: P3, lpwstrdefext: P4, dwfilterindex: u32, dwflags: u32, lppwstrdestinationfilepath: *mut windows_core::PWSTR, phstate: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("ieframe.dll" "system" fn IEShowSaveFileDialog(hwnd : super::super::Foundation:: HWND, lpwstrinitialfilename : windows_core::PCWSTR, lpwstrinitialdir : windows_core::PCWSTR, lpwstrfilter : windows_core::PCWSTR, lpwstrdefext : windows_core::PCWSTR, dwfilterindex : u32, dwflags : u32, lppwstrdestinationfilepath : *mut windows_core::PWSTR, phstate : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - IEShowSaveFileDialog(hwnd.param().abi(), lpwstrinitialfilename.param().abi(), lpwstrinitialdir.param().abi(), lpwstrfilter.param().abi(), lpwstrdefext.param().abi(), core::mem::transmute(dwfilterindex), core::mem::transmute(dwflags), core::mem::transmute(lppwstrdestinationfilepath), core::mem::transmute(phstate)).ok() + IEShowSaveFileDialog(core::mem::transmute(hwnd), lpwstrinitialfilename.param().abi(), lpwstrinitialdir.param().abi(), lpwstrfilter.param().abi(), lpwstrdefext.param().abi(), core::mem::transmute(dwfilterindex), core::mem::transmute(dwflags), core::mem::transmute(lppwstrdestinationfilepath), core::mem::transmute(phstate)).ok() } #[inline] pub unsafe fn IETrackingProtectionEnabled() -> super::super::Foundation::BOOL { @@ -289,54 +279,49 @@ pub unsafe fn IdentifyMIMEType(pbbytes: *const u8, nbytes: u32, pnformat: *mut u IdentifyMIMEType(core::mem::transmute(pbbytes), core::mem::transmute(nbytes), core::mem::transmute(pnformat)).ok() } #[inline] -pub unsafe fn RatingAccessDeniedDialog(hdlg: P0, pszusername: P1, pszcontentdescription: P2, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn RatingAccessDeniedDialog(hdlg: super::super::Foundation::HWND, pszusername: P1, pszcontentdescription: P2, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingAccessDeniedDialog(hdlg : super::super::Foundation:: HWND, pszusername : windows_core::PCSTR, pszcontentdescription : windows_core::PCSTR, pratingdetails : *mut core::ffi::c_void) -> windows_core::HRESULT); - RatingAccessDeniedDialog(hdlg.param().abi(), pszusername.param().abi(), pszcontentdescription.param().abi(), core::mem::transmute(pratingdetails)).ok() + RatingAccessDeniedDialog(core::mem::transmute(hdlg), pszusername.param().abi(), pszcontentdescription.param().abi(), core::mem::transmute(pratingdetails)).ok() } #[inline] -pub unsafe fn RatingAccessDeniedDialog2(hdlg: P0, pszusername: P1, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn RatingAccessDeniedDialog2(hdlg: super::super::Foundation::HWND, pszusername: P1, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingAccessDeniedDialog2(hdlg : super::super::Foundation:: HWND, pszusername : windows_core::PCSTR, pratingdetails : *mut core::ffi::c_void) -> windows_core::HRESULT); - RatingAccessDeniedDialog2(hdlg.param().abi(), pszusername.param().abi(), core::mem::transmute(pratingdetails)).ok() + RatingAccessDeniedDialog2(core::mem::transmute(hdlg), pszusername.param().abi(), core::mem::transmute(pratingdetails)).ok() } #[inline] -pub unsafe fn RatingAccessDeniedDialog2W(hdlg: P0, pszusername: P1, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn RatingAccessDeniedDialog2W(hdlg: super::super::Foundation::HWND, pszusername: P1, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingAccessDeniedDialog2W(hdlg : super::super::Foundation:: HWND, pszusername : windows_core::PCWSTR, pratingdetails : *mut core::ffi::c_void) -> windows_core::HRESULT); - RatingAccessDeniedDialog2W(hdlg.param().abi(), pszusername.param().abi(), core::mem::transmute(pratingdetails)).ok() + RatingAccessDeniedDialog2W(core::mem::transmute(hdlg), pszusername.param().abi(), core::mem::transmute(pratingdetails)).ok() } #[inline] -pub unsafe fn RatingAccessDeniedDialogW(hdlg: P0, pszusername: P1, pszcontentdescription: P2, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn RatingAccessDeniedDialogW(hdlg: super::super::Foundation::HWND, pszusername: P1, pszcontentdescription: P2, pratingdetails: *mut core::ffi::c_void) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingAccessDeniedDialogW(hdlg : super::super::Foundation:: HWND, pszusername : windows_core::PCWSTR, pszcontentdescription : windows_core::PCWSTR, pratingdetails : *mut core::ffi::c_void) -> windows_core::HRESULT); - RatingAccessDeniedDialogW(hdlg.param().abi(), pszusername.param().abi(), pszcontentdescription.param().abi(), core::mem::transmute(pratingdetails)).ok() + RatingAccessDeniedDialogW(core::mem::transmute(hdlg), pszusername.param().abi(), pszcontentdescription.param().abi(), core::mem::transmute(pratingdetails)).ok() } #[inline] -pub unsafe fn RatingAddToApprovedSites(hdlg: P0, pbpasswordblob: &mut [u8], lpszurl: P3, falwaysnever: P4, fsitepage: P5, fapprovedsitesenforced: P6) -> windows_core::Result<()> +pub unsafe fn RatingAddToApprovedSites(hdlg: super::super::Foundation::HWND, pbpasswordblob: &mut [u8], lpszurl: P3, falwaysnever: P4, fsitepage: P5, fapprovedsitesenforced: P6) -> windows_core::Result<()> where - P0: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingAddToApprovedSites(hdlg : super::super::Foundation:: HWND, cbpasswordblob : u32, pbpasswordblob : *mut u8, lpszurl : windows_core::PCWSTR, falwaysnever : super::super::Foundation:: BOOL, fsitepage : super::super::Foundation:: BOOL, fapprovedsitesenforced : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RatingAddToApprovedSites(hdlg.param().abi(), pbpasswordblob.len().try_into().unwrap(), core::mem::transmute(pbpasswordblob.as_ptr()), lpszurl.param().abi(), falwaysnever.param().abi(), fsitepage.param().abi(), fapprovedsitesenforced.param().abi()).ok() + RatingAddToApprovedSites(core::mem::transmute(hdlg), pbpasswordblob.len().try_into().unwrap(), core::mem::transmute(pbpasswordblob.as_ptr()), lpszurl.param().abi(), falwaysnever.param().abi(), fsitepage.param().abi(), fapprovedsitesenforced.param().abi()).ok() } #[inline] pub unsafe fn RatingCheckUserAccess(pszusername: P0, pszurl: P1, pszratinginfo: P2, pdata: Option<&[u8]>, ppratingdetails: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> @@ -346,7 +331,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(core::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::mem::zeroed()))).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,47 +341,41 @@ 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(core::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::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RatingClickedOnPRFInternal(hwndowner: P0, param1: P1, lpszfilename: P2, nshow: i32) -> windows_core::Result<()> +pub unsafe fn RatingClickedOnPRFInternal(hwndowner: super::super::Foundation::HWND, param1: super::super::Foundation::HINSTANCE, lpszfilename: P2, nshow: i32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingClickedOnPRFInternal(hwndowner : super::super::Foundation:: HWND, param1 : super::super::Foundation:: HINSTANCE, lpszfilename : windows_core::PCSTR, nshow : i32) -> windows_core::HRESULT); - RatingClickedOnPRFInternal(hwndowner.param().abi(), param1.param().abi(), lpszfilename.param().abi(), core::mem::transmute(nshow)).ok() + RatingClickedOnPRFInternal(core::mem::transmute(hwndowner), core::mem::transmute(param1), lpszfilename.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn RatingClickedOnRATInternal(hwndowner: P0, param1: P1, lpszfilename: P2, nshow: i32) -> windows_core::Result<()> +pub unsafe fn RatingClickedOnRATInternal(hwndowner: super::super::Foundation::HWND, param1: super::super::Foundation::HINSTANCE, lpszfilename: P2, nshow: i32) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingClickedOnRATInternal(hwndowner : super::super::Foundation:: HWND, param1 : super::super::Foundation:: HINSTANCE, lpszfilename : windows_core::PCSTR, nshow : i32) -> windows_core::HRESULT); - RatingClickedOnRATInternal(hwndowner.param().abi(), param1.param().abi(), lpszfilename.param().abi(), core::mem::transmute(nshow)).ok() + RatingClickedOnRATInternal(core::mem::transmute(hwndowner), core::mem::transmute(param1), lpszfilename.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn RatingEnable(hwndparent: P0, pszusername: P1, fenable: P2) -> windows_core::Result<()> +pub unsafe fn RatingEnable(hwndparent: super::super::Foundation::HWND, pszusername: P1, fenable: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingEnable(hwndparent : super::super::Foundation:: HWND, pszusername : windows_core::PCSTR, fenable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RatingEnable(hwndparent.param().abi(), pszusername.param().abi(), fenable.param().abi()).ok() + RatingEnable(core::mem::transmute(hwndparent), pszusername.param().abi(), fenable.param().abi()).ok() } #[inline] -pub unsafe fn RatingEnableW(hwndparent: P0, pszusername: P1, fenable: P2) -> windows_core::Result<()> +pub unsafe fn RatingEnableW(hwndparent: super::super::Foundation::HWND, pszusername: P1, fenable: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingEnableW(hwndparent : super::super::Foundation:: HWND, pszusername : windows_core::PCWSTR, fenable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RatingEnableW(hwndparent.param().abi(), pszusername.param().abi(), fenable.param().abi()).ok() + RatingEnableW(core::mem::transmute(hwndparent), pszusername.param().abi(), fenable.param().abi()).ok() } #[inline] pub unsafe fn RatingEnabledQuery() -> windows_core::Result<()> { @@ -406,7 +385,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(core::ptr::null()))).ok() + RatingFreeDetails(core::mem::transmute(pratingdetails.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RatingInit() -> windows_core::Result<()> { @@ -414,12 +393,9 @@ pub unsafe fn RatingInit() -> windows_core::Result<()> { RatingInit().ok() } #[inline] -pub unsafe fn RatingObtainCancel(hratingobtainquery: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RatingObtainCancel(hratingobtainquery: super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("msrating.dll" "system" fn RatingObtainCancel(hratingobtainquery : super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - RatingObtainCancel(hratingobtainquery.param().abi()).ok() + RatingObtainCancel(core::mem::transmute(hratingobtainquery)).ok() } #[inline] pub unsafe fn RatingObtainQuery(psztargeturl: P0, dwuserdata: u32, fcallback: isize, phratingobtainquery: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> @@ -427,7 +403,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(), core::mem::transmute(dwuserdata), core::mem::transmute(fcallback), core::mem::transmute(phratingobtainquery.unwrap_or(core::ptr::null_mut()))).ok() + RatingObtainQuery(psztargeturl.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(fcallback), core::mem::transmute(phratingobtainquery.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RatingObtainQueryW(psztargeturl: P0, dwuserdata: u32, fcallback: isize, phratingobtainquery: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> @@ -435,25 +411,23 @@ 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(), core::mem::transmute(dwuserdata), core::mem::transmute(fcallback), core::mem::transmute(phratingobtainquery.unwrap_or(core::ptr::null_mut()))).ok() + RatingObtainQueryW(psztargeturl.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(fcallback), core::mem::transmute(phratingobtainquery.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RatingSetupUI(hdlg: P0, pszusername: P1) -> windows_core::Result<()> +pub unsafe fn RatingSetupUI(hdlg: super::super::Foundation::HWND, pszusername: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingSetupUI(hdlg : super::super::Foundation:: HWND, pszusername : windows_core::PCSTR) -> windows_core::HRESULT); - RatingSetupUI(hdlg.param().abi(), pszusername.param().abi()).ok() + RatingSetupUI(core::mem::transmute(hdlg), pszusername.param().abi()).ok() } #[inline] -pub unsafe fn RatingSetupUIW(hdlg: P0, pszusername: P1) -> windows_core::Result<()> +pub unsafe fn RatingSetupUIW(hdlg: super::super::Foundation::HWND, pszusername: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingSetupUIW(hdlg : super::super::Foundation:: HWND, pszusername : windows_core::PCWSTR) -> windows_core::HRESULT); - RatingSetupUIW(hdlg.param().abi(), pszusername.param().abi()).ok() + RatingSetupUIW(core::mem::transmute(hdlg), pszusername.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -845,14 +819,13 @@ impl windows_core::RuntimeName for IActiveXUIHandlerSite2 {} windows_core::imp::define_interface!(IActiveXUIHandlerSite3, IActiveXUIHandlerSite3_Vtbl, 0x7904009a_1238_47f4_901c_871375c34608); windows_core::imp::interface_hierarchy!(IActiveXUIHandlerSite3, windows_core::IUnknown); impl IActiveXUIHandlerSite3 { - pub unsafe fn MessageBoxW(&self, hwnd: P0, text: P1, caption: P2, r#type: u32) -> windows_core::Result + pub unsafe fn MessageBoxW(&self, hwnd: Option, text: P1, caption: P2, r#type: u32) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).MessageBoxW)(windows_core::Interface::as_raw(self), hwnd.param().abi(), text.param().abi(), caption.param().abi(), core::mem::transmute(r#type), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).MessageBoxW)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), text.param().abi(), caption.param().abi(), core::mem::transmute(r#type), &mut result__).map(|| result__) } } #[repr(C)] @@ -2489,13 +2462,12 @@ impl windows_core::RuntimeName for IHomePage {} windows_core::imp::define_interface!(IHomePageSetting, IHomePageSetting_Vtbl, 0xfdfc244f_18fa_4ff2_b08e_1d618f3ffbe4); windows_core::imp::interface_hierarchy!(IHomePageSetting, windows_core::IUnknown); impl IHomePageSetting { - pub unsafe fn SetHomePage(&self, hwnd: P0, homepageuri: P1, brandingmessage: P2) -> windows_core::Result<()> + pub unsafe fn SetHomePage(&self, hwnd: super::super::Foundation::HWND, homepageuri: P1, brandingmessage: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetHomePage)(windows_core::Interface::as_raw(self), hwnd.param().abi(), homepageuri.param().abi(), brandingmessage.param().abi()).ok() + (windows_core::Interface::vtable(self).SetHomePage)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), homepageuri.param().abi(), brandingmessage.param().abi()).ok() } pub unsafe fn IsHomePage(&self, uri: P0) -> windows_core::Result where @@ -2900,11 +2872,8 @@ impl IIntelliForms { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Setenabled(&self, bval: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), bval.param().abi()).ok() + pub unsafe fn Setenabled(&self, bval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Setenabled)(windows_core::Interface::as_raw(self), core::mem::transmute(bval)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -3045,21 +3014,15 @@ impl ILayoutRect { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).contentSrc)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SethonorPageBreaks(&self, v: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SethonorPageBreaks)(windows_core::Interface::as_raw(self), v.param().abi()).ok() + pub unsafe fn SethonorPageBreaks(&self, v: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SethonorPageBreaks)(windows_core::Interface::as_raw(self), core::mem::transmute(v)).ok() } pub unsafe fn honorPageBreaks(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).honorPageBreaks)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SethonorPageRules(&self, v: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SethonorPageRules)(windows_core::Interface::as_raw(self), v.param().abi()).ok() + pub unsafe fn SethonorPageRules(&self, v: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SethonorPageRules)(windows_core::Interface::as_raw(self), core::mem::transmute(v)).ok() } pub unsafe fn honorPageRules(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3342,12 +3305,11 @@ impl IOpenService { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsDefault)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDefault(&self, fdefault: P0, hwnd: P1) -> windows_core::Result<()> + pub unsafe fn SetDefault(&self, fdefault: P0, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetDefault)(windows_core::Interface::as_raw(self), fdefault.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).SetDefault)(windows_core::Interface::as_raw(self), fdefault.param().abi(), core::mem::transmute(hwnd)).ok() } pub unsafe fn GetID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3759,12 +3721,11 @@ impl IOpenServiceActivityCategory { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDefaultActivity)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetDefaultActivity(&self, pactivity: P0, hwnd: P1) -> windows_core::Result<()> + pub unsafe fn SetDefaultActivity(&self, pactivity: P0, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetDefaultActivity)(windows_core::Interface::as_raw(self), pactivity.param().abi(), hwnd.param().abi()).ok() + (windows_core::Interface::vtable(self).SetDefaultActivity)(windows_core::Interface::as_raw(self), pactivity.param().abi(), core::mem::transmute(hwnd)).ok() } pub unsafe fn GetName(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5625,13 +5586,9 @@ impl windows_core::RuntimeName for ITimerSink {} windows_core::imp::define_interface!(ITridentTouchInput, ITridentTouchInput_Vtbl, 0x30510850_98b5_11cf_bb82_00aa00bdce0b); windows_core::imp::interface_hierarchy!(ITridentTouchInput, windows_core::IUnknown); impl ITridentTouchInput { - pub unsafe fn OnPointerMessage(&self, msg: u32, wparam: P1, lparam: P2) -> windows_core::Result - where - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn OnPointerMessage(&self, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnPointerMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), wparam.param().abi(), lparam.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OnPointerMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), &mut result__).map(|| result__) } } #[repr(C)] diff --git a/crates/samples/windows/com_uri/src/main.rs b/crates/samples/windows/com_uri/src/main.rs index 5e0df25c17..d735f66ec2 100644 --- a/crates/samples/windows/com_uri/src/main.rs +++ b/crates/samples/windows/com_uri/src/main.rs @@ -3,7 +3,7 @@ use windows::Win32::System::Com::*; fn main() -> windows::core::Result<()> { unsafe { - let uri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), 0)?; + let uri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), None)?; let domain = uri.GetDomain()?; let port = uri.GetPort()?; diff --git a/crates/samples/windows/create_window/src/main.rs b/crates/samples/windows/create_window/src/main.rs index 35dc18b344..3a57d01eac 100644 --- a/crates/samples/windows/create_window/src/main.rs +++ b/crates/samples/windows/create_window/src/main.rs @@ -32,7 +32,7 @@ fn main() -> Result<()> { CW_USEDEFAULT, None, None, - instance, + None, None, )?; @@ -51,7 +51,7 @@ extern "system" fn wndproc(window: HWND, message: u32, wparam: WPARAM, lparam: L match message { WM_PAINT => { println!("WM_PAINT"); - _ = ValidateRect(window, None); + _ = ValidateRect(Some(window), None); LRESULT(0) } WM_DESTROY => { diff --git a/crates/samples/windows/credentials/src/main.rs b/crates/samples/windows/credentials/src/main.rs index 9d38b8bbd1..4d3c2a7168 100644 --- a/crates/samples/windows/credentials/src/main.rs +++ b/crates/samples/windows/credentials/src/main.rs @@ -8,7 +8,7 @@ fn main() -> windows::core::Result<()> { unsafe { CredEnumerateW( None, - CRED_ENUMERATE_ALL_CREDENTIALS, + Some(CRED_ENUMERATE_ALL_CREDENTIALS), &mut count, &mut credentials_ptr, )?; diff --git a/crates/samples/windows/dcomp/src/main.rs b/crates/samples/windows/dcomp/src/main.rs index 14694115e8..a7a39dcdaa 100644 --- a/crates/samples/windows/dcomp/src/main.rs +++ b/crates/samples/windows/dcomp/src/main.rs @@ -331,7 +331,7 @@ impl Window { self.create_device_resources()?; } - ValidateRect(self.handle, None).ok() + ValidateRect(Some(self.handle), None).ok() } } @@ -443,7 +443,7 @@ impl Window { CW_USEDEFAULT, None, None, - instance, + None, Some(self as *mut _ as _), )?; @@ -451,7 +451,7 @@ impl Window { debug_assert!(handle == self.handle); let mut message = MSG::default(); - while GetMessageA(&mut message, HWND::default(), 0, 0).into() { + while GetMessageA(&mut message, None, 0, 0).into() { DispatchMessageA(&message); } @@ -547,7 +547,7 @@ fn create_device_3d() -> Result { D3D11CreateDevice( None, D3D_DRIVER_TYPE_HARDWARE, - None, + HMODULE::default(), D3D11_CREATE_DEVICE_BGRA_SUPPORT, None, D3D11_SDK_VERSION, diff --git a/crates/samples/windows/direct2d/src/main.rs b/crates/samples/windows/direct2d/src/main.rs index 32757d457d..50aff2caf6 100644 --- a/crates/samples/windows/direct2d/src/main.rs +++ b/crates/samples/windows/direct2d/src/main.rs @@ -405,7 +405,7 @@ impl Window { CW_USEDEFAULT, None, None, - instance, + None, Some(self as *mut _ as _), )?; @@ -536,7 +536,7 @@ fn create_device_with_type(drive_type: D3D_DRIVER_TYPE) -> Result D3D11CreateDevice( None, drive_type, - None, + HMODULE::default(), flags, None, D3D11_SDK_VERSION, diff --git a/crates/samples/windows/direct3d12/src/main.rs b/crates/samples/windows/direct3d12/src/main.rs index 3d9513205a..11586f77f6 100644 --- a/crates/samples/windows/direct3d12/src/main.rs +++ b/crates/samples/windows/direct3d12/src/main.rs @@ -97,7 +97,7 @@ where window_rect.bottom - window_rect.top, None, // no parent window None, // no menus - instance, + None, Some(&mut sample as *mut _ as _), ) }?; diff --git a/crates/samples/windows/privileges/src/main.rs b/crates/samples/windows/privileges/src/main.rs index b09952d9ed..a3a28b672a 100644 --- a/crates/samples/windows/privileges/src/main.rs +++ b/crates/samples/windows/privileges/src/main.rs @@ -28,11 +28,11 @@ fn main() -> Result<()> { for privilege in privileges { let mut name_len = 0; - _ = LookupPrivilegeNameW(None, &privilege.Luid, PWSTR::null(), &mut name_len); + _ = LookupPrivilegeNameW(None, &privilege.Luid, None, &mut name_len); let mut name = vec![0u16; (name_len + 1) as usize]; let name = PWSTR(name.as_mut_ptr()); - LookupPrivilegeNameW(None, &privilege.Luid, name, &mut name_len)?; + LookupPrivilegeNameW(None, &privilege.Luid, Some(name), &mut name_len)?; println!("{}", name.display()) } diff --git a/crates/tests/bindgen/src/fn_associated_enum_win.rs b/crates/tests/bindgen/src/fn_associated_enum_win.rs index 89f3e88315..94d7bf4d03 100644 --- a/crates/tests/bindgen/src/fn_associated_enum_win.rs +++ b/crates/tests/bindgen/src/fn_associated_enum_win.rs @@ -13,7 +13,7 @@ pub unsafe fn CoInitializeEx( ) -> 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(core::ptr::null())), + core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed())), dwcoinit.0 as _, ) } diff --git a/crates/tests/bindgen/src/struct_with_cpp_interface.rs b/crates/tests/bindgen/src/struct_with_cpp_interface.rs index 23f0bd0365..ee4808df1e 100644 --- a/crates/tests/bindgen/src/struct_with_cpp_interface.rs +++ b/crates/tests/bindgen/src/struct_with_cpp_interface.rs @@ -108,7 +108,7 @@ impl ID3D12Object { windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(pdatasize), - core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), ) .ok() } @@ -122,7 +122,7 @@ impl ID3D12Object { windows_core::Interface::as_raw(self), core::mem::transmute(guid), core::mem::transmute(datasize), - core::mem::transmute(pdata.unwrap_or(core::ptr::null())), + core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), ) .ok() } diff --git a/crates/tests/bindgen/src/window_long_get_a.rs b/crates/tests/bindgen/src/window_long_get_a.rs index ff0cf9edce..1c249c3c4d 100644 --- a/crates/tests/bindgen/src/window_long_get_a.rs +++ b/crates/tests/bindgen/src/window_long_get_a.rs @@ -7,12 +7,9 @@ )] #[inline] -pub unsafe fn GetWindowLongA(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowLongA(hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX) -> i32 { windows_targets::link!("user32.dll" "system" fn GetWindowLongA(hwnd : HWND, nindex : WINDOW_LONG_PTR_INDEX) -> i32); - GetWindowLongA(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowLongA(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[cfg(any( target_arch = "aarch64", @@ -20,12 +17,9 @@ where target_arch = "x86_64" ))] #[inline] -pub unsafe fn GetWindowLongPtrA(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowLongPtrA(hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX) -> isize { windows_targets::link!("user32.dll" "system" fn GetWindowLongPtrA(hwnd : HWND, nindex : WINDOW_LONG_PTR_INDEX) -> isize); - GetWindowLongPtrA(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowLongPtrA(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[cfg(target_pointer_width = "32")] pub use GetWindowLongA as GetWindowLongPtrA; diff --git a/crates/tests/bindgen/src/window_long_get_w.rs b/crates/tests/bindgen/src/window_long_get_w.rs index 94c9c07fa5..73580375e4 100644 --- a/crates/tests/bindgen/src/window_long_get_w.rs +++ b/crates/tests/bindgen/src/window_long_get_w.rs @@ -12,22 +12,16 @@ target_arch = "x86_64" ))] #[inline] -pub unsafe fn GetWindowLongPtrW(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX) -> isize -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowLongPtrW(hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX) -> isize { windows_targets::link!("user32.dll" "system" fn GetWindowLongPtrW(hwnd : HWND, nindex : WINDOW_LONG_PTR_INDEX) -> isize); - GetWindowLongPtrW(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowLongPtrW(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[cfg(target_pointer_width = "32")] pub use GetWindowLongW as GetWindowLongPtrW; #[inline] -pub unsafe fn GetWindowLongW(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetWindowLongW(hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX) -> i32 { windows_targets::link!("user32.dll" "system" fn GetWindowLongW(hwnd : HWND, nindex : WINDOW_LONG_PTR_INDEX) -> i32); - GetWindowLongW(hwnd.param().abi(), core::mem::transmute(nindex)) + GetWindowLongW(core::mem::transmute(hwnd), core::mem::transmute(nindex)) } #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] diff --git a/crates/tests/bindgen/src/window_long_set_a.rs b/crates/tests/bindgen/src/window_long_set_a.rs index 3a49d57af1..e7f9857a92 100644 --- a/crates/tests/bindgen/src/window_long_set_a.rs +++ b/crates/tests/bindgen/src/window_long_set_a.rs @@ -7,13 +7,10 @@ )] #[inline] -pub unsafe fn SetWindowLongA(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowLongA(hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32 { windows_targets::link!("user32.dll" "system" fn SetWindowLongA(hwnd : HWND, nindex : WINDOW_LONG_PTR_INDEX, dwnewlong : i32) -> i32); SetWindowLongA( - hwnd.param().abi(), + core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong), ) @@ -24,17 +21,14 @@ where target_arch = "x86_64" ))] #[inline] -pub unsafe fn SetWindowLongPtrA( - hwnd: P0, +pub unsafe fn SetWindowLongPtrA( + hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: isize, -) -> isize -where - P0: windows_core::Param, -{ +) -> isize { windows_targets::link!("user32.dll" "system" fn SetWindowLongPtrA(hwnd : HWND, nindex : WINDOW_LONG_PTR_INDEX, dwnewlong : isize) -> isize); SetWindowLongPtrA( - hwnd.param().abi(), + core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong), ) diff --git a/crates/tests/bindgen/src/window_long_set_w.rs b/crates/tests/bindgen/src/window_long_set_w.rs index 8c960a0e34..9f344a5796 100644 --- a/crates/tests/bindgen/src/window_long_set_w.rs +++ b/crates/tests/bindgen/src/window_long_set_w.rs @@ -12,17 +12,14 @@ target_arch = "x86_64" ))] #[inline] -pub unsafe fn SetWindowLongPtrW( - hwnd: P0, +pub unsafe fn SetWindowLongPtrW( + hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: isize, -) -> isize -where - P0: windows_core::Param, -{ +) -> isize { windows_targets::link!("user32.dll" "system" fn SetWindowLongPtrW(hwnd : HWND, nindex : WINDOW_LONG_PTR_INDEX, dwnewlong : isize) -> isize); SetWindowLongPtrW( - hwnd.param().abi(), + core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong), ) @@ -30,13 +27,10 @@ where #[cfg(target_pointer_width = "32")] pub use SetWindowLongW as SetWindowLongPtrW; #[inline] -pub unsafe fn SetWindowLongW(hwnd: P0, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn SetWindowLongW(hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX, dwnewlong: i32) -> i32 { windows_targets::link!("user32.dll" "system" fn SetWindowLongW(hwnd : HWND, nindex : WINDOW_LONG_PTR_INDEX, dwnewlong : i32) -> i32); SetWindowLongW( - hwnd.param().abi(), + core::mem::transmute(hwnd), core::mem::transmute(nindex), core::mem::transmute(dwnewlong), ) diff --git a/crates/tests/misc/bcrypt/tests/win.rs b/crates/tests/misc/bcrypt/tests/win.rs index 15ef0e68a7..ee51a9df39 100644 --- a/crates/tests/misc/bcrypt/tests/win.rs +++ b/crates/tests/misc/bcrypt/tests/win.rs @@ -14,7 +14,7 @@ fn test() -> Result<()> { let mut object_len = [0; 4]; let mut bytes_copied = 0; BCryptGetProperty( - *des, + (*des).into(), BCRYPT_OBJECT_LENGTH, Some(&mut object_len), &mut bytes_copied, @@ -24,14 +24,14 @@ fn test() -> Result<()> { let object_len = u32::from_le_bytes(object_len); let mut shared_secret = vec![0; object_len as usize]; - BCryptGenRandom(*rng, &mut shared_secret, Default::default()).ok()?; + BCryptGenRandom((*rng).into(), &mut shared_secret, Default::default()).ok()?; let mut encrypt_key = Owned::default(); BCryptGenerateSymmetricKey(*des, &mut *encrypt_key, None, &shared_secret, 0).ok()?; let mut block_len = [0; 4]; BCryptGetProperty( - *des, + (*des).into(), BCRYPT_BLOCK_LENGTH, Some(&mut block_len), &mut bytes_copied, diff --git a/crates/tests/misc/const_params/tests/win.rs b/crates/tests/misc/const_params/tests/win.rs index 25a97f75d7..fb7cb97b45 100644 --- a/crates/tests/misc/const_params/tests/win.rs +++ b/crates/tests/misc/const_params/tests/win.rs @@ -21,7 +21,7 @@ fn hstring() -> Result<()> { #[test] fn uri() -> Result<()> { unsafe { - let uri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), 0)?; + let uri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), None)?; let builder = CreateIUriBuilder(&uri, 0, 0)?; let mut host_len = 0u32; diff --git a/crates/tests/misc/extensions/tests/ntstatus.rs b/crates/tests/misc/extensions/tests/ntstatus.rs index 04d309c65e..ded1db58ee 100644 --- a/crates/tests/misc/extensions/tests/ntstatus.rs +++ b/crates/tests/misc/extensions/tests/ntstatus.rs @@ -33,7 +33,7 @@ fn test() -> Result<()> { std::mem::size_of::(), ); - BCryptGenRandom(provider, bytes, Default::default()).ok()?; + BCryptGenRandom(Some(provider), bytes, Default::default()).ok()?; assert_ne!(random, GUID::zeroed()); } diff --git a/crates/tests/misc/handles/tests/win.rs b/crates/tests/misc/handles/tests/win.rs index d341ed0b1c..54b98c9502 100644 --- a/crates/tests/misc/handles/tests/win.rs +++ b/crates/tests/misc/handles/tests/win.rs @@ -47,7 +47,7 @@ fn hfont() { let font: HFONT = HFONT(underlying as _); let object: HGDIOBJ = HGDIOBJ(font.0); - assert!(!DeleteObject(font).as_bool()); + assert!(!DeleteObject(font.into()).as_bool()); assert!(!DeleteObject(object).as_bool()); } } diff --git a/crates/tests/misc/interface/tests/com.rs b/crates/tests/misc/interface/tests/com.rs index 127979b569..323b7447c2 100644 --- a/crates/tests/misc/interface/tests/com.rs +++ b/crates/tests/misc/interface/tests/com.rs @@ -118,7 +118,7 @@ impl ICustomPersistMemory_Impl for Persist_Impl { fn test_custom_interface() -> windows::core::Result<()> { unsafe { // Use the OS implementation of Uri through the custom `ICustomUri` interface - let a: IUri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), 0)?; + let a: IUri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), None)?; let b: ICustomUri = a.cast()?; let mut domain = BSTR::new(); b.GetDomain(&mut domain).ok()?; diff --git a/crates/tests/misc/lib/tests/win.rs b/crates/tests/misc/lib/tests/win.rs index eae4b30218..1e9f4fc404 100644 --- a/crates/tests/misc/lib/tests/win.rs +++ b/crates/tests/misc/lib/tests/win.rs @@ -33,7 +33,7 @@ fn gdi() { #[test] fn wait_on_address() { unsafe { - WaitOnAddress(std::ptr::null(), std::ptr::null(), 0, 0).unwrap_err(); + WaitOnAddress(std::ptr::null(), std::ptr::null(), 0, None).unwrap_err(); } } diff --git a/crates/tests/misc/registry/tests/bad_string.rs b/crates/tests/misc/registry/tests/bad_string.rs index 2cd4cb3d0b..7529b49445 100644 --- a/crates/tests/misc/registry/tests/bad_string.rs +++ b/crates/tests/misc/registry/tests/bad_string.rs @@ -18,7 +18,7 @@ fn bad_string() -> Result<()> { RegSetValueExW( HKEY(key.as_raw()), w!("name"), - 0, + None, REG_SZ, Some(&bad_string_bytes), ) diff --git a/crates/tests/misc/registry/tests/interop.rs b/crates/tests/misc/registry/tests/interop.rs index b9507567d3..3cc4da469d 100644 --- a/crates/tests/misc/registry/tests/interop.rs +++ b/crates/tests/misc/registry/tests/interop.rs @@ -41,7 +41,7 @@ fn sys_interop() -> Result<()> { #[test] fn windows_interop() -> Result<()> { - use windows::{core::*, Win32::System::Registry::*}; + use windows::Win32::System::Registry::*; let test_key = "software\\windows-rs\\tests\\windows_interop"; _ = CURRENT_USER.remove_tree(test_key); @@ -60,7 +60,7 @@ fn windows_interop() -> Result<()> { unsafe { RegQueryInfoKeyW( HKEY(owned.as_raw()), - PWSTR::null(), + None, None, None, None, diff --git a/crates/tests/misc/reserved/tests/win.rs b/crates/tests/misc/reserved/tests/win.rs index 018bbaf894..76f542d330 100644 --- a/crates/tests/misc/reserved/tests/win.rs +++ b/crates/tests/misc/reserved/tests/win.rs @@ -11,12 +11,27 @@ fn test() -> Result<()> { assert!(CreateThreadpool(None).is_ok()); assert_eq!( - TrackPopupMenu(None, TPM_LEFTBUTTON, 1, 2, 0, None, Default::default(),), + TrackPopupMenu( + Default::default(), + TPM_LEFTBUTTON, + 1, + 2, + Default::default(), + Default::default(), + Default::default(), + ), FALSE ); let mut key = HKEY::default(); - RegOpenKeyExA(HKEY_CLASSES_ROOT, s!(r".txt"), 0, KEY_QUERY_VALUE, &mut key).ok()?; + RegOpenKeyExA( + HKEY_CLASSES_ROOT, + s!(r".txt"), + None, + KEY_QUERY_VALUE, + &mut key, + ) + .ok()?; let mut len = 0; RegQueryValueExA(key, s!("Content Type"), None, None, None, Some(&mut len)).ok()?; let mut buffer = vec![0u8; (len) as usize]; diff --git a/crates/tests/misc/win32/tests/win32.rs b/crates/tests/misc/win32/tests/win32.rs index 09377251e1..1e9bc59af7 100644 --- a/crates/tests/misc/win32/tests/win32.rs +++ b/crates/tests/misc/win32/tests/win32.rs @@ -141,7 +141,7 @@ fn bool_as_error() { #[test] fn com() -> windows::core::Result<()> { unsafe { - let stream = CreateStreamOnHGlobal(None, true)?; + let stream = CreateStreamOnHGlobal(Default::default(), true)?; let values = [1u8, 2u8, 3u8, 4u8]; let mut copied = 0; @@ -177,7 +177,7 @@ fn com_inheritance() { // IDXGIFactory assert!(factory - .MakeWindowAssociation(None, DXGI_MWA_FLAGS::default()) + .MakeWindowAssociation(HWND::default(), DXGI_MWA_FLAGS::default()) .is_ok()); // IDXGIFactory1 @@ -192,7 +192,7 @@ fn com_inheritance() { // IDXGIFactory7 (default) assert!( factory - .RegisterAdaptersChangedEvent(None) + .RegisterAdaptersChangedEvent(HANDLE::default()) .unwrap_err() .code() == DXGI_ERROR_INVALID_CALL @@ -206,12 +206,21 @@ fn onecore_imports() -> windows::core::Result<()> { unsafe { _ = HasExpandedResources()?; - let uri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), 0)?; + let uri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), None)?; let port = uri.GetPort()?; assert!(port == 80); - MiniDumpWriteDump(None, 0, None, MiniDumpNormal, None, None, None).unwrap_err(); + MiniDumpWriteDump( + Default::default(), + 0, + Default::default(), + MiniDumpNormal, + None, + None, + None, + ) + .unwrap_err(); assert!(D3DDisassemble11Trace(std::ptr::null(), 0, None, 0, 0, 0).is_err()); @@ -222,7 +231,7 @@ fn onecore_imports() -> windows::core::Result<()> { #[test] fn interface() -> windows::core::Result<()> { unsafe { - let uri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), 0)?; + let uri = CreateUri(w!("http://kennykerr.ca"), URI_CREATE_FLAGS::default(), None)?; let domain = uri.GetDomain()?; assert!(domain == "kennykerr.ca"); diff --git a/crates/tests/misc/win32_arrays/tests/xmllite.rs b/crates/tests/misc/win32_arrays/tests/xmllite.rs index 0f640d7e62..a015e5ce7b 100644 --- a/crates/tests/misc/win32_arrays/tests/xmllite.rs +++ b/crates/tests/misc/win32_arrays/tests/xmllite.rs @@ -6,7 +6,7 @@ use windows::{ #[test] fn test() -> Result<()> { unsafe { - let stream = CreateStreamOnHGlobal(None, true)?; + let stream = CreateStreamOnHGlobal(Default::default(), true)?; let mut writer: Option = None; CreateXmlWriter(&IXmlWriter::IID, &mut writer as *mut _ as _, None)?; @@ -110,7 +110,7 @@ fn test() -> Result<()> { #[test] fn lite() -> Result<()> { unsafe { - let stream = CreateStreamOnHGlobal(None, true)?; + let stream = CreateStreamOnHGlobal(Default::default(), true)?; let mut writer: Option = None; CreateXmlWriter(&IXmlWriterLite::IID, &mut writer as *mut _ as _, None)?; diff --git a/crates/tests/misc/window_long/tests/win.rs b/crates/tests/misc/window_long/tests/win.rs index 552e3fb0d4..850c357744 100644 --- a/crates/tests/misc/window_long/tests/win.rs +++ b/crates/tests/misc/window_long/tests/win.rs @@ -4,9 +4,9 @@ use windows::Win32::UI::WindowsAndMessaging::*; #[test] fn test() { unsafe { - SetWindowLongPtrA(None, GWLP_USERDATA, 0); - GetWindowLongPtrA(None, GWLP_USERDATA); - SetWindowLongPtrW(None, GWLP_USERDATA, 0); - GetWindowLongPtrW(None, GWLP_USERDATA); + SetWindowLongPtrA(Default::default(), GWLP_USERDATA, 0); + GetWindowLongPtrA(Default::default(), GWLP_USERDATA); + SetWindowLongPtrW(Default::default(), GWLP_USERDATA, 0); + GetWindowLongPtrW(Default::default(), GWLP_USERDATA); } }